HP-UX Reference (11i v2 03/08) - 3 Library Functions N-Z (vol 7)
r
rpc_svc_calls(3N) rpc_svc_calls(3N)
This function is safe in MT applications. It will have no effect if invoked in modes other than the
User MT mode.
void svc_exit(void)
This function when called by any of the RPC server procedure 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(3N) functions, or using
xprt_register()
.
svc_exit() has global scope and ends all RPC server activity.
fd_set svc_fdset
A global variable reflecting the RPC server’s read file descriptor bit mask. This is only of interest if
service implementors do not call svc_run(), but rather do their own asynchronous event process-
ing. This variable is read-only, and it may change after calls to svc_getreqset() or any creation
routines. Do not pass its address to select (2)! Instead, pass the address of a copy.
MT applications executing in the User MT mode should never read this variable. They should use
auxiliary threads to do asynchronous event processing.
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 MT applications utilizing the 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 MT applications utilizing the User MT modes.
void svc_getreq_common()
This routine is called to handle a request on the given file descriptor.
This function macro is unsafe in MT applications.
void svc_getreq_poll()
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 poll(2) has determined that an
RPC request has arrived on some RPC file descriptors; pollretval is the return value from poll(2)
and pfdp is the array of pollfd structures on which the poll(2) was done. It is assumed to be an
array large enough to contain the maximal number of descriptors allowed.
This function macro is unsafe in MT 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 (2) 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 macro is unsafe in MT applications.
struct netbuf *svc_getrpccaller()
The approved way of getting the network address of the caller of a procedure associated with the
RPC service transport handle xprt .
This function macro is safe in MT applications.
void svc_run(void)
This routine never returns. In single threaded mode, it waits for RPC requests to arrive, and calls
the appropriate service procedure using svc_getreq_poll() when one arrives. This procedure
is usually waiting for the poll(2) library call to return.
Applications executing in the User MT modes should invoke this function exactly once. In the User
MT mode, it will provide a framework for service developers to create and manage their own
Section 3−−902 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: August 2003