The pmap_getport() function shall
return the port number assigned to a service registered with a
RPC Binding service running on a given target system,
using the protocol described in
RFC 1833: Binding Protocols for ONC RPC Version 2.
The pmap_getport() function shall be called given the
RPC program number program,
the program version version, and transport
protocol protocol. Conforming implementations shall
IPPROTO_TCP protocols. On entry,
address shall specify the address of the
system on which the portmapper to be
contacted resides. The value of
shall be ignored, and the standard
value for the portmapper port shall always be used.
Note: Security and network restrictions may prevent a conforming application from contacting a remote RPC Binding Service.
On success, the pmap_getport() function shall return
the port number in host byte order of the RPC application
registered with the remote portmapper. On failure,
if either the program was not
registered or the remote portmapper service could not be reached,
the pmap_getport() function
shall return 0. If the remote portmap service could not be reached, the status
is left in the global variable