Networking Services Library Functions rpcbind(3NSL)
NAME
rpcbind, rpcbgetmaps, rpcbgetaddr, rpcbgettime,
rpcbrmtcall, rpcbset, rpcbunset - library routines for
RPC bind service
SYNOPSIS
#include
struct rpcblist *rpcbgetmaps(const struct netconfig *nnetconf,
const char *host);
boolt rpcbgetaddr(const rpcprogt prognum, const rpcverst versnum,
const struct netconfig *netconf, struct netbuf *ssvcaddr,
const char *host);
boolt rpcbgettime(const char *host, timet *timep);
enum clntstat rpcbrmtcall(const struct netconfig *netconf,
const char *host, const rpcprogt prognum,
const rpcverst versnum, const rpcproct procnum,
const xdrproct inproc, const caddrt in,
const xdrproct outproc caddrt out,,
const struct timeval tout, struct netbuf *svcaddr);
boolt rpcbset(const rpcprogt prognum, const rpcverst versnum,
const struct netconfig *netconf, const struct netbuf *svcaddr);
boolt rpcbunset(const rpcprogt prognum, const rpcverst versnum,
const struct netconfig *netconf);
DESCRIPTION
These routines allow client C programs to make procedure
calls to the RPC binder service. rpcbind maintains a list of
mappings between programs and their universal addresses. See
rpcbind(1M).
Routines
rpcbgetmaps() An interface to the rpcbind service, which
returns a list of the current RPC
program-to-address mappings on host. It
uses the transport specified through
netconf to contact the remote rpcbind ser-
vice on host. This routine will return
NUL, if the remote rpcbind could not be
SunOS 5.11 Last change: 20 Feb 1998 1
Networking Services Library Functions rpcbind(3NSL)
contacted.
rpcbgetaddr() An 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 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 rpccreateerr contains the
RPC status. See rpcclntcreate(3NSL).
rpcbgettime() This routine returns the time on host in
timep. If host is NUL, rpcbgettime()
returns the time on its own machine. This
routine returns TRUE if it succeeds, FALSE
if it fails. rpcbgettime() can be used to
synchronize the time between the client
and the remote server. This routine is
particularly useful for secure RPC.
rpcbrmtcall() An 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 netconfig structure should
correspond to a connectionless transport.
The parameter *svcaddr will be modified to
the server's address if the procedure
succeeds. See rpccall() and clntcall()
in rpcclntcalls(3NSL) for the defini-
tions 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
rpcbind does not return any error messages
to the caller. In such a case, the caller
times out.
Note: rpcbrmtcall() is only available for
connectionless transports.
SunOS 5.11 Last change: 20 Feb 1998 2
Networking Services Library Functions rpcbind(3NSL)
rpcbset() An interface to the rpcbind service, which
establishes a mapping between the triple
[prognum, versnum, netconf->ncnetid] and
svcaddr on the machine's rpcbind service.
The value of ncnetid must correspond to a
network identifier that is defined by the
netconfig database. This routine returns
TRUE if it succeeds, FALSE otherwise. See
also svcreg() in rpcsvccalls(3NSL). If
there already exists such an entry with
rpcbind, rpcbset() will fail.
rpcbunset() An interface to the rpcbind service, which
destroys the mapping between the triple
[prognum, versnum, netconf->ncnetid] and
the address on the machine's rpcbind ser-
vice. If netconf is NUL, rpcbunset()
destroys all mapping between the triple
[prognum, versnum, all-transports] and the
addresses on the machine's rpcbind ser-
vice. This routine returns TRUE if it
succeeds, FALSE otherwise. Only the owner
of the service or the super-user can des-
troy the mapping. See also svcunreg() in
rpcsvccalls(3NSL).
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
MT-Level MT-Safe
SEE ALSO
rpcbind(1M), rpcinfo(1M), rpcclntcalls(3NSL),
rpcclntcreate(3NSL), rpcsvccalls(3NSL), attributes(5)
SunOS 5.11 Last change: 20 Feb 1998 3
|