rpcbind(3N)
rpcbind: rpcb_getmaps, rpcb_getaddr, rpcb_gettime, rpcb_rmtcall, rpcb_set, rpcb_unset - library routines for RPC bind service
Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.30.
NAME rpcbind: rpcb_getmaps, rpcb_getaddr, rpcb_gettime, rpcb_rmtcall, rpcb_set, rpcb_unset - library routines for RPC bind service DESCRIPTION These routines allow client C programs to make procedure calls to the RPC binder service. rpcbind [see rpcbind(1M)] maintains a list of mappings between programs and their universal addresses. Routines #include <rpc/rpc.h> struct rpcblist * rpcb_getmaps(struct netconfig *netconf, const char *host); A user interface to the rpcbind service, which returns a list of the current RPC program-to-address mappings on the host named. It uses the transport specified through netconf to contact the remote rpcbind service on host host. This routine will return NULL, if the remote rpcbind could not be contacted. bool_t rpcb_getaddr(rpcprog_t prognum, rpcvers_t versnum, struct netconfig *netconf, struct netbuf *svcaddr, const char *host); A user interface to the rpcbind service, which finds the address of the service on host that is registered with program number prognum, version versnum, and speaks the transport protocol associated with netconf. The address found is returned in svcaddr. svcaddr should be preallocated. This routine returns 1 if it succeeds. A return value of 0 means that the mapping does not exist or that the RPC system failed to contact the remote rpcbind service. In the latter case, the global variable rpc_createerr contains the RPC status. bool_t rpcb_gettime(const char *host, time_t *timep); This routine returns the time on host in timep. If host is NULL, rpcb_gettime returns the time on its own machine. This routine returns 1 if it succeeds, 0 if it fails. rpcb_gettime can be used to synchronize the time between the client and the remote server. This routine is particularly useful for secure RPC. enum clnt_stat rpcb_rmtcall(struct netconfig *netconf, const char *host, rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum, xdrproc_t inproc, void *in, xdrproc_t outproc, void *out, struct timeval tout, struct netbuf *svcaddr); A user interface to the rpcbind service, which instructs rpcbind on host to make an RPC call on your behalf to a procedure on that host. The parameter *svcaddr will be modified to the server's address if the procedure succeeds [see rpc_call and clnt_call in rpc_clnt_calls(3N) for the definitions of other parameters]. This procedure should normally be used for a ping and nothing else [see rpc_broadcast in rpc_clnt_calls(3N)]. This routine allows programs to do lookup and call, all in one step. bool_t rpcb_set(rpcprog_t prognum, rpcvers_t versnum, struct netconfig *netconf, struct netbuf *svcaddr); A user interface to the rpcbind service, which establishes a mapping between the triple [prognum, versnum, netconf->nc_netid] and svcaddr on the machine's rpcbind service. The value of netconf must correspond to a network token, as defined by the netconfig database, for the svcaddr. This routine returns 1 if it succeeds, 0 otherwise. [See also svc_reg in rpc_svc_calls(3N)]. bool_t rpcb_unset(rpcprog_t prognum, rpcvers_t versnum, struct netconfig *netconf); A user interface to the rpcbind service, which destroys all mapping between the triple [prognum, versnum, netconf->nc_netid] and the address on the machine's rpcbind service. If netconf is NULL, rpcb_unset destroys all mapping between the triple [prognum, versnum, *] and the addresses on the machine's rpcbind service. This routine returns 1 if it succeeds, 0 otherwise. [See also svc_unreg in rpc_svc_calls(3N)]. SEE ALSO rpc_clnt_calls(3N), rpc_svc_calls(3N), rpcbind(1M), rpcinfo(1M)