SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from PCLinuxOS lib64tirpc-devel-1.0.1-1pclos2017.x86_64.rpm

RPC_SVC_REG

Section: C Library Functions (3)
Index
BSD mandoc
 

NAME

rpc_svc_reg rpc_reg svc_reg svc_unreg svc_auth_reg xprt_register xprt_unregister - library routines for registering servers 

SYNOPSIS

In rpc/rpc.hFt intFn rpc_reg rpcprog_t prognum rpcvers_t versnum rpcproc_t procnum char *(*procname)() xdrproc_t inproc xdrproc_t outproc char *nettypeFt bool_tFn svc_reg SVCXPRT *xprt const rpcprog_t prognum const rpcvers_t versnum void (*dispatch)(struct svc_req *, SVCXPRT *) const struct netconfig *netconfFt voidFn svc_unreg const rpcprog_t prognum const rpcvers_t versnumFt intFn svc_auth_reg int cred_flavor enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *)Ft voidFn xprt_register SVCXPRT *xprtFt voidFn xprt_unregister SVCXPRT *xprt 

DESCRIPTION

These routines are a part of the RPClibrary which allows the RPCservers to register themselves with rpcbind(seerpcbind(8)),and associate the given program and versionnumber with the dispatch function.When the RPC server receives a RPC request, the library invokes thedispatch routine with the appropriate arguments. 

Routines

Seerpc(3)for the definition of theVt SVCXPRTdata structure.

Fn rpc_reg
Register programFa prognum ,procedureFa procname ,and versionFa versnumwith the RPCservice package.If a request arrives for programFa prognum ,versionFa versnum ,and procedureFa procnum ,Fa procnameis called with a pointer to its argument(s);Fa procnameshould return a pointer to its static result(s);Fa inprocis the XDR function used to decode the arguments whileFa outprocis the XDR function used to encode the results.Procedures are registered on all available transports of the classFa nettype .Seerpc(3).This routine returns 0 if the registration succeeded,-1 otherwise.
Fn svc_reg
AssociatesFa prognumandFa versnumwith the service dispatch procedure,Fa dispatch .IfFa netconfisNULL the service is not registered with therpcbind(8)service.IfFa netconfis non-zero,then a mapping of the tripleBq Fa prognum , versnum , netconf->nc_netidtoFa xprt->xp_ltaddris established with the local rpcbindservice.

TheFn svc_regroutine returns 1 if it succeeds,and 0 otherwise.

Fn svc_unreg
Remove from the rpcbindservice, all mappings of the tripleBq Fa prognum , versnum , No all-transportsto network addressand all mappings within the RPC service packageof the doubleBq Fa prognum , versnumto dispatch routines.
Fn svc_auth_reg
Registers the service authentication routineFa handlerwith the dispatch mechanism so that it can beinvoked to authenticate RPC requests receivedwith authentication typeFa cred_flavor .This interface allows developers to add new authenticationtypes to their RPC applications without needing to modifythe libraries.Service implementors usually do not need this routine.

Typical service application would callFn svc_auth_regafter registering the service and prior to callingFn svc_run .When needed to process an RPC credential of typeFa cred_flavor ,theFa handlerprocedure will be called with two arguments,Fa struct svc_req *rqstandFa struct rpc_msg *msg ,and is expected to return a validVt enum auth_statvalue.There is no provision to change or delete an authentication handleronce registered.

TheFn svc_auth_regroutine returns 0 if the registration is successful,1 ifFa cred_flavoralready has an authentication handler registered for it,and -1 otherwise.

Fn xprt_register
After RPC service transport handleFa xprtis created, it is registered with the RPCservice package.This routine modifies the global variablesvc_fdset(seerpc_svc_calls3).Service implementors usually do not need this routine.
Fn xprt_unregister
Before an RPC service transport handleFa xprtis destroyed, it unregisters itself with theRPC service package.This routine modifies the global variablesvc_fdset(seerpc_svc_calls3).Service implementors usually do not need this routine.

 

AVAILABILITY

These functions are part of libtirpc. 

SEE ALSO

select(2),rpc(3),rpcbind(3),rpc_svc_calls3,rpc_svc_create3,rpc_svc_err3,rpcbind(8)


 

Index

NAME
SYNOPSIS
DESCRIPTION
Routines
AVAILABILITY
SEE ALSO

This document was created byman2html,using the manual pages.