/* ** File name: GETSYI_CLNT.C ** ** Copyright (c) 1991, by ** Process Software Corporation ** Framingham, Massachusetts */ /* ** Except for the comments, this file is the output of RPCGEN. ** It is created by either of these commands: ** rpcgen -l -o getsyi_clnt.c getsyi.x ** rpcgen getsyi */ #include "TCPWARE_INCLUDE:RPC.H" #include "GETSYI.H" static struct timeval TIMEOUT = { 25, 0 }; /******************** getsyi_proc_1_1() ********************/ getsyi_res *getsyi_proc_1_1( argp, clnt) getsyi_args *argp; CLIENT *clnt; { static getsyi_res res; /* ** The XDR routines assume that any pointer with a non-zero value contains a ** valid address and use it instead of allocating memory. Since res does not ** point to any valid memory locations, it must be zeroed. */ bzero( &res, sizeof( res)); /* ** Call the RPC procedure using the supplied client (clnt). This client ** determines: the transport to be used (UDP or TCP), the server's program and ** version numbers, and the remote host and port. This function also requires ** that the address of the XDR routines for the arguments and results, and the ** address of the arguments and the results. Finally, a connection timeout ** (25 seconds) is supplied. To override this timeout, call clnt_control with ** the request CLSET_TIMEOUT and the new value. ** ** If the call to the RPC server fails, 0 is returned and it is the caller's ** responsibility to handle the error. The macro clnt_geterr will return the ** error code, and the function clnt_perror will display the error as a string. */ if( clnt_call( clnt, GETSYI_PROC_1, xdr_getsyi_args, argp, xdr_getsyi_res, &res, TIMEOUT) != RPC_SUCCESS) { return( 0); } return( &res); } /* end file GETSYI_CLNT.C */