HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
r
rpc_clnt_calls(3N) rpc_clnt_calls(3N)
NAME
rpc_clnt_calls, clnt_call, clnt_freeres, clnt_geterr, clnt_perrno, clnt_perror, clnt_sperrno, clnt_sperror,
rpc_broadcast, rpc_broadcast_exp, rpc_call - library routines for client side calls
SYNOPSIS
#include <rpc/rpc.h>
enum clnt_stat clnt_call(CLIENT *
clnt, const u_long procnum,
const xdrproc_t
inproc, const caddr_t in, const xdrproc_t outproc,
caddr_t
out, const struct timeval tout);
bool_t clnt_freeres(CLIENT *
clnt, const xdrproc_t outproc, caddr_t out);
void clnt_geterr(const CLIENT *
clnt, struct rpc_err *errp);
void clnt_perrno(const enum clnt_stat
stat);
void clnt_perror(const CLIENT *
clnt, const char *s);
char *clnt_sperrno(const enum clnt_stat
stat);
char *clnt_sperror(const CLIENT *
clnt, const char *
s);
enum clnt_stat rpc_broadcast(const u_long
prognum, const u_long
versnum,
const u_long
procnum, const xdrproc_t inproc, const caddr_t in,
const xdrproc_t
outproc, caddr_t out, const resultproc_t eachresult,
const char *
nettype);
enum clnt_stat rpc_broadcast_exp(const u_long
prognum,
const u_long
versnum, const u_long procnum, const xdrproc_t xargs,
caddr_t
argsp, const xdrproc_t xresults, caddr_t resultsp,
const int
inittime, const int waittime,
const resultproc_t
eachresult, const char *nettype);
enum clnt_stat rpc_call(const char *
host, const u_long prognum,
const u_long
versnum, const u_long procnum, const xdrproc_t inproc,
const char *
in, const xdrproc_t outproc, char *out, const char *nettype);
DESCRIPTION
RPC library routines allow C language programs to make procedure calls on other machines across the net-
work. First, the client calls a procedure to send a request to the server. Upon receipt of the request, the
server calls a dispatch routine to perform the requested service, and then sends back a reply.
The clnt_call() , rpc_call(), and rpc_broadcast()
routines handle the client side of the pro-
cedure call. The remaining routines deal with error handling in the case of errors.
Some of the routines take a
CLIENT handle as one of the parameters. A CLIENT handle can be created
by an RPC creation routine such as
clnt_create() (see rpc_clnt_create(3N)).
These routines are safe for use in multithreaded applications. CLIENT handles can be shared between
threads, however in this implementation requests by different threads are serialized (that is, the first
request will receive its results before the second request is sent).
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 application
to XTI.
Routines
See rpc(3N) for the definition of the CLIENT data structure.
enum clnt_stat clnt_call()
A function macro that calls the remote procedure procnum associated with the client handle, clnt,
which is obtained with an RPC client creation routine such as clnt_create() (see
rpc_clnt_create(3N)). The parameter inproc is the XDR function used to encode the procedure’s
parameters, and outproc is the XDR function used to decode the procedure’s results; in is the address
of the procedure’s argument(s), and out is the address of where to place the result(s). tout is the time
allowed for results to be returned, which is overridden by a time-out set explicitly through
clnt_control(), see rpc_clnt_create(3N).
HP-UX Release 11i: December 2000 1 Section 3789
___
___