Requests the port number on which a service waits.
C Library (libc.a)
#include <rpc/rpc.h>
u_short pmap_getport (addr, prognum, versnum, protocol)
struct sockaddr_in * addr;
u_long prognum, versnum, protocol;
The pmap_getport subroutine acts as a user interface to the portmap daemon in order to return the port number on which a service waits.
Upon successful completion, the pmap_getport subroutine returns the port number of the requested program; otherwise, if the mapping does not exist or the Remote Procedure Call (RPC) system could not contact the remote portmap daemon, this subroutine returns a value of 0. If the remote portmap daemon could not be contacted, the rpc_createerr subroutine contains the RPC status.
The portmap daemon.
List of RPC Programming References.
TCP/IP Protocols in AIX 5L Version 5.2 System Management Guide: Communications and Networks.
Remote Procedure Call (RPC) Overview for Programming in AIX 5L Version 5.2 Communications Programming Concepts.