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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
/*
Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3 or
later), or the GNU General Public License, version 2 (GPLv2), in all
cases as published by the Free Software Foundation.
*/
#include "xdr-common.h"
#include "compat.h"
#if defined(__GNUC__)
#if __GNUC__ >= 4
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#endif
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#include "rpc-common-xdr.h"
bool_t
xdr_auth_glusterfs_parms_v2 (XDR *xdrs, auth_glusterfs_parms_v2 *objp)
{
register int32_t *buf;
buf = NULL;
if (xdrs->x_op == XDR_ENCODE) {
buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
if (!xdr_int (xdrs, &objp->pid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->uid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->gid))
return FALSE;
} else {
IXDR_PUT_LONG(buf, objp->pid);
IXDR_PUT_U_LONG(buf, objp->uid);
IXDR_PUT_U_LONG(buf, objp->gid);
}
if (!xdr_array (xdrs, (char **)&objp->groups.groups_val, (u_int *) &objp->groups.groups_len, ~0,
sizeof (u_int), (xdrproc_t) xdr_u_int))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->lk_owner.lk_owner_val, (u_int *) &objp->lk_owner.lk_owner_len, ~0))
return FALSE;
return TRUE;
} else if (xdrs->x_op == XDR_DECODE) {
buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
if (!xdr_int (xdrs, &objp->pid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->uid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->gid))
return FALSE;
} else {
objp->pid = IXDR_GET_LONG(buf);
objp->uid = IXDR_GET_U_LONG(buf);
objp->gid = IXDR_GET_U_LONG(buf);
}
if (!xdr_array (xdrs, (char **)&objp->groups.groups_val, (u_int *) &objp->groups.groups_len, ~0,
sizeof (u_int), (xdrproc_t) xdr_u_int))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->lk_owner.lk_owner_val, (u_int *) &objp->lk_owner.lk_owner_len, ~0))
return FALSE;
return TRUE;
}
if (!xdr_int (xdrs, &objp->pid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->uid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->gid))
return FALSE;
if (!xdr_array (xdrs, (char **)&objp->groups.groups_val, (u_int *) &objp->groups.groups_len, ~0,
sizeof (u_int), (xdrproc_t) xdr_u_int))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->lk_owner.lk_owner_val, (u_int *) &objp->lk_owner.lk_owner_len, ~0))
return FALSE;
return TRUE;
}
bool_t
xdr_auth_glusterfs_parms (XDR *xdrs, auth_glusterfs_parms *objp)
{
register int32_t *buf;
int i;
buf = NULL;
if (xdrs->x_op == XDR_ENCODE) {
if (!xdr_u_quad_t (xdrs, &objp->lk_owner))
return FALSE;
buf = XDR_INLINE (xdrs, (4 + 16 )* BYTES_PER_XDR_UNIT);
if (buf == NULL) {
if (!xdr_u_int (xdrs, &objp->pid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->uid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->gid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->ngrps))
return FALSE;
if (!xdr_vector (xdrs, (char *)objp->groups, 16,
sizeof (u_int), (xdrproc_t) xdr_u_int))
return FALSE;
} else {
IXDR_PUT_U_LONG(buf, objp->pid);
IXDR_PUT_U_LONG(buf, objp->uid);
IXDR_PUT_U_LONG(buf, objp->gid);
IXDR_PUT_U_LONG(buf, objp->ngrps);
{
register u_int *genp;
for (i = 0, genp = objp->groups;
i < 16; ++i) {
IXDR_PUT_U_LONG(buf, *genp++);
}
}
}
return TRUE;
} else if (xdrs->x_op == XDR_DECODE) {
if (!xdr_u_quad_t (xdrs, &objp->lk_owner))
return FALSE;
buf = XDR_INLINE (xdrs, (4 + 16 )* BYTES_PER_XDR_UNIT);
if (buf == NULL) {
if (!xdr_u_int (xdrs, &objp->pid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->uid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->gid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->ngrps))
return FALSE;
if (!xdr_vector (xdrs, (char *)objp->groups, 16,
sizeof (u_int), (xdrproc_t) xdr_u_int))
return FALSE;
} else {
objp->pid = IXDR_GET_U_LONG(buf);
objp->uid = IXDR_GET_U_LONG(buf);
objp->gid = IXDR_GET_U_LONG(buf);
objp->ngrps = IXDR_GET_U_LONG(buf);
{
register u_int *genp;
for (i = 0, genp = objp->groups;
i < 16; ++i) {
*genp++ = IXDR_GET_U_LONG(buf);
}
}
}
return TRUE;
}
if (!xdr_u_quad_t (xdrs, &objp->lk_owner))
return FALSE;
if (!xdr_u_int (xdrs, &objp->pid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->uid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->gid))
return FALSE;
if (!xdr_u_int (xdrs, &objp->ngrps))
return FALSE;
if (!xdr_vector (xdrs, (char *)objp->groups, 16,
sizeof (u_int), (xdrproc_t) xdr_u_int))
return FALSE;
return TRUE;
}
bool_t
xdr_gf_dump_req (XDR *xdrs, gf_dump_req *objp)
{
register int32_t *buf;
buf = NULL;
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
return TRUE;
}
bool_t
xdr_gf_prog_detail (XDR *xdrs, gf_prog_detail *objp)
{
register int32_t *buf;
buf = NULL;
if (!xdr_string (xdrs, &objp->progname, ~0))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->prognum))
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->progver))
return FALSE;
if (!xdr_pointer (xdrs, (char **)&objp->next, sizeof (gf_prog_detail), (xdrproc_t) xdr_gf_prog_detail))
return FALSE;
return TRUE;
}
bool_t
xdr_gf_dump_rsp (XDR *xdrs, gf_dump_rsp *objp)
{
register int32_t *buf;
buf = NULL;
if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
return FALSE;
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
return FALSE;
if (!xdr_pointer (xdrs, (char **)&objp->prog, sizeof (gf_prog_detail), (xdrproc_t) xdr_gf_prog_detail))
return FALSE;
return TRUE;
}
|