idnits 2.17.1 draft-ietf-nfsv4-rfc3530bis-dot-x-16.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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. -- The abstract seems to indicate that this document obsoletes RFC1813, but the header doesn't have an 'Obsoletes:' line to match this. -- The abstract seems to indicate that this document obsoletes RFC3530, but the header doesn't have an 'Obsoletes:' line to match this. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 262 has weird spacing: '...xpected comp...' == Line 628 has weird spacing: '...ned int cb_...' == Line 689 has weird spacing: '...S4resok reso...' == Line 719 has weird spacing: '...T4resok reso...' == Line 785 has weird spacing: '...R4resok resok...' == (11 more instances...) == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (February 25, 2013) is 4050 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. 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: '12' on line 638 == Outdated reference: A later version (-35) exists of draft-ietf-nfsv4-rfc3530bis-25 Summary: 1 error (**), 0 flaws (~~), 10 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NFSv4 T. Haynes, Ed. 3 Internet-Draft NetApp 4 Intended status: Standards Track D. Noveck, Ed. 5 Expires: August 29, 2013 EMC 6 February 25, 2013 8 Network File System (NFS) Version 4 9 External Data Representation Standard (XDR) Description 10 draft-ietf-nfsv4-rfc3530bis-dot-x-16.txt 12 Abstract 14 The Network File System (NFS) version 4 is a distributed filesystem 15 protocol which owes heritage to NFS protocol version 2, RFC 1094, and 16 version 3, RFC 1813. Unlike earlier versions, the NFS version 4 17 protocol supports traditional file access while integrating support 18 for file locking and the mount protocol. In addition, support for 19 strong security (and its negotiation), compound operations, client 20 caching, and internationalization have been added. Of course, 21 attention has been applied to making NFS version 4 operate well in an 22 Internet environment. 24 RFC3530bis is formally obsoleting RFC 3530. But this document, 25 together with RFC3530bis replaces RFC 3530 as the definition of the 26 NFS version 4 protocol. 28 Requirements Language 30 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 31 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 32 document are to be interpreted as described in RFC 2119 [RFC2119]. 34 Status of this Memo 36 This Internet-Draft is submitted in full conformance with the 37 provisions of BCP 78 and BCP 79. 39 Internet-Drafts are working documents of the Internet Engineering 40 Task Force (IETF). Note that other groups may also distribute 41 working documents as Internet-Drafts. The list of current Internet- 42 Drafts is at http://datatracker.ietf.org/drafts/current/. 44 Internet-Drafts are draft documents valid for a maximum of six months 45 and may be updated, replaced, or obsoleted by other documents at any 46 time. It is inappropriate to use Internet-Drafts as reference 47 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on August 29, 2013. 50 Copyright Notice 52 Copyright (c) 2013 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (http://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 This document may contain material from IETF Documents or IETF 66 Contributions published or made publicly available before November 67 10, 2008. The person(s) controlling the copyright in some of this 68 material may not have granted the IETF Trust the right to allow 69 modifications of such material outside the IETF Standards Process. 70 Without obtaining an adequate license from the person(s) controlling 71 the copyright in such materials, this document may not be modified 72 outside the IETF Standards Process, and derivative works of it may 73 not be created outside the IETF Standards Process, except to format 74 it for publication as an RFC or to translate it into languages other 75 than English. 77 Table of Contents 79 1. XDR Description of NFSv4.0 . . . . . . . . . . . . . . . . . . 4 80 2. Security Considerations . . . . . . . . . . . . . . . . . . . 37 81 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 82 4. Normative References . . . . . . . . . . . . . . . . . . . . . 37 83 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 37 84 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 38 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 38 87 1. XDR Description of NFSv4.0 89 This document contains the XDR ([RFC4506]) description of NFSv4.0 90 protocol ([I-D.ietf-nfsv4-rfc3530bis]). 92 The XDR description is provided in this document in a way that makes 93 it simple for the reader to extract into ready to compile form. The 94 reader can feed this document in the following shell script to 95 produce the machine readable XDR description of NFSv4.0: 97 #!/bin/sh 98 grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??' 100 I.e. if the above script is stored in a file called "extract.sh", and 101 this document is in a file called "spec.txt", then the reader can do: 103 sh extract.sh < spec.txt > nfs4_prot.x 105 The effect of the script is to remove leading white space from each 106 line, plus a sentinel sequence of "///". 108 The XDR description, with the sentinel sequence follows: 110 /// /* 111 /// * This file was machine generated for 112 /// * draft-ietf-nfsv4-rfc3530bis-25 113 /// * Last updated Mon Feb 25 09:38:54 PST 2013 114 /// */ 115 /// /* 116 /// * Copyright (C) The IETF Trust (2009-2011) 117 /// * All Rights Reserved. 118 /// * 119 /// * Copyright (C) The Internet Society (1998-2011). 120 /// * All Rights Reserved. 121 /// */ 122 /// 123 /// /* 124 /// * nfs4_prot.x 125 /// * 126 /// */ 127 /// 128 /// /* 129 /// * Basic typedefs for RFC 1832 data type definitions 130 /// */ 131 /// /* 132 /// * typedef int int32_t; 133 /// * typedef unsigned int uint32_t; 134 /// * typedef hyper int64_t; 135 /// * typedef unsigned hyper uint64_t; 136 /// */ 137 /// 138 /// /* 139 /// * Sizes 140 /// */ 141 /// const NFS4_FHSIZE = 128; 142 /// const NFS4_VERIFIER_SIZE = 8; 143 /// const NFS4_OPAQUE_LIMIT = 1024; 144 /// 145 /// const NFS4_INT64_MAX = 0x7fffffffffffffff; 146 /// const NFS4_UINT64_MAX = 0xffffffffffffffff; 147 /// const NFS4_INT32_MAX = 0x7fffffff; 148 /// const NFS4_UINT32_MAX = 0xffffffff; 149 /// 150 /// 151 /// /* 152 /// * File types 153 /// */ 154 /// enum nfs_ftype4 { 155 /// NF4REG = 1, /* Regular File */ 156 /// NF4DIR = 2, /* Directory */ 157 /// NF4BLK = 3, /* Special File - block device */ 158 /// NF4CHR = 4, /* Special File - character device */ 159 /// NF4LNK = 5, /* Symbolic Link */ 160 /// NF4SOCK = 6, /* Special File - socket */ 161 /// NF4FIFO = 7, /* Special File - fifo */ 162 /// NF4ATTRDIR 163 /// = 8, /* Attribute Directory */ 164 /// NF4NAMEDATTR 165 /// = 9 /* Named Attribute */ 166 /// }; 167 /// 168 /// /* 169 /// * Error status 170 /// */ 171 /// enum nfsstat4 { 172 /// NFS4_OK = 0, /* everything is okay */ 173 /// NFS4ERR_PERM = 1, /* caller not privileged */ 174 /// NFS4ERR_NOENT = 2, /* no such file/directory */ 175 /// NFS4ERR_IO = 5, /* hard I/O error */ 176 /// NFS4ERR_NXIO = 6, /* no such device */ 177 /// NFS4ERR_ACCESS = 13, /* access denied */ 178 /// NFS4ERR_EXIST = 17, /* file already exists */ 179 /// NFS4ERR_XDEV = 18, /* different filesystems */ 180 /// /* Unused/reserved 19 */ 181 /// NFS4ERR_NOTDIR = 20, /* should be a directory */ 182 /// NFS4ERR_ISDIR = 21, /* should not be directory */ 183 /// NFS4ERR_INVAL = 22, /* invalid argument */ 184 /// NFS4ERR_FBIG = 27, /* file exceeds server max */ 185 /// NFS4ERR_NOSPC = 28, /* no space on filesystem */ 186 /// NFS4ERR_ROFS = 30, /* read-only filesystem */ 187 /// NFS4ERR_MLINK = 31, /* too many hard links */ 188 /// NFS4ERR_NAMETOOLONG = 63, /* name exceeds server max */ 189 /// NFS4ERR_NOTEMPTY = 66, /* directory not empty */ 190 /// NFS4ERR_DQUOT = 69, /* hard quota limit reached*/ 191 /// NFS4ERR_STALE = 70, /* file no longer exists */ 192 /// NFS4ERR_BADHANDLE = 10001,/* Illegal filehandle */ 193 /// NFS4ERR_BAD_COOKIE = 10003,/* READDIR cookie is stale */ 194 /// NFS4ERR_NOTSUPP = 10004,/* operation not supported */ 195 /// NFS4ERR_TOOSMALL = 10005,/* response limit exceeded */ 196 /// NFS4ERR_SERVERFAULT = 10006,/* undefined server error */ 197 /// NFS4ERR_BADTYPE = 10007,/* type invalid for CREATE */ 198 /// NFS4ERR_DELAY = 10008,/* file "busy" - retry */ 199 /// NFS4ERR_SAME = 10009,/* nverify says attrs same */ 200 /// NFS4ERR_DENIED = 10010,/* lock unavailable */ 201 /// NFS4ERR_EXPIRED = 10011,/* lock lease expired */ 202 /// NFS4ERR_LOCKED = 10012,/* I/O failed due to lock */ 203 /// NFS4ERR_GRACE = 10013,/* in grace period */ 204 /// NFS4ERR_FHEXPIRED = 10014,/* filehandle expired */ 205 /// NFS4ERR_SHARE_DENIED = 10015,/* share reserve denied */ 206 /// NFS4ERR_WRONGSEC = 10016,/* wrong security flavor */ 207 /// NFS4ERR_CLID_INUSE = 10017,/* clientid in use */ 208 /// NFS4ERR_RESOURCE = 10018,/* resource exhaustion */ 209 /// NFS4ERR_MOVED = 10019,/* filesystem relocated */ 210 /// NFS4ERR_NOFILEHANDLE = 10020,/* current FH is not set */ 211 /// NFS4ERR_MINOR_VERS_MISMATCH = 10021,/* minor vers not supp */ 212 /// NFS4ERR_STALE_CLIENTID = 10022,/* server has rebooted */ 213 /// NFS4ERR_STALE_STATEID = 10023,/* server has rebooted */ 214 /// NFS4ERR_OLD_STATEID = 10024,/* state is out of sync */ 215 /// NFS4ERR_BAD_STATEID = 10025,/* incorrect stateid */ 216 /// NFS4ERR_BAD_SEQID = 10026,/* request is out of seq. */ 217 /// NFS4ERR_NOT_SAME = 10027,/* verify - attrs not same */ 218 /// NFS4ERR_LOCK_RANGE = 10028,/* lock range not supported*/ 219 /// NFS4ERR_SYMLINK = 10029,/* should be file/directory*/ 220 /// NFS4ERR_RESTOREFH = 10030,/* no saved filehandle */ 221 /// NFS4ERR_LEASE_MOVED = 10031,/* some filesystem moved */ 222 /// NFS4ERR_ATTRNOTSUPP = 10032,/* recommended attr not sup*/ 223 /// NFS4ERR_NO_GRACE = 10033,/* reclaim outside of grace*/ 224 /// NFS4ERR_RECLAIM_BAD = 10034,/* reclaim error at server */ 225 /// NFS4ERR_RECLAIM_CONFLICT = 10035,/* conflict on reclaim */ 226 /// NFS4ERR_BADXDR = 10036,/* XDR decode failed */ 227 /// NFS4ERR_LOCKS_HELD = 10037,/* file locks held at CLOSE*/ 228 /// NFS4ERR_OPENMODE = 10038,/* conflict in OPEN and I/O*/ 229 /// NFS4ERR_BADOWNER = 10039,/* owner translation bad */ 230 /// NFS4ERR_BADCHAR = 10040,/* utf-8 char not supported*/ 231 /// NFS4ERR_BADNAME = 10041,/* name not supported */ 232 /// NFS4ERR_BAD_RANGE = 10042,/* lock range not supported*/ 233 /// NFS4ERR_LOCK_NOTSUPP = 10043,/* no atomic up/downgrade */ 234 /// NFS4ERR_OP_ILLEGAL = 10044,/* undefined operation */ 235 /// NFS4ERR_DEADLOCK = 10045,/* file locking deadlock */ 236 /// NFS4ERR_FILE_OPEN = 10046,/* open file blocks op. */ 237 /// NFS4ERR_ADMIN_REVOKED = 10047,/* lockowner state revoked */ 238 /// NFS4ERR_CB_PATH_DOWN = 10048 /* callback path down */ 239 /// }; 240 /// 241 /// /* 242 /// * Basic data types 243 /// */ 244 /// typedef opaque attrlist4<>; 245 /// typedef uint32_t bitmap4<>; 246 /// typedef uint64_t changeid4; 247 /// typedef uint64_t clientid4; 248 /// typedef uint32_t count4; 249 /// typedef uint64_t length4; 250 /// typedef uint32_t mode4; 251 /// typedef uint64_t nfs_cookie4; 252 /// typedef opaque nfs_fh4; 253 /// typedef uint64_t offset4; 254 /// typedef uint32_t qop4; 255 /// typedef opaque sec_oid4<>; 256 /// typedef uint32_t seqid4; 257 /// typedef opaque utf8string<>; 258 /// typedef utf8string utf8_expected; 259 /// typedef utf8string utf8val_RECOMMENDED4; 260 /// typedef utf8string utf8val_REQUIRED4; 261 /// typedef utf8string ascii_REQUIRED4; 262 /// typedef utf8_expected comptag4; 263 /// typedef utf8val_RECOMMENDED4 component4; 264 /// typedef utf8val_RECOMMENDED4 linktext4; 265 /// typedef component4 pathname4<>; 266 /// typedef uint64_t nfs_lockid4; 267 /// typedef opaque verifier4[NFS4_VERIFIER_SIZE]; 268 /// 269 /// 270 /// /* 271 /// * Timeval 272 /// */ 273 /// struct nfstime4 { 274 /// int64_t seconds; 275 /// uint32_t nseconds; 276 /// }; 277 /// 278 /// enum time_how4 { 279 /// SET_TO_SERVER_TIME4 = 0, 280 /// SET_TO_CLIENT_TIME4 = 1 281 /// }; 282 /// 283 /// union settime4 switch (time_how4 set_it) { 284 /// case SET_TO_CLIENT_TIME4: 285 /// nfstime4 time; 286 /// default: 287 /// void; 288 /// }; 289 /// 290 /// 291 /// 292 /// /* 293 /// * File attribute definitions 294 /// */ 295 /// 296 /// /* 297 /// * FSID structure for major/minor 298 /// */ 299 /// struct fsid4 { 300 /// uint64_t major; 301 /// uint64_t minor; 302 /// }; 303 /// 304 /// 305 /// /* 306 /// * Filesystem locations attribute for relocation/migration 307 /// */ 308 /// struct fs_location4 { 309 /// utf8val_REQUIRED4 server<>; 310 /// pathname4 rootpath; 311 /// }; 312 /// 313 /// struct fs_locations4 { 314 /// pathname4 fs_root; 315 /// fs_location4 locations<>; 316 /// }; 317 /// 318 /// 319 /// /* 320 /// * Various Access Control Entry definitions 321 /// */ 322 /// 323 /// /* 324 /// * Mask that indicates which Access Control Entries 325 /// * are supported. Values for the fattr4_aclsupport attribute. 327 /// */ 328 /// const ACL4_SUPPORT_ALLOW_ACL = 0x00000001; 329 /// const ACL4_SUPPORT_DENY_ACL = 0x00000002; 330 /// const ACL4_SUPPORT_AUDIT_ACL = 0x00000004; 331 /// const ACL4_SUPPORT_ALARM_ACL = 0x00000008; 332 /// 333 /// 334 /// typedef uint32_t acetype4; 335 /// 336 /// 337 /// /* 338 /// * acetype4 values, others can be added as needed. 339 /// */ 340 /// const ACE4_ACCESS_ALLOWED_ACE_TYPE = 0x00000000; 341 /// const ACE4_ACCESS_DENIED_ACE_TYPE = 0x00000001; 342 /// const ACE4_SYSTEM_AUDIT_ACE_TYPE = 0x00000002; 343 /// const ACE4_SYSTEM_ALARM_ACE_TYPE = 0x00000003; 344 /// 345 /// 346 /// 347 /// /* 348 /// * ACE flag 349 /// */ 350 /// typedef uint32_t aceflag4; 351 /// 352 /// 353 /// /* 354 /// * ACE flag values 355 /// */ 356 /// const ACE4_FILE_INHERIT_ACE = 0x00000001; 357 /// const ACE4_DIRECTORY_INHERIT_ACE = 0x00000002; 358 /// const ACE4_NO_PROPAGATE_INHERIT_ACE = 0x00000004; 359 /// const ACE4_INHERIT_ONLY_ACE = 0x00000008; 360 /// const ACE4_SUCCESSFUL_ACCESS_ACE_FLAG = 0x00000010; 361 /// const ACE4_FAILED_ACCESS_ACE_FLAG = 0x00000020; 362 /// const ACE4_IDENTIFIER_GROUP = 0x00000040; 363 /// 364 /// 365 /// 366 /// /* 367 /// * ACE mask 368 /// */ 369 /// typedef uint32_t acemask4; 370 /// 371 /// 372 /// /* 373 /// * ACE mask values 374 /// */ 375 /// const ACE4_READ_DATA = 0x00000001; 376 /// const ACE4_LIST_DIRECTORY = 0x00000001; 377 /// const ACE4_WRITE_DATA = 0x00000002; 378 /// const ACE4_ADD_FILE = 0x00000002; 379 /// const ACE4_APPEND_DATA = 0x00000004; 380 /// const ACE4_ADD_SUBDIRECTORY = 0x00000004; 381 /// const ACE4_READ_NAMED_ATTRS = 0x00000008; 382 /// const ACE4_WRITE_NAMED_ATTRS = 0x00000010; 383 /// const ACE4_EXECUTE = 0x00000020; 384 /// const ACE4_DELETE_CHILD = 0x00000040; 385 /// const ACE4_READ_ATTRIBUTES = 0x00000080; 386 /// const ACE4_WRITE_ATTRIBUTES = 0x00000100; 387 /// 388 /// const ACE4_DELETE = 0x00010000; 389 /// const ACE4_READ_ACL = 0x00020000; 390 /// const ACE4_WRITE_ACL = 0x00040000; 391 /// const ACE4_WRITE_OWNER = 0x00080000; 392 /// const ACE4_SYNCHRONIZE = 0x00100000; 393 /// 394 /// 395 /// /* 396 /// * ACE4_GENERIC_READ -- defined as combination of 397 /// * ACE4_READ_ACL | 398 /// * ACE4_READ_DATA | 399 /// * ACE4_READ_ATTRIBUTES | 400 /// * ACE4_SYNCHRONIZE 401 /// */ 402 /// 403 /// const ACE4_GENERIC_READ = 0x00120081; 404 /// 405 /// /* 406 /// * ACE4_GENERIC_WRITE -- defined as combination of 407 /// * ACE4_READ_ACL | 408 /// * ACE4_WRITE_DATA | 409 /// * ACE4_WRITE_ATTRIBUTES | 410 /// * ACE4_WRITE_ACL | 411 /// * ACE4_APPEND_DATA | 412 /// * ACE4_SYNCHRONIZE 413 /// */ 414 /// const ACE4_GENERIC_WRITE = 0x00160106; 415 /// 416 /// 417 /// /* 418 /// * ACE4_GENERIC_EXECUTE -- defined as combination of 419 /// * ACE4_READ_ACL 420 /// * ACE4_READ_ATTRIBUTES 421 /// * ACE4_EXECUTE 422 /// * ACE4_SYNCHRONIZE 423 /// */ 424 /// const ACE4_GENERIC_EXECUTE = 0x001200A0; 425 /// 426 /// 427 /// /* 428 /// * Access Control Entry definition 429 /// */ 430 /// struct nfsace4 { 431 /// acetype4 type; 432 /// aceflag4 flag; 433 /// acemask4 access_mask; 434 /// utf8val_REQUIRED4 who; 435 /// }; 436 /// 437 /// 438 /// /* 439 /// * Field definitions for the fattr4_mode attribute 440 /// */ 441 /// const MODE4_SUID = 0x800; /* set user id on execution */ 442 /// const MODE4_SGID = 0x400; /* set group id on execution */ 443 /// const MODE4_SVTX = 0x200; /* save text even after use */ 444 /// const MODE4_RUSR = 0x100; /* read permission: owner */ 445 /// const MODE4_WUSR = 0x080; /* write permission: owner */ 446 /// const MODE4_XUSR = 0x040; /* execute permission: owner */ 447 /// const MODE4_RGRP = 0x020; /* read permission: group */ 448 /// const MODE4_WGRP = 0x010; /* write permission: group */ 449 /// const MODE4_XGRP = 0x008; /* execute permission: group */ 450 /// const MODE4_ROTH = 0x004; /* read permission: other */ 451 /// const MODE4_WOTH = 0x002; /* write permission: other */ 452 /// const MODE4_XOTH = 0x001; /* execute permission: other */ 453 /// 454 /// 455 /// /* 456 /// * Special data/attribute associated with 457 /// * file types NF4BLK and NF4CHR. 458 /// */ 459 /// struct specdata4 { 460 /// uint32_t specdata1; /* major device number */ 461 /// uint32_t specdata2; /* minor device number */ 462 /// }; 463 /// 464 /// 465 /// /* 466 /// * Values for fattr4_fh_expire_type 467 /// */ 468 /// const FH4_PERSISTENT = 0x00000000; 469 /// const FH4_NOEXPIRE_WITH_OPEN = 0x00000001; 470 /// const FH4_VOLATILE_ANY = 0x00000002; 471 /// const FH4_VOL_MIGRATION = 0x00000004; 472 /// const FH4_VOL_RENAME = 0x00000008; 473 /// 474 /// 475 /// typedef bitmap4 fattr4_supported_attrs; 476 /// typedef nfs_ftype4 fattr4_type; 477 /// typedef uint32_t fattr4_fh_expire_type; 478 /// typedef changeid4 fattr4_change; 479 /// typedef uint64_t fattr4_size; 480 /// typedef bool fattr4_link_support; 481 /// typedef bool fattr4_symlink_support; 482 /// typedef bool fattr4_named_attr; 483 /// typedef fsid4 fattr4_fsid; 484 /// typedef bool fattr4_unique_handles; 485 /// typedef uint32_t fattr4_lease_time; 486 /// typedef nfsstat4 fattr4_rdattr_error; 487 /// 488 /// typedef nfsace4 fattr4_acl<>; 489 /// typedef uint32_t fattr4_aclsupport; 490 /// typedef bool fattr4_archive; 491 /// typedef bool fattr4_cansettime; 492 /// typedef bool fattr4_case_insensitive; 493 /// typedef bool fattr4_case_preserving; 494 /// typedef bool fattr4_chown_restricted; 495 /// typedef uint64_t fattr4_fileid; 496 /// typedef uint64_t fattr4_files_avail; 497 /// typedef nfs_fh4 fattr4_filehandle; 498 /// typedef uint64_t fattr4_files_free; 499 /// typedef uint64_t fattr4_files_total; 500 /// typedef fs_locations4 fattr4_fs_locations; 501 /// typedef bool fattr4_hidden; 502 /// typedef bool fattr4_homogeneous; 503 /// typedef uint64_t fattr4_maxfilesize; 504 /// typedef uint32_t fattr4_maxlink; 505 /// typedef uint32_t fattr4_maxname; 506 /// typedef uint64_t fattr4_maxread; 507 /// typedef uint64_t fattr4_maxwrite; 508 /// typedef ascii_REQUIRED4 fattr4_mimetype; 509 /// typedef mode4 fattr4_mode; 510 /// typedef uint64_t fattr4_mounted_on_fileid; 511 /// typedef bool fattr4_no_trunc; 512 /// typedef uint32_t fattr4_numlinks; 513 /// typedef utf8val_REQUIRED4 fattr4_owner; 514 /// typedef utf8val_REQUIRED4 fattr4_owner_group; 515 /// typedef uint64_t fattr4_quota_avail_hard; 516 /// typedef uint64_t fattr4_quota_avail_soft; 517 /// typedef uint64_t fattr4_quota_used; 518 /// typedef specdata4 fattr4_rawdev; 519 /// typedef uint64_t fattr4_space_avail; 520 /// typedef uint64_t fattr4_space_free; 521 /// typedef uint64_t fattr4_space_total; 522 /// typedef uint64_t fattr4_space_used; 523 /// typedef bool fattr4_system; 524 /// typedef nfstime4 fattr4_time_access; 525 /// typedef settime4 fattr4_time_access_set; 526 /// typedef nfstime4 fattr4_time_backup; 527 /// typedef nfstime4 fattr4_time_create; 528 /// typedef nfstime4 fattr4_time_delta; 529 /// typedef nfstime4 fattr4_time_metadata; 530 /// typedef nfstime4 fattr4_time_modify; 531 /// typedef settime4 fattr4_time_modify_set; 532 /// 533 /// 534 /// /* 535 /// * Mandatory Attributes 536 /// */ 537 /// const FATTR4_SUPPORTED_ATTRS = 0; 538 /// const FATTR4_TYPE = 1; 539 /// const FATTR4_FH_EXPIRE_TYPE = 2; 540 /// const FATTR4_CHANGE = 3; 541 /// const FATTR4_SIZE = 4; 542 /// const FATTR4_LINK_SUPPORT = 5; 543 /// const FATTR4_SYMLINK_SUPPORT = 6; 544 /// const FATTR4_NAMED_ATTR = 7; 545 /// const FATTR4_FSID = 8; 546 /// const FATTR4_UNIQUE_HANDLES = 9; 547 /// const FATTR4_LEASE_TIME = 10; 548 /// const FATTR4_RDATTR_ERROR = 11; 549 /// const FATTR4_FILEHANDLE = 19; 550 /// 551 /// /* 552 /// * Recommended Attributes 553 /// */ 554 /// const FATTR4_ACL = 12; 555 /// const FATTR4_ACLSUPPORT = 13; 556 /// const FATTR4_ARCHIVE = 14; 557 /// const FATTR4_CANSETTIME = 15; 558 /// const FATTR4_CASE_INSENSITIVE = 16; 559 /// const FATTR4_CASE_PRESERVING = 17; 560 /// const FATTR4_CHOWN_RESTRICTED = 18; 561 /// const FATTR4_FILEID = 20; 562 /// const FATTR4_FILES_AVAIL = 21; 563 /// const FATTR4_FILES_FREE = 22; 564 /// const FATTR4_FILES_TOTAL = 23; 565 /// const FATTR4_FS_LOCATIONS = 24; 566 /// const FATTR4_HIDDEN = 25; 567 /// const FATTR4_HOMOGENEOUS = 26; 568 /// const FATTR4_MAXFILESIZE = 27; 569 /// const FATTR4_MAXLINK = 28; 570 /// const FATTR4_MAXNAME = 29; 571 /// const FATTR4_MAXREAD = 30; 572 /// const FATTR4_MAXWRITE = 31; 573 /// const FATTR4_MIMETYPE = 32; 574 /// const FATTR4_MODE = 33; 575 /// const FATTR4_NO_TRUNC = 34; 576 /// const FATTR4_NUMLINKS = 35; 577 /// const FATTR4_OWNER = 36; 578 /// const FATTR4_OWNER_GROUP = 37; 579 /// const FATTR4_QUOTA_AVAIL_HARD = 38; 580 /// const FATTR4_QUOTA_AVAIL_SOFT = 39; 581 /// const FATTR4_QUOTA_USED = 40; 582 /// const FATTR4_RAWDEV = 41; 583 /// const FATTR4_SPACE_AVAIL = 42; 584 /// const FATTR4_SPACE_FREE = 43; 585 /// const FATTR4_SPACE_TOTAL = 44; 586 /// const FATTR4_SPACE_USED = 45; 587 /// const FATTR4_SYSTEM = 46; 588 /// const FATTR4_TIME_ACCESS = 47; 589 /// const FATTR4_TIME_ACCESS_SET = 48; 590 /// const FATTR4_TIME_BACKUP = 49; 591 /// const FATTR4_TIME_CREATE = 50; 592 /// const FATTR4_TIME_DELTA = 51; 593 /// const FATTR4_TIME_METADATA = 52; 594 /// const FATTR4_TIME_MODIFY = 53; 595 /// const FATTR4_TIME_MODIFY_SET = 54; 596 /// const FATTR4_MOUNTED_ON_FILEID = 55; 597 /// 598 /// /* 599 /// * File attribute container 600 /// */ 601 /// struct fattr4 { 602 /// bitmap4 attrmask; 603 /// attrlist4 attr_vals; 604 /// }; 605 /// 606 /// 607 /// /* 608 /// * Change info for the client 609 /// */ 610 /// struct change_info4 { 611 /// bool atomic; 612 /// changeid4 before; 613 /// changeid4 after; 614 /// }; 615 /// 616 /// 617 /// struct clientaddr4 { 618 /// /* see struct rpcb in RFC 1833 */ 619 /// string r_netid<>; /* network id */ 620 /// string r_addr<>; /* universal address */ 621 /// }; 622 /// 623 /// 624 /// /* 625 /// * Callback program info as provided by the client 626 /// */ 627 /// struct cb_client4 { 628 /// unsigned int cb_program; 629 /// clientaddr4 cb_location; 630 /// }; 631 /// 632 /// 633 /// /* 634 /// * Stateid 635 /// */ 636 /// struct stateid4 { 637 /// uint32_t seqid; 638 /// opaque other[12]; 639 /// }; 640 /// 641 /// /* 642 /// * Client ID 643 /// */ 644 /// struct nfs_client_id4 { 645 /// verifier4 verifier; 646 /// opaque id; 647 /// }; 648 /// 649 /// 650 /// struct open_owner4 { 651 /// clientid4 clientid; 652 /// opaque owner; 653 /// }; 654 /// 655 /// 656 /// struct lock_owner4 { 657 /// clientid4 clientid; 658 /// opaque owner; 659 /// }; 660 /// 661 /// 662 /// enum nfs_lock_type4 { 663 /// READ_LT = 1, 664 /// WRITE_LT = 2, 665 /// READW_LT = 3, /* blocking read */ 666 /// WRITEW_LT = 4 /* blocking write */ 667 /// }; 668 /// 669 /// 670 /// const ACCESS4_READ = 0x00000001; 671 /// const ACCESS4_LOOKUP = 0x00000002; 672 /// const ACCESS4_MODIFY = 0x00000004; 673 /// const ACCESS4_EXTEND = 0x00000008; 674 /// const ACCESS4_DELETE = 0x00000010; 675 /// const ACCESS4_EXECUTE = 0x00000020; 676 /// 677 /// struct ACCESS4args { 678 /// /* CURRENT_FH: object */ 679 /// uint32_t access; 680 /// }; 681 /// 682 /// struct ACCESS4resok { 683 /// uint32_t supported; 684 /// uint32_t access; 685 /// }; 686 /// 687 /// union ACCESS4res switch (nfsstat4 status) { 688 /// case NFS4_OK: 689 /// ACCESS4resok resok4; 690 /// default: 691 /// void; 692 /// }; 693 /// 694 /// struct CLOSE4args { 695 /// /* CURRENT_FH: object */ 696 /// seqid4 seqid; 697 /// stateid4 open_stateid; 698 /// }; 699 /// 700 /// union CLOSE4res switch (nfsstat4 status) { 701 /// case NFS4_OK: 702 /// stateid4 open_stateid; 703 /// default: 704 /// void; 705 /// }; 706 /// 707 /// struct COMMIT4args { 708 /// /* CURRENT_FH: file */ 709 /// offset4 offset; 710 /// count4 count; 711 /// }; 712 /// 713 /// struct COMMIT4resok { 714 /// verifier4 writeverf; 715 /// }; 716 /// 717 /// union COMMIT4res switch (nfsstat4 status) { 718 /// case NFS4_OK: 719 /// COMMIT4resok resok4; 720 /// default: 721 /// void; 722 /// }; 723 /// 724 /// union createtype4 switch (nfs_ftype4 type) { 725 /// case NF4LNK: 726 /// linktext4 linkdata; 727 /// case NF4BLK: 728 /// case NF4CHR: 729 /// specdata4 devdata; 730 /// case NF4SOCK: 731 /// case NF4FIFO: 732 /// case NF4DIR: 733 /// void; 734 /// default: 735 /// void; /* server should return NFS4ERR_BADTYPE */ 736 /// }; 737 /// 738 /// struct CREATE4args { 739 /// /* CURRENT_FH: directory for creation */ 740 /// createtype4 objtype; 741 /// component4 objname; 742 /// fattr4 createattrs; 743 /// }; 744 /// 745 /// struct CREATE4resok { 746 /// change_info4 cinfo; 747 /// bitmap4 attrset; /* attributes set */ 748 /// }; 749 /// 750 /// union CREATE4res switch (nfsstat4 status) { 751 /// case NFS4_OK: 752 /// CREATE4resok resok4; 753 /// default: 754 /// void; 755 /// }; 756 /// 757 /// struct DELEGPURGE4args { 758 /// clientid4 clientid; 759 /// }; 760 /// 761 /// struct DELEGPURGE4res { 762 /// nfsstat4 status; 763 /// }; 764 /// 765 /// struct DELEGRETURN4args { 766 /// /* CURRENT_FH: delegated file */ 767 /// stateid4 deleg_stateid; 768 /// }; 769 /// 770 /// struct DELEGRETURN4res { 771 /// nfsstat4 status; 772 /// }; 773 /// 774 /// struct GETATTR4args { 775 /// /* CURRENT_FH: directory or file */ 776 /// bitmap4 attr_request; 777 /// }; 778 /// 779 /// struct GETATTR4resok { 780 /// fattr4 obj_attributes; 781 /// }; 782 /// 783 /// union GETATTR4res switch (nfsstat4 status) { 784 /// case NFS4_OK: 785 /// GETATTR4resok resok4; 786 /// default: 787 /// void; 788 /// }; 789 /// 790 /// struct GETFH4resok { 791 /// nfs_fh4 object; 792 /// }; 793 /// 794 /// union GETFH4res switch (nfsstat4 status) { 795 /// case NFS4_OK: 796 /// GETFH4resok resok4; 797 /// default: 798 /// void; 799 /// }; 800 /// 801 /// struct LINK4args { 802 /// /* SAVED_FH: source object */ 803 /// /* CURRENT_FH: target directory */ 804 /// component4 newname; 805 /// }; 806 /// 807 /// struct LINK4resok { 808 /// change_info4 cinfo; 809 /// }; 810 /// 811 /// union LINK4res switch (nfsstat4 status) { 812 /// case NFS4_OK: 813 /// LINK4resok resok4; 814 /// default: 815 /// void; 816 /// }; 817 /// 818 /// /* 819 /// * For LOCK, transition from open_owner to new lock_owner 820 /// */ 821 /// struct open_to_lock_owner4 { 822 /// seqid4 open_seqid; 823 /// stateid4 open_stateid; 824 /// seqid4 lock_seqid; 825 /// lock_owner4 lock_owner; 826 /// }; 827 /// 828 /// /* 829 /// * For LOCK, existing lock_owner continues to request file locks 830 /// */ 831 /// struct exist_lock_owner4 { 832 /// stateid4 lock_stateid; 833 /// seqid4 lock_seqid; 834 /// }; 835 /// 836 /// union locker4 switch (bool new_lock_owner) { 837 /// case TRUE: 838 /// open_to_lock_owner4 open_owner; 839 /// case FALSE: 840 /// exist_lock_owner4 lock_owner; 841 /// }; 842 /// 843 /// /* 844 /// * LOCK/LOCKT/LOCKU: Record lock management 845 /// */ 846 /// struct LOCK4args { 847 /// /* CURRENT_FH: file */ 848 /// nfs_lock_type4 locktype; 849 /// bool reclaim; 850 /// offset4 offset; 851 /// length4 length; 852 /// locker4 locker; 853 /// }; 854 /// 855 /// struct LOCK4denied { 856 /// offset4 offset; 857 /// length4 length; 858 /// nfs_lock_type4 locktype; 859 /// lock_owner4 owner; 860 /// }; 861 /// 862 /// struct LOCK4resok { 863 /// stateid4 lock_stateid; 864 /// }; 865 /// 866 /// union LOCK4res switch (nfsstat4 status) { 867 /// case NFS4_OK: 868 /// LOCK4resok resok4; 869 /// case NFS4ERR_DENIED: 870 /// LOCK4denied denied; 871 /// default: 872 /// void; 873 /// }; 874 /// 875 /// struct LOCKT4args { 876 /// /* CURRENT_FH: file */ 877 /// nfs_lock_type4 locktype; 878 /// offset4 offset; 879 /// length4 length; 880 /// lock_owner4 owner; 881 /// }; 882 /// 883 /// union LOCKT4res switch (nfsstat4 status) { 884 /// case NFS4ERR_DENIED: 885 /// LOCK4denied denied; 886 /// case NFS4_OK: 887 /// void; 888 /// default: 889 /// void; 890 /// }; 891 /// 892 /// struct LOCKU4args { 893 /// /* CURRENT_FH: file */ 894 /// nfs_lock_type4 locktype; 895 /// seqid4 seqid; 896 /// stateid4 lock_stateid; 897 /// offset4 offset; 898 /// length4 length; 899 /// }; 900 /// 901 /// union LOCKU4res switch (nfsstat4 status) { 902 /// case NFS4_OK: 904 /// stateid4 lock_stateid; 905 /// default: 906 /// void; 907 /// }; 908 /// 909 /// struct LOOKUP4args { 910 /// /* CURRENT_FH: directory */ 911 /// component4 objname; 912 /// }; 913 /// 914 /// struct LOOKUP4res { 915 /// /* CURRENT_FH: object */ 916 /// nfsstat4 status; 917 /// }; 918 /// 919 /// struct LOOKUPP4res { 920 /// /* CURRENT_FH: directory */ 921 /// nfsstat4 status; 922 /// }; 923 /// 924 /// struct NVERIFY4args { 925 /// /* CURRENT_FH: object */ 926 /// fattr4 obj_attributes; 927 /// }; 928 /// 929 /// struct NVERIFY4res { 930 /// nfsstat4 status; 931 /// }; 932 /// 933 /// const OPEN4_SHARE_ACCESS_READ = 0x00000001; 934 /// const OPEN4_SHARE_ACCESS_WRITE = 0x00000002; 935 /// const OPEN4_SHARE_ACCESS_BOTH = 0x00000003; 936 /// 937 /// const OPEN4_SHARE_DENY_NONE = 0x00000000; 938 /// const OPEN4_SHARE_DENY_READ = 0x00000001; 939 /// const OPEN4_SHARE_DENY_WRITE = 0x00000002; 940 /// const OPEN4_SHARE_DENY_BOTH = 0x00000003; 941 /// /* 942 /// * Various definitions for OPEN 943 /// */ 944 /// enum createmode4 { 945 /// UNCHECKED4 = 0, 946 /// GUARDED4 = 1, 947 /// EXCLUSIVE4 = 2 948 /// }; 949 /// 950 /// union createhow4 switch (createmode4 mode) { 951 /// case UNCHECKED4: 953 /// case GUARDED4: 954 /// fattr4 createattrs; 955 /// case EXCLUSIVE4: 956 /// verifier4 createverf; 957 /// }; 958 /// 959 /// enum opentype4 { 960 /// OPEN4_NOCREATE = 0, 961 /// OPEN4_CREATE = 1 962 /// }; 963 /// 964 /// union openflag4 switch (opentype4 opentype) { 965 /// case OPEN4_CREATE: 966 /// createhow4 how; 967 /// default: 968 /// void; 969 /// }; 970 /// 971 /// /* Next definitions used for OPEN delegation */ 972 /// enum limit_by4 { 973 /// NFS_LIMIT_SIZE = 1, 974 /// NFS_LIMIT_BLOCKS = 2 975 /// /* others as needed */ 976 /// }; 977 /// 978 /// struct nfs_modified_limit4 { 979 /// uint32_t num_blocks; 980 /// uint32_t bytes_per_block; 981 /// }; 982 /// 983 /// union nfs_space_limit4 switch (limit_by4 limitby) { 984 /// /* limit specified as file size */ 985 /// case NFS_LIMIT_SIZE: 986 /// uint64_t filesize; 987 /// /* limit specified by number of blocks */ 988 /// case NFS_LIMIT_BLOCKS: 989 /// nfs_modified_limit4 mod_blocks; 990 /// } ; 991 /// 992 /// enum open_delegation_type4 { 993 /// OPEN_DELEGATE_NONE = 0, 994 /// OPEN_DELEGATE_READ = 1, 995 /// OPEN_DELEGATE_WRITE = 2 996 /// }; 997 /// 998 /// enum open_claim_type4 { 999 /// CLAIM_NULL = 0, 1000 /// CLAIM_PREVIOUS = 1, 1001 /// CLAIM_DELEGATE_CUR = 2, 1002 /// CLAIM_DELEGATE_PREV = 3 1003 /// }; 1004 /// 1005 /// struct open_claim_delegate_cur4 { 1006 /// stateid4 delegate_stateid; 1007 /// component4 file; 1008 /// }; 1009 /// 1010 /// union open_claim4 switch (open_claim_type4 claim) { 1011 /// /* 1012 /// * No special rights to file. 1013 /// * Ordinary OPEN of the specified file. 1014 /// */ 1015 /// case CLAIM_NULL: 1016 /// /* CURRENT_FH: directory */ 1017 /// component4 file; 1018 /// /* 1019 /// * Right to the file established by an 1020 /// * open previous to server reboot. File 1021 /// * identified by filehandle obtained at 1022 /// * that time rather than by name. 1023 /// */ 1024 /// case CLAIM_PREVIOUS: 1025 /// /* CURRENT_FH: file being reclaimed */ 1026 /// open_delegation_type4 delegate_type; 1027 /// 1028 /// /* 1029 /// * Right to file based on a delegation 1030 /// * granted by the server. File is 1031 /// * specified by name. 1032 /// */ 1033 /// case CLAIM_DELEGATE_CUR: 1034 /// /* CURRENT_FH: directory */ 1035 /// open_claim_delegate_cur4 delegate_cur_info; 1036 /// 1037 /// /* 1038 /// * Right to file based on a delegation 1039 /// * granted to a previous boot instance 1040 /// * of the client. File is specified by name. 1041 /// */ 1042 /// case CLAIM_DELEGATE_PREV: 1043 /// /* CURRENT_FH: directory */ 1044 /// component4 file_delegate_prev; 1045 /// }; 1046 /// 1047 /// /* 1048 /// * OPEN: Open a file, potentially receiving an open delegation 1049 /// */ 1050 /// struct OPEN4args { 1051 /// seqid4 seqid; 1052 /// uint32_t share_access; 1053 /// uint32_t share_deny; 1054 /// open_owner4 owner; 1055 /// openflag4 openhow; 1056 /// open_claim4 claim; 1057 /// }; 1058 /// 1059 /// struct open_read_delegation4 { 1060 /// stateid4 stateid; /* Stateid for delegation*/ 1061 /// bool recall; /* Pre-recalled flag for 1062 /// delegations obtained 1063 /// by reclaim (CLAIM_PREVIOUS) */ 1064 /// 1065 /// nfsace4 permissions; /* Defines users who don't 1066 /// need an ACCESS call to 1067 /// open for read */ 1068 /// }; 1069 /// 1070 /// struct open_write_delegation4 { 1071 /// stateid4 stateid; /* Stateid for delegation */ 1072 /// bool recall; /* Pre-recalled flag for 1073 /// delegations obtained 1074 /// by reclaim 1075 /// (CLAIM_PREVIOUS) */ 1076 /// 1077 /// nfs_space_limit4 1078 /// space_limit; /* Defines condition that 1079 /// the client must check to 1080 /// determine whether the 1081 /// file needs to be flushed 1082 /// to the server on close. */ 1083 /// 1084 /// nfsace4 permissions; /* Defines users who don't 1085 /// need an ACCESS call as 1086 /// part of a delegated 1087 /// open. */ 1088 /// }; 1089 /// 1090 /// union open_delegation4 1091 /// switch (open_delegation_type4 delegation_type) { 1092 /// case OPEN_DELEGATE_NONE: 1093 /// void; 1094 /// case OPEN_DELEGATE_READ: 1095 /// open_read_delegation4 read; 1096 /// case OPEN_DELEGATE_WRITE: 1098 /// open_write_delegation4 write; 1099 /// }; 1100 /// 1101 /// /* 1102 /// * Result flags 1103 /// */ 1104 /// 1105 /// /* Client must confirm open */ 1106 /// const OPEN4_RESULT_CONFIRM = 0x00000002; 1107 /// /* Type of file locking behavior at the server */ 1108 /// const OPEN4_RESULT_LOCKTYPE_POSIX = 0x00000004; 1109 /// 1110 /// struct OPEN4resok { 1111 /// stateid4 stateid; /* Stateid for open */ 1112 /// change_info4 cinfo; /* Directory Change Info */ 1113 /// uint32_t rflags; /* Result flags */ 1114 /// bitmap4 attrset; /* attribute set for create*/ 1115 /// open_delegation4 delegation; /* Info on any open 1116 /// delegation */ 1117 /// }; 1118 /// 1119 /// union OPEN4res switch (nfsstat4 status) { 1120 /// case NFS4_OK: 1121 /// /* CURRENT_FH: opened file */ 1122 /// OPEN4resok resok4; 1123 /// default: 1124 /// void; 1125 /// }; 1126 /// 1127 /// struct OPENATTR4args { 1128 /// /* CURRENT_FH: object */ 1129 /// bool createdir; 1130 /// }; 1131 /// 1132 /// struct OPENATTR4res { 1133 /// /* CURRENT_FH: named attr directory */ 1134 /// nfsstat4 status; 1135 /// }; 1136 /// 1137 /// struct OPEN_CONFIRM4args { 1138 /// /* CURRENT_FH: opened file */ 1139 /// stateid4 open_stateid; 1140 /// seqid4 seqid; 1141 /// }; 1142 /// 1143 /// struct OPEN_CONFIRM4resok { 1144 /// stateid4 open_stateid; 1145 /// }; 1146 /// 1147 /// union OPEN_CONFIRM4res switch (nfsstat4 status) { 1148 /// case NFS4_OK: 1149 /// OPEN_CONFIRM4resok resok4; 1150 /// default: 1151 /// void; 1152 /// }; 1153 /// 1154 /// struct OPEN_DOWNGRADE4args { 1155 /// /* CURRENT_FH: opened file */ 1156 /// stateid4 open_stateid; 1157 /// seqid4 seqid; 1158 /// uint32_t share_access; 1159 /// uint32_t share_deny; 1160 /// }; 1161 /// 1162 /// struct OPEN_DOWNGRADE4resok { 1163 /// stateid4 open_stateid; 1164 /// }; 1165 /// 1166 /// union OPEN_DOWNGRADE4res switch(nfsstat4 status) { 1167 /// case NFS4_OK: 1168 /// OPEN_DOWNGRADE4resok resok4; 1169 /// default: 1170 /// void; 1171 /// }; 1172 /// 1173 /// struct PUTFH4args { 1174 /// nfs_fh4 object; 1175 /// }; 1176 /// 1177 /// struct PUTFH4res { 1178 /// /* CURRENT_FH: */ 1179 /// nfsstat4 status; 1180 /// }; 1181 /// 1182 /// struct PUTPUBFH4res { 1183 /// /* CURRENT_FH: public fh */ 1184 /// nfsstat4 status; 1185 /// }; 1186 /// 1187 /// struct PUTROOTFH4res { 1188 /// /* CURRENT_FH: root fh */ 1189 /// nfsstat4 status; 1190 /// }; 1191 /// 1192 /// struct READ4args { 1193 /// /* CURRENT_FH: file */ 1194 /// stateid4 stateid; 1195 /// offset4 offset; 1196 /// count4 count; 1197 /// }; 1198 /// 1199 /// struct READ4resok { 1200 /// bool eof; 1201 /// opaque data<>; 1202 /// }; 1203 /// 1204 /// union READ4res switch (nfsstat4 status) { 1205 /// case NFS4_OK: 1206 /// READ4resok resok4; 1207 /// default: 1208 /// void; 1209 /// }; 1210 /// 1211 /// struct READDIR4args { 1212 /// /* CURRENT_FH: directory */ 1213 /// nfs_cookie4 cookie; 1214 /// verifier4 cookieverf; 1215 /// count4 dircount; 1216 /// count4 maxcount; 1217 /// bitmap4 attr_request; 1218 /// }; 1219 /// 1220 /// struct entry4 { 1221 /// nfs_cookie4 cookie; 1222 /// component4 name; 1223 /// fattr4 attrs; 1224 /// entry4 *nextentry; 1225 /// }; 1226 /// 1227 /// struct dirlist4 { 1228 /// entry4 *entries; 1229 /// bool eof; 1230 /// }; 1231 /// 1232 /// struct READDIR4resok { 1233 /// verifier4 cookieverf; 1234 /// dirlist4 reply; 1235 /// }; 1236 /// 1237 /// 1238 /// union READDIR4res switch (nfsstat4 status) { 1239 /// case NFS4_OK: 1240 /// READDIR4resok resok4; 1241 /// default: 1243 /// void; 1244 /// }; 1245 /// 1246 /// 1247 /// struct READLINK4resok { 1248 /// linktext4 link; 1249 /// }; 1250 /// 1251 /// union READLINK4res switch (nfsstat4 status) { 1252 /// case NFS4_OK: 1253 /// READLINK4resok resok4; 1254 /// default: 1255 /// void; 1256 /// }; 1257 /// 1258 /// struct REMOVE4args { 1259 /// /* CURRENT_FH: directory */ 1260 /// component4 target; 1261 /// }; 1262 /// 1263 /// struct REMOVE4resok { 1264 /// change_info4 cinfo; 1265 /// }; 1266 /// 1267 /// union REMOVE4res switch (nfsstat4 status) { 1268 /// case NFS4_OK: 1269 /// REMOVE4resok resok4; 1270 /// default: 1271 /// void; 1272 /// }; 1273 /// 1274 /// struct RENAME4args { 1275 /// /* SAVED_FH: source directory */ 1276 /// component4 oldname; 1277 /// /* CURRENT_FH: target directory */ 1278 /// component4 newname; 1279 /// }; 1280 /// 1281 /// struct RENAME4resok { 1282 /// change_info4 source_cinfo; 1283 /// change_info4 target_cinfo; 1284 /// }; 1285 /// 1286 /// union RENAME4res switch (nfsstat4 status) { 1287 /// case NFS4_OK: 1288 /// RENAME4resok resok4; 1289 /// default: 1290 /// void; 1291 /// }; 1292 /// 1293 /// struct RENEW4args { 1294 /// clientid4 clientid; 1295 /// }; 1296 /// 1297 /// struct RENEW4res { 1298 /// nfsstat4 status; 1299 /// }; 1300 /// 1301 /// struct RESTOREFH4res { 1302 /// /* CURRENT_FH: value of saved fh */ 1303 /// nfsstat4 status; 1304 /// }; 1305 /// 1306 /// struct SAVEFH4res { 1307 /// /* SAVED_FH: value of current fh */ 1308 /// nfsstat4 status; 1309 /// }; 1310 /// 1311 /// struct SECINFO4args { 1312 /// /* CURRENT_FH: directory */ 1313 /// component4 name; 1314 /// }; 1315 /// 1316 /// /* 1317 /// * From RFC 2203 1318 /// */ 1319 /// enum rpc_gss_svc_t { 1320 /// RPC_GSS_SVC_NONE = 1, 1321 /// RPC_GSS_SVC_INTEGRITY = 2, 1322 /// RPC_GSS_SVC_PRIVACY = 3 1323 /// }; 1324 /// 1325 /// struct rpcsec_gss_info { 1326 /// sec_oid4 oid; 1327 /// qop4 qop; 1328 /// rpc_gss_svc_t service; 1329 /// }; 1330 /// 1331 /// /* RPCSEC_GSS has a value of '6' - See RFC 2203 */ 1332 /// union secinfo4 switch (uint32_t flavor) { 1333 /// case RPCSEC_GSS: 1334 /// rpcsec_gss_info flavor_info; 1335 /// default: 1336 /// void; 1337 /// }; 1338 /// 1339 /// typedef secinfo4 SECINFO4resok<>; 1340 /// 1341 /// union SECINFO4res switch (nfsstat4 status) { 1342 /// case NFS4_OK: 1343 /// SECINFO4resok resok4; 1344 /// default: 1345 /// void; 1346 /// }; 1347 /// 1348 /// struct SETATTR4args { 1349 /// /* CURRENT_FH: target object */ 1350 /// stateid4 stateid; 1351 /// fattr4 obj_attributes; 1352 /// }; 1353 /// 1354 /// struct SETATTR4res { 1355 /// nfsstat4 status; 1356 /// bitmap4 attrsset; 1357 /// }; 1358 /// 1359 /// struct SETCLIENTID4args { 1360 /// nfs_client_id4 client; 1361 /// cb_client4 callback; 1362 /// uint32_t callback_ident; 1363 /// }; 1364 /// 1365 /// struct SETCLIENTID4resok { 1366 /// clientid4 clientid; 1367 /// verifier4 setclientid_confirm; 1368 /// }; 1369 /// 1370 /// union SETCLIENTID4res switch (nfsstat4 status) { 1371 /// case NFS4_OK: 1372 /// SETCLIENTID4resok resok4; 1373 /// case NFS4ERR_CLID_INUSE: 1374 /// clientaddr4 client_using; 1375 /// default: 1376 /// void; 1377 /// }; 1378 /// 1379 /// struct SETCLIENTID_CONFIRM4args { 1380 /// clientid4 clientid; 1381 /// verifier4 setclientid_confirm; 1382 /// }; 1383 /// 1384 /// struct SETCLIENTID_CONFIRM4res { 1385 /// nfsstat4 status; 1386 /// }; 1387 /// 1388 /// struct VERIFY4args { 1389 /// /* CURRENT_FH: object */ 1390 /// fattr4 obj_attributes; 1391 /// }; 1392 /// 1393 /// struct VERIFY4res { 1394 /// nfsstat4 status; 1395 /// }; 1396 /// 1397 /// enum stable_how4 { 1398 /// UNSTABLE4 = 0, 1399 /// DATA_SYNC4 = 1, 1400 /// FILE_SYNC4 = 2 1401 /// }; 1402 /// 1403 /// struct WRITE4args { 1404 /// /* CURRENT_FH: file */ 1405 /// stateid4 stateid; 1406 /// offset4 offset; 1407 /// stable_how4 stable; 1408 /// opaque data<>; 1409 /// }; 1410 /// 1411 /// struct WRITE4resok { 1412 /// count4 count; 1413 /// stable_how4 committed; 1414 /// verifier4 writeverf; 1415 /// }; 1416 /// 1417 /// union WRITE4res switch (nfsstat4 status) { 1418 /// case NFS4_OK: 1419 /// WRITE4resok resok4; 1420 /// default: 1421 /// void; 1422 /// }; 1423 /// 1424 /// struct RELEASE_LOCKOWNER4args { 1425 /// lock_owner4 lock_owner; 1426 /// }; 1427 /// 1428 /// struct RELEASE_LOCKOWNER4res { 1429 /// nfsstat4 status; 1430 /// }; 1431 /// 1432 /// struct ILLEGAL4res { 1433 /// nfsstat4 status; 1434 /// }; 1435 /// 1436 /// /* 1437 /// * Operation arrays 1438 /// */ 1439 /// 1440 /// enum nfs_opnum4 { 1441 /// OP_ACCESS = 3, 1442 /// OP_CLOSE = 4, 1443 /// OP_COMMIT = 5, 1444 /// OP_CREATE = 6, 1445 /// OP_DELEGPURGE = 7, 1446 /// OP_DELEGRETURN = 8, 1447 /// OP_GETATTR = 9, 1448 /// OP_GETFH = 10, 1449 /// OP_LINK = 11, 1450 /// OP_LOCK = 12, 1451 /// OP_LOCKT = 13, 1452 /// OP_LOCKU = 14, 1453 /// OP_LOOKUP = 15, 1454 /// OP_LOOKUPP = 16, 1455 /// OP_NVERIFY = 17, 1456 /// OP_OPEN = 18, 1457 /// OP_OPENATTR = 19, 1458 /// OP_OPEN_CONFIRM = 20, 1459 /// OP_OPEN_DOWNGRADE = 21, 1460 /// OP_PUTFH = 22, 1461 /// OP_PUTPUBFH = 23, 1462 /// OP_PUTROOTFH = 24, 1463 /// OP_READ = 25, 1464 /// OP_READDIR = 26, 1465 /// OP_READLINK = 27, 1466 /// OP_REMOVE = 28, 1467 /// OP_RENAME = 29, 1468 /// OP_RENEW = 30, 1469 /// OP_RESTOREFH = 31, 1470 /// OP_SAVEFH = 32, 1471 /// OP_SECINFO = 33, 1472 /// OP_SETATTR = 34, 1473 /// OP_SETCLIENTID = 35, 1474 /// OP_SETCLIENTID_CONFIRM = 36, 1475 /// OP_VERIFY = 37, 1476 /// OP_WRITE = 38, 1477 /// OP_RELEASE_LOCKOWNER = 39, 1478 /// OP_ILLEGAL = 10044 1479 /// }; 1480 /// 1481 /// union nfs_argop4 switch (nfs_opnum4 argop) { 1482 /// case OP_ACCESS: ACCESS4args opaccess; 1483 /// case OP_CLOSE: CLOSE4args opclose; 1484 /// case OP_COMMIT: COMMIT4args opcommit; 1485 /// case OP_CREATE: CREATE4args opcreate; 1486 /// case OP_DELEGPURGE: DELEGPURGE4args opdelegpurge; 1487 /// case OP_DELEGRETURN: DELEGRETURN4args opdelegreturn; 1488 /// case OP_GETATTR: GETATTR4args opgetattr; 1489 /// case OP_GETFH: void; 1490 /// case OP_LINK: LINK4args oplink; 1491 /// case OP_LOCK: LOCK4args oplock; 1492 /// case OP_LOCKT: LOCKT4args oplockt; 1493 /// case OP_LOCKU: LOCKU4args oplocku; 1494 /// case OP_LOOKUP: LOOKUP4args oplookup; 1495 /// case OP_LOOKUPP: void; 1496 /// case OP_NVERIFY: NVERIFY4args opnverify; 1497 /// case OP_OPEN: OPEN4args opopen; 1498 /// case OP_OPENATTR: OPENATTR4args opopenattr; 1499 /// case OP_OPEN_CONFIRM: OPEN_CONFIRM4args opopen_confirm; 1500 /// case OP_OPEN_DOWNGRADE: 1501 /// OPEN_DOWNGRADE4args opopen_downgrade; 1502 /// case OP_PUTFH: PUTFH4args opputfh; 1503 /// case OP_PUTPUBFH: void; 1504 /// case OP_PUTROOTFH: void; 1505 /// case OP_READ: READ4args opread; 1506 /// case OP_READDIR: READDIR4args opreaddir; 1507 /// case OP_READLINK: void; 1508 /// case OP_REMOVE: REMOVE4args opremove; 1509 /// case OP_RENAME: RENAME4args oprename; 1510 /// case OP_RENEW: RENEW4args oprenew; 1511 /// case OP_RESTOREFH: void; 1512 /// case OP_SAVEFH: void; 1513 /// case OP_SECINFO: SECINFO4args opsecinfo; 1514 /// case OP_SETATTR: SETATTR4args opsetattr; 1515 /// case OP_SETCLIENTID: SETCLIENTID4args opsetclientid; 1516 /// case OP_SETCLIENTID_CONFIRM: SETCLIENTID_CONFIRM4args 1517 /// opsetclientid_confirm; 1518 /// case OP_VERIFY: VERIFY4args opverify; 1519 /// case OP_WRITE: WRITE4args opwrite; 1520 /// case OP_RELEASE_LOCKOWNER: 1521 /// RELEASE_LOCKOWNER4args 1522 /// oprelease_lockowner; 1523 /// case OP_ILLEGAL: void; 1524 /// }; 1525 /// 1526 /// union nfs_resop4 switch (nfs_opnum4 resop) { 1527 /// case OP_ACCESS: ACCESS4res opaccess; 1528 /// case OP_CLOSE: CLOSE4res opclose; 1529 /// case OP_COMMIT: COMMIT4res opcommit; 1530 /// case OP_CREATE: CREATE4res opcreate; 1531 /// case OP_DELEGPURGE: DELEGPURGE4res opdelegpurge; 1532 /// case OP_DELEGRETURN: DELEGRETURN4res opdelegreturn; 1533 /// case OP_GETATTR: GETATTR4res opgetattr; 1534 /// case OP_GETFH: GETFH4res opgetfh; 1535 /// case OP_LINK: LINK4res oplink; 1536 /// case OP_LOCK: LOCK4res oplock; 1537 /// case OP_LOCKT: LOCKT4res oplockt; 1538 /// case OP_LOCKU: LOCKU4res oplocku; 1539 /// case OP_LOOKUP: LOOKUP4res oplookup; 1540 /// case OP_LOOKUPP: LOOKUPP4res oplookupp; 1541 /// case OP_NVERIFY: NVERIFY4res opnverify; 1542 /// case OP_OPEN: OPEN4res opopen; 1543 /// case OP_OPENATTR: OPENATTR4res opopenattr; 1544 /// case OP_OPEN_CONFIRM: OPEN_CONFIRM4res opopen_confirm; 1545 /// case OP_OPEN_DOWNGRADE: 1546 /// OPEN_DOWNGRADE4res 1547 /// opopen_downgrade; 1548 /// case OP_PUTFH: PUTFH4res opputfh; 1549 /// case OP_PUTPUBFH: PUTPUBFH4res opputpubfh; 1550 /// case OP_PUTROOTFH: PUTROOTFH4res opputrootfh; 1551 /// case OP_READ: READ4res opread; 1552 /// case OP_READDIR: READDIR4res opreaddir; 1553 /// case OP_READLINK: READLINK4res opreadlink; 1554 /// case OP_REMOVE: REMOVE4res opremove; 1555 /// case OP_RENAME: RENAME4res oprename; 1556 /// case OP_RENEW: RENEW4res oprenew; 1557 /// case OP_RESTOREFH: RESTOREFH4res oprestorefh; 1558 /// case OP_SAVEFH: SAVEFH4res opsavefh; 1559 /// case OP_SECINFO: SECINFO4res opsecinfo; 1560 /// case OP_SETATTR: SETATTR4res opsetattr; 1561 /// case OP_SETCLIENTID: SETCLIENTID4res opsetclientid; 1562 /// case OP_SETCLIENTID_CONFIRM: 1563 /// SETCLIENTID_CONFIRM4res 1564 /// opsetclientid_confirm; 1565 /// case OP_VERIFY: VERIFY4res opverify; 1566 /// case OP_WRITE: WRITE4res opwrite; 1567 /// case OP_RELEASE_LOCKOWNER: 1568 /// RELEASE_LOCKOWNER4res 1569 /// oprelease_lockowner; 1570 /// case OP_ILLEGAL: ILLEGAL4res opillegal; 1571 /// }; 1572 /// 1573 /// struct COMPOUND4args { 1574 /// comptag4 tag; 1575 /// uint32_t minorversion; 1576 /// nfs_argop4 argarray<>; 1577 /// }; 1578 /// 1579 /// struct COMPOUND4res { 1580 /// nfsstat4 status; 1581 /// comptag4 tag; 1582 /// nfs_resop4 resarray<>; 1583 /// }; 1584 /// 1585 /// 1586 /// /* 1587 /// * Remote file service routines 1588 /// */ 1589 /// program NFS4_PROGRAM { 1590 /// version NFS_V4 { 1591 /// void 1592 /// NFSPROC4_NULL(void) = 0; 1593 /// 1594 /// COMPOUND4res 1595 /// NFSPROC4_COMPOUND(COMPOUND4args) = 1; 1596 /// 1597 /// } = 4; 1598 /// } = 100003; 1599 /// 1600 /// /* 1601 /// * NFS4 Callback Procedure Definitions and Program 1602 /// */ 1603 /// struct CB_GETATTR4args { 1604 /// nfs_fh4 fh; 1605 /// bitmap4 attr_request; 1606 /// }; 1607 /// 1608 /// struct CB_GETATTR4resok { 1609 /// fattr4 obj_attributes; 1610 /// }; 1611 /// 1612 /// union CB_GETATTR4res switch (nfsstat4 status) { 1613 /// case NFS4_OK: 1614 /// CB_GETATTR4resok resok4; 1615 /// default: 1616 /// void; 1617 /// }; 1618 /// 1619 /// struct CB_RECALL4args { 1620 /// stateid4 stateid; 1621 /// bool truncate; 1622 /// nfs_fh4 fh; 1623 /// }; 1624 /// 1625 /// struct CB_RECALL4res { 1626 /// nfsstat4 status; 1627 /// }; 1628 /// 1629 /// /* 1630 /// * CB_ILLEGAL: Response for illegal operation numbers 1631 /// */ 1632 /// struct CB_ILLEGAL4res { 1633 /// nfsstat4 status; 1634 /// }; 1635 /// 1636 /// /* 1637 /// * Various definitions for CB_COMPOUND 1638 /// */ 1639 /// % 1640 /// enum nfs_cb_opnum4 { 1641 /// OP_CB_GETATTR = 3, 1642 /// OP_CB_RECALL = 4, 1643 /// OP_CB_ILLEGAL = 10044 1644 /// }; 1645 /// 1646 /// union nfs_cb_argop4 switch (unsigned argop) { 1647 /// case OP_CB_GETATTR: 1648 /// CB_GETATTR4args opcbgetattr; 1649 /// case OP_CB_RECALL: 1650 /// CB_RECALL4args opcbrecall; 1651 /// case OP_CB_ILLEGAL: void; 1652 /// }; 1653 /// 1654 /// union nfs_cb_resop4 switch (unsigned resop) { 1655 /// case OP_CB_GETATTR: CB_GETATTR4res opcbgetattr; 1656 /// case OP_CB_RECALL: CB_RECALL4res opcbrecall; 1657 /// case OP_CB_ILLEGAL: CB_ILLEGAL4res opcbillegal; 1658 /// }; 1659 /// 1660 /// 1661 /// struct CB_COMPOUND4args { 1662 /// comptag4 tag; 1663 /// uint32_t minorversion; 1664 /// uint32_t callback_ident; 1665 /// nfs_cb_argop4 argarray<>; 1666 /// }; 1667 /// 1668 /// struct CB_COMPOUND4res { 1669 /// nfsstat4 status; 1670 /// comptag4 tag; 1671 /// nfs_cb_resop4 resarray<>; 1672 /// }; 1673 /// 1674 /// 1675 /// 1676 /// /* 1677 /// * Program number is in the transient range since the client 1678 /// * will assign the exact transient program number and provide 1679 /// * that to the server via the SETCLIENTID operation. 1680 /// */ 1681 /// program NFS4_CALLBACK { 1682 /// version NFS_CB { 1683 /// void 1684 /// CB_NULL(void) = 0; 1685 /// CB_COMPOUND4res 1686 /// CB_COMPOUND(CB_COMPOUND4args) = 1; 1687 /// } = 1; 1688 /// } = 0x40000000; 1690 2. Security Considerations 1692 See the Security Considerations section of 1693 [I-D.ietf-nfsv4-rfc3530bis]. 1695 3. IANA Considerations 1697 This document does not have any IANA considerations. 1699 4. Normative References 1701 [I-D.ietf-nfsv4-rfc3530bis] 1702 Haynes, T. and D. Noveck, "NFS Version 4 Protocol", 1703 draft-ietf-nfsv4-rfc3530bis-25 (work in progress), 1704 Feb 2013. 1706 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1707 Requirement Levels", March 1997. 1709 [RFC4506] Eisler, M., "XDR: External Data Representation Standard", 1710 STD 67, RFC 4506, May 2006. 1712 Appendix A. Acknowledgments 1714 David Quigley tested the extraction of the .x file from this document 1715 and corrected the two resulting errors. 1717 Appendix B. RFC Editor Notes 1719 [RFC Editor: please remove this section prior to publishing this 1720 document as an RFC] 1722 [RFC3530bis should be replaced by the RFC number of 1723 draft-ietf-nfsv4-rfc3530bis in this draft.] 1725 [RFC Editor: Please note that there is also a reference entry that 1726 needs to be modified for the companion document.] 1728 Authors' Addresses 1730 Thomas Haynes (editor) 1731 NetApp 1732 9110 E 66th St 1733 Tulsa, OK 74133 1734 USA 1736 Phone: +1-918-307-1415 1737 Email: thomas@netapp.com 1739 David Noveck (editor) 1740 EMC Corporation 1741 32 Coslin Drive 1742 Southborough, MA 01772 1743 US 1745 Phone: +1 508 305 8404 1746 Email: novecd@emc.com