RPCBIND(3) | Library Functions Manual | RPCBIND(3) |
rpcb_getmaps
, rpcb_getaddr
,
rpcb_gettime
, rpcb_rmtcall
,
rpcb_set
, rpcb_unset
—
#include <rpc/rpc.h>
struct rpcblist *
rpcb_getmaps
(const
struct netconfig *netconf,
const char *host);
bool_t
rpcb_getaddr
(const
rpcprog_t prognum, const
rpcvers_t versnum, const
struct netconfig *netconf,
struct netbuf *svcaddr,
const char *host);
bool_t
rpcb_gettime
(const
char *host, time_t *
timep);
enum clnt_stat
rpcb_rmtcall
(const
struct netconfig *netconf,
const char *host,
const rpcprog_t prognum, const
rpcvers_t versnum, const
rpcproc_t procnum, const xdrproc_t inproc,
const char *in,
const xdrproc_t outproc,
caddr_t out,
const struct timeval tout,
struct netbuf *svcaddr);
bool_t
rpcb_set
(const
rpcprog_t prognum, const
rpcvers_t versnum, const
struct netconfig *netconf,
const struct netbuf
*svcaddr);
bool_t
rpcb_unset
(const
rpcprog_t prognum, const
rpcvers_t versnum, const
struct netconfig *netconf);
rpcb_getmaps
()NULL
, if the remote rpcbind could not be
contacted.rpcb_getaddr
()TRUE
if it succeeds. A return value of FALSE
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 (see
rpc_clnt_create(3)
contains the RPC status.rpcb_gettime
()NULL
, rpcb_gettime
()
returns the time on its own machine. This routine returns
TRUE
if it succeeds, FALSE
if it fails. rpcb_gettime
() can be used to
synchronize the time between the client and the remote server.rpcb_rmtcall
()netconfig
() structure
should correspond to a connectionless transport. 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(3)
for the definitions of other parameters).
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.
Note: Even if the server is not running
rpcb_rmtcall
() does not return any error
messages to the caller. In such a case, the caller times out.
Note: rpcb_rmtcall
() is only available
for connectionless transports.
rpcb_set
()TRUE
if it succeeds, FALSE
otherwise. (See also svc_reg
() in
rpc_svc_calls(3). If
there already exists such an entry with rpcbind,
rpcb_set
() will fail.rpcb_unset
()NULL
, rpcb_unset
()
destroys all mapping between the triple [ prognum,
versnum, all-transports] and
the addresses on the machine's rpcbind service. This routine returns
TRUE
if it succeeds, FALSE
otherwise. Only the owner of the service or the super-user can destroy the
mapping. (See also svc_unreg
() in
rpc_svc_calls(3).December 4, 2005 | NetBSD 9.2 |