Home | History | Annotate | Download | only in nfs
      1 /*
      2  * CDDL HEADER START
      3  *
      4  * The contents of this file are subject to the terms of the
      5  * Common Development and Distribution License (the "License").
      6  * You may not use this file except in compliance with the License.
      7  *
      8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9  * or http://www.opensolaris.org/os/licensing.
     10  * See the License for the specific language governing permissions
     11  * and limitations under the License.
     12  *
     13  * When distributing Covered Code, include this CDDL HEADER in each
     14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15  * If applicable, add the following below this CDDL HEADER, with the
     16  * fields enclosed by brackets "[]" replaced with your own identifying
     17  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  *
     19  * CDDL HEADER END
     20  */
     21 /*
     22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23  * Use is subject to license terms.
     24  */
     25 #ifndef _NFS41_KPROT_H
     26 #define	_NFS41_KPROT_H
     27 
     28 /*
     29  * Kernel specific version
     30  * NFSv4 Minor Version 1
     31  */
     32 #ifdef __cplusplus
     33 extern "C" {
     34 #endif
     35 
     36 #ifndef _AUTH_SYS_DEFINE_FOR_NFSv41
     37 #define	_AUTH_SYS_DEFINE_FOR_NFSv41
     38 #include <rpc/auth_sys.h>
     39 typedef struct authsys_parms authsys_parms;
     40 #endif /* _AUTH_SYS_DEFINE_FOR_NFSv41 */
     41 
     42 #define	NFS4_SESSIONID_SIZE		16
     43 #define	NFS4_INT64_MAX			0x7fffffffffffffff
     44 #define	NFS4_UINT64_MAX			0xffffffffffffffff
     45 #define	NFS4_INT32_MAX			0x7fffffff
     46 #define	NFS4_UINT32_MAX			0xffffffff
     47 #define	NFS4_MAXFILELEN			0xffffffffffffffff
     48 #define	NFS4_MAXFILEOFF			0xfffffffffffffffe
     49 
     50 #define	NFS41_CLNT_DEFAULT_SLOTS	200
     51 
     52 /*
     53  * NFSv4.1 deltas and re-definitions of modified types
     54  */
     55 typedef utf8string utf8str_cis;
     56 
     57 typedef utf8string utf8str_cs;
     58 
     59 typedef utf8string utf8str_mixed;
     60 
     61 struct change_policy4 {
     62 	uint64_t cp_major;
     63 	uint64_t cp_minor;
     64 };
     65 typedef struct change_policy4 change_policy4;
     66 
     67 typedef uint32_t sequenceid4;
     68 
     69 typedef uint32_t slotid4;
     70 
     71 typedef char sessionid4[NFS4_SESSIONID_SIZE];
     72 
     73 struct netaddr4 {
     74 	char *na_r_netid;
     75 	char *na_r_addr;
     76 };
     77 typedef struct netaddr4 netaddr4;
     78 
     79 struct nfs_impl_id4 {
     80 	utf8str_cis nii_domain;
     81 	utf8str_cs nii_name;
     82 	nfstime4 nii_date;
     83 };
     84 typedef struct nfs_impl_id4 nfs_impl_id4;
     85 
     86 enum layouttype4 {
     87 	LAYOUT4_NFSV4_1_FILES = 0x1,
     88 	LAYOUT4_OSD2_OBJECTS = 0x2,
     89 	LAYOUT4_BLOCK_VOLUME = 0x3
     90 };
     91 typedef enum layouttype4 layouttype4;
     92 #define	LAYOUT_TYPE4_MAX_COUNT 3
     93 
     94 struct layout_content4 {
     95 	layouttype4 loc_type;
     96 	struct {
     97 		uint_t loc_body_len;
     98 		char *loc_body_val;
     99 	} loc_body;
    100 };
    101 typedef struct layout_content4 layout_content4;
    102 /* LAYOUT4_OSD2_OBJECTS loc_body description is in a separate .x file */
    103 /* LAYOUT4_BLOCK_VOLUME loc_body description is in a separate .x file */
    104 
    105 struct layouthint4 {
    106 	layouttype4 loh_type;
    107 	struct {
    108 		uint_t loh_body_len;
    109 		char *loh_body_val;
    110 	} loh_body;
    111 };
    112 typedef struct layouthint4 layouthint4;
    113 
    114 enum layoutiomode4 {
    115 	LAYOUTIOMODE4_READ = 1,
    116 	LAYOUTIOMODE4_RW = 2,
    117 	LAYOUTIOMODE4_ANY = 3
    118 };
    119 typedef enum layoutiomode4 layoutiomode4;
    120 
    121 struct layout4 {
    122 	offset4 lo_offset;
    123 	length4 lo_length;
    124 	layoutiomode4 lo_iomode;
    125 	layout_content4 lo_content;
    126 };
    127 typedef struct layout4 layout4;
    128 #define	NFS4_DEVICEID4_SIZE 16
    129 
    130 typedef char deviceid4[NFS4_DEVICEID4_SIZE];
    131 
    132 struct device_addr4 {
    133 	layouttype4 da_layout_type;
    134 	struct {
    135 		uint_t da_addr_body_len;
    136 		char *da_addr_body_val;
    137 	} da_addr_body;
    138 };
    139 typedef struct device_addr4 device_addr4;
    140 
    141 struct layoutupdate4 {
    142 	layouttype4 lou_type;
    143 	struct {
    144 		uint_t lou_body_len;
    145 		char *lou_body_val;
    146 	} lou_body;
    147 };
    148 typedef struct layoutupdate4 layoutupdate4;
    149 
    150 #define	LAYOUT4_RET_REC_FILE 1
    151 #define	LAYOUT4_RET_REC_FSID 2
    152 #define	LAYOUT4_RET_REC_ALL 3
    153 
    154 
    155 enum layoutreturn_type4 {
    156 	LAYOUTRETURN4_FILE = LAYOUT4_RET_REC_FILE,
    157 	LAYOUTRETURN4_FSID = LAYOUT4_RET_REC_FSID,
    158 	LAYOUTRETURN4_ALL = LAYOUT4_RET_REC_ALL
    159 };
    160 typedef enum layoutreturn_type4 layoutreturn_type4;
    161 
    162 struct layoutreturn_file4 {
    163 	offset4 lrf_offset;
    164 	length4 lrf_length;
    165 	stateid4 lrf_stateid;
    166 	struct {
    167 		uint_t lrf_body_len;
    168 		char *lrf_body_val;
    169 	} lrf_body;
    170 };
    171 typedef struct layoutreturn_file4 layoutreturn_file4;
    172 
    173 struct layoutreturn4 {
    174 	layoutreturn_type4 lr_returntype;
    175 	union {
    176 		layoutreturn_file4 lr_layout;
    177 	} layoutreturn4_u;
    178 };
    179 typedef struct layoutreturn4 layoutreturn4;
    180 
    181 
    182 enum fs4_status_type {
    183 	STATUS4_FIXED = 1,
    184 	STATUS4_UPDATED = 2,
    185 	STATUS4_VERSIONED = 3,
    186 	STATUS4_WRITABLE = 4,
    187 	STATUS4_REFERRAL = 5
    188 };
    189 typedef enum fs4_status_type fs4_status_type;
    190 
    191 struct fs4_status {
    192 	bool_t fss_absent;
    193 	fs4_status_type fss_type;
    194 	utf8str_cs fss_source;
    195 	utf8str_cs fss_current;
    196 	int32_t fss_age;
    197 	nfstime4 fss_version;
    198 };
    199 typedef struct fs4_status fs4_status;
    200 
    201 #define	TH4_READ_SIZE 0
    202 #define	TH4_WRITE_SIZE 1
    203 #define	TH4_READ_IOSIZE 2
    204 #define	TH4_WRITE_IOSIZE 3
    205 #define	TH4_MAX_HINTLIST_LEN 4
    206 
    207 #define	TH4_READ_SIZE_MASK	(1 << TH4_READ_SIZE)
    208 #define	TH4_WRITE_SIZE_MASK	(1 << TH4_WRITE_SIZE)
    209 #define	TH4_READ_IOSIZE_MASK	(1 << TH4_READ_IOSIZE)
    210 #define	TH4_WRITE_IOSIZE_MASK	(1 << TH4_WRITE_IOSIZE)
    211 
    212 typedef length4 threshold4_read_size;
    213 typedef length4 threshold4_write_size;
    214 typedef length4 threshold4_read_iosize;
    215 typedef length4 threshold4_write_iosize;
    216 
    217 struct threshold_item4 {
    218 	layouttype4 thi_layout_type;
    219 	bitmap4 thi_hintset;
    220 	struct {
    221 		uint_t thi_hintlist_len;
    222 		char *thi_hintlist_val;
    223 	} thi_hintlist;
    224 };
    225 typedef struct threshold_item4 threshold_item4;
    226 
    227 struct mdsthreshold4 {
    228 	struct {
    229 		uint_t mth_hints_len;
    230 		threshold_item4 *mth_hints_val;
    231 	} mth_hints;
    232 };
    233 typedef struct mdsthreshold4 mdsthreshold4;
    234 #define	RET4_DURATION_INFINITE 0xffffffffffffffff
    235 
    236 struct retention_get4 {
    237 	uint64_t rg_duration;
    238 	struct {
    239 		uint_t rg_begin_time_len;
    240 		nfstime4 *rg_begin_time_val;
    241 	} rg_begin_time;
    242 };
    243 typedef struct retention_get4 retention_get4;
    244 
    245 struct retention_set4 {
    246 	bool_t rs_enable;
    247 	struct {
    248 		uint_t rs_duration_len;
    249 		uint64_t *rs_duration_val;
    250 	} rs_duration;
    251 };
    252 typedef struct retention_set4 retention_set4;
    253 #define	FSCHARSET_CAP4_CONTAINS_NON_UTF8 0x1
    254 #define	FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 0x2
    255 
    256 typedef uint32_t fs_charset_cap4;
    257 
    258 typedef fs_charset_cap4 fattr4_fs_charset_cap4;
    259 
    260 typedef attrmap4 fattr4_suppattr_exclcreat;
    261 
    262 typedef nfstime4 fattr4_dir_notif_delay;
    263 
    264 typedef nfstime4 fattr4_dirent_notif_delay;
    265 
    266 typedef bool_t fattr4_absent;
    267 
    268 typedef struct {
    269 	uint_t fattr4_fs_layout_types_len;
    270 	layouttype4 *fattr4_fs_layout_types_val;
    271 } fattr4_fs_layout_types;
    272 
    273 typedef fs4_status fattr4_fs_status;
    274 
    275 typedef uint32_t fattr4_layout_alignment;
    276 
    277 typedef uint32_t fattr4_layout_blksize;
    278 
    279 typedef layouthint4 fattr4_layout_hint;
    280 
    281 typedef struct {
    282 	uint_t fattr4_layout_types_len;
    283 	layouttype4 *fattr4_layout_types_val;
    284 } fattr4_layout_types;
    285 
    286 typedef nfs_impl_id4 fattr4_recv_impl_id;
    287 
    288 typedef nfs_impl_id4 fattr4_send_impl_id;
    289 
    290 typedef mdsthreshold4 fattr4_mdsthreshold;
    291 
    292 typedef retention_get4 fattr4_retention_get;
    293 
    294 typedef retention_set4 fattr4_retention_set;
    295 
    296 typedef retention_get4 fattr4_retentevt_get;
    297 
    298 typedef retention_set4 fattr4_retentevt_set;
    299 
    300 typedef uint64_t fattr4_retention_hold;
    301 
    302 typedef nfsacl41 fattr4_dacl;
    303 
    304 typedef nfsacl41 fattr4_sacl;
    305 
    306 #define	FATTR4_DIR_NOTIF_DELAY 56
    307 #define	FATTR4_DIRENT_NOTIF_DELAY 57
    308 #define	FATTR4_DACL 58
    309 #define	FATTR4_SACL 59
    310 #define	FATTR4_CHANGE_POLICY 60
    311 #define	FATTR4_FS_STATUS 61
    312 #define	FATTR4_FS_LAYOUT_TYPE 62
    313 #define	FATTR4_LAYOUT_HINT 63
    314 #define	FATTR4_LAYOUT_TYPE 64
    315 #define	FATTR4_LAYOUT_BLKSIZE 65
    316 #define	FATTR4_LAYOUT_ALIGNMENT 66
    317 #define	FATTR4_FS_LOCATIONS_INFO 67
    318 #define	FATTR4_MDSTHRESHOLD 68
    319 #define	FATTR4_RETENTION_GET 69
    320 #define	FATTR4_RETENTION_SET 70
    321 #define	FATTR4_RETENTEVT_GET 71
    322 #define	FATTR4_RETENTEVT_SET 72
    323 #define	FATTR4_RETENTION_HOLD 73
    324 #define	FATTR4_MODE_SET_MASKED 74
    325 #define	FATTR4_SUPPATTR_EXCLCREAT 75
    326 #define	FATTR4_FS_CHARSET_CAP 76
    327 
    328 #define	NFS41_ATTR_COUNT (FATTR4_FS_CHARSET_CAP + 1)
    329 
    330 struct client_owner4 {
    331 	verifier4 co_verifier;
    332 	struct {
    333 		uint_t co_ownerid_len;
    334 		char *co_ownerid_val;
    335 	} co_ownerid;
    336 };
    337 typedef struct client_owner4 client_owner4;
    338 
    339 struct state_owner4 {
    340 	clientid4 clientid;
    341 	struct {
    342 		uint_t owner_len;
    343 		char *owner_val;
    344 	} owner;
    345 };
    346 typedef struct state_owner4 state_owner4;
    347 
    348 /* Input for computing subkeys */
    349 
    350 enum ssv_subkey4 {
    351 	SSV4_SUBKEY_MIC_I2T = 1,
    352 	SSV4_SUBKEY_MIC_T2I = 2,
    353 	SSV4_SUBKEY_SEAL_I2T = 3,
    354 	SSV4_SUBKEY_SEAL_T2I = 4
    355 };
    356 typedef enum ssv_subkey4 ssv_subkey4;
    357 
    358 /* Input for computing smt_hmac */
    359 
    360 struct ssv_mic_plain_tkn4 {
    361 	uint32_t smpt_ssv_seq;
    362 	struct {
    363 		uint_t smpt_orig_plain_len;
    364 		char *smpt_orig_plain_val;
    365 	} smpt_orig_plain;
    366 };
    367 typedef struct ssv_mic_plain_tkn4 ssv_mic_plain_tkn4;
    368 
    369 
    370 /* SSV GSS PerMsgToken token */
    371 
    372 struct ssv_mic_tkn4 {
    373 	uint32_t smt_ssv_seq;
    374 	struct {
    375 		uint_t smt_hmac_len;
    376 		char *smt_hmac_val;
    377 	} smt_hmac;
    378 };
    379 typedef struct ssv_mic_tkn4 ssv_mic_tkn4;
    380 
    381 
    382 /* Input for computing ssct_encr_data and ssct_hmac */
    383 
    384 struct ssv_seal_plain_tkn4 {
    385 	struct {
    386 		uint_t sspt_confounder_len;
    387 		char *sspt_confounder_val;
    388 	} sspt_confounder;
    389 	uint32_t sspt_ssv_seq;
    390 	struct {
    391 		uint_t sspt_orig_plain_len;
    392 		char *sspt_orig_plain_val;
    393 	} sspt_orig_plain;
    394 	struct {
    395 		uint_t sspt_pad_len;
    396 		char *sspt_pad_val;
    397 	} sspt_pad;
    398 };
    399 typedef struct ssv_seal_plain_tkn4 ssv_seal_plain_tkn4;
    400 
    401 
    402 /* SSV GSS SealedMessage token */
    403 
    404 struct ssv_seal_cipher_tkn4 {
    405 	uint32_t ssct_ssv_seq;
    406 	struct {
    407 		uint_t ssct_iv_len;
    408 		char *ssct_iv_val;
    409 	} ssct_iv;
    410 	struct {
    411 		uint_t ssct_encr_data_len;
    412 		char *ssct_encr_data_val;
    413 	} ssct_encr_data;
    414 	struct {
    415 		uint_t ssct_hmac_len;
    416 		char *ssct_hmac_val;
    417 	} ssct_hmac;
    418 };
    419 typedef struct ssv_seal_cipher_tkn4 ssv_seal_cipher_tkn4;
    420 
    421 
    422 struct fs_locations_server4 {
    423 	int32_t fls_currency;
    424 	struct {
    425 		uint_t fls_info_len;
    426 		char *fls_info_val;
    427 	} fls_info;
    428 	utf8str_cis fls_server;
    429 };
    430 typedef struct fs_locations_server4 fs_locations_server4;
    431 #define	FSLI4BX_GFLAGS 0
    432 #define	FSLI4BX_TFLAGS 1
    433 #define	FSLI4BX_CLSIMUL 2
    434 #define	FSLI4BX_CLHANDLE 3
    435 #define	FSLI4BX_CLFILEID 4
    436 #define	FSLI4BX_CLWRITEVER 5
    437 #define	FSLI4BX_CLCHANGE 6
    438 #define	FSLI4BX_CLREADDIR 7
    439 #define	FSLI4BX_READRANK 8
    440 #define	FSLI4BX_WRITERANK 9
    441 #define	FSLI4BX_READORDER 10
    442 #define	FSLI4BX_WRITEORDER 11
    443 #define	FSLI4GF_WRITABLE 0x01
    444 #define	FSLI4GF_CUR_REQ 0x02
    445 #define	FSLI4GF_ABSENT 0x04
    446 #define	FSLI4GF_GOING 0x08
    447 #define	FSLI4GF_SPLIT 0x10
    448 #define	FSLI4TF_RDMA 0x01
    449 
    450 struct fs_locations_item4 {
    451 	struct {
    452 		uint_t fli_entries_len;
    453 		fs_locations_server4 *fli_entries_val;
    454 	} fli_entries;
    455 	pathname4 fli_rootpath;
    456 };
    457 typedef struct fs_locations_item4 fs_locations_item4;
    458 
    459 struct fs_locations_info4 {
    460 	uint32_t fli_flags;
    461 	int32_t fli_valid_for;
    462 	pathname4 fli_fs_root;
    463 	struct {
    464 		uint_t fli_items_len;
    465 		fs_locations_item4 *fli_items_val;
    466 	} fli_items;
    467 };
    468 typedef struct fs_locations_info4 fs_locations_info4;
    469 #define	FSLI4IF_VAR_SUB 0x00000001
    470 
    471 typedef fs_locations_info4 fattr4_fs_locations_info;
    472 #define	NFL4_UFLG_MASK 0x0000003F
    473 #define	NFL4_UFLG_DENSE 0x00000001
    474 #define	NFL4_UFLG_COMMIT_THRU_MDS 0x00000002
    475 #define	NFL4_UFLG_STRIPE_UNIT_SIZE_MASK 0xFFFFFFC0
    476 
    477 typedef uint32_t nfl_util4;
    478 
    479 
    480 /* Encoded in the loh_body field of type layouthint4: */
    481 
    482 
    483 enum filelayout_hint_care4 {
    484 	NFLH4_CARE_DENSE = NFL4_UFLG_DENSE,
    485 	NFLH4_CARE_COMMIT_THRU_MDS = NFL4_UFLG_COMMIT_THRU_MDS,
    486 	NFLH4_CARE_STRIPE_UNIT_SIZE = 0x00000040,
    487 	NFLH4_CARE_STRIPE_COUNT = 0x00000080
    488 };
    489 typedef enum filelayout_hint_care4 filelayout_hint_care4;
    490 
    491 
    492 struct nfsv4_1_file_layouthint4 {
    493 	uint32_t nflh_care;
    494 	nfl_util4 nflh_util;
    495 	count4 nflh_stripe_count;
    496 };
    497 typedef struct nfsv4_1_file_layouthint4 nfsv4_1_file_layouthint4;
    498 
    499 typedef struct {
    500 	uint_t multipath_list4_len;
    501 	netaddr4 *multipath_list4_val;
    502 } multipath_list4;
    503 
    504 /* Encoded in the da_addr_body field of type device_addr4: */
    505 
    506 struct nfsv4_1_file_layout_ds_addr4 {
    507 	struct {
    508 		uint_t nflda_stripe_indices_len;
    509 		uint32_t *nflda_stripe_indices_val;
    510 	} nflda_stripe_indices;
    511 	struct {
    512 		uint_t nflda_multipath_ds_list_len;
    513 		multipath_list4 *nflda_multipath_ds_list_val;
    514 	} nflda_multipath_ds_list;
    515 };
    516 typedef struct nfsv4_1_file_layout_ds_addr4 nfsv4_1_file_layout_ds_addr4;
    517 
    518 
    519 /* Encoded in the loc_body field of type layout_content4: */
    520 
    521 struct nfsv4_1_file_layout4 {
    522 	deviceid4 nfl_deviceid;
    523 	nfl_util4 nfl_util;
    524 	uint32_t nfl_first_stripe_index;
    525 	offset4 nfl_pattern_offset;
    526 	struct {
    527 		uint_t nfl_fh_list_len;
    528 		nfs_fh4 *nfl_fh_list_val;
    529 	} nfl_fh_list;
    530 };
    531 typedef struct nfsv4_1_file_layout4 nfsv4_1_file_layout4;
    532 
    533 /*
    534  * Encoded in the lou_body field of type layoutupdate4:
    535  *	 Nothing. lou_body is a zero length array of octets.
    536  */
    537 
    538 #define	OPEN4_SHARE_ACCESS_WANT_DELEG_MASK 0xFF00
    539 #define	OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE 0x0000
    540 #define	OPEN4_SHARE_ACCESS_WANT_READ_DELEG 0x0100
    541 #define	OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG 0x0200
    542 #define	OPEN4_SHARE_ACCESS_WANT_ANY_DELEG 0x0300
    543 #define	OPEN4_SHARE_ACCESS_WANT_NO_DELEG 0x0400
    544 #define	OPEN4_SHARE_ACCESS_WANT_CANCEL 0x0500
    545 #define	OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000
    546 #define	OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED 0x20000
    547 
    548 /*
    549  * XXX - In order for open_delegation4 type to work with the new
    550  *	 open_none_delegation4 type, we modify nfs4_kprot's entry,
    551  *	 since open_read_delegation4 and open_write_delegation4
    552  *	 types are already defined there.
    553  */
    554 
    555 typedef struct {
    556 	uint_t gsshandle4_t_len;
    557 	char *gsshandle4_t_val;
    558 } gsshandle4_t;
    559 
    560 struct gss_cb_handles4 {
    561 	rpc_gss_svc_t gcbp_service;
    562 	gsshandle4_t gcbp_handle_from_server;
    563 	gsshandle4_t gcbp_handle_from_client;
    564 };
    565 typedef struct gss_cb_handles4 gss_cb_handles4;
    566 
    567 struct callback_sec_parms4 {
    568 	uint32_t cb_secflavor;
    569 	union {
    570 		authsys_parms cbsp_sys_cred;
    571 		gss_cb_handles4 cbsp_gss_handles;
    572 	} callback_sec_parms4_u;
    573 };
    574 typedef struct callback_sec_parms4 callback_sec_parms4;
    575 
    576 struct BACKCHANNEL_CTL4args {
    577 	uint32_t bca_cb_program;
    578 	struct {
    579 		uint_t bca_sec_parms_len;
    580 		callback_sec_parms4 *bca_sec_parms_val;
    581 	} bca_sec_parms;
    582 };
    583 typedef struct BACKCHANNEL_CTL4args BACKCHANNEL_CTL4args;
    584 
    585 struct BACKCHANNEL_CTL4res {
    586 	nfsstat4 bcr_status;
    587 };
    588 typedef struct BACKCHANNEL_CTL4res BACKCHANNEL_CTL4res;
    589 
    590 enum channel_dir_from_client4 {
    591 	CDFC4_FORE = 0x1,
    592 	CDFC4_BACK = 0x2,
    593 	CDFC4_FORE_OR_BOTH = 0x3,
    594 	CDFC4_BACK_OR_BOTH = 0x7
    595 };
    596 typedef enum channel_dir_from_client4 channel_dir_from_client4;
    597 
    598 struct BIND_CONN_TO_SESSION4args {
    599 	sessionid4 bctsa_sessid;
    600 	channel_dir_from_client4 bctsa_dir;
    601 	bool_t bctsa_use_conn_in_rdma_mode;
    602 };
    603 typedef struct BIND_CONN_TO_SESSION4args BIND_CONN_TO_SESSION4args;
    604 
    605 enum channel_dir_from_server4 {
    606 	CDFS4_FORE = 0x1,
    607 	CDFS4_BACK = 0x2,
    608 	CDFS4_BOTH = 0x3
    609 };
    610 typedef enum channel_dir_from_server4 channel_dir_from_server4;
    611 
    612 struct BIND_CONN_TO_SESSION4resok {
    613 	sessionid4 bctsr_sessid;
    614 	channel_dir_from_server4 bctsr_dir;
    615 	bool_t bctsr_use_conn_in_rdma_mode;
    616 };
    617 typedef struct BIND_CONN_TO_SESSION4resok BIND_CONN_TO_SESSION4resok;
    618 
    619 struct BIND_CONN_TO_SESSION4res {
    620 	nfsstat4 bctsr_status;
    621 	union {
    622 		BIND_CONN_TO_SESSION4resok bctsr_resok4;
    623 	} BIND_CONN_TO_SESSION4res_u;
    624 };
    625 typedef struct BIND_CONN_TO_SESSION4res BIND_CONN_TO_SESSION4res;
    626 
    627 #define	EXCHGID4_FLAG_SUPP_MOVED_REFER		0x00000001
    628 #define	EXCHGID4_FLAG_SUPP_MOVED_MIGR		0x00000002
    629 #define	EXCHGID4_FLAG_BIND_PRINC_STATEID	0x00000100
    630 #define	EXCHGID4_FLAG_USE_NON_PNFS		0x00010000
    631 #define	EXCHGID4_FLAG_USE_PNFS_MDS		0x00020000
    632 #define	EXCHGID4_FLAG_USE_PNFS_DS		0x00040000
    633 #define	EXCHGID4_FLAG_MASK_PNFS			0x00070000
    634 #define	EXCHGID4_FLAG_UPD_CONFIRMED_REC_A	0x40000000
    635 #define	EXCHGID4_FLAG_CONFIRMED_R		0x80000000
    636 
    637 #define	EXID4_FLAG_MASK				0xC0070103
    638 #define	EXID4_FLAG_INVALID_ARGS			EXCHGID4_FLAG_CONFIRMED_R
    639 
    640 struct state_protect_ops4 {
    641 	bitmap4 spo_must_enforce;
    642 	bitmap4 spo_must_allow;
    643 };
    644 typedef struct state_protect_ops4 state_protect_ops4;
    645 
    646 struct ssv_sp_parms4 {
    647 	state_protect_ops4 ssp_ops;
    648 	struct {
    649 		uint_t ssp_hash_algs_len;
    650 		sec_oid4 *ssp_hash_algs_val;
    651 	} ssp_hash_algs;
    652 	struct {
    653 		uint_t ssp_encr_algs_len;
    654 		sec_oid4 *ssp_encr_algs_val;
    655 	} ssp_encr_algs;
    656 	uint32_t ssp_window;
    657 	uint32_t ssp_num_gss_handles;
    658 };
    659 typedef struct ssv_sp_parms4 ssv_sp_parms4;
    660 
    661 enum state_protect_how4 {
    662 	SP4_NONE = 0,
    663 	SP4_MACH_CRED = 1,
    664 	SP4_SSV = 2
    665 };
    666 typedef enum state_protect_how4 state_protect_how4;
    667 
    668 struct state_protect4_a {
    669 	state_protect_how4 spa_how;
    670 	union {
    671 		state_protect_ops4 spa_mach_ops;
    672 		ssv_sp_parms4 spa_ssv_parms;
    673 	} state_protect4_a_u;
    674 };
    675 typedef struct state_protect4_a state_protect4_a;
    676 
    677 struct EXCHANGE_ID4args {
    678 	client_owner4 eia_clientowner;
    679 	uint32_t eia_flags;
    680 	state_protect4_a eia_state_protect;
    681 	struct {
    682 		uint_t eia_client_impl_id_len;
    683 		nfs_impl_id4 *eia_client_impl_id_val;
    684 	} eia_client_impl_id;
    685 };
    686 typedef struct EXCHANGE_ID4args EXCHANGE_ID4args;
    687 
    688 struct ssv_prot_info4 {
    689 	state_protect_ops4 spi_ops;
    690 	uint32_t spi_hash_alg;
    691 	uint32_t spi_encr_alg;
    692 	uint32_t spi_ssv_len;
    693 	uint32_t spi_window;
    694 	struct {
    695 		uint_t spi_handles_len;
    696 		gsshandle4_t *spi_handles_val;
    697 	} spi_handles;
    698 };
    699 typedef struct ssv_prot_info4 ssv_prot_info4;
    700 
    701 struct server_owner4 {
    702 	uint64_t so_minor_id;
    703 	struct {
    704 		uint_t so_major_id_len;
    705 		char *so_major_id_val;
    706 	} so_major_id;
    707 };
    708 typedef struct server_owner4 server_owner4;
    709 
    710 struct state_protect4_r {
    711 	state_protect_how4 spr_how;
    712 	union {
    713 		state_protect_ops4 spr_mach_ops;
    714 		ssv_prot_info4 spr_ssv_info;
    715 	} state_protect4_r_u;
    716 };
    717 typedef struct state_protect4_r state_protect4_r;
    718 
    719 struct EXCHANGE_ID4resok {
    720 	clientid4 eir_clientid;
    721 	sequenceid4 eir_sequenceid;
    722 	uint32_t eir_flags;
    723 	state_protect4_r eir_state_protect;
    724 	server_owner4 eir_server_owner;
    725 	struct {
    726 		uint_t eir_server_scope_len;
    727 		char *eir_server_scope_val;
    728 	} eir_server_scope;
    729 	struct {
    730 		uint_t eir_server_impl_id_len;
    731 		nfs_impl_id4 *eir_server_impl_id_val;
    732 	} eir_server_impl_id;
    733 };
    734 typedef struct EXCHANGE_ID4resok EXCHANGE_ID4resok;
    735 
    736 struct EXCHANGE_ID4res {
    737 	nfsstat4 eir_status;
    738 	union {
    739 		EXCHANGE_ID4resok eir_resok4;
    740 	} EXCHANGE_ID4res_u;
    741 };
    742 typedef struct EXCHANGE_ID4res EXCHANGE_ID4res;
    743 
    744 struct channel_attrs4 {
    745 	count4 ca_headerpadsize;
    746 	count4 ca_maxrequestsize;
    747 	count4 ca_maxresponsesize;
    748 	count4 ca_maxresponsesize_cached;
    749 	count4 ca_maxoperations;
    750 	count4 ca_maxrequests;
    751 	struct {
    752 		uint_t ca_rdma_ird_len;
    753 		uint32_t *ca_rdma_ird_val;
    754 	} ca_rdma_ird;
    755 };
    756 typedef struct channel_attrs4 channel_attrs4;
    757 #define	CREATE_SESSION4_FLAG_PERSIST 0x00000001
    758 #define	CREATE_SESSION4_FLAG_CONN_BACK_CHAN 0x00000002
    759 #define	CREATE_SESSION4_FLAG_CONN_RDMA 0x00000004
    760 
    761 /* added manually; ie. not part of rpcgened mojo */
    762 typedef struct {
    763 	uint_t			 csa_sec_parms_len;
    764 	callback_sec_parms4	*csa_sec_parms_val;
    765 } csa_sec_parms_t;
    766 
    767 struct CREATE_SESSION4args {
    768 	clientid4 csa_clientid;
    769 	sequenceid4 csa_sequence;
    770 	uint32_t csa_flags;
    771 	channel_attrs4 csa_fore_chan_attrs;
    772 	channel_attrs4 csa_back_chan_attrs;
    773 	uint32_t csa_cb_program;
    774 	csa_sec_parms_t csa_sec_parms;
    775 };
    776 typedef struct CREATE_SESSION4args CREATE_SESSION4args;
    777 
    778 struct CREATE_SESSION4resok {
    779 	sessionid4 csr_sessionid;
    780 	sequenceid4 csr_sequence;
    781 	uint32_t csr_flags;
    782 	channel_attrs4 csr_fore_chan_attrs;
    783 	channel_attrs4 csr_back_chan_attrs;
    784 };
    785 typedef struct CREATE_SESSION4resok CREATE_SESSION4resok;
    786 
    787 struct CREATE_SESSION4res {
    788 	nfsstat4 csr_status;
    789 	union {
    790 		CREATE_SESSION4resok csr_resok4;
    791 	} CREATE_SESSION4res_u;
    792 };
    793 typedef struct CREATE_SESSION4res CREATE_SESSION4res;
    794 
    795 struct DESTROY_SESSION4args {
    796 	sessionid4 dsa_sessionid;
    797 };
    798 typedef struct DESTROY_SESSION4args DESTROY_SESSION4args;
    799 
    800 struct DESTROY_SESSION4res {
    801 	nfsstat4 dsr_status;
    802 };
    803 typedef struct DESTROY_SESSION4res DESTROY_SESSION4res;
    804 
    805 struct FREE_STATEID4args {
    806 	stateid4 fsa_stateid;
    807 };
    808 typedef struct FREE_STATEID4args FREE_STATEID4args;
    809 
    810 struct FREE_STATEID4res {
    811 	nfsstat4 fsr_status;
    812 };
    813 typedef struct FREE_STATEID4res FREE_STATEID4res;
    814 
    815 typedef nfstime4 attr_notice4;
    816 
    817 struct GET_DIR_DELEGATION4args {
    818 	bool_t gdda_signal_deleg_avail;
    819 	bitmap4 gdda_notification_types;
    820 	attr_notice4 gdda_child_attr_delay;
    821 	attr_notice4 gdda_dir_attr_delay;
    822 	bitmap4 gdda_child_attributes;
    823 	bitmap4 gdda_dir_attributes;
    824 };
    825 typedef struct GET_DIR_DELEGATION4args GET_DIR_DELEGATION4args;
    826 
    827 struct GET_DIR_DELEGATION4resok {
    828 	verifier4 gddr_cookieverf;
    829 	stateid4 gddr_stateid;
    830 	bitmap4 gddr_notification;
    831 	bitmap4 gddr_child_attributes;
    832 	bitmap4 gddr_dir_attributes;
    833 };
    834 typedef struct GET_DIR_DELEGATION4resok GET_DIR_DELEGATION4resok;
    835 
    836 enum gddrnf4_status {
    837 	GDD4_OK = 0,
    838 	GDD4_UNAVAIL = 1
    839 };
    840 typedef enum gddrnf4_status gddrnf4_status;
    841 
    842 struct GET_DIR_DELEGATION4res_non_fatal {
    843 	gddrnf4_status gddrnf_status;
    844 	union {
    845 		GET_DIR_DELEGATION4resok gddrnf_resok4;
    846 		bool_t gddrnf_will_signal_deleg_avail;
    847 	} GET_DIR_DELEGATION4res_non_fatal_u;
    848 };
    849 typedef struct GET_DIR_DELEGATION4res_non_fatal
    850 		GET_DIR_DELEGATION4res_non_fatal;
    851 
    852 struct GET_DIR_DELEGATION4res {
    853 	nfsstat4 gddr_status;
    854 	union {
    855 		GET_DIR_DELEGATION4res_non_fatal gddr_res_non_fatal4;
    856 	} GET_DIR_DELEGATION4res_u;
    857 };
    858 typedef struct GET_DIR_DELEGATION4res GET_DIR_DELEGATION4res;
    859 
    860 struct GETDEVICEINFO4args {
    861 	deviceid4 gdia_device_id;
    862 	layouttype4 gdia_layout_type;
    863 	count4 gdia_maxcount;
    864 	bitmap4 gdia_notify_types;
    865 };
    866 typedef struct GETDEVICEINFO4args GETDEVICEINFO4args;
    867 
    868 struct GETDEVICEINFO4resok {
    869 	device_addr4 gdir_device_addr;
    870 	bitmap4 gdir_notification;
    871 };
    872 typedef struct GETDEVICEINFO4resok GETDEVICEINFO4resok;
    873 
    874 struct GETDEVICEINFO4res {
    875 	nfsstat4 gdir_status;
    876 	union {
    877 		GETDEVICEINFO4resok gdir_resok4;
    878 		count4 gdir_mincount;
    879 	} GETDEVICEINFO4res_u;
    880 };
    881 typedef struct GETDEVICEINFO4res GETDEVICEINFO4res;
    882 
    883 struct GETDEVICELIST4args {
    884 	layouttype4 gdla_layout_type;
    885 	count4 gdla_maxdevices;
    886 	nfs_cookie4 gdla_cookie;
    887 	verifier4 gdla_cookieverf;
    888 };
    889 typedef struct GETDEVICELIST4args GETDEVICELIST4args;
    890 
    891 struct GETDEVICELIST4resok {
    892 	nfs_cookie4 gdlr_cookie;
    893 	verifier4 gdlr_cookieverf;
    894 	struct {
    895 		uint_t gdlr_deviceid_list_len;
    896 		deviceid4 *gdlr_deviceid_list_val;
    897 	} gdlr_deviceid_list;
    898 	bool_t gdlr_eof;
    899 };
    900 typedef struct GETDEVICELIST4resok GETDEVICELIST4resok;
    901 
    902 struct GETDEVICELIST4res {
    903 	nfsstat4 gdlr_status;
    904 	union {
    905 		GETDEVICELIST4resok gdlr_resok4;
    906 	} GETDEVICELIST4res_u;
    907 };
    908 typedef struct GETDEVICELIST4res GETDEVICELIST4res;
    909 
    910 #define	GDL_ROK		GETDEVICELIST4res_u.gdlr_resok4
    911 #define	GDL_ADDRV	gdlr_devinfo_list.gdlr_devinfo_list_val
    912 #define	GDL_ADDRL	gdlr_devinfo_list.gdlr_devinfo_list_len
    913 
    914 struct newtime4 {
    915 	bool_t nt_timechanged;
    916 	union {
    917 		nfstime4 nt_time;
    918 	} newtime4_u;
    919 };
    920 typedef struct newtime4 newtime4;
    921 
    922 struct newoffset4 {
    923 	bool_t no_newoffset;
    924 	union {
    925 		offset4 no_offset;
    926 	} newoffset4_u;
    927 };
    928 typedef struct newoffset4 newoffset4;
    929 
    930 struct LAYOUTCOMMIT4args {
    931 	offset4 loca_offset;
    932 	length4 loca_length;
    933 	bool_t loca_reclaim;
    934 	stateid4 loca_stateid;
    935 	newoffset4 loca_last_write_offset;
    936 	newtime4 loca_time_modify;
    937 	layoutupdate4 loca_layoutupdate;
    938 };
    939 typedef struct LAYOUTCOMMIT4args LAYOUTCOMMIT4args;
    940 
    941 struct newsize4 {
    942 	bool_t ns_sizechanged;
    943 	union {
    944 		length4 ns_size;
    945 	} newsize4_u;
    946 };
    947 typedef struct newsize4 newsize4;
    948 
    949 struct LAYOUTCOMMIT4resok {
    950 	newsize4 locr_newsize;
    951 };
    952 typedef struct LAYOUTCOMMIT4resok LAYOUTCOMMIT4resok;
    953 
    954 struct LAYOUTCOMMIT4res {
    955 	nfsstat4 locr_status;
    956 	union {
    957 		LAYOUTCOMMIT4resok locr_resok4;
    958 	} LAYOUTCOMMIT4res_u;
    959 };
    960 typedef struct LAYOUTCOMMIT4res LAYOUTCOMMIT4res;
    961 
    962 struct LAYOUTGET4args {
    963 	bool_t loga_signal_layout_avail;
    964 	layouttype4 loga_layout_type;
    965 	layoutiomode4 loga_iomode;
    966 	offset4 loga_offset;
    967 	length4 loga_length;
    968 	length4 loga_minlength;
    969 	stateid4 loga_stateid;
    970 	count4 loga_maxcount;
    971 };
    972 typedef struct LAYOUTGET4args LAYOUTGET4args;
    973 
    974 struct LAYOUTGET4resok {
    975 	bool_t logr_return_on_close;
    976 	stateid4 logr_stateid;
    977 	struct {
    978 		uint_t logr_layout_len;
    979 		layout4 *logr_layout_val;
    980 	} logr_layout;
    981 };
    982 typedef struct LAYOUTGET4resok LAYOUTGET4resok;
    983 
    984 struct LAYOUTGET4res {
    985 	nfsstat4 logr_status;
    986 	union {
    987 		LAYOUTGET4resok logr_resok4;
    988 		bool_t logr_will_signal_layout_avail;
    989 	} LAYOUTGET4res_u;
    990 };
    991 typedef struct LAYOUTGET4res LAYOUTGET4res;
    992 
    993 struct LAYOUTRETURN4args {
    994 	bool_t lora_reclaim;
    995 	layouttype4 lora_layout_type;
    996 	layoutiomode4 lora_iomode;
    997 	layoutreturn4 lora_layoutreturn;
    998 };
    999 typedef struct LAYOUTRETURN4args LAYOUTRETURN4args;
   1000 
   1001 struct layoutreturn_stateid {
   1002 	bool_t lrs_present;
   1003 	union {
   1004 		stateid4 lrs_stateid;
   1005 	} layoutreturn_stateid_u;
   1006 };
   1007 typedef struct layoutreturn_stateid layoutreturn_stateid;
   1008 
   1009 struct LAYOUTRETURN4res {
   1010 	nfsstat4 lorr_status;
   1011 	union {
   1012 		layoutreturn_stateid lorr_stateid;
   1013 	} LAYOUTRETURN4res_u;
   1014 };
   1015 typedef struct LAYOUTRETURN4res LAYOUTRETURN4res;
   1016 
   1017 enum secinfo_style4 {
   1018 	SECINFO_STYLE4_CURRENT_FH = 0,
   1019 	SECINFO_STYLE4_PARENT = 1
   1020 };
   1021 typedef enum secinfo_style4 secinfo_style4;
   1022 
   1023 typedef secinfo_style4 SECINFO_NO_NAME4args;
   1024 
   1025 typedef SECINFO4res SECINFO_NO_NAME4res;
   1026 
   1027 struct SEQUENCE4args {
   1028 	sessionid4 sa_sessionid;
   1029 	sequenceid4 sa_sequenceid;
   1030 	slotid4 sa_slotid;
   1031 	slotid4 sa_highest_slotid;
   1032 	bool_t sa_cachethis;
   1033 };
   1034 typedef struct SEQUENCE4args SEQUENCE4args;
   1035 #define	SEQ4_STATUS_CB_PATH_DOWN 0x00000001
   1036 #define	SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002
   1037 #define	SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED 0x00000004
   1038 #define	SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED 0x00000008
   1039 #define	SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED 0x00000010
   1040 #define	SEQ4_STATUS_ADMIN_STATE_REVOKED 0x00000020
   1041 #define	SEQ4_STATUS_RECALLABLE_STATE_REVOKED 0x00000040
   1042 #define	SEQ4_STATUS_LEASE_MOVED 0x00000080
   1043 #define	SEQ4_STATUS_RESTART_RECLAIM_NEEDED 0x00000100
   1044 #define	SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200
   1045 #define	SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400
   1046 #define	SEQ4_STATUS_DEVID_CHANGED 0x00000800
   1047 #define	SEQ4_STATUS_DEVID_DELETED 0x00001000
   1048 #define	SEQ4_HIGH_BIT SEQ4_STATUS_DEVID_DELETED /* highest defined flag */
   1049 
   1050 struct SEQUENCE4resok {
   1051 	sessionid4 sr_sessionid;
   1052 	sequenceid4 sr_sequenceid;
   1053 	slotid4 sr_slotid;
   1054 	slotid4 sr_highest_slotid;
   1055 	slotid4 sr_target_highest_slotid;
   1056 	uint32_t sr_status_flags;
   1057 };
   1058 typedef struct SEQUENCE4resok SEQUENCE4resok;
   1059 
   1060 struct SEQUENCE4res {
   1061 	nfsstat4 sr_status;
   1062 	union {
   1063 		SEQUENCE4resok sr_resok4;
   1064 	} SEQUENCE4res_u;
   1065 };
   1066 typedef struct SEQUENCE4res SEQUENCE4res;
   1067 
   1068 struct ssa_digest_input4 {
   1069 	SEQUENCE4args sdi_seqargs;
   1070 };
   1071 typedef struct ssa_digest_input4 ssa_digest_input4;
   1072 
   1073 struct SET_SSV4args {
   1074 	struct {
   1075 		uint_t ssa_ssv_len;
   1076 		char *ssa_ssv_val;
   1077 	} ssa_ssv;
   1078 	struct {
   1079 		uint_t ssa_digest_len;
   1080 		char *ssa_digest_val;
   1081 	} ssa_digest;
   1082 };
   1083 typedef struct SET_SSV4args SET_SSV4args;
   1084 
   1085 struct ssr_digest_input4 {
   1086 	SEQUENCE4res sdi_seqres;
   1087 };
   1088 typedef struct ssr_digest_input4 ssr_digest_input4;
   1089 
   1090 struct SET_SSV4resok {
   1091 	struct {
   1092 		uint_t ssr_digest_len;
   1093 		char *ssr_digest_val;
   1094 	} ssr_digest;
   1095 };
   1096 typedef struct SET_SSV4resok SET_SSV4resok;
   1097 
   1098 struct SET_SSV4res {
   1099 	nfsstat4 ssr_status;
   1100 	union {
   1101 		SET_SSV4resok ssr_resok4;
   1102 	} SET_SSV4res_u;
   1103 };
   1104 typedef struct SET_SSV4res SET_SSV4res;
   1105 
   1106 struct TEST_STATEID4args {
   1107 	struct {
   1108 		uint_t ts_stateids_len;
   1109 		stateid4 *ts_stateids_val;
   1110 	} ts_stateids;
   1111 };
   1112 typedef struct TEST_STATEID4args TEST_STATEID4args;
   1113 
   1114 struct TEST_STATEID4resok {
   1115 	struct {
   1116 		uint_t tsr_status_codes_len;
   1117 		nfsstat4 *tsr_status_codes_val;
   1118 	} tsr_status_codes;
   1119 };
   1120 typedef struct TEST_STATEID4resok TEST_STATEID4resok;
   1121 
   1122 struct TEST_STATEID4res {
   1123 	nfsstat4 tsr_status;
   1124 	union {
   1125 		TEST_STATEID4resok tsr_resok4;
   1126 	} TEST_STATEID4res_u;
   1127 };
   1128 typedef struct TEST_STATEID4res TEST_STATEID4res;
   1129 
   1130 struct deleg_claim4 {
   1131 	open_claim_type4 dc_claim;
   1132 	union {
   1133 		open_delegation_type4 dc_delegate_type;
   1134 	} deleg_claim4_u;
   1135 };
   1136 typedef struct deleg_claim4 deleg_claim4;
   1137 
   1138 struct WANT_DELEGATION4args {
   1139 	uint32_t wda_want;
   1140 	deleg_claim4 wda_claim;
   1141 };
   1142 typedef struct WANT_DELEGATION4args WANT_DELEGATION4args;
   1143 
   1144 struct WANT_DELEGATION4res {
   1145 	nfsstat4 wdr_status;
   1146 	union {
   1147 		open_delegation4 wdr_resok4;
   1148 	} WANT_DELEGATION4res_u;
   1149 };
   1150 typedef struct WANT_DELEGATION4res WANT_DELEGATION4res;
   1151 
   1152 struct DESTROY_CLIENTID4args {
   1153 	clientid4 dca_clientid;
   1154 };
   1155 typedef struct DESTROY_CLIENTID4args DESTROY_CLIENTID4args;
   1156 
   1157 struct DESTROY_CLIENTID4res {
   1158 	nfsstat4 dcr_status;
   1159 };
   1160 typedef struct DESTROY_CLIENTID4res DESTROY_CLIENTID4res;
   1161 
   1162 struct RECLAIM_COMPLETE4args {
   1163 	bool_t rca_one_fs;
   1164 };
   1165 typedef struct RECLAIM_COMPLETE4args RECLAIM_COMPLETE4args;
   1166 
   1167 struct RECLAIM_COMPLETE4res {
   1168 	nfsstat4 rcr_status;
   1169 };
   1170 typedef struct RECLAIM_COMPLETE4res RECLAIM_COMPLETE4res;
   1171 
   1172 enum nfs_opnum4 {
   1173 	OP_ACCESS = 3,
   1174 	OP_CLOSE = 4,
   1175 	OP_COMMIT = 5,
   1176 	OP_CREATE = 6,
   1177 	OP_DELEGPURGE = 7,
   1178 	OP_DELEGRETURN = 8,
   1179 	OP_GETATTR = 9,
   1180 	OP_GETFH = 10,
   1181 	OP_LINK = 11,
   1182 	OP_LOCK = 12,
   1183 	OP_LOCKT = 13,
   1184 	OP_LOCKU = 14,
   1185 	OP_LOOKUP = 15,
   1186 	OP_LOOKUPP = 16,
   1187 	OP_NVERIFY = 17,
   1188 	OP_OPEN = 18,
   1189 	OP_OPENATTR = 19,
   1190 	OP_OPEN_CONFIRM = 20,
   1191 	OP_OPEN_DOWNGRADE = 21,
   1192 	OP_PUTFH = 22,
   1193 	OP_PUTPUBFH = 23,
   1194 	OP_PUTROOTFH = 24,
   1195 	OP_READ = 25,
   1196 	OP_READDIR = 26,
   1197 	OP_READLINK = 27,
   1198 	OP_REMOVE = 28,
   1199 	OP_RENAME = 29,
   1200 	OP_RENEW = 30,
   1201 	OP_RESTOREFH = 31,
   1202 	OP_SAVEFH = 32,
   1203 	OP_SECINFO = 33,
   1204 	OP_SETATTR = 34,
   1205 	OP_SETCLIENTID = 35,
   1206 	OP_SETCLIENTID_CONFIRM = 36,
   1207 	OP_VERIFY = 37,
   1208 	OP_WRITE = 38,
   1209 	OP_RELEASE_LOCKOWNER = 39,
   1210 	OP_BACKCHANNEL_CTL = 40,
   1211 	OP_BIND_CONN_TO_SESSION = 41,
   1212 	OP_EXCHANGE_ID = 42,
   1213 	OP_CREATE_SESSION = 43,
   1214 	OP_DESTROY_SESSION = 44,
   1215 	OP_FREE_STATEID = 45,
   1216 	OP_GET_DIR_DELEGATION = 46,
   1217 	OP_GETDEVICEINFO = 47,
   1218 	OP_GETDEVICELIST = 48,
   1219 	OP_LAYOUTCOMMIT = 49,
   1220 	OP_LAYOUTGET = 50,
   1221 	OP_LAYOUTRETURN = 51,
   1222 	OP_SECINFO_NO_NAME = 52,
   1223 	OP_SEQUENCE = 53,
   1224 	OP_SET_SSV = 54,
   1225 	OP_TEST_STATEID = 55,
   1226 	OP_WANT_DELEGATION = 56,
   1227 	OP_DESTROY_CLIENTID = 57,
   1228 	OP_RECLAIM_COMPLETE = 58,
   1229 	OP_ILLEGAL = 10044,
   1230 /*
   1231  * These are internal client pseudo ops that *MUST* never go over the wire
   1232  */
   1233 #define	SUNW_PRIVATE_OP	0x10000000
   1234 #define	REAL_OP4(op)	((op) & ~SUNW_PRIVATE_OP)
   1235 	OP_CCREATE = OP_CREATE | SUNW_PRIVATE_OP,
   1236 	OP_CLINK = OP_LINK | SUNW_PRIVATE_OP,
   1237 	OP_CLOOKUP = OP_LOOKUP | SUNW_PRIVATE_OP,
   1238 	OP_COPEN = OP_OPEN | SUNW_PRIVATE_OP,
   1239 	OP_CPUTFH = OP_PUTFH | SUNW_PRIVATE_OP,
   1240 	OP_CREMOVE = OP_REMOVE | SUNW_PRIVATE_OP,
   1241 	OP_CRENAME = OP_RENAME | SUNW_PRIVATE_OP,
   1242 	OP_CSECINFO = OP_SECINFO | SUNW_PRIVATE_OP
   1243 };
   1244 typedef enum nfs_opnum4 nfs_opnum4;
   1245 
   1246 struct nfs_argop4 {
   1247 	nfs_opnum4 argop;
   1248 	union {
   1249 		ACCESS4args opaccess;
   1250 		CLOSE4args opclose;
   1251 		COMMIT4args opcommit;
   1252 		CREATE4args opcreate;
   1253 		CREATE4cargs opccreate;			/* XXX - DR added */
   1254 		DELEGPURGE4args opdelegpurge;
   1255 		DELEGRETURN4args opdelegreturn;
   1256 		GETATTR4args opgetattr;
   1257 		LINK4args oplink;
   1258 		LINK4cargs opclink;			/* XXX - DR added */
   1259 		LOCK4args oplock;
   1260 		LOCKT4args oplockt;
   1261 		LOCKU4args oplocku;
   1262 		LOOKUP4args oplookup;
   1263 		LOOKUP4cargs opclookup;			/* XXX - DR added */
   1264 		NVERIFY4args opnverify;
   1265 		OPEN4args opopen;
   1266 		OPEN4cargs opcopen;			/* XXX - DR added */
   1267 		OPENATTR4args opopenattr;
   1268 		OPEN_CONFIRM4args opopen_confirm;
   1269 		OPEN_DOWNGRADE4args opopen_downgrade;
   1270 		PUTFH4args opputfh;
   1271 		PUTFH4cargs opcputfh;			/* XXX - DR added */
   1272 		READ4args opread;
   1273 		READDIR4args opreaddir;
   1274 		REMOVE4args opremove;
   1275 		REMOVE4cargs opcremove;			/* XXX - DR added */
   1276 		RENAME4args oprename;
   1277 		RENAME4cargs opcrename;			/* XXX - DR added */
   1278 		RENEW4args oprenew;
   1279 		SECINFO4args opsecinfo;
   1280 		SECINFO4cargs opcsecinfo;		/* XXX - DR added */
   1281 		SETATTR4args opsetattr;
   1282 		SETCLIENTID4args opsetclientid;
   1283 		SETCLIENTID_CONFIRM4args opsetclientid_confirm;
   1284 		VERIFY4args opverify;
   1285 		WRITE4args opwrite;
   1286 		RELEASE_LOCKOWNER4args oprelease_lockowner;
   1287 		BACKCHANNEL_CTL4args opbackchannel_ctl;
   1288 		BIND_CONN_TO_SESSION4args opbind_conn_to_session;
   1289 		EXCHANGE_ID4args opexchange_id;
   1290 		CREATE_SESSION4args opcreate_session;
   1291 		DESTROY_SESSION4args opdestroy_session;
   1292 		FREE_STATEID4args opfree_stateid;
   1293 		GET_DIR_DELEGATION4args opget_dir_delegation;
   1294 		GETDEVICEINFO4args opgetdeviceinfo;
   1295 		GETDEVICELIST4args opgetdevicelist;
   1296 		LAYOUTCOMMIT4args oplayoutcommit;
   1297 		LAYOUTGET4args oplayoutget;
   1298 		LAYOUTRETURN4args oplayoutreturn;
   1299 		SECINFO_NO_NAME4args opsecinfo_no_name;
   1300 		SEQUENCE4args opsequence;
   1301 		SET_SSV4args opset_ssv;
   1302 		TEST_STATEID4args optest_stateid;
   1303 		WANT_DELEGATION4args opwant_delegation;
   1304 		DESTROY_CLIENTID4args opdestroy_clientid;
   1305 		RECLAIM_COMPLETE4args opreclaim_complete;
   1306 	} nfs_argop4_u;
   1307 };
   1308 typedef struct nfs_argop4 nfs_argop4;
   1309 
   1310 struct nfs_resop4 {
   1311 	nfs_opnum4 resop;
   1312 	union {
   1313 		ACCESS4res opaccess;
   1314 		CLOSE4res opclose;
   1315 		COMMIT4res opcommit;
   1316 		CREATE4res opcreate;
   1317 		DELEGPURGE4res opdelegpurge;
   1318 		DELEGRETURN4res opdelegreturn;
   1319 		GETATTR4res opgetattr;
   1320 		GETFH4res opgetfh;
   1321 		LINK4res oplink;
   1322 		LOCK4res oplock;
   1323 		LOCKT4res oplockt;
   1324 		LOCKU4res oplocku;
   1325 		LOOKUP4res oplookup;
   1326 		LOOKUPP4res oplookupp;
   1327 		NVERIFY4res opnverify;
   1328 		OPEN4res opopen;
   1329 		OPENATTR4res opopenattr;
   1330 		OPEN_CONFIRM4res opopen_confirm;
   1331 		OPEN_DOWNGRADE4res opopen_downgrade;
   1332 		PUTFH4res opputfh;
   1333 		PUTPUBFH4res opputpubfh;
   1334 		PUTROOTFH4res opputrootfh;
   1335 		READ4res opread;
   1336 		READDIR4res opreaddir;
   1337 		READDIR4res_clnt opreaddirclnt;		/* XXX - DR added */
   1338 		READLINK4res opreadlink;
   1339 		REMOVE4res opremove;
   1340 		RENAME4res oprename;
   1341 		RENEW4res oprenew;
   1342 		RESTOREFH4res oprestorefh;
   1343 		SAVEFH4res opsavefh;
   1344 		SECINFO4res opsecinfo;
   1345 		SETATTR4res opsetattr;
   1346 		SETCLIENTID4res opsetclientid;
   1347 		SETCLIENTID_CONFIRM4res opsetclientid_confirm;
   1348 		VERIFY4res opverify;
   1349 		WRITE4res opwrite;
   1350 		RELEASE_LOCKOWNER4res oprelease_lockowner;
   1351 		BACKCHANNEL_CTL4res opbackchannel_ctl;
   1352 		BIND_CONN_TO_SESSION4res opbind_conn_to_session;
   1353 		EXCHANGE_ID4res opexchange_id;
   1354 		CREATE_SESSION4res opcreate_session;
   1355 		DESTROY_SESSION4res opdestroy_session;
   1356 		FREE_STATEID4res opfree_stateid;
   1357 		GET_DIR_DELEGATION4res opget_dir_delegation;
   1358 		GETDEVICEINFO4res opgetdeviceinfo;
   1359 		GETDEVICELIST4res opgetdevicelist;
   1360 		LAYOUTCOMMIT4res oplayoutcommit;
   1361 		LAYOUTGET4res oplayoutget;
   1362 		LAYOUTRETURN4res oplayoutreturn;
   1363 		SECINFO_NO_NAME4res opsecinfo_no_name;
   1364 		SEQUENCE4res opsequence;
   1365 		SET_SSV4res opset_ssv;
   1366 		TEST_STATEID4res optest_stateid;
   1367 		WANT_DELEGATION4res opwant_delegation;
   1368 		DESTROY_CLIENTID4res op_destroy_clientid;
   1369 		RECLAIM_COMPLETE4res opreclaim_complete;
   1370 		ILLEGAL4res opillegal;
   1371 	} nfs_resop4_u;
   1372 };
   1373 typedef struct nfs_resop4 nfs_resop4;
   1374 
   1375 /*
   1376  * handy shortcuts to long-winded fields
   1377  */
   1378 #define	ssv_args	eia_state_protect.state_protect4_a_u.spa_ssv_parms
   1379 #define	a_bc2s		nfs_argop4_u.opbind_conn_to_session
   1380 #define	r_bc2s		nfs_resop4_u.opbind_conn_to_session
   1381 #define	rok_bc2s	BIND_CONN_TO_SESSION4res_u.bctsr_resok4
   1382 #define	csa_rcall_llen	csa_referring_call_lists.csa_referring_call_lists_len
   1383 #define	csa_rcall_lval	csa_referring_call_lists.csa_referring_call_lists_val
   1384 #define	rcl_len		rcl_referring_calls.rcl_referring_calls_len
   1385 #define	rcl_val		rcl_referring_calls.rcl_referring_calls_val
   1386 #define	lorr_stid_u	LAYOUTRETURN4res_u.lorr_stateid.layoutreturn_stateid_u
   1387 
   1388 #define	SET_RESOP4(r, v)	\
   1389 	*((nfsstat4 *)&((nfs_resop4 *)(r))->nfs_resop4_u) = v
   1390 
   1391 struct COMPOUND4args_srv {
   1392 	utf8string	tag;
   1393 	uint32_t	minorversion;
   1394 	uint_t		array_len;
   1395 	nfs_argop4	*array;
   1396 	SEQUENCE4args	*sargs;		/* server internal only */
   1397 	void		*slp;
   1398 };
   1399 typedef struct COMPOUND4args_srv COMPOUND4args_srv;
   1400 
   1401 enum layoutrecall_type4 {
   1402 	LAYOUTRECALL4_FILE = LAYOUT4_RET_REC_FILE,
   1403 	LAYOUTRECALL4_FSID = LAYOUT4_RET_REC_FSID,
   1404 	LAYOUTRECALL4_ALL = LAYOUT4_RET_REC_ALL
   1405 };
   1406 typedef enum layoutrecall_type4 layoutrecall_type4;
   1407 
   1408 struct layoutrecall_file4 {
   1409 	nfs_fh4 lor_fh;
   1410 	offset4 lor_offset;
   1411 	length4 lor_length;
   1412 	stateid4 lor_stateid;
   1413 };
   1414 typedef struct layoutrecall_file4 layoutrecall_file4;
   1415 
   1416 struct layoutrecall4 {
   1417 	layoutrecall_type4 lor_recalltype;
   1418 	union {
   1419 		layoutrecall_file4 lor_layout;
   1420 		fsid4 lor_fsid;
   1421 	} layoutrecall4_u;
   1422 };
   1423 typedef struct layoutrecall4 layoutrecall4;
   1424 
   1425 struct CB_LAYOUTRECALL4args {
   1426 	layouttype4 clora_type;
   1427 	layoutiomode4 clora_iomode;
   1428 	bool_t clora_changed;
   1429 	layoutrecall4 clora_recall;
   1430 };
   1431 typedef struct CB_LAYOUTRECALL4args CB_LAYOUTRECALL4args;
   1432 
   1433 struct CB_LAYOUTRECALL4res {
   1434 	nfsstat4 clorr_status;
   1435 };
   1436 typedef struct CB_LAYOUTRECALL4res CB_LAYOUTRECALL4res;
   1437 
   1438 enum notify_type4 {
   1439 	NOTIFY4_CHANGE_CHILD_ATTRS = 0,
   1440 	NOTIFY4_CHANGE_DIR_ATTRS = 1,
   1441 	NOTIFY4_REMOVE_ENTRY = 2,
   1442 	NOTIFY4_ADD_ENTRY = 3,
   1443 	NOTIFY4_RENAME_ENTRY = 4,
   1444 	NOTIFY4_CHANGE_COOKIE_VERIFIER = 5
   1445 };
   1446 typedef enum notify_type4 notify_type4;
   1447 
   1448 struct notify_entry4 {
   1449 	component4 ne_file;
   1450 	fattr4 ne_attrs;
   1451 };
   1452 typedef struct notify_entry4 notify_entry4;
   1453 
   1454 struct prev_entry4 {
   1455 	notify_entry4 pe_prev_entry;
   1456 	nfs_cookie4 pe_prev_entry_cookie;
   1457 };
   1458 typedef struct prev_entry4 prev_entry4;
   1459 
   1460 struct notify_remove4 {
   1461 	notify_entry4 nrm_old_entry;
   1462 	nfs_cookie4 nrm_old_entry_cookie;
   1463 };
   1464 typedef struct notify_remove4 notify_remove4;
   1465 
   1466 struct notify_add4 {
   1467 	struct {
   1468 		uint_t nad_old_entry_len;
   1469 		notify_remove4 *nad_old_entry_val;
   1470 	} nad_old_entry;
   1471 	notify_entry4 nad_new_entry;
   1472 	struct {
   1473 		uint_t nad_new_entry_cookie_len;
   1474 		nfs_cookie4 *nad_new_entry_cookie_val;
   1475 	} nad_new_entry_cookie;
   1476 	struct {
   1477 		uint_t nad_prev_entry_len;
   1478 		prev_entry4 *nad_prev_entry_val;
   1479 	} nad_prev_entry;
   1480 	bool_t nad_last_entry;
   1481 };
   1482 typedef struct notify_add4 notify_add4;
   1483 
   1484 struct notify_attr4 {
   1485 	notify_entry4 na_changed_entry;
   1486 };
   1487 typedef struct notify_attr4 notify_attr4;
   1488 
   1489 struct notify_rename4 {
   1490 	notify_remove4 nrn_old_entry;
   1491 	notify_add4 nrn_new_entry;
   1492 };
   1493 typedef struct notify_rename4 notify_rename4;
   1494 
   1495 struct notify_verifier4 {
   1496 	verifier4 nv_old_cookieverf;
   1497 	verifier4 nv_new_cookieverf;
   1498 };
   1499 typedef struct notify_verifier4 notify_verifier4;
   1500 
   1501 /*
   1502  * Objects of type notify_<>4 and
   1503  * notify_device_<>4 are encoded in this.
   1504  */
   1505 typedef struct {
   1506 	uint_t notifylist4_len;
   1507 	char *notifylist4_val;
   1508 } notifylist4;
   1509 
   1510 struct notify4 {
   1511 	/* composed from notify_type4 */
   1512 	bitmap4 notify_mask;
   1513 	notifylist4 notify_vals;
   1514 };
   1515 typedef struct notify4 notify4;
   1516 
   1517 struct CB_NOTIFY4args {
   1518 	stateid4 cna_stateid;
   1519 	nfs_fh4 cna_fh;
   1520 	struct {
   1521 		uint_t cna_changes_len;
   1522 		notify4 *cna_changes_val;
   1523 	} cna_changes;
   1524 };
   1525 typedef struct CB_NOTIFY4args CB_NOTIFY4args;
   1526 
   1527 struct CB_NOTIFY4res {
   1528 	nfsstat4 cnr_status;
   1529 };
   1530 typedef struct CB_NOTIFY4res CB_NOTIFY4res;
   1531 
   1532 struct CB_PUSH_DELEG4args {
   1533 	nfs_fh4 cpda_fh;
   1534 	open_delegation4 cpda_delegation;
   1535 };
   1536 typedef struct CB_PUSH_DELEG4args CB_PUSH_DELEG4args;
   1537 
   1538 struct CB_PUSH_DELEG4res {
   1539 	nfsstat4 cpdr_status;
   1540 };
   1541 typedef struct CB_PUSH_DELEG4res CB_PUSH_DELEG4res;
   1542 #define	RCA4_TYPE_MASK_RDATA_DLG 0
   1543 #define	RCA4_TYPE_MASK_WDATA_DLG 1
   1544 #define	RCA4_TYPE_MASK_DIR_DLG 2
   1545 #define	RCA4_TYPE_MASK_FILE_LAYOUT 3
   1546 #define	RCA4_TYPE_MASK_BLK_LAYOUT 4
   1547 #define	RCA4_TYPE_MASK_OBJ_LAYOUT_MIN 8
   1548 #define	RCA4_TYPE_MASK_OBJ_LAYOUT_MAX 9
   1549 #define	RCA4_TYPE_MASK_OTHER_LAYOUT_MIN 12
   1550 #define	RCA4_TYPE_MASK_OTHER_LAYOUT_MAX 15
   1551 
   1552 struct CB_RECALL_ANY4args {
   1553 	uint32_t craa_objects_to_keep;
   1554 	bitmap4 craa_type_mask;
   1555 };
   1556 typedef struct CB_RECALL_ANY4args CB_RECALL_ANY4args;
   1557 
   1558 struct CB_RECALL_ANY4res {
   1559 	nfsstat4 crar_status;
   1560 };
   1561 typedef struct CB_RECALL_ANY4res CB_RECALL_ANY4res;
   1562 
   1563 typedef CB_RECALL_ANY4args CB_RECALLABLE_OBJ_AVAIL4args;
   1564 
   1565 struct CB_RECALLABLE_OBJ_AVAIL4res {
   1566 	nfsstat4 croa_status;
   1567 };
   1568 typedef struct CB_RECALLABLE_OBJ_AVAIL4res CB_RECALLABLE_OBJ_AVAIL4res;
   1569 
   1570 struct CB_RECALL_SLOT4args {
   1571 	slotid4 rsa_target_highest_slotid;
   1572 };
   1573 typedef struct CB_RECALL_SLOT4args CB_RECALL_SLOT4args;
   1574 
   1575 struct CB_RECALL_SLOT4res {
   1576 	nfsstat4 rsr_status;
   1577 };
   1578 typedef struct CB_RECALL_SLOT4res CB_RECALL_SLOT4res;
   1579 
   1580 struct referring_call4 {
   1581 	sequenceid4 rc_sequenceid;
   1582 	slotid4 rc_slotid;
   1583 };
   1584 typedef struct referring_call4 referring_call4;
   1585 
   1586 struct referring_call_list4 {
   1587 	sessionid4 rcl_sessionid;
   1588 	struct {
   1589 		uint_t rcl_referring_calls_len;
   1590 		referring_call4 *rcl_referring_calls_val;
   1591 	} rcl_referring_calls;
   1592 };
   1593 typedef struct referring_call_list4 referring_call_list4;
   1594 
   1595 struct CB_SEQUENCE4args {
   1596 	sessionid4 csa_sessionid;
   1597 	sequenceid4 csa_sequenceid;
   1598 	slotid4 csa_slotid;
   1599 	slotid4 csa_highest_slotid;
   1600 	bool_t csa_cachethis;
   1601 	struct {
   1602 		uint_t csa_referring_call_lists_len;
   1603 		referring_call_list4 *csa_referring_call_lists_val;
   1604 	} csa_referring_call_lists;
   1605 };
   1606 typedef struct CB_SEQUENCE4args CB_SEQUENCE4args;
   1607 
   1608 struct CB_SEQUENCE4resok {
   1609 	sessionid4 csr_sessionid;
   1610 	sequenceid4 csr_sequenceid;
   1611 	slotid4 csr_slotid;
   1612 	slotid4 csr_highest_slotid;
   1613 	slotid4 csr_target_highest_slotid;
   1614 };
   1615 typedef struct CB_SEQUENCE4resok CB_SEQUENCE4resok;
   1616 
   1617 struct CB_SEQUENCE4res {
   1618 	nfsstat4 csr_status;
   1619 	union {
   1620 		CB_SEQUENCE4resok csr_resok4;
   1621 	} CB_SEQUENCE4res_u;
   1622 };
   1623 typedef struct CB_SEQUENCE4res CB_SEQUENCE4res;
   1624 
   1625 struct CB_WANTS_CANCELLED4args {
   1626 	bool_t cwca_contended_wants_cancelled;
   1627 	bool_t cwca_resourced_wants_cancelled;
   1628 };
   1629 typedef struct CB_WANTS_CANCELLED4args CB_WANTS_CANCELLED4args;
   1630 
   1631 struct CB_WANTS_CANCELLED4res {
   1632 	nfsstat4 cwcr_status;
   1633 };
   1634 typedef struct CB_WANTS_CANCELLED4res CB_WANTS_CANCELLED4res;
   1635 
   1636 struct CB_NOTIFY_LOCK4args {
   1637 	nfs_fh4 cnla_fh;
   1638 	lock_owner4 cnla_lock_owner;
   1639 };
   1640 typedef struct CB_NOTIFY_LOCK4args CB_NOTIFY_LOCK4args;
   1641 
   1642 struct CB_NOTIFY_LOCK4res {
   1643 	nfsstat4 cnlr_status;
   1644 };
   1645 typedef struct CB_NOTIFY_LOCK4res CB_NOTIFY_LOCK4res;
   1646 
   1647 enum notify_deviceid_type4 {
   1648 	NOTIFY_DEVICEID4_CHANGE = 1,
   1649 	NOTIFY_DEVICEID4_DELETE = 2
   1650 };
   1651 typedef enum notify_deviceid_type4 notify_deviceid_type4;
   1652 
   1653 /*
   1654  * Handy masks for the bitmap4 used for device notification.
   1655  * Note that bit possition 0 is unused.
   1656  */
   1657 #define	NOTIFY_DEVICEID4_CHANGE_MASK (1uLL << ((NOTIFY_DEVICEID4_CHANGE)+32))
   1658 #define	NOTIFY_DEVICEID4_DELETE_MASK (1uLL << ((NOTIFY_DEVICEID4_DELETE)+32))
   1659 
   1660 struct notify_deviceid_delete4 {
   1661 	layouttype4 ndd_layouttype;
   1662 	deviceid4 ndd_deviceid;
   1663 };
   1664 typedef struct notify_deviceid_delete4 notify_deviceid_delete4;
   1665 
   1666 struct notify_deviceid_change4 {
   1667 	layouttype4 ndc_layouttype;
   1668 	deviceid4 ndc_deviceid;
   1669 	bool_t ndc_immediate;
   1670 };
   1671 typedef struct notify_deviceid_change4 notify_deviceid_change4;
   1672 
   1673 struct CB_NOTIFY_DEVICEID4args {
   1674 	struct {
   1675 		uint_t cnda_changes_len;
   1676 		notify4 *cnda_changes_val;
   1677 	} cnda_changes;
   1678 };
   1679 typedef struct CB_NOTIFY_DEVICEID4args CB_NOTIFY_DEVICEID4args;
   1680 
   1681 struct CB_NOTIFY_DEVICEID4res {
   1682 	nfsstat4 cndr_status;
   1683 };
   1684 typedef struct CB_NOTIFY_DEVICEID4res CB_NOTIFY_DEVICEID4res;
   1685 
   1686 enum nfs_cb_opnum4 {
   1687 	OP_CB_GETATTR = 3,
   1688 	OP_CB_RECALL = 4,
   1689 	OP_CB_LAYOUTRECALL = 5,
   1690 	OP_CB_NOTIFY = 6,
   1691 	OP_CB_PUSH_DELEG = 7,
   1692 	OP_CB_RECALL_ANY = 8,
   1693 	OP_CB_RECALLABLE_OBJ_AVAIL = 9,
   1694 	OP_CB_RECALL_SLOT = 10,
   1695 	OP_CB_SEQUENCE = 11,
   1696 	OP_CB_WANTS_CANCELLED = 12,
   1697 	OP_CB_NOTIFY_LOCK = 13,
   1698 	OP_CB_NOTIFY_DEVICEID = 14,
   1699 	OP_CB_ILLEGAL = 10044
   1700 };
   1701 typedef enum nfs_cb_opnum4 nfs_cb_opnum4;
   1702 
   1703 struct nfs_cb_argop4 {
   1704 	uint_t argop;
   1705 	union {
   1706 		CB_GETATTR4args opcbgetattr;
   1707 		CB_RECALL4args opcbrecall;
   1708 		CB_LAYOUTRECALL4args opcblayoutrecall;
   1709 		CB_NOTIFY4args opcbnotify;
   1710 		CB_PUSH_DELEG4args opcbpush_deleg;
   1711 		CB_RECALL_ANY4args opcbrecall_any;
   1712 		CB_RECALLABLE_OBJ_AVAIL4args opcbrecallable_obj_avail;
   1713 		CB_RECALL_SLOT4args opcbrecall_slot;
   1714 		CB_SEQUENCE4args opcbsequence;
   1715 		CB_WANTS_CANCELLED4args opcbwants_cancelled;
   1716 		CB_NOTIFY_LOCK4args opcbnotify_lock;
   1717 		CB_NOTIFY_DEVICEID4args opcbnotify_deviceid;
   1718 	} nfs_cb_argop4_u;
   1719 };
   1720 typedef struct nfs_cb_argop4 nfs_cb_argop4;
   1721 
   1722 struct nfs_cb_resop4 {
   1723 	uint_t resop;
   1724 	union {
   1725 		CB_GETATTR4res opcbgetattr;
   1726 		CB_RECALL4res opcbrecall;
   1727 		CB_LAYOUTRECALL4res opcblayoutrecall;
   1728 		CB_NOTIFY4res opcbnotify;
   1729 		CB_PUSH_DELEG4res opcbpush_deleg;
   1730 		CB_RECALL_ANY4res opcbrecall_any;
   1731 		CB_RECALLABLE_OBJ_AVAIL4res opcbrecallable_obj_avail;
   1732 		CB_RECALL_SLOT4res opcbrecall_slot;
   1733 		CB_SEQUENCE4res opcbsequence;
   1734 		CB_WANTS_CANCELLED4res opcbwants_cancelled;
   1735 		CB_NOTIFY_LOCK4res opcbnotify_lock;
   1736 		CB_NOTIFY_DEVICEID4res opcbnotify_deviceid;
   1737 		CB_ILLEGAL4res opcbillegal;
   1738 	} nfs_cb_resop4_u;
   1739 };
   1740 typedef struct nfs_cb_resop4 nfs_cb_resop4;
   1741 
   1742 /* the xdr functions */
   1743 extern  bool_t xdr_encode_nfs41_fh(XDR *, nfs_fh4 *);
   1744 extern  bool_t xdr_nfs_fh41_modified(XDR *, nfs_fh4 *);
   1745 extern	bool_t xdr_nfs_ftype4(XDR *, nfs_ftype4 *);
   1746 extern	bool_t xdr_nfsstat4(XDR *, nfsstat4 *);
   1747 extern	bool_t xdr_bitmap4(XDR *, bitmap4 *);
   1748 extern	bool_t xdr_offset4(XDR *, offset4 *);
   1749 extern	bool_t xdr_count4(XDR *, count4 *);
   1750 extern	bool_t xdr_length4(XDR *, length4 *);
   1751 extern	bool_t xdr_clientid4(XDR *, clientid4 *);
   1752 extern	bool_t xdr_seqid4(XDR *, seqid4 *);
   1753 extern	bool_t xdr_utf8string(XDR *, utf8string *);
   1754 extern	bool_t xdr_utf8str_cis(XDR *, utf8str_cis *);
   1755 extern	bool_t xdr_utf8str_cs(XDR *, utf8str_cs *);
   1756 extern	bool_t xdr_utf8str_mixed(XDR *, utf8str_mixed *);
   1757 extern	bool_t xdr_component4(XDR *, component4 *);
   1758 extern	bool_t xdr_pathname4(XDR *, pathname4 *);
   1759 extern	bool_t xdr_nfs_lockid4(XDR *, nfs_lockid4 *);
   1760 extern	bool_t xdr_nfs_cookie4(XDR *, nfs_cookie4 *);
   1761 extern	bool_t xdr_linktext4(XDR *, linktext4 *);
   1762 extern	bool_t xdr_sec_oid4(XDR *, sec_oid4 *);
   1763 extern	bool_t xdr_qop4(XDR *, qop4 *);
   1764 extern	bool_t xdr_mode4(XDR *, mode4 *);
   1765 extern	bool_t xdr_changeid4(XDR *, changeid4 *);
   1766 extern	bool_t xdr_sequenceid4(XDR *, sequenceid4 *);
   1767 extern	bool_t xdr_slotid4(XDR *, slotid4 *);
   1768 extern	bool_t xdr_verifier4(XDR *, verifier4 *);
   1769 extern	bool_t xdr_sessionid4(XDR *, sessionid4);
   1770 extern	bool_t xdr_nfstime4(XDR *, nfstime4 *);
   1771 extern	bool_t xdr_time_how4(XDR *, time_how4 *);
   1772 extern	bool_t xdr_settime4(XDR *, settime4 *);
   1773 extern	bool_t xdr_nfs_fh4(XDR *, nfs_fh4 *);
   1774 extern	bool_t xdr_fsid4(XDR *, fsid4 *);
   1775 extern	bool_t xdr_fs_locations4(XDR *, fs_locations4 *);
   1776 extern	bool_t xdr_acetype4(XDR *, acetype4 *);
   1777 extern	bool_t xdr_aceflag4(XDR *, aceflag4 *);
   1778 extern	bool_t xdr_acemask4(XDR *, acemask4 *);
   1779 extern	bool_t xdr_aclflag4(XDR *, aclflag4 *);
   1780 extern	bool_t xdr_nfsace4(XDR *, nfsace4 *);
   1781 extern	bool_t xdr_nfsacl41(XDR *, nfsacl41*);
   1782 extern	bool_t xdr_mode_masked4(XDR *, mode_masked4 *);
   1783 extern	bool_t xdr_specdata4(XDR *, specdata4 *);
   1784 extern	bool_t xdr_netaddr4(XDR *, netaddr4 *);
   1785 extern	bool_t xdr_nfs_impl_id4(XDR *, nfs_impl_id4 *);
   1786 extern	bool_t xdr_layouttype4(XDR *, layouttype4 *);
   1787 extern	bool_t xdr_layout_content4(XDR *, layout_content4 *);
   1788 extern	bool_t xdr_layouthint4(XDR *, layouthint4 *);
   1789 extern	bool_t xdr_layoutiomode4(XDR *, layoutiomode4 *);
   1790 extern	bool_t xdr_layout4(XDR *, layout4 *);
   1791 extern	bool_t xdr_deviceid4(XDR *, deviceid4);
   1792 extern	bool_t xdr_device_addr4(XDR *, device_addr4 *);
   1793 extern	bool_t xdr_layoutupdate4(XDR *, layoutupdate4 *);
   1794 extern	bool_t xdr_layoutreturn_type4(XDR *, layoutreturn_type4 *);
   1795 extern	bool_t xdr_layoutreturn_file4(XDR *, layoutreturn_file4 *);
   1796 extern	bool_t xdr_layoutreturn4(XDR *, layoutreturn4 *);
   1797 extern	bool_t xdr_fs4_status_type(XDR *, fs4_status_type *);
   1798 extern	bool_t xdr_fs4_status(XDR *, fs4_status *);
   1799 extern	bool_t xdr_threshold4_read_size(XDR *, threshold4_read_size *);
   1800 extern	bool_t xdr_threshold4_write_size(XDR *, threshold4_write_size *);
   1801 extern	bool_t xdr_threshold4_read_iosize(XDR *, threshold4_read_iosize *);
   1802 extern	bool_t xdr_threshold4_write_iosize(XDR *, threshold4_write_iosize *);
   1803 extern	bool_t xdr_threshold_item4(XDR *, threshold_item4 *);
   1804 extern	bool_t xdr_mdsthreshold4(XDR *, mdsthreshold4 *);
   1805 
   1806 struct layouttypes4 {
   1807 	unsigned	lot_nfsv4_1_files	: 1;
   1808 	unsigned	lot_osd2_objects	: 1;
   1809 	unsigned	lot_block_volume	: 1;
   1810 	unsigned				: 29;
   1811 };
   1812 typedef struct layouttypes4 layouttypes4_t;
   1813 
   1814 struct file_mdsthreshold4 {
   1815 	uint32_t	fth_bitmap;
   1816 	length4		fth_rdsize;
   1817 	length4		fth_wrsize;
   1818 	length4		fth_rdiosize;
   1819 	length4		fth_wriosize;
   1820 };
   1821 typedef struct file_mdsthreshold4 file_mdsthreshold4;
   1822 
   1823 /*
   1824  * File is the only layout supported in Solaris, so a file-oriented
   1825  * layouthint struct is created to simplify encode/decode and avoid
   1826  * kmem_alloc/free.
   1827  */
   1828 struct file_layouthint4 {
   1829 	unsigned	floh_valid : 1;
   1830 	uint32_t	floh_care;
   1831 	nfl_util4	floh_util;
   1832 	count4		floh_stripe_count;
   1833 };
   1834 typedef struct file_layouthint4 file_layouthint4;
   1835 
   1836 
   1837 extern	void xdr_get_layouttypes4_inline(uint32_t **, layouttypes4_t *);
   1838 extern	bool_t xdr_layouttypes4(XDR *, layouttypes4_t *);
   1839 extern	bool_t xdr_file_mdsthreshold4(XDR *, file_mdsthreshold4 *);
   1840 extern	void xdr_get_file_mdsthreshold4_inline(uint32_t **,
   1841     file_mdsthreshold4 *);
   1842 extern	bool_t xdr_retention_get4(XDR *, retention_get4 *);
   1843 extern	bool_t xdr_retention_set4(XDR *, retention_set4 *);
   1844 extern  bool_t xdr_fs_charset_cap4(XDR *, fs_charset_cap4*);
   1845 extern	bool_t xdr_fattr4(XDR *, fattr4 *);
   1846 extern	bool_t xdr_fattr4_supported_attrs(XDR *, fattr4_supported_attrs *);
   1847 extern  bool_t xdr_fattr4_suppattr_exclcreat(XDR *, fattr4_suppattr_exclcreat*);
   1848 extern	bool_t xdr_fattr4_type(XDR *, fattr4_type *);
   1849 extern	bool_t xdr_fattr4_fh_expire_type(XDR *, fattr4_fh_expire_type *);
   1850 extern	bool_t xdr_fattr4_change(XDR *, fattr4_change *);
   1851 extern	bool_t xdr_fattr4_size(XDR *, fattr4_size *);
   1852 extern	bool_t xdr_fattr4_link_support(XDR *, fattr4_link_support *);
   1853 extern	bool_t xdr_fattr4_symlink_support(XDR *, fattr4_symlink_support *);
   1854 extern	bool_t xdr_fattr4_named_attr(XDR *, fattr4_named_attr *);
   1855 extern	bool_t xdr_fattr4_fsid(XDR *, fattr4_fsid *);
   1856 extern	bool_t xdr_fattr4_unique_handles(XDR *, fattr4_unique_handles *);
   1857 extern	bool_t xdr_fattr4_lease_time(XDR *, fattr4_lease_time *);
   1858 extern	bool_t xdr_fattr4_rdattr_error(XDR *, fattr4_rdattr_error *);
   1859 extern	bool_t xdr_fattr4_acl(XDR *, fattr4_acl *);
   1860 extern	bool_t xdr_fattr4_aclsupport(XDR *, fattr4_aclsupport *);
   1861 extern	bool_t xdr_fattr4_archive(XDR *, fattr4_archive *);
   1862 extern	bool_t xdr_fattr4_cansettime(XDR *, fattr4_cansettime *);
   1863 extern	bool_t xdr_fattr4_case_insensitive(XDR *, fattr4_case_insensitive *);
   1864 extern	bool_t xdr_fattr4_case_preserving(XDR *, fattr4_case_preserving *);
   1865 extern	bool_t xdr_fattr4_chown_restricted(XDR *, fattr4_chown_restricted *);
   1866 extern	bool_t xdr_fattr4_fileid(XDR *, fattr4_fileid *);
   1867 extern	bool_t xdr_fattr4_files_avail(XDR *, fattr4_files_avail *);
   1868 extern	bool_t xdr_fattr4_filehandle(XDR *, fattr4_filehandle *);
   1869 extern	bool_t xdr_fattr4_files_free(XDR *, fattr4_files_free *);
   1870 extern	bool_t xdr_fattr4_files_total(XDR *, fattr4_files_total *);
   1871 extern	bool_t xdr_fattr4_fs_locations(XDR *, fattr4_fs_locations *);
   1872 extern	bool_t xdr_fattr4_hidden(XDR *, fattr4_hidden *);
   1873 extern	bool_t xdr_fattr4_homogeneous(XDR *, fattr4_homogeneous *);
   1874 extern	bool_t xdr_fattr4_maxfilesize(XDR *, fattr4_maxfilesize *);
   1875 extern	bool_t xdr_fattr4_maxlink(XDR *, fattr4_maxlink *);
   1876 extern	bool_t xdr_fattr4_maxname(XDR *, fattr4_maxname *);
   1877 extern	bool_t xdr_fattr4_maxread(XDR *, fattr4_maxread *);
   1878 extern	bool_t xdr_fattr4_maxwrite(XDR *, fattr4_maxwrite *);
   1879 extern	bool_t xdr_fattr4_mimetype(XDR *, fattr4_mimetype *);
   1880 extern	bool_t xdr_fattr4_mode(XDR *, fattr4_mode *);
   1881 extern	bool_t xdr_fattr4_mode_set_masked(XDR *, fattr4_mode_set_masked *);
   1882 extern	bool_t xdr_fattr4_mounted_on_fileid(XDR *, fattr4_mounted_on_fileid *);
   1883 extern	bool_t xdr_fattr4_no_trunc(XDR *, fattr4_no_trunc *);
   1884 extern	bool_t xdr_fattr4_numlinks(XDR *, fattr4_numlinks *);
   1885 extern	bool_t xdr_fattr4_owner(XDR *, fattr4_owner *);
   1886 extern	bool_t xdr_fattr4_owner_group(XDR *, fattr4_owner_group *);
   1887 extern	bool_t xdr_fattr4_quota_avail_hard(XDR *, fattr4_quota_avail_hard *);
   1888 extern	bool_t xdr_fattr4_quota_avail_soft(XDR *, fattr4_quota_avail_soft *);
   1889 extern	bool_t xdr_fattr4_quota_used(XDR *, fattr4_quota_used *);
   1890 extern	bool_t xdr_fattr4_rawdev(XDR *, fattr4_rawdev *);
   1891 extern	bool_t xdr_fattr4_space_avail(XDR *, fattr4_space_avail *);
   1892 extern	bool_t xdr_fattr4_space_free(XDR *, fattr4_space_free *);
   1893 extern	bool_t xdr_fattr4_space_total(XDR *, fattr4_space_total *);
   1894 extern	bool_t xdr_fattr4_space_used(XDR *, fattr4_space_used *);
   1895 extern	bool_t xdr_fattr4_system(XDR *, fattr4_system *);
   1896 extern	bool_t xdr_fattr4_time_access(XDR *, fattr4_time_access *);
   1897 extern	bool_t xdr_fattr4_time_access_set(XDR *, fattr4_time_access_set *);
   1898 extern	bool_t xdr_fattr4_time_backup(XDR *, fattr4_time_backup *);
   1899 extern	bool_t xdr_fattr4_time_create(XDR *, fattr4_time_create *);
   1900 extern	bool_t xdr_fattr4_time_delta(XDR *, fattr4_time_delta *);
   1901 extern	bool_t xdr_fattr4_time_metadata(XDR *, fattr4_time_metadata *);
   1902 extern	bool_t xdr_fattr4_time_modify(XDR *, fattr4_time_modify *);
   1903 extern	bool_t xdr_fattr4_time_modify_set(XDR *, fattr4_time_modify_set *);
   1904 extern	bool_t xdr_fattr4_dir_notif_delay(XDR *, fattr4_dir_notif_delay *);
   1905 extern	bool_t xdr_fattr4_dirent_notif_delay(XDR *,
   1906 		fattr4_dirent_notif_delay *);
   1907 extern	bool_t xdr_fattr4_absent(XDR *, fattr4_absent *);
   1908 extern	bool_t xdr_fattr4_fs_layout_types(XDR *, fattr4_fs_layout_types *);
   1909 extern	bool_t xdr_fattr4_fs_status(XDR *, fattr4_fs_status *);
   1910 extern	bool_t xdr_fattr4_layout_alignment(XDR *, fattr4_layout_alignment *);
   1911 extern	bool_t xdr_fattr4_layout_blksize(XDR *, fattr4_layout_blksize *);
   1912 extern	bool_t xdr_fattr4_layout_types(XDR *, fattr4_layout_types *);
   1913 extern	bool_t xdr_fattr4_recv_impl_id(XDR *, fattr4_recv_impl_id *);
   1914 extern	bool_t xdr_fattr4_send_impl_id(XDR *, fattr4_send_impl_id *);
   1915 extern	bool_t xdr_fattr4_retention_get(XDR *, fattr4_retention_get *);
   1916 extern	bool_t xdr_fattr4_retention_set(XDR *, fattr4_retention_set *);
   1917 extern	bool_t xdr_fattr4_retentevt_get(XDR *, fattr4_retentevt_get *);
   1918 extern	bool_t xdr_fattr4_retentevt_set(XDR *, fattr4_retentevt_set *);
   1919 extern	bool_t xdr_fattr4_retention_hold(XDR *, fattr4_retention_hold *);
   1920 extern	bool_t xdr_fattr4_dacl(XDR *, fattr4_dacl *);
   1921 extern	bool_t xdr_fattr4_sacl(XDR *, fattr4_sacl *);
   1922 extern	bool_t xdr_change_info4(XDR *, change_info4 *);
   1923 extern	bool_t xdr_clientaddr4(XDR *, clientaddr4 *);
   1924 extern	bool_t xdr_cb_client4(XDR *, cb_client4 *);
   1925 extern	bool_t xdr_stateid4(XDR *, stateid4 *);
   1926 extern	bool_t xdr_nfs_client_id4(XDR *, nfs_client_id4 *);
   1927 extern	bool_t xdr_client_owner4(XDR *, client_owner4 *);
   1928 extern	bool_t xdr_state_owner4(XDR *, state_owner4 *);
   1929 extern	bool_t xdr_open_owner4(XDR *, open_owner4 *);
   1930 extern	bool_t xdr_lock_owner4(XDR *, lock_owner4 *);
   1931 extern	bool_t xdr_nfs_lock_type4(XDR *, nfs_lock_type4 *);
   1932 extern  bool_t xdr_ssv_mic_plain_tkn4(XDR *, ssv_mic_plain_tkn4*);
   1933 extern  bool_t xdr_ssv_mic_tkn4(XDR *, ssv_mic_tkn4*);
   1934 extern  bool_t xdr_ssv_seal_plain_tkn4(XDR *, ssv_seal_plain_tkn4*);
   1935 extern  bool_t xdr_ssv_seal_cipher_tkn4(XDR *, ssv_seal_cipher_tkn4*);
   1936 extern	bool_t xdr_fs_locations_server4(XDR *, fs_locations_server4 *);
   1937 extern	bool_t xdr_fs_locations_item4(XDR *, fs_locations_item4 *);
   1938 extern	bool_t xdr_fs_locations_info4(XDR *, fs_locations_info4 *);
   1939 extern	bool_t xdr_fattr4_fs_locations_info(XDR *, fattr4_fs_locations_info *);
   1940 extern  bool_t xdr_nfl_util4(XDR *, nfl_util4*);
   1941 extern  bool_t xdr_filelayout_hint_care4(XDR *, filelayout_hint_care4*);
   1942 extern  bool_t xdr_nfsv4_1_file_layouthint4(XDR *, nfsv4_1_file_layouthint4*);
   1943 extern  bool_t xdr_multipath_list4(XDR *, multipath_list4*);
   1944 extern  bool_t xdr_nfsv4_1_file_layout_ds_addr4(XDR *,
   1945 	    nfsv4_1_file_layout_ds_addr4*);
   1946 extern  bool_t xdr_nfsv4_1_file_layout4(XDR *, nfsv4_1_file_layout4*);
   1947 extern  bool_t xdr_file_layout4(XDR *, nfsv4_1_file_layout4*);
   1948 extern	bool_t xdr_file_layouthint4(XDR *, file_layouthint4 *);
   1949 extern	bool_t xdr_ACCESS4args(XDR *, ACCESS4args *);
   1950 extern	bool_t xdr_COMMIT4args(XDR *, COMMIT4args *);
   1951 extern	bool_t xdr_COMMIT4res(XDR *, COMMIT4res *);
   1952 extern	bool_t xdr_DELEGPURGE4args(XDR *, DELEGPURGE4args *);
   1953 extern	bool_t xdr_DELEGPURGE4res(XDR *, DELEGPURGE4res *);
   1954 extern	bool_t xdr_DELEGRETURN4args(XDR *, DELEGRETURN4args *);
   1955 extern	bool_t xdr_DELEGRETURN4res(XDR *, DELEGRETURN4res *);
   1956 extern	bool_t xdr_GETATTR4args(XDR *, GETATTR4args *);
   1957 extern	bool_t xdr_GETATTR4res(XDR *, GETATTR4res *);
   1958 extern	bool_t xdr_GETFH4res(XDR *, GETFH4res *);
   1959 extern	bool_t xdr_LINK4args(XDR *, LINK4args *);
   1960 extern	bool_t xdr_open_to_lock_owner4(XDR *, open_to_lock_owner4 *);
   1961 extern	bool_t xdr_exist_lock_owner4(XDR *, exist_lock_owner4 *);
   1962 extern	bool_t xdr_locker4(XDR *, locker4 *);
   1963 extern	bool_t xdr_LOCK4denied(XDR *, LOCK4denied *);
   1964 extern	bool_t xdr_LOCKU4res(XDR *, LOCKU4res *);
   1965 extern	bool_t xdr_LOOKUP4args(XDR *, LOOKUP4args *);
   1966 extern	bool_t xdr_LOOKUP4res(XDR *, LOOKUP4res *);
   1967 extern	bool_t xdr_LOOKUPP4res(XDR *, LOOKUPP4res *);
   1968 extern	bool_t xdr_NVERIFY4args(XDR *, NVERIFY4args *);
   1969 extern	bool_t xdr_NVERIFY4res(XDR *, NVERIFY4res *);
   1970 extern	bool_t xdr_createmode4(XDR *, createmode4 *);
   1971 extern	bool_t xdr_opentype4(XDR *, opentype4 *);
   1972 extern	bool_t xdr_limit_by4(XDR *, limit_by4 *);
   1973 extern	bool_t xdr_nfs_modified_limit4(XDR *, nfs_modified_limit4 *);
   1974 extern	bool_t xdr_nfs_space_limit4(XDR *, nfs_space_limit4 *);
   1975 extern	bool_t xdr_open_delegation_type4(XDR *, open_delegation_type4 *);
   1976 extern	bool_t xdr_open_claim_type4(XDR *, open_claim_type4 *);
   1977 extern	bool_t xdr_open_claim_delegate_cur4(XDR *, open_claim_delegate_cur4 *);
   1978 extern	bool_t xdr_open_read_delegation4(XDR *, open_read_delegation4 *);
   1979 extern	bool_t xdr_open_write_delegation4(XDR *, open_write_delegation4 *);
   1980 extern	bool_t xdr_why_no_delegation4(XDR *, why_no_delegation4 *);
   1981 extern	bool_t xdr_open_none_delegation4(XDR *, open_none_delegation4 *);
   1982 extern	bool_t xdr_open_delegation4(XDR *, open_delegation4 *);
   1983 extern	bool_t xdr_creatverfattr(XDR *, creatverfattr*);
   1984 extern	bool_t xdr_OPENATTR4args(XDR *, OPENATTR4args *);
   1985 extern	bool_t xdr_OPENATTR4res(XDR *, OPENATTR4res *);
   1986 extern	bool_t xdr_OPEN_CONFIRM4args(XDR *, OPEN_CONFIRM4args *);
   1987 extern	bool_t xdr_PUTFH4args(XDR *, PUTFH4args *);
   1988 extern	bool_t xdr_PUTFH4res(XDR *, PUTFH4res *);
   1989 extern	bool_t xdr_PUTPUBFH4res(XDR *, PUTPUBFH4res *);
   1990 extern	bool_t xdr_PUTROOTFH4res(XDR *, PUTROOTFH4res *);
   1991 extern	bool_t xdr_READDIR4res(XDR *, READDIR4res *);
   1992 extern	bool_t xdr_REMOVE4args(XDR *, REMOVE4args *);
   1993 extern	bool_t xdr_RENAME4args(XDR *, RENAME4args *);
   1994 extern	bool_t xdr_RENEW4args(XDR *, RENEW4args *);
   1995 extern	bool_t xdr_RENEW4res(XDR *, RENEW4res *);
   1996 extern	bool_t xdr_RESTOREFH4res(XDR *, RESTOREFH4res *);
   1997 extern	bool_t xdr_SAVEFH4res(XDR *, SAVEFH4res *);
   1998 extern	bool_t xdr_SECINFO4args(XDR *, SECINFO4args *);
   1999 extern	bool_t xdr_rpc_gss_svc_t(XDR *, rpc_gss_svc_t *);
   2000 extern	bool_t xdr_rpcsec_gss_info(XDR *, rpcsec_gss_info *);
   2001 extern	bool_t xdr_SECINFO4res(XDR *, SECINFO4res *);
   2002 extern	bool_t xdr_SETATTR4args(XDR *, SETATTR4args *);
   2003 extern	bool_t xdr_SETATTR4res(XDR *, SETATTR4res *);
   2004 extern	bool_t xdr_SETCLIENTID4resok(XDR *, SETCLIENTID4resok *);
   2005 extern	bool_t xdr_SETCLIENTID_CONFIRM4args(XDR *, SETCLIENTID_CONFIRM4args *);
   2006 extern	bool_t xdr_SETCLIENTID_CONFIRM4res(XDR *, SETCLIENTID_CONFIRM4res *);
   2007 extern	bool_t xdr_VERIFY4args(XDR *, VERIFY4args *);
   2008 extern	bool_t xdr_VERIFY4res(XDR *, VERIFY4res *);
   2009 extern	bool_t xdr_stable_how4(XDR *, stable_how4 *);
   2010 extern	bool_t xdr_RELEASE_LOCKOWNER4args(XDR *, RELEASE_LOCKOWNER4args *);
   2011 extern	bool_t xdr_RELEASE_LOCKOWNER4res(XDR *, RELEASE_LOCKOWNER4res *);
   2012 extern	bool_t xdr_ILLEGAL4res(XDR *, ILLEGAL4res *);
   2013 extern	bool_t xdr_gsshandle4_t(XDR *, gsshandle4_t *);
   2014 extern	bool_t xdr_gss_cb_handles4(XDR *, gss_cb_handles4 *);
   2015 extern	bool_t xdr_callback_sec_parms4(XDR *, callback_sec_parms4 *);
   2016 extern	bool_t xdr_BACKCHANNEL_CTL4args(XDR *, BACKCHANNEL_CTL4args *);
   2017 extern	bool_t xdr_BACKCHANNEL_CTL4res(XDR *, BACKCHANNEL_CTL4res *);
   2018 extern	bool_t xdr_channel_dir_from_client4(XDR *, channel_dir_from_client4 *);
   2019 extern	bool_t xdr_BIND_CONN_TO_SESSION4args(XDR *,
   2020 		BIND_CONN_TO_SESSION4args *);
   2021 extern	bool_t xdr_channel_dir_from_server4(XDR *, channel_dir_from_server4 *);
   2022 extern	bool_t xdr_BIND_CONN_TO_SESSION4resok(XDR *,
   2023 		BIND_CONN_TO_SESSION4resok *);
   2024 extern	bool_t xdr_BIND_CONN_TO_SESSION4res(XDR *, BIND_CONN_TO_SESSION4res *);
   2025 extern	bool_t xdr_EXCHANGE_ID4args(XDR *, EXCHANGE_ID4args *);
   2026 extern	bool_t xdr_server_owner4(XDR *, server_owner4 *);
   2027 extern	bool_t xdr_EXCHANGE_ID4resok(XDR *, EXCHANGE_ID4resok *);
   2028 extern	bool_t xdr_EXCHANGE_ID4res(XDR *, EXCHANGE_ID4res *);
   2029 extern	bool_t xdr_channel_attrs4(XDR *, channel_attrs4 *);
   2030 extern	bool_t xdr_CREATE_SESSION4args(XDR *, CREATE_SESSION4args *);
   2031 extern	bool_t xdr_CREATE_SESSION4resok(XDR *, CREATE_SESSION4resok *);
   2032 extern	bool_t xdr_CREATE_SESSION4res(XDR *, CREATE_SESSION4res *);
   2033 extern	bool_t xdr_DESTROY_SESSION4args(XDR *, DESTROY_SESSION4args *);
   2034 extern	bool_t xdr_DESTROY_SESSION4res(XDR *, DESTROY_SESSION4res *);
   2035 extern	bool_t xdr_FREE_STATEID4args(XDR *, FREE_STATEID4args *);
   2036 extern	bool_t xdr_FREE_STATEID4res(XDR *, FREE_STATEID4res *);
   2037 extern	bool_t xdr_attr_notice4(XDR *, attr_notice4 *);
   2038 extern	bool_t xdr_GET_DIR_DELEGATION4args(XDR *, GET_DIR_DELEGATION4args *);
   2039 extern	bool_t xdr_GET_DIR_DELEGATION4resok(XDR *, GET_DIR_DELEGATION4resok *);
   2040 extern	bool_t xdr_gddrnf4_status(XDR *, gddrnf4_status *);
   2041 extern	bool_t xdr_GET_DIR_DELEGATION4res_non_fatal(XDR *,
   2042 		GET_DIR_DELEGATION4res_non_fatal *);
   2043 extern	bool_t xdr_GET_DIR_DELEGATION4res(XDR *, GET_DIR_DELEGATION4res *);
   2044 extern	bool_t xdr_GETDEVICEINFO4args(XDR *, GETDEVICEINFO4args *);
   2045 extern	bool_t xdr_GETDEVICEINFO4resok(XDR *, GETDEVICEINFO4resok *);
   2046 extern	bool_t xdr_GETDEVICEINFO4res(XDR *, GETDEVICEINFO4res *);
   2047 extern	bool_t xdr_GETDEVICELIST4args(XDR *, GETDEVICELIST4args *);
   2048 extern	bool_t xdr_GETDEVICELIST4resok(XDR *, GETDEVICELIST4resok *);
   2049 extern	bool_t xdr_GETDEVICELIST4res(XDR *, GETDEVICELIST4res *);
   2050 extern	bool_t xdr_newtime4(XDR *, newtime4 *);
   2051 extern	bool_t xdr_newoffset4(XDR *, newoffset4 *);
   2052 extern	bool_t xdr_LAYOUTCOMMIT4args(XDR *, LAYOUTCOMMIT4args *);
   2053 extern	bool_t xdr_newsize4(XDR *, newsize4 *);
   2054 extern	bool_t xdr_LAYOUTCOMMIT4resok(XDR *, LAYOUTCOMMIT4resok *);
   2055 extern	bool_t xdr_LAYOUTCOMMIT4res(XDR *, LAYOUTCOMMIT4res *);
   2056 extern	bool_t xdr_LAYOUTGET4args(XDR *, LAYOUTGET4args *);
   2057 extern	bool_t xdr_LAYOUTGET4resok(XDR *, LAYOUTGET4resok *);
   2058 extern	bool_t xdr_LAYOUTGET4res(XDR *, LAYOUTGET4res *);
   2059 extern	bool_t xdr_LAYOUTRETURN4args(XDR *, LAYOUTRETURN4args *);
   2060 extern	bool_t xdr_LAYOUTRETURN4res(XDR *, LAYOUTRETURN4res *);
   2061 extern	bool_t xdr_secinfo_style4(XDR *, secinfo_style4 *);
   2062 extern	bool_t xdr_SECINFO_NO_NAME4args(XDR *, SECINFO_NO_NAME4args *);
   2063 extern	bool_t xdr_SECINFO_NO_NAME4res(XDR *, SECINFO_NO_NAME4res *);
   2064 extern	bool_t xdr_SEQUENCE4args(XDR *, SEQUENCE4args *);
   2065 extern	bool_t xdr_SEQUENCE4resok(XDR *, SEQUENCE4resok *);
   2066 extern	bool_t xdr_SEQUENCE4res(XDR *, SEQUENCE4res *);
   2067 extern	bool_t xdr_ssa_digest_input4(XDR *, ssa_digest_input4 *);
   2068 extern	bool_t xdr_SET_SSV4args(XDR *, SET_SSV4args *);
   2069 extern	bool_t xdr_ssr_digest_input4(XDR *, ssr_digest_input4 *);
   2070 extern	bool_t xdr_SET_SSV4resok(XDR *, SET_SSV4resok *);
   2071 extern	bool_t xdr_SET_SSV4res(XDR *, SET_SSV4res *);
   2072 extern	bool_t xdr_TEST_STATEID4args(XDR *, TEST_STATEID4args *);
   2073 extern	bool_t xdr_TEST_STATEID4resok(XDR *, TEST_STATEID4resok *);
   2074 extern	bool_t xdr_TEST_STATEID4res(XDR *, TEST_STATEID4res *);
   2075 extern	bool_t xdr_deleg_claim4(XDR *, deleg_claim4 *);
   2076 extern	bool_t xdr_WANT_DELEGATION4args(XDR *, WANT_DELEGATION4args *);
   2077 extern	bool_t xdr_WANT_DELEGATION4res(XDR *, WANT_DELEGATION4res *);
   2078 extern	bool_t xdr_DESTROY_CLIENTID4args(XDR *, DESTROY_CLIENTID4args *);
   2079 extern	bool_t xdr_DESTROY_CLIENTID4res(XDR *, DESTROY_CLIENTID4res *);
   2080 extern	bool_t xdr_nfs_opnum4(XDR *, nfs_opnum4 *);
   2081 extern	bool_t xdr_CB_GETATTR4args(XDR *, CB_GETATTR4args *);
   2082 extern	bool_t xdr_CB_GETATTR4res(XDR *, CB_GETATTR4res *);
   2083 extern	bool_t xdr_CB_RECALL4args(XDR *, CB_RECALL4args *);
   2084 extern	bool_t xdr_CB_RECALL4res(XDR *, CB_RECALL4res *);
   2085 extern	bool_t xdr_CB_ILLEGAL4res(XDR *, CB_ILLEGAL4res *);
   2086 extern	bool_t xdr_layoutrecall_type4(XDR *, layoutrecall_type4 *);
   2087 extern	bool_t xdr_layoutrecall_file4(XDR *, layoutrecall_file4 *);
   2088 extern	bool_t xdr_layoutrecall4(XDR *, layoutrecall4 *);
   2089 extern	bool_t xdr_CB_LAYOUTRECALL4args(XDR *, CB_LAYOUTRECALL4args *);
   2090 extern	bool_t xdr_CB_LAYOUTRECALL4res(XDR *, CB_LAYOUTRECALL4res *);
   2091 extern	bool_t xdr_notify_entry4(XDR *, notify_entry4 *);
   2092 extern	bool_t xdr_prev_entry4(XDR *, prev_entry4 *);
   2093 extern	bool_t xdr_notify_add4(XDR *, notify_add4 *);
   2094 extern	bool_t xdr_notify_attr4(XDR *, notify_attr4 *);
   2095 extern	bool_t xdr_notify_remove4(XDR *, notify_remove4 *);
   2096 extern	bool_t xdr_notify_rename4(XDR *, notify_rename4 *);
   2097 extern	bool_t xdr_notify_verifier4(XDR *, notify_verifier4 *);
   2098 extern	bool_t xdr_notify_type4(XDR *, notify_type4 *);
   2099 extern	bool_t xdr_notify4(XDR *, notify4 *);
   2100 extern	bool_t xdr_CB_NOTIFY4args(XDR *, CB_NOTIFY4args *);
   2101 extern	bool_t xdr_CB_NOTIFY4res(XDR *, CB_NOTIFY4res *);
   2102 extern	bool_t xdr_CB_PUSH_DELEG4args(XDR *, CB_PUSH_DELEG4args *);
   2103 extern	bool_t xdr_CB_PUSH_DELEG4res(XDR *, CB_PUSH_DELEG4res *);
   2104 extern	bool_t xdr_CB_RECALL_ANY4args(XDR *, CB_RECALL_ANY4args *);
   2105 extern	bool_t xdr_CB_RECALL_ANY4res(XDR *, CB_RECALL_ANY4res *);
   2106 extern	bool_t xdr_CB_RECALLABLE_OBJ_AVAIL4args(XDR *,
   2107 		CB_RECALLABLE_OBJ_AVAIL4args *);
   2108 extern	bool_t xdr_CB_RECALLABLE_OBJ_AVAIL4res(XDR *,
   2109 		CB_RECALLABLE_OBJ_AVAIL4res *);
   2110 extern	bool_t xdr_CB_RECALL_SLOT4args(XDR *, CB_RECALL_SLOT4args *);
   2111 extern	bool_t xdr_CB_RECALL_SLOT4res(XDR *, CB_RECALL_SLOT4res *);
   2112 extern	bool_t xdr_referring_call4(XDR *, referring_call4 *);
   2113 extern	bool_t xdr_referring_call_list4(XDR *, referring_call_list4 *);
   2114 extern	bool_t xdr_CB_SEQUENCE4args(XDR *, CB_SEQUENCE4args *);
   2115 extern	bool_t xdr_CB_SEQUENCE4resok(XDR *, CB_SEQUENCE4resok *);
   2116 extern	bool_t xdr_CB_SEQUENCE4res(XDR *, CB_SEQUENCE4res *);
   2117 extern	bool_t xdr_CB_WANTS_CANCELLED4args(XDR *, CB_WANTS_CANCELLED4args *);
   2118 extern	bool_t xdr_CB_WANTS_CANCELLED4res(XDR *, CB_WANTS_CANCELLED4res *);
   2119 extern	bool_t xdr_CB_NOTIFY_LOCK4args(XDR *, CB_NOTIFY_LOCK4args *);
   2120 extern	bool_t xdr_CB_NOTIFY_LOCK4res(XDR *, CB_NOTIFY_LOCK4res *);
   2121 extern  bool_t xdr_notify_deviceid_type4(XDR *, notify_deviceid_type4*);
   2122 extern	bool_t xdr_notify_deviceid_delete4(XDR *, notify_deviceid_delete4 *);
   2123 extern  bool_t xdr_notify_deviceid_change4(XDR *, notify_deviceid_change4*);
   2124 extern  bool_t xdr_CB_NOTIFY_DEVICEID4args(XDR *, CB_NOTIFY_DEVICEID4args*);
   2125 extern  bool_t xdr_CB_NOTIFY_DEVICEID4res(XDR *, CB_NOTIFY_DEVICEID4res*);
   2126 extern	bool_t xdr_nfs_cb_opnum4(XDR *, nfs_cb_opnum4 *);
   2127 extern	bool_t xdr_nfs_cb_argop4(XDR *, nfs_cb_argop4 *);
   2128 extern	bool_t xdr_nfs_cb_resop4(XDR *, nfs_cb_resop4 *);
   2129 extern	bool_t xdr_nfs_argop4(XDR *, nfs_argop4 *);
   2130 extern	bool_t xdr_nfs_resop4(XDR *, nfs_resop4 *);
   2131 
   2132 #ifdef __cplusplus
   2133 }
   2134 #endif
   2135 
   2136 #endif /* !_NFS41_KPROT_H */
   2137