]>
git.saurik.com Git - apple/network_cmds.git/blob - rpc_lockd.tproj/nlm_prot_xdr.c
2 * Please do not edit this file.
3 * It was generated using rpcgen.
6 #include <rpcsvc/nlm_prot.h>
8 /*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/
9 /*static char sccsid[] = "from: * @(#)nlm_prot.x 2.1 88/08/01 4.0 RPCSRC";*/
10 static char rcsid
[] = "$Id: nlm_prot_xdr.c,v 1.2 2002/09/27 05:04:03 lindak Exp $";
14 /* XXX until we get real int32/64 xdr funcs */
16 #define xdr_int32_t xdr_int
17 #define xdr_u_int32_t xdr_u_int
23 xdr_int64_t(xdrs
, llp
)
31 ul
[0] = (u_long
) ((u_int64_t
) * llp
>> 32) & 0xffffffff;
32 ul
[1] = (u_long
) ((u_int64_t
) * llp
) & 0xffffffff;
33 if (XDR_PUTLONG(xdrs
, (long *) &ul
[0]) == FALSE
)
35 return (XDR_PUTLONG(xdrs
, (long *) &ul
[1]));
37 if (XDR_GETLONG(xdrs
, (long *) &ul
[0]) == FALSE
)
39 if (XDR_GETLONG(xdrs
, (long *) &ul
[1]) == FALSE
)
42 (((u_int64_t
) ul
[0] << 32) | ((u_int64_t
) ul
[1]));
53 * XDR unsigned 64-bit integers
56 xdr_u_int64_t(xdrs
, ullp
)
64 ul
[0] = (u_long
) (*ullp
>> 32) & 0xffffffff;
65 ul
[1] = (u_long
) (*ullp
) & 0xffffffff;
66 if (XDR_PUTLONG(xdrs
, (long *) &ul
[0]) == FALSE
)
68 return (XDR_PUTLONG(xdrs
, (long *) &ul
[1]));
70 if (XDR_GETLONG(xdrs
, (long *) &ul
[0]) == FALSE
)
72 if (XDR_GETLONG(xdrs
, (long *) &ul
[1]) == FALSE
)
75 (((u_int64_t
) ul
[0] << 32) | ((u_int64_t
) ul
[1]));
86 xdr_nlm_stats(XDR
*xdrs
, nlm_stats
*objp
)
89 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
95 xdr_nlm_holder(XDR
*xdrs
, nlm_holder
*objp
)
98 if (!xdr_bool(xdrs
, &objp
->exclusive
))
100 if (!xdr_int(xdrs
, &objp
->svid
))
102 if (!xdr_netobj(xdrs
, &objp
->oh
))
104 if (!xdr_u_int(xdrs
, &objp
->l_offset
))
106 if (!xdr_u_int(xdrs
, &objp
->l_len
))
112 xdr_nlm_testrply(XDR
*xdrs
, nlm_testrply
*objp
)
115 if (!xdr_nlm_stats(xdrs
, &objp
->stat
))
117 switch (objp
->stat
) {
119 if (!xdr_nlm_holder(xdrs
, &objp
->nlm_testrply_u
.holder
))
129 xdr_nlm_stat(XDR
*xdrs
, nlm_stat
*objp
)
132 if (!xdr_nlm_stats(xdrs
, &objp
->stat
))
138 xdr_nlm_res(XDR
*xdrs
, nlm_res
*objp
)
141 if (!xdr_netobj(xdrs
, &objp
->cookie
))
143 if (!xdr_nlm_stat(xdrs
, &objp
->stat
))
149 xdr_nlm_testres(XDR
*xdrs
, nlm_testres
*objp
)
152 if (!xdr_netobj(xdrs
, &objp
->cookie
))
154 if (!xdr_nlm_testrply(xdrs
, &objp
->stat
))
160 xdr_nlm_lock(XDR
*xdrs
, nlm_lock
*objp
)
163 if (!xdr_string(xdrs
, &objp
->caller_name
, LM_MAXSTRLEN
))
165 if (!xdr_netobj(xdrs
, &objp
->fh
))
167 if (!xdr_netobj(xdrs
, &objp
->oh
))
169 if (!xdr_int(xdrs
, &objp
->svid
))
171 if (!xdr_u_int(xdrs
, &objp
->l_offset
))
173 if (!xdr_u_int(xdrs
, &objp
->l_len
))
179 xdr_nlm_lockargs(XDR
*xdrs
, nlm_lockargs
*objp
)
182 if (!xdr_netobj(xdrs
, &objp
->cookie
))
184 if (!xdr_bool(xdrs
, &objp
->block
))
186 if (!xdr_bool(xdrs
, &objp
->exclusive
))
188 if (!xdr_nlm_lock(xdrs
, &objp
->alock
))
190 if (!xdr_bool(xdrs
, &objp
->reclaim
))
192 if (!xdr_int(xdrs
, &objp
->state
))
198 xdr_nlm_cancargs(XDR
*xdrs
, nlm_cancargs
*objp
)
201 if (!xdr_netobj(xdrs
, &objp
->cookie
))
203 if (!xdr_bool(xdrs
, &objp
->block
))
205 if (!xdr_bool(xdrs
, &objp
->exclusive
))
207 if (!xdr_nlm_lock(xdrs
, &objp
->alock
))
213 xdr_nlm_testargs(XDR
*xdrs
, nlm_testargs
*objp
)
216 if (!xdr_netobj(xdrs
, &objp
->cookie
))
218 if (!xdr_bool(xdrs
, &objp
->exclusive
))
220 if (!xdr_nlm_lock(xdrs
, &objp
->alock
))
226 xdr_nlm_unlockargs(XDR
*xdrs
, nlm_unlockargs
*objp
)
229 if (!xdr_netobj(xdrs
, &objp
->cookie
))
231 if (!xdr_nlm_lock(xdrs
, &objp
->alock
))
237 xdr_fsh_mode(XDR
*xdrs
, fsh_mode
*objp
)
240 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
246 xdr_fsh_access(XDR
*xdrs
, fsh_access
*objp
)
249 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
255 xdr_nlm_share(XDR
*xdrs
, nlm_share
*objp
)
258 if (!xdr_string(xdrs
, &objp
->caller_name
, LM_MAXSTRLEN
))
260 if (!xdr_netobj(xdrs
, &objp
->fh
))
262 if (!xdr_netobj(xdrs
, &objp
->oh
))
264 if (!xdr_fsh_mode(xdrs
, &objp
->mode
))
266 if (!xdr_fsh_access(xdrs
, &objp
->access
))
272 xdr_nlm_shareargs(XDR
*xdrs
, nlm_shareargs
*objp
)
275 if (!xdr_netobj(xdrs
, &objp
->cookie
))
277 if (!xdr_nlm_share(xdrs
, &objp
->share
))
279 if (!xdr_bool(xdrs
, &objp
->reclaim
))
285 xdr_nlm_shareres(XDR
*xdrs
, nlm_shareres
*objp
)
288 if (!xdr_netobj(xdrs
, &objp
->cookie
))
290 if (!xdr_nlm_stats(xdrs
, &objp
->stat
))
292 if (!xdr_int(xdrs
, &objp
->sequence
))
298 xdr_nlm_notify(XDR
*xdrs
, nlm_notify
*objp
)
301 if (!xdr_string(xdrs
, &objp
->name
, MAXNAMELEN
))
303 if (!xdr_long(xdrs
, &objp
->state
))
309 xdr_nlm4_stats(XDR
*xdrs
, nlm4_stats
*objp
)
312 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
318 xdr_nlm4_stat(XDR
*xdrs
, nlm4_stat
*objp
)
321 if (!xdr_nlm4_stats(xdrs
, &objp
->stat
))
327 xdr_nlm4_holder(XDR
*xdrs
, nlm4_holder
*objp
)
330 if (!xdr_bool(xdrs
, &objp
->exclusive
))
332 if (!xdr_u_int32_t(xdrs
, &objp
->svid
))
334 if (!xdr_netobj(xdrs
, &objp
->oh
))
336 if (!xdr_u_int64_t(xdrs
, &objp
->l_offset
))
338 if (!xdr_u_int64_t(xdrs
, &objp
->l_len
))
344 xdr_nlm4_lock(XDR
*xdrs
, nlm4_lock
*objp
)
347 if (!xdr_string(xdrs
, &objp
->caller_name
, MAXNAMELEN
))
349 if (!xdr_netobj(xdrs
, &objp
->fh
))
351 if (!xdr_netobj(xdrs
, &objp
->oh
))
353 if (!xdr_u_int32_t(xdrs
, &objp
->svid
))
355 if (!xdr_u_int64_t(xdrs
, &objp
->l_offset
))
357 if (!xdr_u_int64_t(xdrs
, &objp
->l_len
))
363 xdr_nlm4_share(XDR
*xdrs
, nlm4_share
*objp
)
366 if (!xdr_string(xdrs
, &objp
->caller_name
, MAXNAMELEN
))
368 if (!xdr_netobj(xdrs
, &objp
->fh
))
370 if (!xdr_netobj(xdrs
, &objp
->oh
))
372 if (!xdr_fsh_mode(xdrs
, &objp
->mode
))
374 if (!xdr_fsh_access(xdrs
, &objp
->access
))
380 xdr_nlm4_testrply(XDR
*xdrs
, nlm4_testrply
*objp
)
383 if (!xdr_nlm4_stats(xdrs
, &objp
->stat
))
385 switch (objp
->stat
) {
387 if (!xdr_nlm4_holder(xdrs
, &objp
->nlm4_testrply_u
.holder
))
397 xdr_nlm4_testres(XDR
*xdrs
, nlm4_testres
*objp
)
400 if (!xdr_netobj(xdrs
, &objp
->cookie
))
402 if (!xdr_nlm4_testrply(xdrs
, &objp
->stat
))
408 xdr_nlm4_testargs(XDR
*xdrs
, nlm4_testargs
*objp
)
411 if (!xdr_netobj(xdrs
, &objp
->cookie
))
413 if (!xdr_bool(xdrs
, &objp
->exclusive
))
415 if (!xdr_nlm4_lock(xdrs
, &objp
->alock
))
421 xdr_nlm4_res(XDR
*xdrs
, nlm4_res
*objp
)
424 if (!xdr_netobj(xdrs
, &objp
->cookie
))
426 if (!xdr_nlm4_stat(xdrs
, &objp
->stat
))
432 xdr_nlm4_lockargs(XDR
*xdrs
, nlm4_lockargs
*objp
)
435 if (!xdr_netobj(xdrs
, &objp
->cookie
))
437 if (!xdr_bool(xdrs
, &objp
->block
))
439 if (!xdr_bool(xdrs
, &objp
->exclusive
))
441 if (!xdr_nlm4_lock(xdrs
, &objp
->alock
))
443 if (!xdr_bool(xdrs
, &objp
->reclaim
))
445 if (!xdr_int(xdrs
, &objp
->state
))
451 xdr_nlm4_cancargs(XDR
*xdrs
, nlm4_cancargs
*objp
)
454 if (!xdr_netobj(xdrs
, &objp
->cookie
))
456 if (!xdr_bool(xdrs
, &objp
->block
))
458 if (!xdr_bool(xdrs
, &objp
->exclusive
))
460 if (!xdr_nlm4_lock(xdrs
, &objp
->alock
))
466 xdr_nlm4_unlockargs(XDR
*xdrs
, nlm4_unlockargs
*objp
)
469 if (!xdr_netobj(xdrs
, &objp
->cookie
))
471 if (!xdr_nlm4_lock(xdrs
, &objp
->alock
))
477 xdr_nlm4_shareargs(XDR
*xdrs
, nlm4_shareargs
*objp
)
480 if (!xdr_netobj(xdrs
, &objp
->cookie
))
482 if (!xdr_nlm4_share(xdrs
, &objp
->share
))
484 if (!xdr_bool(xdrs
, &objp
->reclaim
))
490 xdr_nlm4_shareres(XDR
*xdrs
, nlm4_shareres
*objp
)
493 if (!xdr_netobj(xdrs
, &objp
->cookie
))
495 if (!xdr_nlm4_stats(xdrs
, &objp
->stat
))
497 if (!xdr_int(xdrs
, &objp
->sequence
))
503 xdr_nlm_sm_status(XDR
*xdrs
, nlm_sm_status
*objp
)
506 if (!xdr_string(xdrs
, &objp
->mon_name
, LM_MAXSTRLEN
))
508 if (!xdr_int(xdrs
, &objp
->state
))
510 if (!xdr_opaque(xdrs
, objp
->priv
, 16))
516 xdr_nlm4_notify(XDR
*xdrs
, nlm4_notify
*objp
)
519 if (!xdr_string(xdrs
, &objp
->name
, MAXNAMELEN
))
521 if (!xdr_int32_t(xdrs
, &objp
->state
))