1*7f2fe78bSCy Schubert #include "rpc_test.h"
2*7f2fe78bSCy Schubert #include <string.h>
3*7f2fe78bSCy Schubert
4*7f2fe78bSCy Schubert /* Default timeout can be changed using clnt_control() */
5*7f2fe78bSCy Schubert static struct timeval TIMEOUT = { 25, 0 };
6*7f2fe78bSCy Schubert
7*7f2fe78bSCy Schubert char **
rpc_test_echo_1(argp,clnt)8*7f2fe78bSCy Schubert rpc_test_echo_1(argp, clnt)
9*7f2fe78bSCy Schubert char **argp;
10*7f2fe78bSCy Schubert CLIENT *clnt;
11*7f2fe78bSCy Schubert {
12*7f2fe78bSCy Schubert static char *clnt_res;
13*7f2fe78bSCy Schubert
14*7f2fe78bSCy Schubert memset(&clnt_res, 0, sizeof (clnt_res));
15*7f2fe78bSCy Schubert if (clnt_call(clnt, RPC_TEST_ECHO,
16*7f2fe78bSCy Schubert (xdrproc_t) xdr_wrapstring, (caddr_t) argp,
17*7f2fe78bSCy Schubert (xdrproc_t) xdr_wrapstring, (caddr_t) &clnt_res,
18*7f2fe78bSCy Schubert TIMEOUT) != RPC_SUCCESS) {
19*7f2fe78bSCy Schubert return (NULL);
20*7f2fe78bSCy Schubert }
21*7f2fe78bSCy Schubert return (&clnt_res);
22*7f2fe78bSCy Schubert }
23