1RPCBIND(3)               BSD Library Functions Manual               RPCBIND(3)
2

NAME

4     rpcb_getmaps, rpcb_getaddr, rpcb_gettime, rpcb_rmtcall, rpcb_set,
5     rpcb_unset — library routines for RPC bind service
6

SYNOPSIS

8     #include <rpc/rpc.h>
9
10     rpcblist *
11     rpcb_getmaps(const struct netconfig *netconf, const char *host);
12
13     bool_t
14     rpcb_getaddr(const rpcprog_t prognum, const rpcvers_t versnum,
15         const struct netconfig *netconf, struct netbuf *svcaddr,
16         const char *host);
17
18     bool_t
19     rpcb_gettime(const char *host, time_t * timep);
20
21     enum clnt_stat
22     rpcb_rmtcall(const struct netconfig *netconf, const char *host,
23         const rpcprog_t prognum, const rpcvers_t versnum,
24         const rpcproc_t procnum, const xdrproc_t inproc, const caddr_t in,
25         const xdrproc_t outproc, const caddr_t out,
26         const struct timeval tout, const struct netbuf *svcaddr);
27
28     bool_t
29     rpcb_set(const rpcprog_t prognum, const rpcvers_t versnum,
30         const struct netconfig *netconf, const struct netbuf *svcaddr);
31
32     bool_t
33     rpcb_unset(const rpcprog_t prognum, const rpcvers_t versnum,
34         const struct netconfig *netconf);
35

DESCRIPTION

37     These routines allow client C programs to make procedure calls to the RPC
38     binder service.  (see rpcbind(8)) maintains a list of mappings between
39     programs and their universal addresses.
40

Routines

42     rpcb_getmaps()
43            An interface to the rpcbind service, which returns a list of the
44            current RPC program-to-address mappings on host.  It uses the
45            transport specified through netconf to contact the remote rpcbind
46            service on host.  This routine will return NULL, if the remote
47            rpcbind could not be contacted.
48
49     rpcb_getaddr()
50            An interface to the rpcbind service, which finds the address of
51            the service on host that is registered with program number
52            prognum, version versnum, and speaks the transport protocol asso‐
53            ciated with netconf.  The address found is returned in svcaddr.
54            The svcaddr argument should be preallocated.  This routine returns
55            TRUE if it succeeds.  A return value of FALSE means that the map‐
56            ping does not exist or that the RPC system failed to contact the
57            remote rpcbind service.  In the latter case, the global variable
58            rpc_createerr (see rpc_clnt_create(3)) contains the RPC status.
59
60     rpcb_gettime()
61            This routine returns the time on host in timep.  If host is NULL,
62            rpcb_gettime() returns the time on its own machine.  This routine
63            returns TRUE if it succeeds, FALSE if it fails.  The
64            rpcb_gettime() function can be used to synchronize the time be‐
65            tween the client and the remote server.
66
67     rpcb_rmtcall()
68            An interface to the rpcbind service, which instructs rpcbind on
69            host to make an RPC call on your behalf to a procedure on that
70            host.  The netconfig() structure should correspond to a connec‐
71            tionless transport.  The svcaddr argument will be modified to the
72            server's address if the procedure succeeds (see rpc_call() and
73            clnt_call() in rpc_clnt_calls(3) for the definitions of other ar‐
74            guments).
75
76            This procedure should normally be used for a “ping” and nothing
77            else.  This routine allows programs to do lookup and call, all in
78            one step.
79
80            Note: