4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
24 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
28 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
29 * Use is subject to license terms.
33 * This file was initially generated using rpcgen. The rpcgen-erated
34 * code used tail recursion to implement linked lists which resulted
35 * in various crashes due to blown stacks. If the NFS4 protocol changes
36 * be sure to either use the NFS4-friendly rpcgen (doesn't use tail
37 * recursion) or do the xdr by hand.
39 * CAUTION: This file is kept in sync with it's uts counterpart:
41 * usr/src/uts/common/fs/nfs/nfs4_xdr.c
43 * However, it is not an exact copy. NEVER copy uts's nfs4_xdr.c
44 * directly over this file. Changes from the uts version must be
45 * integrated by hand into this file.
48 #include <rpcsvc/nfs4_prot.h>
52 #define IGNORE_RDWR_DATA
54 extern int nfs4_skip_bytes
;
57 xdr_nfs_ftype4(register XDR
*xdrs
, nfs_ftype4
*objp
)
60 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
66 xdr_nfsstat4(register XDR
*xdrs
, nfsstat4
*objp
)
69 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
75 xdr_bitmap4(register XDR
*xdrs
, bitmap4
*objp
)
78 if (!xdr_array(xdrs
, (char **)&objp
->bitmap4_val
,
79 (uint_t
*)&objp
->bitmap4_len
, ~0,
80 sizeof (uint32_t), (xdrproc_t
)xdr_uint32_t
))
86 xdr_offset4(register XDR
*xdrs
, offset4
*objp
)
89 if (!xdr_uint64_t(xdrs
, objp
))
95 xdr_count4(register XDR
*xdrs
, count4
*objp
)
98 if (!xdr_uint32_t(xdrs
, objp
))
104 xdr_length4(register XDR
*xdrs
, length4
*objp
)
107 if (!xdr_uint64_t(xdrs
, objp
))
113 xdr_clientid4(register XDR
*xdrs
, clientid4
*objp
)
116 if (!xdr_uint64_t(xdrs
, objp
))
122 xdr_seqid4(register XDR
*xdrs
, seqid4
*objp
)
125 if (!xdr_uint32_t(xdrs
, objp
))
131 xdr_utf8string(register XDR
*xdrs
, utf8string
*objp
)
134 if (!xdr_bytes(xdrs
, (char **)&objp
->utf8string_val
,
135 (uint_t
*)&objp
->utf8string_len
, NFS4_MAX_UTF8STRING
))
141 xdr_component4(register XDR
*xdrs
, component4
*objp
)
144 if (!xdr_utf8string(xdrs
, objp
))
150 xdr_pathname4(register XDR
*xdrs
, pathname4
*objp
)
153 if (!xdr_array(xdrs
, (char **)&objp
->pathname4_val
,
154 (uint_t
*)&objp
->pathname4_len
, NFS4_MAX_PATHNAME4
,
155 sizeof (component4
), (xdrproc_t
)xdr_component4
))
161 xdr_nfs_lockid4(register XDR
*xdrs
, nfs_lockid4
*objp
)
164 if (!xdr_uint64_t(xdrs
, objp
))
170 xdr_nfs_cookie4(register XDR
*xdrs
, nfs_cookie4
*objp
)
173 if (!xdr_uint64_t(xdrs
, objp
))
179 xdr_linktext4(register XDR
*xdrs
, linktext4
*objp
)
182 if (!xdr_bytes(xdrs
, (char **)&objp
->linktext4_val
,
183 (uint_t
*)&objp
->linktext4_len
, NFS4_MAX_LINKTEXT4
))
189 xdr_ascii_REQUIRED4(register XDR
*xdrs
, ascii_REQUIRED4
*objp
)
192 if (!xdr_utf8string(xdrs
, objp
))
198 xdr_sec_oid4(register XDR
*xdrs
, sec_oid4
*objp
)
201 if (!xdr_bytes(xdrs
, (char **)&objp
->sec_oid4_val
,
202 (uint_t
*)&objp
->sec_oid4_len
, NFS4_MAX_SECOID4
))
208 xdr_qop4(register XDR
*xdrs
, qop4
*objp
)
211 if (!xdr_uint32_t(xdrs
, objp
))
217 xdr_mode4(register XDR
*xdrs
, mode4
*objp
)
220 if (!xdr_uint32_t(xdrs
, objp
))
226 xdr_changeid4(register XDR
*xdrs
, changeid4
*objp
)
229 if (!xdr_uint64_t(xdrs
, objp
))
235 xdr_verifier4(register XDR
*xdrs
, verifier4 objp
)
238 if (!xdr_opaque(xdrs
, objp
, NFS4_VERIFIER_SIZE
))
244 xdr_nfstime4(register XDR
*xdrs
, nfstime4
*objp
)
247 if (!xdr_int64_t(xdrs
, &objp
->seconds
))
249 if (!xdr_uint32_t(xdrs
, &objp
->nseconds
))
255 xdr_time_how4(register XDR
*xdrs
, time_how4
*objp
)
258 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
264 xdr_settime4(register XDR
*xdrs
, settime4
*objp
)
267 if (!xdr_time_how4(xdrs
, &objp
->set_it
))
269 switch (objp
->set_it
) {
270 case SET_TO_CLIENT_TIME4
:
271 if (!xdr_nfstime4(xdrs
, &objp
->settime4_u
.time
))
279 xdr_nfs_fh4(register XDR
*xdrs
, nfs_fh4
*objp
)
282 if (!xdr_bytes(xdrs
, (char **)&objp
->nfs_fh4_val
,
283 (uint_t
*)&objp
->nfs_fh4_len
, NFS4_FHSIZE
))
289 xdr_fsid4(register XDR
*xdrs
, fsid4
*objp
)
292 if (!xdr_uint64_t(xdrs
, &objp
->major
))
294 if (!xdr_uint64_t(xdrs
, &objp
->minor
))
300 xdr_fs_location4(register XDR
*xdrs
, fs_location4
*objp
)
303 if (!xdr_array(xdrs
, (char **)&objp
->server
.server_val
,
304 (uint_t
*)&objp
->server
.server_len
, ~0,
305 sizeof (utf8string
), (xdrproc_t
)xdr_utf8string
))
307 if (!xdr_pathname4(xdrs
, &objp
->rootpath
))
313 xdr_fs_locations4(register XDR
*xdrs
, fs_locations4
*objp
)
316 if (!xdr_pathname4(xdrs
, &objp
->fs_root
))
318 if (!xdr_array(xdrs
, (char **)&objp
->locations
.locations_val
,
319 (uint_t
*)&objp
->locations
.locations_len
, ~0,
320 sizeof (fs_location4
), (xdrproc_t
)xdr_fs_location4
))
326 xdr_acetype4(register XDR
*xdrs
, acetype4
*objp
)
329 if (!xdr_u_int(xdrs
, objp
))
335 xdr_aceflag4(register XDR
*xdrs
, aceflag4
*objp
)
338 if (!xdr_u_int(xdrs
, objp
))
344 xdr_acemask4(register XDR
*xdrs
, acemask4
*objp
)
347 if (!xdr_u_int(xdrs
, objp
))
353 xdr_nfsace4(register XDR
*xdrs
, nfsace4
*objp
)
355 if (!xdr_acetype4(xdrs
, &objp
->type
))
357 if (!xdr_aceflag4(xdrs
, &objp
->flag
))
359 if (!xdr_acemask4(xdrs
, &objp
->access_mask
))
361 if (xdrs
->x_op
== XDR_DECODE
) {
362 objp
->who
.utf8string_val
= NULL
;
363 objp
->who
.utf8string_len
= 0;
365 return (xdr_bytes(xdrs
, (char **)&objp
->who
.utf8string_val
,
366 (uint_t
*)&objp
->who
.utf8string_len
,
367 NFS4_MAX_UTF8STRING
));
371 xdr_specdata4(register XDR
*xdrs
, specdata4
*objp
)
374 if (!xdr_uint32_t(xdrs
, &objp
->specdata1
))
376 if (!xdr_uint32_t(xdrs
, &objp
->specdata2
))
382 xdr_fattr4_supported_attrs(register XDR
*xdrs
, fattr4_supported_attrs
*objp
)
385 if (!xdr_bitmap4(xdrs
, objp
))
391 xdr_fattr4_type(register XDR
*xdrs
, fattr4_type
*objp
)
394 if (!xdr_nfs_ftype4(xdrs
, objp
))
400 xdr_fattr4_fh_expire_type(register XDR
*xdrs
, fattr4_fh_expire_type
*objp
)
403 if (!xdr_uint32_t(xdrs
, objp
))
409 xdr_fattr4_change(register XDR
*xdrs
, fattr4_change
*objp
)
412 if (!xdr_changeid4(xdrs
, objp
))
418 xdr_fattr4_size(register XDR
*xdrs
, fattr4_size
*objp
)
421 if (!xdr_uint64_t(xdrs
, objp
))
427 xdr_fattr4_link_support(register XDR
*xdrs
, fattr4_link_support
*objp
)
430 if (!xdr_bool(xdrs
, objp
))
436 xdr_fattr4_symlink_support(register XDR
*xdrs
, fattr4_symlink_support
*objp
)
439 if (!xdr_bool(xdrs
, objp
))
445 xdr_fattr4_named_attr(register XDR
*xdrs
, fattr4_named_attr
*objp
)
448 if (!xdr_bool(xdrs
, objp
))
454 xdr_fattr4_fsid(register XDR
*xdrs
, fattr4_fsid
*objp
)
457 if (!xdr_fsid4(xdrs
, objp
))
463 xdr_fattr4_unique_handles(register XDR
*xdrs
, fattr4_unique_handles
*objp
)
466 if (!xdr_bool(xdrs
, objp
))
472 xdr_fattr4_lease_time(register XDR
*xdrs
, fattr4_lease_time
*objp
)
475 if (!xdr_uint32_t(xdrs
, objp
))
481 xdr_fattr4_rdattr_error(register XDR
*xdrs
, fattr4_rdattr_error
*objp
)
484 if (!xdr_nfsstat4(xdrs
, objp
))
490 xdr_fattr4_acl(register XDR
*xdrs
, fattr4_acl
*objp
)
493 if (!xdr_array(xdrs
, (char **)&objp
->fattr4_acl_val
,
494 (uint_t
*)&objp
->fattr4_acl_len
, ~0,
495 sizeof (nfsace4
), (xdrproc_t
)xdr_nfsace4
))
501 xdr_fattr4_aclsupport(register XDR
*xdrs
, fattr4_aclsupport
*objp
)
504 if (!xdr_uint32_t(xdrs
, objp
))
510 xdr_fattr4_archive(register XDR
*xdrs
, fattr4_archive
*objp
)
513 if (!xdr_bool(xdrs
, objp
))
519 xdr_fattr4_cansettime(register XDR
*xdrs
, fattr4_cansettime
*objp
)
522 if (!xdr_bool(xdrs
, objp
))
528 xdr_fattr4_case_insensitive(register XDR
*xdrs
, fattr4_case_insensitive
*objp
)
531 if (!xdr_bool(xdrs
, objp
))
537 xdr_fattr4_case_preserving(register XDR
*xdrs
, fattr4_case_preserving
*objp
)
540 if (!xdr_bool(xdrs
, objp
))
546 xdr_fattr4_chown_restricted(register XDR
*xdrs
, fattr4_chown_restricted
*objp
)
549 if (!xdr_bool(xdrs
, objp
))
555 xdr_fattr4_fileid(register XDR
*xdrs
, fattr4_fileid
*objp
)
558 if (!xdr_uint64_t(xdrs
, objp
))
564 xdr_fattr4_files_avail(register XDR
*xdrs
, fattr4_files_avail
*objp
)
567 if (!xdr_uint64_t(xdrs
, objp
))
573 xdr_fattr4_filehandle(register XDR
*xdrs
, fattr4_filehandle
*objp
)
576 if (!xdr_nfs_fh4(xdrs
, objp
))
582 xdr_fattr4_files_free(register XDR
*xdrs
, fattr4_files_free
*objp
)
585 if (!xdr_uint64_t(xdrs
, objp
))
591 xdr_fattr4_files_total(register XDR
*xdrs
, fattr4_files_total
*objp
)
594 if (!xdr_uint64_t(xdrs
, objp
))
600 xdr_fattr4_fs_locations(register XDR
*xdrs
, fattr4_fs_locations
*objp
)
603 if (!xdr_fs_locations4(xdrs
, objp
))
609 xdr_fattr4_hidden(register XDR
*xdrs
, fattr4_hidden
*objp
)
612 if (!xdr_bool(xdrs
, objp
))
618 xdr_fattr4_homogeneous(register XDR
*xdrs
, fattr4_homogeneous
*objp
)
621 if (!xdr_bool(xdrs
, objp
))
627 xdr_fattr4_maxfilesize(register XDR
*xdrs
, fattr4_maxfilesize
*objp
)
630 if (!xdr_uint64_t(xdrs
, objp
))
636 xdr_fattr4_maxlink(register XDR
*xdrs
, fattr4_maxlink
*objp
)
639 if (!xdr_uint32_t(xdrs
, objp
))
645 xdr_fattr4_maxname(register XDR
*xdrs
, fattr4_maxname
*objp
)
648 if (!xdr_uint32_t(xdrs
, objp
))
654 xdr_fattr4_maxread(register XDR
*xdrs
, fattr4_maxread
*objp
)
657 if (!xdr_uint64_t(xdrs
, objp
))
663 xdr_fattr4_maxwrite(register XDR
*xdrs
, fattr4_maxwrite
*objp
)
666 if (!xdr_uint64_t(xdrs
, objp
))
672 xdr_fattr4_mimetype(register XDR
*xdrs
, fattr4_mimetype
*objp
)
675 if (!xdr_ascii_REQUIRED4(xdrs
, objp
))
681 xdr_fattr4_mode(register XDR
*xdrs
, fattr4_mode
*objp
)
684 if (!xdr_mode4(xdrs
, objp
))
690 xdr_fattr4_mounted_on_fileid(register XDR
*xdrs
, fattr4_mounted_on_fileid
*objp
)
693 if (!xdr_uint64_t(xdrs
, objp
))
699 xdr_fattr4_no_trunc(register XDR
*xdrs
, fattr4_no_trunc
*objp
)
702 if (!xdr_bool(xdrs
, objp
))
708 xdr_fattr4_numlinks(register XDR
*xdrs
, fattr4_numlinks
*objp
)
711 if (!xdr_uint32_t(xdrs
, objp
))
717 xdr_fattr4_owner(register XDR
*xdrs
, fattr4_owner
*objp
)
720 if (!xdr_utf8string(xdrs
, objp
))
726 xdr_fattr4_owner_group(register XDR
*xdrs
, fattr4_owner_group
*objp
)
729 if (!xdr_utf8string(xdrs
, objp
))
735 xdr_fattr4_quota_avail_hard(register XDR
*xdrs
, fattr4_quota_avail_hard
*objp
)
738 if (!xdr_uint64_t(xdrs
, objp
))
744 xdr_fattr4_quota_avail_soft(register XDR
*xdrs
, fattr4_quota_avail_soft
*objp
)
747 if (!xdr_uint64_t(xdrs
, objp
))
753 xdr_fattr4_quota_used(register XDR
*xdrs
, fattr4_quota_used
*objp
)
756 if (!xdr_uint64_t(xdrs
, objp
))
762 xdr_fattr4_rawdev(register XDR
*xdrs
, fattr4_rawdev
*objp
)
765 if (!xdr_specdata4(xdrs
, objp
))
771 xdr_fattr4_space_avail(register XDR
*xdrs
, fattr4_space_avail
*objp
)
774 if (!xdr_uint64_t(xdrs
, objp
))
780 xdr_fattr4_space_free(register XDR
*xdrs
, fattr4_space_free
*objp
)
783 if (!xdr_uint64_t(xdrs
, objp
))
789 xdr_fattr4_space_total(register XDR
*xdrs
, fattr4_space_total
*objp
)
792 if (!xdr_uint64_t(xdrs
, objp
))
798 xdr_fattr4_space_used(register XDR
*xdrs
, fattr4_space_used
*objp
)
801 if (!xdr_uint64_t(xdrs
, objp
))
807 xdr_fattr4_system(register XDR
*xdrs
, fattr4_system
*objp
)
810 if (!xdr_bool(xdrs
, objp
))
816 xdr_fattr4_time_access(register XDR
*xdrs
, fattr4_time_access
*objp
)
819 if (!xdr_nfstime4(xdrs
, objp
))
825 xdr_fattr4_time_access_set(register XDR
*xdrs
, fattr4_time_access_set
*objp
)
828 if (!xdr_settime4(xdrs
, objp
))
834 xdr_fattr4_time_backup(register XDR
*xdrs
, fattr4_time_backup
*objp
)
837 if (!xdr_nfstime4(xdrs
, objp
))
843 xdr_fattr4_time_create(register XDR
*xdrs
, fattr4_time_create
*objp
)
846 if (!xdr_nfstime4(xdrs
, objp
))
852 xdr_fattr4_time_delta(register XDR
*xdrs
, fattr4_time_delta
*objp
)
855 if (!xdr_nfstime4(xdrs
, objp
))
861 xdr_fattr4_time_metadata(register XDR
*xdrs
, fattr4_time_metadata
*objp
)
864 if (!xdr_nfstime4(xdrs
, objp
))
870 xdr_fattr4_time_modify(register XDR
*xdrs
, fattr4_time_modify
*objp
)
873 if (!xdr_nfstime4(xdrs
, objp
))
879 xdr_fattr4_time_modify_set(register XDR
*xdrs
, fattr4_time_modify_set
*objp
)
882 if (!xdr_settime4(xdrs
, objp
))
888 xdr_attrlist4(register XDR
*xdrs
, attrlist4
*objp
)
891 if (!xdr_bytes(xdrs
, (char **)&objp
->attrlist4_val
,
892 (uint_t
*)&objp
->attrlist4_len
, ~0))
898 xdr_fattr4(register XDR
*xdrs
, fattr4
*objp
)
901 if (!xdr_bitmap4(xdrs
, &objp
->attrmask
))
903 if (!xdr_attrlist4(xdrs
, &objp
->attr_vals
))
909 xdr_change_info4(register XDR
*xdrs
, change_info4
*objp
)
912 if (!xdr_bool(xdrs
, &objp
->atomic
))
914 if (!xdr_changeid4(xdrs
, &objp
->before
))
916 if (!xdr_changeid4(xdrs
, &objp
->after
))
922 xdr_clientaddr4(register XDR
*xdrs
, clientaddr4
*objp
)
925 if (!xdr_string(xdrs
, &objp
->r_netid
, ~0))
927 if (!xdr_string(xdrs
, &objp
->r_addr
, ~0))
933 xdr_cb_client4(register XDR
*xdrs
, cb_client4
*objp
)
936 if (!xdr_u_int(xdrs
, &objp
->cb_program
))
938 if (!xdr_clientaddr4(xdrs
, &objp
->cb_location
))
944 xdr_stateid4(register XDR
*xdrs
, stateid4
*objp
)
947 if (!xdr_uint32_t(xdrs
, &objp
->seqid
))
949 if (!xdr_opaque(xdrs
, objp
->other
, 12))
955 xdr_nfs_client_id4(register XDR
*xdrs
, nfs_client_id4
*objp
)
958 if (!xdr_verifier4(xdrs
, objp
->verifier
))
960 if (!xdr_bytes(xdrs
, (char **)&objp
->id
.id_val
,
961 (uint_t
*)&objp
->id
.id_len
, NFS4_OPAQUE_LIMIT
))
967 xdr_open_owner4(register XDR
*xdrs
, open_owner4
*objp
)
970 if (!xdr_clientid4(xdrs
, &objp
->clientid
))
972 if (!xdr_bytes(xdrs
, (char **)&objp
->owner
.owner_val
,
973 (uint_t
*)&objp
->owner
.owner_len
, NFS4_OPAQUE_LIMIT
))
979 xdr_lock_owner4(register XDR
*xdrs
, lock_owner4
*objp
)
982 if (!xdr_clientid4(xdrs
, &objp
->clientid
))
984 if (!xdr_bytes(xdrs
, (char **)&objp
->owner
.owner_val
,
985 (uint_t
*)&objp
->owner
.owner_len
, NFS4_OPAQUE_LIMIT
))
991 xdr_nfs_lock_type4(register XDR
*xdrs
, nfs_lock_type4
*objp
)
994 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
1000 xdr_ACCESS4args(register XDR
*xdrs
, ACCESS4args
*objp
)
1003 if (!xdr_uint32_t(xdrs
, &objp
->access
))
1009 xdr_ACCESS4resok(register XDR
*xdrs
, ACCESS4resok
*objp
)
1012 if (!xdr_uint32_t(xdrs
, &objp
->supported
))
1014 if (!xdr_uint32_t(xdrs
, &objp
->access
))
1020 xdr_ACCESS4res(register XDR
*xdrs
, ACCESS4res
*objp
)
1023 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1025 switch (objp
->status
) {
1027 if (!xdr_ACCESS4resok(xdrs
, &objp
->ACCESS4res_u
.resok4
))
1035 xdr_CLOSE4args(register XDR
*xdrs
, CLOSE4args
*objp
)
1038 if (!xdr_seqid4(xdrs
, &objp
->seqid
))
1040 if (!xdr_stateid4(xdrs
, &objp
->open_stateid
))
1046 xdr_CLOSE4res(register XDR
*xdrs
, CLOSE4res
*objp
)
1049 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1051 switch (objp
->status
) {
1053 if (!xdr_stateid4(xdrs
, &objp
->CLOSE4res_u
.open_stateid
))
1061 xdr_COMMIT4args(register XDR
*xdrs
, COMMIT4args
*objp
)
1064 if (!xdr_offset4(xdrs
, &objp
->offset
))
1066 if (!xdr_count4(xdrs
, &objp
->count
))
1072 xdr_COMMIT4resok(register XDR
*xdrs
, COMMIT4resok
*objp
)
1075 if (!xdr_verifier4(xdrs
, objp
->writeverf
))
1081 xdr_COMMIT4res(register XDR
*xdrs
, COMMIT4res
*objp
)
1084 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1086 switch (objp
->status
) {
1088 if (!xdr_COMMIT4resok(xdrs
, &objp
->COMMIT4res_u
.resok4
))
1096 xdr_createtype4(register XDR
*xdrs
, createtype4
*objp
)
1099 if (!xdr_nfs_ftype4(xdrs
, &objp
->type
))
1101 switch (objp
->type
) {
1103 if (!xdr_linktext4(xdrs
, &objp
->createtype4_u
.linkdata
))
1108 if (!xdr_specdata4(xdrs
, &objp
->createtype4_u
.devdata
))
1120 xdr_CREATE4args(register XDR
*xdrs
, CREATE4args
*objp
)
1123 if (!xdr_createtype4(xdrs
, &objp
->objtype
))
1125 if (!xdr_component4(xdrs
, &objp
->objname
))
1127 if (!xdr_fattr4(xdrs
, &objp
->createattrs
))
1133 xdr_CREATE4resok(register XDR
*xdrs
, CREATE4resok
*objp
)
1136 if (!xdr_change_info4(xdrs
, &objp
->cinfo
))
1138 if (!xdr_bitmap4(xdrs
, &objp
->attrset
))
1144 xdr_CREATE4res(register XDR
*xdrs
, CREATE4res
*objp
)
1147 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1149 switch (objp
->status
) {
1151 if (!xdr_CREATE4resok(xdrs
, &objp
->CREATE4res_u
.resok4
))
1159 xdr_DELEGPURGE4args(register XDR
*xdrs
, DELEGPURGE4args
*objp
)
1162 if (!xdr_clientid4(xdrs
, &objp
->clientid
))
1168 xdr_DELEGPURGE4res(register XDR
*xdrs
, DELEGPURGE4res
*objp
)
1171 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1177 xdr_DELEGRETURN4args(register XDR
*xdrs
, DELEGRETURN4args
*objp
)
1180 if (!xdr_stateid4(xdrs
, &objp
->deleg_stateid
))
1186 xdr_DELEGRETURN4res(register XDR
*xdrs
, DELEGRETURN4res
*objp
)
1189 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1195 xdr_GETATTR4args(register XDR
*xdrs
, GETATTR4args
*objp
)
1198 if (!xdr_bitmap4(xdrs
, &objp
->attr_request
))
1204 xdr_GETATTR4resok(register XDR
*xdrs
, GETATTR4resok
*objp
)
1207 if (!xdr_fattr4(xdrs
, &objp
->obj_attributes
))
1213 xdr_GETATTR4res(register XDR
*xdrs
, GETATTR4res
*objp
)
1216 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1218 switch (objp
->status
) {
1220 if (!xdr_GETATTR4resok(xdrs
, &objp
->GETATTR4res_u
.resok4
))
1228 xdr_GETFH4resok(register XDR
*xdrs
, GETFH4resok
*objp
)
1231 if (!xdr_nfs_fh4(xdrs
, &objp
->object
))
1237 xdr_GETFH4res(register XDR
*xdrs
, GETFH4res
*objp
)
1240 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1242 switch (objp
->status
) {
1244 if (!xdr_GETFH4resok(xdrs
, &objp
->GETFH4res_u
.resok4
))
1252 xdr_LINK4args(register XDR
*xdrs
, LINK4args
*objp
)
1255 if (!xdr_component4(xdrs
, &objp
->newname
))
1261 xdr_LINK4resok(register XDR
*xdrs
, LINK4resok
*objp
)
1264 if (!xdr_change_info4(xdrs
, &objp
->cinfo
))
1270 xdr_LINK4res(register XDR
*xdrs
, LINK4res
*objp
)
1273 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1275 switch (objp
->status
) {
1277 if (!xdr_LINK4resok(xdrs
, &objp
->LINK4res_u
.resok4
))
1285 xdr_open_to_lock_owner4(register XDR
*xdrs
, open_to_lock_owner4
*objp
)
1288 if (!xdr_seqid4(xdrs
, &objp
->open_seqid
))
1290 if (!xdr_stateid4(xdrs
, &objp
->open_stateid
))
1292 if (!xdr_seqid4(xdrs
, &objp
->lock_seqid
))
1294 if (!xdr_lock_owner4(xdrs
, &objp
->lock_owner
))
1300 xdr_exist_lock_owner4(register XDR
*xdrs
, exist_lock_owner4
*objp
)
1303 if (!xdr_stateid4(xdrs
, &objp
->lock_stateid
))
1305 if (!xdr_seqid4(xdrs
, &objp
->lock_seqid
))
1311 xdr_locker4(register XDR
*xdrs
, locker4
*objp
)
1314 if (!xdr_bool(xdrs
, &objp
->new_lock_owner
))
1316 switch (objp
->new_lock_owner
) {
1318 if (!xdr_open_to_lock_owner4(xdrs
, &objp
->locker4_u
.open_owner
))
1322 if (!xdr_exist_lock_owner4(xdrs
, &objp
->locker4_u
.lock_owner
))
1332 xdr_LOCK4args(register XDR
*xdrs
, LOCK4args
*objp
)
1335 if (!xdr_nfs_lock_type4(xdrs
, &objp
->locktype
))
1337 if (!xdr_bool(xdrs
, &objp
->reclaim
))
1339 if (!xdr_offset4(xdrs
, &objp
->offset
))
1341 if (!xdr_length4(xdrs
, &objp
->length
))
1343 if (!xdr_locker4(xdrs
, &objp
->locker
))
1349 xdr_LOCK4denied(register XDR
*xdrs
, LOCK4denied
*objp
)
1352 if (!xdr_offset4(xdrs
, &objp
->offset
))
1354 if (!xdr_length4(xdrs
, &objp
->length
))
1356 if (!xdr_nfs_lock_type4(xdrs
, &objp
->locktype
))
1358 if (!xdr_lock_owner4(xdrs
, &objp
->owner
))
1364 xdr_LOCK4resok(register XDR
*xdrs
, LOCK4resok
*objp
)
1367 if (!xdr_stateid4(xdrs
, &objp
->lock_stateid
))
1373 xdr_LOCK4res(register XDR
*xdrs
, LOCK4res
*objp
)
1376 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1378 switch (objp
->status
) {
1380 if (!xdr_LOCK4resok(xdrs
, &objp
->LOCK4res_u
.resok4
))
1383 case NFS4ERR_DENIED
:
1384 if (!xdr_LOCK4denied(xdrs
, &objp
->LOCK4res_u
.denied
))
1392 xdr_LOCKT4args(register XDR
*xdrs
, LOCKT4args
*objp
)
1395 if (!xdr_nfs_lock_type4(xdrs
, &objp
->locktype
))
1397 if (!xdr_offset4(xdrs
, &objp
->offset
))
1399 if (!xdr_length4(xdrs
, &objp
->length
))
1401 if (!xdr_lock_owner4(xdrs
, &objp
->owner
))
1407 xdr_LOCKT4res(register XDR
*xdrs
, LOCKT4res
*objp
)
1410 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1412 switch (objp
->status
) {
1413 case NFS4ERR_DENIED
:
1414 if (!xdr_LOCK4denied(xdrs
, &objp
->LOCKT4res_u
.denied
))
1424 xdr_LOCKU4args(register XDR
*xdrs
, LOCKU4args
*objp
)
1427 if (!xdr_nfs_lock_type4(xdrs
, &objp
->locktype
))
1429 if (!xdr_seqid4(xdrs
, &objp
->seqid
))
1431 if (!xdr_stateid4(xdrs
, &objp
->lock_stateid
))
1433 if (!xdr_offset4(xdrs
, &objp
->offset
))
1435 if (!xdr_length4(xdrs
, &objp
->length
))
1441 xdr_LOCKU4res(register XDR
*xdrs
, LOCKU4res
*objp
)
1444 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1446 switch (objp
->status
) {
1448 if (!xdr_stateid4(xdrs
, &objp
->LOCKU4res_u
.lock_stateid
))
1456 xdr_LOOKUP4args(register XDR
*xdrs
, LOOKUP4args
*objp
)
1459 if (!xdr_component4(xdrs
, &objp
->objname
))
1465 xdr_LOOKUP4res(register XDR
*xdrs
, LOOKUP4res
*objp
)
1468 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1474 xdr_LOOKUPP4res(register XDR
*xdrs
, LOOKUPP4res
*objp
)
1477 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1483 xdr_NVERIFY4args(register XDR
*xdrs
, NVERIFY4args
*objp
)
1486 if (!xdr_fattr4(xdrs
, &objp
->obj_attributes
))
1492 xdr_NVERIFY4res(register XDR
*xdrs
, NVERIFY4res
*objp
)
1495 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1501 xdr_createmode4(register XDR
*xdrs
, createmode4
*objp
)
1504 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
1510 xdr_createhow4(register XDR
*xdrs
, createhow4
*objp
)
1513 if (!xdr_createmode4(xdrs
, &objp
->mode
))
1515 switch (objp
->mode
) {
1518 if (!xdr_fattr4(xdrs
, &objp
->createhow4_u
.createattrs
))
1522 if (!xdr_verifier4(xdrs
, objp
->createhow4_u
.createverf
))
1532 xdr_opentype4(register XDR
*xdrs
, opentype4
*objp
)
1535 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
1541 xdr_openflag4(register XDR
*xdrs
, openflag4
*objp
)
1544 if (!xdr_opentype4(xdrs
, &objp
->opentype
))
1546 switch (objp
->opentype
) {
1548 if (!xdr_createhow4(xdrs
, &objp
->openflag4_u
.how
))
1556 xdr_limit_by4(register XDR
*xdrs
, limit_by4
*objp
)
1559 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
1565 xdr_nfs_modified_limit4(register XDR
*xdrs
, nfs_modified_limit4
*objp
)
1568 if (!xdr_uint32_t(xdrs
, &objp
->num_blocks
))
1570 if (!xdr_uint32_t(xdrs
, &objp
->bytes_per_block
))
1576 xdr_nfs_space_limit4(register XDR
*xdrs
, nfs_space_limit4
*objp
)
1579 if (!xdr_limit_by4(xdrs
, &objp
->limitby
))
1581 switch (objp
->limitby
) {
1582 case NFS_LIMIT_SIZE
:
1583 if (!xdr_uint64_t(xdrs
, &objp
->nfs_space_limit4_u
.filesize
))
1586 case NFS_LIMIT_BLOCKS
:
1587 if (!xdr_nfs_modified_limit4(xdrs
, &objp
->nfs_space_limit4_u
.
1598 xdr_open_delegation_type4(register XDR
*xdrs
, open_delegation_type4
*objp
)
1601 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
1607 xdr_open_claim_type4(register XDR
*xdrs
, open_claim_type4
*objp
)
1610 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
1616 xdr_open_claim_delegate_cur4(register XDR
*xdrs
, open_claim_delegate_cur4
*objp
)
1619 if (!xdr_stateid4(xdrs
, &objp
->delegate_stateid
))
1621 if (!xdr_component4(xdrs
, &objp
->file
))
1627 xdr_open_claim4(register XDR
*xdrs
, open_claim4
*objp
)
1630 if (!xdr_open_claim_type4(xdrs
, &objp
->claim
))
1632 switch (objp
->claim
) {
1634 if (!xdr_component4(xdrs
, &objp
->open_claim4_u
.file
))
1637 case CLAIM_PREVIOUS
:
1638 if (!xdr_open_delegation_type4(xdrs
, &objp
->open_claim4_u
.
1642 case CLAIM_DELEGATE_CUR
:
1643 if (!xdr_open_claim_delegate_cur4(xdrs
, &objp
->open_claim4_u
.
1647 case CLAIM_DELEGATE_PREV
:
1648 if (!xdr_component4(xdrs
, &objp
->open_claim4_u
.
1649 file_delegate_prev
))
1659 xdr_OPEN4args(register XDR
*xdrs
, OPEN4args
*objp
)
1662 if (!xdr_seqid4(xdrs
, &objp
->seqid
))
1664 if (!xdr_uint32_t(xdrs
, &objp
->share_access
))
1666 if (!xdr_uint32_t(xdrs
, &objp
->share_deny
))
1668 if (!xdr_open_owner4(xdrs
, &objp
->owner
))
1670 if (!xdr_openflag4(xdrs
, &objp
->openhow
))
1672 if (!xdr_open_claim4(xdrs
, &objp
->claim
))
1678 xdr_open_read_delegation4(register XDR
*xdrs
, open_read_delegation4
*objp
)
1681 if (!xdr_stateid4(xdrs
, &objp
->stateid
))
1683 if (!xdr_bool(xdrs
, &objp
->recall
))
1685 if (!xdr_nfsace4(xdrs
, &objp
->permissions
))
1691 xdr_open_write_delegation4(register XDR
*xdrs
, open_write_delegation4
*objp
)
1694 if (!xdr_stateid4(xdrs
, &objp
->stateid
))
1696 if (!xdr_bool(xdrs
, &objp
->recall
))
1698 if (!xdr_nfs_space_limit4(xdrs
, &objp
->space_limit
))
1700 if (!xdr_nfsace4(xdrs
, &objp
->permissions
))
1706 xdr_open_delegation4(register XDR
*xdrs
, open_delegation4
*objp
)
1709 if (!xdr_open_delegation_type4(xdrs
, &objp
->delegation_type
))
1711 switch (objp
->delegation_type
) {
1712 case OPEN_DELEGATE_NONE
:
1714 case OPEN_DELEGATE_READ
:
1715 if (!xdr_open_read_delegation4(xdrs
, &objp
->open_delegation4_u
.
1719 case OPEN_DELEGATE_WRITE
:
1720 if (!xdr_open_write_delegation4(xdrs
, &objp
->open_delegation4_u
.
1731 xdr_OPEN4resok(register XDR
*xdrs
, OPEN4resok
*objp
)
1734 if (!xdr_stateid4(xdrs
, &objp
->stateid
))
1736 if (!xdr_change_info4(xdrs
, &objp
->cinfo
))
1738 if (!xdr_uint32_t(xdrs
, &objp
->rflags
))
1740 if (!xdr_bitmap4(xdrs
, &objp
->attrset
))
1742 if (!xdr_open_delegation4(xdrs
, &objp
->delegation
))
1748 xdr_OPEN4res(register XDR
*xdrs
, OPEN4res
*objp
)
1751 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1753 switch (objp
->status
) {
1755 if (!xdr_OPEN4resok(xdrs
, &objp
->OPEN4res_u
.resok4
))
1763 xdr_OPENATTR4args(register XDR
*xdrs
, OPENATTR4args
*objp
)
1766 if (!xdr_bool(xdrs
, &objp
->createdir
))
1772 xdr_OPENATTR4res(register XDR
*xdrs
, OPENATTR4res
*objp
)
1775 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1781 xdr_OPEN_CONFIRM4args(register XDR
*xdrs
, OPEN_CONFIRM4args
*objp
)
1784 if (!xdr_stateid4(xdrs
, &objp
->open_stateid
))
1786 if (!xdr_seqid4(xdrs
, &objp
->seqid
))
1792 xdr_OPEN_CONFIRM4resok(register XDR
*xdrs
, OPEN_CONFIRM4resok
*objp
)
1795 if (!xdr_stateid4(xdrs
, &objp
->open_stateid
))
1801 xdr_OPEN_CONFIRM4res(register XDR
*xdrs
, OPEN_CONFIRM4res
*objp
)
1804 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1806 switch (objp
->status
) {
1808 if (!xdr_OPEN_CONFIRM4resok(xdrs
, &objp
->OPEN_CONFIRM4res_u
.
1817 xdr_OPEN_DOWNGRADE4args(register XDR
*xdrs
, OPEN_DOWNGRADE4args
*objp
)
1820 if (!xdr_stateid4(xdrs
, &objp
->open_stateid
))
1822 if (!xdr_seqid4(xdrs
, &objp
->seqid
))
1824 if (!xdr_uint32_t(xdrs
, &objp
->share_access
))
1826 if (!xdr_uint32_t(xdrs
, &objp
->share_deny
))
1832 xdr_OPEN_DOWNGRADE4resok(register XDR
*xdrs
, OPEN_DOWNGRADE4resok
*objp
)
1835 if (!xdr_stateid4(xdrs
, &objp
->open_stateid
))
1841 xdr_OPEN_DOWNGRADE4res(register XDR
*xdrs
, OPEN_DOWNGRADE4res
*objp
)
1844 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1846 switch (objp
->status
) {
1848 if (!xdr_OPEN_DOWNGRADE4resok(xdrs
, &objp
->OPEN_DOWNGRADE4res_u
.
1857 xdr_PUTFH4args(register XDR
*xdrs
, PUTFH4args
*objp
)
1860 if (!xdr_nfs_fh4(xdrs
, &objp
->object
))
1866 xdr_PUTFH4res(register XDR
*xdrs
, PUTFH4res
*objp
)
1869 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1875 xdr_PUTPUBFH4res(register XDR
*xdrs
, PUTPUBFH4res
*objp
)
1878 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1884 xdr_PUTROOTFH4res(register XDR
*xdrs
, PUTROOTFH4res
*objp
)
1887 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1893 xdr_READ4args(register XDR
*xdrs
, READ4args
*objp
)
1896 if (!xdr_stateid4(xdrs
, &objp
->stateid
))
1898 if (!xdr_offset4(xdrs
, &objp
->offset
))
1900 if (!xdr_count4(xdrs
, &objp
->count
))
1906 xdr_READ4resok(register XDR
*xdrs
, READ4resok
*objp
)
1909 if (!xdr_bool(xdrs
, &objp
->eof
))
1912 #ifdef IGNORE_RDWR_DATA
1914 * Try to get length of read, and if that
1915 * fails, default to 0. Don't return FALSE
1916 * because the other read info will not be
1919 objp
->data
.data_val
= NULL
;
1920 if (!xdr_u_int(xdrs
, &objp
->data
.data_len
))
1921 objp
->data
.data_len
= 0;
1922 nfs4_skip_bytes
= objp
->data
.data_len
;
1924 if (!xdr_bytes(xdrs
, (char **)&objp
->data
.data_val
,
1925 (uint_t
*)&objp
->data
.data_len
, ~0))
1932 xdr_READ4res(register XDR
*xdrs
, READ4res
*objp
)
1935 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
1937 switch (objp
->status
) {
1939 if (!xdr_READ4resok(xdrs
, &objp
->READ4res_u
.resok4
))
1947 xdr_READDIR4args(register XDR
*xdrs
, READDIR4args
*objp
)
1950 if (!xdr_nfs_cookie4(xdrs
, &objp
->cookie
))
1952 if (!xdr_verifier4(xdrs
, objp
->cookieverf
))
1954 if (!xdr_count4(xdrs
, &objp
->dircount
))
1956 if (!xdr_count4(xdrs
, &objp
->maxcount
))
1958 if (!xdr_bitmap4(xdrs
, &objp
->attr_request
))
1964 xdr_entry4(register XDR
*xdrs
, entry4
*objp
)
1968 bool_t more_data
= TRUE
;
1969 bool_t first_objp
= TRUE
;
1973 if (!xdr_nfs_cookie4(xdrs
, &objp
->cookie
))
1975 if (!xdr_component4(xdrs
, &objp
->name
))
1977 if (!xdr_fattr4(xdrs
, &objp
->attrs
))
1980 if (xdrs
->x_op
== XDR_DECODE
) {
1984 if (!xdr_bool(xdrs
, &more_data
))
1988 objp
->nextentry
= NULL
;
1992 objp
->nextentry
= (entry4
*)mem_alloc(sizeof (entry4
));
1993 if (objp
->nextentry
== NULL
)
1995 bzero(objp
->nextentry
, sizeof (entry4
));
1996 objp
= objp
->nextentry
;
1998 } else if (xdrs
->x_op
== XDR_ENCODE
) {
1999 objp
= objp
->nextentry
;
2003 if (!xdr_bool(xdrs
, &more_data
))
2007 objp
= objp
->nextentry
;
2010 if (!xdr_bool(xdrs
, &more_data
))
2013 mem_free(tmp_entry4
, sizeof (entry4
));
2022 xdr_dirlist4(register XDR
*xdrs
, dirlist4
*objp
)
2025 if (!xdr_pointer(xdrs
, (char **)&objp
->entries
, sizeof (entry4
),
2026 (xdrproc_t
)xdr_entry4
))
2028 if (!xdr_bool(xdrs
, &objp
->eof
))
2034 xdr_READDIR4resok(register XDR
*xdrs
, READDIR4resok
*objp
)
2037 if (!xdr_verifier4(xdrs
, objp
->cookieverf
))
2039 if (!xdr_dirlist4(xdrs
, &objp
->reply
))
2045 xdr_READDIR4res(register XDR
*xdrs
, READDIR4res
*objp
)
2048 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2050 switch (objp
->status
) {
2052 if (!xdr_READDIR4resok(xdrs
, &objp
->READDIR4res_u
.resok4
))
2060 xdr_READLINK4resok(register XDR
*xdrs
, READLINK4resok
*objp
)
2063 if (!xdr_linktext4(xdrs
, &objp
->link
))
2069 xdr_READLINK4res(register XDR
*xdrs
, READLINK4res
*objp
)
2072 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2074 switch (objp
->status
) {
2076 if (!xdr_READLINK4resok(xdrs
, &objp
->READLINK4res_u
.resok4
))
2084 xdr_REMOVE4args(register XDR
*xdrs
, REMOVE4args
*objp
)
2087 if (!xdr_component4(xdrs
, &objp
->target
))
2093 xdr_REMOVE4resok(register XDR
*xdrs
, REMOVE4resok
*objp
)
2096 if (!xdr_change_info4(xdrs
, &objp
->cinfo
))
2102 xdr_REMOVE4res(register XDR
*xdrs
, REMOVE4res
*objp
)
2105 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2107 switch (objp
->status
) {
2109 if (!xdr_REMOVE4resok(xdrs
, &objp
->REMOVE4res_u
.resok4
))
2117 xdr_RENAME4args(register XDR
*xdrs
, RENAME4args
*objp
)
2120 if (!xdr_component4(xdrs
, &objp
->oldname
))
2122 if (!xdr_component4(xdrs
, &objp
->newname
))
2128 xdr_RENAME4resok(register XDR
*xdrs
, RENAME4resok
*objp
)
2131 if (!xdr_change_info4(xdrs
, &objp
->source_cinfo
))
2133 if (!xdr_change_info4(xdrs
, &objp
->target_cinfo
))
2139 xdr_RENAME4res(register XDR
*xdrs
, RENAME4res
*objp
)
2142 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2144 switch (objp
->status
) {
2146 if (!xdr_RENAME4resok(xdrs
, &objp
->RENAME4res_u
.resok4
))
2154 xdr_RENEW4args(register XDR
*xdrs
, RENEW4args
*objp
)
2157 if (!xdr_clientid4(xdrs
, &objp
->clientid
))
2163 xdr_RENEW4res(register XDR
*xdrs
, RENEW4res
*objp
)
2166 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2172 xdr_RESTOREFH4res(register XDR
*xdrs
, RESTOREFH4res
*objp
)
2175 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2181 xdr_SAVEFH4res(register XDR
*xdrs
, SAVEFH4res
*objp
)
2184 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2190 xdr_SECINFO4args(register XDR
*xdrs
, SECINFO4args
*objp
)
2193 if (!xdr_component4(xdrs
, &objp
->name
))
2199 xdr_rpc_gss_svc_t(register XDR
*xdrs
, rpc_gss_svc_t
*objp
)
2202 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
2208 xdr_rpcsec_gss_info(register XDR
*xdrs
, rpcsec_gss_info
*objp
)
2211 if (!xdr_sec_oid4(xdrs
, &objp
->oid
))
2213 if (!xdr_qop4(xdrs
, &objp
->qop
))
2215 if (!xdr_rpc_gss_svc_t(xdrs
, &objp
->service
))
2221 xdr_secinfo4(register XDR
*xdrs
, secinfo4
*objp
)
2224 if (!xdr_uint32_t(xdrs
, &objp
->flavor
))
2226 switch (objp
->flavor
) {
2228 if (!xdr_rpcsec_gss_info(xdrs
, &objp
->secinfo4_u
.flavor_info
))
2236 xdr_SECINFO4resok(register XDR
*xdrs
, SECINFO4resok
*objp
)
2239 if (!xdr_array(xdrs
, (char **)&objp
->SECINFO4resok_val
,
2240 (uint_t
*)&objp
->SECINFO4resok_len
, ~0,
2241 sizeof (secinfo4
), (xdrproc_t
)xdr_secinfo4
))
2247 xdr_SECINFO4res(register XDR
*xdrs
, SECINFO4res
*objp
)
2250 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2252 switch (objp
->status
) {
2254 if (!xdr_SECINFO4resok(xdrs
, &objp
->SECINFO4res_u
.resok4
))
2262 xdr_SETATTR4args(register XDR
*xdrs
, SETATTR4args
*objp
)
2265 if (!xdr_stateid4(xdrs
, &objp
->stateid
))
2267 if (!xdr_fattr4(xdrs
, &objp
->obj_attributes
))
2273 xdr_SETATTR4res(register XDR
*xdrs
, SETATTR4res
*objp
)
2276 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2278 if (!xdr_bitmap4(xdrs
, &objp
->attrsset
))
2284 xdr_SETCLIENTID4args(register XDR
*xdrs
, SETCLIENTID4args
*objp
)
2287 if (!xdr_nfs_client_id4(xdrs
, &objp
->client
))
2289 if (!xdr_cb_client4(xdrs
, &objp
->callback
))
2291 if (!xdr_uint32_t(xdrs
, &objp
->callback_ident
))
2297 xdr_SETCLIENTID4resok(register XDR
*xdrs
, SETCLIENTID4resok
*objp
)
2300 if (!xdr_clientid4(xdrs
, &objp
->clientid
))
2302 if (!xdr_verifier4(xdrs
, objp
->setclientid_confirm
))
2308 xdr_SETCLIENTID4res(register XDR
*xdrs
, SETCLIENTID4res
*objp
)
2311 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2313 switch (objp
->status
) {
2315 if (!xdr_SETCLIENTID4resok(xdrs
, &objp
->SETCLIENTID4res_u
.
2319 case NFS4ERR_CLID_INUSE
:
2320 if (!xdr_clientaddr4(xdrs
, &objp
->SETCLIENTID4res_u
.
2329 xdr_SETCLIENTID_CONFIRM4args(register XDR
*xdrs
, SETCLIENTID_CONFIRM4args
*objp
)
2332 if (!xdr_clientid4(xdrs
, &objp
->clientid
))
2334 if (!xdr_verifier4(xdrs
, objp
->setclientid_confirm
))
2340 xdr_SETCLIENTID_CONFIRM4res(register XDR
*xdrs
, SETCLIENTID_CONFIRM4res
*objp
)
2343 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2349 xdr_VERIFY4args(register XDR
*xdrs
, VERIFY4args
*objp
)
2352 if (!xdr_fattr4(xdrs
, &objp
->obj_attributes
))
2358 xdr_VERIFY4res(register XDR
*xdrs
, VERIFY4res
*objp
)
2361 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2367 xdr_stable_how4(register XDR
*xdrs
, stable_how4
*objp
)
2370 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
2376 xdr_WRITE4args(register XDR
*xdrs
, WRITE4args
*objp
)
2379 if (!xdr_stateid4(xdrs
, &objp
->stateid
))
2381 if (!xdr_offset4(xdrs
, &objp
->offset
))
2383 if (!xdr_stable_how4(xdrs
, &objp
->stable
))
2386 #ifdef IGNORE_RDWR_DATA
2388 * try to get length of write, and if that
2389 * fails, default to 0. Don't return FALSE
2390 * because the other write info will not be
2391 * displayed (write stateid).
2393 objp
->data
.data_val
= NULL
;
2394 if (!xdr_u_int(xdrs
, &objp
->data
.data_len
))
2395 objp
->data
.data_len
= 0;
2396 nfs4_skip_bytes
= objp
->data
.data_len
;
2398 if (!xdr_bytes(xdrs
, (char **)&objp
->data
.data_val
,
2399 (uint_t
*)&objp
->data
.data_len
, ~0))
2406 xdr_WRITE4resok(register XDR
*xdrs
, WRITE4resok
*objp
)
2409 if (!xdr_count4(xdrs
, &objp
->count
))
2411 if (!xdr_stable_how4(xdrs
, &objp
->committed
))
2413 if (!xdr_verifier4(xdrs
, objp
->writeverf
))
2419 xdr_WRITE4res(register XDR
*xdrs
, WRITE4res
*objp
)
2422 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2424 switch (objp
->status
) {
2426 if (!xdr_WRITE4resok(xdrs
, &objp
->WRITE4res_u
.resok4
))
2434 xdr_RELEASE_LOCKOWNER4args(register XDR
*xdrs
, RELEASE_LOCKOWNER4args
*objp
)
2437 if (!xdr_lock_owner4(xdrs
, &objp
->lock_owner
))
2443 xdr_RELEASE_LOCKOWNER4res(register XDR
*xdrs
, RELEASE_LOCKOWNER4res
*objp
)
2446 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2452 xdr_ILLEGAL4res(register XDR
*xdrs
, ILLEGAL4res
*objp
)
2455 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2461 xdr_nfs_opnum4(register XDR
*xdrs
, nfs_opnum4
*objp
)
2464 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
2470 xdr_nfs_argop4(register XDR
*xdrs
, nfs_argop4
*objp
)
2472 nfs4_skip_bytes
= 0;
2473 if (!xdr_nfs_opnum4(xdrs
, &objp
->argop
))
2475 switch (objp
->argop
) {
2477 if (!xdr_ACCESS4args(xdrs
, &objp
->nfs_argop4_u
.opaccess
))
2481 if (!xdr_CLOSE4args(xdrs
, &objp
->nfs_argop4_u
.opclose
))
2485 if (!xdr_COMMIT4args(xdrs
, &objp
->nfs_argop4_u
.opcommit
))
2489 if (!xdr_CREATE4args(xdrs
, &objp
->nfs_argop4_u
.opcreate
))
2493 if (!xdr_DELEGPURGE4args(xdrs
, &objp
->nfs_argop4_u
.
2497 case OP_DELEGRETURN
:
2498 if (!xdr_DELEGRETURN4args(xdrs
, &objp
->nfs_argop4_u
.
2503 if (!xdr_GETATTR4args(xdrs
, &objp
->nfs_argop4_u
.
2510 if (!xdr_LINK4args(xdrs
, &objp
->nfs_argop4_u
.oplink
))
2514 if (!xdr_LOCK4args(xdrs
, &objp
->nfs_argop4_u
.oplock
))
2518 if (!xdr_LOCKT4args(xdrs
, &objp
->nfs_argop4_u
.oplockt
))
2522 if (!xdr_LOCKU4args(xdrs
, &objp
->nfs_argop4_u
.oplocku
))
2526 if (!xdr_LOOKUP4args(xdrs
, &objp
->nfs_argop4_u
.oplookup
))
2532 if (!xdr_NVERIFY4args(xdrs
, &objp
->nfs_argop4_u
.opnverify
))
2536 if (!xdr_OPEN4args(xdrs
, &objp
->nfs_argop4_u
.opopen
))
2540 if (!xdr_OPENATTR4args(xdrs
, &objp
->nfs_argop4_u
.opopenattr
))
2543 case OP_OPEN_CONFIRM
:
2544 if (!xdr_OPEN_CONFIRM4args(xdrs
, &objp
->nfs_argop4_u
.
2548 case OP_OPEN_DOWNGRADE
:
2549 if (!xdr_OPEN_DOWNGRADE4args(xdrs
, &objp
->nfs_argop4_u
.
2554 if (!xdr_PUTFH4args(xdrs
, &objp
->nfs_argop4_u
.opputfh
))
2562 if (!xdr_READ4args(xdrs
, &objp
->nfs_argop4_u
.opread
))
2566 if (!xdr_READDIR4args(xdrs
, &objp
->nfs_argop4_u
.opreaddir
))
2572 if (!xdr_REMOVE4args(xdrs
, &objp
->nfs_argop4_u
.opremove
))
2576 if (!xdr_RENAME4args(xdrs
, &objp
->nfs_argop4_u
.oprename
))
2580 if (!xdr_RENEW4args(xdrs
, &objp
->nfs_argop4_u
.oprenew
))
2588 if (!xdr_SECINFO4args(xdrs
, &objp
->nfs_argop4_u
.opsecinfo
))
2592 if (!xdr_SETATTR4args(xdrs
, &objp
->nfs_argop4_u
.opsetattr
))
2595 case OP_SETCLIENTID
:
2596 if (!xdr_SETCLIENTID4args(xdrs
, &objp
->nfs_argop4_u
.
2600 case OP_SETCLIENTID_CONFIRM
:
2601 if (!xdr_SETCLIENTID_CONFIRM4args(xdrs
, &objp
->nfs_argop4_u
.
2602 opsetclientid_confirm
))
2606 if (!xdr_VERIFY4args(xdrs
, &objp
->nfs_argop4_u
.opverify
))
2610 if (!xdr_WRITE4args(xdrs
, &objp
->nfs_argop4_u
.opwrite
))
2613 case OP_RELEASE_LOCKOWNER
:
2614 if (!xdr_RELEASE_LOCKOWNER4args(xdrs
,
2615 &objp
->nfs_argop4_u
.oprelease_lockowner
))
2627 xdr_nfs_resop4(register XDR
*xdrs
, nfs_resop4
*objp
)
2629 nfs4_skip_bytes
= 0;
2630 if (!xdr_nfs_opnum4(xdrs
, &objp
->resop
))
2632 switch (objp
->resop
) {
2634 if (!xdr_ACCESS4res(xdrs
, &objp
->nfs_resop4_u
.opaccess
))
2638 if (!xdr_CLOSE4res(xdrs
, &objp
->nfs_resop4_u
.opclose
))
2642 if (!xdr_COMMIT4res(xdrs
, &objp
->nfs_resop4_u
.opcommit
))
2646 if (!xdr_CREATE4res(xdrs
, &objp
->nfs_resop4_u
.opcreate
))
2650 if (!xdr_DELEGPURGE4res(xdrs
, &objp
->nfs_resop4_u
.opdelegpurge
))
2653 case OP_DELEGRETURN
:
2654 if (!xdr_DELEGRETURN4res(xdrs
, &objp
->nfs_resop4_u
.
2659 if (!xdr_GETATTR4res(xdrs
, &objp
->nfs_resop4_u
.opgetattr
))
2663 if (!xdr_GETFH4res(xdrs
, &objp
->nfs_resop4_u
.opgetfh
))
2667 if (!xdr_LINK4res(xdrs
, &objp
->nfs_resop4_u
.oplink
))
2671 if (!xdr_LOCK4res(xdrs
, &objp
->nfs_resop4_u
.oplock
))
2675 if (!xdr_LOCKT4res(xdrs
, &objp
->nfs_resop4_u
.oplockt
))
2679 if (!xdr_LOCKU4res(xdrs
, &objp
->nfs_resop4_u
.oplocku
))
2683 if (!xdr_LOOKUP4res(xdrs
, &objp
->nfs_resop4_u
.oplookup
))
2687 if (!xdr_LOOKUPP4res(xdrs
, &objp
->nfs_resop4_u
.oplookupp
))
2691 if (!xdr_NVERIFY4res(xdrs
, &objp
->nfs_resop4_u
.opnverify
))
2695 if (!xdr_OPEN4res(xdrs
, &objp
->nfs_resop4_u
.opopen
))
2699 if (!xdr_OPENATTR4res(xdrs
, &objp
->nfs_resop4_u
.opopenattr
))
2702 case OP_OPEN_CONFIRM
:
2703 if (!xdr_OPEN_CONFIRM4res(xdrs
, &objp
->nfs_resop4_u
.
2707 case OP_OPEN_DOWNGRADE
:
2708 if (!xdr_OPEN_DOWNGRADE4res(xdrs
, &objp
->nfs_resop4_u
.
2713 if (!xdr_PUTFH4res(xdrs
, &objp
->nfs_resop4_u
.opputfh
))
2717 if (!xdr_PUTPUBFH4res(xdrs
, &objp
->nfs_resop4_u
.opputpubfh
))
2721 if (!xdr_PUTROOTFH4res(xdrs
, &objp
->nfs_resop4_u
.opputrootfh
))
2725 if (!xdr_READ4res(xdrs
, &objp
->nfs_resop4_u
.opread
))
2729 if (!xdr_READDIR4res(xdrs
, &objp
->nfs_resop4_u
.opreaddir
))
2733 if (!xdr_READLINK4res(xdrs
, &objp
->nfs_resop4_u
.opreadlink
))
2737 if (!xdr_REMOVE4res(xdrs
, &objp
->nfs_resop4_u
.opremove
))
2741 if (!xdr_RENAME4res(xdrs
, &objp
->nfs_resop4_u
.oprename
))
2745 if (!xdr_RENEW4res(xdrs
, &objp
->nfs_resop4_u
.oprenew
))
2749 if (!xdr_RESTOREFH4res(xdrs
, &objp
->nfs_resop4_u
.oprestorefh
))
2753 if (!xdr_SAVEFH4res(xdrs
, &objp
->nfs_resop4_u
.opsavefh
))
2757 if (!xdr_SECINFO4res(xdrs
, &objp
->nfs_resop4_u
.opsecinfo
))
2761 if (!xdr_SETATTR4res(xdrs
, &objp
->nfs_resop4_u
.opsetattr
))
2764 case OP_SETCLIENTID
:
2765 if (!xdr_SETCLIENTID4res(xdrs
, &objp
->nfs_resop4_u
.
2769 case OP_SETCLIENTID_CONFIRM
:
2770 if (!xdr_SETCLIENTID_CONFIRM4res(xdrs
, &objp
->nfs_resop4_u
.
2771 opsetclientid_confirm
))
2775 if (!xdr_VERIFY4res(xdrs
, &objp
->nfs_resop4_u
.opverify
))
2779 if (!xdr_WRITE4res(xdrs
, &objp
->nfs_resop4_u
.opwrite
))
2782 case OP_RELEASE_LOCKOWNER
:
2783 if (!xdr_RELEASE_LOCKOWNER4res(xdrs
,
2784 &objp
->nfs_resop4_u
.oprelease_lockowner
))
2788 if (!xdr_ILLEGAL4res(xdrs
, &objp
->nfs_resop4_u
.opillegal
))
2798 xdr_COMPOUND4args(register XDR
*xdrs
, COMPOUND4args
*objp
)
2801 if (!xdr_utf8string(xdrs
, &objp
->tag
))
2803 if (!xdr_uint32_t(xdrs
, &objp
->minorversion
))
2805 if (!xdr_array(xdrs
, (char **)&objp
->argarray
.argarray_val
,
2806 (uint_t
*)&objp
->argarray
.argarray_len
, ~0,
2807 sizeof (nfs_argop4
), (xdrproc_t
)xdr_nfs_argop4
))
2813 xdr_COMPOUND4res(register XDR
*xdrs
, COMPOUND4res
*objp
)
2816 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2818 if (!xdr_utf8string(xdrs
, &objp
->tag
))
2820 if (!xdr_array(xdrs
, (char **)&objp
->resarray
.resarray_val
,
2821 (uint_t
*)&objp
->resarray
.resarray_len
, ~0,
2822 sizeof (nfs_resop4
), (xdrproc_t
)xdr_nfs_resop4
))
2828 xdr_CB_GETATTR4args(register XDR
*xdrs
, CB_GETATTR4args
*objp
)
2831 if (!xdr_nfs_fh4(xdrs
, &objp
->fh
))
2833 if (!xdr_bitmap4(xdrs
, &objp
->attr_request
))
2839 xdr_CB_GETATTR4resok(register XDR
*xdrs
, CB_GETATTR4resok
*objp
)
2842 if (!xdr_fattr4(xdrs
, &objp
->obj_attributes
))
2848 xdr_CB_GETATTR4res(register XDR
*xdrs
, CB_GETATTR4res
*objp
)
2851 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2853 switch (objp
->status
) {
2855 if (!xdr_CB_GETATTR4resok(xdrs
, &objp
->CB_GETATTR4res_u
.resok4
))
2863 xdr_CB_RECALL4args(register XDR
*xdrs
, CB_RECALL4args
*objp
)
2866 if (!xdr_stateid4(xdrs
, &objp
->stateid
))
2868 if (!xdr_bool(xdrs
, &objp
->truncate
))
2870 if (!xdr_nfs_fh4(xdrs
, &objp
->fh
))
2876 xdr_CB_RECALL4res(register XDR
*xdrs
, CB_RECALL4res
*objp
)
2879 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2885 xdr_CB_ILLEGAL4res(register XDR
*xdrs
, CB_ILLEGAL4res
*objp
)
2888 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2894 xdr_nfs_cb_opnum4(register XDR
*xdrs
, nfs_cb_opnum4
*objp
)
2897 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
2903 xdr_nfs_cb_argop4(register XDR
*xdrs
, nfs_cb_argop4
*objp
)
2906 if (!xdr_u_int(xdrs
, &objp
->argop
))
2908 switch (objp
->argop
) {
2910 if (!xdr_CB_GETATTR4args(xdrs
, &objp
->nfs_cb_argop4_u
.
2915 if (!xdr_CB_RECALL4args(xdrs
, &objp
->nfs_cb_argop4_u
.
2928 xdr_nfs_cb_resop4(register XDR
*xdrs
, nfs_cb_resop4
*objp
)
2931 if (!xdr_u_int(xdrs
, &objp
->resop
))
2933 switch (objp
->resop
) {
2935 if (!xdr_CB_GETATTR4res(xdrs
, &objp
->nfs_cb_resop4_u
.
2940 if (!xdr_CB_RECALL4res(xdrs
, &objp
->nfs_cb_resop4_u
.opcbrecall
))
2944 if (!xdr_CB_ILLEGAL4res(xdrs
,
2945 &objp
->nfs_cb_resop4_u
.opcbillegal
))
2955 xdr_CB_COMPOUND4args(register XDR
*xdrs
, CB_COMPOUND4args
*objp
)
2958 if (!xdr_utf8string(xdrs
, &objp
->tag
))
2960 if (!xdr_uint32_t(xdrs
, &objp
->minorversion
))
2962 if (!xdr_uint32_t(xdrs
, &objp
->callback_ident
))
2964 if (!xdr_array(xdrs
, (char **)&objp
->argarray
.argarray_val
,
2965 (uint_t
*)&objp
->argarray
.argarray_len
, ~0,
2966 sizeof (nfs_cb_argop4
), (xdrproc_t
)xdr_nfs_cb_argop4
))
2972 xdr_CB_COMPOUND4res(register XDR
*xdrs
, CB_COMPOUND4res
*objp
)
2975 if (!xdr_nfsstat4(xdrs
, &objp
->status
))
2977 if (!xdr_utf8string(xdrs
, &objp
->tag
))
2979 if (!xdr_array(xdrs
, (char **)&objp
->resarray
.resarray_val
,
2980 (uint_t
*)&objp
->resarray
.resarray_len
, ~0,
2981 sizeof (nfs_cb_resop4
), (xdrproc_t
)xdr_nfs_cb_resop4
))