summaryrefslogtreecommitdiffstats
path: root/rpc/block_clnt.c
blob: 2e967095afb280fc7e640536afd078c226dcc17d (plain)
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
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include <memory.h> /* for memset */
#include "block.h"

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

blockResponse *
block_create_cli_1(blockCreateCli *argp, CLIENT *clnt)
{
	static blockResponse clnt_res;

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

blockResponse *
block_list_cli_1(blockListCli *argp, CLIENT *clnt)
{
	static blockResponse clnt_res;

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

blockResponse *
block_info_cli_1(blockInfoCli *argp, CLIENT *clnt)
{
	static blockResponse clnt_res;

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

blockResponse *
block_delete_cli_1(blockDeleteCli *argp, CLIENT *clnt)
{
	static blockResponse clnt_res;

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

blockResponse *
block_create_1(blockCreate *argp, CLIENT *clnt)
{
	static blockResponse clnt_res;

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

blockResponse *
block_delete_1(blockDelete *argp, CLIENT *clnt)
{
	static blockResponse clnt_res;

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

blockResponse *
block_exec_1(char **argp, CLIENT *clnt)
{
	static blockResponse clnt_res;

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