rpc_svc_calls.3n (2010 09)

r
rpc_svc_calls(3N) rpc_svc_calls(3N)
NAME
rpc_svc_calls: svc_dg_enablecache(), svc_done(), svc_exit(), svc_fd_negotiate_ucred(), svc_fdset(),
svc_freeargs(), svc_getargs(), svc_getreq_common(), svc_getreq_poll(), svc_getreqset(), svc_getrpccaller(),
svc_pollset(), svc_run(), svc_sendreply() - library routines for RPC servers
SYNOPSIS
#include <rpc/rpc.h>
int svc_dg_enablecache(SVCXPRT *
xprt ,
const u_int cache_size );
int svc_done(SVCXPRT *
xprt );
void svc_exit(void);
void svc_fd_negotiate_ucred(int
fd);
bool_t svc_freeargs(const SVCXPRT *
xprt ,
const xdrproc_t inproc ,
caddr_t in);
bool_t svc_getargs(const SVCXPRT *
xprt ,
const xdrproc_t inproc ,
caddr_t in);
void svc_getreq_common(const int
fd);
void svc_getreq_poll(struct pollfd *
pfdp ,
const int pollretval );
void svc_getreqset(fd_set *
rdfds);
struct netbuf *svc_getrpccaller(const SVCXPRT *
xprt );
void svc_run(void);
bool_t svc_sendreply(const SVCXPRT *
xprt ,
const xdrproc_t outproc ,
const caddr_t out);
fd_set svc_fdset;
pollfd_t *svc_pollfd;
int svc_max_pollfd;
DESCRIPTION
These routines are part of the RPC library which allows C language programs to make procedure calls on
other machines across the network.
These routines are associated with the server side of the RPC mechanism. Some of them are called by the
server side dispatch function. Others, such as
svc_run(), are called when the server is initiated.
The HP-UX implementation of RPC only supports the X/Open Transport Interface (XTI). Applications
that are written using the Transport Layer Interface (TLI) and wish to use RPC, must convert their appli-
cation to XTI.
Multithread Considerations
Because the service transport handle SVCXPRT contains a single data area for decoding arguments and
encoding results, the structure cannot freely be shared between threads that call functions to decode
arguments and encode results. When a server is operating in the Automatic or User MT modes (see
rpc_control (3N)), however, a copy of this structure is passed to the service dispatch procedure in order to
enable concurrent request processing. Under these circumstances, some routines which would otherwise
be unsafe, become thread-safe. These are marked as such. Also marked are routines that are unsafe for
multithreaded applications, and are not to be used by such applications.
Routines
See rpc (3N) for the definition of the
SVCXPRT data structure.
int svc_dg_enablecache()
This function allocates a duplicate request cache for the service endpoint xprt , large enough to hold
cache_size entries. Once enabled, there is no way to disable caching. This routine returns 1 if space
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)