nlm_prot_xdr.c revision 1.1 1 1.1 dholland /* $NetBSD: nlm_prot_xdr.c,v 1.1 2013/09/30 07:19:46 dholland Exp $ */
2 1.1 dholland /*
3 1.1 dholland * Please do not edit this file.
4 1.1 dholland * It was generated using rpcgen.
5 1.1 dholland */
6 1.1 dholland
7 1.1 dholland #include <nlm/nlm_prot.h>
8 1.1 dholland #include <sys/cdefs.h>
9 1.1 dholland #ifndef lint
10 1.1 dholland /*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/
11 1.1 dholland /*static char sccsid[] = "from: * @(#)nlm_prot.x 2.1 88/08/01 4.0 RPCSRC";*/
12 1.1 dholland /* __RCSID("NetBSD: nlm_prot.x,v 1.6 2000/06/07 14:30:15 bouyer Exp "); */
13 1.1 dholland #endif /* not lint */
14 1.1 dholland /* __FBSDID("FreeBSD: head/sys/nlm/nlm_prot_xdr.c 177685 2008-03-28 09:50:32Z dfr "); */
15 1.1 dholland __RCSID("$NetBSD: nlm_prot_xdr.c,v 1.1 2013/09/30 07:19:46 dholland Exp $");
16 1.1 dholland
17 1.1 dholland bool_t
18 1.1 dholland xdr_nlm_stats(XDR *xdrs, nlm_stats *objp)
19 1.1 dholland {
20 1.1 dholland
21 1.1 dholland if (!xdr_enum(xdrs, (enum_t *)objp))
22 1.1 dholland return (FALSE);
23 1.1 dholland return (TRUE);
24 1.1 dholland }
25 1.1 dholland
26 1.1 dholland bool_t
27 1.1 dholland xdr_nlm_holder(XDR *xdrs, nlm_holder *objp)
28 1.1 dholland {
29 1.1 dholland
30 1.1 dholland if (!xdr_bool(xdrs, &objp->exclusive))
31 1.1 dholland return (FALSE);
32 1.1 dholland if (!xdr_int(xdrs, &objp->svid))
33 1.1 dholland return (FALSE);
34 1.1 dholland if (!xdr_netobj(xdrs, &objp->oh))
35 1.1 dholland return (FALSE);
36 1.1 dholland if (!xdr_u_int(xdrs, &objp->l_offset))
37 1.1 dholland return (FALSE);
38 1.1 dholland if (!xdr_u_int(xdrs, &objp->l_len))
39 1.1 dholland return (FALSE);
40 1.1 dholland return (TRUE);
41 1.1 dholland }
42 1.1 dholland
43 1.1 dholland bool_t
44 1.1 dholland xdr_nlm_testrply(XDR *xdrs, nlm_testrply *objp)
45 1.1 dholland {
46 1.1 dholland
47 1.1 dholland if (!xdr_nlm_stats(xdrs, &objp->stat))
48 1.1 dholland return (FALSE);
49 1.1 dholland switch (objp->stat) {
50 1.1 dholland case nlm_denied:
51 1.1 dholland if (!xdr_nlm_holder(xdrs, &objp->nlm_testrply_u.holder))
52 1.1 dholland return (FALSE);
53 1.1 dholland break;
54 1.1 dholland default:
55 1.1 dholland break;
56 1.1 dholland }
57 1.1 dholland return (TRUE);
58 1.1 dholland }
59 1.1 dholland
60 1.1 dholland bool_t
61 1.1 dholland xdr_nlm_stat(XDR *xdrs, nlm_stat *objp)
62 1.1 dholland {
63 1.1 dholland
64 1.1 dholland if (!xdr_nlm_stats(xdrs, &objp->stat))
65 1.1 dholland return (FALSE);
66 1.1 dholland return (TRUE);
67 1.1 dholland }
68 1.1 dholland
69 1.1 dholland bool_t
70 1.1 dholland xdr_nlm_res(XDR *xdrs, nlm_res *objp)
71 1.1 dholland {
72 1.1 dholland
73 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
74 1.1 dholland return (FALSE);
75 1.1 dholland if (!xdr_nlm_stat(xdrs, &objp->stat))
76 1.1 dholland return (FALSE);
77 1.1 dholland return (TRUE);
78 1.1 dholland }
79 1.1 dholland
80 1.1 dholland bool_t
81 1.1 dholland xdr_nlm_testres(XDR *xdrs, nlm_testres *objp)
82 1.1 dholland {
83 1.1 dholland
84 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
85 1.1 dholland return (FALSE);
86 1.1 dholland if (!xdr_nlm_testrply(xdrs, &objp->stat))
87 1.1 dholland return (FALSE);
88 1.1 dholland return (TRUE);
89 1.1 dholland }
90 1.1 dholland
91 1.1 dholland bool_t
92 1.1 dholland xdr_nlm_lock(XDR *xdrs, nlm_lock *objp)
93 1.1 dholland {
94 1.1 dholland
95 1.1 dholland if (!xdr_string(xdrs, &objp->caller_name, LM_MAXSTRLEN))
96 1.1 dholland return (FALSE);
97 1.1 dholland if (!xdr_netobj(xdrs, &objp->fh))
98 1.1 dholland return (FALSE);
99 1.1 dholland if (!xdr_netobj(xdrs, &objp->oh))
100 1.1 dholland return (FALSE);
101 1.1 dholland if (!xdr_int(xdrs, &objp->svid))
102 1.1 dholland return (FALSE);
103 1.1 dholland if (!xdr_u_int(xdrs, &objp->l_offset))
104 1.1 dholland return (FALSE);
105 1.1 dholland if (!xdr_u_int(xdrs, &objp->l_len))
106 1.1 dholland return (FALSE);
107 1.1 dholland return (TRUE);
108 1.1 dholland }
109 1.1 dholland
110 1.1 dholland bool_t
111 1.1 dholland xdr_nlm_lockargs(XDR *xdrs, nlm_lockargs *objp)
112 1.1 dholland {
113 1.1 dholland
114 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
115 1.1 dholland return (FALSE);
116 1.1 dholland if (!xdr_bool(xdrs, &objp->block))
117 1.1 dholland return (FALSE);
118 1.1 dholland if (!xdr_bool(xdrs, &objp->exclusive))
119 1.1 dholland return (FALSE);
120 1.1 dholland if (!xdr_nlm_lock(xdrs, &objp->alock))
121 1.1 dholland return (FALSE);
122 1.1 dholland if (!xdr_bool(xdrs, &objp->reclaim))
123 1.1 dholland return (FALSE);
124 1.1 dholland if (!xdr_int(xdrs, &objp->state))
125 1.1 dholland return (FALSE);
126 1.1 dholland return (TRUE);
127 1.1 dholland }
128 1.1 dholland
129 1.1 dholland bool_t
130 1.1 dholland xdr_nlm_cancargs(XDR *xdrs, nlm_cancargs *objp)
131 1.1 dholland {
132 1.1 dholland
133 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
134 1.1 dholland return (FALSE);
135 1.1 dholland if (!xdr_bool(xdrs, &objp->block))
136 1.1 dholland return (FALSE);
137 1.1 dholland if (!xdr_bool(xdrs, &objp->exclusive))
138 1.1 dholland return (FALSE);
139 1.1 dholland if (!xdr_nlm_lock(xdrs, &objp->alock))
140 1.1 dholland return (FALSE);
141 1.1 dholland return (TRUE);
142 1.1 dholland }
143 1.1 dholland
144 1.1 dholland bool_t
145 1.1 dholland xdr_nlm_testargs(XDR *xdrs, nlm_testargs *objp)
146 1.1 dholland {
147 1.1 dholland
148 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
149 1.1 dholland return (FALSE);
150 1.1 dholland if (!xdr_bool(xdrs, &objp->exclusive))
151 1.1 dholland return (FALSE);
152 1.1 dholland if (!xdr_nlm_lock(xdrs, &objp->alock))
153 1.1 dholland return (FALSE);
154 1.1 dholland return (TRUE);
155 1.1 dholland }
156 1.1 dholland
157 1.1 dholland bool_t
158 1.1 dholland xdr_nlm_unlockargs(XDR *xdrs, nlm_unlockargs *objp)
159 1.1 dholland {
160 1.1 dholland
161 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
162 1.1 dholland return (FALSE);
163 1.1 dholland if (!xdr_nlm_lock(xdrs, &objp->alock))
164 1.1 dholland return (FALSE);
165 1.1 dholland return (TRUE);
166 1.1 dholland }
167 1.1 dholland
168 1.1 dholland bool_t
169 1.1 dholland xdr_fsh_mode(XDR *xdrs, fsh_mode *objp)
170 1.1 dholland {
171 1.1 dholland
172 1.1 dholland if (!xdr_enum(xdrs, (enum_t *)objp))
173 1.1 dholland return (FALSE);
174 1.1 dholland return (TRUE);
175 1.1 dholland }
176 1.1 dholland
177 1.1 dholland bool_t
178 1.1 dholland xdr_fsh_access(XDR *xdrs, fsh_access *objp)
179 1.1 dholland {
180 1.1 dholland
181 1.1 dholland if (!xdr_enum(xdrs, (enum_t *)objp))
182 1.1 dholland return (FALSE);
183 1.1 dholland return (TRUE);
184 1.1 dholland }
185 1.1 dholland
186 1.1 dholland bool_t
187 1.1 dholland xdr_nlm_share(XDR *xdrs, nlm_share *objp)
188 1.1 dholland {
189 1.1 dholland
190 1.1 dholland if (!xdr_string(xdrs, &objp->caller_name, LM_MAXSTRLEN))
191 1.1 dholland return (FALSE);
192 1.1 dholland if (!xdr_netobj(xdrs, &objp->fh))
193 1.1 dholland return (FALSE);
194 1.1 dholland if (!xdr_netobj(xdrs, &objp->oh))
195 1.1 dholland return (FALSE);
196 1.1 dholland if (!xdr_fsh_mode(xdrs, &objp->mode))
197 1.1 dholland return (FALSE);
198 1.1 dholland if (!xdr_fsh_access(xdrs, &objp->access))
199 1.1 dholland return (FALSE);
200 1.1 dholland return (TRUE);
201 1.1 dholland }
202 1.1 dholland
203 1.1 dholland bool_t
204 1.1 dholland xdr_nlm_shareargs(XDR *xdrs, nlm_shareargs *objp)
205 1.1 dholland {
206 1.1 dholland
207 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
208 1.1 dholland return (FALSE);
209 1.1 dholland if (!xdr_nlm_share(xdrs, &objp->share))
210 1.1 dholland return (FALSE);
211 1.1 dholland if (!xdr_bool(xdrs, &objp->reclaim))
212 1.1 dholland return (FALSE);
213 1.1 dholland return (TRUE);
214 1.1 dholland }
215 1.1 dholland
216 1.1 dholland bool_t
217 1.1 dholland xdr_nlm_shareres(XDR *xdrs, nlm_shareres *objp)
218 1.1 dholland {
219 1.1 dholland
220 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
221 1.1 dholland return (FALSE);
222 1.1 dholland if (!xdr_nlm_stats(xdrs, &objp->stat))
223 1.1 dholland return (FALSE);
224 1.1 dholland if (!xdr_int(xdrs, &objp->sequence))
225 1.1 dholland return (FALSE);
226 1.1 dholland return (TRUE);
227 1.1 dholland }
228 1.1 dholland
229 1.1 dholland bool_t
230 1.1 dholland xdr_nlm_notify(XDR *xdrs, nlm_notify *objp)
231 1.1 dholland {
232 1.1 dholland
233 1.1 dholland if (!xdr_string(xdrs, &objp->name, MAXNAMELEN))
234 1.1 dholland return (FALSE);
235 1.1 dholland if (!xdr_long(xdrs, &objp->state))
236 1.1 dholland return (FALSE);
237 1.1 dholland return (TRUE);
238 1.1 dholland }
239 1.1 dholland
240 1.1 dholland bool_t
241 1.1 dholland xdr_nlm4_stats(XDR *xdrs, nlm4_stats *objp)
242 1.1 dholland {
243 1.1 dholland
244 1.1 dholland if (!xdr_enum(xdrs, (enum_t *)objp))
245 1.1 dholland return (FALSE);
246 1.1 dholland return (TRUE);
247 1.1 dholland }
248 1.1 dholland
249 1.1 dholland bool_t
250 1.1 dholland xdr_nlm4_stat(XDR *xdrs, nlm4_stat *objp)
251 1.1 dholland {
252 1.1 dholland
253 1.1 dholland if (!xdr_nlm4_stats(xdrs, &objp->stat))
254 1.1 dholland return (FALSE);
255 1.1 dholland return (TRUE);
256 1.1 dholland }
257 1.1 dholland
258 1.1 dholland bool_t
259 1.1 dholland xdr_nlm4_holder(XDR *xdrs, nlm4_holder *objp)
260 1.1 dholland {
261 1.1 dholland
262 1.1 dholland if (!xdr_bool(xdrs, &objp->exclusive))
263 1.1 dholland return (FALSE);
264 1.1 dholland if (!xdr_uint32_t(xdrs, &objp->svid))
265 1.1 dholland return (FALSE);
266 1.1 dholland if (!xdr_netobj(xdrs, &objp->oh))
267 1.1 dholland return (FALSE);
268 1.1 dholland if (!xdr_uint64_t(xdrs, &objp->l_offset))
269 1.1 dholland return (FALSE);
270 1.1 dholland if (!xdr_uint64_t(xdrs, &objp->l_len))
271 1.1 dholland return (FALSE);
272 1.1 dholland return (TRUE);
273 1.1 dholland }
274 1.1 dholland
275 1.1 dholland bool_t
276 1.1 dholland xdr_nlm4_lock(XDR *xdrs, nlm4_lock *objp)
277 1.1 dholland {
278 1.1 dholland
279 1.1 dholland if (!xdr_string(xdrs, &objp->caller_name, MAXNAMELEN))
280 1.1 dholland return (FALSE);
281 1.1 dholland if (!xdr_netobj(xdrs, &objp->fh))
282 1.1 dholland return (FALSE);
283 1.1 dholland if (!xdr_netobj(xdrs, &objp->oh))
284 1.1 dholland return (FALSE);
285 1.1 dholland if (!xdr_uint32_t(xdrs, &objp->svid))
286 1.1 dholland return (FALSE);
287 1.1 dholland if (!xdr_uint64_t(xdrs, &objp->l_offset))
288 1.1 dholland return (FALSE);
289 1.1 dholland if (!xdr_uint64_t(xdrs, &objp->l_len))
290 1.1 dholland return (FALSE);
291 1.1 dholland return (TRUE);
292 1.1 dholland }
293 1.1 dholland
294 1.1 dholland bool_t
295 1.1 dholland xdr_nlm4_share(XDR *xdrs, nlm4_share *objp)
296 1.1 dholland {
297 1.1 dholland
298 1.1 dholland if (!xdr_string(xdrs, &objp->caller_name, MAXNAMELEN))
299 1.1 dholland return (FALSE);
300 1.1 dholland if (!xdr_netobj(xdrs, &objp->fh))
301 1.1 dholland return (FALSE);
302 1.1 dholland if (!xdr_netobj(xdrs, &objp->oh))
303 1.1 dholland return (FALSE);
304 1.1 dholland if (!xdr_fsh_mode(xdrs, &objp->mode))
305 1.1 dholland return (FALSE);
306 1.1 dholland if (!xdr_fsh_access(xdrs, &objp->access))
307 1.1 dholland return (FALSE);
308 1.1 dholland return (TRUE);
309 1.1 dholland }
310 1.1 dholland
311 1.1 dholland bool_t
312 1.1 dholland xdr_nlm4_testrply(XDR *xdrs, nlm4_testrply *objp)
313 1.1 dholland {
314 1.1 dholland
315 1.1 dholland if (!xdr_nlm4_stats(xdrs, &objp->stat))
316 1.1 dholland return (FALSE);
317 1.1 dholland switch (objp->stat) {
318 1.1 dholland case nlm_denied:
319 1.1 dholland if (!xdr_nlm4_holder(xdrs, &objp->nlm4_testrply_u.holder))
320 1.1 dholland return (FALSE);
321 1.1 dholland break;
322 1.1 dholland default:
323 1.1 dholland break;
324 1.1 dholland }
325 1.1 dholland return (TRUE);
326 1.1 dholland }
327 1.1 dholland
328 1.1 dholland bool_t
329 1.1 dholland xdr_nlm4_testres(XDR *xdrs, nlm4_testres *objp)
330 1.1 dholland {
331 1.1 dholland
332 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
333 1.1 dholland return (FALSE);
334 1.1 dholland if (!xdr_nlm4_testrply(xdrs, &objp->stat))
335 1.1 dholland return (FALSE);
336 1.1 dholland return (TRUE);
337 1.1 dholland }
338 1.1 dholland
339 1.1 dholland bool_t
340 1.1 dholland xdr_nlm4_testargs(XDR *xdrs, nlm4_testargs *objp)
341 1.1 dholland {
342 1.1 dholland
343 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
344 1.1 dholland return (FALSE);
345 1.1 dholland if (!xdr_bool(xdrs, &objp->exclusive))
346 1.1 dholland return (FALSE);
347 1.1 dholland if (!xdr_nlm4_lock(xdrs, &objp->alock))
348 1.1 dholland return (FALSE);
349 1.1 dholland return (TRUE);
350 1.1 dholland }
351 1.1 dholland
352 1.1 dholland bool_t
353 1.1 dholland xdr_nlm4_res(XDR *xdrs, nlm4_res *objp)
354 1.1 dholland {
355 1.1 dholland
356 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
357 1.1 dholland return (FALSE);
358 1.1 dholland if (!xdr_nlm4_stat(xdrs, &objp->stat))
359 1.1 dholland return (FALSE);
360 1.1 dholland return (TRUE);
361 1.1 dholland }
362 1.1 dholland
363 1.1 dholland bool_t
364 1.1 dholland xdr_nlm4_lockargs(XDR *xdrs, nlm4_lockargs *objp)
365 1.1 dholland {
366 1.1 dholland
367 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
368 1.1 dholland return (FALSE);
369 1.1 dholland if (!xdr_bool(xdrs, &objp->block))
370 1.1 dholland return (FALSE);
371 1.1 dholland if (!xdr_bool(xdrs, &objp->exclusive))
372 1.1 dholland return (FALSE);
373 1.1 dholland if (!xdr_nlm4_lock(xdrs, &objp->alock))
374 1.1 dholland return (FALSE);
375 1.1 dholland if (!xdr_bool(xdrs, &objp->reclaim))
376 1.1 dholland return (FALSE);
377 1.1 dholland if (!xdr_int(xdrs, &objp->state))
378 1.1 dholland return (FALSE);
379 1.1 dholland return (TRUE);
380 1.1 dholland }
381 1.1 dholland
382 1.1 dholland bool_t
383 1.1 dholland xdr_nlm4_cancargs(XDR *xdrs, nlm4_cancargs *objp)
384 1.1 dholland {
385 1.1 dholland
386 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
387 1.1 dholland return (FALSE);
388 1.1 dholland if (!xdr_bool(xdrs, &objp->block))
389 1.1 dholland return (FALSE);
390 1.1 dholland if (!xdr_bool(xdrs, &objp->exclusive))
391 1.1 dholland return (FALSE);
392 1.1 dholland if (!xdr_nlm4_lock(xdrs, &objp->alock))
393 1.1 dholland return (FALSE);
394 1.1 dholland return (TRUE);
395 1.1 dholland }
396 1.1 dholland
397 1.1 dholland bool_t
398 1.1 dholland xdr_nlm4_unlockargs(XDR *xdrs, nlm4_unlockargs *objp)
399 1.1 dholland {
400 1.1 dholland
401 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
402 1.1 dholland return (FALSE);
403 1.1 dholland if (!xdr_nlm4_lock(xdrs, &objp->alock))
404 1.1 dholland return (FALSE);
405 1.1 dholland return (TRUE);
406 1.1 dholland }
407 1.1 dholland
408 1.1 dholland bool_t
409 1.1 dholland xdr_nlm4_shareargs(XDR *xdrs, nlm4_shareargs *objp)
410 1.1 dholland {
411 1.1 dholland
412 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
413 1.1 dholland return (FALSE);
414 1.1 dholland if (!xdr_nlm4_share(xdrs, &objp->share))
415 1.1 dholland return (FALSE);
416 1.1 dholland if (!xdr_bool(xdrs, &objp->reclaim))
417 1.1 dholland return (FALSE);
418 1.1 dholland return (TRUE);
419 1.1 dholland }
420 1.1 dholland
421 1.1 dholland bool_t
422 1.1 dholland xdr_nlm4_shareres(XDR *xdrs, nlm4_shareres *objp)
423 1.1 dholland {
424 1.1 dholland
425 1.1 dholland if (!xdr_netobj(xdrs, &objp->cookie))
426 1.1 dholland return (FALSE);
427 1.1 dholland if (!xdr_nlm4_stats(xdrs, &objp->stat))
428 1.1 dholland return (FALSE);
429 1.1 dholland if (!xdr_int(xdrs, &objp->sequence))
430 1.1 dholland return (FALSE);
431 1.1 dholland return (TRUE);
432 1.1 dholland }
433 1.1 dholland
434 1.1 dholland bool_t
435 1.1 dholland xdr_nlm_sm_status(XDR *xdrs, nlm_sm_status *objp)
436 1.1 dholland {
437 1.1 dholland
438 1.1 dholland if (!xdr_string(xdrs, &objp->mon_name, LM_MAXSTRLEN))
439 1.1 dholland return (FALSE);
440 1.1 dholland if (!xdr_int(xdrs, &objp->state))
441 1.1 dholland return (FALSE);
442 1.1 dholland if (!xdr_opaque(xdrs, objp->priv, 16))
443 1.1 dholland return (FALSE);
444 1.1 dholland return (TRUE);
445 1.1 dholland }
446 1.1 dholland
447 1.1 dholland bool_t
448 1.1 dholland xdr_nlm4_notify(XDR *xdrs, nlm4_notify *objp)
449 1.1 dholland {
450 1.1 dholland
451 1.1 dholland if (!xdr_string(xdrs, &objp->name, MAXNAMELEN))
452 1.1 dholland return (FALSE);
453 1.1 dholland if (!xdr_int32_t(xdrs, &objp->state))
454 1.1 dholland return (FALSE);
455 1.1 dholland return (TRUE);
456 1.1 dholland }
457