---
name: "rpcb_getport_sync"
section: "9"
platform: "linux"
package: "linux-manual-2.6.32"
version: "2.6.32-48squeeze6"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/rpcb_getport_sync"
---

# rpcb\_getport\_sync(9)

obtain the port for an RPC service on a given host

## NAME

rpcb\_getport\_sync - obtain the port for an RPC service on a given host

## SYNOPSIS

**int rpcb\_getport\_sync(struct sockaddr\_in \*** *sin***, u32** *prog***, u32** *vers***, int** *prot***);**

## ARGUMENTS

*sin*

address of remote peer

*prog*

RPC program number to bind

*vers*

RPC version number to bind

*prot*

transport protocol to use to make this request

## DESCRIPTION

Return value is the requested advertised port number, or a negative errno value.

Called from outside the RPC client in a synchronous task context. Uses default timeout parameters specified by underlying transport.

## XXX

Needs to support IPv6

## COPYRIGHT
