idnits 2.17.1 draft-ietf-nfsv4-minorversion1-dot-x-12.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? -- It seems you're using the 'non-IETF stream' Licence Notice instead Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 340 has weird spacing: '... opaque attrl...' == Line 348 has weird spacing: '... opaque nfs_f...' == Line 351 has weird spacing: '... opaque sec_o...' == Line 354 has weird spacing: '... opaque sessi...' == Line 356 has weird spacing: '... opaque utf8s...' == (35 more instances...) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (December 15, 2008) is 5604 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: 'RFC3530' on line 3407 -- Looks like a reference, but probably isn't: 'RFCTBD1' on line 3414 -- Possible downref: Non-RFC (?) normative reference: ref. '1' -- Possible downref: Non-RFC (?) normative reference: ref. '2' Summary: 2 errors (**), 0 flaws (~~), 7 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NFSv4 S. Shepler 3 Internet-Draft M. Eisler 4 Intended status: Standards Track D. Noveck 5 Expires: June 18, 2009 Editors 6 December 15, 2008 8 NFSv4 Minor Version 1 XDR Description 9 draft-ietf-nfsv4-minorversion1-dot-x-12.txt 11 Status of this Memo 13 This Internet-Draft is submitted to IETF in full conformance with the 14 provisions of BCP 78 and BCP 79. 16 Internet-Drafts are working documents of the Internet Engineering 17 Task Force (IETF), its areas, and its working groups. Note that 18 other groups may also distribute working documents as Internet- 19 Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six months 22 and may be updated, replaced, or obsoleted by other documents at any 23 time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress." 26 The list of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt. 29 The list of Internet-Draft Shadow Directories can be accessed at 30 http://www.ietf.org/shadow.html. 32 This Internet-Draft will expire on June 18, 2009. 34 Copyright Notice 36 Copyright (c) 2008 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. 46 Abstract 48 This Internet-Draft provides the XDR description for NFSv4 minor 49 version one. 51 Requirements Language 53 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 54 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 55 document are to be interpreted as described in RFC 2119 [1]. 57 Table of Contents 59 1. Code Components Licensing Notice . . . . . . . . . . . . . . . 3 60 2. XDR Description of NFSv4.1 . . . . . . . . . . . . . . . . . . 3 61 3. Security Considerations . . . . . . . . . . . . . . . . . . . 71 62 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 72 63 5. Normative References . . . . . . . . . . . . . . . . . . . . . 72 64 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 72 65 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 72 66 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 73 68 1. Code Components Licensing Notice 70 The XDR description and scripts for extracting the XDR description 71 are Code Components as described in Section 4 of "Legal Provisions 72 Relating to IETF Documents" [2]. 74 2. XDR Description of NFSv4.1 76 This document contains the XDR ([3]) description of NFSv4.1 protocol 77 ([4]). In order to facilitate implementations that support both 78 NFSv4.0 and NFSv4.1, the description includes operations, and other 79 features of NFSv4.0 that do not apply to NFSv4.1. 81 The XDR description is provided in this document in a way that makes 82 it simple for the reader to extract into ready to compile form. The 83 reader can feed this document in the following shell script to 84 produce the machine readable XDR description of NFSv4.1: 86 88 #!/bin/sh 89 grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??' 91 93 I.e. if the above script is stored in a file called "extract.sh", and 94 this document is in a file called "spec.txt", then the reader can do: 96 98 sh extract.sh < spec.txt > nfs4_prot.x 100 102 The effect of the script is to remove leading white space from each 103 line, plus a sentinel sequence of "///". 105 The XDR description, with the sentinel sequence follows: 107 109 /// /* 110 /// * Copyright (c) 2008 IETF Trust and the persons identified 111 /// * as the document authors. All rights reserved. 112 /// * 113 /// * The document authors are identified in [RFC3530] and 114 /// * [draft-ietf-nfsv4-minorversion1-xx.txt]. 115 /// * 116 /// * Redistribution and use in source and binary forms, with 117 /// * or without modification, are permitted provided that the 118 /// * following conditions are met: 119 /// * 120 /// * o Redistributions of source code must retain the above 121 /// * copyright notice, this list of conditions and the 122 /// * following disclaimer. 123 /// * 124 /// * o Redistributions in binary form must reproduce the above 125 /// * copyright notice, this list of conditions and the 126 /// * following disclaimer in the documentation and/or other 127 /// * materials provided with the distribution. 128 /// * 129 /// * o Neither the name of Internet Society, IETF or IETF 130 /// * Trust, nor the names of specific contributors, may be 131 /// * used to endorse or promote products derived from this 132 /// * software without specific prior written permission. 133 /// * 134 /// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 135 /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 136 /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 137 /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 138 /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 139 /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 140 /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 141 /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 142 /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 143 /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 144 /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 145 /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 146 /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 147 /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 148 /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 149 /// */ 150 /// /* 151 /// * This code was derived from [RFC3530]. Please 152 /// * reproduce this note if possible. 153 /// * 154 /// * This file was machine generated for 155 /// * draft-ietf-nfsv4-minorversion1-29 156 /// * Last updated Mon Dec 15 11:26:38 PST 2008 157 /// */ 158 /// /* 159 /// * nfs4_prot.x 160 /// */ 161 /// 162 /// %#ifndef _AUTH_SYS_DEFINE_FOR_NFSv41 163 /// %#define _AUTH_SYS_DEFINE_FOR_NFSv41 164 /// %#include 165 /// %typedef struct authsys_parms authsys_parms; 166 /// %#endif _AUTH_SYS_DEFINE_FOR_NFSv41 167 /// 168 /// /* 169 /// * Basic typedefs for RFC 1832 data type definitions 170 /// */ 171 /// 172 /// /* 173 /// * typedef int int32_t; 174 /// * typedef unsigned int uint32_t; 175 /// * typedef hyper int64_t; 176 /// * typedef unsigned hyper uint64_t; 177 /// */ 178 /// 179 /// /* 180 /// * Sizes 181 /// */ 182 /// const NFS4_FHSIZE = 128; 183 /// const NFS4_VERIFIER_SIZE = 8; 184 /// const NFS4_OPAQUE_LIMIT = 1024; 185 /// const NFS4_SESSIONID_SIZE = 16; 186 /// 187 /// const NFS4_INT64_MAX = 0x7fffffffffffffff; 188 /// const NFS4_UINT64_MAX = 0xffffffffffffffff; 189 /// const NFS4_INT32_MAX = 0x7fffffff; 190 /// const NFS4_UINT32_MAX = 0xffffffff; 191 /// 192 /// const NFS4_MAXFILELEN = 0xffffffffffffffff; 193 /// const NFS4_MAXFILEOFF = 0xfffffffffffffffe; 194 /// 195 /// 196 /// /* 197 /// * File types 198 /// */ 199 /// enum nfs_ftype4 { 200 /// NF4REG = 1, /* Regular File */ 201 /// NF4DIR = 2, /* Directory */ 202 /// NF4BLK = 3, /* Special File - block device */ 203 /// NF4CHR = 4, /* Special File - character device */ 204 /// NF4LNK = 5, /* Symbolic Link */ 205 /// NF4SOCK = 6, /* Special File - socket */ 206 /// NF4FIFO = 7, /* Special File - fifo */ 207 /// NF4ATTRDIR 208 /// = 8, /* Attribute Directory */ 209 /// NF4NAMEDATTR 210 /// = 9 /* Named Attribute */ 211 /// }; 212 /// 213 /// /* 214 /// * Error status 215 /// */ 216 /// enum nfsstat4 { 217 /// NFS4_OK = 0, /* everything is okay */ 218 /// NFS4ERR_PERM = 1, /* caller not privileged */ 219 /// NFS4ERR_NOENT = 2, /* no such file/directory */ 220 /// NFS4ERR_IO = 5, /* hard I/O error */ 221 /// NFS4ERR_NXIO = 6, /* no such device */ 222 /// NFS4ERR_ACCESS = 13, /* access denied */ 223 /// NFS4ERR_EXIST = 17, /* file already exists */ 224 /// NFS4ERR_XDEV = 18, /* different filesystems */ 225 /// 226 /// /* 227 /// * Please do not allocate value 19; it was used in NFSv3 228 /// * and we do not want a value in NFSv3 to have a different 229 /// * meaning in NFSv4.x. 230 /// */ 231 /// 232 /// NFS4ERR_NOTDIR = 20, /* should be a directory */ 233 /// NFS4ERR_ISDIR = 21, /* should not be directory */ 234 /// NFS4ERR_INVAL = 22, /* invalid argument */ 235 /// NFS4ERR_FBIG = 27, /* file exceeds server max */ 236 /// NFS4ERR_NOSPC = 28, /* no space on filesystem */ 237 /// NFS4ERR_ROFS = 30, /* read-only filesystem */ 238 /// NFS4ERR_MLINK = 31, /* too many hard links */ 239 /// NFS4ERR_NAMETOOLONG = 63, /* name exceeds server max */ 240 /// NFS4ERR_NOTEMPTY = 66, /* directory not empty */ 241 /// NFS4ERR_DQUOT = 69, /* hard quota limit reached*/ 242 /// NFS4ERR_STALE = 70, /* file no longer exists */ 243 /// NFS4ERR_BADHANDLE = 10001,/* Illegal filehandle */ 244 /// NFS4ERR_BAD_COOKIE = 10003,/* READDIR cookie is stale */ 245 /// NFS4ERR_NOTSUPP = 10004,/* operation not supported */ 246 /// NFS4ERR_TOOSMALL = 10005,/* response limit exceeded */ 247 /// NFS4ERR_SERVERFAULT = 10006,/* undefined server error */ 248 /// NFS4ERR_BADTYPE = 10007,/* type invalid for CREATE */ 249 /// NFS4ERR_DELAY = 10008,/* file "busy" - retry */ 250 /// NFS4ERR_SAME = 10009,/* nverify says attrs same */ 251 /// NFS4ERR_DENIED = 10010,/* lock unavailable */ 252 /// NFS4ERR_EXPIRED = 10011,/* lock lease expired */ 253 /// NFS4ERR_LOCKED = 10012,/* I/O failed due to lock */ 254 /// NFS4ERR_GRACE = 10013,/* in grace period */ 255 /// NFS4ERR_FHEXPIRED = 10014,/* filehandle expired */ 256 /// NFS4ERR_SHARE_DENIED = 10015,/* share reserve denied */ 257 /// NFS4ERR_WRONGSEC = 10016,/* wrong security flavor */ 258 /// NFS4ERR_CLID_INUSE = 10017,/* clientid in use */ 259 /// 260 /// /* NFS4ERR_RESOURCE is not a valid error in NFSv4.1 */ 261 /// NFS4ERR_RESOURCE = 10018,/* resource exhaustion */ 262 /// 263 /// NFS4ERR_MOVED = 10019,/* filesystem relocated */ 264 /// NFS4ERR_NOFILEHANDLE = 10020,/* current FH is not set */ 265 /// NFS4ERR_MINOR_VERS_MISMATCH= 10021,/* minor vers not supp */ 266 /// NFS4ERR_STALE_CLIENTID = 10022,/* server has rebooted */ 267 /// NFS4ERR_STALE_STATEID = 10023,/* server has rebooted */ 268 /// NFS4ERR_OLD_STATEID = 10024,/* state is out of sync */ 269 /// NFS4ERR_BAD_STATEID = 10025,/* incorrect stateid */ 270 /// NFS4ERR_BAD_SEQID = 10026,/* request is out of seq. */ 271 /// NFS4ERR_NOT_SAME = 10027,/* verify - attrs not same */ 272 /// NFS4ERR_LOCK_RANGE = 10028,/* overlapping lock range */ 273 /// NFS4ERR_SYMLINK = 10029,/* should be file/directory*/ 274 /// NFS4ERR_RESTOREFH = 10030,/* no saved filehandle */ 275 /// NFS4ERR_LEASE_MOVED = 10031,/* some filesystem moved */ 276 /// NFS4ERR_ATTRNOTSUPP = 10032,/* recommended attr not sup*/ 277 /// NFS4ERR_NO_GRACE = 10033,/* reclaim outside of grace*/ 278 /// NFS4ERR_RECLAIM_BAD = 10034,/* reclaim error at server */ 279 /// NFS4ERR_RECLAIM_CONFLICT= 10035,/* conflict on reclaim */ 280 /// NFS4ERR_BADXDR = 10036,/* XDR decode failed */ 281 /// NFS4ERR_LOCKS_HELD = 10037,/* file locks held at CLOSE*/ 282 /// NFS4ERR_OPENMODE = 10038,/* conflict in OPEN and I/O*/ 283 /// NFS4ERR_BADOWNER = 10039,/* owner translation bad */ 284 /// NFS4ERR_BADCHAR = 10040,/* utf-8 char not supported*/ 285 /// NFS4ERR_BADNAME = 10041,/* name not supported */ 286 /// NFS4ERR_BAD_RANGE = 10042,/* lock range not supported*/ 287 /// NFS4ERR_LOCK_NOTSUPP = 10043,/* no atomic up/downgrade */ 288 /// NFS4ERR_OP_ILLEGAL = 10044,/* undefined operation */ 289 /// NFS4ERR_DEADLOCK = 10045,/* file locking deadlock */ 290 /// NFS4ERR_FILE_OPEN = 10046,/* open file blocks op. */ 291 /// NFS4ERR_ADMIN_REVOKED = 10047,/* lockowner state revoked */ 292 /// NFS4ERR_CB_PATH_DOWN = 10048,/* callback path down */ 293 /// 294 /// /* NFSv4.1 errors start here. */ 295 /// 296 /// NFS4ERR_BADIOMODE = 10049, 297 /// NFS4ERR_BADLAYOUT = 10050, 298 /// NFS4ERR_BAD_SESSION_DIGEST = 10051, 299 /// NFS4ERR_BADSESSION = 10052, 300 /// NFS4ERR_BADSLOT = 10053, 301 /// NFS4ERR_COMPLETE_ALREADY = 10054, 302 /// NFS4ERR_CONN_NOT_BOUND_TO_SESSION = 10055, 303 /// NFS4ERR_DELEG_ALREADY_WANTED = 10056, 304 /// NFS4ERR_BACK_CHAN_BUSY = 10057,/*backchan reqs outstanding*/ 305 /// NFS4ERR_LAYOUTTRYLATER = 10058, 306 /// NFS4ERR_LAYOUTUNAVAILABLE = 10059, 307 /// NFS4ERR_NOMATCHING_LAYOUT = 10060, 308 /// NFS4ERR_RECALLCONFLICT = 10061, 309 /// NFS4ERR_UNKNOWN_LAYOUTTYPE = 10062, 310 /// NFS4ERR_SEQ_MISORDERED = 10063,/* unexpected seq.ID in req*/ 311 /// NFS4ERR_SEQUENCE_POS = 10064,/* [CB_]SEQ. op not 1st op */ 312 /// NFS4ERR_REQ_TOO_BIG = 10065,/* request too big */ 313 /// NFS4ERR_REP_TOO_BIG = 10066,/* reply too big */ 314 /// NFS4ERR_REP_TOO_BIG_TO_CACHE =10067,/* rep. not all cached*/ 315 /// NFS4ERR_RETRY_UNCACHED_REP =10068,/* retry & rep. uncached*/ 316 /// NFS4ERR_UNSAFE_COMPOUND =10069,/* retry/recovery too hard */ 317 /// NFS4ERR_TOO_MANY_OPS = 10070,/*too many ops in [CB_]COMP*/ 318 /// NFS4ERR_OP_NOT_IN_SESSION =10071,/* op needs [CB_]SEQ. op */ 319 /// NFS4ERR_HASH_ALG_UNSUPP = 10072, /* hash alg. not supp. */ 320 /// /* Error 10073 is unused. */ 321 /// NFS4ERR_CLIENTID_BUSY = 10074,/* clientid has state */ 322 /// NFS4ERR_PNFS_IO_HOLE = 10075,/* IO to _SPARSE file hole */ 323 /// NFS4ERR_SEQ_FALSE_RETRY= 10076,/* Retry != original req. */ 324 /// NFS4ERR_BAD_HIGH_SLOT = 10077,/* req has bad highest_slot*/ 325 /// NFS4ERR_DEADSESSION = 10078,/*new req sent to dead sess*/ 326 /// NFS4ERR_ENCR_ALG_UNSUPP= 10079,/* encr alg. not supp. */ 327 /// NFS4ERR_PNFS_NO_LAYOUT = 10080,/* I/O without a layout */ 328 /// NFS4ERR_NOT_ONLY_OP = 10081,/* addl ops not allowed */ 329 /// NFS4ERR_WRONG_CRED = 10082,/* op done by wrong cred */ 330 /// NFS4ERR_WRONG_TYPE = 10083,/* op on wrong type object */ 331 /// NFS4ERR_DIRDELEG_UNAVAIL=10084,/* delegation not avail. */ 332 /// NFS4ERR_REJECT_DELEG = 10085,/* cb rejected delegation */ 333 /// NFS4ERR_RETURNCONFLICT = 10086,/* layout get before return*/ 334 /// NFS4ERR_DELEG_REVOKED = 10087 /* deleg./layout revoked */ 335 /// }; 336 /// 337 /// /* 338 /// * Basic data types 339 /// */ 340 /// typedef opaque attrlist4<>; 341 /// typedef uint32_t bitmap4<>; 342 /// typedef uint64_t changeid4; 343 /// typedef uint64_t clientid4; 344 /// typedef uint32_t count4; 345 /// typedef uint64_t length4; 346 /// typedef uint32_t mode4; 347 /// typedef uint64_t nfs_cookie4; 348 /// typedef opaque nfs_fh4; 349 /// typedef uint64_t offset4; 350 /// typedef uint32_t qop4; 351 /// typedef opaque sec_oid4<>; 352 /// typedef uint32_t sequenceid4; 353 /// typedef uint32_t seqid4; 354 /// typedef opaque sessionid4[NFS4_SESSIONID_SIZE]; 355 /// typedef uint32_t slotid4; 356 /// typedef opaque utf8string<>; 357 /// typedef utf8string utf8str_cis; 358 /// typedef utf8string utf8str_cs; 359 /// typedef utf8string utf8str_mixed; 360 /// typedef utf8str_cs component4; 361 /// typedef utf8str_cs linktext4; 362 /// typedef component4 pathname4<>; 363 /// typedef opaque verifier4[NFS4_VERIFIER_SIZE]; 364 /// 365 /// /* 366 /// * Timeval 367 /// */ 368 /// struct nfstime4 { 369 /// int64_t seconds; 370 /// uint32_t nseconds; 371 /// }; 372 /// 373 /// enum time_how4 { 374 /// SET_TO_SERVER_TIME4 = 0, 375 /// SET_TO_CLIENT_TIME4 = 1 376 /// }; 377 /// 378 /// union settime4 switch (time_how4 set_it) { 379 /// case SET_TO_CLIENT_TIME4: 380 /// nfstime4 time; 381 /// default: 382 /// void; 383 /// }; 384 /// 385 /// 386 /// typedef uint32_t nfs_lease4; 387 /// 388 /// /* 389 /// * File attribute definitions 390 /// */ 391 /// 392 /// /* 393 /// * FSID structure for major/minor 394 /// */ 395 /// struct fsid4 { 396 /// uint64_t major; 397 /// uint64_t minor; 398 /// }; 399 /// 400 /// /* 401 /// * Filesystem locations attribute 402 /// * for relocation/migration and 403 /// * related attributes. 404 /// */ 405 /// struct change_policy4 { 406 /// uint64_t cp_major; 407 /// uint64_t cp_minor; 408 /// }; 409 /// 410 /// struct fs_location4 { 411 /// utf8str_cis server<>; 412 /// pathname4 rootpath; 413 /// }; 414 /// 415 /// struct fs_locations4 { 416 /// pathname4 fs_root; 417 /// fs_location4 locations<>; 418 /// }; 419 /// 420 /// /* 421 /// * Various Access Control Entry definitions 422 /// */ 423 /// 424 /// /* 425 /// * Mask that indicates which 426 /// * Access Control Entries are supported. 427 /// * Values for the fattr4_aclsupport attribute. 428 /// */ 429 /// const ACL4_SUPPORT_ALLOW_ACL = 0x00000001; 430 /// const ACL4_SUPPORT_DENY_ACL = 0x00000002; 431 /// const ACL4_SUPPORT_AUDIT_ACL = 0x00000004; 432 /// const ACL4_SUPPORT_ALARM_ACL = 0x00000008; 433 /// 434 /// 435 /// typedef uint32_t acetype4; 436 /// 437 /// 438 /// /* 439 /// * acetype4 values, others can be added as needed. 440 /// */ 441 /// const ACE4_ACCESS_ALLOWED_ACE_TYPE = 0x00000000; 442 /// const ACE4_ACCESS_DENIED_ACE_TYPE = 0x00000001; 443 /// const ACE4_SYSTEM_AUDIT_ACE_TYPE = 0x00000002; 444 /// const ACE4_SYSTEM_ALARM_ACE_TYPE = 0x00000003; 445 /// 446 /// 447 /// 448 /// /* 449 /// * ACE flag 450 /// */ 451 /// typedef uint32_t aceflag4; 452 /// 453 /// 454 /// /* 455 /// * ACE flag values 456 /// */ 457 /// const ACE4_FILE_INHERIT_ACE = 0x00000001; 458 /// const ACE4_DIRECTORY_INHERIT_ACE = 0x00000002; 459 /// const ACE4_NO_PROPAGATE_INHERIT_ACE = 0x00000004; 460 /// const ACE4_INHERIT_ONLY_ACE = 0x00000008; 461 /// const ACE4_SUCCESSFUL_ACCESS_ACE_FLAG = 0x00000010; 462 /// const ACE4_FAILED_ACCESS_ACE_FLAG = 0x00000020; 463 /// const ACE4_IDENTIFIER_GROUP = 0x00000040; 464 /// const ACE4_INHERITED_ACE = 0x00000080; 465 /// 466 /// 467 /// 468 /// /* 469 /// * ACE mask 470 /// */ 471 /// typedef uint32_t acemask4; 472 /// 473 /// 474 /// /* 475 /// * ACE mask values 476 /// */ 477 /// const ACE4_READ_DATA = 0x00000001; 478 /// const ACE4_LIST_DIRECTORY = 0x00000001; 479 /// const ACE4_WRITE_DATA = 0x00000002; 480 /// const ACE4_ADD_FILE = 0x00000002; 481 /// const ACE4_APPEND_DATA = 0x00000004; 482 /// const ACE4_ADD_SUBDIRECTORY = 0x00000004; 483 /// const ACE4_READ_NAMED_ATTRS = 0x00000008; 484 /// const ACE4_WRITE_NAMED_ATTRS = 0x00000010; 485 /// const ACE4_EXECUTE = 0x00000020; 486 /// const ACE4_DELETE_CHILD = 0x00000040; 487 /// const ACE4_READ_ATTRIBUTES = 0x00000080; 488 /// const ACE4_WRITE_ATTRIBUTES = 0x00000100; 489 /// const ACE4_WRITE_RETENTION = 0x00000200; 490 /// const ACE4_WRITE_RETENTION_HOLD = 0x00000400; 491 /// 492 /// const ACE4_DELETE = 0x00010000; 493 /// const ACE4_READ_ACL = 0x00020000; 494 /// const ACE4_WRITE_ACL = 0x00040000; 495 /// const ACE4_WRITE_OWNER = 0x00080000; 496 /// const ACE4_SYNCHRONIZE = 0x00100000; 497 /// 498 /// 499 /// /* 500 /// * ACE4_GENERIC_READ -- defined as combination of 501 /// * ACE4_READ_ACL | 502 /// * ACE4_READ_DATA | 503 /// * ACE4_READ_ATTRIBUTES | 504 /// * ACE4_SYNCHRONIZE 505 /// */ 506 /// 507 /// const ACE4_GENERIC_READ = 0x00120081; 508 /// 509 /// /* 510 /// * ACE4_GENERIC_WRITE -- defined as combination of 511 /// * ACE4_READ_ACL | 512 /// * ACE4_WRITE_DATA | 513 /// * ACE4_WRITE_ATTRIBUTES | 514 /// * ACE4_WRITE_ACL | 515 /// * ACE4_APPEND_DATA | 516 /// * ACE4_SYNCHRONIZE 517 /// */ 518 /// const ACE4_GENERIC_WRITE = 0x00160106; 519 /// 520 /// 521 /// /* 522 /// * ACE4_GENERIC_EXECUTE -- defined as combination of 523 /// * ACE4_READ_ACL 524 /// * ACE4_READ_ATTRIBUTES 525 /// * ACE4_EXECUTE 526 /// * ACE4_SYNCHRONIZE 527 /// */ 528 /// const ACE4_GENERIC_EXECUTE = 0x001200A0; 529 /// 530 /// 531 /// /* 532 /// * Access Control Entry definition 533 /// */ 534 /// struct nfsace4 { 535 /// acetype4 type; 536 /// aceflag4 flag; 537 /// acemask4 access_mask; 538 /// utf8str_mixed who; 539 /// }; 540 /// 541 /// 542 /// /* 543 /// * ACL flag 544 /// */ 545 /// 546 /// typedef uint32_t aclflag4; 547 /// 548 /// /* 549 /// * ACL flag values 550 /// */ 551 /// const ACL4_AUTO_INHERIT = 0x00000001; 552 /// const ACL4_PROTECTED = 0x00000002; 553 /// const ACL4_DEFAULTED = 0x00000004; 554 /// 555 /// 556 /// /* 557 /// * Version 4.1 Access Control List definition 558 /// */ 559 /// struct nfsacl41 { 560 /// aclflag4 na41_flag; 561 /// nfsace4 na41_aces<>; 562 /// }; 563 /// 564 /// 565 /// /* 566 /// * Field definitions for the fattr4_mode 567 /// * and fattr4_mode_set_masked attributes. 568 /// */ 569 /// const MODE4_SUID = 0x800; /* set user id on execution */ 570 /// const MODE4_SGID = 0x400; /* set group id on execution */ 571 /// const MODE4_SVTX = 0x200; /* save text even after use */ 572 /// const MODE4_RUSR = 0x100; /* read permission: owner */ 573 /// const MODE4_WUSR = 0x080; /* write permission: owner */ 574 /// const MODE4_XUSR = 0x040; /* execute permission: owner */ 575 /// const MODE4_RGRP = 0x020; /* read permission: group */ 576 /// const MODE4_WGRP = 0x010; /* write permission: group */ 577 /// const MODE4_XGRP = 0x008; /* execute permission: group */ 578 /// const MODE4_ROTH = 0x004; /* read permission: other */ 579 /// const MODE4_WOTH = 0x002; /* write permission: other */ 580 /// const MODE4_XOTH = 0x001; /* execute permission: other */ 581 /// 582 /// 583 /// /* 584 /// * Masked mode for the mode_set_masked attribute. 585 /// */ 586 /// struct mode_masked4 { 587 /// mode4 mm_value_to_set; /* Values of bits 588 /// to set or reset 589 /// in mode. */ 590 /// 591 /// mode4 mm_mask_bits; /* Mask of bits to 592 /// set or reset 593 /// in mode. */ 594 /// }; 595 /// 596 /// /* 597 /// * Special data/attribute associated with 598 /// * file types NF4BLK and NF4CHR. 599 /// */ 600 /// struct specdata4 { 601 /// uint32_t specdata1; /* major device number */ 602 /// uint32_t specdata2; /* minor device number */ 603 /// }; 604 /// 605 /// /* 606 /// * Values for fattr4_fh_expire_type 607 /// */ 608 /// const FH4_PERSISTENT = 0x00000000; 609 /// const FH4_NOEXPIRE_WITH_OPEN = 0x00000001; 610 /// const FH4_VOLATILE_ANY = 0x00000002; 611 /// const FH4_VOL_MIGRATION = 0x00000004; 612 /// const FH4_VOL_RENAME = 0x00000008; 613 /// 614 /// 615 /// struct netaddr4 { 616 /// /* see struct rpcb in RFC 1833 */ 617 /// string na_r_netid<>; /* network id */ 618 /// string na_r_addr<>; /* universal address */ 619 /// }; 620 /// 621 /// /* 622 /// * data structures new to NFSv4.1 623 /// */ 624 /// 625 /// struct nfs_impl_id4 { 626 /// utf8str_cis nii_domain; 627 /// utf8str_cs nii_name; 628 /// nfstime4 nii_date; 629 /// }; 630 /// 631 /// 632 /// /* 633 /// * Stateid 634 /// */ 635 /// struct stateid4 { 636 /// uint32_t seqid; 637 /// opaque other[12]; 638 /// }; 639 /// 640 /// enum layouttype4 { 641 /// LAYOUT4_NFSV4_1_FILES = 0x1, 642 /// LAYOUT4_OSD2_OBJECTS = 0x2, 643 /// LAYOUT4_BLOCK_VOLUME = 0x3 644 /// }; 645 /// 646 /// struct layout_content4 { 647 /// layouttype4 loc_type; 648 /// opaque loc_body<>; 649 /// }; 650 /// 651 /// 652 /// %/* 653 /// %/* LAYOUT4_OSD2_OBJECTS loc_body description 654 /// % * is in a separate .x file 655 /// % */ 656 /// % 657 /// %/* 658 /// %/* LAYOUT4_BLOCK_VOLUME loc_body description 659 /// % * is in a separate .x file 660 /// % */ 661 /// 662 /// struct layouthint4 { 663 /// layouttype4 loh_type; 664 /// opaque loh_body<>; 665 /// }; 666 /// 667 /// enum layoutiomode4 { 668 /// LAYOUTIOMODE4_READ = 1, 669 /// LAYOUTIOMODE4_RW = 2, 670 /// LAYOUTIOMODE4_ANY = 3 671 /// }; 672 /// 673 /// struct layout4 { 674 /// offset4 lo_offset; 675 /// length4 lo_length; 676 /// layoutiomode4 lo_iomode; 677 /// layout_content4 lo_content; 678 /// }; 679 /// 680 /// const NFS4_DEVICEID4_SIZE = 16; 681 /// 682 /// typedef opaque deviceid4[NFS4_DEVICEID4_SIZE]; 683 /// 684 /// struct device_addr4 { 685 /// layouttype4 da_layout_type; 686 /// opaque da_addr_body<>; 687 /// }; 688 /// 689 /// 690 /// struct layoutupdate4 { 691 /// layouttype4 lou_type; 692 /// opaque lou_body<>; 693 /// }; 694 /// 695 /// % 696 /// /* Constants used for LAYOUTRETURN and CB_LAYOUTRECALL */ 697 /// const LAYOUT4_RET_REC_FILE = 1; 698 /// const LAYOUT4_RET_REC_FSID = 2; 699 /// const LAYOUT4_RET_REC_ALL = 3; 700 /// % 701 /// enum layoutreturn_type4 { 702 /// LAYOUTRETURN4_FILE = LAYOUT4_RET_REC_FILE, 703 /// LAYOUTRETURN4_FSID = LAYOUT4_RET_REC_FSID, 704 /// LAYOUTRETURN4_ALL = LAYOUT4_RET_REC_ALL 705 /// }; 706 /// 707 /// struct layoutreturn_file4 { 708 /// offset4 lrf_offset; 709 /// length4 lrf_length; 710 /// stateid4 lrf_stateid; 711 /// % /* layouttype4 specific data */ 712 /// opaque lrf_body<>; 713 /// }; 714 /// 715 /// union layoutreturn4 switch(layoutreturn_type4 lr_returntype) { 716 /// case LAYOUTRETURN4_FILE: 717 /// layoutreturn_file4 lr_layout; 718 /// default: 719 /// void; 720 /// }; 721 /// % 722 /// 723 /// enum fs4_status_type { 724 /// STATUS4_FIXED = 1, 725 /// STATUS4_UPDATED = 2, 726 /// STATUS4_VERSIONED = 3, 727 /// STATUS4_WRITABLE = 4, 728 /// STATUS4_REFERRAL = 5 729 /// }; 730 /// 731 /// struct fs4_status { 732 /// bool fss_absent; 733 /// fs4_status_type fss_type; 734 /// utf8str_cs fss_source; 735 /// utf8str_cs fss_current; 736 /// int32_t fss_age; 737 /// nfstime4 fss_version; 738 /// }; 739 /// 740 /// 741 /// const TH4_READ_SIZE = 0; 742 /// const TH4_WRITE_SIZE = 1; 743 /// const TH4_READ_IOSIZE = 2; 744 /// const TH4_WRITE_IOSIZE = 3; 745 /// 746 /// typedef length4 threshold4_read_size; 747 /// typedef length4 threshold4_write_size; 748 /// typedef length4 threshold4_read_iosize; 749 /// typedef length4 threshold4_write_iosize; 750 /// 751 /// struct threshold_item4 { 752 /// layouttype4 thi_layout_type; 753 /// bitmap4 thi_hintset; 754 /// opaque thi_hintlist<>; 755 /// }; 756 /// 757 /// struct mdsthreshold4 { 758 /// threshold_item4 mth_hints<>; 759 /// }; 760 /// 761 /// const RET4_DURATION_INFINITE = 0xffffffffffffffff; 762 /// struct retention_get4 { 763 /// uint64_t rg_duration; 764 /// nfstime4 rg_begin_time<1>; 765 /// }; 766 /// 767 /// struct retention_set4 { 768 /// bool rs_enable; 769 /// uint64_t rs_duration<1>; 770 /// }; 771 /// 772 /// const FSCHARSET_CAP4_CONTAINS_NON_UTF8 = 0x1; 773 /// const FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 = 0x2; 774 /// 775 /// typedef uint32_t fs_charset_cap4; 776 /// 777 /// 778 /// /* 779 /// * NFSv4.1 attributes 780 /// */ 781 /// typedef bitmap4 fattr4_supported_attrs; 782 /// typedef bitmap4 fattr4_suppattr_exclcreat; 783 /// typedef nfs_ftype4 fattr4_type; 784 /// typedef uint32_t fattr4_fh_expire_type; 785 /// typedef changeid4 fattr4_change; 786 /// typedef uint64_t fattr4_size; 787 /// typedef bool fattr4_link_support; 788 /// typedef bool fattr4_symlink_support; 789 /// typedef bool fattr4_named_attr; 790 /// typedef fsid4 fattr4_fsid; 791 /// typedef bool fattr4_unique_handles; 792 /// typedef nfs_lease4 fattr4_lease_time; 793 /// typedef nfsstat4 fattr4_rdattr_error; 794 /// typedef nfsace4 fattr4_acl<>; 795 /// typedef uint32_t fattr4_aclsupport; 796 /// typedef bool fattr4_archive; 797 /// typedef bool fattr4_cansettime; 798 /// typedef bool fattr4_case_insensitive; 799 /// typedef bool fattr4_case_preserving; 800 /// typedef bool fattr4_chown_restricted; 801 /// typedef uint64_t fattr4_fileid; 802 /// typedef uint64_t fattr4_files_avail; 803 /// typedef nfs_fh4 fattr4_filehandle; 804 /// typedef uint64_t fattr4_files_free; 805 /// typedef uint64_t fattr4_files_total; 806 /// typedef fs_locations4 fattr4_fs_locations; 807 /// typedef bool fattr4_hidden; 808 /// typedef bool fattr4_homogeneous; 809 /// typedef uint64_t fattr4_maxfilesize; 810 /// typedef uint32_t fattr4_maxlink; 811 /// typedef uint32_t fattr4_maxname; 812 /// typedef uint64_t fattr4_maxread; 813 /// typedef uint64_t fattr4_maxwrite; 814 /// typedef utf8str_cs fattr4_mimetype; 815 /// typedef mode4 fattr4_mode; 816 /// typedef mode_masked4 fattr4_mode_set_masked; 817 /// typedef uint64_t fattr4_mounted_on_fileid; 818 /// typedef bool fattr4_no_trunc; 819 /// typedef uint32_t fattr4_numlinks; 820 /// typedef utf8str_mixed fattr4_owner; 821 /// typedef utf8str_mixed fattr4_owner_group; 822 /// typedef uint64_t fattr4_quota_avail_hard; 823 /// typedef uint64_t fattr4_quota_avail_soft; 824 /// typedef uint64_t fattr4_quota_used; 825 /// typedef specdata4 fattr4_rawdev; 826 /// typedef uint64_t fattr4_space_avail; 827 /// typedef uint64_t fattr4_space_free; 828 /// typedef uint64_t fattr4_space_total; 829 /// typedef uint64_t fattr4_space_used; 830 /// typedef bool fattr4_system; 831 /// typedef nfstime4 fattr4_time_access; 832 /// typedef settime4 fattr4_time_access_set; 833 /// typedef nfstime4 fattr4_time_backup; 834 /// typedef nfstime4 fattr4_time_create; 835 /// typedef nfstime4 fattr4_time_delta; 836 /// typedef nfstime4 fattr4_time_metadata; 837 /// typedef nfstime4 fattr4_time_modify; 838 /// typedef settime4 fattr4_time_modify_set; 839 /// /* 840 /// * attributes new to NFSv4.1 841 /// */ 842 /// typedef nfstime4 fattr4_dir_notif_delay; 843 /// typedef nfstime4 fattr4_dirent_notif_delay; 844 /// typedef bool fattr4_absent; 845 /// typedef layouttype4 fattr4_fs_layout_types<>; 846 /// typedef fs4_status fattr4_fs_status; 847 /// typedef fs_charset_cap4 fattr4_fs_charset_cap4; 848 /// typedef uint32_t fattr4_layout_alignment; 849 /// typedef uint32_t fattr4_layout_blksize; 850 /// typedef layouthint4 fattr4_layout_hint; 851 /// typedef layouttype4 fattr4_layout_types<>; 852 /// typedef mdsthreshold4 fattr4_mdsthreshold; 853 /// typedef retention_get4 fattr4_retention_get; 854 /// typedef retention_set4 fattr4_retention_set; 855 /// typedef retention_get4 fattr4_retentevt_get; 856 /// typedef retention_set4 fattr4_retentevt_set; 857 /// typedef uint64_t fattr4_retention_hold; 858 /// typedef nfsacl41 fattr4_dacl; 859 /// typedef nfsacl41 fattr4_sacl; 860 /// 861 /// 862 /// /* 863 /// * Mandatory Attributes 864 /// */ 865 /// const FATTR4_SUPPORTED_ATTRS = 0; 866 /// const FATTR4_TYPE = 1; 867 /// const FATTR4_FH_EXPIRE_TYPE = 2; 868 /// const FATTR4_CHANGE = 3; 869 /// const FATTR4_SIZE = 4; 870 /// const FATTR4_LINK_SUPPORT = 5; 871 /// const FATTR4_SYMLINK_SUPPORT = 6; 872 /// const FATTR4_NAMED_ATTR = 7; 873 /// const FATTR4_FSID = 8; 874 /// const FATTR4_UNIQUE_HANDLES = 9; 875 /// const FATTR4_LEASE_TIME = 10; 876 /// const FATTR4_RDATTR_ERROR = 11; 877 /// const FATTR4_FILEHANDLE = 19; 878 /// const FATTR4_SUPPATTR_EXCLCREAT = 75; 879 /// 880 /// /* 881 /// * Recommended Attributes 882 /// */ 883 /// const FATTR4_ACL = 12; 884 /// const FATTR4_ACLSUPPORT = 13; 885 /// const FATTR4_ARCHIVE = 14; 886 /// const FATTR4_CANSETTIME = 15; 887 /// const FATTR4_CASE_INSENSITIVE = 16; 888 /// const FATTR4_CASE_PRESERVING = 17; 889 /// const FATTR4_CHOWN_RESTRICTED = 18; 890 /// const FATTR4_FILEID = 20; 891 /// const FATTR4_FILES_AVAIL = 21; 892 /// const FATTR4_FILES_FREE = 22; 893 /// const FATTR4_FILES_TOTAL = 23; 894 /// const FATTR4_FS_LOCATIONS = 24; 895 /// const FATTR4_HIDDEN = 25; 896 /// const FATTR4_HOMOGENEOUS = 26; 897 /// const FATTR4_MAXFILESIZE = 27; 898 /// const FATTR4_MAXLINK = 28; 899 /// const FATTR4_MAXNAME = 29; 900 /// const FATTR4_MAXREAD = 30; 901 /// const FATTR4_MAXWRITE = 31; 902 /// const FATTR4_MIMETYPE = 32; 903 /// const FATTR4_MODE = 33; 904 /// const FATTR4_NO_TRUNC = 34; 905 /// const FATTR4_NUMLINKS = 35; 906 /// const FATTR4_OWNER = 36; 907 /// const FATTR4_OWNER_GROUP = 37; 908 /// const FATTR4_QUOTA_AVAIL_HARD = 38; 909 /// const FATTR4_QUOTA_AVAIL_SOFT = 39; 910 /// const FATTR4_QUOTA_USED = 40; 911 /// const FATTR4_RAWDEV = 41; 912 /// const FATTR4_SPACE_AVAIL = 42; 913 /// const FATTR4_SPACE_FREE = 43; 914 /// const FATTR4_SPACE_TOTAL = 44; 915 /// const FATTR4_SPACE_USED = 45; 916 /// const FATTR4_SYSTEM = 46; 917 /// const FATTR4_TIME_ACCESS = 47; 918 /// const FATTR4_TIME_ACCESS_SET = 48; 919 /// const FATTR4_TIME_BACKUP = 49; 920 /// const FATTR4_TIME_CREATE = 50; 921 /// const FATTR4_TIME_DELTA = 51; 922 /// const FATTR4_TIME_METADATA = 52; 923 /// const FATTR4_TIME_MODIFY = 53; 924 /// const FATTR4_TIME_MODIFY_SET = 54; 925 /// const FATTR4_MOUNTED_ON_FILEID = 55; 926 /// const FATTR4_DIR_NOTIF_DELAY = 56; 927 /// const FATTR4_DIRENT_NOTIF_DELAY = 57; 928 /// const FATTR4_DACL = 58; 929 /// const FATTR4_SACL = 59; 930 /// const FATTR4_CHANGE_POLICY = 60; 931 /// const FATTR4_FS_STATUS = 61; 932 /// const FATTR4_FS_LAYOUT_TYPE = 62; 933 /// const FATTR4_LAYOUT_HINT = 63; 934 /// const FATTR4_LAYOUT_TYPE = 64; 935 /// const FATTR4_LAYOUT_BLKSIZE = 65; 936 /// const FATTR4_LAYOUT_ALIGNMENT = 66; 937 /// const FATTR4_FS_LOCATIONS_INFO = 67; 938 /// const FATTR4_MDSTHRESHOLD = 68; 939 /// const FATTR4_RETENTION_GET = 69; 940 /// const FATTR4_RETENTION_SET = 70; 941 /// const FATTR4_RETENTEVT_GET = 71; 942 /// const FATTR4_RETENTEVT_SET = 72; 943 /// const FATTR4_RETENTION_HOLD = 73; 944 /// const FATTR4_MODE_SET_MASKED = 74; 945 /// const FATTR4_FS_CHARSET_CAP = 76; 946 /// 947 /// /* 948 /// * File attribute container 949 /// */ 950 /// struct fattr4 { 951 /// bitmap4 attrmask; 952 /// attrlist4 attr_vals; 953 /// }; 954 /// 955 /// /* 956 /// * Change info for the client 957 /// */ 958 /// struct change_info4 { 959 /// bool atomic; 960 /// changeid4 before; 961 /// changeid4 after; 962 /// }; 963 /// 964 /// typedef netaddr4 clientaddr4; 965 /// 966 /// /* 967 /// * Callback program info as provided by the client 968 /// */ 969 /// struct cb_client4 { 970 /// uint32_t cb_program; 971 /// netaddr4 cb_location; 972 /// }; 973 /// 974 /// /* 975 /// * NFSv4.0 Long Hand Client ID 976 /// */ 977 /// struct nfs_client_id4 { 978 /// verifier4 verifier; 979 /// opaque id; 980 /// }; 981 /// 982 /// /* 983 /// * NFSv4.1 Client Owner (aka long hand client ID) 984 /// */ 985 /// struct client_owner4 { 986 /// verifier4 co_verifier; 987 /// opaque co_ownerid; 988 /// }; 989 /// 990 /// 991 /// /* 992 /// * NFSv4.1 server Owner 993 /// */ 994 /// struct server_owner4 { 995 /// uint64_t so_minor_id; 996 /// opaque so_major_id; 997 /// }; 998 /// 999 /// 1000 /// struct state_owner4 { 1001 /// clientid4 clientid; 1002 /// opaque owner; 1003 /// }; 1004 /// 1005 /// typedef state_owner4 open_owner4; 1006 /// typedef state_owner4 lock_owner4; 1007 /// 1008 /// 1009 /// enum nfs_lock_type4 { 1010 /// READ_LT = 1, 1011 /// WRITE_LT = 2, 1012 /// READW_LT = 3, /* blocking read */ 1013 /// WRITEW_LT = 4 /* blocking write */ 1014 /// }; 1015 /// 1016 /// 1017 /// % 1018 /// %/* Input for computing subkeys */ 1019 /// enum ssv_subkey4 { 1020 /// SSV4_SUBKEY_MIC_I2T = 1, 1021 /// SSV4_SUBKEY_MIC_T2I = 2, 1022 /// SSV4_SUBKEY_SEAL_I2T = 3, 1023 /// SSV4_SUBKEY_SEAL_T2I = 4 1024 /// }; 1025 /// % 1026 /// 1027 /// % 1028 /// %/* Input for computing smt_hmac */ 1029 /// struct ssv_mic_plain_tkn4 { 1030 /// uint32_t smpt_ssv_seq; 1031 /// opaque smpt_orig_plain<>; 1032 /// }; 1033 /// % 1034 /// 1035 /// % 1036 /// %/* SSV GSS PerMsgToken token */ 1037 /// struct ssv_mic_tkn4 { 1038 /// uint32_t smt_ssv_seq; 1039 /// opaque smt_hmac<>; 1040 /// }; 1041 /// % 1042 /// 1043 /// % 1044 /// %/* Input for computing ssct_encr_data and ssct_hmac */ 1045 /// struct ssv_seal_plain_tkn4 { 1046 /// opaque sspt_confounder<>; 1047 /// uint32_t sspt_ssv_seq; 1048 /// opaque sspt_orig_plain<>; 1049 /// opaque sspt_pad<>; 1050 /// }; 1051 /// % 1052 /// 1053 /// % 1054 /// %/* SSV GSS SealedMessage token */ 1055 /// struct ssv_seal_cipher_tkn4 { 1056 /// uint32_t ssct_ssv_seq; 1057 /// opaque ssct_iv<>; 1058 /// opaque ssct_encr_data<>; 1059 /// opaque ssct_hmac<>; 1060 /// }; 1061 /// % 1062 /// 1063 /// /* 1064 /// * Defines an individual server replica 1065 /// */ 1066 /// struct fs_locations_server4 { 1067 /// int32_t fls_currency; 1068 /// opaque fls_info<>; 1069 /// utf8str_cis fls_server; 1070 /// }; 1071 /// 1072 /// /* 1073 /// * Byte indices of items within 1074 /// * fls_info: flag fields, class numbers, 1075 /// * bytes indicating ranks and orders. 1076 /// */ 1077 /// const FSLI4BX_GFLAGS = 0; 1078 /// const FSLI4BX_TFLAGS = 1; 1079 /// 1080 /// const FSLI4BX_CLSIMUL = 2; 1081 /// const FSLI4BX_CLHANDLE = 3; 1082 /// const FSLI4BX_CLFILEID = 4; 1083 /// const FSLI4BX_CLWRITEVER = 5; 1084 /// const FSLI4BX_CLCHANGE = 6; 1085 /// const FSLI4BX_CLREADDIR = 7; 1086 /// 1087 /// const FSLI4BX_READRANK = 8; 1088 /// const FSLI4BX_WRITERANK = 9; 1089 /// const FSLI4BX_READORDER = 10; 1090 /// const FSLI4BX_WRITEORDER = 11; 1091 /// 1092 /// /* 1093 /// * Bits defined within the general flag byte. 1094 /// */ 1095 /// const FSLI4GF_WRITABLE = 0x01; 1096 /// const FSLI4GF_CUR_REQ = 0x02; 1097 /// const FSLI4GF_ABSENT = 0x04; 1098 /// const FSLI4GF_GOING = 0x08; 1099 /// const FSLI4GF_SPLIT = 0x10; 1100 /// 1101 /// /* 1102 /// * Bits defined within the transport flag byte. 1103 /// */ 1104 /// const FSLI4TF_RDMA = 0x01; 1105 /// 1106 /// /* 1107 /// * Defines a set of replicas sharing 1108 /// * a common value of the root path 1109 /// * with in the corresponding 1110 /// * single-server namespaces. 1111 /// */ 1112 /// struct fs_locations_item4 { 1113 /// fs_locations_server4 fli_entries<>; 1114 /// pathname4 fli_rootpath; 1115 /// }; 1116 /// 1117 /// /* 1118 /// * Defines the overall structure of 1119 /// * the fs_locations_info attribute. 1120 /// */ 1121 /// struct fs_locations_info4 { 1122 /// uint32_t fli_flags; 1123 /// int32_t fli_valid_for; 1124 /// pathname4 fli_fs_root; 1125 /// fs_locations_item4 fli_items<>; 1126 /// }; 1127 /// 1128 /// /* 1129 /// * Flag bits in fli_flags. 1130 /// */ 1131 /// const FSLI4IF_VAR_SUB = 0x00000001; 1132 /// 1133 /// typedef fs_locations_info4 fattr4_fs_locations_info; 1134 /// 1135 /// const NFL4_UFLG_MASK = 0x0000003F; 1136 /// const NFL4_UFLG_DENSE = 0x00000001; 1137 /// const NFL4_UFLG_COMMIT_THRU_MDS = 0x00000002; 1138 /// const NFL4_UFLG_STRIPE_UNIT_SIZE_MASK 1139 /// = 0xFFFFFFC0; 1140 /// 1141 /// typedef uint32_t nfl_util4; 1142 /// 1143 /// % 1144 /// 1145 /// enum filelayout_hint_care4 { 1146 /// NFLH4_CARE_DENSE = NFL4_UFLG_DENSE, 1147 /// 1148 /// NFLH4_CARE_COMMIT_THRU_MDS 1149 /// = NFL4_UFLG_COMMIT_THRU_MDS, 1150 /// 1151 /// NFLH4_CARE_STRIPE_UNIT_SIZE 1152 /// = 0x00000040, 1153 /// 1154 /// NFLH4_CARE_STRIPE_COUNT = 0x00000080 1155 /// }; 1156 /// % 1157 /// %/* Encoded in the loh_body field of type layouthint4: */ 1158 /// % 1159 /// struct nfsv4_1_file_layouthint4 { 1160 /// uint32_t nflh_care; 1161 /// nfl_util4 nflh_util; 1162 /// count4 nflh_stripe_count; 1163 /// }; 1164 /// 1165 /// % 1166 /// 1167 /// % 1168 /// typedef netaddr4 multipath_list4<>; 1169 /// % 1170 /// %/* Encoded in the da_addr_body field of type device_addr4: */ 1171 /// struct nfsv4_1_file_layout_ds_addr4 { 1172 /// uint32_t nflda_stripe_indices<>; 1173 /// multipath_list4 nflda_multipath_ds_list<>; 1174 /// }; 1175 /// 1176 /// % 1177 /// 1178 /// % 1179 /// %/* Encoded in the loc_body field of type layout_content4: */ 1180 /// struct nfsv4_1_file_layout4 { 1181 /// deviceid4 nfl_deviceid; 1182 /// nfl_util4 nfl_util; 1183 /// uint32_t nfl_first_stripe_index; 1184 /// offset4 nfl_pattern_offset; 1185 /// nfs_fh4 nfl_fh_list<>; 1186 /// }; 1187 /// 1188 /// % 1189 /// 1190 /// %/* 1191 /// % * Encoded in the lou_body field of type layoutupdate4: 1192 /// % * Nothing. lou_body is a zero length array of octets. 1193 /// % */ 1194 /// % 1195 /// 1196 /// 1197 /// 1198 /// const ACCESS4_READ = 0x00000001; 1199 /// const ACCESS4_LOOKUP = 0x00000002; 1200 /// const ACCESS4_MODIFY = 0x00000004; 1201 /// const ACCESS4_EXTEND = 0x00000008; 1202 /// const ACCESS4_DELETE = 0x00000010; 1203 /// const ACCESS4_EXECUTE = 0x00000020; 1204 /// 1205 /// struct ACCESS4args { 1206 /// /* CURRENT_FH: object */ 1207 /// uint32_t access; 1208 /// }; 1209 /// 1210 /// struct ACCESS4resok { 1211 /// uint32_t supported; 1212 /// uint32_t access; 1213 /// }; 1214 /// 1215 /// union ACCESS4res switch (nfsstat4 status) { 1216 /// case NFS4_OK: 1218 /// ACCESS4resok resok4; 1219 /// default: 1220 /// void; 1221 /// }; 1222 /// 1223 /// struct CLOSE4args { 1224 /// /* CURRENT_FH: object */ 1225 /// seqid4 seqid; 1226 /// stateid4 open_stateid; 1227 /// }; 1228 /// 1229 /// union CLOSE4res switch (nfsstat4 status) { 1230 /// case NFS4_OK: 1231 /// stateid4 open_stateid; 1232 /// default: 1233 /// void; 1234 /// }; 1235 /// 1236 /// struct COMMIT4args { 1237 /// /* CURRENT_FH: file */ 1238 /// offset4 offset; 1239 /// count4 count; 1240 /// }; 1241 /// 1242 /// struct COMMIT4resok { 1243 /// verifier4 writeverf; 1244 /// }; 1245 /// 1246 /// union COMMIT4res switch (nfsstat4 status) { 1247 /// case NFS4_OK: 1248 /// COMMIT4resok resok4; 1249 /// default: 1250 /// void; 1251 /// }; 1252 /// 1253 /// union createtype4 switch (nfs_ftype4 type) { 1254 /// case NF4LNK: 1255 /// linktext4 linkdata; 1256 /// case NF4BLK: 1257 /// case NF4CHR: 1258 /// specdata4 devdata; 1259 /// case NF4SOCK: 1260 /// case NF4FIFO: 1261 /// case NF4DIR: 1262 /// void; 1263 /// default: 1264 /// void; /* server should return NFS4ERR_BADTYPE */ 1265 /// }; 1266 /// 1267 /// struct CREATE4args { 1268 /// /* CURRENT_FH: directory for creation */ 1269 /// createtype4 objtype; 1270 /// component4 objname; 1271 /// fattr4 createattrs; 1272 /// }; 1273 /// 1274 /// struct CREATE4resok { 1275 /// change_info4 cinfo; 1276 /// bitmap4 attrset; /* attributes set */ 1277 /// }; 1278 /// 1279 /// union CREATE4res switch (nfsstat4 status) { 1280 /// case NFS4_OK: 1281 /// /* new CURRENTFH: created object */ 1282 /// CREATE4resok resok4; 1283 /// default: 1284 /// void; 1285 /// }; 1286 /// 1287 /// struct DELEGPURGE4args { 1288 /// clientid4 clientid; 1289 /// }; 1290 /// 1291 /// struct DELEGPURGE4res { 1292 /// nfsstat4 status; 1293 /// }; 1294 /// 1295 /// struct DELEGRETURN4args { 1296 /// /* CURRENT_FH: delegated object */ 1297 /// stateid4 deleg_stateid; 1298 /// }; 1299 /// 1300 /// struct DELEGRETURN4res { 1301 /// nfsstat4 status; 1302 /// }; 1303 /// 1304 /// struct GETATTR4args { 1305 /// /* CURRENT_FH: object */ 1306 /// bitmap4 attr_request; 1307 /// }; 1308 /// 1309 /// struct GETATTR4resok { 1310 /// fattr4 obj_attributes; 1311 /// }; 1312 /// 1313 /// union GETATTR4res switch (nfsstat4 status) { 1314 /// case NFS4_OK: 1315 /// GETATTR4resok resok4; 1316 /// default: 1317 /// void; 1318 /// }; 1319 /// 1320 /// struct GETFH4resok { 1321 /// nfs_fh4 object; 1322 /// }; 1323 /// 1324 /// union GETFH4res switch (nfsstat4 status) { 1325 /// case NFS4_OK: 1326 /// GETFH4resok resok4; 1327 /// default: 1328 /// void; 1329 /// }; 1330 /// 1331 /// struct LINK4args { 1332 /// /* SAVED_FH: source object */ 1333 /// /* CURRENT_FH: target directory */ 1334 /// component4 newname; 1335 /// }; 1336 /// 1337 /// struct LINK4resok { 1338 /// change_info4 cinfo; 1339 /// }; 1340 /// 1341 /// union LINK4res switch (nfsstat4 status) { 1342 /// case NFS4_OK: 1343 /// LINK4resok resok4; 1344 /// default: 1345 /// void; 1346 /// }; 1347 /// 1348 /// /* 1349 /// * For LOCK, transition from open_stateid and lock_owner 1350 /// * to a lock stateid. 1351 /// */ 1352 /// struct open_to_lock_owner4 { 1353 /// seqid4 open_seqid; 1354 /// stateid4 open_stateid; 1355 /// seqid4 lock_seqid; 1356 /// lock_owner4 lock_owner; 1357 /// }; 1358 /// 1359 /// /* 1360 /// * For LOCK, existing lock stateid continues to request new 1361 /// * file lock for the same lock_owner and open_stateid. 1363 /// */ 1364 /// struct exist_lock_owner4 { 1365 /// stateid4 lock_stateid; 1366 /// seqid4 lock_seqid; 1367 /// }; 1368 /// 1369 /// union locker4 switch (bool new_lock_owner) { 1370 /// case TRUE: 1371 /// open_to_lock_owner4 open_owner; 1372 /// case FALSE: 1373 /// exist_lock_owner4 lock_owner; 1374 /// }; 1375 /// 1376 /// /* 1377 /// * LOCK/LOCKT/LOCKU: Record lock management 1378 /// */ 1379 /// struct LOCK4args { 1380 /// /* CURRENT_FH: file */ 1381 /// nfs_lock_type4 locktype; 1382 /// bool reclaim; 1383 /// offset4 offset; 1384 /// length4 length; 1385 /// locker4 locker; 1386 /// }; 1387 /// 1388 /// struct LOCK4denied { 1389 /// offset4 offset; 1390 /// length4 length; 1391 /// nfs_lock_type4 locktype; 1392 /// lock_owner4 owner; 1393 /// }; 1394 /// 1395 /// struct LOCK4resok { 1396 /// stateid4 lock_stateid; 1397 /// }; 1398 /// 1399 /// union LOCK4res switch (nfsstat4 status) { 1400 /// case NFS4_OK: 1401 /// LOCK4resok resok4; 1402 /// case NFS4ERR_DENIED: 1403 /// LOCK4denied denied; 1404 /// default: 1405 /// void; 1406 /// }; 1407 /// 1408 /// struct LOCKT4args { 1409 /// /* CURRENT_FH: file */ 1410 /// nfs_lock_type4 locktype; 1411 /// offset4 offset; 1412 /// length4 length; 1413 /// lock_owner4 owner; 1414 /// }; 1415 /// 1416 /// union LOCKT4res switch (nfsstat4 status) { 1417 /// case NFS4ERR_DENIED: 1418 /// LOCK4denied denied; 1419 /// case NFS4_OK: 1420 /// void; 1421 /// default: 1422 /// void; 1423 /// }; 1424 /// 1425 /// struct LOCKU4args { 1426 /// /* CURRENT_FH: file */ 1427 /// nfs_lock_type4 locktype; 1428 /// seqid4 seqid; 1429 /// stateid4 lock_stateid; 1430 /// offset4 offset; 1431 /// length4 length; 1432 /// }; 1433 /// 1434 /// union LOCKU4res switch (nfsstat4 status) { 1435 /// case NFS4_OK: 1436 /// stateid4 lock_stateid; 1437 /// default: 1438 /// void; 1439 /// }; 1440 /// 1441 /// struct LOOKUP4args { 1442 /// /* CURRENT_FH: directory */ 1443 /// component4 objname; 1444 /// }; 1445 /// 1446 /// struct LOOKUP4res { 1447 /// /* New CURRENT_FH: object */ 1448 /// nfsstat4 status; 1449 /// }; 1450 /// 1451 /// struct LOOKUPP4res { 1452 /// /* new CURRENT_FH: parent directory */ 1453 /// nfsstat4 status; 1454 /// }; 1455 /// 1456 /// struct NVERIFY4args { 1457 /// /* CURRENT_FH: object */ 1458 /// fattr4 obj_attributes; 1459 /// }; 1460 /// 1461 /// struct NVERIFY4res { 1462 /// nfsstat4 status; 1463 /// }; 1464 /// 1465 /// /* 1466 /// * Various definitions for OPEN 1467 /// */ 1468 /// enum createmode4 { 1469 /// UNCHECKED4 = 0, 1470 /// GUARDED4 = 1, 1471 /// /* Deprecated in NFSv4.1. */ 1472 /// EXCLUSIVE4 = 2, 1473 /// /* 1474 /// * New to NFSv4.1. If session is persistent, 1475 /// * GUARDED4 MUST be used. Otherwise, use 1476 /// * EXCLUSIVE4_1 instead of EXCLUSIVE4. 1477 /// */ 1478 /// EXCLUSIVE4_1 = 3 1479 /// }; 1480 /// 1481 /// struct creatverfattr { 1482 /// verifier4 cva_verf; 1483 /// fattr4 cva_attrs; 1484 /// }; 1485 /// 1486 /// union createhow4 switch (createmode4 mode) { 1487 /// case UNCHECKED4: 1488 /// case GUARDED4: 1489 /// fattr4 createattrs; 1490 /// case EXCLUSIVE4: 1491 /// verifier4 createverf; 1492 /// case EXCLUSIVE4_1: 1493 /// creatverfattr ch_createboth; 1494 /// }; 1495 /// 1496 /// enum opentype4 { 1497 /// OPEN4_NOCREATE = 0, 1498 /// OPEN4_CREATE = 1 1499 /// }; 1500 /// 1501 /// union openflag4 switch (opentype4 opentype) { 1502 /// case OPEN4_CREATE: 1503 /// createhow4 how; 1504 /// default: 1505 /// void; 1506 /// }; 1507 /// 1508 /// /* Next definitions used for OPEN delegation */ 1509 /// enum limit_by4 { 1510 /// NFS_LIMIT_SIZE = 1, 1511 /// NFS_LIMIT_BLOCKS = 2 1512 /// /* others as needed */ 1513 /// }; 1514 /// 1515 /// struct nfs_modified_limit4 { 1516 /// uint32_t num_blocks; 1517 /// uint32_t bytes_per_block; 1518 /// }; 1519 /// 1520 /// union nfs_space_limit4 switch (limit_by4 limitby) { 1521 /// /* limit specified as file size */ 1522 /// case NFS_LIMIT_SIZE: 1523 /// uint64_t filesize; 1524 /// /* limit specified by number of blocks */ 1525 /// case NFS_LIMIT_BLOCKS: 1526 /// nfs_modified_limit4 mod_blocks; 1527 /// } ; 1528 /// 1529 /// /* 1530 /// * Share Access and Deny constants for open argument 1531 /// */ 1532 /// const OPEN4_SHARE_ACCESS_READ = 0x00000001; 1533 /// const OPEN4_SHARE_ACCESS_WRITE = 0x00000002; 1534 /// const OPEN4_SHARE_ACCESS_BOTH = 0x00000003; 1535 /// 1536 /// const OPEN4_SHARE_DENY_NONE = 0x00000000; 1537 /// const OPEN4_SHARE_DENY_READ = 0x00000001; 1538 /// const OPEN4_SHARE_DENY_WRITE = 0x00000002; 1539 /// const OPEN4_SHARE_DENY_BOTH = 0x00000003; 1540 /// 1541 /// 1542 /// /* new flags for share_access field of OPEN4args */ 1543 /// const OPEN4_SHARE_ACCESS_WANT_DELEG_MASK = 0xFF00; 1544 /// const OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE = 0x0000; 1545 /// const OPEN4_SHARE_ACCESS_WANT_READ_DELEG = 0x0100; 1546 /// const OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG = 0x0200; 1547 /// const OPEN4_SHARE_ACCESS_WANT_ANY_DELEG = 0x0300; 1548 /// const OPEN4_SHARE_ACCESS_WANT_NO_DELEG = 0x0400; 1549 /// const OPEN4_SHARE_ACCESS_WANT_CANCEL = 0x0500; 1550 /// 1551 /// const 1552 /// OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL 1553 /// = 0x10000; 1554 /// 1555 /// const 1556 /// OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED 1557 /// = 0x20000; 1558 /// 1559 /// enum open_delegation_type4 { 1560 /// OPEN_DELEGATE_NONE = 0, 1561 /// OPEN_DELEGATE_READ = 1, 1562 /// OPEN_DELEGATE_WRITE = 2, 1563 /// OPEN_DELEGATE_NONE_EXT = 3 /* new to v4.1 */ 1564 /// }; 1565 /// 1566 /// enum open_claim_type4 { 1567 /// /* 1568 /// * Not a reclaim. 1569 /// */ 1570 /// CLAIM_NULL = 0, 1571 /// 1572 /// CLAIM_PREVIOUS = 1, 1573 /// CLAIM_DELEGATE_CUR = 2, 1574 /// CLAIM_DELEGATE_PREV = 3, 1575 /// 1576 /// /* 1577 /// * Not a reclaim. 1578 /// * 1579 /// * Like CLAIM_NULL, but object identified 1580 /// * by the current filehandle. 1581 /// */ 1582 /// CLAIM_FH = 4, /* new to v4.1 */ 1583 /// 1584 /// /* 1585 /// * Like CLAIM_DELEGATE_CUR, but object identified 1586 /// * by current filehandle. 1587 /// */ 1588 /// CLAIM_DELEG_CUR_FH = 5, /* new to v4.1 */ 1589 /// 1590 /// /* 1591 /// * Like CLAIM_DELEGATE_PREV, but object identified 1592 /// * by current filehandle. 1593 /// */ 1594 /// CLAIM_DELEG_PREV_FH = 6 /* new to v4.1 */ 1595 /// }; 1596 /// 1597 /// struct open_claim_delegate_cur4 { 1598 /// stateid4 delegate_stateid; 1599 /// component4 file; 1600 /// }; 1601 /// 1602 /// union open_claim4 switch (open_claim_type4 claim) { 1603 /// /* 1604 /// * No special rights to file. 1605 /// * Ordinary OPEN of the specified file. 1606 /// */ 1607 /// case CLAIM_NULL: 1608 /// /* CURRENT_FH: directory */ 1609 /// component4 file; 1610 /// /* 1611 /// * Right to the file established by an 1612 /// * open previous to server reboot. File 1613 /// * identified by filehandle obtained at 1614 /// * that time rather than by name. 1615 /// */ 1616 /// case CLAIM_PREVIOUS: 1617 /// /* CURRENT_FH: file being reclaimed */ 1618 /// open_delegation_type4 delegate_type; 1619 /// 1620 /// /* 1621 /// * Right to file based on a delegation 1622 /// * granted by the server. File is 1623 /// * specified by name. 1624 /// */ 1625 /// case CLAIM_DELEGATE_CUR: 1626 /// /* CURRENT_FH: directory */ 1627 /// open_claim_delegate_cur4 delegate_cur_info; 1628 /// 1629 /// /* 1630 /// * Right to file based on a delegation 1631 /// * granted to a previous boot instance 1632 /// * of the client. File is specified by name. 1633 /// */ 1634 /// case CLAIM_DELEGATE_PREV: 1635 /// /* CURRENT_FH: directory */ 1636 /// component4 file_delegate_prev; 1637 /// 1638 /// /* 1639 /// * Like CLAIM_NULL. No special rights 1640 /// * to file. Ordinary OPEN of the 1641 /// * specified file by current filehandle. 1642 /// */ 1643 /// case CLAIM_FH: /* new to v4.1 */ 1644 /// /* CURRENT_FH: regular file to open */ 1645 /// void; 1646 /// 1647 /// /* 1648 /// * Like CLAIM_DELEGATE_PREV. Right to file based on a 1649 /// * delegation granted to a previous boot 1650 /// * instance of the client. File is identified by 1651 /// * by filehandle. 1652 /// */ 1653 /// case CLAIM_DELEG_PREV_FH: /* new to v4.1 */ 1654 /// /* CURRENT_FH: file being opened */ 1655 /// void; 1656 /// 1657 /// /* 1658 /// * Like CLAIM_DELEGATE_CUR. Right to file based on 1659 /// * a delegation granted by the server. 1660 /// * File is identified by filehandle. 1661 /// */ 1662 /// case CLAIM_DELEG_CUR_FH: /* new to v4.1 */ 1663 /// /* CURRENT_FH: file being opened */ 1664 /// stateid4 oc_delegate_stateid; 1665 /// 1666 /// }; 1667 /// 1668 /// /* 1669 /// * OPEN: Open a file, potentially receiving an open delegation 1670 /// */ 1671 /// struct OPEN4args { 1672 /// seqid4 seqid; 1673 /// uint32_t share_access; 1674 /// uint32_t share_deny; 1675 /// open_owner4 owner; 1676 /// openflag4 openhow; 1677 /// open_claim4 claim; 1678 /// }; 1679 /// 1680 /// struct open_read_delegation4 { 1681 /// stateid4 stateid; /* Stateid for delegation*/ 1682 /// bool recall; /* Pre-recalled flag for 1683 /// delegations obtained 1684 /// by reclaim (CLAIM_PREVIOUS) */ 1685 /// 1686 /// nfsace4 permissions; /* Defines users who don't 1687 /// need an ACCESS call to 1688 /// open for read */ 1689 /// }; 1690 /// 1691 /// struct open_write_delegation4 { 1692 /// stateid4 stateid; /* Stateid for delegation */ 1693 /// bool recall; /* Pre-recalled flag for 1694 /// delegations obtained 1695 /// by reclaim 1696 /// (CLAIM_PREVIOUS) */ 1697 /// 1698 /// nfs_space_limit4 1699 /// space_limit; /* Defines condition that 1700 /// the client must check to 1701 /// determine whether the 1702 /// file needs to be flushed 1703 /// to the server on close. */ 1704 /// 1705 /// nfsace4 permissions; /* Defines users who don't 1706 /// need an ACCESS call as 1707 /// part of a delegated 1708 /// open. */ 1709 /// }; 1710 /// 1711 /// 1712 /// enum why_no_delegation4 { /* new to v4.1 */ 1713 /// WND4_NOT_WANTED = 0, 1714 /// WND4_CONTENTION = 1, 1715 /// WND4_RESOURCE = 2, 1716 /// WND4_NOT_SUPP_FTYPE = 3, 1717 /// WND4_WRITE_DELEG_NOT_SUPP_FTYPE = 4, 1718 /// WND4_NOT_SUPP_UPGRADE = 5, 1719 /// WND4_NOT_SUPP_DOWNGRADE = 6, 1720 /// WND4_CANCELED = 7, 1721 /// WND4_IS_DIR = 8 1722 /// }; 1723 /// 1724 /// union open_none_delegation4 /* new to v4.1 */ 1725 /// switch (why_no_delegation4 ond_why) { 1726 /// case WND4_CONTENTION: 1727 /// bool ond_server_will_push_deleg; 1728 /// case WND4_RESOURCE: 1729 /// bool ond_server_will_signal_avail; 1730 /// default: 1731 /// void; 1732 /// }; 1733 /// 1734 /// union open_delegation4 1735 /// switch (open_delegation_type4 delegation_type) { 1736 /// case OPEN_DELEGATE_NONE: 1737 /// void; 1738 /// case OPEN_DELEGATE_READ: 1739 /// open_read_delegation4 read; 1740 /// case OPEN_DELEGATE_WRITE: 1741 /// open_write_delegation4 write; 1742 /// case OPEN_DELEGATE_NONE_EXT: /* new to v4.1 */ 1743 /// open_none_delegation4 od_whynone; 1744 /// }; 1745 /// 1746 /// /* 1747 /// * Result flags 1748 /// */ 1749 /// 1750 /// /* Client must confirm open */ 1751 /// const OPEN4_RESULT_CONFIRM = 0x00000002; 1752 /// /* Type of file locking behavior at the server */ 1753 /// const OPEN4_RESULT_LOCKTYPE_POSIX = 0x00000004; 1754 /// /* Server will preserve file if removed while open */ 1755 /// const OPEN4_RESULT_PRESERVE_UNLINKED = 0x00000008; 1756 /// 1757 /// /* 1758 /// * Server may use CB_NOTIFY_LOCK on locks 1759 /// * derived from this open 1760 /// */ 1761 /// const OPEN4_RESULT_MAY_NOTIFY_LOCK = 0x00000020; 1762 /// 1763 /// struct OPEN4resok { 1764 /// stateid4 stateid; /* Stateid for open */ 1765 /// change_info4 cinfo; /* Directory Change Info */ 1766 /// uint32_t rflags; /* Result flags */ 1767 /// bitmap4 attrset; /* attribute set for create*/ 1768 /// open_delegation4 delegation; /* Info on any open 1769 /// delegation */ 1770 /// }; 1771 /// 1772 /// union OPEN4res switch (nfsstat4 status) { 1773 /// case NFS4_OK: 1774 /// /* New CURRENT_FH: opened file */ 1775 /// OPEN4resok resok4; 1776 /// default: 1777 /// void; 1778 /// }; 1779 /// 1780 /// struct OPENATTR4args { 1781 /// /* CURRENT_FH: object */ 1782 /// bool createdir; 1783 /// }; 1784 /// 1785 /// struct OPENATTR4res { 1786 /// /* 1787 /// * If status is NFS4_OK, 1788 /// * new CURRENT_FH: named attribute 1789 /// * directory 1790 /// */ 1791 /// nfsstat4 status; 1792 /// }; 1793 /// 1794 /// /* obsolete in NFSv4.1 */ 1795 /// struct OPEN_CONFIRM4args { 1796 /// /* CURRENT_FH: opened file */ 1797 /// stateid4 open_stateid; 1798 /// seqid4 seqid; 1799 /// }; 1800 /// 1801 /// struct OPEN_CONFIRM4resok { 1802 /// stateid4 open_stateid; 1803 /// }; 1804 /// 1805 /// union OPEN_CONFIRM4res switch (nfsstat4 status) { 1806 /// case NFS4_OK: 1807 /// OPEN_CONFIRM4resok resok4; 1808 /// default: 1809 /// void; 1810 /// }; 1811 /// 1812 /// struct OPEN_DOWNGRADE4args { 1813 /// /* CURRENT_FH: opened file */ 1814 /// stateid4 open_stateid; 1815 /// seqid4 seqid; 1816 /// uint32_t share_access; 1817 /// uint32_t share_deny; 1818 /// }; 1819 /// 1820 /// struct OPEN_DOWNGRADE4resok { 1821 /// stateid4 open_stateid; 1822 /// }; 1823 /// 1824 /// union OPEN_DOWNGRADE4res switch(nfsstat4 status) { 1825 /// case NFS4_OK: 1826 /// OPEN_DOWNGRADE4resok resok4; 1827 /// default: 1828 /// void; 1829 /// }; 1830 /// 1831 /// struct PUTFH4args { 1832 /// nfs_fh4 object; 1833 /// }; 1834 /// 1835 /// struct PUTFH4res { 1836 /// /* 1837 /// * If status is NFS4_OK, 1838 /// * new CURRENT_FH: argument to PUTFH 1839 /// */ 1840 /// nfsstat4 status; 1841 /// }; 1842 /// 1843 /// struct PUTPUBFH4res { 1844 /// /* 1845 /// * If status is NFS4_OK, 1846 /// * new CURRENT_FH: public fh 1847 /// */ 1848 /// nfsstat4 status; 1849 /// }; 1850 /// 1851 /// struct PUTROOTFH4res { 1852 /// /* 1853 /// * If status is NFS4_OK, 1854 /// * new CURRENT_FH: root fh 1855 /// */ 1856 /// nfsstat4 status; 1857 /// }; 1858 /// 1859 /// struct READ4args { 1860 /// /* CURRENT_FH: file */ 1861 /// stateid4 stateid; 1862 /// offset4 offset; 1863 /// count4 count; 1864 /// }; 1865 /// 1866 /// struct READ4resok { 1867 /// bool eof; 1868 /// opaque data<>; 1869 /// }; 1870 /// 1871 /// union READ4res switch (nfsstat4 status) { 1872 /// case NFS4_OK: 1873 /// READ4resok resok4; 1874 /// default: 1875 /// void; 1876 /// }; 1877 /// 1878 /// struct READDIR4args { 1879 /// /* CURRENT_FH: directory */ 1880 /// nfs_cookie4 cookie; 1881 /// verifier4 cookieverf; 1882 /// count4 dircount; 1883 /// count4 maxcount; 1884 /// bitmap4 attr_request; 1885 /// }; 1886 /// 1887 /// struct entry4 { 1888 /// nfs_cookie4 cookie; 1889 /// component4 name; 1890 /// fattr4 attrs; 1891 /// entry4 *nextentry; 1892 /// }; 1893 /// 1894 /// struct dirlist4 { 1895 /// entry4 *entries; 1896 /// bool eof; 1897 /// }; 1898 /// 1899 /// struct READDIR4resok { 1900 /// verifier4 cookieverf; 1901 /// dirlist4 reply; 1902 /// }; 1903 /// 1904 /// 1905 /// union READDIR4res switch (nfsstat4 status) { 1906 /// case NFS4_OK: 1907 /// READDIR4resok resok4; 1908 /// default: 1909 /// void; 1910 /// }; 1911 /// 1912 /// 1913 /// struct READLINK4resok { 1914 /// linktext4 link; 1915 /// }; 1916 /// 1917 /// union READLINK4res switch (nfsstat4 status) { 1918 /// case NFS4_OK: 1919 /// READLINK4resok resok4; 1920 /// default: 1921 /// void; 1922 /// }; 1923 /// 1924 /// struct REMOVE4args { 1925 /// /* CURRENT_FH: directory */ 1926 /// component4 target; 1927 /// }; 1928 /// 1929 /// struct REMOVE4resok { 1930 /// change_info4 cinfo; 1931 /// }; 1932 /// 1933 /// union REMOVE4res switch (nfsstat4 status) { 1934 /// case NFS4_OK: 1935 /// REMOVE4resok resok4; 1936 /// default: 1937 /// void; 1938 /// }; 1939 /// 1940 /// struct RENAME4args { 1941 /// /* SAVED_FH: source directory */ 1942 /// component4 oldname; 1943 /// /* CURRENT_FH: target directory */ 1944 /// component4 newname; 1945 /// }; 1946 /// 1947 /// struct RENAME4resok { 1948 /// change_info4 source_cinfo; 1949 /// change_info4 target_cinfo; 1950 /// }; 1951 /// 1952 /// union RENAME4res switch (nfsstat4 status) { 1953 /// case NFS4_OK: 1954 /// RENAME4resok resok4; 1955 /// default: 1956 /// void; 1957 /// }; 1958 /// 1959 /// /* Obsolete in NFSv4.1 */ 1960 /// struct RENEW4args { 1961 /// clientid4 clientid; 1962 /// }; 1963 /// 1964 /// struct RENEW4res { 1965 /// nfsstat4 status; 1966 /// }; 1967 /// 1968 /// struct RESTOREFH4res { 1969 /// /* 1970 /// * If status is NFS4_OK, 1971 /// * new CURRENT_FH: value of saved fh 1972 /// */ 1973 /// nfsstat4 status; 1974 /// }; 1975 /// 1976 /// struct SAVEFH4res { 1977 /// /* 1978 /// * If status is NFS4_OK, 1979 /// * new SAVED_FH: value of current fh 1980 /// */ 1981 /// nfsstat4 status; 1982 /// }; 1983 /// 1984 /// struct SECINFO4args { 1985 /// /* CURRENT_FH: directory */ 1986 /// component4 name; 1987 /// }; 1988 /// 1989 /// /* 1990 /// * From RFC 2203 1991 /// */ 1992 /// enum rpc_gss_svc_t { 1993 /// RPC_GSS_SVC_NONE = 1, 1994 /// RPC_GSS_SVC_INTEGRITY = 2, 1995 /// RPC_GSS_SVC_PRIVACY = 3 1996 /// }; 1997 /// 1998 /// struct rpcsec_gss_info { 1999 /// sec_oid4 oid; 2000 /// qop4 qop; 2001 /// rpc_gss_svc_t service; 2002 /// }; 2003 /// 2004 /// /* RPCSEC_GSS has a value of '6' - See RFC 2203 */ 2005 /// union secinfo4 switch (uint32_t flavor) { 2006 /// case RPCSEC_GSS: 2007 /// rpcsec_gss_info flavor_info; 2008 /// default: 2009 /// void; 2010 /// }; 2011 /// 2012 /// typedef secinfo4 SECINFO4resok<>; 2013 /// 2014 /// union SECINFO4res switch (nfsstat4 status) { 2015 /// case NFS4_OK: 2016 /// /* CURRENTFH: consumed */ 2017 /// SECINFO4resok resok4; 2018 /// default: 2019 /// void; 2020 /// }; 2021 /// 2022 /// struct SETATTR4args { 2023 /// /* CURRENT_FH: target object */ 2024 /// stateid4 stateid; 2025 /// fattr4 obj_attributes; 2026 /// }; 2027 /// 2028 /// struct SETATTR4res { 2029 /// nfsstat4 status; 2030 /// bitmap4 attrsset; 2031 /// }; 2032 /// 2033 /// /* Obsolete in NFSv4.1 */ 2034 /// struct SETCLIENTID4args { 2035 /// nfs_client_id4 client; 2036 /// cb_client4 callback; 2037 /// uint32_t callback_ident; 2038 /// }; 2039 /// 2040 /// struct SETCLIENTID4resok { 2041 /// clientid4 clientid; 2042 /// verifier4 setclientid_confirm; 2043 /// }; 2044 /// 2045 /// union SETCLIENTID4res switch (nfsstat4 status) { 2046 /// case NFS4_OK: 2047 /// SETCLIENTID4resok resok4; 2048 /// case NFS4ERR_CLID_INUSE: 2049 /// clientaddr4 client_using; 2050 /// default: 2051 /// void; 2052 /// }; 2053 /// 2054 /// /* Obsolete in NFSv4.1 */ 2055 /// struct SETCLIENTID_CONFIRM4args { 2056 /// clientid4 clientid; 2057 /// verifier4 setclientid_confirm; 2058 /// }; 2059 /// 2060 /// struct SETCLIENTID_CONFIRM4res { 2061 /// nfsstat4 status; 2062 /// }; 2063 /// 2064 /// struct VERIFY4args { 2065 /// /* CURRENT_FH: object */ 2066 /// fattr4 obj_attributes; 2067 /// }; 2068 /// 2069 /// struct VERIFY4res { 2070 /// nfsstat4 status; 2071 /// }; 2072 /// 2073 /// enum stable_how4 { 2074 /// UNSTABLE4 = 0, 2075 /// DATA_SYNC4 = 1, 2076 /// FILE_SYNC4 = 2 2077 /// }; 2078 /// 2079 /// struct WRITE4args { 2080 /// /* CURRENT_FH: file */ 2081 /// stateid4 stateid; 2082 /// offset4 offset; 2083 /// stable_how4 stable; 2084 /// opaque data<>; 2085 /// }; 2086 /// 2087 /// struct WRITE4resok { 2088 /// count4 count; 2089 /// stable_how4 committed; 2090 /// verifier4 writeverf; 2091 /// }; 2092 /// 2093 /// union WRITE4res switch (nfsstat4 status) { 2094 /// case NFS4_OK: 2095 /// WRITE4resok resok4; 2096 /// default: 2097 /// void; 2098 /// }; 2099 /// 2100 /// /* Obsolete in NFSv4.1 */ 2101 /// struct RELEASE_LOCKOWNER4args { 2102 /// lock_owner4 lock_owner; 2103 /// }; 2104 /// 2105 /// struct RELEASE_LOCKOWNER4res { 2106 /// nfsstat4 status; 2107 /// }; 2108 /// 2109 /// struct ILLEGAL4res { 2110 /// nfsstat4 status; 2111 /// }; 2112 /// 2113 /// typedef opaque gsshandle4_t<>; 2114 /// 2115 /// struct gss_cb_handles4 { 2116 /// rpc_gss_svc_t gcbp_service; /* RFC 2203 */ 2117 /// gsshandle4_t gcbp_handle_from_server; 2118 /// gsshandle4_t gcbp_handle_from_client; 2119 /// }; 2120 /// 2121 /// union callback_sec_parms4 switch (uint32_t cb_secflavor) { 2122 /// case AUTH_NONE: 2123 /// void; 2124 /// case AUTH_SYS: 2125 /// authsys_parms cbsp_sys_cred; /* RFC 1831 */ 2126 /// case RPCSEC_GSS: 2127 /// gss_cb_handles4 cbsp_gss_handles; 2128 /// }; 2129 /// 2130 /// struct BACKCHANNEL_CTL4args { 2131 /// uint32_t bca_cb_program; 2132 /// callback_sec_parms4 bca_sec_parms<>; 2133 /// }; 2134 /// 2135 /// struct BACKCHANNEL_CTL4res { 2136 /// nfsstat4 bcr_status; 2137 /// }; 2138 /// 2139 /// enum channel_dir_from_client4 { 2140 /// CDFC4_FORE = 0x1, 2141 /// CDFC4_BACK = 0x2, 2142 /// CDFC4_FORE_OR_BOTH = 0x3, 2143 /// CDFC4_BACK_OR_BOTH = 0x7 2144 /// }; 2145 /// 2146 /// struct BIND_CONN_TO_SESSION4args { 2147 /// sessionid4 bctsa_sessid; 2148 /// 2149 /// channel_dir_from_client4 2150 /// bctsa_dir; 2151 /// 2152 /// bool bctsa_use_conn_in_rdma_mode; 2153 /// }; 2154 /// 2155 /// enum channel_dir_from_server4 { 2156 /// CDFS4_FORE = 0x1, 2157 /// CDFS4_BACK = 0x2, 2158 /// CDFS4_BOTH = 0x3 2159 /// }; 2160 /// 2161 /// struct BIND_CONN_TO_SESSION4resok { 2162 /// sessionid4 bctsr_sessid; 2163 /// 2164 /// channel_dir_from_server4 2165 /// bctsr_dir; 2166 /// 2167 /// bool bctsr_use_conn_in_rdma_mode; 2168 /// }; 2169 /// 2170 /// union BIND_CONN_TO_SESSION4res 2171 /// switch (nfsstat4 bctsr_status) { 2172 /// 2173 /// case NFS4_OK: 2174 /// BIND_CONN_TO_SESSION4resok 2175 /// bctsr_resok4; 2176 /// 2177 /// default: void; 2178 /// }; 2179 /// 2180 /// const EXCHGID4_FLAG_SUPP_MOVED_REFER = 0x00000001; 2181 /// const EXCHGID4_FLAG_SUPP_MOVED_MIGR = 0x00000002; 2182 /// 2183 /// const EXCHGID4_FLAG_BIND_PRINC_STATEID = 0x00000100; 2184 /// 2185 /// const EXCHGID4_FLAG_USE_NON_PNFS = 0x00010000; 2186 /// const EXCHGID4_FLAG_USE_PNFS_MDS = 0x00020000; 2187 /// const EXCHGID4_FLAG_USE_PNFS_DS = 0x00040000; 2188 /// 2189 /// const EXCHGID4_FLAG_MASK_PNFS = 0x00070000; 2190 /// 2191 /// const EXCHGID4_FLAG_UPD_CONFIRMED_REC_A = 0x40000000; 2192 /// const EXCHGID4_FLAG_CONFIRMED_R = 0x80000000; 2193 /// 2194 /// struct state_protect_ops4 { 2195 /// bitmap4 spo_must_enforce; 2196 /// bitmap4 spo_must_allow; 2197 /// }; 2198 /// 2199 /// struct ssv_sp_parms4 { 2200 /// state_protect_ops4 ssp_ops; 2201 /// sec_oid4 ssp_hash_algs<>; 2202 /// sec_oid4 ssp_encr_algs<>; 2203 /// uint32_t ssp_window; 2204 /// uint32_t ssp_num_gss_handles; 2205 /// }; 2206 /// 2207 /// enum state_protect_how4 { 2208 /// SP4_NONE = 0, 2209 /// SP4_MACH_CRED = 1, 2210 /// SP4_SSV = 2 2211 /// }; 2212 /// 2213 /// union state_protect4_a switch(state_protect_how4 spa_how) { 2214 /// case SP4_NONE: 2215 /// void; 2216 /// case SP4_MACH_CRED: 2217 /// state_protect_ops4 spa_mach_ops; 2218 /// case SP4_SSV: 2219 /// ssv_sp_parms4 spa_ssv_parms; 2220 /// }; 2221 /// 2222 /// struct EXCHANGE_ID4args { 2223 /// client_owner4 eia_clientowner; 2224 /// uint32_t eia_flags; 2225 /// state_protect4_a eia_state_protect; 2226 /// nfs_impl_id4 eia_client_impl_id<1>; 2227 /// }; 2228 /// 2229 /// struct ssv_prot_info4 { 2230 /// state_protect_ops4 spi_ops; 2231 /// uint32_t spi_hash_alg; 2232 /// uint32_t spi_encr_alg; 2233 /// uint32_t spi_ssv_len; 2234 /// uint32_t spi_window; 2235 /// gsshandle4_t spi_handles<>; 2236 /// }; 2237 /// 2238 /// union state_protect4_r switch(state_protect_how4 spr_how) { 2239 /// case SP4_NONE: 2240 /// void; 2241 /// case SP4_MACH_CRED: 2242 /// state_protect_ops4 spr_mach_ops; 2243 /// case SP4_SSV: 2244 /// ssv_prot_info4 spr_ssv_info; 2245 /// }; 2246 /// 2247 /// struct EXCHANGE_ID4resok { 2248 /// clientid4 eir_clientid; 2249 /// sequenceid4 eir_sequenceid; 2250 /// uint32_t eir_flags; 2251 /// state_protect4_r eir_state_protect; 2252 /// server_owner4 eir_server_owner; 2253 /// opaque eir_server_scope; 2254 /// nfs_impl_id4 eir_server_impl_id<1>; 2255 /// }; 2256 /// 2257 /// union EXCHANGE_ID4res switch (nfsstat4 eir_status) { 2258 /// case NFS4_OK: 2259 /// EXCHANGE_ID4resok eir_resok4; 2260 /// 2261 /// default: 2262 /// void; 2263 /// }; 2264 /// 2265 /// struct channel_attrs4 { 2266 /// count4 ca_headerpadsize; 2267 /// count4 ca_maxrequestsize; 2268 /// count4 ca_maxresponsesize; 2269 /// count4 ca_maxresponsesize_cached; 2270 /// count4 ca_maxoperations; 2271 /// count4 ca_maxrequests; 2272 /// uint32_t ca_rdma_ird<1>; 2273 /// }; 2274 /// 2275 /// const CREATE_SESSION4_FLAG_PERSIST = 0x00000001; 2276 /// const CREATE_SESSION4_FLAG_CONN_BACK_CHAN = 0x00000002; 2277 /// const CREATE_SESSION4_FLAG_CONN_RDMA = 0x00000004; 2278 /// 2279 /// struct CREATE_SESSION4args { 2280 /// clientid4 csa_clientid; 2281 /// sequenceid4 csa_sequence; 2282 /// 2283 /// uint32_t csa_flags; 2284 /// 2285 /// channel_attrs4 csa_fore_chan_attrs; 2286 /// channel_attrs4 csa_back_chan_attrs; 2287 /// 2288 /// uint32_t csa_cb_program; 2289 /// callback_sec_parms4 csa_sec_parms<>; 2290 /// }; 2291 /// 2292 /// struct CREATE_SESSION4resok { 2293 /// sessionid4 csr_sessionid; 2294 /// sequenceid4 csr_sequence; 2295 /// 2296 /// uint32_t csr_flags; 2297 /// 2298 /// channel_attrs4 csr_fore_chan_attrs; 2299 /// channel_attrs4 csr_back_chan_attrs; 2300 /// }; 2301 /// 2302 /// union CREATE_SESSION4res switch (nfsstat4 csr_status) { 2303 /// case NFS4_OK: 2304 /// CREATE_SESSION4resok csr_resok4; 2305 /// default: 2306 /// void; 2307 /// }; 2308 /// 2309 /// struct DESTROY_SESSION4args { 2310 /// sessionid4 dsa_sessionid; 2311 /// }; 2312 /// 2313 /// struct DESTROY_SESSION4res { 2314 /// nfsstat4 dsr_status; 2315 /// }; 2316 /// 2317 /// struct FREE_STATEID4args { 2318 /// stateid4 fsa_stateid; 2319 /// }; 2320 /// 2321 /// struct FREE_STATEID4res { 2322 /// nfsstat4 fsr_status; 2323 /// }; 2324 /// 2325 /// 2326 /// typedef nfstime4 attr_notice4; 2327 /// 2328 /// struct GET_DIR_DELEGATION4args { 2329 /// /* CURRENT_FH: delegated directory */ 2330 /// bool gdda_signal_deleg_avail; 2331 /// bitmap4 gdda_notification_types; 2332 /// attr_notice4 gdda_child_attr_delay; 2333 /// attr_notice4 gdda_dir_attr_delay; 2334 /// bitmap4 gdda_child_attributes; 2335 /// bitmap4 gdda_dir_attributes; 2336 /// }; 2337 /// struct GET_DIR_DELEGATION4resok { 2338 /// verifier4 gddr_cookieverf; 2339 /// /* Stateid for get_dir_delegation */ 2340 /// stateid4 gddr_stateid; 2341 /// /* Which notifications can the server support */ 2342 /// bitmap4 gddr_notification; 2343 /// bitmap4 gddr_child_attributes; 2344 /// bitmap4 gddr_dir_attributes; 2345 /// }; 2346 /// 2347 /// enum gddrnf4_status { 2348 /// GDD4_OK = 0, 2349 /// GDD4_UNAVAIL = 1 2350 /// }; 2351 /// 2352 /// union GET_DIR_DELEGATION4res_non_fatal 2353 /// switch (gddrnf4_status gddrnf_status) { 2354 /// case GDD4_OK: 2355 /// GET_DIR_DELEGATION4resok gddrnf_resok4; 2356 /// case GDD4_UNAVAIL: 2357 /// bool gddrnf_will_signal_deleg_avail; 2358 /// }; 2359 /// 2360 /// union GET_DIR_DELEGATION4res 2361 /// switch (nfsstat4 gddr_status) { 2362 /// case NFS4_OK: 2363 /// GET_DIR_DELEGATION4res_non_fatal gddr_res_non_fatal4; 2364 /// default: 2365 /// void; 2366 /// }; 2367 /// 2368 /// struct GETDEVICEINFO4args { 2369 /// deviceid4 gdia_device_id; 2370 /// layouttype4 gdia_layout_type; 2371 /// count4 gdia_maxcount; 2372 /// bitmap4 gdia_notify_types; 2373 /// }; 2374 /// 2375 /// struct GETDEVICEINFO4resok { 2376 /// device_addr4 gdir_device_addr; 2377 /// bitmap4 gdir_notification; 2378 /// }; 2379 /// 2380 /// union GETDEVICEINFO4res switch (nfsstat4 gdir_status) { 2381 /// case NFS4_OK: 2382 /// GETDEVICEINFO4resok gdir_resok4; 2383 /// case NFS4ERR_TOOSMALL: 2384 /// count4 gdir_mincount; 2385 /// default: 2386 /// void; 2387 /// }; 2388 /// 2389 /// struct GETDEVICELIST4args { 2390 /// /* CURRENT_FH: object belonging to the file system */ 2391 /// layouttype4 gdla_layout_type; 2392 /// 2393 /// /* number of deviceIDs to return */ 2394 /// count4 gdla_maxdevices; 2395 /// 2396 /// nfs_cookie4 gdla_cookie; 2397 /// verifier4 gdla_cookieverf; 2398 /// }; 2399 /// 2400 /// struct GETDEVICELIST4resok { 2401 /// nfs_cookie4 gdlr_cookie; 2402 /// verifier4 gdlr_cookieverf; 2403 /// deviceid4 gdlr_deviceid_list<>; 2404 /// bool gdlr_eof; 2405 /// }; 2406 /// 2407 /// union GETDEVICELIST4res switch (nfsstat4 gdlr_status) { 2408 /// case NFS4_OK: 2409 /// GETDEVICELIST4resok gdlr_resok4; 2410 /// default: 2411 /// void; 2412 /// }; 2413 /// 2414 /// union newtime4 switch (bool nt_timechanged) { 2415 /// case TRUE: 2416 /// nfstime4 nt_time; 2417 /// case FALSE: 2418 /// void; 2419 /// }; 2420 /// 2421 /// union newoffset4 switch (bool no_newoffset) { 2422 /// case TRUE: 2423 /// offset4 no_offset; 2424 /// case FALSE: 2425 /// void; 2426 /// }; 2427 /// 2428 /// struct LAYOUTCOMMIT4args { 2429 /// /* CURRENT_FH: file */ 2430 /// offset4 loca_offset; 2431 /// length4 loca_length; 2432 /// bool loca_reclaim; 2433 /// stateid4 loca_stateid; 2434 /// newoffset4 loca_last_write_offset; 2435 /// newtime4 loca_time_modify; 2436 /// layoutupdate4 loca_layoutupdate; 2437 /// }; 2438 /// union newsize4 switch (bool ns_sizechanged) { 2439 /// case TRUE: 2440 /// length4 ns_size; 2441 /// case FALSE: 2442 /// void; 2443 /// }; 2444 /// 2445 /// struct LAYOUTCOMMIT4resok { 2446 /// newsize4 locr_newsize; 2447 /// }; 2448 /// 2449 /// union LAYOUTCOMMIT4res switch (nfsstat4 locr_status) { 2450 /// case NFS4_OK: 2451 /// LAYOUTCOMMIT4resok locr_resok4; 2452 /// default: 2453 /// void; 2454 /// }; 2455 /// 2456 /// struct LAYOUTGET4args { 2457 /// /* CURRENT_FH: file */ 2458 /// bool loga_signal_layout_avail; 2459 /// layouttype4 loga_layout_type; 2460 /// layoutiomode4 loga_iomode; 2461 /// offset4 loga_offset; 2462 /// length4 loga_length; 2463 /// length4 loga_minlength; 2464 /// stateid4 loga_stateid; 2465 /// count4 loga_maxcount; 2466 /// }; 2467 /// struct LAYOUTGET4resok { 2468 /// bool logr_return_on_close; 2469 /// stateid4 logr_stateid; 2470 /// layout4 logr_layout<>; 2471 /// }; 2472 /// 2473 /// union LAYOUTGET4res switch (nfsstat4 logr_status) { 2474 /// case NFS4_OK: 2475 /// LAYOUTGET4resok logr_resok4; 2476 /// case NFS4ERR_LAYOUTTRYLATER: 2477 /// bool logr_will_signal_layout_avail; 2478 /// default: 2479 /// void; 2480 /// }; 2481 /// 2482 /// 2483 /// struct LAYOUTRETURN4args { 2484 /// /* CURRENT_FH: file */ 2485 /// bool lora_reclaim; 2486 /// layouttype4 lora_layout_type; 2487 /// layoutiomode4 lora_iomode; 2488 /// layoutreturn4 lora_layoutreturn; 2489 /// }; 2490 /// 2491 /// 2492 /// union layoutreturn_stateid switch (bool lrs_present) { 2493 /// case TRUE: 2494 /// stateid4 lrs_stateid; 2495 /// case FALSE: 2496 /// void; 2497 /// }; 2498 /// 2499 /// union LAYOUTRETURN4res switch (nfsstat4 lorr_status) { 2500 /// case NFS4_OK: 2501 /// layoutreturn_stateid lorr_stateid; 2502 /// default: 2503 /// void; 2504 /// }; 2505 /// 2506 /// enum secinfo_style4 { 2507 /// SECINFO_STYLE4_CURRENT_FH = 0, 2508 /// SECINFO_STYLE4_PARENT = 1 2509 /// }; 2510 /// 2511 /// /* CURRENT_FH: object or child directory */ 2512 /// typedef secinfo_style4 SECINFO_NO_NAME4args; 2513 /// 2514 /// /* CURRENTFH: consumed if status is NFS4_OK */ 2515 /// typedef SECINFO4res SECINFO_NO_NAME4res; 2516 /// 2517 /// struct SEQUENCE4args { 2518 /// sessionid4 sa_sessionid; 2519 /// sequenceid4 sa_sequenceid; 2520 /// slotid4 sa_slotid; 2521 /// slotid4 sa_highest_slotid; 2522 /// bool sa_cachethis; 2523 /// }; 2524 /// 2525 /// const SEQ4_STATUS_CB_PATH_DOWN = 0x00000001; 2526 /// const SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING = 0x00000002; 2527 /// const SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED = 0x00000004; 2528 /// const SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED = 0x00000008; 2529 /// const SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED = 0x00000010; 2530 /// const SEQ4_STATUS_ADMIN_STATE_REVOKED = 0x00000020; 2531 /// const SEQ4_STATUS_RECALLABLE_STATE_REVOKED = 0x00000040; 2532 /// const SEQ4_STATUS_LEASE_MOVED = 0x00000080; 2533 /// const SEQ4_STATUS_RESTART_RECLAIM_NEEDED = 0x00000100; 2534 /// const SEQ4_STATUS_CB_PATH_DOWN_SESSION = 0x00000200; 2535 /// const SEQ4_STATUS_BACKCHANNEL_FAULT = 0x00000400; 2536 /// const SEQ4_STATUS_DEVID_CHANGED = 0x00000800; 2537 /// const SEQ4_STATUS_DEVID_DELETED = 0x00001000; 2538 /// 2539 /// struct SEQUENCE4resok { 2540 /// sessionid4 sr_sessionid; 2541 /// sequenceid4 sr_sequenceid; 2542 /// slotid4 sr_slotid; 2543 /// slotid4 sr_highest_slotid; 2544 /// slotid4 sr_target_highest_slotid; 2545 /// uint32_t sr_status_flags; 2546 /// }; 2547 /// 2548 /// union SEQUENCE4res switch (nfsstat4 sr_status) { 2549 /// case NFS4_OK: 2550 /// SEQUENCE4resok sr_resok4; 2551 /// default: 2552 /// void; 2553 /// }; 2554 /// 2555 /// struct ssa_digest_input4 { 2556 /// SEQUENCE4args sdi_seqargs; 2557 /// }; 2558 /// 2559 /// struct SET_SSV4args { 2560 /// opaque ssa_ssv<>; 2561 /// opaque ssa_digest<>; 2562 /// }; 2563 /// 2564 /// struct ssr_digest_input4 { 2565 /// SEQUENCE4res sdi_seqres; 2566 /// }; 2567 /// 2568 /// struct SET_SSV4resok { 2569 /// opaque ssr_digest<>; 2570 /// }; 2571 /// 2572 /// union SET_SSV4res switch (nfsstat4 ssr_status) { 2573 /// case NFS4_OK: 2574 /// SET_SSV4resok ssr_resok4; 2575 /// default: 2576 /// void; 2577 /// }; 2578 /// 2579 /// struct TEST_STATEID4args { 2580 /// stateid4 ts_stateids<>; 2581 /// }; 2582 /// 2583 /// struct TEST_STATEID4resok { 2584 /// nfsstat4 tsr_status_codes<>; 2585 /// }; 2586 /// 2587 /// union TEST_STATEID4res switch (nfsstat4 tsr_status) { 2588 /// case NFS4_OK: 2589 /// TEST_STATEID4resok tsr_resok4; 2590 /// default: 2591 /// void; 2592 /// }; 2593 /// 2594 /// union deleg_claim4 switch (open_claim_type4 dc_claim) { 2595 /// /* 2596 /// * No special rights to object. Ordinary delegation 2597 /// * request of the specified object. Object identified 2598 /// * by filehandle. 2599 /// */ 2600 /// case CLAIM_FH: /* new to v4.1 */ 2601 /// /* CURRENT_FH: object being delegated */ 2602 /// void; 2603 /// 2604 /// /* 2605 /// * Right to file based on a delegation granted 2606 /// * to a previous boot instance of the client. 2607 /// * File is specified by filehandle. 2608 /// */ 2609 /// case CLAIM_DELEG_PREV_FH: /* new to v4.1 */ 2610 /// /* CURRENT_FH: object being delegated */ 2611 /// void; 2612 /// 2613 /// /* 2614 /// * Right to the file established by an open previous 2615 /// * to server reboot. File identified by filehandle. 2616 /// * Used during server reclaim grace period. 2617 /// */ 2618 /// case CLAIM_PREVIOUS: 2619 /// /* CURRENT_FH: object being reclaimed */ 2620 /// open_delegation_type4 dc_delegate_type; 2621 /// }; 2622 /// 2623 /// struct WANT_DELEGATION4args { 2624 /// uint32_t wda_want; 2625 /// deleg_claim4 wda_claim; 2626 /// }; 2627 /// 2628 /// union WANT_DELEGATION4res switch (nfsstat4 wdr_status) { 2629 /// case NFS4_OK: 2630 /// open_delegation4 wdr_resok4; 2631 /// default: 2632 /// void; 2633 /// }; 2634 /// 2635 /// struct DESTROY_CLIENTID4args { 2636 /// clientid4 dca_clientid; 2637 /// }; 2638 /// 2639 /// struct DESTROY_CLIENTID4res { 2640 /// nfsstat4 dcr_status; 2641 /// }; 2642 /// 2643 /// struct RECLAIM_COMPLETE4args { 2644 /// /* 2645 /// * If rca_one_fs TRUE, 2646 /// * 2647 /// * CURRENT_FH: object in 2648 /// * filesystem reclaim is 2649 /// * complete for. 2650 /// */ 2651 /// bool rca_one_fs; 2652 /// }; 2653 /// 2654 /// struct RECLAIM_COMPLETE4res { 2655 /// nfsstat4 rcr_status; 2656 /// }; 2657 /// 2658 /// /* 2659 /// * Operation arrays 2660 /// */ 2661 /// 2662 /// enum nfs_opnum4 { 2663 /// OP_ACCESS = 3, 2664 /// OP_CLOSE = 4, 2665 /// OP_COMMIT = 5, 2666 /// OP_CREATE = 6, 2667 /// OP_DELEGPURGE = 7, 2668 /// OP_DELEGRETURN = 8, 2669 /// OP_GETATTR = 9, 2670 /// OP_GETFH = 10, 2671 /// OP_LINK = 11, 2672 /// OP_LOCK = 12, 2673 /// OP_LOCKT = 13, 2674 /// OP_LOCKU = 14, 2675 /// OP_LOOKUP = 15, 2676 /// OP_LOOKUPP = 16, 2677 /// OP_NVERIFY = 17, 2678 /// OP_OPEN = 18, 2679 /// OP_OPENATTR = 19, 2680 /// OP_OPEN_CONFIRM = 20, /* Mandatory not-to-implement */ 2681 /// OP_OPEN_DOWNGRADE = 21, 2682 /// OP_PUTFH = 22, 2683 /// OP_PUTPUBFH = 23, 2684 /// OP_PUTROOTFH = 24, 2685 /// OP_READ = 25, 2686 /// OP_READDIR = 26, 2687 /// OP_READLINK = 27, 2688 /// OP_REMOVE = 28, 2689 /// OP_RENAME = 29, 2690 /// OP_RENEW = 30, /* Mandatory not-to-implement */ 2691 /// OP_RESTOREFH = 31, 2692 /// OP_SAVEFH = 32, 2693 /// OP_SECINFO = 33, 2694 /// OP_SETATTR = 34, 2695 /// OP_SETCLIENTID = 35, /* Mandatory not-to-implement */ 2696 /// OP_SETCLIENTID_CONFIRM = 36, /* Mandatory not-to-implement */ 2697 /// OP_VERIFY = 37, 2698 /// OP_WRITE = 38, 2699 /// OP_RELEASE_LOCKOWNER = 39, /* Mandatory not-to-implement */ 2700 /// % 2701 /// %/* new operations for NFSv4.1 */ 2702 /// % 2703 /// OP_BACKCHANNEL_CTL = 40, 2704 /// OP_BIND_CONN_TO_SESSION = 41, 2705 /// OP_EXCHANGE_ID = 42, 2706 /// OP_CREATE_SESSION = 43, 2707 /// OP_DESTROY_SESSION = 44, 2708 /// OP_FREE_STATEID = 45, 2709 /// OP_GET_DIR_DELEGATION = 46, 2710 /// OP_GETDEVICEINFO = 47, 2711 /// OP_GETDEVICELIST = 48, 2712 /// OP_LAYOUTCOMMIT = 49, 2713 /// OP_LAYOUTGET = 50, 2714 /// OP_LAYOUTRETURN = 51, 2715 /// OP_SECINFO_NO_NAME = 52, 2716 /// OP_SEQUENCE = 53, 2717 /// OP_SET_SSV = 54, 2718 /// OP_TEST_STATEID = 55, 2719 /// OP_WANT_DELEGATION = 56, 2720 /// OP_DESTROY_CLIENTID = 57, 2721 /// OP_RECLAIM_COMPLETE = 58, 2722 /// OP_ILLEGAL = 10044 2723 /// }; 2724 /// 2725 /// union nfs_argop4 switch (nfs_opnum4 argop) { 2726 /// case OP_ACCESS: ACCESS4args opaccess; 2727 /// case OP_CLOSE: CLOSE4args opclose; 2728 /// case OP_COMMIT: COMMIT4args opcommit; 2729 /// case OP_CREATE: CREATE4args opcreate; 2730 /// case OP_DELEGPURGE: DELEGPURGE4args opdelegpurge; 2731 /// case OP_DELEGRETURN: DELEGRETURN4args opdelegreturn; 2732 /// case OP_GETATTR: GETATTR4args opgetattr; 2733 /// case OP_GETFH: void; 2734 /// case OP_LINK: LINK4args oplink; 2735 /// case OP_LOCK: LOCK4args oplock; 2736 /// case OP_LOCKT: LOCKT4args oplockt; 2737 /// case OP_LOCKU: LOCKU4args oplocku; 2738 /// case OP_LOOKUP: LOOKUP4args oplookup; 2739 /// case OP_LOOKUPP: void; 2740 /// case OP_NVERIFY: NVERIFY4args opnverify; 2741 /// case OP_OPEN: OPEN4args opopen; 2742 /// case OP_OPENATTR: OPENATTR4args opopenattr; 2743 /// 2744 /// /* Not for NFSv4.1 */ 2745 /// case OP_OPEN_CONFIRM: OPEN_CONFIRM4args opopen_confirm; 2746 /// 2747 /// case OP_OPEN_DOWNGRADE: 2748 /// OPEN_DOWNGRADE4args opopen_downgrade; 2749 /// 2750 /// case OP_PUTFH: PUTFH4args opputfh; 2751 /// case OP_PUTPUBFH: void; 2752 /// case OP_PUTROOTFH: void; 2753 /// case OP_READ: READ4args opread; 2754 /// case OP_READDIR: READDIR4args opreaddir; 2755 /// case OP_READLINK: void; 2756 /// case OP_REMOVE: REMOVE4args opremove; 2757 /// case OP_RENAME: RENAME4args oprename; 2758 /// 2759 /// /* Not for NFSv4.1 */ 2760 /// case OP_RENEW: RENEW4args oprenew; 2761 /// 2762 /// case OP_RESTOREFH: void; 2763 /// case OP_SAVEFH: void; 2764 /// case OP_SECINFO: SECINFO4args opsecinfo; 2765 /// case OP_SETATTR: SETATTR4args opsetattr; 2766 /// 2767 /// /* Not for NFSv4.1 */ 2768 /// case OP_SETCLIENTID: SETCLIENTID4args opsetclientid; 2769 /// 2770 /// /* Not for NFSv4.1 */ 2771 /// case OP_SETCLIENTID_CONFIRM: SETCLIENTID_CONFIRM4args 2772 /// opsetclientid_confirm; 2773 /// case OP_VERIFY: VERIFY4args opverify; 2774 /// case OP_WRITE: WRITE4args opwrite; 2775 /// 2776 /// /* Not for NFSv4.1 */ 2777 /// case OP_RELEASE_LOCKOWNER: 2778 /// RELEASE_LOCKOWNER4args 2779 /// oprelease_lockowner; 2780 /// 2781 /// /* Operations new to NFSv4.1 */ 2782 /// case OP_BACKCHANNEL_CTL: 2783 /// BACKCHANNEL_CTL4args opbackchannel_ctl; 2784 /// 2785 /// case OP_BIND_CONN_TO_SESSION: 2786 /// BIND_CONN_TO_SESSION4args 2787 /// opbind_conn_to_session; 2788 /// 2789 /// case OP_EXCHANGE_ID: EXCHANGE_ID4args opexchange_id; 2790 /// 2791 /// case OP_CREATE_SESSION: 2792 /// CREATE_SESSION4args opcreate_session; 2793 /// 2794 /// case OP_DESTROY_SESSION: 2795 /// DESTROY_SESSION4args opdestroy_session; 2796 /// 2797 /// case OP_FREE_STATEID: FREE_STATEID4args opfree_stateid; 2798 /// 2799 /// case OP_GET_DIR_DELEGATION: 2800 /// GET_DIR_DELEGATION4args 2801 /// opget_dir_delegation; 2802 /// 2803 /// case OP_GETDEVICEINFO: GETDEVICEINFO4args opgetdeviceinfo; 2804 /// case OP_GETDEVICELIST: GETDEVICELIST4args opgetdevicelist; 2805 /// case OP_LAYOUTCOMMIT: LAYOUTCOMMIT4args oplayoutcommit; 2806 /// case OP_LAYOUTGET: LAYOUTGET4args oplayoutget; 2807 /// case OP_LAYOUTRETURN: LAYOUTRETURN4args oplayoutreturn; 2808 /// 2809 /// case OP_SECINFO_NO_NAME: 2810 /// SECINFO_NO_NAME4args opsecinfo_no_name; 2811 /// 2812 /// case OP_SEQUENCE: SEQUENCE4args opsequence; 2813 /// case OP_SET_SSV: SET_SSV4args opset_ssv; 2814 /// case OP_TEST_STATEID: TEST_STATEID4args optest_stateid; 2815 /// 2816 /// case OP_WANT_DELEGATION: 2817 /// WANT_DELEGATION4args opwant_delegation; 2818 /// 2819 /// case OP_DESTROY_CLIENTID: 2820 /// DESTROY_CLIENTID4args 2821 /// opdestroy_clientid; 2822 /// 2823 /// case OP_RECLAIM_COMPLETE: 2824 /// RECLAIM_COMPLETE4args 2825 /// opreclaim_complete; 2826 /// 2827 /// /* Operations not new to NFSv4.1 */ 2828 /// case OP_ILLEGAL: void; 2829 /// }; 2830 /// 2831 /// union nfs_resop4 switch (nfs_opnum4 resop) { 2832 /// case OP_ACCESS: ACCESS4res opaccess; 2833 /// case OP_CLOSE: CLOSE4res opclose; 2834 /// case OP_COMMIT: COMMIT4res opcommit; 2835 /// case OP_CREATE: CREATE4res opcreate; 2836 /// case OP_DELEGPURGE: DELEGPURGE4res opdelegpurge; 2837 /// case OP_DELEGRETURN: DELEGRETURN4res opdelegreturn; 2838 /// case OP_GETATTR: GETATTR4res opgetattr; 2839 /// case OP_GETFH: GETFH4res opgetfh; 2840 /// case OP_LINK: LINK4res oplink; 2841 /// case OP_LOCK: LOCK4res oplock; 2842 /// case OP_LOCKT: LOCKT4res oplockt; 2843 /// case OP_LOCKU: LOCKU4res oplocku; 2844 /// case OP_LOOKUP: LOOKUP4res oplookup; 2845 /// case OP_LOOKUPP: LOOKUPP4res oplookupp; 2846 /// case OP_NVERIFY: NVERIFY4res opnverify; 2847 /// case OP_OPEN: OPEN4res opopen; 2848 /// case OP_OPENATTR: OPENATTR4res opopenattr; 2849 /// /* Not for NFSv4.1 */ 2850 /// case OP_OPEN_CONFIRM: OPEN_CONFIRM4res opopen_confirm; 2851 /// 2852 /// case OP_OPEN_DOWNGRADE: 2853 /// OPEN_DOWNGRADE4res 2854 /// opopen_downgrade; 2855 /// 2856 /// case OP_PUTFH: PUTFH4res opputfh; 2857 /// case OP_PUTPUBFH: PUTPUBFH4res opputpubfh; 2858 /// case OP_PUTROOTFH: PUTROOTFH4res opputrootfh; 2859 /// case OP_READ: READ4res opread; 2860 /// case OP_READDIR: READDIR4res opreaddir; 2861 /// case OP_READLINK: READLINK4res opreadlink; 2862 /// case OP_REMOVE: REMOVE4res opremove; 2863 /// case OP_RENAME: RENAME4res oprename; 2864 /// /* Not for NFSv4.1 */ 2865 /// case OP_RENEW: RENEW4res oprenew; 2866 /// case OP_RESTOREFH: RESTOREFH4res oprestorefh; 2867 /// case OP_SAVEFH: SAVEFH4res opsavefh; 2868 /// case OP_SECINFO: SECINFO4res opsecinfo; 2869 /// case OP_SETATTR: SETATTR4res opsetattr; 2870 /// /* Not for NFSv4.1 */ 2871 /// case OP_SETCLIENTID: SETCLIENTID4res opsetclientid; 2872 /// 2873 /// /* Not for NFSv4.1 */ 2874 /// case OP_SETCLIENTID_CONFIRM: 2875 /// SETCLIENTID_CONFIRM4res 2876 /// opsetclientid_confirm; 2877 /// case OP_VERIFY: VERIFY4res opverify; 2878 /// case OP_WRITE: WRITE4res opwrite; 2879 /// 2880 /// /* Not for NFSv4.1 */ 2881 /// case OP_RELEASE_LOCKOWNER: 2882 /// RELEASE_LOCKOWNER4res 2883 /// oprelease_lockowner; 2884 /// 2885 /// /* Operations new to NFSv4.1 */ 2886 /// case OP_BACKCHANNEL_CTL: 2887 /// BACKCHANNEL_CTL4res 2888 /// opbackchannel_ctl; 2889 /// 2890 /// case OP_BIND_CONN_TO_SESSION: 2891 /// BIND_CONN_TO_SESSION4res 2892 /// opbind_conn_to_session; 2893 /// 2894 /// case OP_EXCHANGE_ID: EXCHANGE_ID4res opexchange_id; 2895 /// 2896 /// case OP_CREATE_SESSION: 2897 /// CREATE_SESSION4res 2898 /// opcreate_session; 2899 /// 2900 /// case OP_DESTROY_SESSION: 2901 /// DESTROY_SESSION4res 2902 /// opdestroy_session; 2903 /// 2904 /// case OP_FREE_STATEID: FREE_STATEID4res 2905 /// opfree_stateid; 2906 /// 2907 /// case OP_GET_DIR_DELEGATION: 2908 /// GET_DIR_DELEGATION4res 2909 /// opget_dir_delegation; 2910 /// 2911 /// case OP_GETDEVICEINFO: GETDEVICEINFO4res 2912 /// opgetdeviceinfo; 2913 /// 2914 /// case OP_GETDEVICELIST: GETDEVICELIST4res 2915 /// opgetdevicelist; 2916 /// 2917 /// case OP_LAYOUTCOMMIT: LAYOUTCOMMIT4res oplayoutcommit; 2918 /// case OP_LAYOUTGET: LAYOUTGET4res oplayoutget; 2919 /// case OP_LAYOUTRETURN: LAYOUTRETURN4res oplayoutreturn; 2920 /// 2921 /// case OP_SECINFO_NO_NAME: 2922 /// SECINFO_NO_NAME4res 2923 /// opsecinfo_no_name; 2924 /// 2925 /// case OP_SEQUENCE: SEQUENCE4res opsequence; 2926 /// case OP_SET_SSV: SET_SSV4res opset_ssv; 2927 /// case OP_TEST_STATEID: TEST_STATEID4res optest_stateid; 2928 /// 2929 /// case OP_WANT_DELEGATION: 2930 /// WANT_DELEGATION4res 2931 /// opwant_delegation; 2932 /// 2933 /// case OP_DESTROY_CLIENTID: 2934 /// DESTROY_CLIENTID4res 2935 /// opdestroy_clientid; 2936 /// 2937 /// case OP_RECLAIM_COMPLETE: 2938 /// RECLAIM_COMPLETE4res 2939 /// opreclaim_complete; 2940 /// 2941 /// /* Operations not new to NFSv4.1 */ 2942 /// case OP_ILLEGAL: ILLEGAL4res opillegal; 2943 /// }; 2944 /// 2945 /// struct COMPOUND4args { 2946 /// utf8str_cs tag; 2947 /// uint32_t minorversion; 2948 /// nfs_argop4 argarray<>; 2949 /// }; 2950 /// 2951 /// struct COMPOUND4res { 2952 /// nfsstat4 status; 2953 /// utf8str_cs tag; 2954 /// nfs_resop4 resarray<>; 2955 /// }; 2956 /// 2957 /// 2958 /// /* 2959 /// * Remote file service routines 2960 /// */ 2961 /// program NFS4_PROGRAM { 2962 /// version NFS_V4 { 2963 /// void 2964 /// NFSPROC4_NULL(void) = 0; 2965 /// 2966 /// COMPOUND4res 2967 /// NFSPROC4_COMPOUND(COMPOUND4args) = 1; 2968 /// 2969 /// } = 4; 2970 /// } = 100003; 2971 /// 2972 /// /* 2973 /// * NFS4 Callback Procedure Definitions and Program 2974 /// */ 2975 /// struct CB_GETATTR4args { 2976 /// nfs_fh4 fh; 2977 /// bitmap4 attr_request; 2978 /// }; 2979 /// 2980 /// struct CB_GETATTR4resok { 2981 /// fattr4 obj_attributes; 2982 /// }; 2983 /// 2984 /// union CB_GETATTR4res switch (nfsstat4 status) { 2985 /// case NFS4_OK: 2986 /// CB_GETATTR4resok resok4; 2987 /// default: 2988 /// void; 2989 /// }; 2990 /// 2991 /// struct CB_RECALL4args { 2992 /// stateid4 stateid; 2993 /// bool truncate; 2994 /// nfs_fh4 fh; 2995 /// }; 2996 /// 2997 /// struct CB_RECALL4res { 2998 /// nfsstat4 status; 2999 /// }; 3000 /// 3001 /// /* 3002 /// * CB_ILLEGAL: Response for illegal operation numbers 3003 /// */ 3004 /// struct CB_ILLEGAL4res { 3005 /// nfsstat4 status; 3006 /// }; 3007 /// 3008 /// /* 3009 /// * NFSv4.1 callback arguments and results 3010 /// */ 3011 /// 3012 /// enum layoutrecall_type4 { 3013 /// LAYOUTRECALL4_FILE = LAYOUT4_RET_REC_FILE, 3014 /// LAYOUTRECALL4_FSID = LAYOUT4_RET_REC_FSID, 3015 /// LAYOUTRECALL4_ALL = LAYOUT4_RET_REC_ALL 3016 /// }; 3017 /// 3018 /// struct layoutrecall_file4 { 3019 /// nfs_fh4 lor_fh; 3020 /// offset4 lor_offset; 3021 /// length4 lor_length; 3022 /// stateid4 lor_stateid; 3023 /// }; 3024 /// 3025 /// union layoutrecall4 switch(layoutrecall_type4 lor_recalltype) { 3026 /// case LAYOUTRECALL4_FILE: 3027 /// layoutrecall_file4 lor_layout; 3028 /// case LAYOUTRECALL4_FSID: 3029 /// fsid4 lor_fsid; 3030 /// case LAYOUTRECALL4_ALL: 3031 /// void; 3032 /// }; 3033 /// 3034 /// struct CB_LAYOUTRECALL4args { 3035 /// layouttype4 clora_type; 3036 /// layoutiomode4 clora_iomode; 3037 /// bool clora_changed; 3038 /// layoutrecall4 clora_recall; 3039 /// }; 3040 /// struct CB_LAYOUTRECALL4res { 3041 /// nfsstat4 clorr_status; 3042 /// }; 3043 /// 3044 /// /* 3045 /// * Directory notification types. 3046 /// */ 3047 /// enum notify_type4 { 3048 /// NOTIFY4_CHANGE_CHILD_ATTRS = 0, 3049 /// NOTIFY4_CHANGE_DIR_ATTRS = 1, 3050 /// NOTIFY4_REMOVE_ENTRY = 2, 3051 /// NOTIFY4_ADD_ENTRY = 3, 3052 /// NOTIFY4_RENAME_ENTRY = 4, 3053 /// NOTIFY4_CHANGE_COOKIE_VERIFIER = 5 3054 /// }; 3055 /// 3056 /// /* Changed entry information. */ 3057 /// struct notify_entry4 { 3058 /// component4 ne_file; 3059 /// fattr4 ne_attrs; 3060 /// }; 3061 /// 3062 /// /* Previous entry information */ 3063 /// struct prev_entry4 { 3064 /// notify_entry4 pe_prev_entry; 3065 /// /* what READDIR returned for this entry */ 3066 /// nfs_cookie4 pe_prev_entry_cookie; 3067 /// }; 3068 /// 3069 /// struct notify_remove4 { 3070 /// notify_entry4 nrm_old_entry; 3071 /// nfs_cookie4 nrm_old_entry_cookie; 3072 /// }; 3073 /// 3074 /// struct notify_add4 { 3075 /// /* 3076 /// * Information on object 3077 /// * possibly renamed over. 3078 /// */ 3079 /// notify_remove4 nad_old_entry<1>; 3080 /// notify_entry4 nad_new_entry; 3081 /// /* what READDIR would have returned for this entry */ 3082 /// nfs_cookie4 nad_new_entry_cookie<1>; 3083 /// prev_entry4 nad_prev_entry<1>; 3084 /// bool nad_last_entry; 3085 /// }; 3086 /// 3087 /// struct notify_attr4 { 3088 /// notify_entry4 na_changed_entry; 3089 /// }; 3090 /// 3091 /// struct notify_rename4 { 3092 /// notify_remove4 nrn_old_entry; 3093 /// notify_add4 nrn_new_entry; 3094 /// }; 3095 /// 3096 /// struct notify_verifier4 { 3097 /// verifier4 nv_old_cookieverf; 3098 /// verifier4 nv_new_cookieverf; 3099 /// }; 3100 /// 3101 /// /* 3102 /// * Objects of type notify_<>4 and 3103 /// * notify_device_<>4 are encoded in this. 3104 /// */ 3105 /// typedef opaque notifylist4<>; 3106 /// 3107 /// struct notify4 { 3108 /// /* composed from notify_type4 or notify_deviceid_type4 */ 3109 /// bitmap4 notify_mask; 3110 /// notifylist4 notify_vals; 3111 /// }; 3112 /// 3113 /// struct CB_NOTIFY4args { 3114 /// stateid4 cna_stateid; 3115 /// nfs_fh4 cna_fh; 3116 /// notify4 cna_changes<>; 3117 /// }; 3118 /// 3119 /// struct CB_NOTIFY4res { 3120 /// nfsstat4 cnr_status; 3121 /// }; 3122 /// 3123 /// struct CB_PUSH_DELEG4args { 3124 /// nfs_fh4 cpda_fh; 3125 /// open_delegation4 cpda_delegation; 3126 /// 3127 /// }; 3128 /// 3129 /// struct CB_PUSH_DELEG4res { 3130 /// nfsstat4 cpdr_status; 3131 /// }; 3132 /// 3133 /// const RCA4_TYPE_MASK_RDATA_DLG = 0; 3134 /// const RCA4_TYPE_MASK_WDATA_DLG = 1; 3135 /// const RCA4_TYPE_MASK_DIR_DLG = 2; 3136 /// const RCA4_TYPE_MASK_FILE_LAYOUT = 3; 3137 /// const RCA4_TYPE_MASK_BLK_LAYOUT = 4; 3138 /// const RCA4_TYPE_MASK_OBJ_LAYOUT_MIN = 8; 3139 /// const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX = 9; 3140 /// const RCA4_TYPE_MASK_OTHER_LAYOUT_MIN = 12; 3141 /// const RCA4_TYPE_MASK_OTHER_LAYOUT_MAX = 15; 3142 /// 3143 /// struct CB_RECALL_ANY4args { 3144 /// uint32_t craa_objects_to_keep; 3145 /// bitmap4 craa_type_mask; 3146 /// }; 3147 /// 3148 /// struct CB_RECALL_ANY4res { 3149 /// nfsstat4 crar_status; 3150 /// }; 3151 /// 3152 /// typedef CB_RECALL_ANY4args CB_RECALLABLE_OBJ_AVAIL4args; 3153 /// 3154 /// struct CB_RECALLABLE_OBJ_AVAIL4res { 3155 /// nfsstat4 croa_status; 3156 /// }; 3157 /// 3158 /// struct CB_RECALL_SLOT4args { 3159 /// slotid4 rsa_target_highest_slotid; 3160 /// }; 3161 /// 3162 /// struct CB_RECALL_SLOT4res { 3163 /// nfsstat4 rsr_status; 3164 /// }; 3165 /// 3166 /// struct referring_call4 { 3167 /// sequenceid4 rc_sequenceid; 3168 /// slotid4 rc_slotid; 3169 /// }; 3170 /// 3171 /// struct referring_call_list4 { 3172 /// sessionid4 rcl_sessionid; 3173 /// referring_call4 rcl_referring_calls<>; 3174 /// }; 3175 /// 3176 /// struct CB_SEQUENCE4args { 3177 /// sessionid4 csa_sessionid; 3178 /// sequenceid4 csa_sequenceid; 3179 /// slotid4 csa_slotid; 3180 /// slotid4 csa_highest_slotid; 3181 /// bool csa_cachethis; 3182 /// referring_call_list4 csa_referring_call_lists<>; 3183 /// }; 3184 /// 3185 /// struct CB_SEQUENCE4resok { 3186 /// sessionid4 csr_sessionid; 3187 /// sequenceid4 csr_sequenceid; 3188 /// slotid4 csr_slotid; 3189 /// slotid4 csr_highest_slotid; 3190 /// slotid4 csr_target_highest_slotid; 3191 /// }; 3192 /// 3193 /// union CB_SEQUENCE4res switch (nfsstat4 csr_status) { 3194 /// case NFS4_OK: 3195 /// CB_SEQUENCE4resok csr_resok4; 3196 /// default: 3197 /// void; 3198 /// }; 3199 /// 3200 /// struct CB_WANTS_CANCELLED4args { 3201 /// bool cwca_contended_wants_cancelled; 3202 /// bool cwca_resourced_wants_cancelled; 3203 /// }; 3204 /// 3205 /// struct CB_WANTS_CANCELLED4res { 3206 /// nfsstat4 cwcr_status; 3207 /// }; 3208 /// 3209 /// struct CB_NOTIFY_LOCK4args { 3210 /// nfs_fh4 cnla_fh; 3211 /// lock_owner4 cnla_lock_owner; 3212 /// }; 3213 /// 3214 /// struct CB_NOTIFY_LOCK4res { 3215 /// nfsstat4 cnlr_status; 3216 /// }; 3217 /// 3218 /// /* 3219 /// * Device notification types. 3220 /// */ 3221 /// enum notify_deviceid_type4 { 3222 /// NOTIFY_DEVICEID4_CHANGE = 1, 3223 /// NOTIFY_DEVICEID4_DELETE = 2 3224 /// }; 3225 /// 3226 /// /* For NOTIFY4_DEVICEID4_DELETE */ 3227 /// struct notify_deviceid_delete4 { 3228 /// layouttype4 ndd_layouttype; 3229 /// deviceid4 ndd_deviceid; 3230 /// }; 3231 /// 3232 /// /* For NOTIFY4_DEVICEID4_CHANGE */ 3233 /// struct notify_deviceid_change4 { 3234 /// layouttype4 ndc_layouttype; 3235 /// deviceid4 ndc_deviceid; 3236 /// bool ndc_immediate; 3237 /// }; 3238 /// 3239 /// struct CB_NOTIFY_DEVICEID4args { 3240 /// notify4 cnda_changes<>; 3241 /// }; 3242 /// 3243 /// struct CB_NOTIFY_DEVICEID4res { 3244 /// nfsstat4 cndr_status; 3245 /// }; 3246 /// 3247 /// /* 3248 /// * Various definitions for CB_COMPOUND 3249 /// */ 3250 /// % 3251 /// enum nfs_cb_opnum4 { 3252 /// OP_CB_GETATTR = 3, 3253 /// OP_CB_RECALL = 4, 3254 /// %/* Callback operations new to NFSv4.1 */ 3255 /// OP_CB_LAYOUTRECALL = 5, 3256 /// OP_CB_NOTIFY = 6, 3257 /// OP_CB_PUSH_DELEG = 7, 3258 /// OP_CB_RECALL_ANY = 8, 3259 /// OP_CB_RECALLABLE_OBJ_AVAIL = 9, 3260 /// OP_CB_RECALL_SLOT = 10, 3261 /// OP_CB_SEQUENCE = 11, 3262 /// OP_CB_WANTS_CANCELLED = 12, 3263 /// OP_CB_NOTIFY_LOCK = 13, 3264 /// OP_CB_NOTIFY_DEVICEID = 14, 3265 /// 3266 /// OP_CB_ILLEGAL = 10044 3267 /// }; 3268 /// 3269 /// union nfs_cb_argop4 switch (unsigned argop) { 3270 /// case OP_CB_GETATTR: 3271 /// CB_GETATTR4args opcbgetattr; 3272 /// case OP_CB_RECALL: 3273 /// CB_RECALL4args opcbrecall; 3274 /// case OP_CB_LAYOUTRECALL: 3275 /// CB_LAYOUTRECALL4args opcblayoutrecall; 3276 /// case OP_CB_NOTIFY: 3277 /// CB_NOTIFY4args opcbnotify; 3278 /// case OP_CB_PUSH_DELEG: 3279 /// CB_PUSH_DELEG4args opcbpush_deleg; 3280 /// case OP_CB_RECALL_ANY: 3281 /// CB_RECALL_ANY4args opcbrecall_any; 3282 /// case OP_CB_RECALLABLE_OBJ_AVAIL: 3284 /// CB_RECALLABLE_OBJ_AVAIL4args opcbrecallable_obj_avail; 3285 /// case OP_CB_RECALL_SLOT: 3286 /// CB_RECALL_SLOT4args opcbrecall_slot; 3287 /// case OP_CB_SEQUENCE: 3288 /// CB_SEQUENCE4args opcbsequence; 3289 /// case OP_CB_WANTS_CANCELLED: 3290 /// CB_WANTS_CANCELLED4args opcbwants_cancelled; 3291 /// case OP_CB_NOTIFY_LOCK: 3292 /// CB_NOTIFY_LOCK4args opcbnotify_lock; 3293 /// case OP_CB_NOTIFY_DEVICEID: 3294 /// CB_NOTIFY_DEVICEID4args opcbnotify_deviceid; 3295 /// case OP_CB_ILLEGAL: void; 3296 /// }; 3297 /// 3298 /// union nfs_cb_resop4 switch (unsigned resop) { 3299 /// case OP_CB_GETATTR: CB_GETATTR4res opcbgetattr; 3300 /// case OP_CB_RECALL: CB_RECALL4res opcbrecall; 3301 /// 3302 /// /* new NFSv4.1 operations */ 3303 /// case OP_CB_LAYOUTRECALL: 3304 /// CB_LAYOUTRECALL4res 3305 /// opcblayoutrecall; 3306 /// 3307 /// case OP_CB_NOTIFY: CB_NOTIFY4res opcbnotify; 3308 /// 3309 /// case OP_CB_PUSH_DELEG: CB_PUSH_DELEG4res 3310 /// opcbpush_deleg; 3311 /// 3312 /// case OP_CB_RECALL_ANY: CB_RECALL_ANY4res 3313 /// opcbrecall_any; 3314 /// 3315 /// case OP_CB_RECALLABLE_OBJ_AVAIL: 3316 /// CB_RECALLABLE_OBJ_AVAIL4res 3317 /// opcbrecallable_obj_avail; 3318 /// 3319 /// case OP_CB_RECALL_SLOT: 3320 /// CB_RECALL_SLOT4res 3321 /// opcbrecall_slot; 3322 /// 3323 /// case OP_CB_SEQUENCE: CB_SEQUENCE4res opcbsequence; 3324 /// 3325 /// case OP_CB_WANTS_CANCELLED: 3326 /// CB_WANTS_CANCELLED4res 3327 /// opcbwants_cancelled; 3328 /// 3329 /// case OP_CB_NOTIFY_LOCK: 3330 /// CB_NOTIFY_LOCK4res 3331 /// opcbnotify_lock; 3332 /// 3333 /// case OP_CB_NOTIFY_DEVICEID: 3334 /// CB_NOTIFY_DEVICEID4res 3335 /// opcbnotify_deviceid; 3336 /// 3337 /// /* Not new operation */ 3338 /// case OP_CB_ILLEGAL: CB_ILLEGAL4res opcbillegal; 3339 /// }; 3340 /// 3341 /// 3342 /// struct CB_COMPOUND4args { 3343 /// utf8str_cs tag; 3344 /// uint32_t minorversion; 3345 /// uint32_t callback_ident; 3346 /// nfs_cb_argop4 argarray<>; 3347 /// }; 3348 /// 3349 /// struct CB_COMPOUND4res { 3350 /// nfsstat4 status; 3351 /// utf8str_cs tag; 3352 /// nfs_cb_resop4 resarray<>; 3353 /// }; 3354 /// 3355 /// 3356 /// 3357 /// /* 3358 /// * Program number is in the transient range since the client 3359 /// * will assign the exact transient program number and provide 3360 /// * that to the server via the SETCLIENTID operation. 3361 /// */ 3362 /// program NFS4_CALLBACK { 3363 /// version NFS_CB { 3364 /// void 3365 /// CB_NULL(void) = 0; 3366 /// CB_COMPOUND4res 3367 /// CB_COMPOUND(CB_COMPOUND4args) = 1; 3368 /// } = 1; 3369 /// } = 0x40000000; 3371 3373 3. Security Considerations 3375 See the Security Considerations section of [4]. 3377 4. IANA Considerations 3379 See the IANA Considerations section of [4]. 3381 5. Normative References 3383 [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement 3384 Levels", March 1997. 3386 [2] IETF Trust, "Legal Provisions Relating to IETF Documents", 3387 November 2008. 3389 [3] Eisler, M., "XDR: External Data Representation Standard", 3390 STD 67, RFC 4506, May 2006. 3392 [4] Shepler, S., Eisler, M., and D. Noveck, "NFS Version 4 Minor 3393 Version 1", draft-ietf-nfsv4-minorversion1-29 (work in 3394 progress), Dec 2008. 3396 Appendix A. Acknowledgements 3398 The authors are grateful to Lars Eggert for navigating the 3399 intellectual property issues of this document. 3401 Appendix B. RFC Editor Notes 3403 o [RFC Editor: please delete this section before publishing] 3405 o [RFC Editor: after the appearance of, 3407 * This code was derived from [RFC3530]. Please 3408 * reproduce this note if possible. 3410 please add this text with the three leading forward slashes on 3411 each line of text (so that the text shows up in the self- 3412 extracting Code Component): 3414 * This code was derived from [RFCTBD1]. Please 3415 * reproduce this note if possible. 3417 where TBD1 is replaced with the number of the RFC that will 3418 replace draft-ietf-nfsv4-minorversion1-xx.txt [4].] 3420 o [RFC Editor: please replace these lines, 3421 * 3422 * This file was machine generated for 3423 * draft-ietf-nfsv4-minorversion1-xx 3424 * Last updated 3426 with this text with the three leading forward slashes on each line 3427 of text (so that the text shows up in the Code Component): 3429 * 3430 * This file was machine generated for RFCTBD1 3432 where TBD1 is replaced with the RFC number of 3433 draft-ietf-nfsv4-minorversion1-xx.txt [4].] 3435 o [RFC Editor: please replace the entry in the "Normative 3436 References" section that identifies 3437 draft-ietf-nfsv4-minorversion1-xx.txt with an entry that describes 3438 RFCTBD1, where TBD1 is replaced with the number of the RFC that 3439 will replace draft-ietf-nfsv4-minorversion1-xx.txt. ] 3441 o [RFC Editor: please replace all appearances of 3442 draft-ietf-nfsv4-minorversion1-xx.txt with RFCTBD1, where TBD1 is 3443 the number of the RFC that will replace 3444 draft-ietf-nfsv4-minorversion1-xx.txt.] 3446 Authors' Addresses 3448 Spencer Shepler 3449 Storspeed, Inc. 3450 7808 Moonflower Drive 3451 Austin, TX 78750 3452 USA 3454 Phone: +1-512-402-5811 ext 8530 3455 Email: shepler@storspeed.com 3457 Mike Eisler 3458 NetApp 3459 5765 Chase Point Circle 3460 Colorado Springs, CO 80919 3461 USA 3463 Phone: +1-719-599-9026 3464 Email: mike@eisler.com 3465 David Noveck 3466 NetApp 3467 1601 Trapelo Road, Suite 16 3468 Waltham, MA 02454 3469 USA 3471 Phone: +1-781-768-5347 3472 Email: dnoveck@netapp.com