Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rpc_svc_cls(3) — Atari System V ue12

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rpcbind(1M)

rpcbind(3N)

rpc(3N)





   rpc_svc_calls(3N)                                         rpc_svc_calls(3N)


   NAME
         rpcsvccalls:   rpcreg, svcreg, svcunreg, xprtregister,
         xprtunregister - library routines for registering servers

   DESCRIPTION
         These routines are a part of the RPC library which allows the RPC
         servers to register themselves with rpcbind [see rpcbind(1M)], and it
         associates the given program and version number with the dispatch
         function.

      Routines
         See rpc(3N) for the definition of the SVCXPRT data structure.

         #include <rpc/rpc.h>

         int
         rpcreg(const ulong prognum, const ulong versnum,
               const ulong procnum, const char *(*procname),
               const xdrproct inproc, const xdrproct outproc,
               const char *nettype);

               Register program prognum, procedure procname, and version
               versnum with the RPC service package.  If a request arrives for
               program prognum, version versnum, and procedure procnum,
               procname is called with a pointer to its parameter(s); procname
               should return a pointer to its static result(s); inproc is used
               to decode the parameters while outproc is used to encode the
               results.  Procedures are registered on all available transports
               of the class nettype.  nettype defines a class of transports
               which can be used for a particular application.  If nettype is
               NULL, it defaults to netpath.  This routine returns 0 if the
               registration succeeded, -1 otherwise.

         int
         svcreg(const SVCXPRT *xprt, const ulong prognum, const ulong versnum,
               const void (*dispatch), const struct netconfig *netconf);

               Associates prognum and versnum with the service dispatch
               procedure, dispatch.  If netconf is NULL, the service is not
               registered with the rpcbind service.  If netconf is non-zero,
               then a mapping of the triple [prognum, versnum,
               netconf->ncnetid] to xprt->xpltaddr is established with the
               local rpcbind service.

               The svcreg routine returns 1 if it succeeds, and 0 otherwise

         void
         svcunreg(const ulong prognum, const ulong versnum);





   7/91                                                                 Page 1









   rpc_svc_calls(3N)                                         rpc_svc_calls(3N)


               Remove, from the rpcbind service, all mappings of the double
               [prognum, versnum] to dispatch routines, and of the triple
               [prognum, versnum, *] to network address.

         void
         xprtregister(const SVCXPRT *xprt);

               After RPC service transport handle xprt is created, it is
               registered with the RPC service package.  This routine modifies
               the global variable svcfds.  Service implementors usually do
               not need this routine.

         void
         xprtunregister(const SVCXPRT *xprt);

               Before an RPC service transport handle xprt is destroyed, it
               unregisters itself with the RPC service package.  This routine
               modifies the global variable svcfds.  Service implementors
               usually do not need this routine.

   SEE ALSO
         rpcbind(1M), rpcbind(3N), rpc(3N), rpcsvcerr(3N),
         rpcsvccreate(3N), rpcsvcreg(3N).






























   Page 2                                                                 7/91





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