pmap_clnt(3R)
pmap_clnt: pmap_getmaps, pmap_getport, pmap_rmtcall, pmap_set, pmap_setrmtcalltimeout, pmap_settimeouts, pmap_unset - library routines for RPC portmap service
Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.30.
NAME pmap_clnt: pmap_getmaps, pmap_getport, pmap_rmtcall, pmap_set, pmap_setrmtcalltimeout, pmap_settimeouts, pmap_unset - library routines for RPC portmap service SYNOPSIS AND DESCRIPTION This page describes functions from Irix standard C library (libc) which are used to interact with RPC portmap service. #include <rpc/rpc.h> struct pmaplist * pmap_getmaps(struct sockaddr_in *addr) A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command `rpcinfo -p' uses this routine. u_short pmap_getport(struct sockaddr_in *addr, rpcprog_t prognum, rpcvers_t versnum, u_int protocol) A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of 0 means that the mapping does not exist or that the RPC system failured to contact the remote portmap service. In the latter case, the global variable rpc_createerr() contains the RPC status. enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr, rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum, xdrproc_t inproc, void *in, xdrproc_t outproc, void *out, struct timeval tout, u_long *portp) A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program's port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a ping and nothing else. See also clnt_broadcast(). pmap_settimeouts(), and pmap_setrmtcalltimeout(). bool_t pmap_set(rpcprog_t prognum, rpcvers_t versnum, u_long protocol, u_short port) A user interface to the portmap service, which establishes a mapping between the triple [prognum, versnum, protocol] and port on the machine's portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns 1 if it succeeds, 0 otherwise. Automatically done by svc_register(). void pmap_setrmtcalltimeout(struct timeval intertry) Set the retry timeout for pmap_rmtcall(). Note that the total timeout per call is an argument to pmap_rmtcall(). void pmap_settimeouts(struct timeval intertry, struct timeval percall) Set the retry and total timeouts for RPCs to the portmapper. These timeouts are used explicitly by pmap_set() and pmap_getport(), and implicitly by clnt*_create(). bool_t pmap_unset(rpcprog_t prognum, rpcvers_t versnum) A user interface to the portmap service, which destroys all mapping between the triple [prognum, versnum, *] and ports on the machine's portmap service. This routine returns 1 if it succeeds, 0 otherwise. SEE ALSO portmap(1M), rpcbind(1M), rpcbind (3R), rpc(3R), rpc_clnt_cr(3R), xdr(3R), IRIX Network Programming Guide.