1RPC_CLNT_CALLS(3)        BSD Library Functions Manual        RPC_CLNT_CALLS(3)
2

NAME

4     rpc_clnt_calls, clnt_call, clnt_freeres, clnt_geterr, clnt_perrno,
5     clnt_perror, clnt_sperrno, clnt_sperror, rpc_broadcast,
6     rpc_broadcast_exp, rpc_call — library routines for client side calls
7

SYNOPSIS

9     #include <rpc/rpc.h>
10
11     enum clnt_stat
12     clnt_call(CLIENT *clnt, const rpcproc_t procnum, const xdrproc_t inproc,
13         const caddr_t in, const xdrproc_t outproc, caddr_t out,
14         const struct timeval tout);
15
16     bool_t
17     clnt_freeres(CLIENT *clnt, const xdrproc_t outproc, caddr_t out);
18
19     void
20     clnt_geterr(const CLIENT * clnt, struct rpc_err * errp);
21
22     void
23     clnt_perrno(const enum clnt_stat stat);
24
25     void
26     clnt_perror(CLIENT *clnt, const char *s);
27
28     char *
29     clnt_sperrno(const enum clnt_stat stat);
30
31     char *
32     clnt_sperror(CLIENT *clnt, const char * s);
33
34     enum clnt_stat
35     rpc_broadcast(const rpcprog_t prognum, const rpcvers_t versnum,
36         const rpcproc_t procnum, const xdrproc_t inproc, const caddr_t in,
37         const xdrproc_t outproc, caddr_t out, const resultproc_t eachresult,
38         const char *nettype);
39
40     enum clnt_stat
41     rpc_broadcast_exp(const rpcprog_t prognum, const rpcvers_t versnum,
42         const rpcproc_t procnum, const xdrproc_t xargs, caddr_t argsp,
43         const xdrproc_t xresults, caddr_t resultsp,
44         const resultproc_t eachresult, const int inittime,
45         const int waittime, const char * nettype);
46
47     enum clnt_stat
48     rpc_call(const char *host, const rpcprog_t prognum,
49         const rpcvers_t versnum, const rpcproc_t procnum,
50         const xdrproc_t inproc, const char *in, const xdrproc_t outproc,
51         char *out, const char *nettype);
52

DESCRIPTION

54     RPC library routines allow C language programs to make procedure calls on
55     other machines across the network.  First, the client calls a procedure
56     to send a request to the server.  Upon receipt of the request, the server
57     calls a dispatch routine to perform the requested service, and then sends
58     back a reply.
59
60     The clnt_call(), rpc_call(), and rpc_broadcast() routines handle the
61     client side of the procedure call.  The remaining routines deal with
62     error handling in the case of errors.
63
64     Some of the routines take a CLIENT handle as one of the arguments.  A
65     CLIENT handle can be created by an RPC creation routine such as
66     clnt_create() (see rpc_clnt_create(3)).
67
68     These routines are safe for use in multithreaded applications.  CLIENT
69     handles can be shared between threads, however in this implementation
70     requests by different threads are serialized (that is, the first request
71     will receive its results before the second request is sent).
72

Routines

74     See rpc(3) for the definition of the CLIENT data structure.
75
76     clnt_call()
77            A function macro that calls the remote procedure procnum associ‐
78            ated with the client handle, clnt, which is obtained with an RPC
79            client creation routine such as clnt_create() (see
80            rpc_clnt_create(3)).  The inproc argument is the XDR function used
81            to encode the procedure's arguments, and outproc is the XDR func‐
82            tion used to decode the procedure's results; in is the address of
83            the procedure's argument(s), and out is the address of where to
84            place