17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
22bbe876c0SMarcel Telka 
23bbe876c0SMarcel Telka /*
24bbe876c0SMarcel Telka  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
25bbe876c0SMarcel Telka  */
26bbe876c0SMarcel Telka 
277c478bd9Sstevel@tonic-gate /*
287c478bd9Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
297c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
307c478bd9Sstevel@tonic-gate  */
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate /*
337c478bd9Sstevel@tonic-gate  * This file was initially generated using rpcgen.  The rpcgen-erated
347c478bd9Sstevel@tonic-gate  * code used tail recursion to implement linked lists which resulted
357c478bd9Sstevel@tonic-gate  * in various crashes due to blown stacks.  If the NFS4 protocol changes
367c478bd9Sstevel@tonic-gate  * be sure to either use the NFS4-friendly rpcgen (doesn't use tail
377c478bd9Sstevel@tonic-gate  * recursion) or do the xdr by hand.
387c478bd9Sstevel@tonic-gate  *
397c478bd9Sstevel@tonic-gate  * CAUTION:  This file is kept in sync with it's uts counterpart:
407c478bd9Sstevel@tonic-gate  *
41*f44e1126SVitaliy Gusev  *	usr/src/uts/common/fs/nfs/nfs4_xdr.c
427c478bd9Sstevel@tonic-gate  *
437c478bd9Sstevel@tonic-gate  * However, it is not an exact copy.  NEVER copy uts's nfs4_xdr.c
447c478bd9Sstevel@tonic-gate  * directly over this file.   Changes from the uts version must be
457c478bd9Sstevel@tonic-gate  * integrated by hand into this file.
467c478bd9Sstevel@tonic-gate  */
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate #include <rpcsvc/nfs4_prot.h>
497c478bd9Sstevel@tonic-gate #include <nfs/nfs4.h>
507c478bd9Sstevel@tonic-gate #include <malloc.h>
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate #define	IGNORE_RDWR_DATA
537c478bd9Sstevel@tonic-gate 
547c478bd9Sstevel@tonic-gate extern int nfs4_skip_bytes;
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_ftype4(register XDR * xdrs,nfs_ftype4 * objp)577c478bd9Sstevel@tonic-gate xdr_nfs_ftype4(register XDR *xdrs, nfs_ftype4 *objp)
587c478bd9Sstevel@tonic-gate {
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
617c478bd9Sstevel@tonic-gate 		return (FALSE);
627c478bd9Sstevel@tonic-gate 	return (TRUE);
637c478bd9Sstevel@tonic-gate }
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate bool_t
xdr_nfsstat4(register XDR * xdrs,nfsstat4 * objp)667c478bd9Sstevel@tonic-gate xdr_nfsstat4(register XDR *xdrs, nfsstat4 *objp)
677c478bd9Sstevel@tonic-gate {
687c478bd9Sstevel@tonic-gate 
697c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
707c478bd9Sstevel@tonic-gate 		return (FALSE);
717c478bd9Sstevel@tonic-gate 	return (TRUE);
727c478bd9Sstevel@tonic-gate }
737c478bd9Sstevel@tonic-gate 
747c478bd9Sstevel@tonic-gate bool_t
xdr_bitmap4(register XDR * xdrs,bitmap4 * objp)757c478bd9Sstevel@tonic-gate xdr_bitmap4(register XDR *xdrs, bitmap4 *objp)
767c478bd9Sstevel@tonic-gate {
777c478bd9Sstevel@tonic-gate 
787c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->bitmap4_val,
79bbe876c0SMarcel Telka 	    (uint_t *)&objp->bitmap4_len, ~0,
80bbe876c0SMarcel Telka 	    sizeof (uint32_t), (xdrproc_t)xdr_uint32_t))
817c478bd9Sstevel@tonic-gate 		return (FALSE);
827c478bd9Sstevel@tonic-gate 	return (TRUE);
837c478bd9Sstevel@tonic-gate }
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate bool_t
xdr_offset4(register XDR * xdrs,offset4 * objp)867c478bd9Sstevel@tonic-gate xdr_offset4(register XDR *xdrs, offset4 *objp)
877c478bd9Sstevel@tonic-gate {
887c478bd9Sstevel@tonic-gate 
897c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
907c478bd9Sstevel@tonic-gate 		return (FALSE);
917c478bd9Sstevel@tonic-gate 	return (TRUE);
927c478bd9Sstevel@tonic-gate }
937c478bd9Sstevel@tonic-gate 
947c478bd9Sstevel@tonic-gate bool_t
xdr_count4(register XDR * xdrs,count4 * objp)957c478bd9Sstevel@tonic-gate xdr_count4(register XDR *xdrs, count4 *objp)
967c478bd9Sstevel@tonic-gate {
977c478bd9Sstevel@tonic-gate 
987c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
997c478bd9Sstevel@tonic-gate 		return (FALSE);
1007c478bd9Sstevel@tonic-gate 	return (TRUE);
1017c478bd9Sstevel@tonic-gate }
1027c478bd9Sstevel@tonic-gate 
1037c478bd9Sstevel@tonic-gate bool_t
xdr_length4(register XDR * xdrs,length4 * objp)1047c478bd9Sstevel@tonic-gate xdr_length4(register XDR *xdrs, length4 *objp)
1057c478bd9Sstevel@tonic-gate {
1067c478bd9Sstevel@tonic-gate 
1077c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
1087c478bd9Sstevel@tonic-gate 		return (FALSE);
1097c478bd9Sstevel@tonic-gate 	return (TRUE);
1107c478bd9Sstevel@tonic-gate }
1117c478bd9Sstevel@tonic-gate 
1127c478bd9Sstevel@tonic-gate bool_t
xdr_clientid4(register XDR * xdrs,clientid4 * objp)1137c478bd9Sstevel@tonic-gate xdr_clientid4(register XDR *xdrs, clientid4 *objp)
1147c478bd9Sstevel@tonic-gate {
1157c478bd9Sstevel@tonic-gate 
1167c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
1177c478bd9Sstevel@tonic-gate 		return (FALSE);
1187c478bd9Sstevel@tonic-gate 	return (TRUE);
1197c478bd9Sstevel@tonic-gate }
1207c478bd9Sstevel@tonic-gate 
1217c478bd9Sstevel@tonic-gate bool_t
xdr_seqid4(register XDR * xdrs,seqid4 * objp)1227c478bd9Sstevel@tonic-gate xdr_seqid4(register XDR *xdrs, seqid4 *objp)
1237c478bd9Sstevel@tonic-gate {
1247c478bd9Sstevel@tonic-gate 
1257c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
1267c478bd9Sstevel@tonic-gate 		return (FALSE);
1277c478bd9Sstevel@tonic-gate 	return (TRUE);
1287c478bd9Sstevel@tonic-gate }
1297c478bd9Sstevel@tonic-gate 
1307c478bd9Sstevel@tonic-gate bool_t
xdr_utf8string(register XDR * xdrs,utf8string * objp)1317c478bd9Sstevel@tonic-gate xdr_utf8string(register XDR *xdrs, utf8string *objp)
1327c478bd9Sstevel@tonic-gate {
1337c478bd9Sstevel@tonic-gate 
1347c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->utf8string_val,
135bbe876c0SMarcel Telka 	    (uint_t *)&objp->utf8string_len, NFS4_MAX_UTF8STRING))
1367c478bd9Sstevel@tonic-gate 		return (FALSE);
1377c478bd9Sstevel@tonic-gate 	return (TRUE);
1387c478bd9Sstevel@tonic-gate }
1397c478bd9Sstevel@tonic-gate 
1407c478bd9Sstevel@tonic-gate bool_t
xdr_component4(register XDR * xdrs,component4 * objp)1417c478bd9Sstevel@tonic-gate xdr_component4(register XDR *xdrs, component4 *objp)
1427c478bd9Sstevel@tonic-gate {
1437c478bd9Sstevel@tonic-gate 
1447c478bd9Sstevel@tonic-gate 	if (!xdr_utf8string(xdrs, objp))
1457c478bd9Sstevel@tonic-gate 		return (FALSE);
1467c478bd9Sstevel@tonic-gate 	return (TRUE);
1477c478bd9Sstevel@tonic-gate }
1487c478bd9Sstevel@tonic-gate 
1497c478bd9Sstevel@tonic-gate bool_t
xdr_pathname4(register XDR * xdrs,pathname4 * objp)1507c478bd9Sstevel@tonic-gate xdr_pathname4(register XDR *xdrs, pathname4 *objp)
1517c478bd9Sstevel@tonic-gate {
1527c478bd9Sstevel@tonic-gate 
1537c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->pathname4_val,
154bbe876c0SMarcel Telka 	    (uint_t *)&objp->pathname4_len, NFS4_MAX_PATHNAME4,
155bbe876c0SMarcel Telka 	    sizeof (component4), (xdrproc_t)xdr_component4))
1567c478bd9Sstevel@tonic-gate 		return (FALSE);
1577c478bd9Sstevel@tonic-gate 	return (TRUE);
1587c478bd9Sstevel@tonic-gate }
1597c478bd9Sstevel@tonic-gate 
1607c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_cookie4(register XDR * xdrs,nfs_cookie4 * objp)1617c478bd9Sstevel@tonic-gate xdr_nfs_cookie4(register XDR *xdrs, nfs_cookie4 *objp)
1627c478bd9Sstevel@tonic-gate {
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
1657c478bd9Sstevel@tonic-gate 		return (FALSE);
1667c478bd9Sstevel@tonic-gate 	return (TRUE);
1677c478bd9Sstevel@tonic-gate }
1687c478bd9Sstevel@tonic-gate 
1697c478bd9Sstevel@tonic-gate bool_t
xdr_linktext4(register XDR * xdrs,linktext4 * objp)1707c478bd9Sstevel@tonic-gate xdr_linktext4(register XDR *xdrs, linktext4 *objp)
171bbe876c0SMarcel Telka {
172bbe876c0SMarcel Telka 
173bbe876c0SMarcel Telka 	if (!xdr_bytes(xdrs, (char **)&objp->linktext4_val,
174bbe876c0SMarcel Telka 	    (uint_t *)&objp->linktext4_len, NFS4_MAX_LINKTEXT4))
175bbe876c0SMarcel Telka 		return (FALSE);
176bbe876c0SMarcel Telka 	return (TRUE);
177bbe876c0SMarcel Telka }
178bbe876c0SMarcel Telka 
179bbe876c0SMarcel Telka bool_t
xdr_ascii_REQUIRED4(register XDR * xdrs,ascii_REQUIRED4 * objp)180bbe876c0SMarcel Telka xdr_ascii_REQUIRED4(register XDR *xdrs, ascii_REQUIRED4 *objp)
1817c478bd9Sstevel@tonic-gate {
1827c478bd9Sstevel@tonic-gate 
1837c478bd9Sstevel@tonic-gate 	if (!xdr_utf8string(xdrs, objp))
1847c478bd9Sstevel@tonic-gate 		return (FALSE);
1857c478bd9Sstevel@tonic-gate 	return (TRUE);
1867c478bd9Sstevel@tonic-gate }
1877c478bd9Sstevel@tonic-gate 
1887c478bd9Sstevel@tonic-gate bool_t
xdr_sec_oid4(register XDR * xdrs,sec_oid4 * objp)1897c478bd9Sstevel@tonic-gate xdr_sec_oid4(register XDR *xdrs, sec_oid4 *objp)
1907c478bd9Sstevel@tonic-gate {
1917c478bd9Sstevel@tonic-gate 
1927c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->sec_oid4_val,
193bbe876c0SMarcel Telka 	    (uint_t *)&objp->sec_oid4_len, NFS4_MAX_SECOID4))
1947c478bd9Sstevel@tonic-gate 		return (FALSE);
1957c478bd9Sstevel@tonic-gate 	return (TRUE);
1967c478bd9Sstevel@tonic-gate }
1977c478bd9Sstevel@tonic-gate 
1987c478bd9Sstevel@tonic-gate bool_t
xdr_qop4(register XDR * xdrs,qop4 * objp)1997c478bd9Sstevel@tonic-gate xdr_qop4(register XDR *xdrs, qop4 *objp)
2007c478bd9Sstevel@tonic-gate {
2017c478bd9Sstevel@tonic-gate 
2027c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
2037c478bd9Sstevel@tonic-gate 		return (FALSE);
2047c478bd9Sstevel@tonic-gate 	return (TRUE);
2057c478bd9Sstevel@tonic-gate }
2067c478bd9Sstevel@tonic-gate 
2077c478bd9Sstevel@tonic-gate bool_t
xdr_mode4(register XDR * xdrs,mode4 * objp)2087c478bd9Sstevel@tonic-gate xdr_mode4(register XDR *xdrs, mode4 *objp)
2097c478bd9Sstevel@tonic-gate {
2107c478bd9Sstevel@tonic-gate 
2117c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
2127c478bd9Sstevel@tonic-gate 		return (FALSE);
2137c478bd9Sstevel@tonic-gate 	return (TRUE);
2147c478bd9Sstevel@tonic-gate }
2157c478bd9Sstevel@tonic-gate 
2167c478bd9Sstevel@tonic-gate bool_t
xdr_changeid4(register XDR * xdrs,changeid4 * objp)2177c478bd9Sstevel@tonic-gate xdr_changeid4(register XDR *xdrs, changeid4 *objp)
2187c478bd9Sstevel@tonic-gate {
2197c478bd9Sstevel@tonic-gate 
2207c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
2217c478bd9Sstevel@tonic-gate 		return (FALSE);
2227c478bd9Sstevel@tonic-gate 	return (TRUE);
2237c478bd9Sstevel@tonic-gate }
2247c478bd9Sstevel@tonic-gate 
2257c478bd9Sstevel@tonic-gate bool_t
xdr_verifier4(register XDR * xdrs,verifier4 objp)2267c478bd9Sstevel@tonic-gate xdr_verifier4(register XDR *xdrs, verifier4 objp)
2277c478bd9Sstevel@tonic-gate {
2287c478bd9Sstevel@tonic-gate 
2297c478bd9Sstevel@tonic-gate 	if (!xdr_opaque(xdrs, objp, NFS4_VERIFIER_SIZE))
2307c478bd9Sstevel@tonic-gate 		return (FALSE);
2317c478bd9Sstevel@tonic-gate 	return (TRUE);
2327c478bd9Sstevel@tonic-gate }
2337c478bd9Sstevel@tonic-gate 
2347c478bd9Sstevel@tonic-gate bool_t
xdr_nfstime4(register XDR * xdrs,nfstime4 * objp)2357c478bd9Sstevel@tonic-gate xdr_nfstime4(register XDR *xdrs, nfstime4 *objp)
2367c478bd9Sstevel@tonic-gate {
2377c478bd9Sstevel@tonic-gate 
2387c478bd9Sstevel@tonic-gate 	if (!xdr_int64_t(xdrs, &objp->seconds))
2397c478bd9Sstevel@tonic-gate 		return (FALSE);
2407c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->nseconds))
2417c478bd9Sstevel@tonic-gate 		return (FALSE);
2427c478bd9Sstevel@tonic-gate 	return (TRUE);
2437c478bd9Sstevel@tonic-gate }
2447c478bd9Sstevel@tonic-gate 
2457c478bd9Sstevel@tonic-gate bool_t
xdr_time_how4(register XDR * xdrs,time_how4 * objp)2467c478bd9Sstevel@tonic-gate xdr_time_how4(register XDR *xdrs, time_how4 *objp)
2477c478bd9Sstevel@tonic-gate {
2487c478bd9Sstevel@tonic-gate 
2497c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
2507c478bd9Sstevel@tonic-gate 		return (FALSE);
2517c478bd9Sstevel@tonic-gate 	return (TRUE);
2527c478bd9Sstevel@tonic-gate }
2537c478bd9Sstevel@tonic-gate 
2547c478bd9Sstevel@tonic-gate bool_t
xdr_settime4(register XDR * xdrs,settime4 * objp)2557c478bd9Sstevel@tonic-gate xdr_settime4(register XDR *xdrs, settime4 *objp)
2567c478bd9Sstevel@tonic-gate {
2577c478bd9Sstevel@tonic-gate 
2587c478bd9Sstevel@tonic-gate 	if (!xdr_time_how4(xdrs, &objp->set_it))
2597c478bd9Sstevel@tonic-gate 		return (FALSE);
2607c478bd9Sstevel@tonic-gate 	switch (objp->set_it) {
2617c478bd9Sstevel@tonic-gate 	case SET_TO_CLIENT_TIME4:
2627c478bd9Sstevel@tonic-gate 		if (!xdr_nfstime4(xdrs, &objp->settime4_u.time))
2637c478bd9Sstevel@tonic-gate 			return (FALSE);
2647c478bd9Sstevel@tonic-gate 		break;
2657c478bd9Sstevel@tonic-gate 	}
2667c478bd9Sstevel@tonic-gate 	return (TRUE);
2677c478bd9Sstevel@tonic-gate }
2687c478bd9Sstevel@tonic-gate 
2697c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_fh4(register XDR * xdrs,nfs_fh4 * objp)2707c478bd9Sstevel@tonic-gate xdr_nfs_fh4(register XDR *xdrs, nfs_fh4 *objp)
2717c478bd9Sstevel@tonic-gate {
2727c478bd9Sstevel@tonic-gate 
2737c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->nfs_fh4_val,
274bbe876c0SMarcel Telka 	    (uint_t *)&objp->nfs_fh4_len, NFS4_FHSIZE))
2757c478bd9Sstevel@tonic-gate 		return (FALSE);
2767c478bd9Sstevel@tonic-gate 	return (TRUE);
2777c478bd9Sstevel@tonic-gate }
2787c478bd9Sstevel@tonic-gate 
2797c478bd9Sstevel@tonic-gate bool_t
xdr_fsid4(register XDR * xdrs,fsid4 * objp)2807c478bd9Sstevel@tonic-gate xdr_fsid4(register XDR *xdrs, fsid4 *objp)
2817c478bd9Sstevel@tonic-gate {
2827c478bd9Sstevel@tonic-gate 
2837c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, &objp->major))
2847c478bd9Sstevel@tonic-gate 		return (FALSE);
2857c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, &objp->minor))
2867c478bd9Sstevel@tonic-gate 		return (FALSE);
2877c478bd9Sstevel@tonic-gate 	return (TRUE);
2887c478bd9Sstevel@tonic-gate }
2897c478bd9Sstevel@tonic-gate 
2907c478bd9Sstevel@tonic-gate bool_t
xdr_fs_location4(register XDR * xdrs,fs_location4 * objp)2917c478bd9Sstevel@tonic-gate xdr_fs_location4(register XDR *xdrs, fs_location4 *objp)
2927c478bd9Sstevel@tonic-gate {
2937c478bd9Sstevel@tonic-gate 
2947c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->server.server_val,
295bbe876c0SMarcel Telka 	    (uint_t *)&objp->server.server_len, ~0,
296bbe876c0SMarcel Telka 	    sizeof (utf8string), (xdrproc_t)xdr_utf8string))
2977c478bd9Sstevel@tonic-gate 		return (FALSE);
2987c478bd9Sstevel@tonic-gate 	if (!xdr_pathname4(xdrs, &objp->rootpath))
2997c478bd9Sstevel@tonic-gate 		return (FALSE);
3007c478bd9Sstevel@tonic-gate 	return (TRUE);
3017c478bd9Sstevel@tonic-gate }
3027c478bd9Sstevel@tonic-gate 
3037c478bd9Sstevel@tonic-gate bool_t
xdr_fs_locations4(register XDR * xdrs,fs_locations4 * objp)3047c478bd9Sstevel@tonic-gate xdr_fs_locations4(register XDR *xdrs, fs_locations4 *objp)
3057c478bd9Sstevel@tonic-gate {
3067c478bd9Sstevel@tonic-gate 
3077c478bd9Sstevel@tonic-gate 	if (!xdr_pathname4(xdrs, &objp->fs_root))
3087c478bd9Sstevel@tonic-gate 		return (FALSE);
3097c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->locations.locations_val,
310bbe876c0SMarcel Telka 	    (uint_t *)&objp->locations.locations_len, ~0,
311bbe876c0SMarcel Telka 	    sizeof (fs_location4), (xdrproc_t)xdr_fs_location4))
3127c478bd9Sstevel@tonic-gate 		return (FALSE);
3137c478bd9Sstevel@tonic-gate 	return (TRUE);
3147c478bd9Sstevel@tonic-gate }
3157c478bd9Sstevel@tonic-gate 
3167c478bd9Sstevel@tonic-gate bool_t
xdr_acetype4(register XDR * xdrs,acetype4 * objp)3177c478bd9Sstevel@tonic-gate xdr_acetype4(register XDR *xdrs, acetype4 *objp)
3187c478bd9Sstevel@tonic-gate {
3197c478bd9Sstevel@tonic-gate 
3207c478bd9Sstevel@tonic-gate 	if (!xdr_u_int(xdrs, objp))
3217c478bd9Sstevel@tonic-gate 		return (FALSE);
3227c478bd9Sstevel@tonic-gate 	return (TRUE);
3237c478bd9Sstevel@tonic-gate }
3247c478bd9Sstevel@tonic-gate 
3257c478bd9Sstevel@tonic-gate bool_t
xdr_aceflag4(register XDR * xdrs,aceflag4 * objp)3267c478bd9Sstevel@tonic-gate xdr_aceflag4(register XDR *xdrs, aceflag4 *objp)
3277c478bd9Sstevel@tonic-gate {
3287c478bd9Sstevel@tonic-gate 
3297c478bd9Sstevel@tonic-gate 	if (!xdr_u_int(xdrs, objp))
3307c478bd9Sstevel@tonic-gate 		return (FALSE);
3317c478bd9Sstevel@tonic-gate 	return (TRUE);
3327c478bd9Sstevel@tonic-gate }
3337c478bd9Sstevel@tonic-gate 
3347c478bd9Sstevel@tonic-gate bool_t
xdr_acemask4(register XDR * xdrs,acemask4 * objp)3357c478bd9Sstevel@tonic-gate xdr_acemask4(register XDR *xdrs, acemask4 *objp)
3367c478bd9Sstevel@tonic-gate {
3377c478bd9Sstevel@tonic-gate 
3387c478bd9Sstevel@tonic-gate 	if (!xdr_u_int(xdrs, objp))
3397c478bd9Sstevel@tonic-gate 		return (FALSE);
3407c478bd9Sstevel@tonic-gate 	return (TRUE);
3417c478bd9Sstevel@tonic-gate }
3427c478bd9Sstevel@tonic-gate 
3437c478bd9Sstevel@tonic-gate bool_t
xdr_nfsace4(register XDR * xdrs,nfsace4 * objp)3447c478bd9Sstevel@tonic-gate xdr_nfsace4(register XDR *xdrs, nfsace4 *objp)
3457c478bd9Sstevel@tonic-gate {
3467c478bd9Sstevel@tonic-gate 	if (!xdr_acetype4(xdrs, &objp->type))
3477c478bd9Sstevel@tonic-gate 		return (FALSE);
3487c478bd9Sstevel@tonic-gate 	if (!xdr_aceflag4(xdrs, &objp->flag))
3497c478bd9Sstevel@tonic-gate 		return (FALSE);
3507c478bd9Sstevel@tonic-gate 	if (!xdr_acemask4(xdrs, &objp->access_mask))
3517c478bd9Sstevel@tonic-gate 		return (FALSE);
3527c478bd9Sstevel@tonic-gate 	if (xdrs->x_op == XDR_DECODE) {
3537c478bd9Sstevel@tonic-gate 		objp->who.utf8string_val = NULL;
3547c478bd9Sstevel@tonic-gate 		objp->who.utf8string_len = 0;
3557c478bd9Sstevel@tonic-gate 	}
3567c478bd9Sstevel@tonic-gate 	return (xdr_bytes(xdrs, (char **)&objp->who.utf8string_val,
3577c478bd9Sstevel@tonic-gate 	    (uint_t *)&objp->who.utf8string_len,
3587c478bd9Sstevel@tonic-gate 	    NFS4_MAX_UTF8STRING));
3597c478bd9Sstevel@tonic-gate }
3607c478bd9Sstevel@tonic-gate 
3617c478bd9Sstevel@tonic-gate bool_t
xdr_specdata4(register XDR * xdrs,specdata4 * objp)3627c478bd9Sstevel@tonic-gate xdr_specdata4(register XDR *xdrs, specdata4 *objp)
3637c478bd9Sstevel@tonic-gate {
3647c478bd9Sstevel@tonic-gate 
3657c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->specdata1))
3667c478bd9Sstevel@tonic-gate 		return (FALSE);
3677c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->specdata2))
3687c478bd9Sstevel@tonic-gate 		return (FALSE);
3697c478bd9Sstevel@tonic-gate 	return (TRUE);
3707c478bd9Sstevel@tonic-gate }
3717c478bd9Sstevel@tonic-gate 
3727c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_supported_attrs(register XDR * xdrs,fattr4_supported_attrs * objp)3737c478bd9Sstevel@tonic-gate xdr_fattr4_supported_attrs(register XDR *xdrs, fattr4_supported_attrs *objp)
3747c478bd9Sstevel@tonic-gate {
3757c478bd9Sstevel@tonic-gate 
3767c478bd9Sstevel@tonic-gate 	if (!xdr_bitmap4(xdrs, objp))
3777c478bd9Sstevel@tonic-gate 		return (FALSE);
3787c478bd9Sstevel@tonic-gate 	return (TRUE);
3797c478bd9Sstevel@tonic-gate }
3807c478bd9Sstevel@tonic-gate 
3817c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_type(register XDR * xdrs,fattr4_type * objp)3827c478bd9Sstevel@tonic-gate xdr_fattr4_type(register XDR *xdrs, fattr4_type *objp)
3837c478bd9Sstevel@tonic-gate {
3847c478bd9Sstevel@tonic-gate 
3857c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_ftype4(xdrs, objp))
3867c478bd9Sstevel@tonic-gate 		return (FALSE);
3877c478bd9Sstevel@tonic-gate 	return (TRUE);
3887c478bd9Sstevel@tonic-gate }
3897c478bd9Sstevel@tonic-gate 
3907c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_fh_expire_type(register XDR * xdrs,fattr4_fh_expire_type * objp)3917c478bd9Sstevel@tonic-gate xdr_fattr4_fh_expire_type(register XDR *xdrs, fattr4_fh_expire_type *objp)
3927c478bd9Sstevel@tonic-gate {
3937c478bd9Sstevel@tonic-gate 
3947c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
3957c478bd9Sstevel@tonic-gate 		return (FALSE);
3967c478bd9Sstevel@tonic-gate 	return (TRUE);
3977c478bd9Sstevel@tonic-gate }
3987c478bd9Sstevel@tonic-gate 
3997c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_change(register XDR * xdrs,fattr4_change * objp)4007c478bd9Sstevel@tonic-gate xdr_fattr4_change(register XDR *xdrs, fattr4_change *objp)
4017c478bd9Sstevel@tonic-gate {
4027c478bd9Sstevel@tonic-gate 
4037c478bd9Sstevel@tonic-gate 	if (!xdr_changeid4(xdrs, objp))
4047c478bd9Sstevel@tonic-gate 		return (FALSE);
4057c478bd9Sstevel@tonic-gate 	return (TRUE);
4067c478bd9Sstevel@tonic-gate }
4077c478bd9Sstevel@tonic-gate 
4087c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_size(register XDR * xdrs,fattr4_size * objp)4097c478bd9Sstevel@tonic-gate xdr_fattr4_size(register XDR *xdrs, fattr4_size *objp)
4107c478bd9Sstevel@tonic-gate {
4117c478bd9Sstevel@tonic-gate 
4127c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
4137c478bd9Sstevel@tonic-gate 		return (FALSE);
4147c478bd9Sstevel@tonic-gate 	return (TRUE);
4157c478bd9Sstevel@tonic-gate }
4167c478bd9Sstevel@tonic-gate 
4177c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_link_support(register XDR * xdrs,fattr4_link_support * objp)4187c478bd9Sstevel@tonic-gate xdr_fattr4_link_support(register XDR *xdrs, fattr4_link_support *objp)
4197c478bd9Sstevel@tonic-gate {
4207c478bd9Sstevel@tonic-gate 
4217c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
4227c478bd9Sstevel@tonic-gate 		return (FALSE);
4237c478bd9Sstevel@tonic-gate 	return (TRUE);
4247c478bd9Sstevel@tonic-gate }
4257c478bd9Sstevel@tonic-gate 
4267c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_symlink_support(register XDR * xdrs,fattr4_symlink_support * objp)4277c478bd9Sstevel@tonic-gate xdr_fattr4_symlink_support(register XDR *xdrs, fattr4_symlink_support *objp)
4287c478bd9Sstevel@tonic-gate {
4297c478bd9Sstevel@tonic-gate 
4307c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
4317c478bd9Sstevel@tonic-gate 		return (FALSE);
4327c478bd9Sstevel@tonic-gate 	return (TRUE);
4337c478bd9Sstevel@tonic-gate }
4347c478bd9Sstevel@tonic-gate 
4357c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_named_attr(register XDR * xdrs,fattr4_named_attr * objp)4367c478bd9Sstevel@tonic-gate xdr_fattr4_named_attr(register XDR *xdrs, fattr4_named_attr *objp)
4377c478bd9Sstevel@tonic-gate {
4387c478bd9Sstevel@tonic-gate 
4397c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
4407c478bd9Sstevel@tonic-gate 		return (FALSE);
4417c478bd9Sstevel@tonic-gate 	return (TRUE);
4427c478bd9Sstevel@tonic-gate }
4437c478bd9Sstevel@tonic-gate 
4447c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_fsid(register XDR * xdrs,fattr4_fsid * objp)4457c478bd9Sstevel@tonic-gate xdr_fattr4_fsid(register XDR *xdrs, fattr4_fsid *objp)
4467c478bd9Sstevel@tonic-gate {
4477c478bd9Sstevel@tonic-gate 
4487c478bd9Sstevel@tonic-gate 	if (!xdr_fsid4(xdrs, objp))
4497c478bd9Sstevel@tonic-gate 		return (FALSE);
4507c478bd9Sstevel@tonic-gate 	return (TRUE);
4517c478bd9Sstevel@tonic-gate }
4527c478bd9Sstevel@tonic-gate 
4537c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_unique_handles(register XDR * xdrs,fattr4_unique_handles * objp)4547c478bd9Sstevel@tonic-gate xdr_fattr4_unique_handles(register XDR *xdrs, fattr4_unique_handles *objp)
4557c478bd9Sstevel@tonic-gate {
4567c478bd9Sstevel@tonic-gate 
4577c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
4587c478bd9Sstevel@tonic-gate 		return (FALSE);
4597c478bd9Sstevel@tonic-gate 	return (TRUE);
4607c478bd9Sstevel@tonic-gate }
4617c478bd9Sstevel@tonic-gate 
4627c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_lease_time(register XDR * xdrs,fattr4_lease_time * objp)4637c478bd9Sstevel@tonic-gate xdr_fattr4_lease_time(register XDR *xdrs, fattr4_lease_time *objp)
4647c478bd9Sstevel@tonic-gate {
4657c478bd9Sstevel@tonic-gate 
4667c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
4677c478bd9Sstevel@tonic-gate 		return (FALSE);
4687c478bd9Sstevel@tonic-gate 	return (TRUE);
4697c478bd9Sstevel@tonic-gate }
4707c478bd9Sstevel@tonic-gate 
4717c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_rdattr_error(register XDR * xdrs,fattr4_rdattr_error * objp)4727c478bd9Sstevel@tonic-gate xdr_fattr4_rdattr_error(register XDR *xdrs, fattr4_rdattr_error *objp)
4737c478bd9Sstevel@tonic-gate {
4747c478bd9Sstevel@tonic-gate 
4757c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, objp))
4767c478bd9Sstevel@tonic-gate 		return (FALSE);
4777c478bd9Sstevel@tonic-gate 	return (TRUE);
4787c478bd9Sstevel@tonic-gate }
4797c478bd9Sstevel@tonic-gate 
4807c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_acl(register XDR * xdrs,fattr4_acl * objp)4817c478bd9Sstevel@tonic-gate xdr_fattr4_acl(register XDR *xdrs, fattr4_acl *objp)
4827c478bd9Sstevel@tonic-gate {
4837c478bd9Sstevel@tonic-gate 
4847c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->fattr4_acl_val,
485bbe876c0SMarcel Telka 	    (uint_t *)&objp->fattr4_acl_len, ~0,
486bbe876c0SMarcel Telka 	    sizeof (nfsace4), (xdrproc_t)xdr_nfsace4))
4877c478bd9Sstevel@tonic-gate 		return (FALSE);
4887c478bd9Sstevel@tonic-gate 	return (TRUE);
4897c478bd9Sstevel@tonic-gate }
4907c478bd9Sstevel@tonic-gate 
4917c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_aclsupport(register XDR * xdrs,fattr4_aclsupport * objp)4927c478bd9Sstevel@tonic-gate xdr_fattr4_aclsupport(register XDR *xdrs, fattr4_aclsupport *objp)
4937c478bd9Sstevel@tonic-gate {
4947c478bd9Sstevel@tonic-gate 
4957c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
4967c478bd9Sstevel@tonic-gate 		return (FALSE);
4977c478bd9Sstevel@tonic-gate 	return (TRUE);
4987c478bd9Sstevel@tonic-gate }
4997c478bd9Sstevel@tonic-gate 
5007c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_archive(register XDR * xdrs,fattr4_archive * objp)5017c478bd9Sstevel@tonic-gate xdr_fattr4_archive(register XDR *xdrs, fattr4_archive *objp)
5027c478bd9Sstevel@tonic-gate {
5037c478bd9Sstevel@tonic-gate 
5047c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
5057c478bd9Sstevel@tonic-gate 		return (FALSE);
5067c478bd9Sstevel@tonic-gate 	return (TRUE);
5077c478bd9Sstevel@tonic-gate }
5087c478bd9Sstevel@tonic-gate 
5097c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_cansettime(register XDR * xdrs,fattr4_cansettime * objp)5107c478bd9Sstevel@tonic-gate xdr_fattr4_cansettime(register XDR *xdrs, fattr4_cansettime *objp)
5117c478bd9Sstevel@tonic-gate {
5127c478bd9Sstevel@tonic-gate 
5137c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
5147c478bd9Sstevel@tonic-gate 		return (FALSE);
5157c478bd9Sstevel@tonic-gate 	return (TRUE);
5167c478bd9Sstevel@tonic-gate }
5177c478bd9Sstevel@tonic-gate 
5187c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_case_insensitive(register XDR * xdrs,fattr4_case_insensitive * objp)5197c478bd9Sstevel@tonic-gate xdr_fattr4_case_insensitive(register XDR *xdrs, fattr4_case_insensitive *objp)
5207c478bd9Sstevel@tonic-gate {
5217c478bd9Sstevel@tonic-gate 
5227c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
5237c478bd9Sstevel@tonic-gate 		return (FALSE);
5247c478bd9Sstevel@tonic-gate 	return (TRUE);
5257c478bd9Sstevel@tonic-gate }
5267c478bd9Sstevel@tonic-gate 
5277c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_case_preserving(register XDR * xdrs,fattr4_case_preserving * objp)5287c478bd9Sstevel@tonic-gate xdr_fattr4_case_preserving(register XDR *xdrs, fattr4_case_preserving *objp)
5297c478bd9Sstevel@tonic-gate {
5307c478bd9Sstevel@tonic-gate 
5317c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
5327c478bd9Sstevel@tonic-gate 		return (FALSE);
5337c478bd9Sstevel@tonic-gate 	return (TRUE);
5347c478bd9Sstevel@tonic-gate }
5357c478bd9Sstevel@tonic-gate 
5367c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_chown_restricted(register XDR * xdrs,fattr4_chown_restricted * objp)5377c478bd9Sstevel@tonic-gate xdr_fattr4_chown_restricted(register XDR *xdrs, fattr4_chown_restricted *objp)
5387c478bd9Sstevel@tonic-gate {
5397c478bd9Sstevel@tonic-gate 
5407c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
5417c478bd9Sstevel@tonic-gate 		return (FALSE);
5427c478bd9Sstevel@tonic-gate 	return (TRUE);
5437c478bd9Sstevel@tonic-gate }
5447c478bd9Sstevel@tonic-gate 
5457c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_fileid(register XDR * xdrs,fattr4_fileid * objp)5467c478bd9Sstevel@tonic-gate xdr_fattr4_fileid(register XDR *xdrs, fattr4_fileid *objp)
5477c478bd9Sstevel@tonic-gate {
5487c478bd9Sstevel@tonic-gate 
5497c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
5507c478bd9Sstevel@tonic-gate 		return (FALSE);
5517c478bd9Sstevel@tonic-gate 	return (TRUE);
5527c478bd9Sstevel@tonic-gate }
5537c478bd9Sstevel@tonic-gate 
5547c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_files_avail(register XDR * xdrs,fattr4_files_avail * objp)5557c478bd9Sstevel@tonic-gate xdr_fattr4_files_avail(register XDR *xdrs, fattr4_files_avail *objp)
5567c478bd9Sstevel@tonic-gate {
5577c478bd9Sstevel@tonic-gate 
5587c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
5597c478bd9Sstevel@tonic-gate 		return (FALSE);
5607c478bd9Sstevel@tonic-gate 	return (TRUE);
5617c478bd9Sstevel@tonic-gate }
5627c478bd9Sstevel@tonic-gate 
5637c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_filehandle(register XDR * xdrs,fattr4_filehandle * objp)5647c478bd9Sstevel@tonic-gate xdr_fattr4_filehandle(register XDR *xdrs, fattr4_filehandle *objp)
5657c478bd9Sstevel@tonic-gate {
5667c478bd9Sstevel@tonic-gate 
5677c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_fh4(xdrs, objp))
5687c478bd9Sstevel@tonic-gate 		return (FALSE);
5697c478bd9Sstevel@tonic-gate 	return (TRUE);
5707c478bd9Sstevel@tonic-gate }
5717c478bd9Sstevel@tonic-gate 
5727c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_files_free(register XDR * xdrs,fattr4_files_free * objp)5737c478bd9Sstevel@tonic-gate xdr_fattr4_files_free(register XDR *xdrs, fattr4_files_free *objp)
5747c478bd9Sstevel@tonic-gate {
5757c478bd9Sstevel@tonic-gate 
5767c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
5777c478bd9Sstevel@tonic-gate 		return (FALSE);
5787c478bd9Sstevel@tonic-gate 	return (TRUE);
5797c478bd9Sstevel@tonic-gate }
5807c478bd9Sstevel@tonic-gate 
5817c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_files_total(register XDR * xdrs,fattr4_files_total * objp)5827c478bd9Sstevel@tonic-gate xdr_fattr4_files_total(register XDR *xdrs, fattr4_files_total *objp)
5837c478bd9Sstevel@tonic-gate {
5847c478bd9Sstevel@tonic-gate 
5857c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
5867c478bd9Sstevel@tonic-gate 		return (FALSE);
5877c478bd9Sstevel@tonic-gate 	return (TRUE);
5887c478bd9Sstevel@tonic-gate }
5897c478bd9Sstevel@tonic-gate 
5907c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_fs_locations(register XDR * xdrs,fattr4_fs_locations * objp)5917c478bd9Sstevel@tonic-gate xdr_fattr4_fs_locations(register XDR *xdrs, fattr4_fs_locations *objp)
5927c478bd9Sstevel@tonic-gate {
5937c478bd9Sstevel@tonic-gate 
5947c478bd9Sstevel@tonic-gate 	if (!xdr_fs_locations4(xdrs, objp))
5957c478bd9Sstevel@tonic-gate 		return (FALSE);
5967c478bd9Sstevel@tonic-gate 	return (TRUE);
5977c478bd9Sstevel@tonic-gate }
5987c478bd9Sstevel@tonic-gate 
5997c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_hidden(register XDR * xdrs,fattr4_hidden * objp)6007c478bd9Sstevel@tonic-gate xdr_fattr4_hidden(register XDR *xdrs, fattr4_hidden *objp)
6017c478bd9Sstevel@tonic-gate {
6027c478bd9Sstevel@tonic-gate 
6037c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
6047c478bd9Sstevel@tonic-gate 		return (FALSE);
6057c478bd9Sstevel@tonic-gate 	return (TRUE);
6067c478bd9Sstevel@tonic-gate }
6077c478bd9Sstevel@tonic-gate 
6087c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_homogeneous(register XDR * xdrs,fattr4_homogeneous * objp)6097c478bd9Sstevel@tonic-gate xdr_fattr4_homogeneous(register XDR *xdrs, fattr4_homogeneous *objp)
6107c478bd9Sstevel@tonic-gate {
6117c478bd9Sstevel@tonic-gate 
6127c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
6137c478bd9Sstevel@tonic-gate 		return (FALSE);
6147c478bd9Sstevel@tonic-gate 	return (TRUE);
6157c478bd9Sstevel@tonic-gate }
6167c478bd9Sstevel@tonic-gate 
6177c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_maxfilesize(register XDR * xdrs,fattr4_maxfilesize * objp)6187c478bd9Sstevel@tonic-gate xdr_fattr4_maxfilesize(register XDR *xdrs, fattr4_maxfilesize *objp)
6197c478bd9Sstevel@tonic-gate {
6207c478bd9Sstevel@tonic-gate 
6217c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
6227c478bd9Sstevel@tonic-gate 		return (FALSE);
6237c478bd9Sstevel@tonic-gate 	return (TRUE);
6247c478bd9Sstevel@tonic-gate }
6257c478bd9Sstevel@tonic-gate 
6267c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_maxlink(register XDR * xdrs,fattr4_maxlink * objp)6277c478bd9Sstevel@tonic-gate xdr_fattr4_maxlink(register XDR *xdrs, fattr4_maxlink *objp)
6287c478bd9Sstevel@tonic-gate {
6297c478bd9Sstevel@tonic-gate 
6307c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
6317c478bd9Sstevel@tonic-gate 		return (FALSE);
6327c478bd9Sstevel@tonic-gate 	return (TRUE);
6337c478bd9Sstevel@tonic-gate }
6347c478bd9Sstevel@tonic-gate 
6357c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_maxname(register XDR * xdrs,fattr4_maxname * objp)6367c478bd9Sstevel@tonic-gate xdr_fattr4_maxname(register XDR *xdrs, fattr4_maxname *objp)
6377c478bd9Sstevel@tonic-gate {
6387c478bd9Sstevel@tonic-gate 
6397c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
6407c478bd9Sstevel@tonic-gate 		return (FALSE);
6417c478bd9Sstevel@tonic-gate 	return (TRUE);
6427c478bd9Sstevel@tonic-gate }
6437c478bd9Sstevel@tonic-gate 
6447c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_maxread(register XDR * xdrs,fattr4_maxread * objp)6457c478bd9Sstevel@tonic-gate xdr_fattr4_maxread(register XDR *xdrs, fattr4_maxread *objp)
6467c478bd9Sstevel@tonic-gate {
6477c478bd9Sstevel@tonic-gate 
6487c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
6497c478bd9Sstevel@tonic-gate 		return (FALSE);
6507c478bd9Sstevel@tonic-gate 	return (TRUE);
6517c478bd9Sstevel@tonic-gate }
6527c478bd9Sstevel@tonic-gate 
6537c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_maxwrite(register XDR * xdrs,fattr4_maxwrite * objp)6547c478bd9Sstevel@tonic-gate xdr_fattr4_maxwrite(register XDR *xdrs, fattr4_maxwrite *objp)
6557c478bd9Sstevel@tonic-gate {
6567c478bd9Sstevel@tonic-gate 
6577c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
6587c478bd9Sstevel@tonic-gate 		return (FALSE);
6597c478bd9Sstevel@tonic-gate 	return (TRUE);
6607c478bd9Sstevel@tonic-gate }
6617c478bd9Sstevel@tonic-gate 
6627c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_mimetype(register XDR * xdrs,fattr4_mimetype * objp)6637c478bd9Sstevel@tonic-gate xdr_fattr4_mimetype(register XDR *xdrs, fattr4_mimetype *objp)
6647c478bd9Sstevel@tonic-gate {
6657c478bd9Sstevel@tonic-gate 
666bbe876c0SMarcel Telka 	if (!xdr_ascii_REQUIRED4(xdrs, objp))
6677c478bd9Sstevel@tonic-gate 		return (FALSE);
6687c478bd9Sstevel@tonic-gate 	return (TRUE);
6697c478bd9Sstevel@tonic-gate }
6707c478bd9Sstevel@tonic-gate 
6717c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_mode(register XDR * xdrs,fattr4_mode * objp)6727c478bd9Sstevel@tonic-gate xdr_fattr4_mode(register XDR *xdrs, fattr4_mode *objp)
6737c478bd9Sstevel@tonic-gate {
6747c478bd9Sstevel@tonic-gate 
6757c478bd9Sstevel@tonic-gate 	if (!xdr_mode4(xdrs, objp))
6767c478bd9Sstevel@tonic-gate 		return (FALSE);
6777c478bd9Sstevel@tonic-gate 	return (TRUE);
6787c478bd9Sstevel@tonic-gate }
6797c478bd9Sstevel@tonic-gate 
6807c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_mounted_on_fileid(register XDR * xdrs,fattr4_mounted_on_fileid * objp)6817c478bd9Sstevel@tonic-gate xdr_fattr4_mounted_on_fileid(register XDR *xdrs, fattr4_mounted_on_fileid *objp)
6827c478bd9Sstevel@tonic-gate {
6837c478bd9Sstevel@tonic-gate 
6847c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
6857c478bd9Sstevel@tonic-gate 		return (FALSE);
6867c478bd9Sstevel@tonic-gate 	return (TRUE);
6877c478bd9Sstevel@tonic-gate }
6887c478bd9Sstevel@tonic-gate 
6897c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_no_trunc(register XDR * xdrs,fattr4_no_trunc * objp)6907c478bd9Sstevel@tonic-gate xdr_fattr4_no_trunc(register XDR *xdrs, fattr4_no_trunc *objp)
6917c478bd9Sstevel@tonic-gate {
6927c478bd9Sstevel@tonic-gate 
6937c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
6947c478bd9Sstevel@tonic-gate 		return (FALSE);
6957c478bd9Sstevel@tonic-gate 	return (TRUE);
6967c478bd9Sstevel@tonic-gate }
6977c478bd9Sstevel@tonic-gate 
6987c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_numlinks(register XDR * xdrs,fattr4_numlinks * objp)6997c478bd9Sstevel@tonic-gate xdr_fattr4_numlinks(register XDR *xdrs, fattr4_numlinks *objp)
7007c478bd9Sstevel@tonic-gate {
7017c478bd9Sstevel@tonic-gate 
7027c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, objp))
7037c478bd9Sstevel@tonic-gate 		return (FALSE);
7047c478bd9Sstevel@tonic-gate 	return (TRUE);
7057c478bd9Sstevel@tonic-gate }
7067c478bd9Sstevel@tonic-gate 
7077c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_owner(register XDR * xdrs,fattr4_owner * objp)7087c478bd9Sstevel@tonic-gate xdr_fattr4_owner(register XDR *xdrs, fattr4_owner *objp)
7097c478bd9Sstevel@tonic-gate {
7107c478bd9Sstevel@tonic-gate 
7117c478bd9Sstevel@tonic-gate 	if (!xdr_utf8string(xdrs, objp))
7127c478bd9Sstevel@tonic-gate 		return (FALSE);
7137c478bd9Sstevel@tonic-gate 	return (TRUE);
7147c478bd9Sstevel@tonic-gate }
7157c478bd9Sstevel@tonic-gate 
7167c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_owner_group(register XDR * xdrs,fattr4_owner_group * objp)7177c478bd9Sstevel@tonic-gate xdr_fattr4_owner_group(register XDR *xdrs, fattr4_owner_group *objp)
7187c478bd9Sstevel@tonic-gate {
7197c478bd9Sstevel@tonic-gate 
7207c478bd9Sstevel@tonic-gate 	if (!xdr_utf8string(xdrs, objp))
7217c478bd9Sstevel@tonic-gate 		return (FALSE);
7227c478bd9Sstevel@tonic-gate 	return (TRUE);
7237c478bd9Sstevel@tonic-gate }
7247c478bd9Sstevel@tonic-gate 
7257c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_quota_avail_hard(register XDR * xdrs,fattr4_quota_avail_hard * objp)7267c478bd9Sstevel@tonic-gate xdr_fattr4_quota_avail_hard(register XDR *xdrs, fattr4_quota_avail_hard *objp)
7277c478bd9Sstevel@tonic-gate {
7287c478bd9Sstevel@tonic-gate 
7297c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
7307c478bd9Sstevel@tonic-gate 		return (FALSE);
7317c478bd9Sstevel@tonic-gate 	return (TRUE);
7327c478bd9Sstevel@tonic-gate }
7337c478bd9Sstevel@tonic-gate 
7347c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_quota_avail_soft(register XDR * xdrs,fattr4_quota_avail_soft * objp)7357c478bd9Sstevel@tonic-gate xdr_fattr4_quota_avail_soft(register XDR *xdrs, fattr4_quota_avail_soft *objp)
7367c478bd9Sstevel@tonic-gate {
7377c478bd9Sstevel@tonic-gate 
7387c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
7397c478bd9Sstevel@tonic-gate 		return (FALSE);
7407c478bd9Sstevel@tonic-gate 	return (TRUE);
7417c478bd9Sstevel@tonic-gate }
7427c478bd9Sstevel@tonic-gate 
7437c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_quota_used(register XDR * xdrs,fattr4_quota_used * objp)7447c478bd9Sstevel@tonic-gate xdr_fattr4_quota_used(register XDR *xdrs, fattr4_quota_used *objp)
7457c478bd9Sstevel@tonic-gate {
7467c478bd9Sstevel@tonic-gate 
7477c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
7487c478bd9Sstevel@tonic-gate 		return (FALSE);
7497c478bd9Sstevel@tonic-gate 	return (TRUE);
7507c478bd9Sstevel@tonic-gate }
7517c478bd9Sstevel@tonic-gate 
7527c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_rawdev(register XDR * xdrs,fattr4_rawdev * objp)7537c478bd9Sstevel@tonic-gate xdr_fattr4_rawdev(register XDR *xdrs, fattr4_rawdev *objp)
7547c478bd9Sstevel@tonic-gate {
7557c478bd9Sstevel@tonic-gate 
7567c478bd9Sstevel@tonic-gate 	if (!xdr_specdata4(xdrs, objp))
7577c478bd9Sstevel@tonic-gate 		return (FALSE);
7587c478bd9Sstevel@tonic-gate 	return (TRUE);
7597c478bd9Sstevel@tonic-gate }
7607c478bd9Sstevel@tonic-gate 
7617c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_space_avail(register XDR * xdrs,fattr4_space_avail * objp)7627c478bd9Sstevel@tonic-gate xdr_fattr4_space_avail(register XDR *xdrs, fattr4_space_avail *objp)
7637c478bd9Sstevel@tonic-gate {
7647c478bd9Sstevel@tonic-gate 
7657c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
7667c478bd9Sstevel@tonic-gate 		return (FALSE);
7677c478bd9Sstevel@tonic-gate 	return (TRUE);
7687c478bd9Sstevel@tonic-gate }
7697c478bd9Sstevel@tonic-gate 
7707c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_space_free(register XDR * xdrs,fattr4_space_free * objp)7717c478bd9Sstevel@tonic-gate xdr_fattr4_space_free(register XDR *xdrs, fattr4_space_free *objp)
7727c478bd9Sstevel@tonic-gate {
7737c478bd9Sstevel@tonic-gate 
7747c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
7757c478bd9Sstevel@tonic-gate 		return (FALSE);
7767c478bd9Sstevel@tonic-gate 	return (TRUE);
7777c478bd9Sstevel@tonic-gate }
7787c478bd9Sstevel@tonic-gate 
7797c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_space_total(register XDR * xdrs,fattr4_space_total * objp)7807c478bd9Sstevel@tonic-gate xdr_fattr4_space_total(register XDR *xdrs, fattr4_space_total *objp)
7817c478bd9Sstevel@tonic-gate {
7827c478bd9Sstevel@tonic-gate 
7837c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
7847c478bd9Sstevel@tonic-gate 		return (FALSE);
7857c478bd9Sstevel@tonic-gate 	return (TRUE);
7867c478bd9Sstevel@tonic-gate }
7877c478bd9Sstevel@tonic-gate 
7887c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_space_used(register XDR * xdrs,fattr4_space_used * objp)7897c478bd9Sstevel@tonic-gate xdr_fattr4_space_used(register XDR *xdrs, fattr4_space_used *objp)
7907c478bd9Sstevel@tonic-gate {
7917c478bd9Sstevel@tonic-gate 
7927c478bd9Sstevel@tonic-gate 	if (!xdr_uint64_t(xdrs, objp))
7937c478bd9Sstevel@tonic-gate 		return (FALSE);
7947c478bd9Sstevel@tonic-gate 	return (TRUE);
7957c478bd9Sstevel@tonic-gate }
7967c478bd9Sstevel@tonic-gate 
7977c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_system(register XDR * xdrs,fattr4_system * objp)7987c478bd9Sstevel@tonic-gate xdr_fattr4_system(register XDR *xdrs, fattr4_system *objp)
7997c478bd9Sstevel@tonic-gate {
8007c478bd9Sstevel@tonic-gate 
8017c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, objp))
8027c478bd9Sstevel@tonic-gate 		return (FALSE);
8037c478bd9Sstevel@tonic-gate 	return (TRUE);
8047c478bd9Sstevel@tonic-gate }
8057c478bd9Sstevel@tonic-gate 
8067c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_time_access(register XDR * xdrs,fattr4_time_access * objp)8077c478bd9Sstevel@tonic-gate xdr_fattr4_time_access(register XDR *xdrs, fattr4_time_access *objp)
8087c478bd9Sstevel@tonic-gate {
8097c478bd9Sstevel@tonic-gate 
8107c478bd9Sstevel@tonic-gate 	if (!xdr_nfstime4(xdrs, objp))
8117c478bd9Sstevel@tonic-gate 		return (FALSE);
8127c478bd9Sstevel@tonic-gate 	return (TRUE);
8137c478bd9Sstevel@tonic-gate }
8147c478bd9Sstevel@tonic-gate 
8157c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_time_access_set(register XDR * xdrs,fattr4_time_access_set * objp)8167c478bd9Sstevel@tonic-gate xdr_fattr4_time_access_set(register XDR *xdrs, fattr4_time_access_set *objp)
8177c478bd9Sstevel@tonic-gate {
8187c478bd9Sstevel@tonic-gate 
8197c478bd9Sstevel@tonic-gate 	if (!xdr_settime4(xdrs, objp))
8207c478bd9Sstevel@tonic-gate 		return (FALSE);
8217c478bd9Sstevel@tonic-gate 	return (TRUE);
8227c478bd9Sstevel@tonic-gate }
8237c478bd9Sstevel@tonic-gate 
8247c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_time_backup(register XDR * xdrs,fattr4_time_backup * objp)8257c478bd9Sstevel@tonic-gate xdr_fattr4_time_backup(register XDR *xdrs, fattr4_time_backup *objp)
8267c478bd9Sstevel@tonic-gate {
8277c478bd9Sstevel@tonic-gate 
8287c478bd9Sstevel@tonic-gate 	if (!xdr_nfstime4(xdrs, objp))
8297c478bd9Sstevel@tonic-gate 		return (FALSE);
8307c478bd9Sstevel@tonic-gate 	return (TRUE);
8317c478bd9Sstevel@tonic-gate }
8327c478bd9Sstevel@tonic-gate 
8337c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_time_create(register XDR * xdrs,fattr4_time_create * objp)8347c478bd9Sstevel@tonic-gate xdr_fattr4_time_create(register XDR *xdrs, fattr4_time_create *objp)
8357c478bd9Sstevel@tonic-gate {
8367c478bd9Sstevel@tonic-gate 
8377c478bd9Sstevel@tonic-gate 	if (!xdr_nfstime4(xdrs, objp))
8387c478bd9Sstevel@tonic-gate 		return (FALSE);
8397c478bd9Sstevel@tonic-gate 	return (TRUE);
8407c478bd9Sstevel@tonic-gate }
8417c478bd9Sstevel@tonic-gate 
8427c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_time_delta(register XDR * xdrs,fattr4_time_delta * objp)8437c478bd9Sstevel@tonic-gate xdr_fattr4_time_delta(register XDR *xdrs, fattr4_time_delta *objp)
8447c478bd9Sstevel@tonic-gate {
8457c478bd9Sstevel@tonic-gate 
8467c478bd9Sstevel@tonic-gate 	if (!xdr_nfstime4(xdrs, objp))
8477c478bd9Sstevel@tonic-gate 		return (FALSE);
8487c478bd9Sstevel@tonic-gate 	return (TRUE);
8497c478bd9Sstevel@tonic-gate }
8507c478bd9Sstevel@tonic-gate 
8517c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_time_metadata(register XDR * xdrs,fattr4_time_metadata * objp)8527c478bd9Sstevel@tonic-gate xdr_fattr4_time_metadata(register XDR *xdrs, fattr4_time_metadata *objp)
8537c478bd9Sstevel@tonic-gate {
8547c478bd9Sstevel@tonic-gate 
8557c478bd9Sstevel@tonic-gate 	if (!xdr_nfstime4(xdrs, objp))
8567c478bd9Sstevel@tonic-gate 		return (FALSE);
8577c478bd9Sstevel@tonic-gate 	return (TRUE);
8587c478bd9Sstevel@tonic-gate }
8597c478bd9Sstevel@tonic-gate 
8607c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_time_modify(register XDR * xdrs,fattr4_time_modify * objp)8617c478bd9Sstevel@tonic-gate xdr_fattr4_time_modify(register XDR *xdrs, fattr4_time_modify *objp)
8627c478bd9Sstevel@tonic-gate {
8637c478bd9Sstevel@tonic-gate 
8647c478bd9Sstevel@tonic-gate 	if (!xdr_nfstime4(xdrs, objp))
8657c478bd9Sstevel@tonic-gate 		return (FALSE);
8667c478bd9Sstevel@tonic-gate 	return (TRUE);
8677c478bd9Sstevel@tonic-gate }
8687c478bd9Sstevel@tonic-gate 
8697c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4_time_modify_set(register XDR * xdrs,fattr4_time_modify_set * objp)8707c478bd9Sstevel@tonic-gate xdr_fattr4_time_modify_set(register XDR *xdrs, fattr4_time_modify_set *objp)
8717c478bd9Sstevel@tonic-gate {
8727c478bd9Sstevel@tonic-gate 
8737c478bd9Sstevel@tonic-gate 	if (!xdr_settime4(xdrs, objp))
8747c478bd9Sstevel@tonic-gate 		return (FALSE);
8757c478bd9Sstevel@tonic-gate 	return (TRUE);
8767c478bd9Sstevel@tonic-gate }
8777c478bd9Sstevel@tonic-gate 
8787c478bd9Sstevel@tonic-gate bool_t
xdr_attrlist4(register XDR * xdrs,attrlist4 * objp)8797c478bd9Sstevel@tonic-gate xdr_attrlist4(register XDR *xdrs, attrlist4 *objp)
8807c478bd9Sstevel@tonic-gate {
8817c478bd9Sstevel@tonic-gate 
8827c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->attrlist4_val,
883bbe876c0SMarcel Telka 	    (uint_t *)&objp->attrlist4_len, ~0))
8847c478bd9Sstevel@tonic-gate 		return (FALSE);
8857c478bd9Sstevel@tonic-gate 	return (TRUE);
8867c478bd9Sstevel@tonic-gate }
8877c478bd9Sstevel@tonic-gate 
8887c478bd9Sstevel@tonic-gate bool_t
xdr_fattr4(register XDR * xdrs,fattr4 * objp)8897c478bd9Sstevel@tonic-gate xdr_fattr4(register XDR *xdrs, fattr4 *objp)
8907c478bd9Sstevel@tonic-gate {
8917c478bd9Sstevel@tonic-gate 
8927c478bd9Sstevel@tonic-gate 	if (!xdr_bitmap4(xdrs, &objp->attrmask))
8937c478bd9Sstevel@tonic-gate 		return (FALSE);
8947c478bd9Sstevel@tonic-gate 	if (!xdr_attrlist4(xdrs, &objp->attr_vals))
8957c478bd9Sstevel@tonic-gate 		return (FALSE);
8967c478bd9Sstevel@tonic-gate 	return (TRUE);
8977c478bd9Sstevel@tonic-gate }
8987c478bd9Sstevel@tonic-gate 
8997c478bd9Sstevel@tonic-gate bool_t
xdr_change_info4(register XDR * xdrs,change_info4 * objp)9007c478bd9Sstevel@tonic-gate xdr_change_info4(register XDR *xdrs, change_info4 *objp)
9017c478bd9Sstevel@tonic-gate {
9027c478bd9Sstevel@tonic-gate 
9037c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->atomic))
9047c478bd9Sstevel@tonic-gate 		return (FALSE);
9057c478bd9Sstevel@tonic-gate 	if (!xdr_changeid4(xdrs, &objp->before))
9067c478bd9Sstevel@tonic-gate 		return (FALSE);
9077c478bd9Sstevel@tonic-gate 	if (!xdr_changeid4(xdrs, &objp->after))
9087c478bd9Sstevel@tonic-gate 		return (FALSE);
9097c478bd9Sstevel@tonic-gate 	return (TRUE);
9107c478bd9Sstevel@tonic-gate }
9117c478bd9Sstevel@tonic-gate 
9127c478bd9Sstevel@tonic-gate bool_t
xdr_clientaddr4(register XDR * xdrs,clientaddr4 * objp)9137c478bd9Sstevel@tonic-gate xdr_clientaddr4(register XDR *xdrs, clientaddr4 *objp)
9147c478bd9Sstevel@tonic-gate {
9157c478bd9Sstevel@tonic-gate 
916*f44e1126SVitaliy Gusev 	if (!xdr_string(xdrs, &objp->na_r_netid, ~0))
9177c478bd9Sstevel@tonic-gate 		return (FALSE);
918*f44e1126SVitaliy Gusev 	if (!xdr_string(xdrs, &objp->na_r_addr, ~0))
9197c478bd9Sstevel@tonic-gate 		return (FALSE);
9207c478bd9Sstevel@tonic-gate 	return (TRUE);
9217c478bd9Sstevel@tonic-gate }
9227c478bd9Sstevel@tonic-gate 
9237c478bd9Sstevel@tonic-gate bool_t
xdr_cb_client4(register XDR * xdrs,cb_client4 * objp)9247c478bd9Sstevel@tonic-gate xdr_cb_client4(register XDR *xdrs, cb_client4 *objp)
9257c478bd9Sstevel@tonic-gate {
9267c478bd9Sstevel@tonic-gate 
927bbe876c0SMarcel Telka 	if (!xdr_u_int(xdrs, &objp->cb_program))
9287c478bd9Sstevel@tonic-gate 		return (FALSE);
9297c478bd9Sstevel@tonic-gate 	if (!xdr_clientaddr4(xdrs, &objp->cb_location))
9307c478bd9Sstevel@tonic-gate 		return (FALSE);
9317c478bd9Sstevel@tonic-gate 	return (TRUE);
9327c478bd9Sstevel@tonic-gate }
9337c478bd9Sstevel@tonic-gate 
9347c478bd9Sstevel@tonic-gate bool_t
xdr_stateid4(register XDR * xdrs,stateid4 * objp)9357c478bd9Sstevel@tonic-gate xdr_stateid4(register XDR *xdrs, stateid4 *objp)
9367c478bd9Sstevel@tonic-gate {
9377c478bd9Sstevel@tonic-gate 
9387c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->seqid))
9397c478bd9Sstevel@tonic-gate 		return (FALSE);
9407c478bd9Sstevel@tonic-gate 	if (!xdr_opaque(xdrs, objp->other, 12))
9417c478bd9Sstevel@tonic-gate 		return (FALSE);
9427c478bd9Sstevel@tonic-gate 	return (TRUE);
9437c478bd9Sstevel@tonic-gate }
9447c478bd9Sstevel@tonic-gate 
9457c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_client_id4(register XDR * xdrs,nfs_client_id4 * objp)9467c478bd9Sstevel@tonic-gate xdr_nfs_client_id4(register XDR *xdrs, nfs_client_id4 *objp)
9477c478bd9Sstevel@tonic-gate {
9487c478bd9Sstevel@tonic-gate 
9497c478bd9Sstevel@tonic-gate 	if (!xdr_verifier4(xdrs, objp->verifier))
9507c478bd9Sstevel@tonic-gate 		return (FALSE);
9517c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->id.id_val,
952bbe876c0SMarcel Telka 	    (uint_t *)&objp->id.id_len, NFS4_OPAQUE_LIMIT))
9537c478bd9Sstevel@tonic-gate 		return (FALSE);
9547c478bd9Sstevel@tonic-gate 	return (TRUE);
9557c478bd9Sstevel@tonic-gate }
9567c478bd9Sstevel@tonic-gate 
9577c478bd9Sstevel@tonic-gate bool_t
xdr_open_owner4(register XDR * xdrs,open_owner4 * objp)9587c478bd9Sstevel@tonic-gate xdr_open_owner4(register XDR *xdrs, open_owner4 *objp)
9597c478bd9Sstevel@tonic-gate {
9607c478bd9Sstevel@tonic-gate 
9617c478bd9Sstevel@tonic-gate 	if (!xdr_clientid4(xdrs, &objp->clientid))
9627c478bd9Sstevel@tonic-gate 		return (FALSE);
9637c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->owner.owner_val,
964bbe876c0SMarcel Telka 	    (uint_t *)&objp->owner.owner_len, NFS4_OPAQUE_LIMIT))
9657c478bd9Sstevel@tonic-gate 		return (FALSE);
9667c478bd9Sstevel@tonic-gate 	return (TRUE);
9677c478bd9Sstevel@tonic-gate }
9687c478bd9Sstevel@tonic-gate 
9697c478bd9Sstevel@tonic-gate bool_t
xdr_lock_owner4(register XDR * xdrs,lock_owner4 * objp)9707c478bd9Sstevel@tonic-gate xdr_lock_owner4(register XDR *xdrs, lock_owner4 *objp)
9717c478bd9Sstevel@tonic-gate {
9727c478bd9Sstevel@tonic-gate 
9737c478bd9Sstevel@tonic-gate 	if (!xdr_clientid4(xdrs, &objp->clientid))
9747c478bd9Sstevel@tonic-gate 		return (FALSE);
9757c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->owner.owner_val,
976bbe876c0SMarcel Telka 	    (uint_t *)&objp->owner.owner_len, NFS4_OPAQUE_LIMIT))
9777c478bd9Sstevel@tonic-gate 		return (FALSE);
9787c478bd9Sstevel@tonic-gate 	return (TRUE);
9797c478bd9Sstevel@tonic-gate }
9807c478bd9Sstevel@tonic-gate 
9817c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_lock_type4(register XDR * xdrs,nfs_lock_type4 * objp)9827c478bd9Sstevel@tonic-gate xdr_nfs_lock_type4(register XDR *xdrs, nfs_lock_type4 *objp)
9837c478bd9Sstevel@tonic-gate {
9847c478bd9Sstevel@tonic-gate 
9857c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
9867c478bd9Sstevel@tonic-gate 		return (FALSE);
9877c478bd9Sstevel@tonic-gate 	return (TRUE);
9887c478bd9Sstevel@tonic-gate }
9897c478bd9Sstevel@tonic-gate 
9907c478bd9Sstevel@tonic-gate bool_t
xdr_ACCESS4args(register XDR * xdrs,ACCESS4args * objp)9917c478bd9Sstevel@tonic-gate xdr_ACCESS4args(register XDR *xdrs, ACCESS4args *objp)
9927c478bd9Sstevel@tonic-gate {
9937c478bd9Sstevel@tonic-gate 
9947c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->access))
9957c478bd9Sstevel@tonic-gate 		return (FALSE);
9967c478bd9Sstevel@tonic-gate 	return (TRUE);
9977c478bd9Sstevel@tonic-gate }
9987c478bd9Sstevel@tonic-gate 
9997c478bd9Sstevel@tonic-gate bool_t
xdr_ACCESS4resok(register XDR * xdrs,ACCESS4resok * objp)10007c478bd9Sstevel@tonic-gate xdr_ACCESS4resok(register XDR *xdrs, ACCESS4resok *objp)
10017c478bd9Sstevel@tonic-gate {
10027c478bd9Sstevel@tonic-gate 
10037c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->supported))
10047c478bd9Sstevel@tonic-gate 		return (FALSE);
10057c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->access))
10067c478bd9Sstevel@tonic-gate 		return (FALSE);
10077c478bd9Sstevel@tonic-gate 	return (TRUE);
10087c478bd9Sstevel@tonic-gate }
10097c478bd9Sstevel@tonic-gate 
10107c478bd9Sstevel@tonic-gate bool_t
xdr_ACCESS4res(register XDR * xdrs,ACCESS4res * objp)10117c478bd9Sstevel@tonic-gate xdr_ACCESS4res(register XDR *xdrs, ACCESS4res *objp)
10127c478bd9Sstevel@tonic-gate {
10137c478bd9Sstevel@tonic-gate 
10147c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
10157c478bd9Sstevel@tonic-gate 		return (FALSE);
10167c478bd9Sstevel@tonic-gate 	switch (objp->status) {
10177c478bd9Sstevel@tonic-gate 	case NFS4_OK:
10187c478bd9Sstevel@tonic-gate 		if (!xdr_ACCESS4resok(xdrs, &objp->ACCESS4res_u.resok4))
10197c478bd9Sstevel@tonic-gate 			return (FALSE);
10207c478bd9Sstevel@tonic-gate 		break;
10217c478bd9Sstevel@tonic-gate 	}
10227c478bd9Sstevel@tonic-gate 	return (TRUE);
10237c478bd9Sstevel@tonic-gate }
10247c478bd9Sstevel@tonic-gate 
10257c478bd9Sstevel@tonic-gate bool_t
xdr_CLOSE4args(register XDR * xdrs,CLOSE4args * objp)10267c478bd9Sstevel@tonic-gate xdr_CLOSE4args(register XDR *xdrs, CLOSE4args *objp)
10277c478bd9Sstevel@tonic-gate {
10287c478bd9Sstevel@tonic-gate 
10297c478bd9Sstevel@tonic-gate 	if (!xdr_seqid4(xdrs, &objp->seqid))
10307c478bd9Sstevel@tonic-gate 		return (FALSE);
10317c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->open_stateid))
10327c478bd9Sstevel@tonic-gate 		return (FALSE);
10337c478bd9Sstevel@tonic-gate 	return (TRUE);
10347c478bd9Sstevel@tonic-gate }
10357c478bd9Sstevel@tonic-gate 
10367c478bd9Sstevel@tonic-gate bool_t
xdr_CLOSE4res(register XDR * xdrs,CLOSE4res * objp)10377c478bd9Sstevel@tonic-gate xdr_CLOSE4res(register XDR *xdrs, CLOSE4res *objp)
10387c478bd9Sstevel@tonic-gate {
10397c478bd9Sstevel@tonic-gate 
10407c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
10417c478bd9Sstevel@tonic-gate 		return (FALSE);
10427c478bd9Sstevel@tonic-gate 	switch (objp->status) {
10437c478bd9Sstevel@tonic-gate 	case NFS4_OK:
10447c478bd9Sstevel@tonic-gate 		if (!xdr_stateid4(xdrs, &objp->CLOSE4res_u.open_stateid))
10457c478bd9Sstevel@tonic-gate 			return (FALSE);
10467c478bd9Sstevel@tonic-gate 		break;
10477c478bd9Sstevel@tonic-gate 	}
10487c478bd9Sstevel@tonic-gate 	return (TRUE);
10497c478bd9Sstevel@tonic-gate }
10507c478bd9Sstevel@tonic-gate 
10517c478bd9Sstevel@tonic-gate bool_t
xdr_COMMIT4args(register XDR * xdrs,COMMIT4args * objp)10527c478bd9Sstevel@tonic-gate xdr_COMMIT4args(register XDR *xdrs, COMMIT4args *objp)
10537c478bd9Sstevel@tonic-gate {
10547c478bd9Sstevel@tonic-gate 
10557c478bd9Sstevel@tonic-gate 	if (!xdr_offset4(xdrs, &objp->offset))
10567c478bd9Sstevel@tonic-gate 		return (FALSE);
10577c478bd9Sstevel@tonic-gate 	if (!xdr_count4(xdrs, &objp->count))
10587c478bd9Sstevel@tonic-gate 		return (FALSE);
10597c478bd9Sstevel@tonic-gate 	return (TRUE);
10607c478bd9Sstevel@tonic-gate }
10617c478bd9Sstevel@tonic-gate 
10627c478bd9Sstevel@tonic-gate bool_t
xdr_COMMIT4resok(register XDR * xdrs,COMMIT4resok * objp)10637c478bd9Sstevel@tonic-gate xdr_COMMIT4resok(register XDR *xdrs, COMMIT4resok *objp)
10647c478bd9Sstevel@tonic-gate {
10657c478bd9Sstevel@tonic-gate 
10667c478bd9Sstevel@tonic-gate 	if (!xdr_verifier4(xdrs, objp->writeverf))
10677c478bd9Sstevel@tonic-gate 		return (FALSE);
10687c478bd9Sstevel@tonic-gate 	return (TRUE);
10697c478bd9Sstevel@tonic-gate }
10707c478bd9Sstevel@tonic-gate 
10717c478bd9Sstevel@tonic-gate bool_t
xdr_COMMIT4res(register XDR * xdrs,COMMIT4res * objp)10727c478bd9Sstevel@tonic-gate xdr_COMMIT4res(register XDR *xdrs, COMMIT4res *objp)
10737c478bd9Sstevel@tonic-gate {
10747c478bd9Sstevel@tonic-gate 
10757c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
10767c478bd9Sstevel@tonic-gate 		return (FALSE);
10777c478bd9Sstevel@tonic-gate 	switch (objp->status) {
10787c478bd9Sstevel@tonic-gate 	case NFS4_OK:
10797c478bd9Sstevel@tonic-gate 		if (!xdr_COMMIT4resok(xdrs, &objp->COMMIT4res_u.resok4))
10807c478bd9Sstevel@tonic-gate 			return (FALSE);
10817c478bd9Sstevel@tonic-gate 		break;
10827c478bd9Sstevel@tonic-gate 	}
10837c478bd9Sstevel@tonic-gate 	return (TRUE);
10847c478bd9Sstevel@tonic-gate }
10857c478bd9Sstevel@tonic-gate 
10867c478bd9Sstevel@tonic-gate bool_t
xdr_createtype4(register XDR * xdrs,createtype4 * objp)10877c478bd9Sstevel@tonic-gate xdr_createtype4(register XDR *xdrs, createtype4 *objp)
10887c478bd9Sstevel@tonic-gate {
10897c478bd9Sstevel@tonic-gate 
10907c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_ftype4(xdrs, &objp->type))
10917c478bd9Sstevel@tonic-gate 		return (FALSE);
10927c478bd9Sstevel@tonic-gate 	switch (objp->type) {
10937c478bd9Sstevel@tonic-gate 	case NF4LNK:
10947c478bd9Sstevel@tonic-gate 		if (!xdr_linktext4(xdrs, &objp->createtype4_u.linkdata))
10957c478bd9Sstevel@tonic-gate 			return (FALSE);
10967c478bd9Sstevel@tonic-gate 		break;
10977c478bd9Sstevel@tonic-gate 	case NF4BLK:
10987c478bd9Sstevel@tonic-gate 	case NF4CHR:
10997c478bd9Sstevel@tonic-gate 		if (!xdr_specdata4(xdrs, &objp->createtype4_u.devdata))
11007c478bd9Sstevel@tonic-gate 			return (FALSE);
11017c478bd9Sstevel@tonic-gate 		break;
11027c478bd9Sstevel@tonic-gate 	case NF4SOCK:
11037c478bd9Sstevel@tonic-gate 	case NF4FIFO:
11047c478bd9Sstevel@tonic-gate 	case NF4DIR:
11057c478bd9Sstevel@tonic-gate 		break;
11067c478bd9Sstevel@tonic-gate 	}
11077c478bd9Sstevel@tonic-gate 	return (TRUE);
11087c478bd9Sstevel@tonic-gate }
11097c478bd9Sstevel@tonic-gate 
11107c478bd9Sstevel@tonic-gate bool_t
xdr_CREATE4args(register XDR * xdrs,CREATE4args * objp)11117c478bd9Sstevel@tonic-gate xdr_CREATE4args(register XDR *xdrs, CREATE4args *objp)
11127c478bd9Sstevel@tonic-gate {
11137c478bd9Sstevel@tonic-gate 
11147c478bd9Sstevel@tonic-gate 	if (!xdr_createtype4(xdrs, &objp->objtype))
11157c478bd9Sstevel@tonic-gate 		return (FALSE);
11167c478bd9Sstevel@tonic-gate 	if (!xdr_component4(xdrs, &objp->objname))
11177c478bd9Sstevel@tonic-gate 		return (FALSE);
11187c478bd9Sstevel@tonic-gate 	if (!xdr_fattr4(xdrs, &objp->createattrs))
11197c478bd9Sstevel@tonic-gate 		return (FALSE);
11207c478bd9Sstevel@tonic-gate 	return (TRUE);
11217c478bd9Sstevel@tonic-gate }
11227c478bd9Sstevel@tonic-gate 
11237c478bd9Sstevel@tonic-gate bool_t
xdr_CREATE4resok(register XDR * xdrs,CREATE4resok * objp)11247c478bd9Sstevel@tonic-gate xdr_CREATE4resok(register XDR *xdrs, CREATE4resok *objp)
11257c478bd9Sstevel@tonic-gate {
11267c478bd9Sstevel@tonic-gate 
11277c478bd9Sstevel@tonic-gate 	if (!xdr_change_info4(xdrs, &objp->cinfo))
11287c478bd9Sstevel@tonic-gate 		return (FALSE);
11297c478bd9Sstevel@tonic-gate 	if (!xdr_bitmap4(xdrs, &objp->attrset))
11307c478bd9Sstevel@tonic-gate 		return (FALSE);
11317c478bd9Sstevel@tonic-gate 	return (TRUE);
11327c478bd9Sstevel@tonic-gate }
11337c478bd9Sstevel@tonic-gate 
11347c478bd9Sstevel@tonic-gate bool_t
xdr_CREATE4res(register XDR * xdrs,CREATE4res * objp)11357c478bd9Sstevel@tonic-gate xdr_CREATE4res(register XDR *xdrs, CREATE4res *objp)
11367c478bd9Sstevel@tonic-gate {
11377c478bd9Sstevel@tonic-gate 
11387c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
11397c478bd9Sstevel@tonic-gate 		return (FALSE);
11407c478bd9Sstevel@tonic-gate 	switch (objp->status) {
11417c478bd9Sstevel@tonic-gate 	case NFS4_OK:
11427c478bd9Sstevel@tonic-gate 		if (!xdr_CREATE4resok(xdrs, &objp->CREATE4res_u.resok4))
11437c478bd9Sstevel@tonic-gate 			return (FALSE);
11447c478bd9Sstevel@tonic-gate 		break;
11457c478bd9Sstevel@tonic-gate 	}
11467c478bd9Sstevel@tonic-gate 	return (TRUE);
11477c478bd9Sstevel@tonic-gate }
11487c478bd9Sstevel@tonic-gate 
11497c478bd9Sstevel@tonic-gate bool_t
xdr_DELEGPURGE4args(register XDR * xdrs,DELEGPURGE4args * objp)11507c478bd9Sstevel@tonic-gate xdr_DELEGPURGE4args(register XDR *xdrs, DELEGPURGE4args *objp)
11517c478bd9Sstevel@tonic-gate {
11527c478bd9Sstevel@tonic-gate 
11537c478bd9Sstevel@tonic-gate 	if (!xdr_clientid4(xdrs, &objp->clientid))
11547c478bd9Sstevel@tonic-gate 		return (FALSE);
11557c478bd9Sstevel@tonic-gate 	return (TRUE);
11567c478bd9Sstevel@tonic-gate }
11577c478bd9Sstevel@tonic-gate 
11587c478bd9Sstevel@tonic-gate bool_t
xdr_DELEGPURGE4res(register XDR * xdrs,DELEGPURGE4res * objp)11597c478bd9Sstevel@tonic-gate xdr_DELEGPURGE4res(register XDR *xdrs, DELEGPURGE4res *objp)
11607c478bd9Sstevel@tonic-gate {
11617c478bd9Sstevel@tonic-gate 
11627c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
11637c478bd9Sstevel@tonic-gate 		return (FALSE);
11647c478bd9Sstevel@tonic-gate 	return (TRUE);
11657c478bd9Sstevel@tonic-gate }
11667c478bd9Sstevel@tonic-gate 
11677c478bd9Sstevel@tonic-gate bool_t
xdr_DELEGRETURN4args(register XDR * xdrs,DELEGRETURN4args * objp)11687c478bd9Sstevel@tonic-gate xdr_DELEGRETURN4args(register XDR *xdrs, DELEGRETURN4args *objp)
11697c478bd9Sstevel@tonic-gate {
11707c478bd9Sstevel@tonic-gate 
11717c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->deleg_stateid))
11727c478bd9Sstevel@tonic-gate 		return (FALSE);
11737c478bd9Sstevel@tonic-gate 	return (TRUE);
11747c478bd9Sstevel@tonic-gate }
11757c478bd9Sstevel@tonic-gate 
11767c478bd9Sstevel@tonic-gate bool_t
xdr_DELEGRETURN4res(register XDR * xdrs,DELEGRETURN4res * objp)11777c478bd9Sstevel@tonic-gate xdr_DELEGRETURN4res(register XDR *xdrs, DELEGRETURN4res *objp)
11787c478bd9Sstevel@tonic-gate {
11797c478bd9Sstevel@tonic-gate 
11807c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
11817c478bd9Sstevel@tonic-gate 		return (FALSE);
11827c478bd9Sstevel@tonic-gate 	return (TRUE);
11837c478bd9Sstevel@tonic-gate }
11847c478bd9Sstevel@tonic-gate 
11857c478bd9Sstevel@tonic-gate bool_t
xdr_GETATTR4args(register XDR * xdrs,GETATTR4args * objp)11867c478bd9Sstevel@tonic-gate xdr_GETATTR4args(register XDR *xdrs, GETATTR4args *objp)
11877c478bd9Sstevel@tonic-gate {
11887c478bd9Sstevel@tonic-gate 
11897c478bd9Sstevel@tonic-gate 	if (!xdr_bitmap4(xdrs, &objp->attr_request))
11907c478bd9Sstevel@tonic-gate 		return (FALSE);
11917c478bd9Sstevel@tonic-gate 	return (TRUE);
11927c478bd9Sstevel@tonic-gate }
11937c478bd9Sstevel@tonic-gate 
11947c478bd9Sstevel@tonic-gate bool_t
xdr_GETATTR4resok(register XDR * xdrs,GETATTR4resok * objp)11957c478bd9Sstevel@tonic-gate xdr_GETATTR4resok(register XDR *xdrs, GETATTR4resok *objp)
11967c478bd9Sstevel@tonic-gate {
11977c478bd9Sstevel@tonic-gate 
11987c478bd9Sstevel@tonic-gate 	if (!xdr_fattr4(xdrs, &objp->obj_attributes))
11997c478bd9Sstevel@tonic-gate 		return (FALSE);
12007c478bd9Sstevel@tonic-gate 	return (TRUE);
12017c478bd9Sstevel@tonic-gate }
12027c478bd9Sstevel@tonic-gate 
12037c478bd9Sstevel@tonic-gate bool_t
xdr_GETATTR4res(register XDR * xdrs,GETATTR4res * objp)12047c478bd9Sstevel@tonic-gate xdr_GETATTR4res(register XDR *xdrs, GETATTR4res *objp)
12057c478bd9Sstevel@tonic-gate {
12067c478bd9Sstevel@tonic-gate 
12077c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
12087c478bd9Sstevel@tonic-gate 		return (FALSE);
12097c478bd9Sstevel@tonic-gate 	switch (objp->status) {
12107c478bd9Sstevel@tonic-gate 	case NFS4_OK:
12117c478bd9Sstevel@tonic-gate 		if (!xdr_GETATTR4resok(xdrs, &objp->GETATTR4res_u.resok4))
12127c478bd9Sstevel@tonic-gate 			return (FALSE);
12137c478bd9Sstevel@tonic-gate 		break;
12147c478bd9Sstevel@tonic-gate 	}
12157c478bd9Sstevel@tonic-gate 	return (TRUE);
12167c478bd9Sstevel@tonic-gate }
12177c478bd9Sstevel@tonic-gate 
12187c478bd9Sstevel@tonic-gate bool_t
xdr_GETFH4resok(register XDR * xdrs,GETFH4resok * objp)12197c478bd9Sstevel@tonic-gate xdr_GETFH4resok(register XDR *xdrs, GETFH4resok *objp)
12207c478bd9Sstevel@tonic-gate {
12217c478bd9Sstevel@tonic-gate 
12227c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_fh4(xdrs, &objp->object))
12237c478bd9Sstevel@tonic-gate 		return (FALSE);
12247c478bd9Sstevel@tonic-gate 	return (TRUE);
12257c478bd9Sstevel@tonic-gate }
12267c478bd9Sstevel@tonic-gate 
12277c478bd9Sstevel@tonic-gate bool_t
xdr_GETFH4res(register XDR * xdrs,GETFH4res * objp)12287c478bd9Sstevel@tonic-gate xdr_GETFH4res(register XDR *xdrs, GETFH4res *objp)
12297c478bd9Sstevel@tonic-gate {
12307c478bd9Sstevel@tonic-gate 
12317c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
12327c478bd9Sstevel@tonic-gate 		return (FALSE);
12337c478bd9Sstevel@tonic-gate 	switch (objp->status) {
12347c478bd9Sstevel@tonic-gate 	case NFS4_OK:
12357c478bd9Sstevel@tonic-gate 		if (!xdr_GETFH4resok(xdrs, &objp->GETFH4res_u.resok4))
12367c478bd9Sstevel@tonic-gate 			return (FALSE);
12377c478bd9Sstevel@tonic-gate 		break;
12387c478bd9Sstevel@tonic-gate 	}
12397c478bd9Sstevel@tonic-gate 	return (TRUE);
12407c478bd9Sstevel@tonic-gate }
12417c478bd9Sstevel@tonic-gate 
12427c478bd9Sstevel@tonic-gate bool_t
xdr_LINK4args(register XDR * xdrs,LINK4args * objp)12437c478bd9Sstevel@tonic-gate xdr_LINK4args(register XDR *xdrs, LINK4args *objp)
12447c478bd9Sstevel@tonic-gate {
12457c478bd9Sstevel@tonic-gate 
12467c478bd9Sstevel@tonic-gate 	if (!xdr_component4(xdrs, &objp->newname))
12477c478bd9Sstevel@tonic-gate 		return (FALSE);
12487c478bd9Sstevel@tonic-gate 	return (TRUE);
12497c478bd9Sstevel@tonic-gate }
12507c478bd9Sstevel@tonic-gate 
12517c478bd9Sstevel@tonic-gate bool_t
xdr_LINK4resok(register XDR * xdrs,LINK4resok * objp)12527c478bd9Sstevel@tonic-gate xdr_LINK4resok(register XDR *xdrs, LINK4resok *objp)
12537c478bd9Sstevel@tonic-gate {
12547c478bd9Sstevel@tonic-gate 
12557c478bd9Sstevel@tonic-gate 	if (!xdr_change_info4(xdrs, &objp->cinfo))
12567c478bd9Sstevel@tonic-gate 		return (FALSE);
12577c478bd9Sstevel@tonic-gate 	return (TRUE);
12587c478bd9Sstevel@tonic-gate }
12597c478bd9Sstevel@tonic-gate 
12607c478bd9Sstevel@tonic-gate bool_t
xdr_LINK4res(register XDR * xdrs,LINK4res * objp)12617c478bd9Sstevel@tonic-gate xdr_LINK4res(register XDR *xdrs, LINK4res *objp)
12627c478bd9Sstevel@tonic-gate {
12637c478bd9Sstevel@tonic-gate 
12647c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
12657c478bd9Sstevel@tonic-gate 		return (FALSE);
12667c478bd9Sstevel@tonic-gate 	switch (objp->status) {
12677c478bd9Sstevel@tonic-gate 	case NFS4_OK:
12687c478bd9Sstevel@tonic-gate 		if (!xdr_LINK4resok(xdrs, &objp->LINK4res_u.resok4))
12697c478bd9Sstevel@tonic-gate 			return (FALSE);
12707c478bd9Sstevel@tonic-gate 		break;
12717c478bd9Sstevel@tonic-gate 	}
12727c478bd9Sstevel@tonic-gate 	return (TRUE);
12737c478bd9Sstevel@tonic-gate }
12747c478bd9Sstevel@tonic-gate 
12757c478bd9Sstevel@tonic-gate bool_t
xdr_open_to_lock_owner4(register XDR * xdrs,open_to_lock_owner4 * objp)12767c478bd9Sstevel@tonic-gate xdr_open_to_lock_owner4(register XDR *xdrs, open_to_lock_owner4 *objp)
12777c478bd9Sstevel@tonic-gate {
12787c478bd9Sstevel@tonic-gate 
12797c478bd9Sstevel@tonic-gate 	if (!xdr_seqid4(xdrs, &objp->open_seqid))
12807c478bd9Sstevel@tonic-gate 		return (FALSE);
12817c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->open_stateid))
12827c478bd9Sstevel@tonic-gate 		return (FALSE);
12837c478bd9Sstevel@tonic-gate 	if (!xdr_seqid4(xdrs, &objp->lock_seqid))
12847c478bd9Sstevel@tonic-gate 		return (FALSE);
12857c478bd9Sstevel@tonic-gate 	if (!xdr_lock_owner4(xdrs, &objp->lock_owner))
12867c478bd9Sstevel@tonic-gate 		return (FALSE);
12877c478bd9Sstevel@tonic-gate 	return (TRUE);
12887c478bd9Sstevel@tonic-gate }
12897c478bd9Sstevel@tonic-gate 
12907c478bd9Sstevel@tonic-gate bool_t
xdr_exist_lock_owner4(register XDR * xdrs,exist_lock_owner4 * objp)12917c478bd9Sstevel@tonic-gate xdr_exist_lock_owner4(register XDR *xdrs, exist_lock_owner4 *objp)
12927c478bd9Sstevel@tonic-gate {
12937c478bd9Sstevel@tonic-gate 
12947c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->lock_stateid))
12957c478bd9Sstevel@tonic-gate 		return (FALSE);
12967c478bd9Sstevel@tonic-gate 	if (!xdr_seqid4(xdrs, &objp->lock_seqid))
12977c478bd9Sstevel@tonic-gate 		return (FALSE);
12987c478bd9Sstevel@tonic-gate 	return (TRUE);
12997c478bd9Sstevel@tonic-gate }
13007c478bd9Sstevel@tonic-gate 
13017c478bd9Sstevel@tonic-gate bool_t
xdr_locker4(register XDR * xdrs,locker4 * objp)13027c478bd9Sstevel@tonic-gate xdr_locker4(register XDR *xdrs, locker4 *objp)
13037c478bd9Sstevel@tonic-gate {
13047c478bd9Sstevel@tonic-gate 
13057c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->new_lock_owner))
13067c478bd9Sstevel@tonic-gate 		return (FALSE);
13077c478bd9Sstevel@tonic-gate 	switch (objp->new_lock_owner) {
13087c478bd9Sstevel@tonic-gate 	case TRUE:
13097c478bd9Sstevel@tonic-gate 		if (!xdr_open_to_lock_owner4(xdrs, &objp->locker4_u.open_owner))
13107c478bd9Sstevel@tonic-gate 			return (FALSE);
13117c478bd9Sstevel@tonic-gate 		break;
13127c478bd9Sstevel@tonic-gate 	case FALSE:
13137c478bd9Sstevel@tonic-gate 		if (!xdr_exist_lock_owner4(xdrs, &objp->locker4_u.lock_owner))
13147c478bd9Sstevel@tonic-gate 			return (FALSE);
13157c478bd9Sstevel@tonic-gate 		break;
13167c478bd9Sstevel@tonic-gate 	default:
13177c478bd9Sstevel@tonic-gate 		return (FALSE);
13187c478bd9Sstevel@tonic-gate 	}
13197c478bd9Sstevel@tonic-gate 	return (TRUE);
13207c478bd9Sstevel@tonic-gate }
13217c478bd9Sstevel@tonic-gate 
13227c478bd9Sstevel@tonic-gate bool_t
xdr_LOCK4args(register XDR * xdrs,LOCK4args * objp)13237c478bd9Sstevel@tonic-gate xdr_LOCK4args(register XDR *xdrs, LOCK4args *objp)
13247c478bd9Sstevel@tonic-gate {
13257c478bd9Sstevel@tonic-gate 
13267c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_lock_type4(xdrs, &objp->locktype))
13277c478bd9Sstevel@tonic-gate 		return (FALSE);
13287c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->reclaim))
13297c478bd9Sstevel@tonic-gate 		return (FALSE);
13307c478bd9Sstevel@tonic-gate 	if (!xdr_offset4(xdrs, &objp->offset))
13317c478bd9Sstevel@tonic-gate 		return (FALSE);
13327c478bd9Sstevel@tonic-gate 	if (!xdr_length4(xdrs, &objp->length))
13337c478bd9Sstevel@tonic-gate 		return (FALSE);
13347c478bd9Sstevel@tonic-gate 	if (!xdr_locker4(xdrs, &objp->locker))
13357c478bd9Sstevel@tonic-gate 		return (FALSE);
13367c478bd9Sstevel@tonic-gate 	return (TRUE);
13377c478bd9Sstevel@tonic-gate }
13387c478bd9Sstevel@tonic-gate 
13397c478bd9Sstevel@tonic-gate bool_t
xdr_LOCK4denied(register XDR * xdrs,LOCK4denied * objp)13407c478bd9Sstevel@tonic-gate xdr_LOCK4denied(register XDR *xdrs, LOCK4denied *objp)
13417c478bd9Sstevel@tonic-gate {
13427c478bd9Sstevel@tonic-gate 
13437c478bd9Sstevel@tonic-gate 	if (!xdr_offset4(xdrs, &objp->offset))
13447c478bd9Sstevel@tonic-gate 		return (FALSE);
13457c478bd9Sstevel@tonic-gate 	if (!xdr_length4(xdrs, &objp->length))
13467c478bd9Sstevel@tonic-gate 		return (FALSE);
13477c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_lock_type4(xdrs, &objp->locktype))
13487c478bd9Sstevel@tonic-gate 		return (FALSE);
13497c478bd9Sstevel@tonic-gate 	if (!xdr_lock_owner4(xdrs, &objp->owner))
13507c478bd9Sstevel@tonic-gate 		return (FALSE);
13517c478bd9Sstevel@tonic-gate 	return (TRUE);
13527c478bd9Sstevel@tonic-gate }
13537c478bd9Sstevel@tonic-gate 
13547c478bd9Sstevel@tonic-gate bool_t
xdr_LOCK4resok(register XDR * xdrs,LOCK4resok * objp)13557c478bd9Sstevel@tonic-gate xdr_LOCK4resok(register XDR *xdrs, LOCK4resok *objp)
13567c478bd9Sstevel@tonic-gate {
13577c478bd9Sstevel@tonic-gate 
13587c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->lock_stateid))
13597c478bd9Sstevel@tonic-gate 		return (FALSE);
13607c478bd9Sstevel@tonic-gate 	return (TRUE);
13617c478bd9Sstevel@tonic-gate }
13627c478bd9Sstevel@tonic-gate 
13637c478bd9Sstevel@tonic-gate bool_t
xdr_LOCK4res(register XDR * xdrs,LOCK4res * objp)13647c478bd9Sstevel@tonic-gate xdr_LOCK4res(register XDR *xdrs, LOCK4res *objp)
13657c478bd9Sstevel@tonic-gate {
13667c478bd9Sstevel@tonic-gate 
13677c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
13687c478bd9Sstevel@tonic-gate 		return (FALSE);
13697c478bd9Sstevel@tonic-gate 	switch (objp->status) {
13707c478bd9Sstevel@tonic-gate 	case NFS4_OK:
13717c478bd9Sstevel@tonic-gate 		if (!xdr_LOCK4resok(xdrs, &objp->LOCK4res_u.resok4))
13727c478bd9Sstevel@tonic-gate 			return (FALSE);
13737c478bd9Sstevel@tonic-gate 		break;
13747c478bd9Sstevel@tonic-gate 	case NFS4ERR_DENIED:
13757c478bd9Sstevel@tonic-gate 		if (!xdr_LOCK4denied(xdrs, &objp->LOCK4res_u.denied))
13767c478bd9Sstevel@tonic-gate 			return (FALSE);
13777c478bd9Sstevel@tonic-gate 		break;
13787c478bd9Sstevel@tonic-gate 	}
13797c478bd9Sstevel@tonic-gate 	return (TRUE);
13807c478bd9Sstevel@tonic-gate }
13817c478bd9Sstevel@tonic-gate 
13827c478bd9Sstevel@tonic-gate bool_t
xdr_LOCKT4args(register XDR * xdrs,LOCKT4args * objp)13837c478bd9Sstevel@tonic-gate xdr_LOCKT4args(register XDR *xdrs, LOCKT4args *objp)
13847c478bd9Sstevel@tonic-gate {
13857c478bd9Sstevel@tonic-gate 
13867c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_lock_type4(xdrs, &objp->locktype))
13877c478bd9Sstevel@tonic-gate 		return (FALSE);
13887c478bd9Sstevel@tonic-gate 	if (!xdr_offset4(xdrs, &objp->offset))
13897c478bd9Sstevel@tonic-gate 		return (FALSE);
13907c478bd9Sstevel@tonic-gate 	if (!xdr_length4(xdrs, &objp->length))
13917c478bd9Sstevel@tonic-gate 		return (FALSE);
13927c478bd9Sstevel@tonic-gate 	if (!xdr_lock_owner4(xdrs, &objp->owner))
13937c478bd9Sstevel@tonic-gate 		return (FALSE);
13947c478bd9Sstevel@tonic-gate 	return (TRUE);
13957c478bd9Sstevel@tonic-gate }
13967c478bd9Sstevel@tonic-gate 
13977c478bd9Sstevel@tonic-gate bool_t
xdr_LOCKT4res(register XDR * xdrs,LOCKT4res * objp)13987c478bd9Sstevel@tonic-gate xdr_LOCKT4res(register XDR *xdrs, LOCKT4res *objp)
13997c478bd9Sstevel@tonic-gate {
14007c478bd9Sstevel@tonic-gate 
14017c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
14027c478bd9Sstevel@tonic-gate 		return (FALSE);
14037c478bd9Sstevel@tonic-gate 	switch (objp->status) {
14047c478bd9Sstevel@tonic-gate 	case NFS4ERR_DENIED:
14057c478bd9Sstevel@tonic-gate 		if (!xdr_LOCK4denied(xdrs, &objp->LOCKT4res_u.denied))
14067c478bd9Sstevel@tonic-gate 			return (FALSE);
14077c478bd9Sstevel@tonic-gate 		break;
14087c478bd9Sstevel@tonic-gate 	case NFS4_OK:
14097c478bd9Sstevel@tonic-gate 		break;
14107c478bd9Sstevel@tonic-gate 	}
14117c478bd9Sstevel@tonic-gate 	return (TRUE);
14127c478bd9Sstevel@tonic-gate }
14137c478bd9Sstevel@tonic-gate 
14147c478bd9Sstevel@tonic-gate bool_t
xdr_LOCKU4args(register XDR * xdrs,LOCKU4args * objp)14157c478bd9Sstevel@tonic-gate xdr_LOCKU4args(register XDR *xdrs, LOCKU4args *objp)
14167c478bd9Sstevel@tonic-gate {
14177c478bd9Sstevel@tonic-gate 
14187c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_lock_type4(xdrs, &objp->locktype))
14197c478bd9Sstevel@tonic-gate 		return (FALSE);
14207c478bd9Sstevel@tonic-gate 	if (!xdr_seqid4(xdrs, &objp->seqid))
14217c478bd9Sstevel@tonic-gate 		return (FALSE);
14227c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->lock_stateid))
14237c478bd9Sstevel@tonic-gate 		return (FALSE);
14247c478bd9Sstevel@tonic-gate 	if (!xdr_offset4(xdrs, &objp->offset))
14257c478bd9Sstevel@tonic-gate 		return (FALSE);
14267c478bd9Sstevel@tonic-gate 	if (!xdr_length4(xdrs, &objp->length))
14277c478bd9Sstevel@tonic-gate 		return (FALSE);
14287c478bd9Sstevel@tonic-gate 	return (TRUE);
14297c478bd9Sstevel@tonic-gate }
14307c478bd9Sstevel@tonic-gate 
14317c478bd9Sstevel@tonic-gate bool_t
xdr_LOCKU4res(register XDR * xdrs,LOCKU4res * objp)14327c478bd9Sstevel@tonic-gate xdr_LOCKU4res(register XDR *xdrs, LOCKU4res *objp)
14337c478bd9Sstevel@tonic-gate {
14347c478bd9Sstevel@tonic-gate 
14357c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
14367c478bd9Sstevel@tonic-gate 		return (FALSE);
14377c478bd9Sstevel@tonic-gate 	switch (objp->status) {
14387c478bd9Sstevel@tonic-gate 	case NFS4_OK:
14397c478bd9Sstevel@tonic-gate 		if (!xdr_stateid4(xdrs, &objp->LOCKU4res_u.lock_stateid))
14407c478bd9Sstevel@tonic-gate 			return (FALSE);
14417c478bd9Sstevel@tonic-gate 		break;
14427c478bd9Sstevel@tonic-gate 	}
14437c478bd9Sstevel@tonic-gate 	return (TRUE);
14447c478bd9Sstevel@tonic-gate }
14457c478bd9Sstevel@tonic-gate 
14467c478bd9Sstevel@tonic-gate bool_t
xdr_LOOKUP4args(register XDR * xdrs,LOOKUP4args * objp)14477c478bd9Sstevel@tonic-gate xdr_LOOKUP4args(register XDR *xdrs, LOOKUP4args *objp)
14487c478bd9Sstevel@tonic-gate {
14497c478bd9Sstevel@tonic-gate 
14507c478bd9Sstevel@tonic-gate 	if (!xdr_component4(xdrs, &objp->objname))
14517c478bd9Sstevel@tonic-gate 		return (FALSE);
14527c478bd9Sstevel@tonic-gate 	return (TRUE);
14537c478bd9Sstevel@tonic-gate }
14547c478bd9Sstevel@tonic-gate 
14557c478bd9Sstevel@tonic-gate bool_t
xdr_LOOKUP4res(register XDR * xdrs,LOOKUP4res * objp)14567c478bd9Sstevel@tonic-gate xdr_LOOKUP4res(register XDR *xdrs, LOOKUP4res *objp)
14577c478bd9Sstevel@tonic-gate {
14587c478bd9Sstevel@tonic-gate 
14597c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
14607c478bd9Sstevel@tonic-gate 		return (FALSE);
14617c478bd9Sstevel@tonic-gate 	return (TRUE);
14627c478bd9Sstevel@tonic-gate }
14637c478bd9Sstevel@tonic-gate 
14647c478bd9Sstevel@tonic-gate bool_t
xdr_LOOKUPP4res(register XDR * xdrs,LOOKUPP4res * objp)14657c478bd9Sstevel@tonic-gate xdr_LOOKUPP4res(register XDR *xdrs, LOOKUPP4res *objp)
14667c478bd9Sstevel@tonic-gate {
14677c478bd9Sstevel@tonic-gate 
14687c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
14697c478bd9Sstevel@tonic-gate 		return (FALSE);
14707c478bd9Sstevel@tonic-gate 	return (TRUE);
14717c478bd9Sstevel@tonic-gate }
14727c478bd9Sstevel@tonic-gate 
14737c478bd9Sstevel@tonic-gate bool_t
xdr_NVERIFY4args(register XDR * xdrs,NVERIFY4args * objp)14747c478bd9Sstevel@tonic-gate xdr_NVERIFY4args(register XDR *xdrs, NVERIFY4args *objp)
14757c478bd9Sstevel@tonic-gate {
14767c478bd9Sstevel@tonic-gate 
14777c478bd9Sstevel@tonic-gate 	if (!xdr_fattr4(xdrs, &objp->obj_attributes))
14787c478bd9Sstevel@tonic-gate 		return (FALSE);
14797c478bd9Sstevel@tonic-gate 	return (TRUE);
14807c478bd9Sstevel@tonic-gate }
14817c478bd9Sstevel@tonic-gate 
14827c478bd9Sstevel@tonic-gate bool_t
xdr_NVERIFY4res(register XDR * xdrs,NVERIFY4res * objp)14837c478bd9Sstevel@tonic-gate xdr_NVERIFY4res(register XDR *xdrs, NVERIFY4res *objp)
14847c478bd9Sstevel@tonic-gate {
14857c478bd9Sstevel@tonic-gate 
14867c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
14877c478bd9Sstevel@tonic-gate 		return (FALSE);
14887c478bd9Sstevel@tonic-gate 	return (TRUE);
14897c478bd9Sstevel@tonic-gate }
14907c478bd9Sstevel@tonic-gate 
14917c478bd9Sstevel@tonic-gate bool_t
xdr_createmode4(register XDR * xdrs,createmode4 * objp)14927c478bd9Sstevel@tonic-gate xdr_createmode4(register XDR *xdrs, createmode4 *objp)
14937c478bd9Sstevel@tonic-gate {
14947c478bd9Sstevel@tonic-gate 
14957c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
14967c478bd9Sstevel@tonic-gate 		return (FALSE);
14977c478bd9Sstevel@tonic-gate 	return (TRUE);
14987c478bd9Sstevel@tonic-gate }
14997c478bd9Sstevel@tonic-gate 
15007c478bd9Sstevel@tonic-gate bool_t
xdr_createhow4(register XDR * xdrs,createhow4 * objp)15017c478bd9Sstevel@tonic-gate xdr_createhow4(register XDR *xdrs, createhow4 *objp)
15027c478bd9Sstevel@tonic-gate {
15037c478bd9Sstevel@tonic-gate 
15047c478bd9Sstevel@tonic-gate 	if (!xdr_createmode4(xdrs, &objp->mode))
15057c478bd9Sstevel@tonic-gate 		return (FALSE);
15067c478bd9Sstevel@tonic-gate 	switch (objp->mode) {
15077c478bd9Sstevel@tonic-gate 	case UNCHECKED4:
15087c478bd9Sstevel@tonic-gate 	case GUARDED4:
15097c478bd9Sstevel@tonic-gate 		if (!xdr_fattr4(xdrs, &objp->createhow4_u.createattrs))
15107c478bd9Sstevel@tonic-gate 			return (FALSE);
15117c478bd9Sstevel@tonic-gate 		break;
15127c478bd9Sstevel@tonic-gate 	case EXCLUSIVE4:
15137c478bd9Sstevel@tonic-gate 		if (!xdr_verifier4(xdrs, objp->createhow4_u.createverf))
15147c478bd9Sstevel@tonic-gate 			return (FALSE);
15157c478bd9Sstevel@tonic-gate 		break;
15167c478bd9Sstevel@tonic-gate 	default:
15177c478bd9Sstevel@tonic-gate 		return (FALSE);
15187c478bd9Sstevel@tonic-gate 	}
15197c478bd9Sstevel@tonic-gate 	return (TRUE);
15207c478bd9Sstevel@tonic-gate }
15217c478bd9Sstevel@tonic-gate 
15227c478bd9Sstevel@tonic-gate bool_t
xdr_opentype4(register XDR * xdrs,opentype4 * objp)15237c478bd9Sstevel@tonic-gate xdr_opentype4(register XDR *xdrs, opentype4 *objp)
15247c478bd9Sstevel@tonic-gate {
15257c478bd9Sstevel@tonic-gate 
15267c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
15277c478bd9Sstevel@tonic-gate 		return (FALSE);
15287c478bd9Sstevel@tonic-gate 	return (TRUE);
15297c478bd9Sstevel@tonic-gate }
15307c478bd9Sstevel@tonic-gate 
15317c478bd9Sstevel@tonic-gate bool_t
xdr_openflag4(register XDR * xdrs,openflag4 * objp)15327c478bd9Sstevel@tonic-gate xdr_openflag4(register XDR *xdrs, openflag4 *objp)
15337c478bd9Sstevel@tonic-gate {
15347c478bd9Sstevel@tonic-gate 
15357c478bd9Sstevel@tonic-gate 	if (!xdr_opentype4(xdrs, &objp->opentype))
15367c478bd9Sstevel@tonic-gate 		return (FALSE);
15377c478bd9Sstevel@tonic-gate 	switch (objp->opentype) {
15387c478bd9Sstevel@tonic-gate 	case OPEN4_CREATE:
15397c478bd9Sstevel@tonic-gate 		if (!xdr_createhow4(xdrs, &objp->openflag4_u.how))
15407c478bd9Sstevel@tonic-gate 			return (FALSE);
15417c478bd9Sstevel@tonic-gate 		break;
15427c478bd9Sstevel@tonic-gate 	}
15437c478bd9Sstevel@tonic-gate 	return (TRUE);
15447c478bd9Sstevel@tonic-gate }
15457c478bd9Sstevel@tonic-gate 
15467c478bd9Sstevel@tonic-gate bool_t
xdr_limit_by4(register XDR * xdrs,limit_by4 * objp)15477c478bd9Sstevel@tonic-gate xdr_limit_by4(register XDR *xdrs, limit_by4 *objp)
15487c478bd9Sstevel@tonic-gate {
15497c478bd9Sstevel@tonic-gate 
15507c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
15517c478bd9Sstevel@tonic-gate 		return (FALSE);
15527c478bd9Sstevel@tonic-gate 	return (TRUE);
15537c478bd9Sstevel@tonic-gate }
15547c478bd9Sstevel@tonic-gate 
15557c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_modified_limit4(register XDR * xdrs,nfs_modified_limit4 * objp)15567c478bd9Sstevel@tonic-gate xdr_nfs_modified_limit4(register XDR *xdrs, nfs_modified_limit4 *objp)
15577c478bd9Sstevel@tonic-gate {
15587c478bd9Sstevel@tonic-gate 
15597c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->num_blocks))
15607c478bd9Sstevel@tonic-gate 		return (FALSE);
15617c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->bytes_per_block))
15627c478bd9Sstevel@tonic-gate 		return (FALSE);
15637c478bd9Sstevel@tonic-gate 	return (TRUE);
15647c478bd9Sstevel@tonic-gate }
15657c478bd9Sstevel@tonic-gate 
15667c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_space_limit4(register XDR * xdrs,nfs_space_limit4 * objp)15677c478bd9Sstevel@tonic-gate xdr_nfs_space_limit4(register XDR *xdrs, nfs_space_limit4 *objp)
15687c478bd9Sstevel@tonic-gate {
15697c478bd9Sstevel@tonic-gate 
15707c478bd9Sstevel@tonic-gate 	if (!xdr_limit_by4(xdrs, &objp->limitby))
15717c478bd9Sstevel@tonic-gate 		return (FALSE);
15727c478bd9Sstevel@tonic-gate 	switch (objp->limitby) {
15737c478bd9Sstevel@tonic-gate 	case NFS_LIMIT_SIZE:
15747c478bd9Sstevel@tonic-gate 		if (!xdr_uint64_t(xdrs, &objp->nfs_space_limit4_u.filesize))
15757c478bd9Sstevel@tonic-gate 			return (FALSE);
15767c478bd9Sstevel@tonic-gate 		break;
15777c478bd9Sstevel@tonic-gate 	case NFS_LIMIT_BLOCKS:
15787c478bd9Sstevel@tonic-gate 		if (!xdr_nfs_modified_limit4(xdrs, &objp->nfs_space_limit4_u.
1579bbe876c0SMarcel Telka 		    mod_blocks))
15807c478bd9Sstevel@tonic-gate 			return (FALSE);
15817c478bd9Sstevel@tonic-gate 		break;
15827c478bd9Sstevel@tonic-gate 	default:
15837c478bd9Sstevel@tonic-gate 		return (FALSE);
15847c478bd9Sstevel@tonic-gate 	}
15857c478bd9Sstevel@tonic-gate 	return (TRUE);
15867c478bd9Sstevel@tonic-gate }
15877c478bd9Sstevel@tonic-gate 
15887c478bd9Sstevel@tonic-gate bool_t
xdr_open_delegation_type4(register XDR * xdrs,open_delegation_type4 * objp)15897c478bd9Sstevel@tonic-gate xdr_open_delegation_type4(register XDR *xdrs, open_delegation_type4 *objp)
15907c478bd9Sstevel@tonic-gate {
15917c478bd9Sstevel@tonic-gate 
15927c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
15937c478bd9Sstevel@tonic-gate 		return (FALSE);
15947c478bd9Sstevel@tonic-gate 	return (TRUE);
15957c478bd9Sstevel@tonic-gate }
15967c478bd9Sstevel@tonic-gate 
15977c478bd9Sstevel@tonic-gate bool_t
xdr_open_claim_type4(register XDR * xdrs,open_claim_type4 * objp)15987c478bd9Sstevel@tonic-gate xdr_open_claim_type4(register XDR *xdrs, open_claim_type4 *objp)
15997c478bd9Sstevel@tonic-gate {
16007c478bd9Sstevel@tonic-gate 
16017c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
16027c478bd9Sstevel@tonic-gate 		return (FALSE);
16037c478bd9Sstevel@tonic-gate 	return (TRUE);
16047c478bd9Sstevel@tonic-gate }
16057c478bd9Sstevel@tonic-gate 
16067c478bd9Sstevel@tonic-gate bool_t
xdr_open_claim_delegate_cur4(register XDR * xdrs,open_claim_delegate_cur4 * objp)16077c478bd9Sstevel@tonic-gate xdr_open_claim_delegate_cur4(register XDR *xdrs, open_claim_delegate_cur4 *objp)
16087c478bd9Sstevel@tonic-gate {
16097c478bd9Sstevel@tonic-gate 
16107c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->delegate_stateid))
16117c478bd9Sstevel@tonic-gate 		return (FALSE);
16127c478bd9Sstevel@tonic-gate 	if (!xdr_component4(xdrs, &objp->file))
16137c478bd9Sstevel@tonic-gate 		return (FALSE);
16147c478bd9Sstevel@tonic-gate 	return (TRUE);
16157c478bd9Sstevel@tonic-gate }
16167c478bd9Sstevel@tonic-gate 
16177c478bd9Sstevel@tonic-gate bool_t
xdr_open_claim4(register XDR * xdrs,open_claim4 * objp)16187c478bd9Sstevel@tonic-gate xdr_open_claim4(register XDR *xdrs, open_claim4 *objp)
16197c478bd9Sstevel@tonic-gate {
16207c478bd9Sstevel@tonic-gate 
16217c478bd9Sstevel@tonic-gate 	if (!xdr_open_claim_type4(xdrs, &objp->claim))
16227c478bd9Sstevel@tonic-gate 		return (FALSE);
16237c478bd9Sstevel@tonic-gate 	switch (objp->claim) {
16247c478bd9Sstevel@tonic-gate 	case CLAIM_NULL:
16257c478bd9Sstevel@tonic-gate 		if (!xdr_component4(xdrs, &objp->open_claim4_u.file))
16267c478bd9Sstevel@tonic-gate 			return (FALSE);
16277c478bd9Sstevel@tonic-gate 		break;
16287c478bd9Sstevel@tonic-gate 	case CLAIM_PREVIOUS:
16297c478bd9Sstevel@tonic-gate 		if (!xdr_open_delegation_type4(xdrs, &objp->open_claim4_u.
1630bbe876c0SMarcel Telka 		    delegate_type))
16317c478bd9Sstevel@tonic-gate 			return (FALSE);
16327c478bd9Sstevel@tonic-gate 		break;
16337c478bd9Sstevel@tonic-gate 	case CLAIM_DELEGATE_CUR:
16347c478bd9Sstevel@tonic-gate 		if (!xdr_open_claim_delegate_cur4(xdrs, &objp->open_claim4_u.
1635bbe876c0SMarcel Telka 		    delegate_cur_info))
16367c478bd9Sstevel@tonic-gate 			return (FALSE);
16377c478bd9Sstevel@tonic-gate 		break;
16387c478bd9Sstevel@tonic-gate 	case CLAIM_DELEGATE_PREV:
16397c478bd9Sstevel@tonic-gate 		if (!xdr_component4(xdrs, &objp->open_claim4_u.
1640bbe876c0SMarcel Telka 		    file_delegate_prev))
16417c478bd9Sstevel@tonic-gate 			return (FALSE);
16427c478bd9Sstevel@tonic-gate 		break;
16437c478bd9Sstevel@tonic-gate 	default:
16447c478bd9Sstevel@tonic-gate 		return (FALSE);
16457c478bd9Sstevel@tonic-gate 	}
16467c478bd9Sstevel@tonic-gate 	return (TRUE);
16477c478bd9Sstevel@tonic-gate }
16487c478bd9Sstevel@tonic-gate 
16497c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN4args(register XDR * xdrs,OPEN4args * objp)16507c478bd9Sstevel@tonic-gate xdr_OPEN4args(register XDR *xdrs, OPEN4args *objp)
16517c478bd9Sstevel@tonic-gate {
16527c478bd9Sstevel@tonic-gate 
16537c478bd9Sstevel@tonic-gate 	if (!xdr_seqid4(xdrs, &objp->seqid))
16547c478bd9Sstevel@tonic-gate 		return (FALSE);
16557c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->share_access))
16567c478bd9Sstevel@tonic-gate 		return (FALSE);
16577c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->share_deny))
16587c478bd9Sstevel@tonic-gate 		return (FALSE);
16597c478bd9Sstevel@tonic-gate 	if (!xdr_open_owner4(xdrs, &objp->owner))
16607c478bd9Sstevel@tonic-gate 		return (FALSE);
16617c478bd9Sstevel@tonic-gate 	if (!xdr_openflag4(xdrs, &objp->openhow))
16627c478bd9Sstevel@tonic-gate 		return (FALSE);
16637c478bd9Sstevel@tonic-gate 	if (!xdr_open_claim4(xdrs, &objp->claim))
16647c478bd9Sstevel@tonic-gate 		return (FALSE);
16657c478bd9Sstevel@tonic-gate 	return (TRUE);
16667c478bd9Sstevel@tonic-gate }
16677c478bd9Sstevel@tonic-gate 
16687c478bd9Sstevel@tonic-gate bool_t
xdr_open_read_delegation4(register XDR * xdrs,open_read_delegation4 * objp)16697c478bd9Sstevel@tonic-gate xdr_open_read_delegation4(register XDR *xdrs, open_read_delegation4 *objp)
16707c478bd9Sstevel@tonic-gate {
16717c478bd9Sstevel@tonic-gate 
16727c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->stateid))
16737c478bd9Sstevel@tonic-gate 		return (FALSE);
16747c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->recall))
16757c478bd9Sstevel@tonic-gate 		return (FALSE);
16767c478bd9Sstevel@tonic-gate 	if (!xdr_nfsace4(xdrs, &objp->permissions))
16777c478bd9Sstevel@tonic-gate 		return (FALSE);
16787c478bd9Sstevel@tonic-gate 	return (TRUE);
16797c478bd9Sstevel@tonic-gate }
16807c478bd9Sstevel@tonic-gate 
16817c478bd9Sstevel@tonic-gate bool_t
xdr_open_write_delegation4(register XDR * xdrs,open_write_delegation4 * objp)16827c478bd9Sstevel@tonic-gate xdr_open_write_delegation4(register XDR *xdrs, open_write_delegation4 *objp)
16837c478bd9Sstevel@tonic-gate {
16847c478bd9Sstevel@tonic-gate 
16857c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->stateid))
16867c478bd9Sstevel@tonic-gate 		return (FALSE);
16877c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->recall))
16887c478bd9Sstevel@tonic-gate 		return (FALSE);
16897c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_space_limit4(xdrs, &objp->space_limit))
16907c478bd9Sstevel@tonic-gate 		return (FALSE);
16917c478bd9Sstevel@tonic-gate 	if (!xdr_nfsace4(xdrs, &objp->permissions))
16927c478bd9Sstevel@tonic-gate 		return (FALSE);
16937c478bd9Sstevel@tonic-gate 	return (TRUE);
16947c478bd9Sstevel@tonic-gate }
16957c478bd9Sstevel@tonic-gate 
16967c478bd9Sstevel@tonic-gate bool_t
xdr_open_delegation4(register XDR * xdrs,open_delegation4 * objp)16977c478bd9Sstevel@tonic-gate xdr_open_delegation4(register XDR *xdrs, open_delegation4 *objp)
16987c478bd9Sstevel@tonic-gate {
16997c478bd9Sstevel@tonic-gate 
17007c478bd9Sstevel@tonic-gate 	if (!xdr_open_delegation_type4(xdrs, &objp->delegation_type))
17017c478bd9Sstevel@tonic-gate 		return (FALSE);
17027c478bd9Sstevel@tonic-gate 	switch (objp->delegation_type) {
17037c478bd9Sstevel@tonic-gate 	case OPEN_DELEGATE_NONE:
17047c478bd9Sstevel@tonic-gate 		break;
17057c478bd9Sstevel@tonic-gate 	case OPEN_DELEGATE_READ:
17067c478bd9Sstevel@tonic-gate 		if (!xdr_open_read_delegation4(xdrs, &objp->open_delegation4_u.
1707bbe876c0SMarcel Telka 		    read))
17087c478bd9Sstevel@tonic-gate 			return (FALSE);
17097c478bd9Sstevel@tonic-gate 		break;
17107c478bd9Sstevel@tonic-gate 	case OPEN_DELEGATE_WRITE:
17117c478bd9Sstevel@tonic-gate 		if (!xdr_open_write_delegation4(xdrs, &objp->open_delegation4_u.
1712bbe876c0SMarcel Telka 		    write))
17137c478bd9Sstevel@tonic-gate 			return (FALSE);
17147c478bd9Sstevel@tonic-gate 		break;
17157c478bd9Sstevel@tonic-gate 	default:
17167c478bd9Sstevel@tonic-gate 		return (FALSE);
17177c478bd9Sstevel@tonic-gate 	}
17187c478bd9Sstevel@tonic-gate 	return (TRUE);
17197c478bd9Sstevel@tonic-gate }
17207c478bd9Sstevel@tonic-gate 
17217c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN4resok(register XDR * xdrs,OPEN4resok * objp)17227c478bd9Sstevel@tonic-gate xdr_OPEN4resok(register XDR *xdrs, OPEN4resok *objp)
17237c478bd9Sstevel@tonic-gate {
17247c478bd9Sstevel@tonic-gate 
17257c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->stateid))
17267c478bd9Sstevel@tonic-gate 		return (FALSE);
17277c478bd9Sstevel@tonic-gate 	if (!xdr_change_info4(xdrs, &objp->cinfo))
17287c478bd9Sstevel@tonic-gate 		return (FALSE);
17297c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->rflags))
17307c478bd9Sstevel@tonic-gate 		return (FALSE);
17317c478bd9Sstevel@tonic-gate 	if (!xdr_bitmap4(xdrs, &objp->attrset))
17327c478bd9Sstevel@tonic-gate 		return (FALSE);
17337c478bd9Sstevel@tonic-gate 	if (!xdr_open_delegation4(xdrs, &objp->delegation))
17347c478bd9Sstevel@tonic-gate 		return (FALSE);
17357c478bd9Sstevel@tonic-gate 	return (TRUE);
17367c478bd9Sstevel@tonic-gate }
17377c478bd9Sstevel@tonic-gate 
17387c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN4res(register XDR * xdrs,OPEN4res * objp)17397c478bd9Sstevel@tonic-gate xdr_OPEN4res(register XDR *xdrs, OPEN4res *objp)
17407c478bd9Sstevel@tonic-gate {
17417c478bd9Sstevel@tonic-gate 
17427c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
17437c478bd9Sstevel@tonic-gate 		return (FALSE);
17447c478bd9Sstevel@tonic-gate 	switch (objp->status) {
17457c478bd9Sstevel@tonic-gate 	case NFS4_OK:
17467c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN4resok(xdrs, &objp->OPEN4res_u.resok4))
17477c478bd9Sstevel@tonic-gate 			return (FALSE);
17487c478bd9Sstevel@tonic-gate 		break;
17497c478bd9Sstevel@tonic-gate 	}
17507c478bd9Sstevel@tonic-gate 	return (TRUE);
17517c478bd9Sstevel@tonic-gate }
17527c478bd9Sstevel@tonic-gate 
17537c478bd9Sstevel@tonic-gate bool_t
xdr_OPENATTR4args(register XDR * xdrs,OPENATTR4args * objp)17547c478bd9Sstevel@tonic-gate xdr_OPENATTR4args(register XDR *xdrs, OPENATTR4args *objp)
17557c478bd9Sstevel@tonic-gate {
17567c478bd9Sstevel@tonic-gate 
17577c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->createdir))
17587c478bd9Sstevel@tonic-gate 		return (FALSE);
17597c478bd9Sstevel@tonic-gate 	return (TRUE);
17607c478bd9Sstevel@tonic-gate }
17617c478bd9Sstevel@tonic-gate 
17627c478bd9Sstevel@tonic-gate bool_t
xdr_OPENATTR4res(register XDR * xdrs,OPENATTR4res * objp)17637c478bd9Sstevel@tonic-gate xdr_OPENATTR4res(register XDR *xdrs, OPENATTR4res *objp)
17647c478bd9Sstevel@tonic-gate {
17657c478bd9Sstevel@tonic-gate 
17667c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
17677c478bd9Sstevel@tonic-gate 		return (FALSE);
17687c478bd9Sstevel@tonic-gate 	return (TRUE);
17697c478bd9Sstevel@tonic-gate }
17707c478bd9Sstevel@tonic-gate 
17717c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN_CONFIRM4args(register XDR * xdrs,OPEN_CONFIRM4args * objp)17727c478bd9Sstevel@tonic-gate xdr_OPEN_CONFIRM4args(register XDR *xdrs, OPEN_CONFIRM4args *objp)
17737c478bd9Sstevel@tonic-gate {
17747c478bd9Sstevel@tonic-gate 
17757c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->open_stateid))
17767c478bd9Sstevel@tonic-gate 		return (FALSE);
17777c478bd9Sstevel@tonic-gate 	if (!xdr_seqid4(xdrs, &objp->seqid))
17787c478bd9Sstevel@tonic-gate 		return (FALSE);
17797c478bd9Sstevel@tonic-gate 	return (TRUE);
17807c478bd9Sstevel@tonic-gate }
17817c478bd9Sstevel@tonic-gate 
17827c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN_CONFIRM4resok(register XDR * xdrs,OPEN_CONFIRM4resok * objp)17837c478bd9Sstevel@tonic-gate xdr_OPEN_CONFIRM4resok(register XDR *xdrs, OPEN_CONFIRM4resok *objp)
17847c478bd9Sstevel@tonic-gate {
17857c478bd9Sstevel@tonic-gate 
17867c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->open_stateid))
17877c478bd9Sstevel@tonic-gate 		return (FALSE);
17887c478bd9Sstevel@tonic-gate 	return (TRUE);
17897c478bd9Sstevel@tonic-gate }
17907c478bd9Sstevel@tonic-gate 
17917c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN_CONFIRM4res(register XDR * xdrs,OPEN_CONFIRM4res * objp)17927c478bd9Sstevel@tonic-gate xdr_OPEN_CONFIRM4res(register XDR *xdrs, OPEN_CONFIRM4res *objp)
17937c478bd9Sstevel@tonic-gate {
17947c478bd9Sstevel@tonic-gate 
17957c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
17967c478bd9Sstevel@tonic-gate 		return (FALSE);
17977c478bd9Sstevel@tonic-gate 	switch (objp->status) {
17987c478bd9Sstevel@tonic-gate 	case NFS4_OK:
17997c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN_CONFIRM4resok(xdrs, &objp->OPEN_CONFIRM4res_u.
1800bbe876c0SMarcel Telka 		    resok4))
18017c478bd9Sstevel@tonic-gate 			return (FALSE);
18027c478bd9Sstevel@tonic-gate 		break;
18037c478bd9Sstevel@tonic-gate 	}
18047c478bd9Sstevel@tonic-gate 	return (TRUE);
18057c478bd9Sstevel@tonic-gate }
18067c478bd9Sstevel@tonic-gate 
18077c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN_DOWNGRADE4args(register XDR * xdrs,OPEN_DOWNGRADE4args * objp)18087c478bd9Sstevel@tonic-gate xdr_OPEN_DOWNGRADE4args(register XDR *xdrs, OPEN_DOWNGRADE4args *objp)
18097c478bd9Sstevel@tonic-gate {
18107c478bd9Sstevel@tonic-gate 
18117c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->open_stateid))
18127c478bd9Sstevel@tonic-gate 		return (FALSE);
18137c478bd9Sstevel@tonic-gate 	if (!xdr_seqid4(xdrs, &objp->seqid))
18147c478bd9Sstevel@tonic-gate 		return (FALSE);
18157c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->share_access))
18167c478bd9Sstevel@tonic-gate 		return (FALSE);
18177c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->share_deny))
18187c478bd9Sstevel@tonic-gate 		return (FALSE);
18197c478bd9Sstevel@tonic-gate 	return (TRUE);
18207c478bd9Sstevel@tonic-gate }
18217c478bd9Sstevel@tonic-gate 
18227c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN_DOWNGRADE4resok(register XDR * xdrs,OPEN_DOWNGRADE4resok * objp)18237c478bd9Sstevel@tonic-gate xdr_OPEN_DOWNGRADE4resok(register XDR *xdrs, OPEN_DOWNGRADE4resok *objp)
18247c478bd9Sstevel@tonic-gate {
18257c478bd9Sstevel@tonic-gate 
18267c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->open_stateid))
18277c478bd9Sstevel@tonic-gate 		return (FALSE);
18287c478bd9Sstevel@tonic-gate 	return (TRUE);
18297c478bd9Sstevel@tonic-gate }
18307c478bd9Sstevel@tonic-gate 
18317c478bd9Sstevel@tonic-gate bool_t
xdr_OPEN_DOWNGRADE4res(register XDR * xdrs,OPEN_DOWNGRADE4res * objp)18327c478bd9Sstevel@tonic-gate xdr_OPEN_DOWNGRADE4res(register XDR *xdrs, OPEN_DOWNGRADE4res *objp)
18337c478bd9Sstevel@tonic-gate {
18347c478bd9Sstevel@tonic-gate 
18357c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
18367c478bd9Sstevel@tonic-gate 		return (FALSE);
18377c478bd9Sstevel@tonic-gate 	switch (objp->status) {
18387c478bd9Sstevel@tonic-gate 	case NFS4_OK:
18397c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN_DOWNGRADE4resok(xdrs, &objp->OPEN_DOWNGRADE4res_u.
1840bbe876c0SMarcel Telka 		    resok4))
18417c478bd9Sstevel@tonic-gate 			return (FALSE);
18427c478bd9Sstevel@tonic-gate 		break;
18437c478bd9Sstevel@tonic-gate 	}
18447c478bd9Sstevel@tonic-gate 	return (TRUE);
18457c478bd9Sstevel@tonic-gate }
18467c478bd9Sstevel@tonic-gate 
18477c478bd9Sstevel@tonic-gate bool_t
xdr_PUTFH4args(register XDR * xdrs,PUTFH4args * objp)18487c478bd9Sstevel@tonic-gate xdr_PUTFH4args(register XDR *xdrs, PUTFH4args *objp)
18497c478bd9Sstevel@tonic-gate {
18507c478bd9Sstevel@tonic-gate 
18517c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_fh4(xdrs, &objp->object))
18527c478bd9Sstevel@tonic-gate 		return (FALSE);
18537c478bd9Sstevel@tonic-gate 	return (TRUE);
18547c478bd9Sstevel@tonic-gate }
18557c478bd9Sstevel@tonic-gate 
18567c478bd9Sstevel@tonic-gate bool_t
xdr_PUTFH4res(register XDR * xdrs,PUTFH4res * objp)18577c478bd9Sstevel@tonic-gate xdr_PUTFH4res(register XDR *xdrs, PUTFH4res *objp)
18587c478bd9Sstevel@tonic-gate {
18597c478bd9Sstevel@tonic-gate 
18607c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
18617c478bd9Sstevel@tonic-gate 		return (FALSE);
18627c478bd9Sstevel@tonic-gate 	return (TRUE);
18637c478bd9Sstevel@tonic-gate }
18647c478bd9Sstevel@tonic-gate 
18657c478bd9Sstevel@tonic-gate bool_t
xdr_PUTPUBFH4res(register XDR * xdrs,PUTPUBFH4res * objp)18667c478bd9Sstevel@tonic-gate xdr_PUTPUBFH4res(register XDR *xdrs, PUTPUBFH4res *objp)
18677c478bd9Sstevel@tonic-gate {
18687c478bd9Sstevel@tonic-gate 
18697c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
18707c478bd9Sstevel@tonic-gate 		return (FALSE);
18717c478bd9Sstevel@tonic-gate 	return (TRUE);
18727c478bd9Sstevel@tonic-gate }
18737c478bd9Sstevel@tonic-gate 
18747c478bd9Sstevel@tonic-gate bool_t
xdr_PUTROOTFH4res(register XDR * xdrs,PUTROOTFH4res * objp)18757c478bd9Sstevel@tonic-gate xdr_PUTROOTFH4res(register XDR *xdrs, PUTROOTFH4res *objp)
18767c478bd9Sstevel@tonic-gate {
18777c478bd9Sstevel@tonic-gate 
18787c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
18797c478bd9Sstevel@tonic-gate 		return (FALSE);
18807c478bd9Sstevel@tonic-gate 	return (TRUE);
18817c478bd9Sstevel@tonic-gate }
18827c478bd9Sstevel@tonic-gate 
18837c478bd9Sstevel@tonic-gate bool_t
xdr_READ4args(register XDR * xdrs,READ4args * objp)18847c478bd9Sstevel@tonic-gate xdr_READ4args(register XDR *xdrs, READ4args *objp)
18857c478bd9Sstevel@tonic-gate {
18867c478bd9Sstevel@tonic-gate 
18877c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->stateid))
18887c478bd9Sstevel@tonic-gate 		return (FALSE);
18897c478bd9Sstevel@tonic-gate 	if (!xdr_offset4(xdrs, &objp->offset))
18907c478bd9Sstevel@tonic-gate 		return (FALSE);
18917c478bd9Sstevel@tonic-gate 	if (!xdr_count4(xdrs, &objp->count))
18927c478bd9Sstevel@tonic-gate 		return (FALSE);
18937c478bd9Sstevel@tonic-gate 	return (TRUE);
18947c478bd9Sstevel@tonic-gate }
18957c478bd9Sstevel@tonic-gate 
18967c478bd9Sstevel@tonic-gate bool_t
xdr_READ4resok(register XDR * xdrs,READ4resok * objp)18977c478bd9Sstevel@tonic-gate xdr_READ4resok(register XDR *xdrs, READ4resok *objp)
18987c478bd9Sstevel@tonic-gate {
18997c478bd9Sstevel@tonic-gate 
19007c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->eof))
19017c478bd9Sstevel@tonic-gate 		return (FALSE);
19027c478bd9Sstevel@tonic-gate 
19037c478bd9Sstevel@tonic-gate #ifdef	IGNORE_RDWR_DATA
19047c478bd9Sstevel@tonic-gate 	/*
19057c478bd9Sstevel@tonic-gate 	 * Try to get length of read, and if that
19067c478bd9Sstevel@tonic-gate 	 * fails, default to 0.  Don't return FALSE
19077c478bd9Sstevel@tonic-gate 	 * because the other read info will not be
19087c478bd9Sstevel@tonic-gate 	 * displayed.
19097c478bd9Sstevel@tonic-gate 	 */
19107c478bd9Sstevel@tonic-gate 	objp->data.data_val = NULL;
19117c478bd9Sstevel@tonic-gate 	if (!xdr_u_int(xdrs, &objp->data.data_len))
19127c478bd9Sstevel@tonic-gate 		objp->data.data_len = 0;
19137c478bd9Sstevel@tonic-gate 	nfs4_skip_bytes = objp->data.data_len;
19147c478bd9Sstevel@tonic-gate #else
19157c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->data.data_val,
1916bbe876c0SMarcel Telka 	    (uint_t *)&objp->data.data_len, ~0))
19177c478bd9Sstevel@tonic-gate 		return (FALSE);
19187c478bd9Sstevel@tonic-gate #endif
19197c478bd9Sstevel@tonic-gate 	return (TRUE);
19207c478bd9Sstevel@tonic-gate }
19217c478bd9Sstevel@tonic-gate 
19227c478bd9Sstevel@tonic-gate bool_t
xdr_READ4res(register XDR * xdrs,READ4res * objp)19237c478bd9Sstevel@tonic-gate xdr_READ4res(register XDR *xdrs, READ4res *objp)
19247c478bd9Sstevel@tonic-gate {
19257c478bd9Sstevel@tonic-gate 
19267c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
19277c478bd9Sstevel@tonic-gate 		return (FALSE);
19287c478bd9Sstevel@tonic-gate 	switch (objp->status) {
19297c478bd9Sstevel@tonic-gate 	case NFS4_OK:
19307c478bd9Sstevel@tonic-gate 		if (!xdr_READ4resok(xdrs, &objp->READ4res_u.resok4))
19317c478bd9Sstevel@tonic-gate 			return (FALSE);
19327c478bd9Sstevel@tonic-gate 		break;
19337c478bd9Sstevel@tonic-gate 	}
19347c478bd9Sstevel@tonic-gate 	return (TRUE);
19357c478bd9Sstevel@tonic-gate }
19367c478bd9Sstevel@tonic-gate 
19377c478bd9Sstevel@tonic-gate bool_t
xdr_READDIR4args(register XDR * xdrs,READDIR4args * objp)19387c478bd9Sstevel@tonic-gate xdr_READDIR4args(register XDR *xdrs, READDIR4args *objp)
19397c478bd9Sstevel@tonic-gate {
19407c478bd9Sstevel@tonic-gate 
19417c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_cookie4(xdrs, &objp->cookie))
19427c478bd9Sstevel@tonic-gate 		return (FALSE);
19437c478bd9Sstevel@tonic-gate 	if (!xdr_verifier4(xdrs, objp->cookieverf))
19447c478bd9Sstevel@tonic-gate 		return (FALSE);
19457c478bd9Sstevel@tonic-gate 	if (!xdr_count4(xdrs, &objp->dircount))
19467c478bd9Sstevel@tonic-gate 		return (FALSE);
19477c478bd9Sstevel@tonic-gate 	if (!xdr_count4(xdrs, &objp->maxcount))
19487c478bd9Sstevel@tonic-gate 		return (FALSE);
19497c478bd9Sstevel@tonic-gate 	if (!xdr_bitmap4(xdrs, &objp->attr_request))
19507c478bd9Sstevel@tonic-gate 		return (FALSE);
19517c478bd9Sstevel@tonic-gate 	return (TRUE);
19527c478bd9Sstevel@tonic-gate }
19537c478bd9Sstevel@tonic-gate 
19547c478bd9Sstevel@tonic-gate bool_t
xdr_entry4(register XDR * xdrs,entry4 * objp)19557c478bd9Sstevel@tonic-gate xdr_entry4(register XDR *xdrs, entry4 *objp)
19567c478bd9Sstevel@tonic-gate {
19577c478bd9Sstevel@tonic-gate 
19587c478bd9Sstevel@tonic-gate 	entry4 *tmp_entry4;
19597c478bd9Sstevel@tonic-gate 	bool_t more_data = TRUE;
19607c478bd9Sstevel@tonic-gate 	bool_t first_objp = TRUE;
19617c478bd9Sstevel@tonic-gate 
19627c478bd9Sstevel@tonic-gate 	while (more_data) {
19637c478bd9Sstevel@tonic-gate 
19647c478bd9Sstevel@tonic-gate 		if (!xdr_nfs_cookie4(xdrs, &objp->cookie))
19657c478bd9Sstevel@tonic-gate 			return (FALSE);
19667c478bd9Sstevel@tonic-gate 		if (!xdr_component4(xdrs, &objp->name))
19677c478bd9Sstevel@tonic-gate 			return (FALSE);
19687c478bd9Sstevel@tonic-gate 		if (!xdr_fattr4(xdrs, &objp->attrs))
19697c478bd9Sstevel@tonic-gate 			return (FALSE);
19707c478bd9Sstevel@tonic-gate 
19717c478bd9Sstevel@tonic-gate 		if (xdrs->x_op == XDR_DECODE) {
19727c478bd9Sstevel@tonic-gate 
19737c478bd9Sstevel@tonic-gate 			void bzero();
19747c478bd9Sstevel@tonic-gate 
19757c478bd9Sstevel@tonic-gate 			if (!xdr_bool(xdrs, &more_data))
19767c478bd9Sstevel@tonic-gate 				return (FALSE);
19777c478bd9Sstevel@tonic-gate 
19787c478bd9Sstevel@tonic-gate 			if (!more_data) {
19797c478bd9Sstevel@tonic-gate 				objp->nextentry = NULL;
19807c478bd9Sstevel@tonic-gate 				break;
19817c478bd9Sstevel@tonic-gate 			}
19827c478bd9Sstevel@tonic-gate 
1983bbe876c0SMarcel Telka 			objp->nextentry = (entry4 *)mem_alloc(sizeof (entry4));
19847c478bd9Sstevel@tonic-gate 			if (objp->nextentry == NULL)
198595c74518SToomas Soome 				return (FALSE);
19867c478bd9Sstevel@tonic-gate 			bzero(objp->nextentry, sizeof (entry4));
19877c478bd9Sstevel@tonic-gate 			objp = objp->nextentry;
19887c478bd9Sstevel@tonic-gate 
19897c478bd9Sstevel@tonic-gate 		} else if (xdrs->x_op == XDR_ENCODE) {
19907c478bd9Sstevel@tonic-gate 			objp = objp->nextentry;
19917c478bd9Sstevel@tonic-gate 			if (!objp)
19927c478bd9Sstevel@tonic-gate 				more_data = FALSE;
19937c478bd9Sstevel@tonic-gate 
19947c478bd9Sstevel@tonic-gate 			if (!xdr_bool(xdrs, &more_data))
19957c478bd9Sstevel@tonic-gate 				return (FALSE);
19967c478bd9Sstevel@tonic-gate 		} else {
19977c478bd9Sstevel@tonic-gate 			tmp_entry4 = objp;
19987c478bd9Sstevel@tonic-gate 			objp = objp->nextentry;
19997c478bd9Sstevel@tonic-gate 			if (!objp)
20007c478bd9Sstevel@tonic-gate 				more_data = FALSE;
20017c478bd9Sstevel@tonic-gate 			if (!xdr_bool(xdrs, &more_data))
20027c478bd9Sstevel@tonic-gate 				return (FALSE);
20037c478bd9Sstevel@tonic-gate 			if (!first_objp)
20047c478bd9Sstevel@tonic-gate 				mem_free(tmp_entry4, sizeof (entry4));
20057c478bd9Sstevel@tonic-gate 			else
20067c478bd9Sstevel@tonic-gate 				first_objp = FALSE;
20077c478bd9Sstevel@tonic-gate 		}
20087c478bd9Sstevel@tonic-gate 	}
20097c478bd9Sstevel@tonic-gate 	return (TRUE);
20107c478bd9Sstevel@tonic-gate }
20117c478bd9Sstevel@tonic-gate 
20127c478bd9Sstevel@tonic-gate bool_t
xdr_dirlist4(register XDR * xdrs,dirlist4 * objp)20137c478bd9Sstevel@tonic-gate xdr_dirlist4(register XDR *xdrs, dirlist4 *objp)
20147c478bd9Sstevel@tonic-gate {
20157c478bd9Sstevel@tonic-gate 
20167c478bd9Sstevel@tonic-gate 	if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof (entry4),
2017bbe876c0SMarcel Telka 	    (xdrproc_t)xdr_entry4))
20187c478bd9Sstevel@tonic-gate 		return (FALSE);
20197c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->eof))
20207c478bd9Sstevel@tonic-gate 		return (FALSE);
20217c478bd9Sstevel@tonic-gate 	return (TRUE);
20227c478bd9Sstevel@tonic-gate }
20237c478bd9Sstevel@tonic-gate 
20247c478bd9Sstevel@tonic-gate bool_t
xdr_READDIR4resok(register XDR * xdrs,READDIR4resok * objp)20257c478bd9Sstevel@tonic-gate xdr_READDIR4resok(register XDR *xdrs, READDIR4resok *objp)
20267c478bd9Sstevel@tonic-gate {
20277c478bd9Sstevel@tonic-gate 
20287c478bd9Sstevel@tonic-gate 	if (!xdr_verifier4(xdrs, objp->cookieverf))
20297c478bd9Sstevel@tonic-gate 		return (FALSE);
20307c478bd9Sstevel@tonic-gate 	if (!xdr_dirlist4(xdrs, &objp->reply))
20317c478bd9Sstevel@tonic-gate 		return (FALSE);
20327c478bd9Sstevel@tonic-gate 	return (TRUE);
20337c478bd9Sstevel@tonic-gate }
20347c478bd9Sstevel@tonic-gate 
20357c478bd9Sstevel@tonic-gate bool_t
xdr_READDIR4res(register XDR * xdrs,READDIR4res * objp)20367c478bd9Sstevel@tonic-gate xdr_READDIR4res(register XDR *xdrs, READDIR4res *objp)
20377c478bd9Sstevel@tonic-gate {
20387c478bd9Sstevel@tonic-gate 
20397c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
20407c478bd9Sstevel@tonic-gate 		return (FALSE);
20417c478bd9Sstevel@tonic-gate 	switch (objp->status) {
20427c478bd9Sstevel@tonic-gate 	case NFS4_OK:
20437c478bd9Sstevel@tonic-gate 		if (!xdr_READDIR4resok(xdrs, &objp->READDIR4res_u.resok4))
20447c478bd9Sstevel@tonic-gate 			return (FALSE);
20457c478bd9Sstevel@tonic-gate 		break;
20467c478bd9Sstevel@tonic-gate 	}
20477c478bd9Sstevel@tonic-gate 	return (TRUE);
20487c478bd9Sstevel@tonic-gate }
20497c478bd9Sstevel@tonic-gate 
20507c478bd9Sstevel@tonic-gate bool_t
xdr_READLINK4resok(register XDR * xdrs,READLINK4resok * objp)20517c478bd9Sstevel@tonic-gate xdr_READLINK4resok(register XDR *xdrs, READLINK4resok *objp)
20527c478bd9Sstevel@tonic-gate {
20537c478bd9Sstevel@tonic-gate 
20547c478bd9Sstevel@tonic-gate 	if (!xdr_linktext4(xdrs, &objp->link))
20557c478bd9Sstevel@tonic-gate 		return (FALSE);
20567c478bd9Sstevel@tonic-gate 	return (TRUE);
20577c478bd9Sstevel@tonic-gate }
20587c478bd9Sstevel@tonic-gate 
20597c478bd9Sstevel@tonic-gate bool_t
xdr_READLINK4res(register XDR * xdrs,READLINK4res * objp)20607c478bd9Sstevel@tonic-gate xdr_READLINK4res(register XDR *xdrs, READLINK4res *objp)
20617c478bd9Sstevel@tonic-gate {
20627c478bd9Sstevel@tonic-gate 
20637c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
20647c478bd9Sstevel@tonic-gate 		return (FALSE);
20657c478bd9Sstevel@tonic-gate 	switch (objp->status) {
20667c478bd9Sstevel@tonic-gate 	case NFS4_OK:
20677c478bd9Sstevel@tonic-gate 		if (!xdr_READLINK4resok(xdrs, &objp->READLINK4res_u.resok4))
20687c478bd9Sstevel@tonic-gate 			return (FALSE);
20697c478bd9Sstevel@tonic-gate 		break;
20707c478bd9Sstevel@tonic-gate 	}
20717c478bd9Sstevel@tonic-gate 	return (TRUE);
20727c478bd9Sstevel@tonic-gate }
20737c478bd9Sstevel@tonic-gate 
20747c478bd9Sstevel@tonic-gate bool_t
xdr_REMOVE4args(register XDR * xdrs,REMOVE4args * objp)20757c478bd9Sstevel@tonic-gate xdr_REMOVE4args(register XDR *xdrs, REMOVE4args *objp)
20767c478bd9Sstevel@tonic-gate {
20777c478bd9Sstevel@tonic-gate 
20787c478bd9Sstevel@tonic-gate 	if (!xdr_component4(xdrs, &objp->target))
20797c478bd9Sstevel@tonic-gate 		return (FALSE);
20807c478bd9Sstevel@tonic-gate 	return (TRUE);
20817c478bd9Sstevel@tonic-gate }
20827c478bd9Sstevel@tonic-gate 
20837c478bd9Sstevel@tonic-gate bool_t
xdr_REMOVE4resok(register XDR * xdrs,REMOVE4resok * objp)20847c478bd9Sstevel@tonic-gate xdr_REMOVE4resok(register XDR *xdrs, REMOVE4resok *objp)
20857c478bd9Sstevel@tonic-gate {
20867c478bd9Sstevel@tonic-gate 
20877c478bd9Sstevel@tonic-gate 	if (!xdr_change_info4(xdrs, &objp->cinfo))
20887c478bd9Sstevel@tonic-gate 		return (FALSE);
20897c478bd9Sstevel@tonic-gate 	return (TRUE);
20907c478bd9Sstevel@tonic-gate }
20917c478bd9Sstevel@tonic-gate 
20927c478bd9Sstevel@tonic-gate bool_t
xdr_REMOVE4res(register XDR * xdrs,REMOVE4res * objp)20937c478bd9Sstevel@tonic-gate xdr_REMOVE4res(register XDR *xdrs, REMOVE4res *objp)
20947c478bd9Sstevel@tonic-gate {
20957c478bd9Sstevel@tonic-gate 
20967c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
20977c478bd9Sstevel@tonic-gate 		return (FALSE);
20987c478bd9Sstevel@tonic-gate 	switch (objp->status) {
20997c478bd9Sstevel@tonic-gate 	case NFS4_OK:
21007c478bd9Sstevel@tonic-gate 		if (!xdr_REMOVE4resok(xdrs, &objp->REMOVE4res_u.resok4))
21017c478bd9Sstevel@tonic-gate 			return (FALSE);
21027c478bd9Sstevel@tonic-gate 		break;
21037c478bd9Sstevel@tonic-gate 	}
21047c478bd9Sstevel@tonic-gate 	return (TRUE);
21057c478bd9Sstevel@tonic-gate }
21067c478bd9Sstevel@tonic-gate 
21077c478bd9Sstevel@tonic-gate bool_t
xdr_RENAME4args(register XDR * xdrs,RENAME4args * objp)21087c478bd9Sstevel@tonic-gate xdr_RENAME4args(register XDR *xdrs, RENAME4args *objp)
21097c478bd9Sstevel@tonic-gate {
21107c478bd9Sstevel@tonic-gate 
21117c478bd9Sstevel@tonic-gate 	if (!xdr_component4(xdrs, &objp->oldname))
21127c478bd9Sstevel@tonic-gate 		return (FALSE);
21137c478bd9Sstevel@tonic-gate 	if (!xdr_component4(xdrs, &objp->newname))
21147c478bd9Sstevel@tonic-gate 		return (FALSE);
21157c478bd9Sstevel@tonic-gate 	return (TRUE);
21167c478bd9Sstevel@tonic-gate }
21177c478bd9Sstevel@tonic-gate 
21187c478bd9Sstevel@tonic-gate bool_t
xdr_RENAME4resok(register XDR * xdrs,RENAME4resok * objp)21197c478bd9Sstevel@tonic-gate xdr_RENAME4resok(register XDR *xdrs, RENAME4resok *objp)
21207c478bd9Sstevel@tonic-gate {
21217c478bd9Sstevel@tonic-gate 
21227c478bd9Sstevel@tonic-gate 	if (!xdr_change_info4(xdrs, &objp->source_cinfo))
21237c478bd9Sstevel@tonic-gate 		return (FALSE);
21247c478bd9Sstevel@tonic-gate 	if (!xdr_change_info4(xdrs, &objp->target_cinfo))
21257c478bd9Sstevel@tonic-gate 		return (FALSE);
21267c478bd9Sstevel@tonic-gate 	return (TRUE);
21277c478bd9Sstevel@tonic-gate }
21287c478bd9Sstevel@tonic-gate 
21297c478bd9Sstevel@tonic-gate bool_t
xdr_RENAME4res(register XDR * xdrs,RENAME4res * objp)21307c478bd9Sstevel@tonic-gate xdr_RENAME4res(register XDR *xdrs, RENAME4res *objp)
21317c478bd9Sstevel@tonic-gate {
21327c478bd9Sstevel@tonic-gate 
21337c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
21347c478bd9Sstevel@tonic-gate 		return (FALSE);
21357c478bd9Sstevel@tonic-gate 	switch (objp->status) {
21367c478bd9Sstevel@tonic-gate 	case NFS4_OK:
21377c478bd9Sstevel@tonic-gate 		if (!xdr_RENAME4resok(xdrs, &objp->RENAME4res_u.resok4))
21387c478bd9Sstevel@tonic-gate 			return (FALSE);
21397c478bd9Sstevel@tonic-gate 		break;
21407c478bd9Sstevel@tonic-gate 	}
21417c478bd9Sstevel@tonic-gate 	return (TRUE);
21427c478bd9Sstevel@tonic-gate }
21437c478bd9Sstevel@tonic-gate 
21447c478bd9Sstevel@tonic-gate bool_t
xdr_RENEW4args(register XDR * xdrs,RENEW4args * objp)21457c478bd9Sstevel@tonic-gate xdr_RENEW4args(register XDR *xdrs, RENEW4args *objp)
21467c478bd9Sstevel@tonic-gate {
21477c478bd9Sstevel@tonic-gate 
21487c478bd9Sstevel@tonic-gate 	if (!xdr_clientid4(xdrs, &objp->clientid))
21497c478bd9Sstevel@tonic-gate 		return (FALSE);
21507c478bd9Sstevel@tonic-gate 	return (TRUE);
21517c478bd9Sstevel@tonic-gate }
21527c478bd9Sstevel@tonic-gate 
21537c478bd9Sstevel@tonic-gate bool_t
xdr_RENEW4res(register XDR * xdrs,RENEW4res * objp)21547c478bd9Sstevel@tonic-gate xdr_RENEW4res(register XDR *xdrs, RENEW4res *objp)
21557c478bd9Sstevel@tonic-gate {
21567c478bd9Sstevel@tonic-gate 
21577c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
21587c478bd9Sstevel@tonic-gate 		return (FALSE);
21597c478bd9Sstevel@tonic-gate 	return (TRUE);
21607c478bd9Sstevel@tonic-gate }
21617c478bd9Sstevel@tonic-gate 
21627c478bd9Sstevel@tonic-gate bool_t
xdr_RESTOREFH4res(register XDR * xdrs,RESTOREFH4res * objp)21637c478bd9Sstevel@tonic-gate xdr_RESTOREFH4res(register XDR *xdrs, RESTOREFH4res *objp)
21647c478bd9Sstevel@tonic-gate {
21657c478bd9Sstevel@tonic-gate 
21667c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
21677c478bd9Sstevel@tonic-gate 		return (FALSE);
21687c478bd9Sstevel@tonic-gate 	return (TRUE);
21697c478bd9Sstevel@tonic-gate }
21707c478bd9Sstevel@tonic-gate 
21717c478bd9Sstevel@tonic-gate bool_t
xdr_SAVEFH4res(register XDR * xdrs,SAVEFH4res * objp)21727c478bd9Sstevel@tonic-gate xdr_SAVEFH4res(register XDR *xdrs, SAVEFH4res *objp)
21737c478bd9Sstevel@tonic-gate {
21747c478bd9Sstevel@tonic-gate 
21757c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
21767c478bd9Sstevel@tonic-gate 		return (FALSE);
21777c478bd9Sstevel@tonic-gate 	return (TRUE);
21787c478bd9Sstevel@tonic-gate }
21797c478bd9Sstevel@tonic-gate 
21807c478bd9Sstevel@tonic-gate bool_t
xdr_SECINFO4args(register XDR * xdrs,SECINFO4args * objp)21817c478bd9Sstevel@tonic-gate xdr_SECINFO4args(register XDR *xdrs, SECINFO4args *objp)
21827c478bd9Sstevel@tonic-gate {
21837c478bd9Sstevel@tonic-gate 
21847c478bd9Sstevel@tonic-gate 	if (!xdr_component4(xdrs, &objp->name))
21857c478bd9Sstevel@tonic-gate 		return (FALSE);
21867c478bd9Sstevel@tonic-gate 	return (TRUE);
21877c478bd9Sstevel@tonic-gate }
21887c478bd9Sstevel@tonic-gate 
21897c478bd9Sstevel@tonic-gate bool_t
xdr_rpc_gss_svc_t(register XDR * xdrs,rpc_gss_svc_t * objp)21907c478bd9Sstevel@tonic-gate xdr_rpc_gss_svc_t(register XDR *xdrs, rpc_gss_svc_t *objp)
21917c478bd9Sstevel@tonic-gate {
21927c478bd9Sstevel@tonic-gate 
21937c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
21947c478bd9Sstevel@tonic-gate 		return (FALSE);
21957c478bd9Sstevel@tonic-gate 	return (TRUE);
21967c478bd9Sstevel@tonic-gate }
21977c478bd9Sstevel@tonic-gate 
21987c478bd9Sstevel@tonic-gate bool_t
xdr_rpcsec_gss_info(register XDR * xdrs,rpcsec_gss_info * objp)21997c478bd9Sstevel@tonic-gate xdr_rpcsec_gss_info(register XDR *xdrs, rpcsec_gss_info *objp)
22007c478bd9Sstevel@tonic-gate {
22017c478bd9Sstevel@tonic-gate 
22027c478bd9Sstevel@tonic-gate 	if (!xdr_sec_oid4(xdrs, &objp->oid))
22037c478bd9Sstevel@tonic-gate 		return (FALSE);
22047c478bd9Sstevel@tonic-gate 	if (!xdr_qop4(xdrs, &objp->qop))
22057c478bd9Sstevel@tonic-gate 		return (FALSE);
22067c478bd9Sstevel@tonic-gate 	if (!xdr_rpc_gss_svc_t(xdrs, &objp->service))
22077c478bd9Sstevel@tonic-gate 		return (FALSE);
22087c478bd9Sstevel@tonic-gate 	return (TRUE);
22097c478bd9Sstevel@tonic-gate }
22107c478bd9Sstevel@tonic-gate 
22117c478bd9Sstevel@tonic-gate bool_t
xdr_secinfo4(register XDR * xdrs,secinfo4 * objp)22127c478bd9Sstevel@tonic-gate xdr_secinfo4(register XDR *xdrs, secinfo4 *objp)
22137c478bd9Sstevel@tonic-gate {
22147c478bd9Sstevel@tonic-gate 
22157c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->flavor))
22167c478bd9Sstevel@tonic-gate 		return (FALSE);
22177c478bd9Sstevel@tonic-gate 	switch (objp->flavor) {
22187c478bd9Sstevel@tonic-gate 	case RPCSEC_GSS:
22197c478bd9Sstevel@tonic-gate 		if (!xdr_rpcsec_gss_info(xdrs, &objp->secinfo4_u.flavor_info))
22207c478bd9Sstevel@tonic-gate 			return (FALSE);
22217c478bd9Sstevel@tonic-gate 		break;
22227c478bd9Sstevel@tonic-gate 	}
22237c478bd9Sstevel@tonic-gate 	return (TRUE);
22247c478bd9Sstevel@tonic-gate }
22257c478bd9Sstevel@tonic-gate 
22267c478bd9Sstevel@tonic-gate bool_t
xdr_SECINFO4resok(register XDR * xdrs,SECINFO4resok * objp)22277c478bd9Sstevel@tonic-gate xdr_SECINFO4resok(register XDR *xdrs, SECINFO4resok *objp)
22287c478bd9Sstevel@tonic-gate {
22297c478bd9Sstevel@tonic-gate 
22307c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->SECINFO4resok_val,
2231bbe876c0SMarcel Telka 	    (uint_t *)&objp->SECINFO4resok_len, ~0,
2232bbe876c0SMarcel Telka 	    sizeof (secinfo4), (xdrproc_t)xdr_secinfo4))
22337c478bd9Sstevel@tonic-gate 		return (FALSE);
22347c478bd9Sstevel@tonic-gate 	return (TRUE);
22357c478bd9Sstevel@tonic-gate }
22367c478bd9Sstevel@tonic-gate 
22377c478bd9Sstevel@tonic-gate bool_t
xdr_SECINFO4res(register XDR * xdrs,SECINFO4res * objp)22387c478bd9Sstevel@tonic-gate xdr_SECINFO4res(register XDR *xdrs, SECINFO4res *objp)
22397c478bd9Sstevel@tonic-gate {
22407c478bd9Sstevel@tonic-gate 
22417c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
22427c478bd9Sstevel@tonic-gate 		return (FALSE);
22437c478bd9Sstevel@tonic-gate 	switch (objp->status) {
22447c478bd9Sstevel@tonic-gate 	case NFS4_OK:
22457c478bd9Sstevel@tonic-gate 		if (!xdr_SECINFO4resok(xdrs, &objp->SECINFO4res_u.resok4))
22467c478bd9Sstevel@tonic-gate 			return (FALSE);
22477c478bd9Sstevel@tonic-gate 		break;
22487c478bd9Sstevel@tonic-gate 	}
22497c478bd9Sstevel@tonic-gate 	return (TRUE);
22507c478bd9Sstevel@tonic-gate }
22517c478bd9Sstevel@tonic-gate 
22527c478bd9Sstevel@tonic-gate bool_t
xdr_SETATTR4args(register XDR * xdrs,SETATTR4args * objp)22537c478bd9Sstevel@tonic-gate xdr_SETATTR4args(register XDR *xdrs, SETATTR4args *objp)
22547c478bd9Sstevel@tonic-gate {
22557c478bd9Sstevel@tonic-gate 
22567c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->stateid))
22577c478bd9Sstevel@tonic-gate 		return (FALSE);
22587c478bd9Sstevel@tonic-gate 	if (!xdr_fattr4(xdrs, &objp->obj_attributes))
22597c478bd9Sstevel@tonic-gate 		return (FALSE);
22607c478bd9Sstevel@tonic-gate 	return (TRUE);
22617c478bd9Sstevel@tonic-gate }
22627c478bd9Sstevel@tonic-gate 
22637c478bd9Sstevel@tonic-gate bool_t
xdr_SETATTR4res(register XDR * xdrs,SETATTR4res * objp)22647c478bd9Sstevel@tonic-gate xdr_SETATTR4res(register XDR *xdrs, SETATTR4res *objp)
22657c478bd9Sstevel@tonic-gate {
22667c478bd9Sstevel@tonic-gate 
22677c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
22687c478bd9Sstevel@tonic-gate 		return (FALSE);
22697c478bd9Sstevel@tonic-gate 	if (!xdr_bitmap4(xdrs, &objp->attrsset))
22707c478bd9Sstevel@tonic-gate 		return (FALSE);
22717c478bd9Sstevel@tonic-gate 	return (TRUE);
22727c478bd9Sstevel@tonic-gate }
22737c478bd9Sstevel@tonic-gate 
22747c478bd9Sstevel@tonic-gate bool_t
xdr_SETCLIENTID4args(register XDR * xdrs,SETCLIENTID4args * objp)22757c478bd9Sstevel@tonic-gate xdr_SETCLIENTID4args(register XDR *xdrs, SETCLIENTID4args *objp)
22767c478bd9Sstevel@tonic-gate {
22777c478bd9Sstevel@tonic-gate 
22787c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_client_id4(xdrs, &objp->client))
22797c478bd9Sstevel@tonic-gate 		return (FALSE);
22807c478bd9Sstevel@tonic-gate 	if (!xdr_cb_client4(xdrs, &objp->callback))
22817c478bd9Sstevel@tonic-gate 		return (FALSE);
22827c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->callback_ident))
22837c478bd9Sstevel@tonic-gate 		return (FALSE);
22847c478bd9Sstevel@tonic-gate 	return (TRUE);
22857c478bd9Sstevel@tonic-gate }
22867c478bd9Sstevel@tonic-gate 
22877c478bd9Sstevel@tonic-gate bool_t
xdr_SETCLIENTID4resok(register XDR * xdrs,SETCLIENTID4resok * objp)22887c478bd9Sstevel@tonic-gate xdr_SETCLIENTID4resok(register XDR *xdrs, SETCLIENTID4resok *objp)
22897c478bd9Sstevel@tonic-gate {
22907c478bd9Sstevel@tonic-gate 
22917c478bd9Sstevel@tonic-gate 	if (!xdr_clientid4(xdrs, &objp->clientid))
22927c478bd9Sstevel@tonic-gate 		return (FALSE);
22937c478bd9Sstevel@tonic-gate 	if (!xdr_verifier4(xdrs, objp->setclientid_confirm))
22947c478bd9Sstevel@tonic-gate 		return (FALSE);
22957c478bd9Sstevel@tonic-gate 	return (TRUE);
22967c478bd9Sstevel@tonic-gate }
22977c478bd9Sstevel@tonic-gate 
22987c478bd9Sstevel@tonic-gate bool_t
xdr_SETCLIENTID4res(register XDR * xdrs,SETCLIENTID4res * objp)22997c478bd9Sstevel@tonic-gate xdr_SETCLIENTID4res(register XDR *xdrs, SETCLIENTID4res *objp)
23007c478bd9Sstevel@tonic-gate {
23017c478bd9Sstevel@tonic-gate 
23027c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
23037c478bd9Sstevel@tonic-gate 		return (FALSE);
23047c478bd9Sstevel@tonic-gate 	switch (objp->status) {
23057c478bd9Sstevel@tonic-gate 	case NFS4_OK:
23067c478bd9Sstevel@tonic-gate 		if (!xdr_SETCLIENTID4resok(xdrs, &objp->SETCLIENTID4res_u.
2307bbe876c0SMarcel Telka 		    resok4))
23087c478bd9Sstevel@tonic-gate 			return (FALSE);
23097c478bd9Sstevel@tonic-gate 		break;
23107c478bd9Sstevel@tonic-gate 	case NFS4ERR_CLID_INUSE:
23117c478bd9Sstevel@tonic-gate 		if (!xdr_clientaddr4(xdrs, &objp->SETCLIENTID4res_u.
2312bbe876c0SMarcel Telka 		    client_using))
23137c478bd9Sstevel@tonic-gate 			return (FALSE);
23147c478bd9Sstevel@tonic-gate 		break;
23157c478bd9Sstevel@tonic-gate 	}
23167c478bd9Sstevel@tonic-gate 	return (TRUE);
23177c478bd9Sstevel@tonic-gate }
23187c478bd9Sstevel@tonic-gate 
23197c478bd9Sstevel@tonic-gate bool_t
xdr_SETCLIENTID_CONFIRM4args(register XDR * xdrs,SETCLIENTID_CONFIRM4args * objp)23207c478bd9Sstevel@tonic-gate xdr_SETCLIENTID_CONFIRM4args(register XDR *xdrs, SETCLIENTID_CONFIRM4args *objp)
23217c478bd9Sstevel@tonic-gate {
23227c478bd9Sstevel@tonic-gate 
23237c478bd9Sstevel@tonic-gate 	if (!xdr_clientid4(xdrs, &objp->clientid))
23247c478bd9Sstevel@tonic-gate 		return (FALSE);
23257c478bd9Sstevel@tonic-gate 	if (!xdr_verifier4(xdrs, objp->setclientid_confirm))
23267c478bd9Sstevel@tonic-gate 		return (FALSE);
23277c478bd9Sstevel@tonic-gate 	return (TRUE);
23287c478bd9Sstevel@tonic-gate }
23297c478bd9Sstevel@tonic-gate 
23307c478bd9Sstevel@tonic-gate bool_t
xdr_SETCLIENTID_CONFIRM4res(register XDR * xdrs,SETCLIENTID_CONFIRM4res * objp)23317c478bd9Sstevel@tonic-gate xdr_SETCLIENTID_CONFIRM4res(register XDR *xdrs, SETCLIENTID_CONFIRM4res *objp)
23327c478bd9Sstevel@tonic-gate {
23337c478bd9Sstevel@tonic-gate 
23347c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
23357c478bd9Sstevel@tonic-gate 		return (FALSE);
23367c478bd9Sstevel@tonic-gate 	return (TRUE);
23377c478bd9Sstevel@tonic-gate }
23387c478bd9Sstevel@tonic-gate 
23397c478bd9Sstevel@tonic-gate bool_t
xdr_VERIFY4args(register XDR * xdrs,VERIFY4args * objp)23407c478bd9Sstevel@tonic-gate xdr_VERIFY4args(register XDR *xdrs, VERIFY4args *objp)
23417c478bd9Sstevel@tonic-gate {
23427c478bd9Sstevel@tonic-gate 
23437c478bd9Sstevel@tonic-gate 	if (!xdr_fattr4(xdrs, &objp->obj_attributes))
23447c478bd9Sstevel@tonic-gate 		return (FALSE);
23457c478bd9Sstevel@tonic-gate 	return (TRUE);
23467c478bd9Sstevel@tonic-gate }
23477c478bd9Sstevel@tonic-gate 
23487c478bd9Sstevel@tonic-gate bool_t
xdr_VERIFY4res(register XDR * xdrs,VERIFY4res * objp)23497c478bd9Sstevel@tonic-gate xdr_VERIFY4res(register XDR *xdrs, VERIFY4res *objp)
23507c478bd9Sstevel@tonic-gate {
23517c478bd9Sstevel@tonic-gate 
23527c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
23537c478bd9Sstevel@tonic-gate 		return (FALSE);
23547c478bd9Sstevel@tonic-gate 	return (TRUE);
23557c478bd9Sstevel@tonic-gate }
23567c478bd9Sstevel@tonic-gate 
23577c478bd9Sstevel@tonic-gate bool_t
xdr_stable_how4(register XDR * xdrs,stable_how4 * objp)23587c478bd9Sstevel@tonic-gate xdr_stable_how4(register XDR *xdrs, stable_how4 *objp)
23597c478bd9Sstevel@tonic-gate {
23607c478bd9Sstevel@tonic-gate 
23617c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
23627c478bd9Sstevel@tonic-gate 		return (FALSE);
23637c478bd9Sstevel@tonic-gate 	return (TRUE);
23647c478bd9Sstevel@tonic-gate }
23657c478bd9Sstevel@tonic-gate 
23667c478bd9Sstevel@tonic-gate bool_t
xdr_WRITE4args(register XDR * xdrs,WRITE4args * objp)23677c478bd9Sstevel@tonic-gate xdr_WRITE4args(register XDR *xdrs, WRITE4args *objp)
23687c478bd9Sstevel@tonic-gate {
23697c478bd9Sstevel@tonic-gate 
23707c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->stateid))
23717c478bd9Sstevel@tonic-gate 		return (FALSE);
23727c478bd9Sstevel@tonic-gate 	if (!xdr_offset4(xdrs, &objp->offset))
23737c478bd9Sstevel@tonic-gate 		return (FALSE);
23747c478bd9Sstevel@tonic-gate 	if (!xdr_stable_how4(xdrs, &objp->stable))
23757c478bd9Sstevel@tonic-gate 		return (FALSE);
23767c478bd9Sstevel@tonic-gate 
23777c478bd9Sstevel@tonic-gate #ifdef IGNORE_RDWR_DATA
23787c478bd9Sstevel@tonic-gate 	/*
23797c478bd9Sstevel@tonic-gate 	 * try to get length of write, and if that
23807c478bd9Sstevel@tonic-gate 	 * fails, default to 0.  Don't return FALSE
23817c478bd9Sstevel@tonic-gate 	 * because the other write info will not be
23827c478bd9Sstevel@tonic-gate 	 * displayed (write stateid).
23837c478bd9Sstevel@tonic-gate 	 */
23847c478bd9Sstevel@tonic-gate 	objp->data.data_val = NULL;
23857c478bd9Sstevel@tonic-gate 	if (!xdr_u_int(xdrs, &objp->data.data_len))
23867c478bd9Sstevel@tonic-gate 		objp->data.data_len = 0;
23877c478bd9Sstevel@tonic-gate 	nfs4_skip_bytes = objp->data.data_len;
23887c478bd9Sstevel@tonic-gate #else
23897c478bd9Sstevel@tonic-gate 	if (!xdr_bytes(xdrs, (char **)&objp->data.data_val,
2390bbe876c0SMarcel Telka 	    (uint_t *)&objp->data.data_len, ~0))
23917c478bd9Sstevel@tonic-gate 		return (FALSE);
23927c478bd9Sstevel@tonic-gate #endif
23937c478bd9Sstevel@tonic-gate 	return (TRUE);
23947c478bd9Sstevel@tonic-gate }
23957c478bd9Sstevel@tonic-gate 
23967c478bd9Sstevel@tonic-gate bool_t
xdr_WRITE4resok(register XDR * xdrs,WRITE4resok * objp)23977c478bd9Sstevel@tonic-gate xdr_WRITE4resok(register XDR *xdrs, WRITE4resok *objp)
23987c478bd9Sstevel@tonic-gate {
23997c478bd9Sstevel@tonic-gate 
24007c478bd9Sstevel@tonic-gate 	if (!xdr_count4(xdrs, &objp->count))
24017c478bd9Sstevel@tonic-gate 		return (FALSE);
24027c478bd9Sstevel@tonic-gate 	if (!xdr_stable_how4(xdrs, &objp->committed))
24037c478bd9Sstevel@tonic-gate 		return (FALSE);
24047c478bd9Sstevel@tonic-gate 	if (!xdr_verifier4(xdrs, objp->writeverf))
24057c478bd9Sstevel@tonic-gate 		return (FALSE);
24067c478bd9Sstevel@tonic-gate 	return (TRUE);
24077c478bd9Sstevel@tonic-gate }
24087c478bd9Sstevel@tonic-gate 
24097c478bd9Sstevel@tonic-gate bool_t
xdr_WRITE4res(register XDR * xdrs,WRITE4res * objp)24107c478bd9Sstevel@tonic-gate xdr_WRITE4res(register XDR *xdrs, WRITE4res *objp)
24117c478bd9Sstevel@tonic-gate {
24127c478bd9Sstevel@tonic-gate 
24137c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
24147c478bd9Sstevel@tonic-gate 		return (FALSE);
24157c478bd9Sstevel@tonic-gate 	switch (objp->status) {
24167c478bd9Sstevel@tonic-gate 	case NFS4_OK:
24177c478bd9Sstevel@tonic-gate 		if (!xdr_WRITE4resok(xdrs, &objp->WRITE4res_u.resok4))
24187c478bd9Sstevel@tonic-gate 			return (FALSE);
24197c478bd9Sstevel@tonic-gate 		break;
24207c478bd9Sstevel@tonic-gate 	}
24217c478bd9Sstevel@tonic-gate 	return (TRUE);
24227c478bd9Sstevel@tonic-gate }
24237c478bd9Sstevel@tonic-gate 
24247c478bd9Sstevel@tonic-gate bool_t
xdr_RELEASE_LOCKOWNER4args(register XDR * xdrs,RELEASE_LOCKOWNER4args * objp)24257c478bd9Sstevel@tonic-gate xdr_RELEASE_LOCKOWNER4args(register XDR *xdrs, RELEASE_LOCKOWNER4args *objp)
24267c478bd9Sstevel@tonic-gate {
24277c478bd9Sstevel@tonic-gate 
24287c478bd9Sstevel@tonic-gate 	if (!xdr_lock_owner4(xdrs, &objp->lock_owner))
24297c478bd9Sstevel@tonic-gate 		return (FALSE);
24307c478bd9Sstevel@tonic-gate 	return (TRUE);
24317c478bd9Sstevel@tonic-gate }
24327c478bd9Sstevel@tonic-gate 
24337c478bd9Sstevel@tonic-gate bool_t
xdr_RELEASE_LOCKOWNER4res(register XDR * xdrs,RELEASE_LOCKOWNER4res * objp)24347c478bd9Sstevel@tonic-gate xdr_RELEASE_LOCKOWNER4res(register XDR *xdrs, RELEASE_LOCKOWNER4res *objp)
24357c478bd9Sstevel@tonic-gate {
24367c478bd9Sstevel@tonic-gate 
24377c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
24387c478bd9Sstevel@tonic-gate 		return (FALSE);
24397c478bd9Sstevel@tonic-gate 	return (TRUE);
24407c478bd9Sstevel@tonic-gate }
24417c478bd9Sstevel@tonic-gate 
24427c478bd9Sstevel@tonic-gate bool_t
xdr_ILLEGAL4res(register XDR * xdrs,ILLEGAL4res * objp)24437c478bd9Sstevel@tonic-gate xdr_ILLEGAL4res(register XDR *xdrs, ILLEGAL4res *objp)
24447c478bd9Sstevel@tonic-gate {
24457c478bd9Sstevel@tonic-gate 
24467c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
24477c478bd9Sstevel@tonic-gate 		return (FALSE);
24487c478bd9Sstevel@tonic-gate 	return (TRUE);
24497c478bd9Sstevel@tonic-gate }
24507c478bd9Sstevel@tonic-gate 
24517c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_opnum4(register XDR * xdrs,nfs_opnum4 * objp)24527c478bd9Sstevel@tonic-gate xdr_nfs_opnum4(register XDR *xdrs, nfs_opnum4 *objp)
24537c478bd9Sstevel@tonic-gate {
24547c478bd9Sstevel@tonic-gate 
24557c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
24567c478bd9Sstevel@tonic-gate 		return (FALSE);
24577c478bd9Sstevel@tonic-gate 	return (TRUE);
24587c478bd9Sstevel@tonic-gate }
24597c478bd9Sstevel@tonic-gate 
24607c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_argop4(register XDR * xdrs,nfs_argop4 * objp)24617c478bd9Sstevel@tonic-gate xdr_nfs_argop4(register XDR *xdrs, nfs_argop4 *objp)
24627c478bd9Sstevel@tonic-gate {
24637c478bd9Sstevel@tonic-gate 	nfs4_skip_bytes = 0;
24647c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_opnum4(xdrs, &objp->argop))
24657c478bd9Sstevel@tonic-gate 		return (FALSE);
24667c478bd9Sstevel@tonic-gate 	switch (objp->argop) {
24677c478bd9Sstevel@tonic-gate 	case OP_ACCESS:
24687c478bd9Sstevel@tonic-gate 		if (!xdr_ACCESS4args(xdrs, &objp->nfs_argop4_u.opaccess))
24697c478bd9Sstevel@tonic-gate 			return (FALSE);
24707c478bd9Sstevel@tonic-gate 		break;
24717c478bd9Sstevel@tonic-gate 	case OP_CLOSE:
24727c478bd9Sstevel@tonic-gate 		if (!xdr_CLOSE4args(xdrs, &objp->nfs_argop4_u.opclose))
24737c478bd9Sstevel@tonic-gate 			return (FALSE);
24747c478bd9Sstevel@tonic-gate 		break;
24757c478bd9Sstevel@tonic-gate 	case OP_COMMIT:
24767c478bd9Sstevel@tonic-gate 		if (!xdr_COMMIT4args(xdrs, &objp->nfs_argop4_u.opcommit))
24777c478bd9Sstevel@tonic-gate 			return (FALSE);
24787c478bd9Sstevel@tonic-gate 		break;
24797c478bd9Sstevel@tonic-gate 	case OP_CREATE:
24807c478bd9Sstevel@tonic-gate 		if (!xdr_CREATE4args(xdrs, &objp->nfs_argop4_u.opcreate))
24817c478bd9Sstevel@tonic-gate 			return (FALSE);
24827c478bd9Sstevel@tonic-gate 		break;
24837c478bd9Sstevel@tonic-gate 	case OP_DELEGPURGE:
24847c478bd9Sstevel@tonic-gate 		if (!xdr_DELEGPURGE4args(xdrs, &objp->nfs_argop4_u.
2485bbe876c0SMarcel Telka 		    opdelegpurge))
24867c478bd9Sstevel@tonic-gate 			return (FALSE);
24877c478bd9Sstevel@tonic-gate 		break;
24887c478bd9Sstevel@tonic-gate 	case OP_DELEGRETURN:
24897c478bd9Sstevel@tonic-gate 		if (!xdr_DELEGRETURN4args(xdrs, &objp->nfs_argop4_u.
2490bbe876c0SMarcel Telka 		    opdelegreturn))
24917c478bd9Sstevel@tonic-gate 			return (FALSE);
24927c478bd9Sstevel@tonic-gate 		break;
24937c478bd9Sstevel@tonic-gate 	case OP_GETATTR:
24947c478bd9Sstevel@tonic-gate 		if (!xdr_GETATTR4args(xdrs, &objp->nfs_argop4_u.
2495bbe876c0SMarcel Telka 		    opgetattr))
24967c478bd9Sstevel@tonic-gate 			return (FALSE);
24977c478bd9Sstevel@tonic-gate 		break;
24987c478bd9Sstevel@tonic-gate 	case OP_GETFH:
24997c478bd9Sstevel@tonic-gate 		break;
25007c478bd9Sstevel@tonic-gate 	case OP_LINK:
25017c478bd9Sstevel@tonic-gate 		if (!xdr_LINK4args(xdrs, &objp->nfs_argop4_u.oplink))
25027c478bd9Sstevel@tonic-gate 			return (FALSE);
25037c478bd9Sstevel@tonic-gate 		break;
25047c478bd9Sstevel@tonic-gate 	case OP_LOCK:
25057c478bd9Sstevel@tonic-gate 		if (!xdr_LOCK4args(xdrs, &objp->nfs_argop4_u.oplock))
25067c478bd9Sstevel@tonic-gate 			return (FALSE);
25077c478bd9Sstevel@tonic-gate 		break;
25087c478bd9Sstevel@tonic-gate 	case OP_LOCKT:
25097c478bd9Sstevel@tonic-gate 		if (!xdr_LOCKT4args(xdrs, &objp->nfs_argop4_u.oplockt))
25107c478bd9Sstevel@tonic-gate 			return (FALSE);
25117c478bd9Sstevel@tonic-gate 		break;
25127c478bd9Sstevel@tonic-gate 	case OP_LOCKU:
25137c478bd9Sstevel@tonic-gate 		if (!xdr_LOCKU4args(xdrs, &objp->nfs_argop4_u.oplocku))
25147c478bd9Sstevel@tonic-gate 			return (FALSE);
25157c478bd9Sstevel@tonic-gate 		break;
25167c478bd9Sstevel@tonic-gate 	case OP_LOOKUP:
25177c478bd9Sstevel@tonic-gate 		if (!xdr_LOOKUP4args(xdrs, &objp->nfs_argop4_u.oplookup))
25187c478bd9Sstevel@tonic-gate 			return (FALSE);
25197c478bd9Sstevel@tonic-gate 		break;
25207c478bd9Sstevel@tonic-gate 	case OP_LOOKUPP:
25217c478bd9Sstevel@tonic-gate 		break;
25227c478bd9Sstevel@tonic-gate 	case OP_NVERIFY:
25237c478bd9Sstevel@tonic-gate 		if (!xdr_NVERIFY4args(xdrs, &objp->nfs_argop4_u.opnverify))
25247c478bd9Sstevel@tonic-gate 			return (FALSE);
25257c478bd9Sstevel@tonic-gate 		break;
25267c478bd9Sstevel@tonic-gate 	case OP_OPEN:
25277c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN4args(xdrs, &objp->nfs_argop4_u.opopen))
25287c478bd9Sstevel@tonic-gate 			return (FALSE);
25297c478bd9Sstevel@tonic-gate 		break;
25307c478bd9Sstevel@tonic-gate 	case OP_OPENATTR:
25317c478bd9Sstevel@tonic-gate 		if (!xdr_OPENATTR4args(xdrs, &objp->nfs_argop4_u.opopenattr))
25327c478bd9Sstevel@tonic-gate 			return (FALSE);
25337c478bd9Sstevel@tonic-gate 		break;
25347c478bd9Sstevel@tonic-gate 	case OP_OPEN_CONFIRM:
25357c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN_CONFIRM4args(xdrs, &objp->nfs_argop4_u.
2536bbe876c0SMarcel Telka 		    opopen_confirm))
25377c478bd9Sstevel@tonic-gate 			return (FALSE);
25387c478bd9Sstevel@tonic-gate 		break;
25397c478bd9Sstevel@tonic-gate 	case OP_OPEN_DOWNGRADE:
25407c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN_DOWNGRADE4args(xdrs, &objp->nfs_argop4_u.
2541bbe876c0SMarcel Telka 		    opopen_downgrade))
25427c478bd9Sstevel@tonic-gate 			return (FALSE);
25437c478bd9Sstevel@tonic-gate 		break;
25447c478bd9Sstevel@tonic-gate 	case OP_PUTFH:
25457c478bd9Sstevel@tonic-gate 		if (!xdr_PUTFH4args(xdrs, &objp->nfs_argop4_u.opputfh))
25467c478bd9Sstevel@tonic-gate 			return (FALSE);
25477c478bd9Sstevel@tonic-gate 		break;
25487c478bd9Sstevel@tonic-gate 	case OP_PUTPUBFH:
25497c478bd9Sstevel@tonic-gate 		break;
25507c478bd9Sstevel@tonic-gate 	case OP_PUTROOTFH:
25517c478bd9Sstevel@tonic-gate 		break;
25527c478bd9Sstevel@tonic-gate 	case OP_READ:
25537c478bd9Sstevel@tonic-gate 		if (!xdr_READ4args(xdrs, &objp->nfs_argop4_u.opread))
25547c478bd9Sstevel@tonic-gate 			return (FALSE);
25557c478bd9Sstevel@tonic-gate 		break;
25567c478bd9Sstevel@tonic-gate 	case OP_READDIR:
25577c478bd9Sstevel@tonic-gate 		if (!xdr_READDIR4args(xdrs, &objp->nfs_argop4_u.opreaddir))
25587c478bd9Sstevel@tonic-gate 			return (FALSE);
25597c478bd9Sstevel@tonic-gate 		break;
25607c478bd9Sstevel@tonic-gate 	case OP_READLINK:
25617c478bd9Sstevel@tonic-gate 		break;
25627c478bd9Sstevel@tonic-gate 	case OP_REMOVE:
25637c478bd9Sstevel@tonic-gate 		if (!xdr_REMOVE4args(xdrs, &objp->nfs_argop4_u.opremove))
25647c478bd9Sstevel@tonic-gate 			return (FALSE);
25657c478bd9Sstevel@tonic-gate 		break;
25667c478bd9Sstevel@tonic-gate 	case OP_RENAME:
25677c478bd9Sstevel@tonic-gate 		if (!xdr_RENAME4args(xdrs, &objp->nfs_argop4_u.oprename))
25687c478bd9Sstevel@tonic-gate 			return (FALSE);
25697c478bd9Sstevel@tonic-gate 		break;
25707c478bd9Sstevel@tonic-gate 	case OP_RENEW:
25717c478bd9Sstevel@tonic-gate 		if (!xdr_RENEW4args(xdrs, &objp->nfs_argop4_u.oprenew))
25727c478bd9Sstevel@tonic-gate 			return (FALSE);
25737c478bd9Sstevel@tonic-gate 		break;
25747c478bd9Sstevel@tonic-gate 	case OP_RESTOREFH:
25757c478bd9Sstevel@tonic-gate 		break;
25767c478bd9Sstevel@tonic-gate 	case OP_SAVEFH:
25777c478bd9Sstevel@tonic-gate 		break;
25787c478bd9Sstevel@tonic-gate 	case OP_SECINFO:
25797c478bd9Sstevel@tonic-gate 		if (!xdr_SECINFO4args(xdrs, &objp->nfs_argop4_u.opsecinfo))
25807c478bd9Sstevel@tonic-gate 			return (FALSE);
25817c478bd9Sstevel@tonic-gate 		break;
25827c478bd9Sstevel@tonic-gate 	case OP_SETATTR:
25837c478bd9Sstevel@tonic-gate 		if (!xdr_SETATTR4args(xdrs, &objp->nfs_argop4_u.opsetattr))
25847c478bd9Sstevel@tonic-gate 			return (FALSE);
25857c478bd9Sstevel@tonic-gate 		break;
25867c478bd9Sstevel@tonic-gate 	case OP_SETCLIENTID:
25877c478bd9Sstevel@tonic-gate 		if (!xdr_SETCLIENTID4args(xdrs, &objp->nfs_argop4_u.
2588bbe876c0SMarcel Telka 		    opsetclientid))
25897c478bd9Sstevel@tonic-gate 			return (FALSE);
25907c478bd9Sstevel@tonic-gate 		break;
25917c478bd9Sstevel@tonic-gate 	case OP_SETCLIENTID_CONFIRM:
25927c478bd9Sstevel@tonic-gate 		if (!xdr_SETCLIENTID_CONFIRM4args(xdrs, &objp->nfs_argop4_u.
2593bbe876c0SMarcel Telka 		    opsetclientid_confirm))
25947c478bd9Sstevel@tonic-gate 			return (FALSE);
25957c478bd9Sstevel@tonic-gate 		break;
25967c478bd9Sstevel@tonic-gate 	case OP_VERIFY:
25977c478bd9Sstevel@tonic-gate 		if (!xdr_VERIFY4args(xdrs, &objp->nfs_argop4_u.opverify))
25987c478bd9Sstevel@tonic-gate 			return (FALSE);
25997c478bd9Sstevel@tonic-gate 		break;
26007c478bd9Sstevel@tonic-gate 	case OP_WRITE:
26017c478bd9Sstevel@tonic-gate 		if (!xdr_WRITE4args(xdrs, &objp->nfs_argop4_u.opwrite))
26027c478bd9Sstevel@tonic-gate 			return (FALSE);
26037c478bd9Sstevel@tonic-gate 		break;
26047c478bd9Sstevel@tonic-gate 	case OP_RELEASE_LOCKOWNER:
26057c478bd9Sstevel@tonic-gate 		if (!xdr_RELEASE_LOCKOWNER4args(xdrs,
2606bbe876c0SMarcel Telka 		    &objp->nfs_argop4_u.oprelease_lockowner))
26077c478bd9Sstevel@tonic-gate 			return (FALSE);
26087c478bd9Sstevel@tonic-gate 		break;
26097c478bd9Sstevel@tonic-gate 	case OP_ILLEGAL:
26107c478bd9Sstevel@tonic-gate 		break;
26117c478bd9Sstevel@tonic-gate 	default:
26127c478bd9Sstevel@tonic-gate 		return (FALSE);
26137c478bd9Sstevel@tonic-gate 	}
26147c478bd9Sstevel@tonic-gate 	return (TRUE);
26157c478bd9Sstevel@tonic-gate }
26167c478bd9Sstevel@tonic-gate 
26177c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_resop4(register XDR * xdrs,nfs_resop4 * objp)26187c478bd9Sstevel@tonic-gate xdr_nfs_resop4(register XDR *xdrs, nfs_resop4 *objp)
26197c478bd9Sstevel@tonic-gate {
26207c478bd9Sstevel@tonic-gate 	nfs4_skip_bytes = 0;
26217c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_opnum4(xdrs, &objp->resop))
26227c478bd9Sstevel@tonic-gate 		return (FALSE);
26237c478bd9Sstevel@tonic-gate 	switch (objp->resop) {
26247c478bd9Sstevel@tonic-gate 	case OP_ACCESS:
26257c478bd9Sstevel@tonic-gate 		if (!xdr_ACCESS4res(xdrs, &objp->nfs_resop4_u.opaccess))
26267c478bd9Sstevel@tonic-gate 			return (FALSE);
26277c478bd9Sstevel@tonic-gate 		break;
26287c478bd9Sstevel@tonic-gate 	case OP_CLOSE:
26297c478bd9Sstevel@tonic-gate 		if (!xdr_CLOSE4res(xdrs, &objp->nfs_resop4_u.opclose))
26307c478bd9Sstevel@tonic-gate 			return (FALSE);
26317c478bd9Sstevel@tonic-gate 		break;
26327c478bd9Sstevel@tonic-gate 	case OP_COMMIT:
26337c478bd9Sstevel@tonic-gate 		if (!xdr_COMMIT4res(xdrs, &objp->nfs_resop4_u.opcommit))
26347c478bd9Sstevel@tonic-gate 			return (FALSE);
26357c478bd9Sstevel@tonic-gate 		break;
26367c478bd9Sstevel@tonic-gate 	case OP_CREATE:
26377c478bd9Sstevel@tonic-gate 		if (!xdr_CREATE4res(xdrs, &objp->nfs_resop4_u.opcreate))
26387c478bd9Sstevel@tonic-gate 			return (FALSE);
26397c478bd9Sstevel@tonic-gate 		break;
26407c478bd9Sstevel@tonic-gate 	case OP_DELEGPURGE:
26417c478bd9Sstevel@tonic-gate 		if (!xdr_DELEGPURGE4res(xdrs, &objp->nfs_resop4_u.opdelegpurge))
26427c478bd9Sstevel@tonic-gate 			return (FALSE);
26437c478bd9Sstevel@tonic-gate 		break;
26447c478bd9Sstevel@tonic-gate 	case OP_DELEGRETURN:
26457c478bd9Sstevel@tonic-gate 		if (!xdr_DELEGRETURN4res(xdrs, &objp->nfs_resop4_u.
2646bbe876c0SMarcel Telka 		    opdelegreturn))
26477c478bd9Sstevel@tonic-gate 			return (FALSE);
26487c478bd9Sstevel@tonic-gate 		break;
26497c478bd9Sstevel@tonic-gate 	case OP_GETATTR:
26507c478bd9Sstevel@tonic-gate 		if (!xdr_GETATTR4res(xdrs, &objp->nfs_resop4_u.opgetattr))
26517c478bd9Sstevel@tonic-gate 			return (FALSE);
26527c478bd9Sstevel@tonic-gate 		break;
26537c478bd9Sstevel@tonic-gate 	case OP_GETFH:
26547c478bd9Sstevel@tonic-gate 		if (!xdr_GETFH4res(xdrs, &objp->nfs_resop4_u.opgetfh))
26557c478bd9Sstevel@tonic-gate 			return (FALSE);
26567c478bd9Sstevel@tonic-gate 		break;
26577c478bd9Sstevel@tonic-gate 	case OP_LINK:
26587c478bd9Sstevel@tonic-gate 		if (!xdr_LINK4res(xdrs, &objp->nfs_resop4_u.oplink))
26597c478bd9Sstevel@tonic-gate 			return (FALSE);
26607c478bd9Sstevel@tonic-gate 		break;
26617c478bd9Sstevel@tonic-gate 	case OP_LOCK:
26627c478bd9Sstevel@tonic-gate 		if (!xdr_LOCK4res(xdrs, &objp->nfs_resop4_u.oplock))
26637c478bd9Sstevel@tonic-gate 			return (FALSE);
26647c478bd9Sstevel@tonic-gate 		break;
26657c478bd9Sstevel@tonic-gate 	case OP_LOCKT:
26667c478bd9Sstevel@tonic-gate 		if (!xdr_LOCKT4res(xdrs, &objp->nfs_resop4_u.oplockt))
26677c478bd9Sstevel@tonic-gate 			return (FALSE);
26687c478bd9Sstevel@tonic-gate 		break;
26697c478bd9Sstevel@tonic-gate 	case OP_LOCKU:
26707c478bd9Sstevel@tonic-gate 		if (!xdr_LOCKU4res(xdrs, &objp->nfs_resop4_u.oplocku))
26717c478bd9Sstevel@tonic-gate 			return (FALSE);
26727c478bd9Sstevel@tonic-gate 		break;
26737c478bd9Sstevel@tonic-gate 	case OP_LOOKUP:
26747c478bd9Sstevel@tonic-gate 		if (!xdr_LOOKUP4res(xdrs, &objp->nfs_resop4_u.oplookup))
26757c478bd9Sstevel@tonic-gate 			return (FALSE);
26767c478bd9Sstevel@tonic-gate 		break;
26777c478bd9Sstevel@tonic-gate 	case OP_LOOKUPP:
26787c478bd9Sstevel@tonic-gate 		if (!xdr_LOOKUPP4res(xdrs, &objp->nfs_resop4_u.oplookupp))
26797c478bd9Sstevel@tonic-gate 			return (FALSE);
26807c478bd9Sstevel@tonic-gate 		break;
26817c478bd9Sstevel@tonic-gate 	case OP_NVERIFY:
26827c478bd9Sstevel@tonic-gate 		if (!xdr_NVERIFY4res(xdrs, &objp->nfs_resop4_u.opnverify))
26837c478bd9Sstevel@tonic-gate 			return (FALSE);
26847c478bd9Sstevel@tonic-gate 		break;
26857c478bd9Sstevel@tonic-gate 	case OP_OPEN:
26867c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN4res(xdrs, &objp->nfs_resop4_u.opopen))
26877c478bd9Sstevel@tonic-gate 			return (FALSE);
26887c478bd9Sstevel@tonic-gate 		break;
26897c478bd9Sstevel@tonic-gate 	case OP_OPENATTR:
26907c478bd9Sstevel@tonic-gate 		if (!xdr_OPENATTR4res(xdrs, &objp->nfs_resop4_u.opopenattr))
26917c478bd9Sstevel@tonic-gate 			return (FALSE);
26927c478bd9Sstevel@tonic-gate 		break;
26937c478bd9Sstevel@tonic-gate 	case OP_OPEN_CONFIRM:
26947c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN_CONFIRM4res(xdrs, &objp->nfs_resop4_u.
2695bbe876c0SMarcel Telka 		    opopen_confirm))
26967c478bd9Sstevel@tonic-gate 			return (FALSE);
26977c478bd9Sstevel@tonic-gate 		break;
26987c478bd9Sstevel@tonic-gate 	case OP_OPEN_DOWNGRADE:
26997c478bd9Sstevel@tonic-gate 		if (!xdr_OPEN_DOWNGRADE4res(xdrs, &objp->nfs_resop4_u.
2700bbe876c0SMarcel Telka 		    opopen_downgrade))
27017c478bd9Sstevel@tonic-gate 			return (FALSE);
27027c478bd9Sstevel@tonic-gate 		break;
27037c478bd9Sstevel@tonic-gate 	case OP_PUTFH:
27047c478bd9Sstevel@tonic-gate 		if (!xdr_PUTFH4res(xdrs, &objp->nfs_resop4_u.opputfh))
27057c478bd9Sstevel@tonic-gate 			return (FALSE);
27067c478bd9Sstevel@tonic-gate 		break;
27077c478bd9Sstevel@tonic-gate 	case OP_PUTPUBFH:
27087c478bd9Sstevel@tonic-gate 		if (!xdr_PUTPUBFH4res(xdrs, &objp->nfs_resop4_u.opputpubfh))
27097c478bd9Sstevel@tonic-gate 			return (FALSE);
27107c478bd9Sstevel@tonic-gate 		break;
27117c478bd9Sstevel@tonic-gate 	case OP_PUTROOTFH:
27127c478bd9Sstevel@tonic-gate 		if (!xdr_PUTROOTFH4res(xdrs, &objp->nfs_resop4_u.opputrootfh))
27137c478bd9Sstevel@tonic-gate 			return (FALSE);
27147c478bd9Sstevel@tonic-gate 		break;
27157c478bd9Sstevel@tonic-gate 	case OP_READ:
27167c478bd9Sstevel@tonic-gate 		if (!xdr_READ4res(xdrs, &objp->nfs_resop4_u.opread))
27177c478bd9Sstevel@tonic-gate 			return (FALSE);
27187c478bd9Sstevel@tonic-gate 		break;
27197c478bd9Sstevel@tonic-gate 	case OP_READDIR:
27207c478bd9Sstevel@tonic-gate 		if (!xdr_READDIR4res(xdrs, &objp->nfs_resop4_u.opreaddir))
27217c478bd9Sstevel@tonic-gate 			return (FALSE);
27227c478bd9Sstevel@tonic-gate 		break;
27237c478bd9Sstevel@tonic-gate 	case OP_READLINK:
27247c478bd9Sstevel@tonic-gate 		if (!xdr_READLINK4res(xdrs, &objp->nfs_resop4_u.opreadlink))
27257c478bd9Sstevel@tonic-gate 			return (FALSE);
27267c478bd9Sstevel@tonic-gate 		break;
27277c478bd9Sstevel@tonic-gate 	case OP_REMOVE:
27287c478bd9Sstevel@tonic-gate 		if (!xdr_REMOVE4res(xdrs, &objp->nfs_resop4_u.opremove))
27297c478bd9Sstevel@tonic-gate 			return (FALSE);
27307c478bd9Sstevel@tonic-gate 		break;
27317c478bd9Sstevel@tonic-gate 	case OP_RENAME:
27327c478bd9Sstevel@tonic-gate 		if (!xdr_RENAME4res(xdrs, &objp->nfs_resop4_u.oprename))
27337c478bd9Sstevel@tonic-gate 			return (FALSE);
27347c478bd9Sstevel@tonic-gate 		break;
27357c478bd9Sstevel@tonic-gate 	case OP_RENEW:
27367c478bd9Sstevel@tonic-gate 		if (!xdr_RENEW4res(xdrs, &objp->nfs_resop4_u.oprenew))
27377c478bd9Sstevel@tonic-gate 			return (FALSE);
27387c478bd9Sstevel@tonic-gate 		break;
27397c478bd9Sstevel@tonic-gate 	case OP_RESTOREFH:
27407c478bd9Sstevel@tonic-gate 		if (!xdr_RESTOREFH4res(xdrs, &objp->nfs_resop4_u.oprestorefh))
27417c478bd9Sstevel@tonic-gate 			return (FALSE);
27427c478bd9Sstevel@tonic-gate 		break;
27437c478bd9Sstevel@tonic-gate 	case OP_SAVEFH:
27447c478bd9Sstevel@tonic-gate 		if (!xdr_SAVEFH4res(xdrs, &objp->nfs_resop4_u.opsavefh))
27457c478bd9Sstevel@tonic-gate 			return (FALSE);
27467c478bd9Sstevel@tonic-gate 		break;
27477c478bd9Sstevel@tonic-gate 	case OP_SECINFO:
27487c478bd9Sstevel@tonic-gate 		if (!xdr_SECINFO4res(xdrs, &objp->nfs_resop4_u.opsecinfo))
27497c478bd9Sstevel@tonic-gate 			return (FALSE);
27507c478bd9Sstevel@tonic-gate 		break;
27517c478bd9Sstevel@tonic-gate 	case OP_SETATTR:
27527c478bd9Sstevel@tonic-gate 		if (!xdr_SETATTR4res(xdrs, &objp->nfs_resop4_u.opsetattr))
27537c478bd9Sstevel@tonic-gate 			return (FALSE);
27547c478bd9Sstevel@tonic-gate 		break;
27557c478bd9Sstevel@tonic-gate 	case OP_SETCLIENTID:
27567c478bd9Sstevel@tonic-gate 		if (!xdr_SETCLIENTID4res(xdrs, &objp->nfs_resop4_u.
2757bbe876c0SMarcel Telka 		    opsetclientid))
27587c478bd9Sstevel@tonic-gate 			return (FALSE);
27597c478bd9Sstevel@tonic-gate 		break;
27607c478bd9Sstevel@tonic-gate 	case OP_SETCLIENTID_CONFIRM:
27617c478bd9Sstevel@tonic-gate 		if (!xdr_SETCLIENTID_CONFIRM4res(xdrs, &objp->nfs_resop4_u.
2762bbe876c0SMarcel Telka 		    opsetclientid_confirm))
27637c478bd9Sstevel@tonic-gate 			return (FALSE);
27647c478bd9Sstevel@tonic-gate 		break;
27657c478bd9Sstevel@tonic-gate 	case OP_VERIFY:
27667c478bd9Sstevel@tonic-gate 		if (!xdr_VERIFY4res(xdrs, &objp->nfs_resop4_u.opverify))
27677c478bd9Sstevel@tonic-gate 			return (FALSE);
27687c478bd9Sstevel@tonic-gate 		break;
27697c478bd9Sstevel@tonic-gate 	case OP_WRITE:
27707c478bd9Sstevel@tonic-gate 		if (!xdr_WRITE4res(xdrs, &objp->nfs_resop4_u.opwrite))
27717c478bd9Sstevel@tonic-gate 			return (FALSE);
27727c478bd9Sstevel@tonic-gate 		break;
27737c478bd9Sstevel@tonic-gate 	case OP_RELEASE_LOCKOWNER:
27747c478bd9Sstevel@tonic-gate 		if (!xdr_RELEASE_LOCKOWNER4res(xdrs,
2775bbe876c0SMarcel Telka 		    &objp->nfs_resop4_u.oprelease_lockowner))
27767c478bd9Sstevel@tonic-gate 			return (FALSE);
27777c478bd9Sstevel@tonic-gate 		break;
27787c478bd9Sstevel@tonic-gate 	case OP_ILLEGAL:
27797c478bd9Sstevel@tonic-gate 		if (!xdr_ILLEGAL4res(xdrs, &objp->nfs_resop4_u.opillegal))
27807c478bd9Sstevel@tonic-gate 			return (FALSE);
27817c478bd9Sstevel@tonic-gate 		break;
27827c478bd9Sstevel@tonic-gate 	default:
27837c478bd9Sstevel@tonic-gate 		return (FALSE);
27847c478bd9Sstevel@tonic-gate 	}
27857c478bd9Sstevel@tonic-gate 	return (TRUE);
27867c478bd9Sstevel@tonic-gate }
27877c478bd9Sstevel@tonic-gate 
27887c478bd9Sstevel@tonic-gate bool_t
xdr_COMPOUND4args(register XDR * xdrs,COMPOUND4args * objp)27897c478bd9Sstevel@tonic-gate xdr_COMPOUND4args(register XDR *xdrs, COMPOUND4args *objp)
27907c478bd9Sstevel@tonic-gate {
27917c478bd9Sstevel@tonic-gate 
27927c478bd9Sstevel@tonic-gate 	if (!xdr_utf8string(xdrs, &objp->tag))
27937c478bd9Sstevel@tonic-gate 		return (FALSE);
27947c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->minorversion))
27957c478bd9Sstevel@tonic-gate 		return (FALSE);
27967c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->argarray.argarray_val,
2797bbe876c0SMarcel Telka 	    (uint_t *)&objp->argarray.argarray_len, ~0,
2798bbe876c0SMarcel Telka 	    sizeof (nfs_argop4), (xdrproc_t)xdr_nfs_argop4))
27997c478bd9Sstevel@tonic-gate 		return (FALSE);
28007c478bd9Sstevel@tonic-gate 	return (TRUE);
28017c478bd9Sstevel@tonic-gate }
28027c478bd9Sstevel@tonic-gate 
28037c478bd9Sstevel@tonic-gate bool_t
xdr_COMPOUND4res(register XDR * xdrs,COMPOUND4res * objp)28047c478bd9Sstevel@tonic-gate xdr_COMPOUND4res(register XDR *xdrs, COMPOUND4res *objp)
28057c478bd9Sstevel@tonic-gate {
28067c478bd9Sstevel@tonic-gate 
28077c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
28087c478bd9Sstevel@tonic-gate 		return (FALSE);
28097c478bd9Sstevel@tonic-gate 	if (!xdr_utf8string(xdrs, &objp->tag))
28107c478bd9Sstevel@tonic-gate 		return (FALSE);
28117c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->resarray.resarray_val,
2812bbe876c0SMarcel Telka 	    (uint_t *)&objp->resarray.resarray_len, ~0,
2813bbe876c0SMarcel Telka 	    sizeof (nfs_resop4), (xdrproc_t)xdr_nfs_resop4))
28147c478bd9Sstevel@tonic-gate 		return (FALSE);
28157c478bd9Sstevel@tonic-gate 	return (TRUE);
28167c478bd9Sstevel@tonic-gate }
28177c478bd9Sstevel@tonic-gate 
28187c478bd9Sstevel@tonic-gate bool_t
xdr_CB_GETATTR4args(register XDR * xdrs,CB_GETATTR4args * objp)28197c478bd9Sstevel@tonic-gate xdr_CB_GETATTR4args(register XDR *xdrs, CB_GETATTR4args *objp)
28207c478bd9Sstevel@tonic-gate {
28217c478bd9Sstevel@tonic-gate 
28227c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_fh4(xdrs, &objp->fh))
28237c478bd9Sstevel@tonic-gate 		return (FALSE);
28247c478bd9Sstevel@tonic-gate 	if (!xdr_bitmap4(xdrs, &objp->attr_request))
28257c478bd9Sstevel@tonic-gate 		return (FALSE);
28267c478bd9Sstevel@tonic-gate 	return (TRUE);
28277c478bd9Sstevel@tonic-gate }
28287c478bd9Sstevel@tonic-gate 
28297c478bd9Sstevel@tonic-gate bool_t
xdr_CB_GETATTR4resok(register XDR * xdrs,CB_GETATTR4resok * objp)28307c478bd9Sstevel@tonic-gate xdr_CB_GETATTR4resok(register XDR *xdrs, CB_GETATTR4resok *objp)
28317c478bd9Sstevel@tonic-gate {
28327c478bd9Sstevel@tonic-gate 
28337c478bd9Sstevel@tonic-gate 	if (!xdr_fattr4(xdrs, &objp->obj_attributes))
28347c478bd9Sstevel@tonic-gate 		return (FALSE);
28357c478bd9Sstevel@tonic-gate 	return (TRUE);
28367c478bd9Sstevel@tonic-gate }
28377c478bd9Sstevel@tonic-gate 
28387c478bd9Sstevel@tonic-gate bool_t
xdr_CB_GETATTR4res(register XDR * xdrs,CB_GETATTR4res * objp)28397c478bd9Sstevel@tonic-gate xdr_CB_GETATTR4res(register XDR *xdrs, CB_GETATTR4res *objp)
28407c478bd9Sstevel@tonic-gate {
28417c478bd9Sstevel@tonic-gate 
28427c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
28437c478bd9Sstevel@tonic-gate 		return (FALSE);
28447c478bd9Sstevel@tonic-gate 	switch (objp->status) {
28457c478bd9Sstevel@tonic-gate 	case NFS4_OK:
28467c478bd9Sstevel@tonic-gate 		if (!xdr_CB_GETATTR4resok(xdrs, &objp->CB_GETATTR4res_u.resok4))
28477c478bd9Sstevel@tonic-gate 			return (FALSE);
28487c478bd9Sstevel@tonic-gate 		break;
28497c478bd9Sstevel@tonic-gate 	}
28507c478bd9Sstevel@tonic-gate 	return (TRUE);
28517c478bd9Sstevel@tonic-gate }
28527c478bd9Sstevel@tonic-gate 
28537c478bd9Sstevel@tonic-gate bool_t
xdr_CB_RECALL4args(register XDR * xdrs,CB_RECALL4args * objp)28547c478bd9Sstevel@tonic-gate xdr_CB_RECALL4args(register XDR *xdrs, CB_RECALL4args *objp)
28557c478bd9Sstevel@tonic-gate {
28567c478bd9Sstevel@tonic-gate 
28577c478bd9Sstevel@tonic-gate 	if (!xdr_stateid4(xdrs, &objp->stateid))
28587c478bd9Sstevel@tonic-gate 		return (FALSE);
28597c478bd9Sstevel@tonic-gate 	if (!xdr_bool(xdrs, &objp->truncate))
28607c478bd9Sstevel@tonic-gate 		return (FALSE);
28617c478bd9Sstevel@tonic-gate 	if (!xdr_nfs_fh4(xdrs, &objp->fh))
28627c478bd9Sstevel@tonic-gate 		return (FALSE);
28637c478bd9Sstevel@tonic-gate 	return (TRUE);
28647c478bd9Sstevel@tonic-gate }
28657c478bd9Sstevel@tonic-gate 
28667c478bd9Sstevel@tonic-gate bool_t
xdr_CB_RECALL4res(register XDR * xdrs,CB_RECALL4res * objp)28677c478bd9Sstevel@tonic-gate xdr_CB_RECALL4res(register XDR *xdrs, CB_RECALL4res *objp)
28687c478bd9Sstevel@tonic-gate {
28697c478bd9Sstevel@tonic-gate 
28707c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
28717c478bd9Sstevel@tonic-gate 		return (FALSE);
28727c478bd9Sstevel@tonic-gate 	return (TRUE);
28737c478bd9Sstevel@tonic-gate }
28747c478bd9Sstevel@tonic-gate 
28757c478bd9Sstevel@tonic-gate bool_t
xdr_CB_ILLEGAL4res(register XDR * xdrs,CB_ILLEGAL4res * objp)28767c478bd9Sstevel@tonic-gate xdr_CB_ILLEGAL4res(register XDR *xdrs, CB_ILLEGAL4res *objp)
28777c478bd9Sstevel@tonic-gate {
28787c478bd9Sstevel@tonic-gate 
28797c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
28807c478bd9Sstevel@tonic-gate 		return (FALSE);
28817c478bd9Sstevel@tonic-gate 	return (TRUE);
28827c478bd9Sstevel@tonic-gate }
28837c478bd9Sstevel@tonic-gate 
28847c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_cb_opnum4(register XDR * xdrs,nfs_cb_opnum4 * objp)28857c478bd9Sstevel@tonic-gate xdr_nfs_cb_opnum4(register XDR *xdrs, nfs_cb_opnum4 *objp)
28867c478bd9Sstevel@tonic-gate {
28877c478bd9Sstevel@tonic-gate 
28887c478bd9Sstevel@tonic-gate 	if (!xdr_enum(xdrs, (enum_t *)objp))
28897c478bd9Sstevel@tonic-gate 		return (FALSE);
28907c478bd9Sstevel@tonic-gate 	return (TRUE);
28917c478bd9Sstevel@tonic-gate }
28927c478bd9Sstevel@tonic-gate 
28937c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_cb_argop4(register XDR * xdrs,nfs_cb_argop4 * objp)28947c478bd9Sstevel@tonic-gate xdr_nfs_cb_argop4(register XDR *xdrs, nfs_cb_argop4 *objp)
28957c478bd9Sstevel@tonic-gate {
28967c478bd9Sstevel@tonic-gate 
28977c478bd9Sstevel@tonic-gate 	if (!xdr_u_int(xdrs, &objp->argop))
28987c478bd9Sstevel@tonic-gate 		return (FALSE);
28997c478bd9Sstevel@tonic-gate 	switch (objp->argop) {
29007c478bd9Sstevel@tonic-gate 	case OP_CB_GETATTR:
29017c478bd9Sstevel@tonic-gate 		if (!xdr_CB_GETATTR4args(xdrs, &objp->nfs_cb_argop4_u.
2902bbe876c0SMarcel Telka 		    opcbgetattr))
29037c478bd9Sstevel@tonic-gate 			return (FALSE);
29047c478bd9Sstevel@tonic-gate 		break;
29057c478bd9Sstevel@tonic-gate 	case OP_CB_RECALL:
29067c478bd9Sstevel@tonic-gate 		if (!xdr_CB_RECALL4args(xdrs, &objp->nfs_cb_argop4_u.
2907bbe876c0SMarcel Telka 		    opcbrecall))
29087c478bd9Sstevel@tonic-gate 			return (FALSE);
29097c478bd9Sstevel@tonic-gate 		break;
29107c478bd9Sstevel@tonic-gate 	case OP_CB_ILLEGAL:
29117c478bd9Sstevel@tonic-gate 		break;
29127c478bd9Sstevel@tonic-gate 	default:
29137c478bd9Sstevel@tonic-gate 		return (FALSE);
29147c478bd9Sstevel@tonic-gate 	}
29157c478bd9Sstevel@tonic-gate 	return (TRUE);
29167c478bd9Sstevel@tonic-gate }
29177c478bd9Sstevel@tonic-gate 
29187c478bd9Sstevel@tonic-gate bool_t
xdr_nfs_cb_resop4(register XDR * xdrs,nfs_cb_resop4 * objp)29197c478bd9Sstevel@tonic-gate xdr_nfs_cb_resop4(register XDR *xdrs, nfs_cb_resop4 *objp)
29207c478bd9Sstevel@tonic-gate {
29217c478bd9Sstevel@tonic-gate 
29227c478bd9Sstevel@tonic-gate 	if (!xdr_u_int(xdrs, &objp->resop))
29237c478bd9Sstevel@tonic-gate 		return (FALSE);
29247c478bd9Sstevel@tonic-gate 	switch (objp->resop) {
29257c478bd9Sstevel@tonic-gate 	case OP_CB_GETATTR:
29267c478bd9Sstevel@tonic-gate 		if (!xdr_CB_GETATTR4res(xdrs, &objp->nfs_cb_resop4_u.
2927bbe876c0SMarcel Telka 		    opcbgetattr))
29287c478bd9Sstevel@tonic-gate 			return (FALSE);
29297c478bd9Sstevel@tonic-gate 		break;
29307c478bd9Sstevel@tonic-gate 	case OP_CB_RECALL:
29317c478bd9Sstevel@tonic-gate 		if (!xdr_CB_RECALL4res(xdrs, &objp->nfs_cb_resop4_u.opcbrecall))
29327c478bd9Sstevel@tonic-gate 			return (FALSE);
29337c478bd9Sstevel@tonic-gate 		break;
29347c478bd9Sstevel@tonic-gate 	case OP_CB_ILLEGAL:
29357c478bd9Sstevel@tonic-gate 		if (!xdr_CB_ILLEGAL4res(xdrs,
2936bbe876c0SMarcel Telka 		    &objp->nfs_cb_resop4_u.opcbillegal))
29377c478bd9Sstevel@tonic-gate 			return (FALSE);
29387c478bd9Sstevel@tonic-gate 		break;
29397c478bd9Sstevel@tonic-gate 	default:
29407c478bd9Sstevel@tonic-gate 		return (FALSE);
29417c478bd9Sstevel@tonic-gate 	}
29427c478bd9Sstevel@tonic-gate 	return (TRUE);
29437c478bd9Sstevel@tonic-gate }
29447c478bd9Sstevel@tonic-gate 
29457c478bd9Sstevel@tonic-gate bool_t
xdr_CB_COMPOUND4args(register XDR * xdrs,CB_COMPOUND4args * objp)29467c478bd9Sstevel@tonic-gate xdr_CB_COMPOUND4args(register XDR *xdrs, CB_COMPOUND4args *objp)
29477c478bd9Sstevel@tonic-gate {
29487c478bd9Sstevel@tonic-gate 
29497c478bd9Sstevel@tonic-gate 	if (!xdr_utf8string(xdrs, &objp->tag))
29507c478bd9Sstevel@tonic-gate 		return (FALSE);
29517c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->minorversion))
29527c478bd9Sstevel@tonic-gate 		return (FALSE);
29537c478bd9Sstevel@tonic-gate 	if (!xdr_uint32_t(xdrs, &objp->callback_ident))
29547c478bd9Sstevel@tonic-gate 		return (FALSE);
29557c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->argarray.argarray_val,
2956bbe876c0SMarcel Telka 	    (uint_t *)&objp->argarray.argarray_len, ~0,
2957bbe876c0SMarcel Telka 	    sizeof (nfs_cb_argop4), (xdrproc_t)xdr_nfs_cb_argop4))
29587c478bd9Sstevel@tonic-gate 		return (FALSE);
29597c478bd9Sstevel@tonic-gate 	return (TRUE);
29607c478bd9Sstevel@tonic-gate }
29617c478bd9Sstevel@tonic-gate 
29627c478bd9Sstevel@tonic-gate bool_t
xdr_CB_COMPOUND4res(register XDR * xdrs,CB_COMPOUND4res * objp)29637c478bd9Sstevel@tonic-gate xdr_CB_COMPOUND4res(register XDR *xdrs, CB_COMPOUND4res *objp)
29647c478bd9Sstevel@tonic-gate {
29657c478bd9Sstevel@tonic-gate 
29667c478bd9Sstevel@tonic-gate 	if (!xdr_nfsstat4(xdrs, &objp->status))
29677c478bd9Sstevel@tonic-gate 		return (FALSE);
29687c478bd9Sstevel@tonic-gate 	if (!xdr_utf8string(xdrs, &objp->tag))
29697c478bd9Sstevel@tonic-gate 		return (FALSE);
29707c478bd9Sstevel@tonic-gate 	if (!xdr_array(xdrs, (char **)&objp->resarray.resarray_val,
2971bbe876c0SMarcel Telka 	    (uint_t *)&objp->resarray.resarray_len, ~0,
2972bbe876c0SMarcel Telka 	    sizeof (nfs_cb_resop4), (xdrproc_t)xdr_nfs_cb_resop4))
29737c478bd9Sstevel@tonic-gate 		return (FALSE);
29747c478bd9Sstevel@tonic-gate 	return (TRUE);
29757c478bd9Sstevel@tonic-gate }
2976