rpc_svc_calls.3n (2010 09)

r
rpc_svc_calls(3N) rpc_svc_calls(3N)
necessary for a cache of the given size was successfully allocated, and
0 otherwise.
This function is safe in multithreaded applications.
int svc_done()
This function frees resources allocated to service a client request directed to the service endpoint
xprt . This call pertains only to servers executing in the User MT mode. In the User MT mode, ser-
vice procedures must invoke this call before returning, either after a client request has been ser-
viced, or after an error or abnormal condition that prevents a reply from being sent. After
svc_done() is invoked, the service endpoint xprt should not be referenced by the service pro-
cedure. Server multithreading modes and parameters can be set using the
rpc_control()
call.
This function is safe in multithreaded applications. It will have no effect if invoked in modes other
than the User MT mode.
void svc_exit()
This function, when called by any of the RPC server procedures or otherwise, destroys all services
registered by the server and causes svc_run() to return.
If RPC server activity is to be resumed, services must be reregistered with the RPC library either
through one of the
rpc_svc_create()
functions, or using xprt_register()
.
svc_exit() has global scope and ends all RPC server activity.
bool_t svc_freeargs()
A function macro that frees any data allocated by the RPC/XDR system when it decoded the argu-
ments to a service procedure using svc_getargs()
. This routine returns TRUE if the results
were successfully freed, and
FALSE otherwise.
This function macro is safe in multithreaded applications utilizing the Automatic or User MT
modes.
bool_t svc_getargs()
A function macro that decodes the arguments of an RPC request associated with the RPC service
transport handle xprt . The parameter in is the address where the arguments will be placed; inproc
is the XDR routine used to decode the arguments. This routine returns
TRUE if decoding succeeds,
and FALSE otherwise.
This function macro is safe in multithreaded applications utilizing the Automatic or User MT
modes.
void svc_getreq_common()
This function is called to handle a request on the given file descriptor.
This function is unsafe in multithreaded applications.
void svc_getreq_poll()
This function is only of interest if a service implementor does not call svc_run(), but instead
implements custom asynchronous event processing. It is called when poll() has determined that
an RPC request has arrived on some RPC file descriptors; pollretval is the return value from
poll() and pfdp is the array of pollfd structures on which the poll() was done. It is assumed to
be an array large enough to contain the maximal number of descriptors allowed.
This function is unsafe in multithreaded applications.
void svc_getreqset()
This routine is only of interest if a service implementor does not call svc_run(), but instead
implements custom asynchronous event processing. It is called when select() has determined
that an RPC request has arrived on some RPC file descriptors; rdfds is the resultant read file
descriptor bit mask. The routine returns when all file descriptors associated with the value of rdfds
have been serviced.
This function is unsafe in multithreaded applications.
struct netbuf *svc_getrpccaller()
This function is the approved way of getting the network address of the caller of a procedure associ-
ated with the RPC service transport handle xprt.
This function macro is safe in multithreaded applications.
void svc_run()
This function never returns. In single-threaded mode, it waits for RPC requests to arrive. When an
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010