HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)
r
rpc_clnt_create(3N) rpc_clnt_create(3N)
NAME
rpc_clnt_create, clnt_control, clnt_create, clnt_create_vers, clnt_destroy, clnt_dg_create,
clnt_pcreateerror, clnt_raw_create, clnt_spcreateerror, clnt_tli_create, clnt_tp_create, clnt_vc_create,
rpc_createerr - library routines for dealing with creation and manipulation of CLIENT handles
SYNOPSIS
#include <rpc/rpc.h>
bool_t clnt_control(CLIENT *
clnt, const u_int
req, char *info);
CLIENT *clnt_create(const char *
host, const u_long
prognum,
const u_long versnum, const char *nettype
);
CLIENT *clnt_create_vers(const char *
host, const u_long prognum,
u_long *vers_outp , const u_long vers_low , const u_long
vers_high,
char *nettype );
void clnt_destroy(CLIENT *
clnt);
CLIENT *clnt_dg_create(const int
fildes
, const struct netbuf *svcaddr ,
const u_long prognum, const u_long versnum, const u_int
sendsz,
const u_int recvsz);
void clnt_pcreateerror(const char *
s);
CLIENT *clnt_raw_create(const u_long
prognum, const u_long versnum);
char *clnt_spcreateerror(const char *
s);
CLIENT *clnt_tli_create(const int
fildes, const struct netconfig *netconf ,
const struct netbuf *svcaddr, const_long prognum, const u_long versnum,
const u_int sendsz, const u_int recvsz);
CLIENT *clnt_tp_create(const char *
host, const u_long prognum,
const u_long versnum, const struct netconfig *netconf );
CLIENT *clnt_vc_create(const int
fildes, const struct netbuf *svcaddr ,
const u_long prognum, const u_long versnum, const u_int sendsz,
const u_int recvsz);
struct rpc_createerr rpc_createerr;
DESCRIPTION
RPC library routines allow C language programs to make procedure calls on other machines across the
network. First a CLIENT handle is created and then the client calls a procedure to send a request to the
server. On receipt of the request, the server calls a dispatch routine to perform the requested service,
and then sends a reply.
These routines are MT-Safe. In the case of multithreaded applications, the
_REENTRANT flag must be
defined on the command line at compilation time (
-D_REENTRANT). When the _REENTRANT flag is
defined, rpc_createerr becomes a macro which enables each thread to have its own
rpc_createerr.
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.
Routines
See rpc(3N) for the definition of the
CLIENT data structure.
bool_t clnt_control();
A function macro to change or retrieve various information about a client object. req indicates the
type of operation, and info is a pointer to the information. For both connectionless and connection-
oriented transports, the supported values of req and their argument types and what they do are:
CLSET_TIMEOUT struct timeval * set total timeout
CLGET_TIMEOUT struct timeval * get total timeout
Note: if you set the timeout using clnt_control(), the timeout argument passed by
clnt_call()
is ignored in all subsequent calls.
Section 3−−906 Hewlett-Packard Company − 1 − HP-UX 11i Version 2: September 2004