A macro that calls a remote procedure. Format #include <rpc/rpc.h> enum clnt_stat clnt_call(CLIENT *handle, u_long procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out, struct timeval timeout);
1 – Arguments
handle A pointer to a client handle created by any of the client-handle creation routines. procnum The procedure number associated with the remote procedure. inproc The XDR routine used to encode the remote procedure's arguments. in A pointer to the remote procedure's arguments. outproc The XDR routine used to decode the remote procedure's results. out A pointer to the remote procedure's results. timeout A structure describing the time allowed for results to return to the client. If you have previously used the clnt_control macro with the CLSET_TIMEOUT code, this value is ignored.
2 – Description
Use the clnt_call macro after using one of the client-handle creation routines. After you are finished with the handle, return it using the clnt_destroy macro. Use the clnt_perror to print any errors that occurred.
3 – Return Values
RPC_SUCCESS Indicates success. clnt_stat Returns the buffer of type enum clnt_stat containing the status of the clnt_call operation.