1 /*
2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5
6 #pragma ident "%Z%%M% %I% %E% SMI"
7
8 #include <iprop_hdr.h>
9 #include "iprop.h"
10 #include <stdio.h>
11 #include <stdlib.h>
12
13 /*
14 * Default timeout can be changed using clnt_control()
15 */
16 static struct timeval TIMEOUT = { 25, 0 };
17
18 kdb_incr_result_t *
iprop_get_updates_1(argp,clnt)19 iprop_get_updates_1(argp, clnt)
20 kdb_last_t *argp;
21 CLIENT *clnt;
22 {
23 static kdb_incr_result_t clnt_res;
24
25 memset((char *)&clnt_res, 0, sizeof (clnt_res));
26 if (clnt_call(clnt, IPROP_GET_UPDATES,
27 (xdrproc_t)xdr_kdb_last_t, (caddr_t)argp,
28 (xdrproc_t)xdr_kdb_incr_result_t, (caddr_t)&clnt_res,
29 TIMEOUT) != RPC_SUCCESS) {
30 return (NULL);
31 }
32 return (&clnt_res);
33 }
34
35 kdb_fullresync_result_t *
iprop_full_resync_1(argp,clnt)36 iprop_full_resync_1(argp, clnt)
37 void *argp;
38 CLIENT *clnt;
39 {
40 static kdb_fullresync_result_t clnt_res;
41
42 memset((char *)&clnt_res, 0, sizeof (clnt_res));
43 if (clnt_call(clnt, IPROP_FULL_RESYNC,
44 (xdrproc_t)xdr_void, (caddr_t)argp,
45 (xdrproc_t)xdr_kdb_fullresync_result_t, (caddr_t)&clnt_res,
46 TIMEOUT) != RPC_SUCCESS) {
47 return (NULL);
48 }
49 return (&clnt_res);
50 }
51