File: sm_inter_clnt.c

package info (click to toggle)
nfs-utils 1%3A1.2.8-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,520 kB
  • ctags: 4,124
  • sloc: ansic: 36,748; sh: 12,042; python: 1,002; makefile: 724
file content (102 lines) | stat: -rw-r--r-- 2,330 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include <memory.h> /* for memset */
#include "sm_inter.h"
#include <string.h>
#define SM_INTER_X

/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = { 25, 0 };

struct sm_stat_res *
sm_stat_1(struct sm_name *argp, CLIENT *clnt)
{
	static struct sm_stat_res clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call (clnt, SM_STAT,
		(xdrproc_t) xdr_sm_name, (caddr_t) argp,
		(xdrproc_t) xdr_sm_stat_res, (caddr_t) &clnt_res,
		TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&clnt_res);
}

struct sm_stat_res *
sm_mon_1(struct mon *argp, CLIENT *clnt)
{
	static struct sm_stat_res clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call (clnt, SM_MON,
		(xdrproc_t) xdr_mon, (caddr_t) argp,
		(xdrproc_t) xdr_sm_stat_res, (caddr_t) &clnt_res,
		TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&clnt_res);
}

struct sm_stat *
sm_unmon_1(struct mon_id *argp, CLIENT *clnt)
{
	static struct sm_stat clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call (clnt, SM_UNMON,
		(xdrproc_t) xdr_mon_id, (caddr_t) argp,
		(xdrproc_t) xdr_sm_stat, (caddr_t) &clnt_res,
		TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&clnt_res);
}

struct sm_stat *
sm_unmon_all_1(struct my_id *argp, CLIENT *clnt)
{
	static struct sm_stat clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call (clnt, SM_UNMON_ALL,
		(xdrproc_t) xdr_my_id, (caddr_t) argp,
		(xdrproc_t) xdr_sm_stat, (caddr_t) &clnt_res,
		TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&clnt_res);
}

void *
sm_simu_crash_1(void *argp, CLIENT *clnt)
{
	static char clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call (clnt, SM_SIMU_CRASH,
		(xdrproc_t) xdr_void, (caddr_t) argp,
		(xdrproc_t) xdr_void, (caddr_t) &clnt_res,
		TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return ((void *)&clnt_res);
}

void *
sm_notify_1(struct stat_chge *argp, CLIENT *clnt)
{
	static char clnt_res;

	memset((char *)&clnt_res, 0, sizeof(clnt_res));
	if (clnt_call (clnt, SM_NOTIFY,
		(xdrproc_t) xdr_stat_chge, (caddr_t) argp,
		(xdrproc_t) xdr_void, (caddr_t) &clnt_res,
		TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return ((void *)&clnt_res);
}