Port Mapper Procedures
The port mapper program currently supports two protocols: User Datagram Protocol (UDP) and Transmission Control Protocol/Internet Protocol (TCP/IP). The port mapper is contacted by port number 111 on both protocols.
A description of the port mapper procedures follows.
| Item | Description |
|---|---|
| PMAPPROC_NULL | This procedure does no work. By convention, procedure 0 of any protocol takes no parameters and returns no results. |
| PMAPPROC_SET | When a program first becomes available on a machine, it registers itself with the port mapper program on that machine. The program passes its program number (prog), version number (vers), transport protocol number (prot), and the port (port) on which it awaits service request. The procedure returns a Boolean response whose value is either True if the procedure successfully established the mapping, or False if otherwise. The procedure does not establish a mapping if the values for the prog, vers, and prot parameters indicate a mapping already exists. |
| PMAPPROC_UNSET | When a program becomes unavailable, it should unregister itself with the port mapper program on the same machine. The parameters and results have meanings identical to those of the PMAPPROC_SET procedure. The protocol and port number fields of the argument are ignored. |
| PMAPPROC_GETPORT | Given a program number (prog), version number (vers), and transport protocol number (prot), this procedure returns the port number on which the program is awaiting call requests. A port value of zero means the program has not been registered. The port parameter of the argument is then ignored. |
| PMAPPROC_DUMP | This procedure enumerates all entries in the port mapper database. The procedure takes no parameters and returns a list of prog, vers, prot, and port values. |
| PMAPPROC_CALLIT | This procedure allows a caller to call another remote procedure on the same machine without knowing the remote procedure's port number. It supports broadcasts to arbitrary remote programs through the well-known port mapper port. The prog, vers, and proc parameters, and the bytes of the args parameter of an RPC call represent the program number, version number, procedure number, and arguments, respectively. The PMAPPROC_CALLIT procedure sends a response only if the procedure is successfully run. The port mapper communicates with the remote program using UDP only. The procedure returns the remote program's port number, and the bytes of results are the results of the remote procedure. |