Requests the port number on which a service waits.
C Library (libc.a)
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.
|addr||Points to the Internet Protocol (IP) address of the host where the remote program supporting the waiting service resides.|
|prognum||Specifies the program number of the remote program.|
|versnum||Specifies the version number of the remote program.|
|protocol||Specifies the transport protocol the service recognizes.|
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.
This subroutine is part of Base Operating System (BOS) Runtime.
The portmap daemon.
List of RPC Programming References.
TCP/IP Protocols in AIX Version 4.3 System Management Guide: Communications and Networks.
Remote Procedure Call (RPC) Overview for Programming in AIX Version 4.3 Communications Programming Concepts.