Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rpcbind(3N) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rpcbind(1M)

rpcinfo(1M)

rpcbind(3N)                                                     rpcbind(3N)

NAME
     rpcbind: rpcbgetmaps, rpcbgetaddr, rpcbgettime, rpcbrmtcall,
     rpcbset, rpcbunset - 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 map-
     pings between programs and their universal addresses.

     If you use one of the RPC functions, you must link the libnsl library
     at compilation (cc -lnsl).

   Routines

     #include <rpc/rpc.h>

     struct rpcblist *
     rpcbgetmaps(const 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.

     boolt
     rpcbgetaddr(const ulong prognum, const ulong versnum,
          const 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 asso-
          ciated 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 rpccreateerr
          contains the RPC status.

     boolt
     rpcbgettime(const char *host, timet *timep);

          This routine returns the time on host in timep. If host is NULL,
          rpcbgettime returns the time on its own machine. This routine
          returns 1 if it succeeds, 0 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.







Page 1                       Reliant UNIX 5.44                Printed 11/98

rpcbind(3N)                                                     rpcbind(3N)

     enum clntstat
     rpcbrmtcall(const struct netconfig *netconf, const char *host,
          const ulong prognum, const ulong versnum, const ulong procnum,
          const xdrproct inproc, const caddrt in,
          const xdrproct outproc, const caddrt out,
          const 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 rpccall and clntcall in
          rpcclntcalls(3N) for the definitions of other parameters]. This
          procedure should normally be used for a "ping" and nothing else
          [see rpcbroadcast in rpcclntcalls(3N)]. This routine allows
          programs to do lookup and call, all in one step.

     boolt
     rpcbset(const ulong prognum, const ulong versnum,
          const struct netconfig *netconf, const struct netbuf *svcaddr);

          A user interface to the rpcbind service, which establishes a map-
          ping between the triple [prognum, versnum, netconf->ncnetid] and
          svcaddr on the machine's rpcbind service. The value of transport
          must correspond to a network token that is defined by the netcon-
          fig database. This routine returns 1 if it succeeds, 0 otherwise
          [see also svcreg in rpcsvccalls(3N)].

     boolt
     rpcbunset(const ulong prognum, const ulong versnum,
          const struct netconfig *netconf);

          A user interface to the rpcbind service, which destroys all map-
          ping between the triple [prognum, versnum, netconf->ncnetid] and
          the address on the machine's rpcbind service. If netconf is NULL,
          rpcbunset 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
          svcunreg in rpcsvccalls(3N)].

SEE ALSO
     rpcbind(1M), rpcinfo(1M), rpcclntcalls(3N), rpcsvccalls(3N).













Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026