Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/krb5/src/lib/rpc/unit-test/rpc_test_clnt.c
39565 views
1
#include "rpc_test.h"
2
#include <string.h>
3
4
/* Default timeout can be changed using clnt_control() */
5
static struct timeval TIMEOUT = { 25, 0 };
6
7
char **
8
rpc_test_echo_1(char **argp, CLIENT *clnt)
9
{
10
static char *clnt_res;
11
12
memset(&clnt_res, 0, sizeof (clnt_res));
13
if (clnt_call(clnt, RPC_TEST_ECHO,
14
(xdrproc_t) xdr_wrapstring, (caddr_t) argp,
15
(xdrproc_t) xdr_wrapstring, (caddr_t) &clnt_res,
16
TIMEOUT) != RPC_SUCCESS) {
17
return (NULL);
18
}
19
return (&clnt_res);
20
}
21
22