1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate * CDDL HEADER START
3*0Sstevel@tonic-gate *
4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance
7*0Sstevel@tonic-gate * with the License.
8*0Sstevel@tonic-gate *
9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate * and limitations under the License.
13*0Sstevel@tonic-gate *
14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate *
20*0Sstevel@tonic-gate * CDDL HEADER END
21*0Sstevel@tonic-gate */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24*0Sstevel@tonic-gate * Use is subject to license terms.
25*0Sstevel@tonic-gate */
26*0Sstevel@tonic-gate
27*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI"
28*0Sstevel@tonic-gate
29*0Sstevel@tonic-gate /*
30*0Sstevel@tonic-gate * This file was initially generated using rpcgen. The rpcgen-erated
31*0Sstevel@tonic-gate * code used tail recursion to implement linked lists which resulted
32*0Sstevel@tonic-gate * in various crashes due to blown stacks. If the NFS4 protocol changes
33*0Sstevel@tonic-gate * be sure to either use the NFS4-friendly rpcgen (doesn't use tail
34*0Sstevel@tonic-gate * recursion) or do the xdr by hand.
35*0Sstevel@tonic-gate *
36*0Sstevel@tonic-gate * CAUTION: This file is kept in sync with it's uts counterpart:
37*0Sstevel@tonic-gate *
38*0Sstevel@tonic-gate * usr/src/uts/common/fs/nfs/nfs4_xdr.c
39*0Sstevel@tonic-gate *
40*0Sstevel@tonic-gate * However, it is not an exact copy. NEVER copy uts's nfs4_xdr.c
41*0Sstevel@tonic-gate * directly over this file. Changes from the uts version must be
42*0Sstevel@tonic-gate * integrated by hand into this file.
43*0Sstevel@tonic-gate */
44*0Sstevel@tonic-gate
45*0Sstevel@tonic-gate #include <rpcsvc/nfs4_prot.h>
46*0Sstevel@tonic-gate #include <nfs/nfs4.h>
47*0Sstevel@tonic-gate #include <malloc.h>
48*0Sstevel@tonic-gate
49*0Sstevel@tonic-gate #define IGNORE_RDWR_DATA
50*0Sstevel@tonic-gate
51*0Sstevel@tonic-gate extern int nfs4_skip_bytes;
52*0Sstevel@tonic-gate
53*0Sstevel@tonic-gate bool_t
xdr_nfs_ftype4(register XDR * xdrs,nfs_ftype4 * objp)54*0Sstevel@tonic-gate xdr_nfs_ftype4(register XDR *xdrs, nfs_ftype4 *objp)
55*0Sstevel@tonic-gate {
56*0Sstevel@tonic-gate
57*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
58*0Sstevel@tonic-gate return (FALSE);
59*0Sstevel@tonic-gate return (TRUE);
60*0Sstevel@tonic-gate }
61*0Sstevel@tonic-gate
62*0Sstevel@tonic-gate bool_t
xdr_nfsstat4(register XDR * xdrs,nfsstat4 * objp)63*0Sstevel@tonic-gate xdr_nfsstat4(register XDR *xdrs, nfsstat4 *objp)
64*0Sstevel@tonic-gate {
65*0Sstevel@tonic-gate
66*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
67*0Sstevel@tonic-gate return (FALSE);
68*0Sstevel@tonic-gate return (TRUE);
69*0Sstevel@tonic-gate }
70*0Sstevel@tonic-gate
71*0Sstevel@tonic-gate bool_t
xdr_bitmap4(register XDR * xdrs,bitmap4 * objp)72*0Sstevel@tonic-gate xdr_bitmap4(register XDR *xdrs, bitmap4 *objp)
73*0Sstevel@tonic-gate {
74*0Sstevel@tonic-gate
75*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->bitmap4_val,
76*0Sstevel@tonic-gate (uint_t *)&objp->bitmap4_len, ~0,
77*0Sstevel@tonic-gate sizeof (uint32_t), (xdrproc_t)xdr_uint32_t))
78*0Sstevel@tonic-gate return (FALSE);
79*0Sstevel@tonic-gate return (TRUE);
80*0Sstevel@tonic-gate }
81*0Sstevel@tonic-gate
82*0Sstevel@tonic-gate bool_t
xdr_offset4(register XDR * xdrs,offset4 * objp)83*0Sstevel@tonic-gate xdr_offset4(register XDR *xdrs, offset4 *objp)
84*0Sstevel@tonic-gate {
85*0Sstevel@tonic-gate
86*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
87*0Sstevel@tonic-gate return (FALSE);
88*0Sstevel@tonic-gate return (TRUE);
89*0Sstevel@tonic-gate }
90*0Sstevel@tonic-gate
91*0Sstevel@tonic-gate bool_t
xdr_count4(register XDR * xdrs,count4 * objp)92*0Sstevel@tonic-gate xdr_count4(register XDR *xdrs, count4 *objp)
93*0Sstevel@tonic-gate {
94*0Sstevel@tonic-gate
95*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
96*0Sstevel@tonic-gate return (FALSE);
97*0Sstevel@tonic-gate return (TRUE);
98*0Sstevel@tonic-gate }
99*0Sstevel@tonic-gate
100*0Sstevel@tonic-gate bool_t
xdr_length4(register XDR * xdrs,length4 * objp)101*0Sstevel@tonic-gate xdr_length4(register XDR *xdrs, length4 *objp)
102*0Sstevel@tonic-gate {
103*0Sstevel@tonic-gate
104*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
105*0Sstevel@tonic-gate return (FALSE);
106*0Sstevel@tonic-gate return (TRUE);
107*0Sstevel@tonic-gate }
108*0Sstevel@tonic-gate
109*0Sstevel@tonic-gate bool_t
xdr_clientid4(register XDR * xdrs,clientid4 * objp)110*0Sstevel@tonic-gate xdr_clientid4(register XDR *xdrs, clientid4 *objp)
111*0Sstevel@tonic-gate {
112*0Sstevel@tonic-gate
113*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
114*0Sstevel@tonic-gate return (FALSE);
115*0Sstevel@tonic-gate return (TRUE);
116*0Sstevel@tonic-gate }
117*0Sstevel@tonic-gate
118*0Sstevel@tonic-gate bool_t
xdr_seqid4(register XDR * xdrs,seqid4 * objp)119*0Sstevel@tonic-gate xdr_seqid4(register XDR *xdrs, seqid4 *objp)
120*0Sstevel@tonic-gate {
121*0Sstevel@tonic-gate
122*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
123*0Sstevel@tonic-gate return (FALSE);
124*0Sstevel@tonic-gate return (TRUE);
125*0Sstevel@tonic-gate }
126*0Sstevel@tonic-gate
127*0Sstevel@tonic-gate bool_t
xdr_utf8string(register XDR * xdrs,utf8string * objp)128*0Sstevel@tonic-gate xdr_utf8string(register XDR *xdrs, utf8string *objp)
129*0Sstevel@tonic-gate {
130*0Sstevel@tonic-gate
131*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->utf8string_val,
132*0Sstevel@tonic-gate (uint_t *)&objp->utf8string_len, NFS4_MAX_UTF8STRING))
133*0Sstevel@tonic-gate return (FALSE);
134*0Sstevel@tonic-gate return (TRUE);
135*0Sstevel@tonic-gate }
136*0Sstevel@tonic-gate
137*0Sstevel@tonic-gate bool_t
xdr_component4(register XDR * xdrs,component4 * objp)138*0Sstevel@tonic-gate xdr_component4(register XDR *xdrs, component4 *objp)
139*0Sstevel@tonic-gate {
140*0Sstevel@tonic-gate
141*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, objp))
142*0Sstevel@tonic-gate return (FALSE);
143*0Sstevel@tonic-gate return (TRUE);
144*0Sstevel@tonic-gate }
145*0Sstevel@tonic-gate
146*0Sstevel@tonic-gate bool_t
xdr_pathname4(register XDR * xdrs,pathname4 * objp)147*0Sstevel@tonic-gate xdr_pathname4(register XDR *xdrs, pathname4 *objp)
148*0Sstevel@tonic-gate {
149*0Sstevel@tonic-gate
150*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->pathname4_val,
151*0Sstevel@tonic-gate (uint_t *)&objp->pathname4_len, NFS4_MAX_PATHNAME4,
152*0Sstevel@tonic-gate sizeof (component4), (xdrproc_t)xdr_component4))
153*0Sstevel@tonic-gate return (FALSE);
154*0Sstevel@tonic-gate return (TRUE);
155*0Sstevel@tonic-gate }
156*0Sstevel@tonic-gate
157*0Sstevel@tonic-gate bool_t
xdr_nfs_lockid4(register XDR * xdrs,nfs_lockid4 * objp)158*0Sstevel@tonic-gate xdr_nfs_lockid4(register XDR *xdrs, nfs_lockid4 *objp)
159*0Sstevel@tonic-gate {
160*0Sstevel@tonic-gate
161*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
162*0Sstevel@tonic-gate return (FALSE);
163*0Sstevel@tonic-gate return (TRUE);
164*0Sstevel@tonic-gate }
165*0Sstevel@tonic-gate
166*0Sstevel@tonic-gate bool_t
xdr_nfs_cookie4(register XDR * xdrs,nfs_cookie4 * objp)167*0Sstevel@tonic-gate xdr_nfs_cookie4(register XDR *xdrs, nfs_cookie4 *objp)
168*0Sstevel@tonic-gate {
169*0Sstevel@tonic-gate
170*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
171*0Sstevel@tonic-gate return (FALSE);
172*0Sstevel@tonic-gate return (TRUE);
173*0Sstevel@tonic-gate }
174*0Sstevel@tonic-gate
175*0Sstevel@tonic-gate bool_t
xdr_linktext4(register XDR * xdrs,linktext4 * objp)176*0Sstevel@tonic-gate xdr_linktext4(register XDR *xdrs, linktext4 *objp)
177*0Sstevel@tonic-gate {
178*0Sstevel@tonic-gate
179*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, objp))
180*0Sstevel@tonic-gate return (FALSE);
181*0Sstevel@tonic-gate return (TRUE);
182*0Sstevel@tonic-gate }
183*0Sstevel@tonic-gate
184*0Sstevel@tonic-gate bool_t
xdr_sec_oid4(register XDR * xdrs,sec_oid4 * objp)185*0Sstevel@tonic-gate xdr_sec_oid4(register XDR *xdrs, sec_oid4 *objp)
186*0Sstevel@tonic-gate {
187*0Sstevel@tonic-gate
188*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->sec_oid4_val,
189*0Sstevel@tonic-gate (uint_t *)&objp->sec_oid4_len, NFS4_MAX_SECOID4))
190*0Sstevel@tonic-gate return (FALSE);
191*0Sstevel@tonic-gate return (TRUE);
192*0Sstevel@tonic-gate }
193*0Sstevel@tonic-gate
194*0Sstevel@tonic-gate bool_t
xdr_qop4(register XDR * xdrs,qop4 * objp)195*0Sstevel@tonic-gate xdr_qop4(register XDR *xdrs, qop4 *objp)
196*0Sstevel@tonic-gate {
197*0Sstevel@tonic-gate
198*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
199*0Sstevel@tonic-gate return (FALSE);
200*0Sstevel@tonic-gate return (TRUE);
201*0Sstevel@tonic-gate }
202*0Sstevel@tonic-gate
203*0Sstevel@tonic-gate bool_t
xdr_mode4(register XDR * xdrs,mode4 * objp)204*0Sstevel@tonic-gate xdr_mode4(register XDR *xdrs, mode4 *objp)
205*0Sstevel@tonic-gate {
206*0Sstevel@tonic-gate
207*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
208*0Sstevel@tonic-gate return (FALSE);
209*0Sstevel@tonic-gate return (TRUE);
210*0Sstevel@tonic-gate }
211*0Sstevel@tonic-gate
212*0Sstevel@tonic-gate bool_t
xdr_changeid4(register XDR * xdrs,changeid4 * objp)213*0Sstevel@tonic-gate xdr_changeid4(register XDR *xdrs, changeid4 *objp)
214*0Sstevel@tonic-gate {
215*0Sstevel@tonic-gate
216*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
217*0Sstevel@tonic-gate return (FALSE);
218*0Sstevel@tonic-gate return (TRUE);
219*0Sstevel@tonic-gate }
220*0Sstevel@tonic-gate
221*0Sstevel@tonic-gate bool_t
xdr_verifier4(register XDR * xdrs,verifier4 objp)222*0Sstevel@tonic-gate xdr_verifier4(register XDR *xdrs, verifier4 objp)
223*0Sstevel@tonic-gate {
224*0Sstevel@tonic-gate
225*0Sstevel@tonic-gate if (!xdr_opaque(xdrs, objp, NFS4_VERIFIER_SIZE))
226*0Sstevel@tonic-gate return (FALSE);
227*0Sstevel@tonic-gate return (TRUE);
228*0Sstevel@tonic-gate }
229*0Sstevel@tonic-gate
230*0Sstevel@tonic-gate bool_t
xdr_nfstime4(register XDR * xdrs,nfstime4 * objp)231*0Sstevel@tonic-gate xdr_nfstime4(register XDR *xdrs, nfstime4 *objp)
232*0Sstevel@tonic-gate {
233*0Sstevel@tonic-gate
234*0Sstevel@tonic-gate if (!xdr_int64_t(xdrs, &objp->seconds))
235*0Sstevel@tonic-gate return (FALSE);
236*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->nseconds))
237*0Sstevel@tonic-gate return (FALSE);
238*0Sstevel@tonic-gate return (TRUE);
239*0Sstevel@tonic-gate }
240*0Sstevel@tonic-gate
241*0Sstevel@tonic-gate bool_t
xdr_time_how4(register XDR * xdrs,time_how4 * objp)242*0Sstevel@tonic-gate xdr_time_how4(register XDR *xdrs, time_how4 *objp)
243*0Sstevel@tonic-gate {
244*0Sstevel@tonic-gate
245*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
246*0Sstevel@tonic-gate return (FALSE);
247*0Sstevel@tonic-gate return (TRUE);
248*0Sstevel@tonic-gate }
249*0Sstevel@tonic-gate
250*0Sstevel@tonic-gate bool_t
xdr_settime4(register XDR * xdrs,settime4 * objp)251*0Sstevel@tonic-gate xdr_settime4(register XDR *xdrs, settime4 *objp)
252*0Sstevel@tonic-gate {
253*0Sstevel@tonic-gate
254*0Sstevel@tonic-gate if (!xdr_time_how4(xdrs, &objp->set_it))
255*0Sstevel@tonic-gate return (FALSE);
256*0Sstevel@tonic-gate switch (objp->set_it) {
257*0Sstevel@tonic-gate case SET_TO_CLIENT_TIME4:
258*0Sstevel@tonic-gate if (!xdr_nfstime4(xdrs, &objp->settime4_u.time))
259*0Sstevel@tonic-gate return (FALSE);
260*0Sstevel@tonic-gate break;
261*0Sstevel@tonic-gate }
262*0Sstevel@tonic-gate return (TRUE);
263*0Sstevel@tonic-gate }
264*0Sstevel@tonic-gate
265*0Sstevel@tonic-gate bool_t
xdr_nfs_fh4(register XDR * xdrs,nfs_fh4 * objp)266*0Sstevel@tonic-gate xdr_nfs_fh4(register XDR *xdrs, nfs_fh4 *objp)
267*0Sstevel@tonic-gate {
268*0Sstevel@tonic-gate
269*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->nfs_fh4_val,
270*0Sstevel@tonic-gate (uint_t *)&objp->nfs_fh4_len, NFS4_FHSIZE))
271*0Sstevel@tonic-gate return (FALSE);
272*0Sstevel@tonic-gate return (TRUE);
273*0Sstevel@tonic-gate }
274*0Sstevel@tonic-gate
275*0Sstevel@tonic-gate bool_t
xdr_fsid4(register XDR * xdrs,fsid4 * objp)276*0Sstevel@tonic-gate xdr_fsid4(register XDR *xdrs, fsid4 *objp)
277*0Sstevel@tonic-gate {
278*0Sstevel@tonic-gate
279*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, &objp->major))
280*0Sstevel@tonic-gate return (FALSE);
281*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, &objp->minor))
282*0Sstevel@tonic-gate return (FALSE);
283*0Sstevel@tonic-gate return (TRUE);
284*0Sstevel@tonic-gate }
285*0Sstevel@tonic-gate
286*0Sstevel@tonic-gate bool_t
xdr_fs_location4(register XDR * xdrs,fs_location4 * objp)287*0Sstevel@tonic-gate xdr_fs_location4(register XDR *xdrs, fs_location4 *objp)
288*0Sstevel@tonic-gate {
289*0Sstevel@tonic-gate
290*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->server.server_val,
291*0Sstevel@tonic-gate (uint_t *)&objp->server.server_len, ~0,
292*0Sstevel@tonic-gate sizeof (utf8string), (xdrproc_t)xdr_utf8string))
293*0Sstevel@tonic-gate return (FALSE);
294*0Sstevel@tonic-gate if (!xdr_pathname4(xdrs, &objp->rootpath))
295*0Sstevel@tonic-gate return (FALSE);
296*0Sstevel@tonic-gate return (TRUE);
297*0Sstevel@tonic-gate }
298*0Sstevel@tonic-gate
299*0Sstevel@tonic-gate bool_t
xdr_fs_locations4(register XDR * xdrs,fs_locations4 * objp)300*0Sstevel@tonic-gate xdr_fs_locations4(register XDR *xdrs, fs_locations4 *objp)
301*0Sstevel@tonic-gate {
302*0Sstevel@tonic-gate
303*0Sstevel@tonic-gate if (!xdr_pathname4(xdrs, &objp->fs_root))
304*0Sstevel@tonic-gate return (FALSE);
305*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->locations.locations_val,
306*0Sstevel@tonic-gate (uint_t *)&objp->locations.locations_len, ~0,
307*0Sstevel@tonic-gate sizeof (fs_location4), (xdrproc_t)xdr_fs_location4))
308*0Sstevel@tonic-gate return (FALSE);
309*0Sstevel@tonic-gate return (TRUE);
310*0Sstevel@tonic-gate }
311*0Sstevel@tonic-gate
312*0Sstevel@tonic-gate bool_t
xdr_acetype4(register XDR * xdrs,acetype4 * objp)313*0Sstevel@tonic-gate xdr_acetype4(register XDR *xdrs, acetype4 *objp)
314*0Sstevel@tonic-gate {
315*0Sstevel@tonic-gate
316*0Sstevel@tonic-gate if (!xdr_u_int(xdrs, objp))
317*0Sstevel@tonic-gate return (FALSE);
318*0Sstevel@tonic-gate return (TRUE);
319*0Sstevel@tonic-gate }
320*0Sstevel@tonic-gate
321*0Sstevel@tonic-gate bool_t
xdr_aceflag4(register XDR * xdrs,aceflag4 * objp)322*0Sstevel@tonic-gate xdr_aceflag4(register XDR *xdrs, aceflag4 *objp)
323*0Sstevel@tonic-gate {
324*0Sstevel@tonic-gate
325*0Sstevel@tonic-gate if (!xdr_u_int(xdrs, objp))
326*0Sstevel@tonic-gate return (FALSE);
327*0Sstevel@tonic-gate return (TRUE);
328*0Sstevel@tonic-gate }
329*0Sstevel@tonic-gate
330*0Sstevel@tonic-gate bool_t
xdr_acemask4(register XDR * xdrs,acemask4 * objp)331*0Sstevel@tonic-gate xdr_acemask4(register XDR *xdrs, acemask4 *objp)
332*0Sstevel@tonic-gate {
333*0Sstevel@tonic-gate
334*0Sstevel@tonic-gate if (!xdr_u_int(xdrs, objp))
335*0Sstevel@tonic-gate return (FALSE);
336*0Sstevel@tonic-gate return (TRUE);
337*0Sstevel@tonic-gate }
338*0Sstevel@tonic-gate
339*0Sstevel@tonic-gate bool_t
xdr_nfsace4(register XDR * xdrs,nfsace4 * objp)340*0Sstevel@tonic-gate xdr_nfsace4(register XDR *xdrs, nfsace4 *objp)
341*0Sstevel@tonic-gate {
342*0Sstevel@tonic-gate if (!xdr_acetype4(xdrs, &objp->type))
343*0Sstevel@tonic-gate return (FALSE);
344*0Sstevel@tonic-gate if (!xdr_aceflag4(xdrs, &objp->flag))
345*0Sstevel@tonic-gate return (FALSE);
346*0Sstevel@tonic-gate if (!xdr_acemask4(xdrs, &objp->access_mask))
347*0Sstevel@tonic-gate return (FALSE);
348*0Sstevel@tonic-gate if (xdrs->x_op == XDR_DECODE) {
349*0Sstevel@tonic-gate objp->who.utf8string_val = NULL;
350*0Sstevel@tonic-gate objp->who.utf8string_len = 0;
351*0Sstevel@tonic-gate }
352*0Sstevel@tonic-gate return (xdr_bytes(xdrs, (char **)&objp->who.utf8string_val,
353*0Sstevel@tonic-gate (uint_t *)&objp->who.utf8string_len,
354*0Sstevel@tonic-gate NFS4_MAX_UTF8STRING));
355*0Sstevel@tonic-gate }
356*0Sstevel@tonic-gate
357*0Sstevel@tonic-gate bool_t
xdr_specdata4(register XDR * xdrs,specdata4 * objp)358*0Sstevel@tonic-gate xdr_specdata4(register XDR *xdrs, specdata4 *objp)
359*0Sstevel@tonic-gate {
360*0Sstevel@tonic-gate
361*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->specdata1))
362*0Sstevel@tonic-gate return (FALSE);
363*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->specdata2))
364*0Sstevel@tonic-gate return (FALSE);
365*0Sstevel@tonic-gate return (TRUE);
366*0Sstevel@tonic-gate }
367*0Sstevel@tonic-gate
368*0Sstevel@tonic-gate bool_t
xdr_fattr4_supported_attrs(register XDR * xdrs,fattr4_supported_attrs * objp)369*0Sstevel@tonic-gate xdr_fattr4_supported_attrs(register XDR *xdrs, fattr4_supported_attrs *objp)
370*0Sstevel@tonic-gate {
371*0Sstevel@tonic-gate
372*0Sstevel@tonic-gate if (!xdr_bitmap4(xdrs, objp))
373*0Sstevel@tonic-gate return (FALSE);
374*0Sstevel@tonic-gate return (TRUE);
375*0Sstevel@tonic-gate }
376*0Sstevel@tonic-gate
377*0Sstevel@tonic-gate bool_t
xdr_fattr4_type(register XDR * xdrs,fattr4_type * objp)378*0Sstevel@tonic-gate xdr_fattr4_type(register XDR *xdrs, fattr4_type *objp)
379*0Sstevel@tonic-gate {
380*0Sstevel@tonic-gate
381*0Sstevel@tonic-gate if (!xdr_nfs_ftype4(xdrs, objp))
382*0Sstevel@tonic-gate return (FALSE);
383*0Sstevel@tonic-gate return (TRUE);
384*0Sstevel@tonic-gate }
385*0Sstevel@tonic-gate
386*0Sstevel@tonic-gate bool_t
xdr_fattr4_fh_expire_type(register XDR * xdrs,fattr4_fh_expire_type * objp)387*0Sstevel@tonic-gate xdr_fattr4_fh_expire_type(register XDR *xdrs, fattr4_fh_expire_type *objp)
388*0Sstevel@tonic-gate {
389*0Sstevel@tonic-gate
390*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
391*0Sstevel@tonic-gate return (FALSE);
392*0Sstevel@tonic-gate return (TRUE);
393*0Sstevel@tonic-gate }
394*0Sstevel@tonic-gate
395*0Sstevel@tonic-gate bool_t
xdr_fattr4_change(register XDR * xdrs,fattr4_change * objp)396*0Sstevel@tonic-gate xdr_fattr4_change(register XDR *xdrs, fattr4_change *objp)
397*0Sstevel@tonic-gate {
398*0Sstevel@tonic-gate
399*0Sstevel@tonic-gate if (!xdr_changeid4(xdrs, objp))
400*0Sstevel@tonic-gate return (FALSE);
401*0Sstevel@tonic-gate return (TRUE);
402*0Sstevel@tonic-gate }
403*0Sstevel@tonic-gate
404*0Sstevel@tonic-gate bool_t
xdr_fattr4_size(register XDR * xdrs,fattr4_size * objp)405*0Sstevel@tonic-gate xdr_fattr4_size(register XDR *xdrs, fattr4_size *objp)
406*0Sstevel@tonic-gate {
407*0Sstevel@tonic-gate
408*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
409*0Sstevel@tonic-gate return (FALSE);
410*0Sstevel@tonic-gate return (TRUE);
411*0Sstevel@tonic-gate }
412*0Sstevel@tonic-gate
413*0Sstevel@tonic-gate bool_t
xdr_fattr4_link_support(register XDR * xdrs,fattr4_link_support * objp)414*0Sstevel@tonic-gate xdr_fattr4_link_support(register XDR *xdrs, fattr4_link_support *objp)
415*0Sstevel@tonic-gate {
416*0Sstevel@tonic-gate
417*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
418*0Sstevel@tonic-gate return (FALSE);
419*0Sstevel@tonic-gate return (TRUE);
420*0Sstevel@tonic-gate }
421*0Sstevel@tonic-gate
422*0Sstevel@tonic-gate bool_t
xdr_fattr4_symlink_support(register XDR * xdrs,fattr4_symlink_support * objp)423*0Sstevel@tonic-gate xdr_fattr4_symlink_support(register XDR *xdrs, fattr4_symlink_support *objp)
424*0Sstevel@tonic-gate {
425*0Sstevel@tonic-gate
426*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
427*0Sstevel@tonic-gate return (FALSE);
428*0Sstevel@tonic-gate return (TRUE);
429*0Sstevel@tonic-gate }
430*0Sstevel@tonic-gate
431*0Sstevel@tonic-gate bool_t
xdr_fattr4_named_attr(register XDR * xdrs,fattr4_named_attr * objp)432*0Sstevel@tonic-gate xdr_fattr4_named_attr(register XDR *xdrs, fattr4_named_attr *objp)
433*0Sstevel@tonic-gate {
434*0Sstevel@tonic-gate
435*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
436*0Sstevel@tonic-gate return (FALSE);
437*0Sstevel@tonic-gate return (TRUE);
438*0Sstevel@tonic-gate }
439*0Sstevel@tonic-gate
440*0Sstevel@tonic-gate bool_t
xdr_fattr4_fsid(register XDR * xdrs,fattr4_fsid * objp)441*0Sstevel@tonic-gate xdr_fattr4_fsid(register XDR *xdrs, fattr4_fsid *objp)
442*0Sstevel@tonic-gate {
443*0Sstevel@tonic-gate
444*0Sstevel@tonic-gate if (!xdr_fsid4(xdrs, objp))
445*0Sstevel@tonic-gate return (FALSE);
446*0Sstevel@tonic-gate return (TRUE);
447*0Sstevel@tonic-gate }
448*0Sstevel@tonic-gate
449*0Sstevel@tonic-gate bool_t
xdr_fattr4_unique_handles(register XDR * xdrs,fattr4_unique_handles * objp)450*0Sstevel@tonic-gate xdr_fattr4_unique_handles(register XDR *xdrs, fattr4_unique_handles *objp)
451*0Sstevel@tonic-gate {
452*0Sstevel@tonic-gate
453*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
454*0Sstevel@tonic-gate return (FALSE);
455*0Sstevel@tonic-gate return (TRUE);
456*0Sstevel@tonic-gate }
457*0Sstevel@tonic-gate
458*0Sstevel@tonic-gate bool_t
xdr_fattr4_lease_time(register XDR * xdrs,fattr4_lease_time * objp)459*0Sstevel@tonic-gate xdr_fattr4_lease_time(register XDR *xdrs, fattr4_lease_time *objp)
460*0Sstevel@tonic-gate {
461*0Sstevel@tonic-gate
462*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
463*0Sstevel@tonic-gate return (FALSE);
464*0Sstevel@tonic-gate return (TRUE);
465*0Sstevel@tonic-gate }
466*0Sstevel@tonic-gate
467*0Sstevel@tonic-gate bool_t
xdr_fattr4_rdattr_error(register XDR * xdrs,fattr4_rdattr_error * objp)468*0Sstevel@tonic-gate xdr_fattr4_rdattr_error(register XDR *xdrs, fattr4_rdattr_error *objp)
469*0Sstevel@tonic-gate {
470*0Sstevel@tonic-gate
471*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, objp))
472*0Sstevel@tonic-gate return (FALSE);
473*0Sstevel@tonic-gate return (TRUE);
474*0Sstevel@tonic-gate }
475*0Sstevel@tonic-gate
476*0Sstevel@tonic-gate bool_t
xdr_fattr4_acl(register XDR * xdrs,fattr4_acl * objp)477*0Sstevel@tonic-gate xdr_fattr4_acl(register XDR *xdrs, fattr4_acl *objp)
478*0Sstevel@tonic-gate {
479*0Sstevel@tonic-gate
480*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->fattr4_acl_val,
481*0Sstevel@tonic-gate (uint_t *)&objp->fattr4_acl_len, ~0,
482*0Sstevel@tonic-gate sizeof (nfsace4), (xdrproc_t)xdr_nfsace4))
483*0Sstevel@tonic-gate return (FALSE);
484*0Sstevel@tonic-gate return (TRUE);
485*0Sstevel@tonic-gate }
486*0Sstevel@tonic-gate
487*0Sstevel@tonic-gate bool_t
xdr_fattr4_aclsupport(register XDR * xdrs,fattr4_aclsupport * objp)488*0Sstevel@tonic-gate xdr_fattr4_aclsupport(register XDR *xdrs, fattr4_aclsupport *objp)
489*0Sstevel@tonic-gate {
490*0Sstevel@tonic-gate
491*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
492*0Sstevel@tonic-gate return (FALSE);
493*0Sstevel@tonic-gate return (TRUE);
494*0Sstevel@tonic-gate }
495*0Sstevel@tonic-gate
496*0Sstevel@tonic-gate bool_t
xdr_fattr4_archive(register XDR * xdrs,fattr4_archive * objp)497*0Sstevel@tonic-gate xdr_fattr4_archive(register XDR *xdrs, fattr4_archive *objp)
498*0Sstevel@tonic-gate {
499*0Sstevel@tonic-gate
500*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
501*0Sstevel@tonic-gate return (FALSE);
502*0Sstevel@tonic-gate return (TRUE);
503*0Sstevel@tonic-gate }
504*0Sstevel@tonic-gate
505*0Sstevel@tonic-gate bool_t
xdr_fattr4_cansettime(register XDR * xdrs,fattr4_cansettime * objp)506*0Sstevel@tonic-gate xdr_fattr4_cansettime(register XDR *xdrs, fattr4_cansettime *objp)
507*0Sstevel@tonic-gate {
508*0Sstevel@tonic-gate
509*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
510*0Sstevel@tonic-gate return (FALSE);
511*0Sstevel@tonic-gate return (TRUE);
512*0Sstevel@tonic-gate }
513*0Sstevel@tonic-gate
514*0Sstevel@tonic-gate bool_t
xdr_fattr4_case_insensitive(register XDR * xdrs,fattr4_case_insensitive * objp)515*0Sstevel@tonic-gate xdr_fattr4_case_insensitive(register XDR *xdrs, fattr4_case_insensitive *objp)
516*0Sstevel@tonic-gate {
517*0Sstevel@tonic-gate
518*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
519*0Sstevel@tonic-gate return (FALSE);
520*0Sstevel@tonic-gate return (TRUE);
521*0Sstevel@tonic-gate }
522*0Sstevel@tonic-gate
523*0Sstevel@tonic-gate bool_t
xdr_fattr4_case_preserving(register XDR * xdrs,fattr4_case_preserving * objp)524*0Sstevel@tonic-gate xdr_fattr4_case_preserving(register XDR *xdrs, fattr4_case_preserving *objp)
525*0Sstevel@tonic-gate {
526*0Sstevel@tonic-gate
527*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
528*0Sstevel@tonic-gate return (FALSE);
529*0Sstevel@tonic-gate return (TRUE);
530*0Sstevel@tonic-gate }
531*0Sstevel@tonic-gate
532*0Sstevel@tonic-gate bool_t
xdr_fattr4_chown_restricted(register XDR * xdrs,fattr4_chown_restricted * objp)533*0Sstevel@tonic-gate xdr_fattr4_chown_restricted(register XDR *xdrs, fattr4_chown_restricted *objp)
534*0Sstevel@tonic-gate {
535*0Sstevel@tonic-gate
536*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
537*0Sstevel@tonic-gate return (FALSE);
538*0Sstevel@tonic-gate return (TRUE);
539*0Sstevel@tonic-gate }
540*0Sstevel@tonic-gate
541*0Sstevel@tonic-gate bool_t
xdr_fattr4_fileid(register XDR * xdrs,fattr4_fileid * objp)542*0Sstevel@tonic-gate xdr_fattr4_fileid(register XDR *xdrs, fattr4_fileid *objp)
543*0Sstevel@tonic-gate {
544*0Sstevel@tonic-gate
545*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
546*0Sstevel@tonic-gate return (FALSE);
547*0Sstevel@tonic-gate return (TRUE);
548*0Sstevel@tonic-gate }
549*0Sstevel@tonic-gate
550*0Sstevel@tonic-gate bool_t
xdr_fattr4_files_avail(register XDR * xdrs,fattr4_files_avail * objp)551*0Sstevel@tonic-gate xdr_fattr4_files_avail(register XDR *xdrs, fattr4_files_avail *objp)
552*0Sstevel@tonic-gate {
553*0Sstevel@tonic-gate
554*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
555*0Sstevel@tonic-gate return (FALSE);
556*0Sstevel@tonic-gate return (TRUE);
557*0Sstevel@tonic-gate }
558*0Sstevel@tonic-gate
559*0Sstevel@tonic-gate bool_t
xdr_fattr4_filehandle(register XDR * xdrs,fattr4_filehandle * objp)560*0Sstevel@tonic-gate xdr_fattr4_filehandle(register XDR *xdrs, fattr4_filehandle *objp)
561*0Sstevel@tonic-gate {
562*0Sstevel@tonic-gate
563*0Sstevel@tonic-gate if (!xdr_nfs_fh4(xdrs, objp))
564*0Sstevel@tonic-gate return (FALSE);
565*0Sstevel@tonic-gate return (TRUE);
566*0Sstevel@tonic-gate }
567*0Sstevel@tonic-gate
568*0Sstevel@tonic-gate bool_t
xdr_fattr4_files_free(register XDR * xdrs,fattr4_files_free * objp)569*0Sstevel@tonic-gate xdr_fattr4_files_free(register XDR *xdrs, fattr4_files_free *objp)
570*0Sstevel@tonic-gate {
571*0Sstevel@tonic-gate
572*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
573*0Sstevel@tonic-gate return (FALSE);
574*0Sstevel@tonic-gate return (TRUE);
575*0Sstevel@tonic-gate }
576*0Sstevel@tonic-gate
577*0Sstevel@tonic-gate bool_t
xdr_fattr4_files_total(register XDR * xdrs,fattr4_files_total * objp)578*0Sstevel@tonic-gate xdr_fattr4_files_total(register XDR *xdrs, fattr4_files_total *objp)
579*0Sstevel@tonic-gate {
580*0Sstevel@tonic-gate
581*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
582*0Sstevel@tonic-gate return (FALSE);
583*0Sstevel@tonic-gate return (TRUE);
584*0Sstevel@tonic-gate }
585*0Sstevel@tonic-gate
586*0Sstevel@tonic-gate bool_t
xdr_fattr4_fs_locations(register XDR * xdrs,fattr4_fs_locations * objp)587*0Sstevel@tonic-gate xdr_fattr4_fs_locations(register XDR *xdrs, fattr4_fs_locations *objp)
588*0Sstevel@tonic-gate {
589*0Sstevel@tonic-gate
590*0Sstevel@tonic-gate if (!xdr_fs_locations4(xdrs, objp))
591*0Sstevel@tonic-gate return (FALSE);
592*0Sstevel@tonic-gate return (TRUE);
593*0Sstevel@tonic-gate }
594*0Sstevel@tonic-gate
595*0Sstevel@tonic-gate bool_t
xdr_fattr4_hidden(register XDR * xdrs,fattr4_hidden * objp)596*0Sstevel@tonic-gate xdr_fattr4_hidden(register XDR *xdrs, fattr4_hidden *objp)
597*0Sstevel@tonic-gate {
598*0Sstevel@tonic-gate
599*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
600*0Sstevel@tonic-gate return (FALSE);
601*0Sstevel@tonic-gate return (TRUE);
602*0Sstevel@tonic-gate }
603*0Sstevel@tonic-gate
604*0Sstevel@tonic-gate bool_t
xdr_fattr4_homogeneous(register XDR * xdrs,fattr4_homogeneous * objp)605*0Sstevel@tonic-gate xdr_fattr4_homogeneous(register XDR *xdrs, fattr4_homogeneous *objp)
606*0Sstevel@tonic-gate {
607*0Sstevel@tonic-gate
608*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
609*0Sstevel@tonic-gate return (FALSE);
610*0Sstevel@tonic-gate return (TRUE);
611*0Sstevel@tonic-gate }
612*0Sstevel@tonic-gate
613*0Sstevel@tonic-gate bool_t
xdr_fattr4_maxfilesize(register XDR * xdrs,fattr4_maxfilesize * objp)614*0Sstevel@tonic-gate xdr_fattr4_maxfilesize(register XDR *xdrs, fattr4_maxfilesize *objp)
615*0Sstevel@tonic-gate {
616*0Sstevel@tonic-gate
617*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
618*0Sstevel@tonic-gate return (FALSE);
619*0Sstevel@tonic-gate return (TRUE);
620*0Sstevel@tonic-gate }
621*0Sstevel@tonic-gate
622*0Sstevel@tonic-gate bool_t
xdr_fattr4_maxlink(register XDR * xdrs,fattr4_maxlink * objp)623*0Sstevel@tonic-gate xdr_fattr4_maxlink(register XDR *xdrs, fattr4_maxlink *objp)
624*0Sstevel@tonic-gate {
625*0Sstevel@tonic-gate
626*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
627*0Sstevel@tonic-gate return (FALSE);
628*0Sstevel@tonic-gate return (TRUE);
629*0Sstevel@tonic-gate }
630*0Sstevel@tonic-gate
631*0Sstevel@tonic-gate bool_t
xdr_fattr4_maxname(register XDR * xdrs,fattr4_maxname * objp)632*0Sstevel@tonic-gate xdr_fattr4_maxname(register XDR *xdrs, fattr4_maxname *objp)
633*0Sstevel@tonic-gate {
634*0Sstevel@tonic-gate
635*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
636*0Sstevel@tonic-gate return (FALSE);
637*0Sstevel@tonic-gate return (TRUE);
638*0Sstevel@tonic-gate }
639*0Sstevel@tonic-gate
640*0Sstevel@tonic-gate bool_t
xdr_fattr4_maxread(register XDR * xdrs,fattr4_maxread * objp)641*0Sstevel@tonic-gate xdr_fattr4_maxread(register XDR *xdrs, fattr4_maxread *objp)
642*0Sstevel@tonic-gate {
643*0Sstevel@tonic-gate
644*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
645*0Sstevel@tonic-gate return (FALSE);
646*0Sstevel@tonic-gate return (TRUE);
647*0Sstevel@tonic-gate }
648*0Sstevel@tonic-gate
649*0Sstevel@tonic-gate bool_t
xdr_fattr4_maxwrite(register XDR * xdrs,fattr4_maxwrite * objp)650*0Sstevel@tonic-gate xdr_fattr4_maxwrite(register XDR *xdrs, fattr4_maxwrite *objp)
651*0Sstevel@tonic-gate {
652*0Sstevel@tonic-gate
653*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
654*0Sstevel@tonic-gate return (FALSE);
655*0Sstevel@tonic-gate return (TRUE);
656*0Sstevel@tonic-gate }
657*0Sstevel@tonic-gate
658*0Sstevel@tonic-gate bool_t
xdr_fattr4_mimetype(register XDR * xdrs,fattr4_mimetype * objp)659*0Sstevel@tonic-gate xdr_fattr4_mimetype(register XDR *xdrs, fattr4_mimetype *objp)
660*0Sstevel@tonic-gate {
661*0Sstevel@tonic-gate
662*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, objp))
663*0Sstevel@tonic-gate return (FALSE);
664*0Sstevel@tonic-gate return (TRUE);
665*0Sstevel@tonic-gate }
666*0Sstevel@tonic-gate
667*0Sstevel@tonic-gate bool_t
xdr_fattr4_mode(register XDR * xdrs,fattr4_mode * objp)668*0Sstevel@tonic-gate xdr_fattr4_mode(register XDR *xdrs, fattr4_mode *objp)
669*0Sstevel@tonic-gate {
670*0Sstevel@tonic-gate
671*0Sstevel@tonic-gate if (!xdr_mode4(xdrs, objp))
672*0Sstevel@tonic-gate return (FALSE);
673*0Sstevel@tonic-gate return (TRUE);
674*0Sstevel@tonic-gate }
675*0Sstevel@tonic-gate
676*0Sstevel@tonic-gate bool_t
xdr_fattr4_mounted_on_fileid(register XDR * xdrs,fattr4_mounted_on_fileid * objp)677*0Sstevel@tonic-gate xdr_fattr4_mounted_on_fileid(register XDR *xdrs, fattr4_mounted_on_fileid *objp)
678*0Sstevel@tonic-gate {
679*0Sstevel@tonic-gate
680*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
681*0Sstevel@tonic-gate return (FALSE);
682*0Sstevel@tonic-gate return (TRUE);
683*0Sstevel@tonic-gate }
684*0Sstevel@tonic-gate
685*0Sstevel@tonic-gate bool_t
xdr_fattr4_no_trunc(register XDR * xdrs,fattr4_no_trunc * objp)686*0Sstevel@tonic-gate xdr_fattr4_no_trunc(register XDR *xdrs, fattr4_no_trunc *objp)
687*0Sstevel@tonic-gate {
688*0Sstevel@tonic-gate
689*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
690*0Sstevel@tonic-gate return (FALSE);
691*0Sstevel@tonic-gate return (TRUE);
692*0Sstevel@tonic-gate }
693*0Sstevel@tonic-gate
694*0Sstevel@tonic-gate bool_t
xdr_fattr4_numlinks(register XDR * xdrs,fattr4_numlinks * objp)695*0Sstevel@tonic-gate xdr_fattr4_numlinks(register XDR *xdrs, fattr4_numlinks *objp)
696*0Sstevel@tonic-gate {
697*0Sstevel@tonic-gate
698*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, objp))
699*0Sstevel@tonic-gate return (FALSE);
700*0Sstevel@tonic-gate return (TRUE);
701*0Sstevel@tonic-gate }
702*0Sstevel@tonic-gate
703*0Sstevel@tonic-gate bool_t
xdr_fattr4_owner(register XDR * xdrs,fattr4_owner * objp)704*0Sstevel@tonic-gate xdr_fattr4_owner(register XDR *xdrs, fattr4_owner *objp)
705*0Sstevel@tonic-gate {
706*0Sstevel@tonic-gate
707*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, objp))
708*0Sstevel@tonic-gate return (FALSE);
709*0Sstevel@tonic-gate return (TRUE);
710*0Sstevel@tonic-gate }
711*0Sstevel@tonic-gate
712*0Sstevel@tonic-gate bool_t
xdr_fattr4_owner_group(register XDR * xdrs,fattr4_owner_group * objp)713*0Sstevel@tonic-gate xdr_fattr4_owner_group(register XDR *xdrs, fattr4_owner_group *objp)
714*0Sstevel@tonic-gate {
715*0Sstevel@tonic-gate
716*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, objp))
717*0Sstevel@tonic-gate return (FALSE);
718*0Sstevel@tonic-gate return (TRUE);
719*0Sstevel@tonic-gate }
720*0Sstevel@tonic-gate
721*0Sstevel@tonic-gate bool_t
xdr_fattr4_quota_avail_hard(register XDR * xdrs,fattr4_quota_avail_hard * objp)722*0Sstevel@tonic-gate xdr_fattr4_quota_avail_hard(register XDR *xdrs, fattr4_quota_avail_hard *objp)
723*0Sstevel@tonic-gate {
724*0Sstevel@tonic-gate
725*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
726*0Sstevel@tonic-gate return (FALSE);
727*0Sstevel@tonic-gate return (TRUE);
728*0Sstevel@tonic-gate }
729*0Sstevel@tonic-gate
730*0Sstevel@tonic-gate bool_t
xdr_fattr4_quota_avail_soft(register XDR * xdrs,fattr4_quota_avail_soft * objp)731*0Sstevel@tonic-gate xdr_fattr4_quota_avail_soft(register XDR *xdrs, fattr4_quota_avail_soft *objp)
732*0Sstevel@tonic-gate {
733*0Sstevel@tonic-gate
734*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
735*0Sstevel@tonic-gate return (FALSE);
736*0Sstevel@tonic-gate return (TRUE);
737*0Sstevel@tonic-gate }
738*0Sstevel@tonic-gate
739*0Sstevel@tonic-gate bool_t
xdr_fattr4_quota_used(register XDR * xdrs,fattr4_quota_used * objp)740*0Sstevel@tonic-gate xdr_fattr4_quota_used(register XDR *xdrs, fattr4_quota_used *objp)
741*0Sstevel@tonic-gate {
742*0Sstevel@tonic-gate
743*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
744*0Sstevel@tonic-gate return (FALSE);
745*0Sstevel@tonic-gate return (TRUE);
746*0Sstevel@tonic-gate }
747*0Sstevel@tonic-gate
748*0Sstevel@tonic-gate bool_t
xdr_fattr4_rawdev(register XDR * xdrs,fattr4_rawdev * objp)749*0Sstevel@tonic-gate xdr_fattr4_rawdev(register XDR *xdrs, fattr4_rawdev *objp)
750*0Sstevel@tonic-gate {
751*0Sstevel@tonic-gate
752*0Sstevel@tonic-gate if (!xdr_specdata4(xdrs, objp))
753*0Sstevel@tonic-gate return (FALSE);
754*0Sstevel@tonic-gate return (TRUE);
755*0Sstevel@tonic-gate }
756*0Sstevel@tonic-gate
757*0Sstevel@tonic-gate bool_t
xdr_fattr4_space_avail(register XDR * xdrs,fattr4_space_avail * objp)758*0Sstevel@tonic-gate xdr_fattr4_space_avail(register XDR *xdrs, fattr4_space_avail *objp)
759*0Sstevel@tonic-gate {
760*0Sstevel@tonic-gate
761*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
762*0Sstevel@tonic-gate return (FALSE);
763*0Sstevel@tonic-gate return (TRUE);
764*0Sstevel@tonic-gate }
765*0Sstevel@tonic-gate
766*0Sstevel@tonic-gate bool_t
xdr_fattr4_space_free(register XDR * xdrs,fattr4_space_free * objp)767*0Sstevel@tonic-gate xdr_fattr4_space_free(register XDR *xdrs, fattr4_space_free *objp)
768*0Sstevel@tonic-gate {
769*0Sstevel@tonic-gate
770*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
771*0Sstevel@tonic-gate return (FALSE);
772*0Sstevel@tonic-gate return (TRUE);
773*0Sstevel@tonic-gate }
774*0Sstevel@tonic-gate
775*0Sstevel@tonic-gate bool_t
xdr_fattr4_space_total(register XDR * xdrs,fattr4_space_total * objp)776*0Sstevel@tonic-gate xdr_fattr4_space_total(register XDR *xdrs, fattr4_space_total *objp)
777*0Sstevel@tonic-gate {
778*0Sstevel@tonic-gate
779*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
780*0Sstevel@tonic-gate return (FALSE);
781*0Sstevel@tonic-gate return (TRUE);
782*0Sstevel@tonic-gate }
783*0Sstevel@tonic-gate
784*0Sstevel@tonic-gate bool_t
xdr_fattr4_space_used(register XDR * xdrs,fattr4_space_used * objp)785*0Sstevel@tonic-gate xdr_fattr4_space_used(register XDR *xdrs, fattr4_space_used *objp)
786*0Sstevel@tonic-gate {
787*0Sstevel@tonic-gate
788*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, objp))
789*0Sstevel@tonic-gate return (FALSE);
790*0Sstevel@tonic-gate return (TRUE);
791*0Sstevel@tonic-gate }
792*0Sstevel@tonic-gate
793*0Sstevel@tonic-gate bool_t
xdr_fattr4_system(register XDR * xdrs,fattr4_system * objp)794*0Sstevel@tonic-gate xdr_fattr4_system(register XDR *xdrs, fattr4_system *objp)
795*0Sstevel@tonic-gate {
796*0Sstevel@tonic-gate
797*0Sstevel@tonic-gate if (!xdr_bool(xdrs, objp))
798*0Sstevel@tonic-gate return (FALSE);
799*0Sstevel@tonic-gate return (TRUE);
800*0Sstevel@tonic-gate }
801*0Sstevel@tonic-gate
802*0Sstevel@tonic-gate bool_t
xdr_fattr4_time_access(register XDR * xdrs,fattr4_time_access * objp)803*0Sstevel@tonic-gate xdr_fattr4_time_access(register XDR *xdrs, fattr4_time_access *objp)
804*0Sstevel@tonic-gate {
805*0Sstevel@tonic-gate
806*0Sstevel@tonic-gate if (!xdr_nfstime4(xdrs, objp))
807*0Sstevel@tonic-gate return (FALSE);
808*0Sstevel@tonic-gate return (TRUE);
809*0Sstevel@tonic-gate }
810*0Sstevel@tonic-gate
811*0Sstevel@tonic-gate bool_t
xdr_fattr4_time_access_set(register XDR * xdrs,fattr4_time_access_set * objp)812*0Sstevel@tonic-gate xdr_fattr4_time_access_set(register XDR *xdrs, fattr4_time_access_set *objp)
813*0Sstevel@tonic-gate {
814*0Sstevel@tonic-gate
815*0Sstevel@tonic-gate if (!xdr_settime4(xdrs, objp))
816*0Sstevel@tonic-gate return (FALSE);
817*0Sstevel@tonic-gate return (TRUE);
818*0Sstevel@tonic-gate }
819*0Sstevel@tonic-gate
820*0Sstevel@tonic-gate bool_t
xdr_fattr4_time_backup(register XDR * xdrs,fattr4_time_backup * objp)821*0Sstevel@tonic-gate xdr_fattr4_time_backup(register XDR *xdrs, fattr4_time_backup *objp)
822*0Sstevel@tonic-gate {
823*0Sstevel@tonic-gate
824*0Sstevel@tonic-gate if (!xdr_nfstime4(xdrs, objp))
825*0Sstevel@tonic-gate return (FALSE);
826*0Sstevel@tonic-gate return (TRUE);
827*0Sstevel@tonic-gate }
828*0Sstevel@tonic-gate
829*0Sstevel@tonic-gate bool_t
xdr_fattr4_time_create(register XDR * xdrs,fattr4_time_create * objp)830*0Sstevel@tonic-gate xdr_fattr4_time_create(register XDR *xdrs, fattr4_time_create *objp)
831*0Sstevel@tonic-gate {
832*0Sstevel@tonic-gate
833*0Sstevel@tonic-gate if (!xdr_nfstime4(xdrs, objp))
834*0Sstevel@tonic-gate return (FALSE);
835*0Sstevel@tonic-gate return (TRUE);
836*0Sstevel@tonic-gate }
837*0Sstevel@tonic-gate
838*0Sstevel@tonic-gate bool_t
xdr_fattr4_time_delta(register XDR * xdrs,fattr4_time_delta * objp)839*0Sstevel@tonic-gate xdr_fattr4_time_delta(register XDR *xdrs, fattr4_time_delta *objp)
840*0Sstevel@tonic-gate {
841*0Sstevel@tonic-gate
842*0Sstevel@tonic-gate if (!xdr_nfstime4(xdrs, objp))
843*0Sstevel@tonic-gate return (FALSE);
844*0Sstevel@tonic-gate return (TRUE);
845*0Sstevel@tonic-gate }
846*0Sstevel@tonic-gate
847*0Sstevel@tonic-gate bool_t
xdr_fattr4_time_metadata(register XDR * xdrs,fattr4_time_metadata * objp)848*0Sstevel@tonic-gate xdr_fattr4_time_metadata(register XDR *xdrs, fattr4_time_metadata *objp)
849*0Sstevel@tonic-gate {
850*0Sstevel@tonic-gate
851*0Sstevel@tonic-gate if (!xdr_nfstime4(xdrs, objp))
852*0Sstevel@tonic-gate return (FALSE);
853*0Sstevel@tonic-gate return (TRUE);
854*0Sstevel@tonic-gate }
855*0Sstevel@tonic-gate
856*0Sstevel@tonic-gate bool_t
xdr_fattr4_time_modify(register XDR * xdrs,fattr4_time_modify * objp)857*0Sstevel@tonic-gate xdr_fattr4_time_modify(register XDR *xdrs, fattr4_time_modify *objp)
858*0Sstevel@tonic-gate {
859*0Sstevel@tonic-gate
860*0Sstevel@tonic-gate if (!xdr_nfstime4(xdrs, objp))
861*0Sstevel@tonic-gate return (FALSE);
862*0Sstevel@tonic-gate return (TRUE);
863*0Sstevel@tonic-gate }
864*0Sstevel@tonic-gate
865*0Sstevel@tonic-gate bool_t
xdr_fattr4_time_modify_set(register XDR * xdrs,fattr4_time_modify_set * objp)866*0Sstevel@tonic-gate xdr_fattr4_time_modify_set(register XDR *xdrs, fattr4_time_modify_set *objp)
867*0Sstevel@tonic-gate {
868*0Sstevel@tonic-gate
869*0Sstevel@tonic-gate if (!xdr_settime4(xdrs, objp))
870*0Sstevel@tonic-gate return (FALSE);
871*0Sstevel@tonic-gate return (TRUE);
872*0Sstevel@tonic-gate }
873*0Sstevel@tonic-gate
874*0Sstevel@tonic-gate bool_t
xdr_attrlist4(register XDR * xdrs,attrlist4 * objp)875*0Sstevel@tonic-gate xdr_attrlist4(register XDR *xdrs, attrlist4 *objp)
876*0Sstevel@tonic-gate {
877*0Sstevel@tonic-gate
878*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->attrlist4_val,
879*0Sstevel@tonic-gate (uint_t *)&objp->attrlist4_len, ~0))
880*0Sstevel@tonic-gate return (FALSE);
881*0Sstevel@tonic-gate return (TRUE);
882*0Sstevel@tonic-gate }
883*0Sstevel@tonic-gate
884*0Sstevel@tonic-gate bool_t
xdr_fattr4(register XDR * xdrs,fattr4 * objp)885*0Sstevel@tonic-gate xdr_fattr4(register XDR *xdrs, fattr4 *objp)
886*0Sstevel@tonic-gate {
887*0Sstevel@tonic-gate
888*0Sstevel@tonic-gate if (!xdr_bitmap4(xdrs, &objp->attrmask))
889*0Sstevel@tonic-gate return (FALSE);
890*0Sstevel@tonic-gate if (!xdr_attrlist4(xdrs, &objp->attr_vals))
891*0Sstevel@tonic-gate return (FALSE);
892*0Sstevel@tonic-gate return (TRUE);
893*0Sstevel@tonic-gate }
894*0Sstevel@tonic-gate
895*0Sstevel@tonic-gate bool_t
xdr_change_info4(register XDR * xdrs,change_info4 * objp)896*0Sstevel@tonic-gate xdr_change_info4(register XDR *xdrs, change_info4 *objp)
897*0Sstevel@tonic-gate {
898*0Sstevel@tonic-gate
899*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->atomic))
900*0Sstevel@tonic-gate return (FALSE);
901*0Sstevel@tonic-gate if (!xdr_changeid4(xdrs, &objp->before))
902*0Sstevel@tonic-gate return (FALSE);
903*0Sstevel@tonic-gate if (!xdr_changeid4(xdrs, &objp->after))
904*0Sstevel@tonic-gate return (FALSE);
905*0Sstevel@tonic-gate return (TRUE);
906*0Sstevel@tonic-gate }
907*0Sstevel@tonic-gate
908*0Sstevel@tonic-gate bool_t
xdr_clientaddr4(register XDR * xdrs,clientaddr4 * objp)909*0Sstevel@tonic-gate xdr_clientaddr4(register XDR *xdrs, clientaddr4 *objp)
910*0Sstevel@tonic-gate {
911*0Sstevel@tonic-gate
912*0Sstevel@tonic-gate if (!xdr_string(xdrs, &objp->r_netid, ~0))
913*0Sstevel@tonic-gate return (FALSE);
914*0Sstevel@tonic-gate if (!xdr_string(xdrs, &objp->r_addr, ~0))
915*0Sstevel@tonic-gate return (FALSE);
916*0Sstevel@tonic-gate return (TRUE);
917*0Sstevel@tonic-gate }
918*0Sstevel@tonic-gate
919*0Sstevel@tonic-gate bool_t
xdr_cb_client4(register XDR * xdrs,cb_client4 * objp)920*0Sstevel@tonic-gate xdr_cb_client4(register XDR *xdrs, cb_client4 *objp)
921*0Sstevel@tonic-gate {
922*0Sstevel@tonic-gate
923*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->cb_program))
924*0Sstevel@tonic-gate return (FALSE);
925*0Sstevel@tonic-gate if (!xdr_clientaddr4(xdrs, &objp->cb_location))
926*0Sstevel@tonic-gate return (FALSE);
927*0Sstevel@tonic-gate return (TRUE);
928*0Sstevel@tonic-gate }
929*0Sstevel@tonic-gate
930*0Sstevel@tonic-gate bool_t
xdr_stateid4(register XDR * xdrs,stateid4 * objp)931*0Sstevel@tonic-gate xdr_stateid4(register XDR *xdrs, stateid4 *objp)
932*0Sstevel@tonic-gate {
933*0Sstevel@tonic-gate
934*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->seqid))
935*0Sstevel@tonic-gate return (FALSE);
936*0Sstevel@tonic-gate if (!xdr_opaque(xdrs, objp->other, 12))
937*0Sstevel@tonic-gate return (FALSE);
938*0Sstevel@tonic-gate return (TRUE);
939*0Sstevel@tonic-gate }
940*0Sstevel@tonic-gate
941*0Sstevel@tonic-gate bool_t
xdr_nfs_client_id4(register XDR * xdrs,nfs_client_id4 * objp)942*0Sstevel@tonic-gate xdr_nfs_client_id4(register XDR *xdrs, nfs_client_id4 *objp)
943*0Sstevel@tonic-gate {
944*0Sstevel@tonic-gate
945*0Sstevel@tonic-gate if (!xdr_verifier4(xdrs, objp->verifier))
946*0Sstevel@tonic-gate return (FALSE);
947*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->id.id_val,
948*0Sstevel@tonic-gate (uint_t *)&objp->id.id_len, NFS4_OPAQUE_LIMIT))
949*0Sstevel@tonic-gate return (FALSE);
950*0Sstevel@tonic-gate return (TRUE);
951*0Sstevel@tonic-gate }
952*0Sstevel@tonic-gate
953*0Sstevel@tonic-gate bool_t
xdr_open_owner4(register XDR * xdrs,open_owner4 * objp)954*0Sstevel@tonic-gate xdr_open_owner4(register XDR *xdrs, open_owner4 *objp)
955*0Sstevel@tonic-gate {
956*0Sstevel@tonic-gate
957*0Sstevel@tonic-gate if (!xdr_clientid4(xdrs, &objp->clientid))
958*0Sstevel@tonic-gate return (FALSE);
959*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->owner.owner_val,
960*0Sstevel@tonic-gate (uint_t *)&objp->owner.owner_len, NFS4_OPAQUE_LIMIT))
961*0Sstevel@tonic-gate return (FALSE);
962*0Sstevel@tonic-gate return (TRUE);
963*0Sstevel@tonic-gate }
964*0Sstevel@tonic-gate
965*0Sstevel@tonic-gate bool_t
xdr_lock_owner4(register XDR * xdrs,lock_owner4 * objp)966*0Sstevel@tonic-gate xdr_lock_owner4(register XDR *xdrs, lock_owner4 *objp)
967*0Sstevel@tonic-gate {
968*0Sstevel@tonic-gate
969*0Sstevel@tonic-gate if (!xdr_clientid4(xdrs, &objp->clientid))
970*0Sstevel@tonic-gate return (FALSE);
971*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->owner.owner_val,
972*0Sstevel@tonic-gate (uint_t *)&objp->owner.owner_len, NFS4_OPAQUE_LIMIT))
973*0Sstevel@tonic-gate return (FALSE);
974*0Sstevel@tonic-gate return (TRUE);
975*0Sstevel@tonic-gate }
976*0Sstevel@tonic-gate
977*0Sstevel@tonic-gate bool_t
xdr_nfs_lock_type4(register XDR * xdrs,nfs_lock_type4 * objp)978*0Sstevel@tonic-gate xdr_nfs_lock_type4(register XDR *xdrs, nfs_lock_type4 *objp)
979*0Sstevel@tonic-gate {
980*0Sstevel@tonic-gate
981*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
982*0Sstevel@tonic-gate return (FALSE);
983*0Sstevel@tonic-gate return (TRUE);
984*0Sstevel@tonic-gate }
985*0Sstevel@tonic-gate
986*0Sstevel@tonic-gate bool_t
xdr_ACCESS4args(register XDR * xdrs,ACCESS4args * objp)987*0Sstevel@tonic-gate xdr_ACCESS4args(register XDR *xdrs, ACCESS4args *objp)
988*0Sstevel@tonic-gate {
989*0Sstevel@tonic-gate
990*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->access))
991*0Sstevel@tonic-gate return (FALSE);
992*0Sstevel@tonic-gate return (TRUE);
993*0Sstevel@tonic-gate }
994*0Sstevel@tonic-gate
995*0Sstevel@tonic-gate bool_t
xdr_ACCESS4resok(register XDR * xdrs,ACCESS4resok * objp)996*0Sstevel@tonic-gate xdr_ACCESS4resok(register XDR *xdrs, ACCESS4resok *objp)
997*0Sstevel@tonic-gate {
998*0Sstevel@tonic-gate
999*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->supported))
1000*0Sstevel@tonic-gate return (FALSE);
1001*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->access))
1002*0Sstevel@tonic-gate return (FALSE);
1003*0Sstevel@tonic-gate return (TRUE);
1004*0Sstevel@tonic-gate }
1005*0Sstevel@tonic-gate
1006*0Sstevel@tonic-gate bool_t
xdr_ACCESS4res(register XDR * xdrs,ACCESS4res * objp)1007*0Sstevel@tonic-gate xdr_ACCESS4res(register XDR *xdrs, ACCESS4res *objp)
1008*0Sstevel@tonic-gate {
1009*0Sstevel@tonic-gate
1010*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1011*0Sstevel@tonic-gate return (FALSE);
1012*0Sstevel@tonic-gate switch (objp->status) {
1013*0Sstevel@tonic-gate case NFS4_OK:
1014*0Sstevel@tonic-gate if (!xdr_ACCESS4resok(xdrs, &objp->ACCESS4res_u.resok4))
1015*0Sstevel@tonic-gate return (FALSE);
1016*0Sstevel@tonic-gate break;
1017*0Sstevel@tonic-gate }
1018*0Sstevel@tonic-gate return (TRUE);
1019*0Sstevel@tonic-gate }
1020*0Sstevel@tonic-gate
1021*0Sstevel@tonic-gate bool_t
xdr_CLOSE4args(register XDR * xdrs,CLOSE4args * objp)1022*0Sstevel@tonic-gate xdr_CLOSE4args(register XDR *xdrs, CLOSE4args *objp)
1023*0Sstevel@tonic-gate {
1024*0Sstevel@tonic-gate
1025*0Sstevel@tonic-gate if (!xdr_seqid4(xdrs, &objp->seqid))
1026*0Sstevel@tonic-gate return (FALSE);
1027*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->open_stateid))
1028*0Sstevel@tonic-gate return (FALSE);
1029*0Sstevel@tonic-gate return (TRUE);
1030*0Sstevel@tonic-gate }
1031*0Sstevel@tonic-gate
1032*0Sstevel@tonic-gate bool_t
xdr_CLOSE4res(register XDR * xdrs,CLOSE4res * objp)1033*0Sstevel@tonic-gate xdr_CLOSE4res(register XDR *xdrs, CLOSE4res *objp)
1034*0Sstevel@tonic-gate {
1035*0Sstevel@tonic-gate
1036*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1037*0Sstevel@tonic-gate return (FALSE);
1038*0Sstevel@tonic-gate switch (objp->status) {
1039*0Sstevel@tonic-gate case NFS4_OK:
1040*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->CLOSE4res_u.open_stateid))
1041*0Sstevel@tonic-gate return (FALSE);
1042*0Sstevel@tonic-gate break;
1043*0Sstevel@tonic-gate }
1044*0Sstevel@tonic-gate return (TRUE);
1045*0Sstevel@tonic-gate }
1046*0Sstevel@tonic-gate
1047*0Sstevel@tonic-gate bool_t
xdr_COMMIT4args(register XDR * xdrs,COMMIT4args * objp)1048*0Sstevel@tonic-gate xdr_COMMIT4args(register XDR *xdrs, COMMIT4args *objp)
1049*0Sstevel@tonic-gate {
1050*0Sstevel@tonic-gate
1051*0Sstevel@tonic-gate if (!xdr_offset4(xdrs, &objp->offset))
1052*0Sstevel@tonic-gate return (FALSE);
1053*0Sstevel@tonic-gate if (!xdr_count4(xdrs, &objp->count))
1054*0Sstevel@tonic-gate return (FALSE);
1055*0Sstevel@tonic-gate return (TRUE);
1056*0Sstevel@tonic-gate }
1057*0Sstevel@tonic-gate
1058*0Sstevel@tonic-gate bool_t
xdr_COMMIT4resok(register XDR * xdrs,COMMIT4resok * objp)1059*0Sstevel@tonic-gate xdr_COMMIT4resok(register XDR *xdrs, COMMIT4resok *objp)
1060*0Sstevel@tonic-gate {
1061*0Sstevel@tonic-gate
1062*0Sstevel@tonic-gate if (!xdr_verifier4(xdrs, objp->writeverf))
1063*0Sstevel@tonic-gate return (FALSE);
1064*0Sstevel@tonic-gate return (TRUE);
1065*0Sstevel@tonic-gate }
1066*0Sstevel@tonic-gate
1067*0Sstevel@tonic-gate bool_t
xdr_COMMIT4res(register XDR * xdrs,COMMIT4res * objp)1068*0Sstevel@tonic-gate xdr_COMMIT4res(register XDR *xdrs, COMMIT4res *objp)
1069*0Sstevel@tonic-gate {
1070*0Sstevel@tonic-gate
1071*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1072*0Sstevel@tonic-gate return (FALSE);
1073*0Sstevel@tonic-gate switch (objp->status) {
1074*0Sstevel@tonic-gate case NFS4_OK:
1075*0Sstevel@tonic-gate if (!xdr_COMMIT4resok(xdrs, &objp->COMMIT4res_u.resok4))
1076*0Sstevel@tonic-gate return (FALSE);
1077*0Sstevel@tonic-gate break;
1078*0Sstevel@tonic-gate }
1079*0Sstevel@tonic-gate return (TRUE);
1080*0Sstevel@tonic-gate }
1081*0Sstevel@tonic-gate
1082*0Sstevel@tonic-gate bool_t
xdr_createtype4(register XDR * xdrs,createtype4 * objp)1083*0Sstevel@tonic-gate xdr_createtype4(register XDR *xdrs, createtype4 *objp)
1084*0Sstevel@tonic-gate {
1085*0Sstevel@tonic-gate
1086*0Sstevel@tonic-gate if (!xdr_nfs_ftype4(xdrs, &objp->type))
1087*0Sstevel@tonic-gate return (FALSE);
1088*0Sstevel@tonic-gate switch (objp->type) {
1089*0Sstevel@tonic-gate case NF4LNK:
1090*0Sstevel@tonic-gate if (!xdr_linktext4(xdrs, &objp->createtype4_u.linkdata))
1091*0Sstevel@tonic-gate return (FALSE);
1092*0Sstevel@tonic-gate break;
1093*0Sstevel@tonic-gate case NF4BLK:
1094*0Sstevel@tonic-gate case NF4CHR:
1095*0Sstevel@tonic-gate if (!xdr_specdata4(xdrs, &objp->createtype4_u.devdata))
1096*0Sstevel@tonic-gate return (FALSE);
1097*0Sstevel@tonic-gate break;
1098*0Sstevel@tonic-gate case NF4SOCK:
1099*0Sstevel@tonic-gate case NF4FIFO:
1100*0Sstevel@tonic-gate case NF4DIR:
1101*0Sstevel@tonic-gate break;
1102*0Sstevel@tonic-gate }
1103*0Sstevel@tonic-gate return (TRUE);
1104*0Sstevel@tonic-gate }
1105*0Sstevel@tonic-gate
1106*0Sstevel@tonic-gate bool_t
xdr_CREATE4args(register XDR * xdrs,CREATE4args * objp)1107*0Sstevel@tonic-gate xdr_CREATE4args(register XDR *xdrs, CREATE4args *objp)
1108*0Sstevel@tonic-gate {
1109*0Sstevel@tonic-gate
1110*0Sstevel@tonic-gate if (!xdr_createtype4(xdrs, &objp->objtype))
1111*0Sstevel@tonic-gate return (FALSE);
1112*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->objname))
1113*0Sstevel@tonic-gate return (FALSE);
1114*0Sstevel@tonic-gate if (!xdr_fattr4(xdrs, &objp->createattrs))
1115*0Sstevel@tonic-gate return (FALSE);
1116*0Sstevel@tonic-gate return (TRUE);
1117*0Sstevel@tonic-gate }
1118*0Sstevel@tonic-gate
1119*0Sstevel@tonic-gate bool_t
xdr_CREATE4resok(register XDR * xdrs,CREATE4resok * objp)1120*0Sstevel@tonic-gate xdr_CREATE4resok(register XDR *xdrs, CREATE4resok *objp)
1121*0Sstevel@tonic-gate {
1122*0Sstevel@tonic-gate
1123*0Sstevel@tonic-gate if (!xdr_change_info4(xdrs, &objp->cinfo))
1124*0Sstevel@tonic-gate return (FALSE);
1125*0Sstevel@tonic-gate if (!xdr_bitmap4(xdrs, &objp->attrset))
1126*0Sstevel@tonic-gate return (FALSE);
1127*0Sstevel@tonic-gate return (TRUE);
1128*0Sstevel@tonic-gate }
1129*0Sstevel@tonic-gate
1130*0Sstevel@tonic-gate bool_t
xdr_CREATE4res(register XDR * xdrs,CREATE4res * objp)1131*0Sstevel@tonic-gate xdr_CREATE4res(register XDR *xdrs, CREATE4res *objp)
1132*0Sstevel@tonic-gate {
1133*0Sstevel@tonic-gate
1134*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1135*0Sstevel@tonic-gate return (FALSE);
1136*0Sstevel@tonic-gate switch (objp->status) {
1137*0Sstevel@tonic-gate case NFS4_OK:
1138*0Sstevel@tonic-gate if (!xdr_CREATE4resok(xdrs, &objp->CREATE4res_u.resok4))
1139*0Sstevel@tonic-gate return (FALSE);
1140*0Sstevel@tonic-gate break;
1141*0Sstevel@tonic-gate }
1142*0Sstevel@tonic-gate return (TRUE);
1143*0Sstevel@tonic-gate }
1144*0Sstevel@tonic-gate
1145*0Sstevel@tonic-gate bool_t
xdr_DELEGPURGE4args(register XDR * xdrs,DELEGPURGE4args * objp)1146*0Sstevel@tonic-gate xdr_DELEGPURGE4args(register XDR *xdrs, DELEGPURGE4args *objp)
1147*0Sstevel@tonic-gate {
1148*0Sstevel@tonic-gate
1149*0Sstevel@tonic-gate if (!xdr_clientid4(xdrs, &objp->clientid))
1150*0Sstevel@tonic-gate return (FALSE);
1151*0Sstevel@tonic-gate return (TRUE);
1152*0Sstevel@tonic-gate }
1153*0Sstevel@tonic-gate
1154*0Sstevel@tonic-gate bool_t
xdr_DELEGPURGE4res(register XDR * xdrs,DELEGPURGE4res * objp)1155*0Sstevel@tonic-gate xdr_DELEGPURGE4res(register XDR *xdrs, DELEGPURGE4res *objp)
1156*0Sstevel@tonic-gate {
1157*0Sstevel@tonic-gate
1158*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1159*0Sstevel@tonic-gate return (FALSE);
1160*0Sstevel@tonic-gate return (TRUE);
1161*0Sstevel@tonic-gate }
1162*0Sstevel@tonic-gate
1163*0Sstevel@tonic-gate bool_t
xdr_DELEGRETURN4args(register XDR * xdrs,DELEGRETURN4args * objp)1164*0Sstevel@tonic-gate xdr_DELEGRETURN4args(register XDR *xdrs, DELEGRETURN4args *objp)
1165*0Sstevel@tonic-gate {
1166*0Sstevel@tonic-gate
1167*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->deleg_stateid))
1168*0Sstevel@tonic-gate return (FALSE);
1169*0Sstevel@tonic-gate return (TRUE);
1170*0Sstevel@tonic-gate }
1171*0Sstevel@tonic-gate
1172*0Sstevel@tonic-gate bool_t
xdr_DELEGRETURN4res(register XDR * xdrs,DELEGRETURN4res * objp)1173*0Sstevel@tonic-gate xdr_DELEGRETURN4res(register XDR *xdrs, DELEGRETURN4res *objp)
1174*0Sstevel@tonic-gate {
1175*0Sstevel@tonic-gate
1176*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1177*0Sstevel@tonic-gate return (FALSE);
1178*0Sstevel@tonic-gate return (TRUE);
1179*0Sstevel@tonic-gate }
1180*0Sstevel@tonic-gate
1181*0Sstevel@tonic-gate bool_t
xdr_GETATTR4args(register XDR * xdrs,GETATTR4args * objp)1182*0Sstevel@tonic-gate xdr_GETATTR4args(register XDR *xdrs, GETATTR4args *objp)
1183*0Sstevel@tonic-gate {
1184*0Sstevel@tonic-gate
1185*0Sstevel@tonic-gate if (!xdr_bitmap4(xdrs, &objp->attr_request))
1186*0Sstevel@tonic-gate return (FALSE);
1187*0Sstevel@tonic-gate return (TRUE);
1188*0Sstevel@tonic-gate }
1189*0Sstevel@tonic-gate
1190*0Sstevel@tonic-gate bool_t
xdr_GETATTR4resok(register XDR * xdrs,GETATTR4resok * objp)1191*0Sstevel@tonic-gate xdr_GETATTR4resok(register XDR *xdrs, GETATTR4resok *objp)
1192*0Sstevel@tonic-gate {
1193*0Sstevel@tonic-gate
1194*0Sstevel@tonic-gate if (!xdr_fattr4(xdrs, &objp->obj_attributes))
1195*0Sstevel@tonic-gate return (FALSE);
1196*0Sstevel@tonic-gate return (TRUE);
1197*0Sstevel@tonic-gate }
1198*0Sstevel@tonic-gate
1199*0Sstevel@tonic-gate bool_t
xdr_GETATTR4res(register XDR * xdrs,GETATTR4res * objp)1200*0Sstevel@tonic-gate xdr_GETATTR4res(register XDR *xdrs, GETATTR4res *objp)
1201*0Sstevel@tonic-gate {
1202*0Sstevel@tonic-gate
1203*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1204*0Sstevel@tonic-gate return (FALSE);
1205*0Sstevel@tonic-gate switch (objp->status) {
1206*0Sstevel@tonic-gate case NFS4_OK:
1207*0Sstevel@tonic-gate if (!xdr_GETATTR4resok(xdrs, &objp->GETATTR4res_u.resok4))
1208*0Sstevel@tonic-gate return (FALSE);
1209*0Sstevel@tonic-gate break;
1210*0Sstevel@tonic-gate }
1211*0Sstevel@tonic-gate return (TRUE);
1212*0Sstevel@tonic-gate }
1213*0Sstevel@tonic-gate
1214*0Sstevel@tonic-gate bool_t
xdr_GETFH4resok(register XDR * xdrs,GETFH4resok * objp)1215*0Sstevel@tonic-gate xdr_GETFH4resok(register XDR *xdrs, GETFH4resok *objp)
1216*0Sstevel@tonic-gate {
1217*0Sstevel@tonic-gate
1218*0Sstevel@tonic-gate if (!xdr_nfs_fh4(xdrs, &objp->object))
1219*0Sstevel@tonic-gate return (FALSE);
1220*0Sstevel@tonic-gate return (TRUE);
1221*0Sstevel@tonic-gate }
1222*0Sstevel@tonic-gate
1223*0Sstevel@tonic-gate bool_t
xdr_GETFH4res(register XDR * xdrs,GETFH4res * objp)1224*0Sstevel@tonic-gate xdr_GETFH4res(register XDR *xdrs, GETFH4res *objp)
1225*0Sstevel@tonic-gate {
1226*0Sstevel@tonic-gate
1227*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1228*0Sstevel@tonic-gate return (FALSE);
1229*0Sstevel@tonic-gate switch (objp->status) {
1230*0Sstevel@tonic-gate case NFS4_OK:
1231*0Sstevel@tonic-gate if (!xdr_GETFH4resok(xdrs, &objp->GETFH4res_u.resok4))
1232*0Sstevel@tonic-gate return (FALSE);
1233*0Sstevel@tonic-gate break;
1234*0Sstevel@tonic-gate }
1235*0Sstevel@tonic-gate return (TRUE);
1236*0Sstevel@tonic-gate }
1237*0Sstevel@tonic-gate
1238*0Sstevel@tonic-gate bool_t
xdr_LINK4args(register XDR * xdrs,LINK4args * objp)1239*0Sstevel@tonic-gate xdr_LINK4args(register XDR *xdrs, LINK4args *objp)
1240*0Sstevel@tonic-gate {
1241*0Sstevel@tonic-gate
1242*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->newname))
1243*0Sstevel@tonic-gate return (FALSE);
1244*0Sstevel@tonic-gate return (TRUE);
1245*0Sstevel@tonic-gate }
1246*0Sstevel@tonic-gate
1247*0Sstevel@tonic-gate bool_t
xdr_LINK4resok(register XDR * xdrs,LINK4resok * objp)1248*0Sstevel@tonic-gate xdr_LINK4resok(register XDR *xdrs, LINK4resok *objp)
1249*0Sstevel@tonic-gate {
1250*0Sstevel@tonic-gate
1251*0Sstevel@tonic-gate if (!xdr_change_info4(xdrs, &objp->cinfo))
1252*0Sstevel@tonic-gate return (FALSE);
1253*0Sstevel@tonic-gate return (TRUE);
1254*0Sstevel@tonic-gate }
1255*0Sstevel@tonic-gate
1256*0Sstevel@tonic-gate bool_t
xdr_LINK4res(register XDR * xdrs,LINK4res * objp)1257*0Sstevel@tonic-gate xdr_LINK4res(register XDR *xdrs, LINK4res *objp)
1258*0Sstevel@tonic-gate {
1259*0Sstevel@tonic-gate
1260*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1261*0Sstevel@tonic-gate return (FALSE);
1262*0Sstevel@tonic-gate switch (objp->status) {
1263*0Sstevel@tonic-gate case NFS4_OK:
1264*0Sstevel@tonic-gate if (!xdr_LINK4resok(xdrs, &objp->LINK4res_u.resok4))
1265*0Sstevel@tonic-gate return (FALSE);
1266*0Sstevel@tonic-gate break;
1267*0Sstevel@tonic-gate }
1268*0Sstevel@tonic-gate return (TRUE);
1269*0Sstevel@tonic-gate }
1270*0Sstevel@tonic-gate
1271*0Sstevel@tonic-gate bool_t
xdr_open_to_lock_owner4(register XDR * xdrs,open_to_lock_owner4 * objp)1272*0Sstevel@tonic-gate xdr_open_to_lock_owner4(register XDR *xdrs, open_to_lock_owner4 *objp)
1273*0Sstevel@tonic-gate {
1274*0Sstevel@tonic-gate
1275*0Sstevel@tonic-gate if (!xdr_seqid4(xdrs, &objp->open_seqid))
1276*0Sstevel@tonic-gate return (FALSE);
1277*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->open_stateid))
1278*0Sstevel@tonic-gate return (FALSE);
1279*0Sstevel@tonic-gate if (!xdr_seqid4(xdrs, &objp->lock_seqid))
1280*0Sstevel@tonic-gate return (FALSE);
1281*0Sstevel@tonic-gate if (!xdr_lock_owner4(xdrs, &objp->lock_owner))
1282*0Sstevel@tonic-gate return (FALSE);
1283*0Sstevel@tonic-gate return (TRUE);
1284*0Sstevel@tonic-gate }
1285*0Sstevel@tonic-gate
1286*0Sstevel@tonic-gate bool_t
xdr_exist_lock_owner4(register XDR * xdrs,exist_lock_owner4 * objp)1287*0Sstevel@tonic-gate xdr_exist_lock_owner4(register XDR *xdrs, exist_lock_owner4 *objp)
1288*0Sstevel@tonic-gate {
1289*0Sstevel@tonic-gate
1290*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->lock_stateid))
1291*0Sstevel@tonic-gate return (FALSE);
1292*0Sstevel@tonic-gate if (!xdr_seqid4(xdrs, &objp->lock_seqid))
1293*0Sstevel@tonic-gate return (FALSE);
1294*0Sstevel@tonic-gate return (TRUE);
1295*0Sstevel@tonic-gate }
1296*0Sstevel@tonic-gate
1297*0Sstevel@tonic-gate bool_t
xdr_locker4(register XDR * xdrs,locker4 * objp)1298*0Sstevel@tonic-gate xdr_locker4(register XDR *xdrs, locker4 *objp)
1299*0Sstevel@tonic-gate {
1300*0Sstevel@tonic-gate
1301*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->new_lock_owner))
1302*0Sstevel@tonic-gate return (FALSE);
1303*0Sstevel@tonic-gate switch (objp->new_lock_owner) {
1304*0Sstevel@tonic-gate case TRUE:
1305*0Sstevel@tonic-gate if (!xdr_open_to_lock_owner4(xdrs, &objp->locker4_u.open_owner))
1306*0Sstevel@tonic-gate return (FALSE);
1307*0Sstevel@tonic-gate break;
1308*0Sstevel@tonic-gate case FALSE:
1309*0Sstevel@tonic-gate if (!xdr_exist_lock_owner4(xdrs, &objp->locker4_u.lock_owner))
1310*0Sstevel@tonic-gate return (FALSE);
1311*0Sstevel@tonic-gate break;
1312*0Sstevel@tonic-gate default:
1313*0Sstevel@tonic-gate return (FALSE);
1314*0Sstevel@tonic-gate }
1315*0Sstevel@tonic-gate return (TRUE);
1316*0Sstevel@tonic-gate }
1317*0Sstevel@tonic-gate
1318*0Sstevel@tonic-gate bool_t
xdr_LOCK4args(register XDR * xdrs,LOCK4args * objp)1319*0Sstevel@tonic-gate xdr_LOCK4args(register XDR *xdrs, LOCK4args *objp)
1320*0Sstevel@tonic-gate {
1321*0Sstevel@tonic-gate
1322*0Sstevel@tonic-gate if (!xdr_nfs_lock_type4(xdrs, &objp->locktype))
1323*0Sstevel@tonic-gate return (FALSE);
1324*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->reclaim))
1325*0Sstevel@tonic-gate return (FALSE);
1326*0Sstevel@tonic-gate if (!xdr_offset4(xdrs, &objp->offset))
1327*0Sstevel@tonic-gate return (FALSE);
1328*0Sstevel@tonic-gate if (!xdr_length4(xdrs, &objp->length))
1329*0Sstevel@tonic-gate return (FALSE);
1330*0Sstevel@tonic-gate if (!xdr_locker4(xdrs, &objp->locker))
1331*0Sstevel@tonic-gate return (FALSE);
1332*0Sstevel@tonic-gate return (TRUE);
1333*0Sstevel@tonic-gate }
1334*0Sstevel@tonic-gate
1335*0Sstevel@tonic-gate bool_t
xdr_LOCK4denied(register XDR * xdrs,LOCK4denied * objp)1336*0Sstevel@tonic-gate xdr_LOCK4denied(register XDR *xdrs, LOCK4denied *objp)
1337*0Sstevel@tonic-gate {
1338*0Sstevel@tonic-gate
1339*0Sstevel@tonic-gate if (!xdr_offset4(xdrs, &objp->offset))
1340*0Sstevel@tonic-gate return (FALSE);
1341*0Sstevel@tonic-gate if (!xdr_length4(xdrs, &objp->length))
1342*0Sstevel@tonic-gate return (FALSE);
1343*0Sstevel@tonic-gate if (!xdr_nfs_lock_type4(xdrs, &objp->locktype))
1344*0Sstevel@tonic-gate return (FALSE);
1345*0Sstevel@tonic-gate if (!xdr_lock_owner4(xdrs, &objp->owner))
1346*0Sstevel@tonic-gate return (FALSE);
1347*0Sstevel@tonic-gate return (TRUE);
1348*0Sstevel@tonic-gate }
1349*0Sstevel@tonic-gate
1350*0Sstevel@tonic-gate bool_t
xdr_LOCK4resok(register XDR * xdrs,LOCK4resok * objp)1351*0Sstevel@tonic-gate xdr_LOCK4resok(register XDR *xdrs, LOCK4resok *objp)
1352*0Sstevel@tonic-gate {
1353*0Sstevel@tonic-gate
1354*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->lock_stateid))
1355*0Sstevel@tonic-gate return (FALSE);
1356*0Sstevel@tonic-gate return (TRUE);
1357*0Sstevel@tonic-gate }
1358*0Sstevel@tonic-gate
1359*0Sstevel@tonic-gate bool_t
xdr_LOCK4res(register XDR * xdrs,LOCK4res * objp)1360*0Sstevel@tonic-gate xdr_LOCK4res(register XDR *xdrs, LOCK4res *objp)
1361*0Sstevel@tonic-gate {
1362*0Sstevel@tonic-gate
1363*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1364*0Sstevel@tonic-gate return (FALSE);
1365*0Sstevel@tonic-gate switch (objp->status) {
1366*0Sstevel@tonic-gate case NFS4_OK:
1367*0Sstevel@tonic-gate if (!xdr_LOCK4resok(xdrs, &objp->LOCK4res_u.resok4))
1368*0Sstevel@tonic-gate return (FALSE);
1369*0Sstevel@tonic-gate break;
1370*0Sstevel@tonic-gate case NFS4ERR_DENIED:
1371*0Sstevel@tonic-gate if (!xdr_LOCK4denied(xdrs, &objp->LOCK4res_u.denied))
1372*0Sstevel@tonic-gate return (FALSE);
1373*0Sstevel@tonic-gate break;
1374*0Sstevel@tonic-gate }
1375*0Sstevel@tonic-gate return (TRUE);
1376*0Sstevel@tonic-gate }
1377*0Sstevel@tonic-gate
1378*0Sstevel@tonic-gate bool_t
xdr_LOCKT4args(register XDR * xdrs,LOCKT4args * objp)1379*0Sstevel@tonic-gate xdr_LOCKT4args(register XDR *xdrs, LOCKT4args *objp)
1380*0Sstevel@tonic-gate {
1381*0Sstevel@tonic-gate
1382*0Sstevel@tonic-gate if (!xdr_nfs_lock_type4(xdrs, &objp->locktype))
1383*0Sstevel@tonic-gate return (FALSE);
1384*0Sstevel@tonic-gate if (!xdr_offset4(xdrs, &objp->offset))
1385*0Sstevel@tonic-gate return (FALSE);
1386*0Sstevel@tonic-gate if (!xdr_length4(xdrs, &objp->length))
1387*0Sstevel@tonic-gate return (FALSE);
1388*0Sstevel@tonic-gate if (!xdr_lock_owner4(xdrs, &objp->owner))
1389*0Sstevel@tonic-gate return (FALSE);
1390*0Sstevel@tonic-gate return (TRUE);
1391*0Sstevel@tonic-gate }
1392*0Sstevel@tonic-gate
1393*0Sstevel@tonic-gate bool_t
xdr_LOCKT4res(register XDR * xdrs,LOCKT4res * objp)1394*0Sstevel@tonic-gate xdr_LOCKT4res(register XDR *xdrs, LOCKT4res *objp)
1395*0Sstevel@tonic-gate {
1396*0Sstevel@tonic-gate
1397*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1398*0Sstevel@tonic-gate return (FALSE);
1399*0Sstevel@tonic-gate switch (objp->status) {
1400*0Sstevel@tonic-gate case NFS4ERR_DENIED:
1401*0Sstevel@tonic-gate if (!xdr_LOCK4denied(xdrs, &objp->LOCKT4res_u.denied))
1402*0Sstevel@tonic-gate return (FALSE);
1403*0Sstevel@tonic-gate break;
1404*0Sstevel@tonic-gate case NFS4_OK:
1405*0Sstevel@tonic-gate break;
1406*0Sstevel@tonic-gate }
1407*0Sstevel@tonic-gate return (TRUE);
1408*0Sstevel@tonic-gate }
1409*0Sstevel@tonic-gate
1410*0Sstevel@tonic-gate bool_t
xdr_LOCKU4args(register XDR * xdrs,LOCKU4args * objp)1411*0Sstevel@tonic-gate xdr_LOCKU4args(register XDR *xdrs, LOCKU4args *objp)
1412*0Sstevel@tonic-gate {
1413*0Sstevel@tonic-gate
1414*0Sstevel@tonic-gate if (!xdr_nfs_lock_type4(xdrs, &objp->locktype))
1415*0Sstevel@tonic-gate return (FALSE);
1416*0Sstevel@tonic-gate if (!xdr_seqid4(xdrs, &objp->seqid))
1417*0Sstevel@tonic-gate return (FALSE);
1418*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->lock_stateid))
1419*0Sstevel@tonic-gate return (FALSE);
1420*0Sstevel@tonic-gate if (!xdr_offset4(xdrs, &objp->offset))
1421*0Sstevel@tonic-gate return (FALSE);
1422*0Sstevel@tonic-gate if (!xdr_length4(xdrs, &objp->length))
1423*0Sstevel@tonic-gate return (FALSE);
1424*0Sstevel@tonic-gate return (TRUE);
1425*0Sstevel@tonic-gate }
1426*0Sstevel@tonic-gate
1427*0Sstevel@tonic-gate bool_t
xdr_LOCKU4res(register XDR * xdrs,LOCKU4res * objp)1428*0Sstevel@tonic-gate xdr_LOCKU4res(register XDR *xdrs, LOCKU4res *objp)
1429*0Sstevel@tonic-gate {
1430*0Sstevel@tonic-gate
1431*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1432*0Sstevel@tonic-gate return (FALSE);
1433*0Sstevel@tonic-gate switch (objp->status) {
1434*0Sstevel@tonic-gate case NFS4_OK:
1435*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->LOCKU4res_u.lock_stateid))
1436*0Sstevel@tonic-gate return (FALSE);
1437*0Sstevel@tonic-gate break;
1438*0Sstevel@tonic-gate }
1439*0Sstevel@tonic-gate return (TRUE);
1440*0Sstevel@tonic-gate }
1441*0Sstevel@tonic-gate
1442*0Sstevel@tonic-gate bool_t
xdr_LOOKUP4args(register XDR * xdrs,LOOKUP4args * objp)1443*0Sstevel@tonic-gate xdr_LOOKUP4args(register XDR *xdrs, LOOKUP4args *objp)
1444*0Sstevel@tonic-gate {
1445*0Sstevel@tonic-gate
1446*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->objname))
1447*0Sstevel@tonic-gate return (FALSE);
1448*0Sstevel@tonic-gate return (TRUE);
1449*0Sstevel@tonic-gate }
1450*0Sstevel@tonic-gate
1451*0Sstevel@tonic-gate bool_t
xdr_LOOKUP4res(register XDR * xdrs,LOOKUP4res * objp)1452*0Sstevel@tonic-gate xdr_LOOKUP4res(register XDR *xdrs, LOOKUP4res *objp)
1453*0Sstevel@tonic-gate {
1454*0Sstevel@tonic-gate
1455*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1456*0Sstevel@tonic-gate return (FALSE);
1457*0Sstevel@tonic-gate return (TRUE);
1458*0Sstevel@tonic-gate }
1459*0Sstevel@tonic-gate
1460*0Sstevel@tonic-gate bool_t
xdr_LOOKUPP4res(register XDR * xdrs,LOOKUPP4res * objp)1461*0Sstevel@tonic-gate xdr_LOOKUPP4res(register XDR *xdrs, LOOKUPP4res *objp)
1462*0Sstevel@tonic-gate {
1463*0Sstevel@tonic-gate
1464*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1465*0Sstevel@tonic-gate return (FALSE);
1466*0Sstevel@tonic-gate return (TRUE);
1467*0Sstevel@tonic-gate }
1468*0Sstevel@tonic-gate
1469*0Sstevel@tonic-gate bool_t
xdr_NVERIFY4args(register XDR * xdrs,NVERIFY4args * objp)1470*0Sstevel@tonic-gate xdr_NVERIFY4args(register XDR *xdrs, NVERIFY4args *objp)
1471*0Sstevel@tonic-gate {
1472*0Sstevel@tonic-gate
1473*0Sstevel@tonic-gate if (!xdr_fattr4(xdrs, &objp->obj_attributes))
1474*0Sstevel@tonic-gate return (FALSE);
1475*0Sstevel@tonic-gate return (TRUE);
1476*0Sstevel@tonic-gate }
1477*0Sstevel@tonic-gate
1478*0Sstevel@tonic-gate bool_t
xdr_NVERIFY4res(register XDR * xdrs,NVERIFY4res * objp)1479*0Sstevel@tonic-gate xdr_NVERIFY4res(register XDR *xdrs, NVERIFY4res *objp)
1480*0Sstevel@tonic-gate {
1481*0Sstevel@tonic-gate
1482*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1483*0Sstevel@tonic-gate return (FALSE);
1484*0Sstevel@tonic-gate return (TRUE);
1485*0Sstevel@tonic-gate }
1486*0Sstevel@tonic-gate
1487*0Sstevel@tonic-gate bool_t
xdr_createmode4(register XDR * xdrs,createmode4 * objp)1488*0Sstevel@tonic-gate xdr_createmode4(register XDR *xdrs, createmode4 *objp)
1489*0Sstevel@tonic-gate {
1490*0Sstevel@tonic-gate
1491*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
1492*0Sstevel@tonic-gate return (FALSE);
1493*0Sstevel@tonic-gate return (TRUE);
1494*0Sstevel@tonic-gate }
1495*0Sstevel@tonic-gate
1496*0Sstevel@tonic-gate bool_t
xdr_createhow4(register XDR * xdrs,createhow4 * objp)1497*0Sstevel@tonic-gate xdr_createhow4(register XDR *xdrs, createhow4 *objp)
1498*0Sstevel@tonic-gate {
1499*0Sstevel@tonic-gate
1500*0Sstevel@tonic-gate if (!xdr_createmode4(xdrs, &objp->mode))
1501*0Sstevel@tonic-gate return (FALSE);
1502*0Sstevel@tonic-gate switch (objp->mode) {
1503*0Sstevel@tonic-gate case UNCHECKED4:
1504*0Sstevel@tonic-gate case GUARDED4:
1505*0Sstevel@tonic-gate if (!xdr_fattr4(xdrs, &objp->createhow4_u.createattrs))
1506*0Sstevel@tonic-gate return (FALSE);
1507*0Sstevel@tonic-gate break;
1508*0Sstevel@tonic-gate case EXCLUSIVE4:
1509*0Sstevel@tonic-gate if (!xdr_verifier4(xdrs, objp->createhow4_u.createverf))
1510*0Sstevel@tonic-gate return (FALSE);
1511*0Sstevel@tonic-gate break;
1512*0Sstevel@tonic-gate default:
1513*0Sstevel@tonic-gate return (FALSE);
1514*0Sstevel@tonic-gate }
1515*0Sstevel@tonic-gate return (TRUE);
1516*0Sstevel@tonic-gate }
1517*0Sstevel@tonic-gate
1518*0Sstevel@tonic-gate bool_t
xdr_opentype4(register XDR * xdrs,opentype4 * objp)1519*0Sstevel@tonic-gate xdr_opentype4(register XDR *xdrs, opentype4 *objp)
1520*0Sstevel@tonic-gate {
1521*0Sstevel@tonic-gate
1522*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
1523*0Sstevel@tonic-gate return (FALSE);
1524*0Sstevel@tonic-gate return (TRUE);
1525*0Sstevel@tonic-gate }
1526*0Sstevel@tonic-gate
1527*0Sstevel@tonic-gate bool_t
xdr_openflag4(register XDR * xdrs,openflag4 * objp)1528*0Sstevel@tonic-gate xdr_openflag4(register XDR *xdrs, openflag4 *objp)
1529*0Sstevel@tonic-gate {
1530*0Sstevel@tonic-gate
1531*0Sstevel@tonic-gate if (!xdr_opentype4(xdrs, &objp->opentype))
1532*0Sstevel@tonic-gate return (FALSE);
1533*0Sstevel@tonic-gate switch (objp->opentype) {
1534*0Sstevel@tonic-gate case OPEN4_CREATE:
1535*0Sstevel@tonic-gate if (!xdr_createhow4(xdrs, &objp->openflag4_u.how))
1536*0Sstevel@tonic-gate return (FALSE);
1537*0Sstevel@tonic-gate break;
1538*0Sstevel@tonic-gate }
1539*0Sstevel@tonic-gate return (TRUE);
1540*0Sstevel@tonic-gate }
1541*0Sstevel@tonic-gate
1542*0Sstevel@tonic-gate bool_t
xdr_limit_by4(register XDR * xdrs,limit_by4 * objp)1543*0Sstevel@tonic-gate xdr_limit_by4(register XDR *xdrs, limit_by4 *objp)
1544*0Sstevel@tonic-gate {
1545*0Sstevel@tonic-gate
1546*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
1547*0Sstevel@tonic-gate return (FALSE);
1548*0Sstevel@tonic-gate return (TRUE);
1549*0Sstevel@tonic-gate }
1550*0Sstevel@tonic-gate
1551*0Sstevel@tonic-gate bool_t
xdr_nfs_modified_limit4(register XDR * xdrs,nfs_modified_limit4 * objp)1552*0Sstevel@tonic-gate xdr_nfs_modified_limit4(register XDR *xdrs, nfs_modified_limit4 *objp)
1553*0Sstevel@tonic-gate {
1554*0Sstevel@tonic-gate
1555*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->num_blocks))
1556*0Sstevel@tonic-gate return (FALSE);
1557*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->bytes_per_block))
1558*0Sstevel@tonic-gate return (FALSE);
1559*0Sstevel@tonic-gate return (TRUE);
1560*0Sstevel@tonic-gate }
1561*0Sstevel@tonic-gate
1562*0Sstevel@tonic-gate bool_t
xdr_nfs_space_limit4(register XDR * xdrs,nfs_space_limit4 * objp)1563*0Sstevel@tonic-gate xdr_nfs_space_limit4(register XDR *xdrs, nfs_space_limit4 *objp)
1564*0Sstevel@tonic-gate {
1565*0Sstevel@tonic-gate
1566*0Sstevel@tonic-gate if (!xdr_limit_by4(xdrs, &objp->limitby))
1567*0Sstevel@tonic-gate return (FALSE);
1568*0Sstevel@tonic-gate switch (objp->limitby) {
1569*0Sstevel@tonic-gate case NFS_LIMIT_SIZE:
1570*0Sstevel@tonic-gate if (!xdr_uint64_t(xdrs, &objp->nfs_space_limit4_u.filesize))
1571*0Sstevel@tonic-gate return (FALSE);
1572*0Sstevel@tonic-gate break;
1573*0Sstevel@tonic-gate case NFS_LIMIT_BLOCKS:
1574*0Sstevel@tonic-gate if (!xdr_nfs_modified_limit4(xdrs, &objp->nfs_space_limit4_u.
1575*0Sstevel@tonic-gate mod_blocks))
1576*0Sstevel@tonic-gate return (FALSE);
1577*0Sstevel@tonic-gate break;
1578*0Sstevel@tonic-gate default:
1579*0Sstevel@tonic-gate return (FALSE);
1580*0Sstevel@tonic-gate }
1581*0Sstevel@tonic-gate return (TRUE);
1582*0Sstevel@tonic-gate }
1583*0Sstevel@tonic-gate
1584*0Sstevel@tonic-gate bool_t
xdr_open_delegation_type4(register XDR * xdrs,open_delegation_type4 * objp)1585*0Sstevel@tonic-gate xdr_open_delegation_type4(register XDR *xdrs, open_delegation_type4 *objp)
1586*0Sstevel@tonic-gate {
1587*0Sstevel@tonic-gate
1588*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
1589*0Sstevel@tonic-gate return (FALSE);
1590*0Sstevel@tonic-gate return (TRUE);
1591*0Sstevel@tonic-gate }
1592*0Sstevel@tonic-gate
1593*0Sstevel@tonic-gate bool_t
xdr_open_claim_type4(register XDR * xdrs,open_claim_type4 * objp)1594*0Sstevel@tonic-gate xdr_open_claim_type4(register XDR *xdrs, open_claim_type4 *objp)
1595*0Sstevel@tonic-gate {
1596*0Sstevel@tonic-gate
1597*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
1598*0Sstevel@tonic-gate return (FALSE);
1599*0Sstevel@tonic-gate return (TRUE);
1600*0Sstevel@tonic-gate }
1601*0Sstevel@tonic-gate
1602*0Sstevel@tonic-gate bool_t
xdr_open_claim_delegate_cur4(register XDR * xdrs,open_claim_delegate_cur4 * objp)1603*0Sstevel@tonic-gate xdr_open_claim_delegate_cur4(register XDR *xdrs, open_claim_delegate_cur4 *objp)
1604*0Sstevel@tonic-gate {
1605*0Sstevel@tonic-gate
1606*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->delegate_stateid))
1607*0Sstevel@tonic-gate return (FALSE);
1608*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->file))
1609*0Sstevel@tonic-gate return (FALSE);
1610*0Sstevel@tonic-gate return (TRUE);
1611*0Sstevel@tonic-gate }
1612*0Sstevel@tonic-gate
1613*0Sstevel@tonic-gate bool_t
xdr_open_claim4(register XDR * xdrs,open_claim4 * objp)1614*0Sstevel@tonic-gate xdr_open_claim4(register XDR *xdrs, open_claim4 *objp)
1615*0Sstevel@tonic-gate {
1616*0Sstevel@tonic-gate
1617*0Sstevel@tonic-gate if (!xdr_open_claim_type4(xdrs, &objp->claim))
1618*0Sstevel@tonic-gate return (FALSE);
1619*0Sstevel@tonic-gate switch (objp->claim) {
1620*0Sstevel@tonic-gate case CLAIM_NULL:
1621*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->open_claim4_u.file))
1622*0Sstevel@tonic-gate return (FALSE);
1623*0Sstevel@tonic-gate break;
1624*0Sstevel@tonic-gate case CLAIM_PREVIOUS:
1625*0Sstevel@tonic-gate if (!xdr_open_delegation_type4(xdrs, &objp->open_claim4_u.
1626*0Sstevel@tonic-gate delegate_type))
1627*0Sstevel@tonic-gate return (FALSE);
1628*0Sstevel@tonic-gate break;
1629*0Sstevel@tonic-gate case CLAIM_DELEGATE_CUR:
1630*0Sstevel@tonic-gate if (!xdr_open_claim_delegate_cur4(xdrs, &objp->open_claim4_u.
1631*0Sstevel@tonic-gate delegate_cur_info))
1632*0Sstevel@tonic-gate return (FALSE);
1633*0Sstevel@tonic-gate break;
1634*0Sstevel@tonic-gate case CLAIM_DELEGATE_PREV:
1635*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->open_claim4_u.
1636*0Sstevel@tonic-gate file_delegate_prev))
1637*0Sstevel@tonic-gate return (FALSE);
1638*0Sstevel@tonic-gate break;
1639*0Sstevel@tonic-gate default:
1640*0Sstevel@tonic-gate return (FALSE);
1641*0Sstevel@tonic-gate }
1642*0Sstevel@tonic-gate return (TRUE);
1643*0Sstevel@tonic-gate }
1644*0Sstevel@tonic-gate
1645*0Sstevel@tonic-gate bool_t
xdr_OPEN4args(register XDR * xdrs,OPEN4args * objp)1646*0Sstevel@tonic-gate xdr_OPEN4args(register XDR *xdrs, OPEN4args *objp)
1647*0Sstevel@tonic-gate {
1648*0Sstevel@tonic-gate
1649*0Sstevel@tonic-gate if (!xdr_seqid4(xdrs, &objp->seqid))
1650*0Sstevel@tonic-gate return (FALSE);
1651*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->share_access))
1652*0Sstevel@tonic-gate return (FALSE);
1653*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->share_deny))
1654*0Sstevel@tonic-gate return (FALSE);
1655*0Sstevel@tonic-gate if (!xdr_open_owner4(xdrs, &objp->owner))
1656*0Sstevel@tonic-gate return (FALSE);
1657*0Sstevel@tonic-gate if (!xdr_openflag4(xdrs, &objp->openhow))
1658*0Sstevel@tonic-gate return (FALSE);
1659*0Sstevel@tonic-gate if (!xdr_open_claim4(xdrs, &objp->claim))
1660*0Sstevel@tonic-gate return (FALSE);
1661*0Sstevel@tonic-gate return (TRUE);
1662*0Sstevel@tonic-gate }
1663*0Sstevel@tonic-gate
1664*0Sstevel@tonic-gate bool_t
xdr_open_read_delegation4(register XDR * xdrs,open_read_delegation4 * objp)1665*0Sstevel@tonic-gate xdr_open_read_delegation4(register XDR *xdrs, open_read_delegation4 *objp)
1666*0Sstevel@tonic-gate {
1667*0Sstevel@tonic-gate
1668*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->stateid))
1669*0Sstevel@tonic-gate return (FALSE);
1670*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->recall))
1671*0Sstevel@tonic-gate return (FALSE);
1672*0Sstevel@tonic-gate if (!xdr_nfsace4(xdrs, &objp->permissions))
1673*0Sstevel@tonic-gate return (FALSE);
1674*0Sstevel@tonic-gate return (TRUE);
1675*0Sstevel@tonic-gate }
1676*0Sstevel@tonic-gate
1677*0Sstevel@tonic-gate bool_t
xdr_open_write_delegation4(register XDR * xdrs,open_write_delegation4 * objp)1678*0Sstevel@tonic-gate xdr_open_write_delegation4(register XDR *xdrs, open_write_delegation4 *objp)
1679*0Sstevel@tonic-gate {
1680*0Sstevel@tonic-gate
1681*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->stateid))
1682*0Sstevel@tonic-gate return (FALSE);
1683*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->recall))
1684*0Sstevel@tonic-gate return (FALSE);
1685*0Sstevel@tonic-gate if (!xdr_nfs_space_limit4(xdrs, &objp->space_limit))
1686*0Sstevel@tonic-gate return (FALSE);
1687*0Sstevel@tonic-gate if (!xdr_nfsace4(xdrs, &objp->permissions))
1688*0Sstevel@tonic-gate return (FALSE);
1689*0Sstevel@tonic-gate return (TRUE);
1690*0Sstevel@tonic-gate }
1691*0Sstevel@tonic-gate
1692*0Sstevel@tonic-gate bool_t
xdr_open_delegation4(register XDR * xdrs,open_delegation4 * objp)1693*0Sstevel@tonic-gate xdr_open_delegation4(register XDR *xdrs, open_delegation4 *objp)
1694*0Sstevel@tonic-gate {
1695*0Sstevel@tonic-gate
1696*0Sstevel@tonic-gate if (!xdr_open_delegation_type4(xdrs, &objp->delegation_type))
1697*0Sstevel@tonic-gate return (FALSE);
1698*0Sstevel@tonic-gate switch (objp->delegation_type) {
1699*0Sstevel@tonic-gate case OPEN_DELEGATE_NONE:
1700*0Sstevel@tonic-gate break;
1701*0Sstevel@tonic-gate case OPEN_DELEGATE_READ:
1702*0Sstevel@tonic-gate if (!xdr_open_read_delegation4(xdrs, &objp->open_delegation4_u.
1703*0Sstevel@tonic-gate read))
1704*0Sstevel@tonic-gate return (FALSE);
1705*0Sstevel@tonic-gate break;
1706*0Sstevel@tonic-gate case OPEN_DELEGATE_WRITE:
1707*0Sstevel@tonic-gate if (!xdr_open_write_delegation4(xdrs, &objp->open_delegation4_u.
1708*0Sstevel@tonic-gate write))
1709*0Sstevel@tonic-gate return (FALSE);
1710*0Sstevel@tonic-gate break;
1711*0Sstevel@tonic-gate default:
1712*0Sstevel@tonic-gate return (FALSE);
1713*0Sstevel@tonic-gate }
1714*0Sstevel@tonic-gate return (TRUE);
1715*0Sstevel@tonic-gate }
1716*0Sstevel@tonic-gate
1717*0Sstevel@tonic-gate bool_t
xdr_OPEN4resok(register XDR * xdrs,OPEN4resok * objp)1718*0Sstevel@tonic-gate xdr_OPEN4resok(register XDR *xdrs, OPEN4resok *objp)
1719*0Sstevel@tonic-gate {
1720*0Sstevel@tonic-gate
1721*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->stateid))
1722*0Sstevel@tonic-gate return (FALSE);
1723*0Sstevel@tonic-gate if (!xdr_change_info4(xdrs, &objp->cinfo))
1724*0Sstevel@tonic-gate return (FALSE);
1725*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->rflags))
1726*0Sstevel@tonic-gate return (FALSE);
1727*0Sstevel@tonic-gate if (!xdr_bitmap4(xdrs, &objp->attrset))
1728*0Sstevel@tonic-gate return (FALSE);
1729*0Sstevel@tonic-gate if (!xdr_open_delegation4(xdrs, &objp->delegation))
1730*0Sstevel@tonic-gate return (FALSE);
1731*0Sstevel@tonic-gate return (TRUE);
1732*0Sstevel@tonic-gate }
1733*0Sstevel@tonic-gate
1734*0Sstevel@tonic-gate bool_t
xdr_OPEN4res(register XDR * xdrs,OPEN4res * objp)1735*0Sstevel@tonic-gate xdr_OPEN4res(register XDR *xdrs, OPEN4res *objp)
1736*0Sstevel@tonic-gate {
1737*0Sstevel@tonic-gate
1738*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1739*0Sstevel@tonic-gate return (FALSE);
1740*0Sstevel@tonic-gate switch (objp->status) {
1741*0Sstevel@tonic-gate case NFS4_OK:
1742*0Sstevel@tonic-gate if (!xdr_OPEN4resok(xdrs, &objp->OPEN4res_u.resok4))
1743*0Sstevel@tonic-gate return (FALSE);
1744*0Sstevel@tonic-gate break;
1745*0Sstevel@tonic-gate }
1746*0Sstevel@tonic-gate return (TRUE);
1747*0Sstevel@tonic-gate }
1748*0Sstevel@tonic-gate
1749*0Sstevel@tonic-gate bool_t
xdr_OPENATTR4args(register XDR * xdrs,OPENATTR4args * objp)1750*0Sstevel@tonic-gate xdr_OPENATTR4args(register XDR *xdrs, OPENATTR4args *objp)
1751*0Sstevel@tonic-gate {
1752*0Sstevel@tonic-gate
1753*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->createdir))
1754*0Sstevel@tonic-gate return (FALSE);
1755*0Sstevel@tonic-gate return (TRUE);
1756*0Sstevel@tonic-gate }
1757*0Sstevel@tonic-gate
1758*0Sstevel@tonic-gate bool_t
xdr_OPENATTR4res(register XDR * xdrs,OPENATTR4res * objp)1759*0Sstevel@tonic-gate xdr_OPENATTR4res(register XDR *xdrs, OPENATTR4res *objp)
1760*0Sstevel@tonic-gate {
1761*0Sstevel@tonic-gate
1762*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1763*0Sstevel@tonic-gate return (FALSE);
1764*0Sstevel@tonic-gate return (TRUE);
1765*0Sstevel@tonic-gate }
1766*0Sstevel@tonic-gate
1767*0Sstevel@tonic-gate bool_t
xdr_OPEN_CONFIRM4args(register XDR * xdrs,OPEN_CONFIRM4args * objp)1768*0Sstevel@tonic-gate xdr_OPEN_CONFIRM4args(register XDR *xdrs, OPEN_CONFIRM4args *objp)
1769*0Sstevel@tonic-gate {
1770*0Sstevel@tonic-gate
1771*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->open_stateid))
1772*0Sstevel@tonic-gate return (FALSE);
1773*0Sstevel@tonic-gate if (!xdr_seqid4(xdrs, &objp->seqid))
1774*0Sstevel@tonic-gate return (FALSE);
1775*0Sstevel@tonic-gate return (TRUE);
1776*0Sstevel@tonic-gate }
1777*0Sstevel@tonic-gate
1778*0Sstevel@tonic-gate bool_t
xdr_OPEN_CONFIRM4resok(register XDR * xdrs,OPEN_CONFIRM4resok * objp)1779*0Sstevel@tonic-gate xdr_OPEN_CONFIRM4resok(register XDR *xdrs, OPEN_CONFIRM4resok *objp)
1780*0Sstevel@tonic-gate {
1781*0Sstevel@tonic-gate
1782*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->open_stateid))
1783*0Sstevel@tonic-gate return (FALSE);
1784*0Sstevel@tonic-gate return (TRUE);
1785*0Sstevel@tonic-gate }
1786*0Sstevel@tonic-gate
1787*0Sstevel@tonic-gate bool_t
xdr_OPEN_CONFIRM4res(register XDR * xdrs,OPEN_CONFIRM4res * objp)1788*0Sstevel@tonic-gate xdr_OPEN_CONFIRM4res(register XDR *xdrs, OPEN_CONFIRM4res *objp)
1789*0Sstevel@tonic-gate {
1790*0Sstevel@tonic-gate
1791*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1792*0Sstevel@tonic-gate return (FALSE);
1793*0Sstevel@tonic-gate switch (objp->status) {
1794*0Sstevel@tonic-gate case NFS4_OK:
1795*0Sstevel@tonic-gate if (!xdr_OPEN_CONFIRM4resok(xdrs, &objp->OPEN_CONFIRM4res_u.
1796*0Sstevel@tonic-gate resok4))
1797*0Sstevel@tonic-gate return (FALSE);
1798*0Sstevel@tonic-gate break;
1799*0Sstevel@tonic-gate }
1800*0Sstevel@tonic-gate return (TRUE);
1801*0Sstevel@tonic-gate }
1802*0Sstevel@tonic-gate
1803*0Sstevel@tonic-gate bool_t
xdr_OPEN_DOWNGRADE4args(register XDR * xdrs,OPEN_DOWNGRADE4args * objp)1804*0Sstevel@tonic-gate xdr_OPEN_DOWNGRADE4args(register XDR *xdrs, OPEN_DOWNGRADE4args *objp)
1805*0Sstevel@tonic-gate {
1806*0Sstevel@tonic-gate
1807*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->open_stateid))
1808*0Sstevel@tonic-gate return (FALSE);
1809*0Sstevel@tonic-gate if (!xdr_seqid4(xdrs, &objp->seqid))
1810*0Sstevel@tonic-gate return (FALSE);
1811*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->share_access))
1812*0Sstevel@tonic-gate return (FALSE);
1813*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->share_deny))
1814*0Sstevel@tonic-gate return (FALSE);
1815*0Sstevel@tonic-gate return (TRUE);
1816*0Sstevel@tonic-gate }
1817*0Sstevel@tonic-gate
1818*0Sstevel@tonic-gate bool_t
xdr_OPEN_DOWNGRADE4resok(register XDR * xdrs,OPEN_DOWNGRADE4resok * objp)1819*0Sstevel@tonic-gate xdr_OPEN_DOWNGRADE4resok(register XDR *xdrs, OPEN_DOWNGRADE4resok *objp)
1820*0Sstevel@tonic-gate {
1821*0Sstevel@tonic-gate
1822*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->open_stateid))
1823*0Sstevel@tonic-gate return (FALSE);
1824*0Sstevel@tonic-gate return (TRUE);
1825*0Sstevel@tonic-gate }
1826*0Sstevel@tonic-gate
1827*0Sstevel@tonic-gate bool_t
xdr_OPEN_DOWNGRADE4res(register XDR * xdrs,OPEN_DOWNGRADE4res * objp)1828*0Sstevel@tonic-gate xdr_OPEN_DOWNGRADE4res(register XDR *xdrs, OPEN_DOWNGRADE4res *objp)
1829*0Sstevel@tonic-gate {
1830*0Sstevel@tonic-gate
1831*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1832*0Sstevel@tonic-gate return (FALSE);
1833*0Sstevel@tonic-gate switch (objp->status) {
1834*0Sstevel@tonic-gate case NFS4_OK:
1835*0Sstevel@tonic-gate if (!xdr_OPEN_DOWNGRADE4resok(xdrs, &objp->OPEN_DOWNGRADE4res_u.
1836*0Sstevel@tonic-gate resok4))
1837*0Sstevel@tonic-gate return (FALSE);
1838*0Sstevel@tonic-gate break;
1839*0Sstevel@tonic-gate }
1840*0Sstevel@tonic-gate return (TRUE);
1841*0Sstevel@tonic-gate }
1842*0Sstevel@tonic-gate
1843*0Sstevel@tonic-gate bool_t
xdr_PUTFH4args(register XDR * xdrs,PUTFH4args * objp)1844*0Sstevel@tonic-gate xdr_PUTFH4args(register XDR *xdrs, PUTFH4args *objp)
1845*0Sstevel@tonic-gate {
1846*0Sstevel@tonic-gate
1847*0Sstevel@tonic-gate if (!xdr_nfs_fh4(xdrs, &objp->object))
1848*0Sstevel@tonic-gate return (FALSE);
1849*0Sstevel@tonic-gate return (TRUE);
1850*0Sstevel@tonic-gate }
1851*0Sstevel@tonic-gate
1852*0Sstevel@tonic-gate bool_t
xdr_PUTFH4res(register XDR * xdrs,PUTFH4res * objp)1853*0Sstevel@tonic-gate xdr_PUTFH4res(register XDR *xdrs, PUTFH4res *objp)
1854*0Sstevel@tonic-gate {
1855*0Sstevel@tonic-gate
1856*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1857*0Sstevel@tonic-gate return (FALSE);
1858*0Sstevel@tonic-gate return (TRUE);
1859*0Sstevel@tonic-gate }
1860*0Sstevel@tonic-gate
1861*0Sstevel@tonic-gate bool_t
xdr_PUTPUBFH4res(register XDR * xdrs,PUTPUBFH4res * objp)1862*0Sstevel@tonic-gate xdr_PUTPUBFH4res(register XDR *xdrs, PUTPUBFH4res *objp)
1863*0Sstevel@tonic-gate {
1864*0Sstevel@tonic-gate
1865*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1866*0Sstevel@tonic-gate return (FALSE);
1867*0Sstevel@tonic-gate return (TRUE);
1868*0Sstevel@tonic-gate }
1869*0Sstevel@tonic-gate
1870*0Sstevel@tonic-gate bool_t
xdr_PUTROOTFH4res(register XDR * xdrs,PUTROOTFH4res * objp)1871*0Sstevel@tonic-gate xdr_PUTROOTFH4res(register XDR *xdrs, PUTROOTFH4res *objp)
1872*0Sstevel@tonic-gate {
1873*0Sstevel@tonic-gate
1874*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1875*0Sstevel@tonic-gate return (FALSE);
1876*0Sstevel@tonic-gate return (TRUE);
1877*0Sstevel@tonic-gate }
1878*0Sstevel@tonic-gate
1879*0Sstevel@tonic-gate bool_t
xdr_READ4args(register XDR * xdrs,READ4args * objp)1880*0Sstevel@tonic-gate xdr_READ4args(register XDR *xdrs, READ4args *objp)
1881*0Sstevel@tonic-gate {
1882*0Sstevel@tonic-gate
1883*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->stateid))
1884*0Sstevel@tonic-gate return (FALSE);
1885*0Sstevel@tonic-gate if (!xdr_offset4(xdrs, &objp->offset))
1886*0Sstevel@tonic-gate return (FALSE);
1887*0Sstevel@tonic-gate if (!xdr_count4(xdrs, &objp->count))
1888*0Sstevel@tonic-gate return (FALSE);
1889*0Sstevel@tonic-gate return (TRUE);
1890*0Sstevel@tonic-gate }
1891*0Sstevel@tonic-gate
1892*0Sstevel@tonic-gate bool_t
xdr_READ4resok(register XDR * xdrs,READ4resok * objp)1893*0Sstevel@tonic-gate xdr_READ4resok(register XDR *xdrs, READ4resok *objp)
1894*0Sstevel@tonic-gate {
1895*0Sstevel@tonic-gate
1896*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->eof))
1897*0Sstevel@tonic-gate return (FALSE);
1898*0Sstevel@tonic-gate
1899*0Sstevel@tonic-gate #ifdef IGNORE_RDWR_DATA
1900*0Sstevel@tonic-gate /*
1901*0Sstevel@tonic-gate * Try to get length of read, and if that
1902*0Sstevel@tonic-gate * fails, default to 0. Don't return FALSE
1903*0Sstevel@tonic-gate * because the other read info will not be
1904*0Sstevel@tonic-gate * displayed.
1905*0Sstevel@tonic-gate */
1906*0Sstevel@tonic-gate objp->data.data_val = NULL;
1907*0Sstevel@tonic-gate if (!xdr_u_int(xdrs, &objp->data.data_len))
1908*0Sstevel@tonic-gate objp->data.data_len = 0;
1909*0Sstevel@tonic-gate nfs4_skip_bytes = objp->data.data_len;
1910*0Sstevel@tonic-gate #else
1911*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->data.data_val,
1912*0Sstevel@tonic-gate (uint_t *)&objp->data.data_len, ~0))
1913*0Sstevel@tonic-gate return (FALSE);
1914*0Sstevel@tonic-gate #endif
1915*0Sstevel@tonic-gate return (TRUE);
1916*0Sstevel@tonic-gate }
1917*0Sstevel@tonic-gate
1918*0Sstevel@tonic-gate bool_t
xdr_READ4res(register XDR * xdrs,READ4res * objp)1919*0Sstevel@tonic-gate xdr_READ4res(register XDR *xdrs, READ4res *objp)
1920*0Sstevel@tonic-gate {
1921*0Sstevel@tonic-gate
1922*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
1923*0Sstevel@tonic-gate return (FALSE);
1924*0Sstevel@tonic-gate switch (objp->status) {
1925*0Sstevel@tonic-gate case NFS4_OK:
1926*0Sstevel@tonic-gate if (!xdr_READ4resok(xdrs, &objp->READ4res_u.resok4))
1927*0Sstevel@tonic-gate return (FALSE);
1928*0Sstevel@tonic-gate break;
1929*0Sstevel@tonic-gate }
1930*0Sstevel@tonic-gate return (TRUE);
1931*0Sstevel@tonic-gate }
1932*0Sstevel@tonic-gate
1933*0Sstevel@tonic-gate bool_t
xdr_READDIR4args(register XDR * xdrs,READDIR4args * objp)1934*0Sstevel@tonic-gate xdr_READDIR4args(register XDR *xdrs, READDIR4args *objp)
1935*0Sstevel@tonic-gate {
1936*0Sstevel@tonic-gate
1937*0Sstevel@tonic-gate if (!xdr_nfs_cookie4(xdrs, &objp->cookie))
1938*0Sstevel@tonic-gate return (FALSE);
1939*0Sstevel@tonic-gate if (!xdr_verifier4(xdrs, objp->cookieverf))
1940*0Sstevel@tonic-gate return (FALSE);
1941*0Sstevel@tonic-gate if (!xdr_count4(xdrs, &objp->dircount))
1942*0Sstevel@tonic-gate return (FALSE);
1943*0Sstevel@tonic-gate if (!xdr_count4(xdrs, &objp->maxcount))
1944*0Sstevel@tonic-gate return (FALSE);
1945*0Sstevel@tonic-gate if (!xdr_bitmap4(xdrs, &objp->attr_request))
1946*0Sstevel@tonic-gate return (FALSE);
1947*0Sstevel@tonic-gate return (TRUE);
1948*0Sstevel@tonic-gate }
1949*0Sstevel@tonic-gate
1950*0Sstevel@tonic-gate bool_t
xdr_entry4(register XDR * xdrs,entry4 * objp)1951*0Sstevel@tonic-gate xdr_entry4(register XDR *xdrs, entry4 *objp)
1952*0Sstevel@tonic-gate {
1953*0Sstevel@tonic-gate
1954*0Sstevel@tonic-gate entry4 *tmp_entry4;
1955*0Sstevel@tonic-gate bool_t more_data = TRUE;
1956*0Sstevel@tonic-gate bool_t first_objp = TRUE;
1957*0Sstevel@tonic-gate
1958*0Sstevel@tonic-gate while (more_data) {
1959*0Sstevel@tonic-gate
1960*0Sstevel@tonic-gate if (!xdr_nfs_cookie4(xdrs, &objp->cookie))
1961*0Sstevel@tonic-gate return (FALSE);
1962*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->name))
1963*0Sstevel@tonic-gate return (FALSE);
1964*0Sstevel@tonic-gate if (!xdr_fattr4(xdrs, &objp->attrs))
1965*0Sstevel@tonic-gate return (FALSE);
1966*0Sstevel@tonic-gate
1967*0Sstevel@tonic-gate if (xdrs->x_op == XDR_DECODE) {
1968*0Sstevel@tonic-gate
1969*0Sstevel@tonic-gate void bzero();
1970*0Sstevel@tonic-gate
1971*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &more_data))
1972*0Sstevel@tonic-gate return (FALSE);
1973*0Sstevel@tonic-gate
1974*0Sstevel@tonic-gate if (!more_data) {
1975*0Sstevel@tonic-gate objp->nextentry = NULL;
1976*0Sstevel@tonic-gate break;
1977*0Sstevel@tonic-gate }
1978*0Sstevel@tonic-gate
1979*0Sstevel@tonic-gate objp->nextentry = (entry4 *)
1980*0Sstevel@tonic-gate mem_alloc(sizeof (entry4));
1981*0Sstevel@tonic-gate if (objp->nextentry == NULL)
1982*0Sstevel@tonic-gate return (NULL);
1983*0Sstevel@tonic-gate bzero(objp->nextentry, sizeof (entry4));
1984*0Sstevel@tonic-gate objp = objp->nextentry;
1985*0Sstevel@tonic-gate
1986*0Sstevel@tonic-gate } else if (xdrs->x_op == XDR_ENCODE) {
1987*0Sstevel@tonic-gate objp = objp->nextentry;
1988*0Sstevel@tonic-gate if (!objp)
1989*0Sstevel@tonic-gate more_data = FALSE;
1990*0Sstevel@tonic-gate
1991*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &more_data))
1992*0Sstevel@tonic-gate return (FALSE);
1993*0Sstevel@tonic-gate } else {
1994*0Sstevel@tonic-gate tmp_entry4 = objp;
1995*0Sstevel@tonic-gate objp = objp->nextentry;
1996*0Sstevel@tonic-gate if (!objp)
1997*0Sstevel@tonic-gate more_data = FALSE;
1998*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &more_data))
1999*0Sstevel@tonic-gate return (FALSE);
2000*0Sstevel@tonic-gate if (!first_objp)
2001*0Sstevel@tonic-gate mem_free(tmp_entry4, sizeof (entry4));
2002*0Sstevel@tonic-gate else
2003*0Sstevel@tonic-gate first_objp = FALSE;
2004*0Sstevel@tonic-gate }
2005*0Sstevel@tonic-gate }
2006*0Sstevel@tonic-gate return (TRUE);
2007*0Sstevel@tonic-gate }
2008*0Sstevel@tonic-gate
2009*0Sstevel@tonic-gate bool_t
xdr_dirlist4(register XDR * xdrs,dirlist4 * objp)2010*0Sstevel@tonic-gate xdr_dirlist4(register XDR *xdrs, dirlist4 *objp)
2011*0Sstevel@tonic-gate {
2012*0Sstevel@tonic-gate
2013*0Sstevel@tonic-gate if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entry4),
2014*0Sstevel@tonic-gate (xdrproc_t)xdr_entry4))
2015*0Sstevel@tonic-gate return (FALSE);
2016*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->eof))
2017*0Sstevel@tonic-gate return (FALSE);
2018*0Sstevel@tonic-gate return (TRUE);
2019*0Sstevel@tonic-gate }
2020*0Sstevel@tonic-gate
2021*0Sstevel@tonic-gate bool_t
xdr_READDIR4resok(register XDR * xdrs,READDIR4resok * objp)2022*0Sstevel@tonic-gate xdr_READDIR4resok(register XDR *xdrs, READDIR4resok *objp)
2023*0Sstevel@tonic-gate {
2024*0Sstevel@tonic-gate
2025*0Sstevel@tonic-gate if (!xdr_verifier4(xdrs, objp->cookieverf))
2026*0Sstevel@tonic-gate return (FALSE);
2027*0Sstevel@tonic-gate if (!xdr_dirlist4(xdrs, &objp->reply))
2028*0Sstevel@tonic-gate return (FALSE);
2029*0Sstevel@tonic-gate return (TRUE);
2030*0Sstevel@tonic-gate }
2031*0Sstevel@tonic-gate
2032*0Sstevel@tonic-gate bool_t
xdr_READDIR4res(register XDR * xdrs,READDIR4res * objp)2033*0Sstevel@tonic-gate xdr_READDIR4res(register XDR *xdrs, READDIR4res *objp)
2034*0Sstevel@tonic-gate {
2035*0Sstevel@tonic-gate
2036*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2037*0Sstevel@tonic-gate return (FALSE);
2038*0Sstevel@tonic-gate switch (objp->status) {
2039*0Sstevel@tonic-gate case NFS4_OK:
2040*0Sstevel@tonic-gate if (!xdr_READDIR4resok(xdrs, &objp->READDIR4res_u.resok4))
2041*0Sstevel@tonic-gate return (FALSE);
2042*0Sstevel@tonic-gate break;
2043*0Sstevel@tonic-gate }
2044*0Sstevel@tonic-gate return (TRUE);
2045*0Sstevel@tonic-gate }
2046*0Sstevel@tonic-gate
2047*0Sstevel@tonic-gate bool_t
xdr_READLINK4resok(register XDR * xdrs,READLINK4resok * objp)2048*0Sstevel@tonic-gate xdr_READLINK4resok(register XDR *xdrs, READLINK4resok *objp)
2049*0Sstevel@tonic-gate {
2050*0Sstevel@tonic-gate
2051*0Sstevel@tonic-gate if (!xdr_linktext4(xdrs, &objp->link))
2052*0Sstevel@tonic-gate return (FALSE);
2053*0Sstevel@tonic-gate return (TRUE);
2054*0Sstevel@tonic-gate }
2055*0Sstevel@tonic-gate
2056*0Sstevel@tonic-gate bool_t
xdr_READLINK4res(register XDR * xdrs,READLINK4res * objp)2057*0Sstevel@tonic-gate xdr_READLINK4res(register XDR *xdrs, READLINK4res *objp)
2058*0Sstevel@tonic-gate {
2059*0Sstevel@tonic-gate
2060*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2061*0Sstevel@tonic-gate return (FALSE);
2062*0Sstevel@tonic-gate switch (objp->status) {
2063*0Sstevel@tonic-gate case NFS4_OK:
2064*0Sstevel@tonic-gate if (!xdr_READLINK4resok(xdrs, &objp->READLINK4res_u.resok4))
2065*0Sstevel@tonic-gate return (FALSE);
2066*0Sstevel@tonic-gate break;
2067*0Sstevel@tonic-gate }
2068*0Sstevel@tonic-gate return (TRUE);
2069*0Sstevel@tonic-gate }
2070*0Sstevel@tonic-gate
2071*0Sstevel@tonic-gate bool_t
xdr_REMOVE4args(register XDR * xdrs,REMOVE4args * objp)2072*0Sstevel@tonic-gate xdr_REMOVE4args(register XDR *xdrs, REMOVE4args *objp)
2073*0Sstevel@tonic-gate {
2074*0Sstevel@tonic-gate
2075*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->target))
2076*0Sstevel@tonic-gate return (FALSE);
2077*0Sstevel@tonic-gate return (TRUE);
2078*0Sstevel@tonic-gate }
2079*0Sstevel@tonic-gate
2080*0Sstevel@tonic-gate bool_t
xdr_REMOVE4resok(register XDR * xdrs,REMOVE4resok * objp)2081*0Sstevel@tonic-gate xdr_REMOVE4resok(register XDR *xdrs, REMOVE4resok *objp)
2082*0Sstevel@tonic-gate {
2083*0Sstevel@tonic-gate
2084*0Sstevel@tonic-gate if (!xdr_change_info4(xdrs, &objp->cinfo))
2085*0Sstevel@tonic-gate return (FALSE);
2086*0Sstevel@tonic-gate return (TRUE);
2087*0Sstevel@tonic-gate }
2088*0Sstevel@tonic-gate
2089*0Sstevel@tonic-gate bool_t
xdr_REMOVE4res(register XDR * xdrs,REMOVE4res * objp)2090*0Sstevel@tonic-gate xdr_REMOVE4res(register XDR *xdrs, REMOVE4res *objp)
2091*0Sstevel@tonic-gate {
2092*0Sstevel@tonic-gate
2093*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2094*0Sstevel@tonic-gate return (FALSE);
2095*0Sstevel@tonic-gate switch (objp->status) {
2096*0Sstevel@tonic-gate case NFS4_OK:
2097*0Sstevel@tonic-gate if (!xdr_REMOVE4resok(xdrs, &objp->REMOVE4res_u.resok4))
2098*0Sstevel@tonic-gate return (FALSE);
2099*0Sstevel@tonic-gate break;
2100*0Sstevel@tonic-gate }
2101*0Sstevel@tonic-gate return (TRUE);
2102*0Sstevel@tonic-gate }
2103*0Sstevel@tonic-gate
2104*0Sstevel@tonic-gate bool_t
xdr_RENAME4args(register XDR * xdrs,RENAME4args * objp)2105*0Sstevel@tonic-gate xdr_RENAME4args(register XDR *xdrs, RENAME4args *objp)
2106*0Sstevel@tonic-gate {
2107*0Sstevel@tonic-gate
2108*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->oldname))
2109*0Sstevel@tonic-gate return (FALSE);
2110*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->newname))
2111*0Sstevel@tonic-gate return (FALSE);
2112*0Sstevel@tonic-gate return (TRUE);
2113*0Sstevel@tonic-gate }
2114*0Sstevel@tonic-gate
2115*0Sstevel@tonic-gate bool_t
xdr_RENAME4resok(register XDR * xdrs,RENAME4resok * objp)2116*0Sstevel@tonic-gate xdr_RENAME4resok(register XDR *xdrs, RENAME4resok *objp)
2117*0Sstevel@tonic-gate {
2118*0Sstevel@tonic-gate
2119*0Sstevel@tonic-gate if (!xdr_change_info4(xdrs, &objp->source_cinfo))
2120*0Sstevel@tonic-gate return (FALSE);
2121*0Sstevel@tonic-gate if (!xdr_change_info4(xdrs, &objp->target_cinfo))
2122*0Sstevel@tonic-gate return (FALSE);
2123*0Sstevel@tonic-gate return (TRUE);
2124*0Sstevel@tonic-gate }
2125*0Sstevel@tonic-gate
2126*0Sstevel@tonic-gate bool_t
xdr_RENAME4res(register XDR * xdrs,RENAME4res * objp)2127*0Sstevel@tonic-gate xdr_RENAME4res(register XDR *xdrs, RENAME4res *objp)
2128*0Sstevel@tonic-gate {
2129*0Sstevel@tonic-gate
2130*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2131*0Sstevel@tonic-gate return (FALSE);
2132*0Sstevel@tonic-gate switch (objp->status) {
2133*0Sstevel@tonic-gate case NFS4_OK:
2134*0Sstevel@tonic-gate if (!xdr_RENAME4resok(xdrs, &objp->RENAME4res_u.resok4))
2135*0Sstevel@tonic-gate return (FALSE);
2136*0Sstevel@tonic-gate break;
2137*0Sstevel@tonic-gate }
2138*0Sstevel@tonic-gate return (TRUE);
2139*0Sstevel@tonic-gate }
2140*0Sstevel@tonic-gate
2141*0Sstevel@tonic-gate bool_t
xdr_RENEW4args(register XDR * xdrs,RENEW4args * objp)2142*0Sstevel@tonic-gate xdr_RENEW4args(register XDR *xdrs, RENEW4args *objp)
2143*0Sstevel@tonic-gate {
2144*0Sstevel@tonic-gate
2145*0Sstevel@tonic-gate if (!xdr_clientid4(xdrs, &objp->clientid))
2146*0Sstevel@tonic-gate return (FALSE);
2147*0Sstevel@tonic-gate return (TRUE);
2148*0Sstevel@tonic-gate }
2149*0Sstevel@tonic-gate
2150*0Sstevel@tonic-gate bool_t
xdr_RENEW4res(register XDR * xdrs,RENEW4res * objp)2151*0Sstevel@tonic-gate xdr_RENEW4res(register XDR *xdrs, RENEW4res *objp)
2152*0Sstevel@tonic-gate {
2153*0Sstevel@tonic-gate
2154*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2155*0Sstevel@tonic-gate return (FALSE);
2156*0Sstevel@tonic-gate return (TRUE);
2157*0Sstevel@tonic-gate }
2158*0Sstevel@tonic-gate
2159*0Sstevel@tonic-gate bool_t
xdr_RESTOREFH4res(register XDR * xdrs,RESTOREFH4res * objp)2160*0Sstevel@tonic-gate xdr_RESTOREFH4res(register XDR *xdrs, RESTOREFH4res *objp)
2161*0Sstevel@tonic-gate {
2162*0Sstevel@tonic-gate
2163*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2164*0Sstevel@tonic-gate return (FALSE);
2165*0Sstevel@tonic-gate return (TRUE);
2166*0Sstevel@tonic-gate }
2167*0Sstevel@tonic-gate
2168*0Sstevel@tonic-gate bool_t
xdr_SAVEFH4res(register XDR * xdrs,SAVEFH4res * objp)2169*0Sstevel@tonic-gate xdr_SAVEFH4res(register XDR *xdrs, SAVEFH4res *objp)
2170*0Sstevel@tonic-gate {
2171*0Sstevel@tonic-gate
2172*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2173*0Sstevel@tonic-gate return (FALSE);
2174*0Sstevel@tonic-gate return (TRUE);
2175*0Sstevel@tonic-gate }
2176*0Sstevel@tonic-gate
2177*0Sstevel@tonic-gate bool_t
xdr_SECINFO4args(register XDR * xdrs,SECINFO4args * objp)2178*0Sstevel@tonic-gate xdr_SECINFO4args(register XDR *xdrs, SECINFO4args *objp)
2179*0Sstevel@tonic-gate {
2180*0Sstevel@tonic-gate
2181*0Sstevel@tonic-gate if (!xdr_component4(xdrs, &objp->name))
2182*0Sstevel@tonic-gate return (FALSE);
2183*0Sstevel@tonic-gate return (TRUE);
2184*0Sstevel@tonic-gate }
2185*0Sstevel@tonic-gate
2186*0Sstevel@tonic-gate bool_t
xdr_rpc_gss_svc_t(register XDR * xdrs,rpc_gss_svc_t * objp)2187*0Sstevel@tonic-gate xdr_rpc_gss_svc_t(register XDR *xdrs, rpc_gss_svc_t *objp)
2188*0Sstevel@tonic-gate {
2189*0Sstevel@tonic-gate
2190*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
2191*0Sstevel@tonic-gate return (FALSE);
2192*0Sstevel@tonic-gate return (TRUE);
2193*0Sstevel@tonic-gate }
2194*0Sstevel@tonic-gate
2195*0Sstevel@tonic-gate bool_t
xdr_rpcsec_gss_info(register XDR * xdrs,rpcsec_gss_info * objp)2196*0Sstevel@tonic-gate xdr_rpcsec_gss_info(register XDR *xdrs, rpcsec_gss_info *objp)
2197*0Sstevel@tonic-gate {
2198*0Sstevel@tonic-gate
2199*0Sstevel@tonic-gate if (!xdr_sec_oid4(xdrs, &objp->oid))
2200*0Sstevel@tonic-gate return (FALSE);
2201*0Sstevel@tonic-gate if (!xdr_qop4(xdrs, &objp->qop))
2202*0Sstevel@tonic-gate return (FALSE);
2203*0Sstevel@tonic-gate if (!xdr_rpc_gss_svc_t(xdrs, &objp->service))
2204*0Sstevel@tonic-gate return (FALSE);
2205*0Sstevel@tonic-gate return (TRUE);
2206*0Sstevel@tonic-gate }
2207*0Sstevel@tonic-gate
2208*0Sstevel@tonic-gate bool_t
xdr_secinfo4(register XDR * xdrs,secinfo4 * objp)2209*0Sstevel@tonic-gate xdr_secinfo4(register XDR *xdrs, secinfo4 *objp)
2210*0Sstevel@tonic-gate {
2211*0Sstevel@tonic-gate
2212*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->flavor))
2213*0Sstevel@tonic-gate return (FALSE);
2214*0Sstevel@tonic-gate switch (objp->flavor) {
2215*0Sstevel@tonic-gate case RPCSEC_GSS:
2216*0Sstevel@tonic-gate if (!xdr_rpcsec_gss_info(xdrs, &objp->secinfo4_u.flavor_info))
2217*0Sstevel@tonic-gate return (FALSE);
2218*0Sstevel@tonic-gate break;
2219*0Sstevel@tonic-gate }
2220*0Sstevel@tonic-gate return (TRUE);
2221*0Sstevel@tonic-gate }
2222*0Sstevel@tonic-gate
2223*0Sstevel@tonic-gate bool_t
xdr_SECINFO4resok(register XDR * xdrs,SECINFO4resok * objp)2224*0Sstevel@tonic-gate xdr_SECINFO4resok(register XDR *xdrs, SECINFO4resok *objp)
2225*0Sstevel@tonic-gate {
2226*0Sstevel@tonic-gate
2227*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->SECINFO4resok_val,
2228*0Sstevel@tonic-gate (uint_t *)&objp->SECINFO4resok_len, ~0,
2229*0Sstevel@tonic-gate sizeof (secinfo4), (xdrproc_t)xdr_secinfo4))
2230*0Sstevel@tonic-gate return (FALSE);
2231*0Sstevel@tonic-gate return (TRUE);
2232*0Sstevel@tonic-gate }
2233*0Sstevel@tonic-gate
2234*0Sstevel@tonic-gate bool_t
xdr_SECINFO4res(register XDR * xdrs,SECINFO4res * objp)2235*0Sstevel@tonic-gate xdr_SECINFO4res(register XDR *xdrs, SECINFO4res *objp)
2236*0Sstevel@tonic-gate {
2237*0Sstevel@tonic-gate
2238*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2239*0Sstevel@tonic-gate return (FALSE);
2240*0Sstevel@tonic-gate switch (objp->status) {
2241*0Sstevel@tonic-gate case NFS4_OK:
2242*0Sstevel@tonic-gate if (!xdr_SECINFO4resok(xdrs, &objp->SECINFO4res_u.resok4))
2243*0Sstevel@tonic-gate return (FALSE);
2244*0Sstevel@tonic-gate break;
2245*0Sstevel@tonic-gate }
2246*0Sstevel@tonic-gate return (TRUE);
2247*0Sstevel@tonic-gate }
2248*0Sstevel@tonic-gate
2249*0Sstevel@tonic-gate bool_t
xdr_SETATTR4args(register XDR * xdrs,SETATTR4args * objp)2250*0Sstevel@tonic-gate xdr_SETATTR4args(register XDR *xdrs, SETATTR4args *objp)
2251*0Sstevel@tonic-gate {
2252*0Sstevel@tonic-gate
2253*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->stateid))
2254*0Sstevel@tonic-gate return (FALSE);
2255*0Sstevel@tonic-gate if (!xdr_fattr4(xdrs, &objp->obj_attributes))
2256*0Sstevel@tonic-gate return (FALSE);
2257*0Sstevel@tonic-gate return (TRUE);
2258*0Sstevel@tonic-gate }
2259*0Sstevel@tonic-gate
2260*0Sstevel@tonic-gate bool_t
xdr_SETATTR4res(register XDR * xdrs,SETATTR4res * objp)2261*0Sstevel@tonic-gate xdr_SETATTR4res(register XDR *xdrs, SETATTR4res *objp)
2262*0Sstevel@tonic-gate {
2263*0Sstevel@tonic-gate
2264*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2265*0Sstevel@tonic-gate return (FALSE);
2266*0Sstevel@tonic-gate if (!xdr_bitmap4(xdrs, &objp->attrsset))
2267*0Sstevel@tonic-gate return (FALSE);
2268*0Sstevel@tonic-gate return (TRUE);
2269*0Sstevel@tonic-gate }
2270*0Sstevel@tonic-gate
2271*0Sstevel@tonic-gate bool_t
xdr_SETCLIENTID4args(register XDR * xdrs,SETCLIENTID4args * objp)2272*0Sstevel@tonic-gate xdr_SETCLIENTID4args(register XDR *xdrs, SETCLIENTID4args *objp)
2273*0Sstevel@tonic-gate {
2274*0Sstevel@tonic-gate
2275*0Sstevel@tonic-gate if (!xdr_nfs_client_id4(xdrs, &objp->client))
2276*0Sstevel@tonic-gate return (FALSE);
2277*0Sstevel@tonic-gate if (!xdr_cb_client4(xdrs, &objp->callback))
2278*0Sstevel@tonic-gate return (FALSE);
2279*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->callback_ident))
2280*0Sstevel@tonic-gate return (FALSE);
2281*0Sstevel@tonic-gate return (TRUE);
2282*0Sstevel@tonic-gate }
2283*0Sstevel@tonic-gate
2284*0Sstevel@tonic-gate bool_t
xdr_SETCLIENTID4resok(register XDR * xdrs,SETCLIENTID4resok * objp)2285*0Sstevel@tonic-gate xdr_SETCLIENTID4resok(register XDR *xdrs, SETCLIENTID4resok *objp)
2286*0Sstevel@tonic-gate {
2287*0Sstevel@tonic-gate
2288*0Sstevel@tonic-gate if (!xdr_clientid4(xdrs, &objp->clientid))
2289*0Sstevel@tonic-gate return (FALSE);
2290*0Sstevel@tonic-gate if (!xdr_verifier4(xdrs, objp->setclientid_confirm))
2291*0Sstevel@tonic-gate return (FALSE);
2292*0Sstevel@tonic-gate return (TRUE);
2293*0Sstevel@tonic-gate }
2294*0Sstevel@tonic-gate
2295*0Sstevel@tonic-gate bool_t
xdr_SETCLIENTID4res(register XDR * xdrs,SETCLIENTID4res * objp)2296*0Sstevel@tonic-gate xdr_SETCLIENTID4res(register XDR *xdrs, SETCLIENTID4res *objp)
2297*0Sstevel@tonic-gate {
2298*0Sstevel@tonic-gate
2299*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2300*0Sstevel@tonic-gate return (FALSE);
2301*0Sstevel@tonic-gate switch (objp->status) {
2302*0Sstevel@tonic-gate case NFS4_OK:
2303*0Sstevel@tonic-gate if (!xdr_SETCLIENTID4resok(xdrs, &objp->SETCLIENTID4res_u.
2304*0Sstevel@tonic-gate resok4))
2305*0Sstevel@tonic-gate return (FALSE);
2306*0Sstevel@tonic-gate break;
2307*0Sstevel@tonic-gate case NFS4ERR_CLID_INUSE:
2308*0Sstevel@tonic-gate if (!xdr_clientaddr4(xdrs, &objp->SETCLIENTID4res_u.
2309*0Sstevel@tonic-gate client_using))
2310*0Sstevel@tonic-gate return (FALSE);
2311*0Sstevel@tonic-gate break;
2312*0Sstevel@tonic-gate }
2313*0Sstevel@tonic-gate return (TRUE);
2314*0Sstevel@tonic-gate }
2315*0Sstevel@tonic-gate
2316*0Sstevel@tonic-gate bool_t
xdr_SETCLIENTID_CONFIRM4args(register XDR * xdrs,SETCLIENTID_CONFIRM4args * objp)2317*0Sstevel@tonic-gate xdr_SETCLIENTID_CONFIRM4args(register XDR *xdrs, SETCLIENTID_CONFIRM4args *objp)
2318*0Sstevel@tonic-gate {
2319*0Sstevel@tonic-gate
2320*0Sstevel@tonic-gate if (!xdr_clientid4(xdrs, &objp->clientid))
2321*0Sstevel@tonic-gate return (FALSE);
2322*0Sstevel@tonic-gate if (!xdr_verifier4(xdrs, objp->setclientid_confirm))
2323*0Sstevel@tonic-gate return (FALSE);
2324*0Sstevel@tonic-gate return (TRUE);
2325*0Sstevel@tonic-gate }
2326*0Sstevel@tonic-gate
2327*0Sstevel@tonic-gate bool_t
xdr_SETCLIENTID_CONFIRM4res(register XDR * xdrs,SETCLIENTID_CONFIRM4res * objp)2328*0Sstevel@tonic-gate xdr_SETCLIENTID_CONFIRM4res(register XDR *xdrs, SETCLIENTID_CONFIRM4res *objp)
2329*0Sstevel@tonic-gate {
2330*0Sstevel@tonic-gate
2331*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2332*0Sstevel@tonic-gate return (FALSE);
2333*0Sstevel@tonic-gate return (TRUE);
2334*0Sstevel@tonic-gate }
2335*0Sstevel@tonic-gate
2336*0Sstevel@tonic-gate bool_t
xdr_VERIFY4args(register XDR * xdrs,VERIFY4args * objp)2337*0Sstevel@tonic-gate xdr_VERIFY4args(register XDR *xdrs, VERIFY4args *objp)
2338*0Sstevel@tonic-gate {
2339*0Sstevel@tonic-gate
2340*0Sstevel@tonic-gate if (!xdr_fattr4(xdrs, &objp->obj_attributes))
2341*0Sstevel@tonic-gate return (FALSE);
2342*0Sstevel@tonic-gate return (TRUE);
2343*0Sstevel@tonic-gate }
2344*0Sstevel@tonic-gate
2345*0Sstevel@tonic-gate bool_t
xdr_VERIFY4res(register XDR * xdrs,VERIFY4res * objp)2346*0Sstevel@tonic-gate xdr_VERIFY4res(register XDR *xdrs, VERIFY4res *objp)
2347*0Sstevel@tonic-gate {
2348*0Sstevel@tonic-gate
2349*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2350*0Sstevel@tonic-gate return (FALSE);
2351*0Sstevel@tonic-gate return (TRUE);
2352*0Sstevel@tonic-gate }
2353*0Sstevel@tonic-gate
2354*0Sstevel@tonic-gate bool_t
xdr_stable_how4(register XDR * xdrs,stable_how4 * objp)2355*0Sstevel@tonic-gate xdr_stable_how4(register XDR *xdrs, stable_how4 *objp)
2356*0Sstevel@tonic-gate {
2357*0Sstevel@tonic-gate
2358*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
2359*0Sstevel@tonic-gate return (FALSE);
2360*0Sstevel@tonic-gate return (TRUE);
2361*0Sstevel@tonic-gate }
2362*0Sstevel@tonic-gate
2363*0Sstevel@tonic-gate bool_t
xdr_WRITE4args(register XDR * xdrs,WRITE4args * objp)2364*0Sstevel@tonic-gate xdr_WRITE4args(register XDR *xdrs, WRITE4args *objp)
2365*0Sstevel@tonic-gate {
2366*0Sstevel@tonic-gate
2367*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->stateid))
2368*0Sstevel@tonic-gate return (FALSE);
2369*0Sstevel@tonic-gate if (!xdr_offset4(xdrs, &objp->offset))
2370*0Sstevel@tonic-gate return (FALSE);
2371*0Sstevel@tonic-gate if (!xdr_stable_how4(xdrs, &objp->stable))
2372*0Sstevel@tonic-gate return (FALSE);
2373*0Sstevel@tonic-gate
2374*0Sstevel@tonic-gate #ifdef IGNORE_RDWR_DATA
2375*0Sstevel@tonic-gate /*
2376*0Sstevel@tonic-gate * try to get length of write, and if that
2377*0Sstevel@tonic-gate * fails, default to 0. Don't return FALSE
2378*0Sstevel@tonic-gate * because the other write info will not be
2379*0Sstevel@tonic-gate * displayed (write stateid).
2380*0Sstevel@tonic-gate */
2381*0Sstevel@tonic-gate objp->data.data_val = NULL;
2382*0Sstevel@tonic-gate if (!xdr_u_int(xdrs, &objp->data.data_len))
2383*0Sstevel@tonic-gate objp->data.data_len = 0;
2384*0Sstevel@tonic-gate nfs4_skip_bytes = objp->data.data_len;
2385*0Sstevel@tonic-gate #else
2386*0Sstevel@tonic-gate if (!xdr_bytes(xdrs, (char **)&objp->data.data_val,
2387*0Sstevel@tonic-gate (uint_t *)&objp->data.data_len, ~0))
2388*0Sstevel@tonic-gate return (FALSE);
2389*0Sstevel@tonic-gate #endif
2390*0Sstevel@tonic-gate return (TRUE);
2391*0Sstevel@tonic-gate }
2392*0Sstevel@tonic-gate
2393*0Sstevel@tonic-gate bool_t
xdr_WRITE4resok(register XDR * xdrs,WRITE4resok * objp)2394*0Sstevel@tonic-gate xdr_WRITE4resok(register XDR *xdrs, WRITE4resok *objp)
2395*0Sstevel@tonic-gate {
2396*0Sstevel@tonic-gate
2397*0Sstevel@tonic-gate if (!xdr_count4(xdrs, &objp->count))
2398*0Sstevel@tonic-gate return (FALSE);
2399*0Sstevel@tonic-gate if (!xdr_stable_how4(xdrs, &objp->committed))
2400*0Sstevel@tonic-gate return (FALSE);
2401*0Sstevel@tonic-gate if (!xdr_verifier4(xdrs, objp->writeverf))
2402*0Sstevel@tonic-gate return (FALSE);
2403*0Sstevel@tonic-gate return (TRUE);
2404*0Sstevel@tonic-gate }
2405*0Sstevel@tonic-gate
2406*0Sstevel@tonic-gate bool_t
xdr_WRITE4res(register XDR * xdrs,WRITE4res * objp)2407*0Sstevel@tonic-gate xdr_WRITE4res(register XDR *xdrs, WRITE4res *objp)
2408*0Sstevel@tonic-gate {
2409*0Sstevel@tonic-gate
2410*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2411*0Sstevel@tonic-gate return (FALSE);
2412*0Sstevel@tonic-gate switch (objp->status) {
2413*0Sstevel@tonic-gate case NFS4_OK:
2414*0Sstevel@tonic-gate if (!xdr_WRITE4resok(xdrs, &objp->WRITE4res_u.resok4))
2415*0Sstevel@tonic-gate return (FALSE);
2416*0Sstevel@tonic-gate break;
2417*0Sstevel@tonic-gate }
2418*0Sstevel@tonic-gate return (TRUE);
2419*0Sstevel@tonic-gate }
2420*0Sstevel@tonic-gate
2421*0Sstevel@tonic-gate bool_t
xdr_RELEASE_LOCKOWNER4args(register XDR * xdrs,RELEASE_LOCKOWNER4args * objp)2422*0Sstevel@tonic-gate xdr_RELEASE_LOCKOWNER4args(register XDR *xdrs, RELEASE_LOCKOWNER4args *objp)
2423*0Sstevel@tonic-gate {
2424*0Sstevel@tonic-gate
2425*0Sstevel@tonic-gate if (!xdr_lock_owner4(xdrs, &objp->lock_owner))
2426*0Sstevel@tonic-gate return (FALSE);
2427*0Sstevel@tonic-gate return (TRUE);
2428*0Sstevel@tonic-gate }
2429*0Sstevel@tonic-gate
2430*0Sstevel@tonic-gate bool_t
xdr_RELEASE_LOCKOWNER4res(register XDR * xdrs,RELEASE_LOCKOWNER4res * objp)2431*0Sstevel@tonic-gate xdr_RELEASE_LOCKOWNER4res(register XDR *xdrs, RELEASE_LOCKOWNER4res *objp)
2432*0Sstevel@tonic-gate {
2433*0Sstevel@tonic-gate
2434*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2435*0Sstevel@tonic-gate return (FALSE);
2436*0Sstevel@tonic-gate return (TRUE);
2437*0Sstevel@tonic-gate }
2438*0Sstevel@tonic-gate
2439*0Sstevel@tonic-gate bool_t
xdr_ILLEGAL4res(register XDR * xdrs,ILLEGAL4res * objp)2440*0Sstevel@tonic-gate xdr_ILLEGAL4res(register XDR *xdrs, ILLEGAL4res *objp)
2441*0Sstevel@tonic-gate {
2442*0Sstevel@tonic-gate
2443*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2444*0Sstevel@tonic-gate return (FALSE);
2445*0Sstevel@tonic-gate return (TRUE);
2446*0Sstevel@tonic-gate }
2447*0Sstevel@tonic-gate
2448*0Sstevel@tonic-gate bool_t
xdr_nfs_opnum4(register XDR * xdrs,nfs_opnum4 * objp)2449*0Sstevel@tonic-gate xdr_nfs_opnum4(register XDR *xdrs, nfs_opnum4 *objp)
2450*0Sstevel@tonic-gate {
2451*0Sstevel@tonic-gate
2452*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
2453*0Sstevel@tonic-gate return (FALSE);
2454*0Sstevel@tonic-gate return (TRUE);
2455*0Sstevel@tonic-gate }
2456*0Sstevel@tonic-gate
2457*0Sstevel@tonic-gate bool_t
xdr_nfs_argop4(register XDR * xdrs,nfs_argop4 * objp)2458*0Sstevel@tonic-gate xdr_nfs_argop4(register XDR *xdrs, nfs_argop4 *objp)
2459*0Sstevel@tonic-gate {
2460*0Sstevel@tonic-gate nfs4_skip_bytes = 0;
2461*0Sstevel@tonic-gate if (!xdr_nfs_opnum4(xdrs, &objp->argop))
2462*0Sstevel@tonic-gate return (FALSE);
2463*0Sstevel@tonic-gate switch (objp->argop) {
2464*0Sstevel@tonic-gate case OP_ACCESS:
2465*0Sstevel@tonic-gate if (!xdr_ACCESS4args(xdrs, &objp->nfs_argop4_u.opaccess))
2466*0Sstevel@tonic-gate return (FALSE);
2467*0Sstevel@tonic-gate break;
2468*0Sstevel@tonic-gate case OP_CLOSE:
2469*0Sstevel@tonic-gate if (!xdr_CLOSE4args(xdrs, &objp->nfs_argop4_u.opclose))
2470*0Sstevel@tonic-gate return (FALSE);
2471*0Sstevel@tonic-gate break;
2472*0Sstevel@tonic-gate case OP_COMMIT:
2473*0Sstevel@tonic-gate if (!xdr_COMMIT4args(xdrs, &objp->nfs_argop4_u.opcommit))
2474*0Sstevel@tonic-gate return (FALSE);
2475*0Sstevel@tonic-gate break;
2476*0Sstevel@tonic-gate case OP_CREATE:
2477*0Sstevel@tonic-gate if (!xdr_CREATE4args(xdrs, &objp->nfs_argop4_u.opcreate))
2478*0Sstevel@tonic-gate return (FALSE);
2479*0Sstevel@tonic-gate break;
2480*0Sstevel@tonic-gate case OP_DELEGPURGE:
2481*0Sstevel@tonic-gate if (!xdr_DELEGPURGE4args(xdrs, &objp->nfs_argop4_u.
2482*0Sstevel@tonic-gate opdelegpurge))
2483*0Sstevel@tonic-gate return (FALSE);
2484*0Sstevel@tonic-gate break;
2485*0Sstevel@tonic-gate case OP_DELEGRETURN:
2486*0Sstevel@tonic-gate if (!xdr_DELEGRETURN4args(xdrs, &objp->nfs_argop4_u.
2487*0Sstevel@tonic-gate opdelegreturn))
2488*0Sstevel@tonic-gate return (FALSE);
2489*0Sstevel@tonic-gate break;
2490*0Sstevel@tonic-gate case OP_GETATTR:
2491*0Sstevel@tonic-gate if (!xdr_GETATTR4args(xdrs, &objp->nfs_argop4_u.
2492*0Sstevel@tonic-gate opgetattr))
2493*0Sstevel@tonic-gate return (FALSE);
2494*0Sstevel@tonic-gate break;
2495*0Sstevel@tonic-gate case OP_GETFH:
2496*0Sstevel@tonic-gate break;
2497*0Sstevel@tonic-gate case OP_LINK:
2498*0Sstevel@tonic-gate if (!xdr_LINK4args(xdrs, &objp->nfs_argop4_u.oplink))
2499*0Sstevel@tonic-gate return (FALSE);
2500*0Sstevel@tonic-gate break;
2501*0Sstevel@tonic-gate case OP_LOCK:
2502*0Sstevel@tonic-gate if (!xdr_LOCK4args(xdrs, &objp->nfs_argop4_u.oplock))
2503*0Sstevel@tonic-gate return (FALSE);
2504*0Sstevel@tonic-gate break;
2505*0Sstevel@tonic-gate case OP_LOCKT:
2506*0Sstevel@tonic-gate if (!xdr_LOCKT4args(xdrs, &objp->nfs_argop4_u.oplockt))
2507*0Sstevel@tonic-gate return (FALSE);
2508*0Sstevel@tonic-gate break;
2509*0Sstevel@tonic-gate case OP_LOCKU:
2510*0Sstevel@tonic-gate if (!xdr_LOCKU4args(xdrs, &objp->nfs_argop4_u.oplocku))
2511*0Sstevel@tonic-gate return (FALSE);
2512*0Sstevel@tonic-gate break;
2513*0Sstevel@tonic-gate case OP_LOOKUP:
2514*0Sstevel@tonic-gate if (!xdr_LOOKUP4args(xdrs, &objp->nfs_argop4_u.oplookup))
2515*0Sstevel@tonic-gate return (FALSE);
2516*0Sstevel@tonic-gate break;
2517*0Sstevel@tonic-gate case OP_LOOKUPP:
2518*0Sstevel@tonic-gate break;
2519*0Sstevel@tonic-gate case OP_NVERIFY:
2520*0Sstevel@tonic-gate if (!xdr_NVERIFY4args(xdrs, &objp->nfs_argop4_u.opnverify))
2521*0Sstevel@tonic-gate return (FALSE);
2522*0Sstevel@tonic-gate break;
2523*0Sstevel@tonic-gate case OP_OPEN:
2524*0Sstevel@tonic-gate if (!xdr_OPEN4args(xdrs, &objp->nfs_argop4_u.opopen))
2525*0Sstevel@tonic-gate return (FALSE);
2526*0Sstevel@tonic-gate break;
2527*0Sstevel@tonic-gate case OP_OPENATTR:
2528*0Sstevel@tonic-gate if (!xdr_OPENATTR4args(xdrs, &objp->nfs_argop4_u.opopenattr))
2529*0Sstevel@tonic-gate return (FALSE);
2530*0Sstevel@tonic-gate break;
2531*0Sstevel@tonic-gate case OP_OPEN_CONFIRM:
2532*0Sstevel@tonic-gate if (!xdr_OPEN_CONFIRM4args(xdrs, &objp->nfs_argop4_u.
2533*0Sstevel@tonic-gate opopen_confirm))
2534*0Sstevel@tonic-gate return (FALSE);
2535*0Sstevel@tonic-gate break;
2536*0Sstevel@tonic-gate case OP_OPEN_DOWNGRADE:
2537*0Sstevel@tonic-gate if (!xdr_OPEN_DOWNGRADE4args(xdrs, &objp->nfs_argop4_u.
2538*0Sstevel@tonic-gate opopen_downgrade))
2539*0Sstevel@tonic-gate return (FALSE);
2540*0Sstevel@tonic-gate break;
2541*0Sstevel@tonic-gate case OP_PUTFH:
2542*0Sstevel@tonic-gate if (!xdr_PUTFH4args(xdrs, &objp->nfs_argop4_u.opputfh))
2543*0Sstevel@tonic-gate return (FALSE);
2544*0Sstevel@tonic-gate break;
2545*0Sstevel@tonic-gate case OP_PUTPUBFH:
2546*0Sstevel@tonic-gate break;
2547*0Sstevel@tonic-gate case OP_PUTROOTFH:
2548*0Sstevel@tonic-gate break;
2549*0Sstevel@tonic-gate case OP_READ:
2550*0Sstevel@tonic-gate if (!xdr_READ4args(xdrs, &objp->nfs_argop4_u.opread))
2551*0Sstevel@tonic-gate return (FALSE);
2552*0Sstevel@tonic-gate break;
2553*0Sstevel@tonic-gate case OP_READDIR:
2554*0Sstevel@tonic-gate if (!xdr_READDIR4args(xdrs, &objp->nfs_argop4_u.opreaddir))
2555*0Sstevel@tonic-gate return (FALSE);
2556*0Sstevel@tonic-gate break;
2557*0Sstevel@tonic-gate case OP_READLINK:
2558*0Sstevel@tonic-gate break;
2559*0Sstevel@tonic-gate case OP_REMOVE:
2560*0Sstevel@tonic-gate if (!xdr_REMOVE4args(xdrs, &objp->nfs_argop4_u.opremove))
2561*0Sstevel@tonic-gate return (FALSE);
2562*0Sstevel@tonic-gate break;
2563*0Sstevel@tonic-gate case OP_RENAME:
2564*0Sstevel@tonic-gate if (!xdr_RENAME4args(xdrs, &objp->nfs_argop4_u.oprename))
2565*0Sstevel@tonic-gate return (FALSE);
2566*0Sstevel@tonic-gate break;
2567*0Sstevel@tonic-gate case OP_RENEW:
2568*0Sstevel@tonic-gate if (!xdr_RENEW4args(xdrs, &objp->nfs_argop4_u.oprenew))
2569*0Sstevel@tonic-gate return (FALSE);
2570*0Sstevel@tonic-gate break;
2571*0Sstevel@tonic-gate case OP_RESTOREFH:
2572*0Sstevel@tonic-gate break;
2573*0Sstevel@tonic-gate case OP_SAVEFH:
2574*0Sstevel@tonic-gate break;
2575*0Sstevel@tonic-gate case OP_SECINFO:
2576*0Sstevel@tonic-gate if (!xdr_SECINFO4args(xdrs, &objp->nfs_argop4_u.opsecinfo))
2577*0Sstevel@tonic-gate return (FALSE);
2578*0Sstevel@tonic-gate break;
2579*0Sstevel@tonic-gate case OP_SETATTR:
2580*0Sstevel@tonic-gate if (!xdr_SETATTR4args(xdrs, &objp->nfs_argop4_u.opsetattr))
2581*0Sstevel@tonic-gate return (FALSE);
2582*0Sstevel@tonic-gate break;
2583*0Sstevel@tonic-gate case OP_SETCLIENTID:
2584*0Sstevel@tonic-gate if (!xdr_SETCLIENTID4args(xdrs, &objp->nfs_argop4_u.
2585*0Sstevel@tonic-gate opsetclientid))
2586*0Sstevel@tonic-gate return (FALSE);
2587*0Sstevel@tonic-gate break;
2588*0Sstevel@tonic-gate case OP_SETCLIENTID_CONFIRM:
2589*0Sstevel@tonic-gate if (!xdr_SETCLIENTID_CONFIRM4args(xdrs, &objp->nfs_argop4_u.
2590*0Sstevel@tonic-gate opsetclientid_confirm))
2591*0Sstevel@tonic-gate return (FALSE);
2592*0Sstevel@tonic-gate break;
2593*0Sstevel@tonic-gate case OP_VERIFY:
2594*0Sstevel@tonic-gate if (!xdr_VERIFY4args(xdrs, &objp->nfs_argop4_u.opverify))
2595*0Sstevel@tonic-gate return (FALSE);
2596*0Sstevel@tonic-gate break;
2597*0Sstevel@tonic-gate case OP_WRITE:
2598*0Sstevel@tonic-gate if (!xdr_WRITE4args(xdrs, &objp->nfs_argop4_u.opwrite))
2599*0Sstevel@tonic-gate return (FALSE);
2600*0Sstevel@tonic-gate break;
2601*0Sstevel@tonic-gate case OP_RELEASE_LOCKOWNER:
2602*0Sstevel@tonic-gate if (!xdr_RELEASE_LOCKOWNER4args(xdrs,
2603*0Sstevel@tonic-gate &objp->nfs_argop4_u.oprelease_lockowner))
2604*0Sstevel@tonic-gate return (FALSE);
2605*0Sstevel@tonic-gate break;
2606*0Sstevel@tonic-gate case OP_ILLEGAL:
2607*0Sstevel@tonic-gate break;
2608*0Sstevel@tonic-gate default:
2609*0Sstevel@tonic-gate return (FALSE);
2610*0Sstevel@tonic-gate }
2611*0Sstevel@tonic-gate return (TRUE);
2612*0Sstevel@tonic-gate }
2613*0Sstevel@tonic-gate
2614*0Sstevel@tonic-gate bool_t
xdr_nfs_resop4(register XDR * xdrs,nfs_resop4 * objp)2615*0Sstevel@tonic-gate xdr_nfs_resop4(register XDR *xdrs, nfs_resop4 *objp)
2616*0Sstevel@tonic-gate {
2617*0Sstevel@tonic-gate nfs4_skip_bytes = 0;
2618*0Sstevel@tonic-gate if (!xdr_nfs_opnum4(xdrs, &objp->resop))
2619*0Sstevel@tonic-gate return (FALSE);
2620*0Sstevel@tonic-gate switch (objp->resop) {
2621*0Sstevel@tonic-gate case OP_ACCESS:
2622*0Sstevel@tonic-gate if (!xdr_ACCESS4res(xdrs, &objp->nfs_resop4_u.opaccess))
2623*0Sstevel@tonic-gate return (FALSE);
2624*0Sstevel@tonic-gate break;
2625*0Sstevel@tonic-gate case OP_CLOSE:
2626*0Sstevel@tonic-gate if (!xdr_CLOSE4res(xdrs, &objp->nfs_resop4_u.opclose))
2627*0Sstevel@tonic-gate return (FALSE);
2628*0Sstevel@tonic-gate break;
2629*0Sstevel@tonic-gate case OP_COMMIT:
2630*0Sstevel@tonic-gate if (!xdr_COMMIT4res(xdrs, &objp->nfs_resop4_u.opcommit))
2631*0Sstevel@tonic-gate return (FALSE);
2632*0Sstevel@tonic-gate break;
2633*0Sstevel@tonic-gate case OP_CREATE:
2634*0Sstevel@tonic-gate if (!xdr_CREATE4res(xdrs, &objp->nfs_resop4_u.opcreate))
2635*0Sstevel@tonic-gate return (FALSE);
2636*0Sstevel@tonic-gate break;
2637*0Sstevel@tonic-gate case OP_DELEGPURGE:
2638*0Sstevel@tonic-gate if (!xdr_DELEGPURGE4res(xdrs, &objp->nfs_resop4_u.opdelegpurge))
2639*0Sstevel@tonic-gate return (FALSE);
2640*0Sstevel@tonic-gate break;
2641*0Sstevel@tonic-gate case OP_DELEGRETURN:
2642*0Sstevel@tonic-gate if (!xdr_DELEGRETURN4res(xdrs, &objp->nfs_resop4_u.
2643*0Sstevel@tonic-gate opdelegreturn))
2644*0Sstevel@tonic-gate return (FALSE);
2645*0Sstevel@tonic-gate break;
2646*0Sstevel@tonic-gate case OP_GETATTR:
2647*0Sstevel@tonic-gate if (!xdr_GETATTR4res(xdrs, &objp->nfs_resop4_u.opgetattr))
2648*0Sstevel@tonic-gate return (FALSE);
2649*0Sstevel@tonic-gate break;
2650*0Sstevel@tonic-gate case OP_GETFH:
2651*0Sstevel@tonic-gate if (!xdr_GETFH4res(xdrs, &objp->nfs_resop4_u.opgetfh))
2652*0Sstevel@tonic-gate return (FALSE);
2653*0Sstevel@tonic-gate break;
2654*0Sstevel@tonic-gate case OP_LINK:
2655*0Sstevel@tonic-gate if (!xdr_LINK4res(xdrs, &objp->nfs_resop4_u.oplink))
2656*0Sstevel@tonic-gate return (FALSE);
2657*0Sstevel@tonic-gate break;
2658*0Sstevel@tonic-gate case OP_LOCK:
2659*0Sstevel@tonic-gate if (!xdr_LOCK4res(xdrs, &objp->nfs_resop4_u.oplock))
2660*0Sstevel@tonic-gate return (FALSE);
2661*0Sstevel@tonic-gate break;
2662*0Sstevel@tonic-gate case OP_LOCKT:
2663*0Sstevel@tonic-gate if (!xdr_LOCKT4res(xdrs, &objp->nfs_resop4_u.oplockt))
2664*0Sstevel@tonic-gate return (FALSE);
2665*0Sstevel@tonic-gate break;
2666*0Sstevel@tonic-gate case OP_LOCKU:
2667*0Sstevel@tonic-gate if (!xdr_LOCKU4res(xdrs, &objp->nfs_resop4_u.oplocku))
2668*0Sstevel@tonic-gate return (FALSE);
2669*0Sstevel@tonic-gate break;
2670*0Sstevel@tonic-gate case OP_LOOKUP:
2671*0Sstevel@tonic-gate if (!xdr_LOOKUP4res(xdrs, &objp->nfs_resop4_u.oplookup))
2672*0Sstevel@tonic-gate return (FALSE);
2673*0Sstevel@tonic-gate break;
2674*0Sstevel@tonic-gate case OP_LOOKUPP:
2675*0Sstevel@tonic-gate if (!xdr_LOOKUPP4res(xdrs, &objp->nfs_resop4_u.oplookupp))
2676*0Sstevel@tonic-gate return (FALSE);
2677*0Sstevel@tonic-gate break;
2678*0Sstevel@tonic-gate case OP_NVERIFY:
2679*0Sstevel@tonic-gate if (!xdr_NVERIFY4res(xdrs, &objp->nfs_resop4_u.opnverify))
2680*0Sstevel@tonic-gate return (FALSE);
2681*0Sstevel@tonic-gate break;
2682*0Sstevel@tonic-gate case OP_OPEN:
2683*0Sstevel@tonic-gate if (!xdr_OPEN4res(xdrs, &objp->nfs_resop4_u.opopen))
2684*0Sstevel@tonic-gate return (FALSE);
2685*0Sstevel@tonic-gate break;
2686*0Sstevel@tonic-gate case OP_OPENATTR:
2687*0Sstevel@tonic-gate if (!xdr_OPENATTR4res(xdrs, &objp->nfs_resop4_u.opopenattr))
2688*0Sstevel@tonic-gate return (FALSE);
2689*0Sstevel@tonic-gate break;
2690*0Sstevel@tonic-gate case OP_OPEN_CONFIRM:
2691*0Sstevel@tonic-gate if (!xdr_OPEN_CONFIRM4res(xdrs, &objp->nfs_resop4_u.
2692*0Sstevel@tonic-gate opopen_confirm))
2693*0Sstevel@tonic-gate return (FALSE);
2694*0Sstevel@tonic-gate break;
2695*0Sstevel@tonic-gate case OP_OPEN_DOWNGRADE:
2696*0Sstevel@tonic-gate if (!xdr_OPEN_DOWNGRADE4res(xdrs, &objp->nfs_resop4_u.
2697*0Sstevel@tonic-gate opopen_downgrade))
2698*0Sstevel@tonic-gate return (FALSE);
2699*0Sstevel@tonic-gate break;
2700*0Sstevel@tonic-gate case OP_PUTFH:
2701*0Sstevel@tonic-gate if (!xdr_PUTFH4res(xdrs, &objp->nfs_resop4_u.opputfh))
2702*0Sstevel@tonic-gate return (FALSE);
2703*0Sstevel@tonic-gate break;
2704*0Sstevel@tonic-gate case OP_PUTPUBFH:
2705*0Sstevel@tonic-gate if (!xdr_PUTPUBFH4res(xdrs, &objp->nfs_resop4_u.opputpubfh))
2706*0Sstevel@tonic-gate return (FALSE);
2707*0Sstevel@tonic-gate break;
2708*0Sstevel@tonic-gate case OP_PUTROOTFH:
2709*0Sstevel@tonic-gate if (!xdr_PUTROOTFH4res(xdrs, &objp->nfs_resop4_u.opputrootfh))
2710*0Sstevel@tonic-gate return (FALSE);
2711*0Sstevel@tonic-gate break;
2712*0Sstevel@tonic-gate case OP_READ:
2713*0Sstevel@tonic-gate if (!xdr_READ4res(xdrs, &objp->nfs_resop4_u.opread))
2714*0Sstevel@tonic-gate return (FALSE);
2715*0Sstevel@tonic-gate break;
2716*0Sstevel@tonic-gate case OP_READDIR:
2717*0Sstevel@tonic-gate if (!xdr_READDIR4res(xdrs, &objp->nfs_resop4_u.opreaddir))
2718*0Sstevel@tonic-gate return (FALSE);
2719*0Sstevel@tonic-gate break;
2720*0Sstevel@tonic-gate case OP_READLINK:
2721*0Sstevel@tonic-gate if (!xdr_READLINK4res(xdrs, &objp->nfs_resop4_u.opreadlink))
2722*0Sstevel@tonic-gate return (FALSE);
2723*0Sstevel@tonic-gate break;
2724*0Sstevel@tonic-gate case OP_REMOVE:
2725*0Sstevel@tonic-gate if (!xdr_REMOVE4res(xdrs, &objp->nfs_resop4_u.opremove))
2726*0Sstevel@tonic-gate return (FALSE);
2727*0Sstevel@tonic-gate break;
2728*0Sstevel@tonic-gate case OP_RENAME:
2729*0Sstevel@tonic-gate if (!xdr_RENAME4res(xdrs, &objp->nfs_resop4_u.oprename))
2730*0Sstevel@tonic-gate return (FALSE);
2731*0Sstevel@tonic-gate break;
2732*0Sstevel@tonic-gate case OP_RENEW:
2733*0Sstevel@tonic-gate if (!xdr_RENEW4res(xdrs, &objp->nfs_resop4_u.oprenew))
2734*0Sstevel@tonic-gate return (FALSE);
2735*0Sstevel@tonic-gate break;
2736*0Sstevel@tonic-gate case OP_RESTOREFH:
2737*0Sstevel@tonic-gate if (!xdr_RESTOREFH4res(xdrs, &objp->nfs_resop4_u.oprestorefh))
2738*0Sstevel@tonic-gate return (FALSE);
2739*0Sstevel@tonic-gate break;
2740*0Sstevel@tonic-gate case OP_SAVEFH:
2741*0Sstevel@tonic-gate if (!xdr_SAVEFH4res(xdrs, &objp->nfs_resop4_u.opsavefh))
2742*0Sstevel@tonic-gate return (FALSE);
2743*0Sstevel@tonic-gate break;
2744*0Sstevel@tonic-gate case OP_SECINFO:
2745*0Sstevel@tonic-gate if (!xdr_SECINFO4res(xdrs, &objp->nfs_resop4_u.opsecinfo))
2746*0Sstevel@tonic-gate return (FALSE);
2747*0Sstevel@tonic-gate break;
2748*0Sstevel@tonic-gate case OP_SETATTR:
2749*0Sstevel@tonic-gate if (!xdr_SETATTR4res(xdrs, &objp->nfs_resop4_u.opsetattr))
2750*0Sstevel@tonic-gate return (FALSE);
2751*0Sstevel@tonic-gate break;
2752*0Sstevel@tonic-gate case OP_SETCLIENTID:
2753*0Sstevel@tonic-gate if (!xdr_SETCLIENTID4res(xdrs, &objp->nfs_resop4_u.
2754*0Sstevel@tonic-gate opsetclientid))
2755*0Sstevel@tonic-gate return (FALSE);
2756*0Sstevel@tonic-gate break;
2757*0Sstevel@tonic-gate case OP_SETCLIENTID_CONFIRM:
2758*0Sstevel@tonic-gate if (!xdr_SETCLIENTID_CONFIRM4res(xdrs, &objp->nfs_resop4_u.
2759*0Sstevel@tonic-gate opsetclientid_confirm))
2760*0Sstevel@tonic-gate return (FALSE);
2761*0Sstevel@tonic-gate break;
2762*0Sstevel@tonic-gate case OP_VERIFY:
2763*0Sstevel@tonic-gate if (!xdr_VERIFY4res(xdrs, &objp->nfs_resop4_u.opverify))
2764*0Sstevel@tonic-gate return (FALSE);
2765*0Sstevel@tonic-gate break;
2766*0Sstevel@tonic-gate case OP_WRITE:
2767*0Sstevel@tonic-gate if (!xdr_WRITE4res(xdrs, &objp->nfs_resop4_u.opwrite))
2768*0Sstevel@tonic-gate return (FALSE);
2769*0Sstevel@tonic-gate break;
2770*0Sstevel@tonic-gate case OP_RELEASE_LOCKOWNER:
2771*0Sstevel@tonic-gate if (!xdr_RELEASE_LOCKOWNER4res(xdrs,
2772*0Sstevel@tonic-gate &objp->nfs_resop4_u.oprelease_lockowner))
2773*0Sstevel@tonic-gate return (FALSE);
2774*0Sstevel@tonic-gate break;
2775*0Sstevel@tonic-gate case OP_ILLEGAL:
2776*0Sstevel@tonic-gate if (!xdr_ILLEGAL4res(xdrs, &objp->nfs_resop4_u.opillegal))
2777*0Sstevel@tonic-gate return (FALSE);
2778*0Sstevel@tonic-gate break;
2779*0Sstevel@tonic-gate default:
2780*0Sstevel@tonic-gate return (FALSE);
2781*0Sstevel@tonic-gate }
2782*0Sstevel@tonic-gate return (TRUE);
2783*0Sstevel@tonic-gate }
2784*0Sstevel@tonic-gate
2785*0Sstevel@tonic-gate bool_t
xdr_COMPOUND4args(register XDR * xdrs,COMPOUND4args * objp)2786*0Sstevel@tonic-gate xdr_COMPOUND4args(register XDR *xdrs, COMPOUND4args *objp)
2787*0Sstevel@tonic-gate {
2788*0Sstevel@tonic-gate
2789*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, &objp->tag))
2790*0Sstevel@tonic-gate return (FALSE);
2791*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->minorversion))
2792*0Sstevel@tonic-gate return (FALSE);
2793*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->argarray.argarray_val,
2794*0Sstevel@tonic-gate (uint_t *)&objp->argarray.argarray_len, ~0,
2795*0Sstevel@tonic-gate sizeof (nfs_argop4), (xdrproc_t)xdr_nfs_argop4))
2796*0Sstevel@tonic-gate return (FALSE);
2797*0Sstevel@tonic-gate return (TRUE);
2798*0Sstevel@tonic-gate }
2799*0Sstevel@tonic-gate
2800*0Sstevel@tonic-gate bool_t
xdr_COMPOUND4res(register XDR * xdrs,COMPOUND4res * objp)2801*0Sstevel@tonic-gate xdr_COMPOUND4res(register XDR *xdrs, COMPOUND4res *objp)
2802*0Sstevel@tonic-gate {
2803*0Sstevel@tonic-gate
2804*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2805*0Sstevel@tonic-gate return (FALSE);
2806*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, &objp->tag))
2807*0Sstevel@tonic-gate return (FALSE);
2808*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->resarray.resarray_val,
2809*0Sstevel@tonic-gate (uint_t *)&objp->resarray.resarray_len, ~0,
2810*0Sstevel@tonic-gate sizeof (nfs_resop4), (xdrproc_t)xdr_nfs_resop4))
2811*0Sstevel@tonic-gate return (FALSE);
2812*0Sstevel@tonic-gate return (TRUE);
2813*0Sstevel@tonic-gate }
2814*0Sstevel@tonic-gate
2815*0Sstevel@tonic-gate bool_t
xdr_CB_GETATTR4args(register XDR * xdrs,CB_GETATTR4args * objp)2816*0Sstevel@tonic-gate xdr_CB_GETATTR4args(register XDR *xdrs, CB_GETATTR4args *objp)
2817*0Sstevel@tonic-gate {
2818*0Sstevel@tonic-gate
2819*0Sstevel@tonic-gate if (!xdr_nfs_fh4(xdrs, &objp->fh))
2820*0Sstevel@tonic-gate return (FALSE);
2821*0Sstevel@tonic-gate if (!xdr_bitmap4(xdrs, &objp->attr_request))
2822*0Sstevel@tonic-gate return (FALSE);
2823*0Sstevel@tonic-gate return (TRUE);
2824*0Sstevel@tonic-gate }
2825*0Sstevel@tonic-gate
2826*0Sstevel@tonic-gate bool_t
xdr_CB_GETATTR4resok(register XDR * xdrs,CB_GETATTR4resok * objp)2827*0Sstevel@tonic-gate xdr_CB_GETATTR4resok(register XDR *xdrs, CB_GETATTR4resok *objp)
2828*0Sstevel@tonic-gate {
2829*0Sstevel@tonic-gate
2830*0Sstevel@tonic-gate if (!xdr_fattr4(xdrs, &objp->obj_attributes))
2831*0Sstevel@tonic-gate return (FALSE);
2832*0Sstevel@tonic-gate return (TRUE);
2833*0Sstevel@tonic-gate }
2834*0Sstevel@tonic-gate
2835*0Sstevel@tonic-gate bool_t
xdr_CB_GETATTR4res(register XDR * xdrs,CB_GETATTR4res * objp)2836*0Sstevel@tonic-gate xdr_CB_GETATTR4res(register XDR *xdrs, CB_GETATTR4res *objp)
2837*0Sstevel@tonic-gate {
2838*0Sstevel@tonic-gate
2839*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2840*0Sstevel@tonic-gate return (FALSE);
2841*0Sstevel@tonic-gate switch (objp->status) {
2842*0Sstevel@tonic-gate case NFS4_OK:
2843*0Sstevel@tonic-gate if (!xdr_CB_GETATTR4resok(xdrs, &objp->CB_GETATTR4res_u.resok4))
2844*0Sstevel@tonic-gate return (FALSE);
2845*0Sstevel@tonic-gate break;
2846*0Sstevel@tonic-gate }
2847*0Sstevel@tonic-gate return (TRUE);
2848*0Sstevel@tonic-gate }
2849*0Sstevel@tonic-gate
2850*0Sstevel@tonic-gate bool_t
xdr_CB_RECALL4args(register XDR * xdrs,CB_RECALL4args * objp)2851*0Sstevel@tonic-gate xdr_CB_RECALL4args(register XDR *xdrs, CB_RECALL4args *objp)
2852*0Sstevel@tonic-gate {
2853*0Sstevel@tonic-gate
2854*0Sstevel@tonic-gate if (!xdr_stateid4(xdrs, &objp->stateid))
2855*0Sstevel@tonic-gate return (FALSE);
2856*0Sstevel@tonic-gate if (!xdr_bool(xdrs, &objp->truncate))
2857*0Sstevel@tonic-gate return (FALSE);
2858*0Sstevel@tonic-gate if (!xdr_nfs_fh4(xdrs, &objp->fh))
2859*0Sstevel@tonic-gate return (FALSE);
2860*0Sstevel@tonic-gate return (TRUE);
2861*0Sstevel@tonic-gate }
2862*0Sstevel@tonic-gate
2863*0Sstevel@tonic-gate bool_t
xdr_CB_RECALL4res(register XDR * xdrs,CB_RECALL4res * objp)2864*0Sstevel@tonic-gate xdr_CB_RECALL4res(register XDR *xdrs, CB_RECALL4res *objp)
2865*0Sstevel@tonic-gate {
2866*0Sstevel@tonic-gate
2867*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2868*0Sstevel@tonic-gate return (FALSE);
2869*0Sstevel@tonic-gate return (TRUE);
2870*0Sstevel@tonic-gate }
2871*0Sstevel@tonic-gate
2872*0Sstevel@tonic-gate bool_t
xdr_CB_ILLEGAL4res(register XDR * xdrs,CB_ILLEGAL4res * objp)2873*0Sstevel@tonic-gate xdr_CB_ILLEGAL4res(register XDR *xdrs, CB_ILLEGAL4res *objp)
2874*0Sstevel@tonic-gate {
2875*0Sstevel@tonic-gate
2876*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2877*0Sstevel@tonic-gate return (FALSE);
2878*0Sstevel@tonic-gate return (TRUE);
2879*0Sstevel@tonic-gate }
2880*0Sstevel@tonic-gate
2881*0Sstevel@tonic-gate bool_t
xdr_nfs_cb_opnum4(register XDR * xdrs,nfs_cb_opnum4 * objp)2882*0Sstevel@tonic-gate xdr_nfs_cb_opnum4(register XDR *xdrs, nfs_cb_opnum4 *objp)
2883*0Sstevel@tonic-gate {
2884*0Sstevel@tonic-gate
2885*0Sstevel@tonic-gate if (!xdr_enum(xdrs, (enum_t *)objp))
2886*0Sstevel@tonic-gate return (FALSE);
2887*0Sstevel@tonic-gate return (TRUE);
2888*0Sstevel@tonic-gate }
2889*0Sstevel@tonic-gate
2890*0Sstevel@tonic-gate bool_t
xdr_nfs_cb_argop4(register XDR * xdrs,nfs_cb_argop4 * objp)2891*0Sstevel@tonic-gate xdr_nfs_cb_argop4(register XDR *xdrs, nfs_cb_argop4 *objp)
2892*0Sstevel@tonic-gate {
2893*0Sstevel@tonic-gate
2894*0Sstevel@tonic-gate if (!xdr_u_int(xdrs, &objp->argop))
2895*0Sstevel@tonic-gate return (FALSE);
2896*0Sstevel@tonic-gate switch (objp->argop) {
2897*0Sstevel@tonic-gate case OP_CB_GETATTR:
2898*0Sstevel@tonic-gate if (!xdr_CB_GETATTR4args(xdrs, &objp->nfs_cb_argop4_u.
2899*0Sstevel@tonic-gate opcbgetattr))
2900*0Sstevel@tonic-gate return (FALSE);
2901*0Sstevel@tonic-gate break;
2902*0Sstevel@tonic-gate case OP_CB_RECALL:
2903*0Sstevel@tonic-gate if (!xdr_CB_RECALL4args(xdrs, &objp->nfs_cb_argop4_u.
2904*0Sstevel@tonic-gate opcbrecall))
2905*0Sstevel@tonic-gate return (FALSE);
2906*0Sstevel@tonic-gate break;
2907*0Sstevel@tonic-gate case OP_CB_ILLEGAL:
2908*0Sstevel@tonic-gate break;
2909*0Sstevel@tonic-gate default:
2910*0Sstevel@tonic-gate return (FALSE);
2911*0Sstevel@tonic-gate }
2912*0Sstevel@tonic-gate return (TRUE);
2913*0Sstevel@tonic-gate }
2914*0Sstevel@tonic-gate
2915*0Sstevel@tonic-gate bool_t
xdr_nfs_cb_resop4(register XDR * xdrs,nfs_cb_resop4 * objp)2916*0Sstevel@tonic-gate xdr_nfs_cb_resop4(register XDR *xdrs, nfs_cb_resop4 *objp)
2917*0Sstevel@tonic-gate {
2918*0Sstevel@tonic-gate
2919*0Sstevel@tonic-gate if (!xdr_u_int(xdrs, &objp->resop))
2920*0Sstevel@tonic-gate return (FALSE);
2921*0Sstevel@tonic-gate switch (objp->resop) {
2922*0Sstevel@tonic-gate case OP_CB_GETATTR:
2923*0Sstevel@tonic-gate if (!xdr_CB_GETATTR4res(xdrs, &objp->nfs_cb_resop4_u.
2924*0Sstevel@tonic-gate opcbgetattr))
2925*0Sstevel@tonic-gate return (FALSE);
2926*0Sstevel@tonic-gate break;
2927*0Sstevel@tonic-gate case OP_CB_RECALL:
2928*0Sstevel@tonic-gate if (!xdr_CB_RECALL4res(xdrs, &objp->nfs_cb_resop4_u.opcbrecall))
2929*0Sstevel@tonic-gate return (FALSE);
2930*0Sstevel@tonic-gate break;
2931*0Sstevel@tonic-gate case OP_CB_ILLEGAL:
2932*0Sstevel@tonic-gate if (!xdr_CB_ILLEGAL4res(xdrs,
2933*0Sstevel@tonic-gate &objp->nfs_cb_resop4_u.opcbillegal))
2934*0Sstevel@tonic-gate return (FALSE);
2935*0Sstevel@tonic-gate break;
2936*0Sstevel@tonic-gate default:
2937*0Sstevel@tonic-gate return (FALSE);
2938*0Sstevel@tonic-gate }
2939*0Sstevel@tonic-gate return (TRUE);
2940*0Sstevel@tonic-gate }
2941*0Sstevel@tonic-gate
2942*0Sstevel@tonic-gate bool_t
xdr_CB_COMPOUND4args(register XDR * xdrs,CB_COMPOUND4args * objp)2943*0Sstevel@tonic-gate xdr_CB_COMPOUND4args(register XDR *xdrs, CB_COMPOUND4args *objp)
2944*0Sstevel@tonic-gate {
2945*0Sstevel@tonic-gate
2946*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, &objp->tag))
2947*0Sstevel@tonic-gate return (FALSE);
2948*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->minorversion))
2949*0Sstevel@tonic-gate return (FALSE);
2950*0Sstevel@tonic-gate if (!xdr_uint32_t(xdrs, &objp->callback_ident))
2951*0Sstevel@tonic-gate return (FALSE);
2952*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->argarray.argarray_val,
2953*0Sstevel@tonic-gate (uint_t *)&objp->argarray.argarray_len, ~0,
2954*0Sstevel@tonic-gate sizeof (nfs_cb_argop4), (xdrproc_t)xdr_nfs_cb_argop4))
2955*0Sstevel@tonic-gate return (FALSE);
2956*0Sstevel@tonic-gate return (TRUE);
2957*0Sstevel@tonic-gate }
2958*0Sstevel@tonic-gate
2959*0Sstevel@tonic-gate bool_t
xdr_CB_COMPOUND4res(register XDR * xdrs,CB_COMPOUND4res * objp)2960*0Sstevel@tonic-gate xdr_CB_COMPOUND4res(register XDR *xdrs, CB_COMPOUND4res *objp)
2961*0Sstevel@tonic-gate {
2962*0Sstevel@tonic-gate
2963*0Sstevel@tonic-gate if (!xdr_nfsstat4(xdrs, &objp->status))
2964*0Sstevel@tonic-gate return (FALSE);
2965*0Sstevel@tonic-gate if (!xdr_utf8string(xdrs, &objp->tag))
2966*0Sstevel@tonic-gate return (FALSE);
2967*0Sstevel@tonic-gate if (!xdr_array(xdrs, (char **)&objp->resarray.resarray_val,
2968*0Sstevel@tonic-gate (uint_t *)&objp->resarray.resarray_len, ~0,
2969*0Sstevel@tonic-gate sizeof (nfs_cb_resop4), (xdrproc_t)xdr_nfs_cb_resop4))
2970*0Sstevel@tonic-gate return (FALSE);
2971*0Sstevel@tonic-gate return (TRUE);
2972*0Sstevel@tonic-gate }
2973