RPC_SVC_REG - Online Linux Manual PageSection : 3
Updated : May 3, 1993

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

SYNOPSIS #include <rpc/rpc.h>
int rpc_reg(rpcprog_t prognum , rpcvers_t versnum , rpcproc_t procnum , char *(*procname)() , xdrproc_t inproc , xdrproc_t outproc , char *nettype);
bool_t svc_reg(SVCXPRT *xprt , const rpcprog_t prognum , const rpcvers_t versnum , void (*dispatch)(struct svc_req *, SVCXPRT *) , const struct netconfig *netconf);
void svc_unreg(const rpcprog_t prognum , const rpcvers_t versnum);
int svc_auth_reg(int cred_flavor , enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *));
void xprt_register(SVCXPRT *xprt);
void xprt_unregister(SVCXPRT *xprt);

DESCRIPTIONThese routines are a part of the RPC library which allows the RPC servers to register themselves with rpcbind (see rpcbind(8)), and associate the given program and version number with the dispatch function. When the RPC server receives a RPC request, the library invokes the dispatch routine with the appropriate arguments.

RoutinesSee rpc(3) for the definition of the SVCXPRT data structure. rpc_reg() 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 argument(s); procname should return a pointer to its static result(s); inproc is the XDR function used to decode the arguments while outproc is the XDR function used to encode the results. Procedures are registered on all available transports of the class nettype. See rpc(3). This routine returns 0 if the registration succeeded, −1 otherwise. svc_reg() Associates prognum and versnum with the service dispatch procedure, dispatch. If netconf is NULL, the service is not registered with the rpcbind(8) service. If netconf is non-zero, then a mapping of the triple [prognum, , versnum, , netconf->nc_netid] to xprt->xp_ltaddr is established with the local rpcbind service. The svc_reg() routine returns 1 if it succeeds, and 0 otherwise. svc_unreg() Remove from the rpcbind service, all mappings of the triple [prognum, , versnum, , No , all-transports] to network address and all mappings within the RPC service package of the double [prognum, , versnum] to dispatch routines. svc_auth_reg() Registers the service authentication routine handler with the dispatch mechanism so that it can be invoked to authenticate RPC requests received with authentication type cred_flavor. This interface allows developers to add new authentication types to their RPC applications without needing to modify the libraries. Service implementors usually do not need this routine. Typical service application would call svc_auth_reg() after registering the service and prior to calling svc_run(). When needed to process an RPC credential of type cred_flavor, the handler procedure will be called with two arguments, struct svc_req *rqst and struct rpc_msg *msg, and is expected to return a valid enum auth_stat value. There is no provision to change or delete an authentication handler once registered. The svc_auth_reg() routine returns 0 if the registration is successful, 1 if cred_flavor already has an authentication handler registered for it, and −1 otherwise. xprt_register() After RPC service transport handle xprt is created, it is registered with the RPC service package. This routine modifies the global variable svc_fdset (see rpc_svc_calls(3)). Service implementors usually do not need this routine. xprt_unregister() Before an RPC service transport handle xprt is destroyed, it unregisters itself with the RPC service package. This routine modifies the global variable svc_fdset (see rpc_svc_calls(3)). Service implementors usually do not need this routine.

AVAILABILITYThese functions are part of libtirpc.

SEE ALSOselect(2), rpc(3), rpcbind(3), rpc_svc_calls(3), rpc_svc_create(3), rpc_svc_err(3), rpcbind(8)
0
Johanes Gumabo
Data Size   :   14,573 byte
man-rpc_svc_reg.3tBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 200,408
Visitor ID   :     :  
Visitor IP   :   3.142.198.148   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.