A macro that changes or retrieves information about an RPC client process. Format #include <rpc/rpc.h> bool_t clnt_control(CLIENT *handle, u_int code, char *info);
1 – Arguments
handle A pointer to a client handle created by any of the client-handle creation routines. code A code designating the type of information to be set or retrieved. info A pointer to a buffer containing the information for a SET operation or the results of a GET operation.
2 – Description
For UDP and TCP transports specify any of the following for code: CLSET_TIMEOUT struct Set total timeout timeval CLGET_TIMEOUT struct Get total timeout timeval CLGET_SERVER_ADDR struct Get server address sockaddr_ in CLGET_FD int Get associated socket CL_FD_CLOSE void Close socket on clnt_destroy CL_FD_NCLOSE void Leave socket open on clnt_ destroy If you set the timeout using clnt_control, ONC RPC ignores the timeout parameter in all future clnt_call calls. The default total timeout is 25 seconds. For the UDP transport two additional options are available: CLSET_RETRY_ struct Set retry timeout TIMEOUT timeval CLGET_RETRY_ struct Get retry timeout TIMEOUT timeval The timeout value in these two calls is the time that UDP waits for a response before retransmitting the message to the server. The default time is 5 seconds. The retry timeout controls when UDP retransmits the request; the total timeout controls the total time that the client should wait for a response. For example, with the default settings, UDP will retry the transmission four times at 5-second intervals.
3 – Return Values
TRUE Success FALSE Failure