rpcbind(3R)
rpcbind: rpcb_getmaps, rpcb_getaddr, rpcb_gettime, rpcb_rmtcall, rpcb_set, rpcb_unset - library routines for RPC bind service
As shipped in IRIX 6.5.30. Added 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 using the C standard library to make procedure calls to the RPC binder service, rpcbind. Rpcbind maintains a list of mappings between RPC program numbers and their universal addresses (IP addresses and ports). This page describes functions in the IRIX standard C library (libc), which are part of the new Transport Independent RPC (TI-RPC) functionality added to the IRIX standard C library in IRIX release 6.5.21 (known as BSD TI-RPC) and should not be confused with the older TI-RPC functionality in the UNIX System V Networking Library (known as System V TI-RPC, see intro(3N)). In particular, the BSD TI-RPC functions internally use the BSD socket network API instead of the System V TLI network API. BSD TI-RPC functions are marked in this page as BSD TI-RPC only. To use them code must be compiled with: cc -D_BSD_TIRPC prog.c The BSD TI-RPC functions in this page did not exist in IRIX before release 6.5.21. Applications using them should use the _MIPS_SYMBOL_PRESENT macro to provide a graceful failure mode when run on older IRIX releases. Routines #include <rpc/rpc.h> struct rpcblist * rpcb_getmaps(struct netconfig *netconf, const char *host); BSD TI-RPC only. 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(u_long prognum, u_long versnum, struct netconfig *netconf, struct netbuf *svcaddr, const char *host); BSD TI-RPC only. 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); BSD TI-RPC only. 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, u_long prognum, u_long versnum, u_long procnum, xdrproc_t inproc, caddr_t in, xdrproc_t outproc, caddr_t out, struct timeval tout, struct netbuf *svcaddr); BSD TI-RPC only. 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 This procedure should normally be used for a ping and nothing else. This routine allows programs to do lookup and call, all in one step. bool_t rpcb_set(u_long prognum, u_long versnum, struct netconfig *netconf, struct netbuf *svcaddr); BSD TI-RPC only. 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. bool_t rpcb_unset(u_long prognum, u_long versnum, struct netconfig *netconf); BSD TI-RPC only. 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 rpc(3R), rpcbind(1M), rpcinfo(1M)