p l -tag -width XXXXX t Fn rpc_reg Register program .Fa prognum , procedure .Fa procname , and version .Fa versnum with the RPC service package. If a request arrives for program .Fa prognum , version .Fa versnum , and procedure .Fa procnum , .Fa procname is called with a pointer to its parameter(s); .Fa procname should return a pointer to its static result(s); .Fa inproc is the XDR function used to decode the parameters while .Fa outproc is the XDR function used to encode the results. Procedures are registered on all available transports of the class .Fa nettype . See .Xr rpc 3 . This routine returns 0 if the registration succeeded, -1 otherwise.
p t Fn svc_reg Associates .Fa prognum and .Fa versnum with the service dispatch procedure, .Fa dispatch . If .Fa netconf is .Dv NULL , the service is not registered with the .Xr rpcbind 8 service. If .Fa netconf is non-zero, then a mapping of the triple [ .Fa prognum , .Fa versnum , .Fa netconf->nc_netid ] to .Fa xprt->xp_ltaddr is established with the local rpcbind service.
p The .Fn svc_reg routine returns 1 if it succeeds, and 0 otherwise.
p t Fn svc_unreg Remove from the rpcbind service, all mappings of the triple [ .Fa prognum , .Fa versnum , all-transports ] to network address and all mappings within the RPC service package of the double [ .Fa prognum , .Fa versnum ] to dispatch routines.
p t Fn svc_auth_reg Registers the service authentication routine .Fa handler with the dispatch mechanism so that it can be invoked to authenticate RPC requests received with authentication type .Fa 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.
p Typical service application would call .Fn svc_auth_reg after registering the service and prior to calling .Fn svc_run . When needed to process an RPC credential of type .Fa cred_flavor , the .Fa handler procedure will be called with two parameters .Fa "struct svc_req *rqst" , and .Fa "struct rpc_msg * msg" , and is expected to return a valid .Vt "enum auth_stat" value. There is no provision to change or delete an authentication handler once registered.
p The .Fn svc_auth_reg routine returns 0 if the registration is successful, 1 if .Fa cred_flavor already has an authentication handler registered for it, and -1 otherwise.
p t Fn xprt_register After RPC service transport handle .Fa xprt is created, it is registered with the RPC service package. This routine modifies the global variable .Va svc_fdset (see .Xr rpc_svc_calls 3 ) . Service implementors usually do not need this routine.
p t Fn xprt_unregister Before an RPC service transport handle .Fa xprt is destroyed, it unregisters itself with the RPC service package. This routine modifies the global variable .Va svc_fdset (see .Xr rpc_svc_calls 3 ) . Service implementors usually do not need this routine. .El .Sh SEE ALSO .Xr select 2 , .Xr rpc 3 , .Xr rpc_svc_calls 3 , .Xr rpc_svc_create 3 , .Xr rpc_svc_err 3 , .Xr rpcbind 3 , .Xr rpcbind 8