Contacting Portmapper
To find the port of a remote program, the client sends an RPC request to
well-known port 111 of the server's host. If Portmapper has a port number
entry for the remote program, Portmapper provides the port number in the
RPC reply. The client then requests the remote program by sending an RPC
request to the port number provided by Portmapper.
Clients can save port numbers of recently called remote programs to avoid
having to contact Portmapper for each request to a server.
RPC also provides the following calls for interfacing with Portmapper:
Call
pmap
_ getmaps ( )
Returnsalistofcurrentprogram - to -
portmappingsontheforeignhost
pmap _ getport ( )
Returnstheportnumberassociatedwiththeremoveprogram
,version ,andtransportprotocol
pmap _ rmtcall ( )
InstructsPortmappertomakeanRPCcalltoaprocedureonthehost
pmap
_ set ( )
Setsthemappingofaprogramtoaportonthelocalmachine
pmap
_ unset ( )
Removesmappingsassociatedwiththeprogramandversionnumberonthelocalmachine
xdr
_ pmap ( )
TranslatesanRPCprocedureidentification
xdr
_ pmaplist ( )
TranslatesavariablenumberofRPCprocedureidentifications
[Back: Registering and Unregistering a Port with Portmapper]
[Next: Portmapper Procedures]