clnt_control(3) CLIX clnt_control(3)
NAME
clnt_control - Library function for remote procedure calls
LIBRARY
Berkeley Software Distribution Library (libbsd.a)
SYNOPSIS
#include <sys/rpc/types.h>
bool_t clnt_control(
CLIENT *cl ,
int req ,
char *info );
PARAMETERS
cl Specifies the address of the client handle.
req Specifies the operation requested.
info Specifies the address of request-specific data.
DESCRIPTION
The clnt_control() function allows C programs to make procedure calls on
other machines across the network. First, the client calls a procedure to
send a data packet to the server. Upon receipt of the packet, the server
calls a dispatch routine to perform the requested service, and then sends
back a reply. Finally, the procedure call returns to the client.
The clnt_control() function is a macro used to change or retrieve various
information about a client object. The req parameter indicates the type
of operation, and info is a pointer to the information. For both UDP and
TCP, the supported values of req and their argument types and functions
are as follows:
CLSET_TIMEOUT
(struct timeval) Set total timeout.
CLGET_TIMEOUT
(struct timeval) Get total timeout.
CLGET_SERVER_ADDR
(struct sockaddr) Get server's address.
The following operations are valid for UDP only:
CLSET_RETRY_TIMEOUT
2/94 - Intergraph Corporation 1
clnt_control(3) CLIX clnt_control(3)
(struct timeval) Set the retry timeout.
CLGET_RETRY_TIMEOUT
(struct timeval) Get the retry timeout.
The retry timeout is the time that ``UDP RPC'' waits for the server to
reply before retransmitting the request.
NOTES
If you set the timeout using clnt_control(), the timeout parameter passed
to clnt_call() will be ignored in all future calls.
RETURN VALUES
This function returns 0 if the operation is not supported, and nonzero if
the operation is successful.
RELATED INFORMATION
Functions: xdr_int(3), xdr_bytes(3), xdr_getpos(3), xdr_pointer(3),
xdrrec_create(3), xdr_array(3), xdr_destroy(3), xdr_free(3),
xdr_inline(3), xdrmem_create(3), xdr_opaque(3), xdr_union(3),
xdr_vector(3), xdr_void(3)
CLIX Programming Guide
2 Intergraph Corporation - 2/94