File: rstat_clnt.c

package info (click to toggle)
scotty 2.1.9-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 9,984 kB
  • ctags: 4,313
  • sloc: ansic: 35,946; sh: 12,591; tcl: 8,122; yacc: 2,442; makefile: 898; lex: 370
file content (97 lines) | stat: -rw-r--r-- 1,895 bytes parent folder | download | duplicates (4)
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
/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include <rpc/rpc.h>
#if !defined(__WIN32__) && !defined(_WIN32)
#include <sys/time.h>
#endif
#include "rstat.h"

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

statstime *
rstatproc_stats_3(argp, clnt)
	void *argp;
	CLIENT *clnt;
{
	static statstime res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, RSTATPROC_STATS, xdr_void, argp, xdr_statstime, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}

u_int *
rstatproc_havedisk_3(argp, clnt)
	void *argp;
	CLIENT *clnt;
{
	static u_int res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, RSTATPROC_HAVEDISK, xdr_void, argp, xdr_u_int, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}

statsswtch *
rstatproc_stats_2(argp, clnt)
	void *argp;
	CLIENT *clnt;
{
	static statsswtch res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, RSTATPROC_STATS, xdr_void, argp, xdr_statsswtch, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}

u_int *
rstatproc_havedisk_2(argp, clnt)
	void *argp;
	CLIENT *clnt;
{
	static u_int res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, RSTATPROC_HAVEDISK, xdr_void, argp, xdr_u_int, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}

stats *
rstatproc_stats_1(argp, clnt)
	void *argp;
	CLIENT *clnt;
{
	static stats res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, RSTATPROC_STATS, xdr_void, argp, xdr_stats, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}

u_int *
rstatproc_havedisk_1(argp, clnt)
	void *argp;
	CLIENT *clnt;
{
	static u_int res;

	bzero((char *)&res, sizeof(res));
	if (clnt_call(clnt, RSTATPROC_HAVEDISK, xdr_void, argp, xdr_u_int, &res, TIMEOUT) != RPC_SUCCESS) {
		return (NULL);
	}
	return (&res);
}