pmap_getport()

The pmap_getport() call returns the port number associated with the remote program (prognum), the version (versnum), and the transport protocol (protocol).

Syntax

#include <rpc\rpc.h>

u_short
pmap_getport(addr, prognum, versnum, protocol)
struct sockaddr_in *addr;
u_long prognum;
u_long versnum;
u_long protocol;

Parameters

addr

prognum versnum protocol

Return Values

The value 0 indicates that the mapping does not exist or that the remote PORTMAP could not be contacted. If Portmapper cannot be contacted, rpc_createerr contains the RPC status.

Related Calls


[Back: pmap_getmaps()]
[Next: pmap_rmtcall()]