HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)
r
rpc_svc_reg(3N) rpc_svc_reg(3N)
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 pro-
cedure will be called with two parameters
(struct svc_req *
rqst, 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.
void 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(3N)). Service implementors
usually do not need this routine.
void 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(3N)). Service
implementors usually do not need this routine.
MULTITHREAD USAGE
Thread Safe: Yes
Cancel Safe: Yes
Fork Safe: No
Async-cancel Safe: No
Async-signal Safe: No
These functions can be called safely in a multithreaded environment. They may be cancellation points in
that they call functions that are cancel points.
In a multithreaded environment, these functions are not safe to be called by a child process after
fork()
and before exec(). These functions should not be called by a multithreaded application that supports
asynchronous cancellation or asynchronous signals.
SEE ALSO
inetd(1M), rpcbind(1M), select(2), rpc(3N), rpc_svc_calls(3N), rpc_svc_create(3N), rpc_svc_err(3N),
rpcbind(3N).
HP-UX 11i Version 3: February 2007 − 2 − Hewlett-Packard Company 351