Internet Engineering Task Force (IETF) T. Haynes Request for Comments: 7863 Primary Data Category: Standards Track November 2016 ISSN: 2070-1721 Network File System (NFS) Version 4 Minor Version 2 External Data Representation Standard (XDR) DescriptionAbstract
This document provides the External Data Representation (XDR) description for NFS version 4 minor version 2. Status of This Memo This is an Internet Standards Track document. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841. Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7863. Copyright Notice Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Table of Contents
1. Introduction ....................................................2 1.1. Requirements Language ......................................2 2. XDR Description of NFSv4.2 ......................................2 3. Security Considerations ........................................86 4. IANA Considerations ............................................86 5. Normative References ...........................................86 Acknowledgments ...................................................87 Author's Address ..................................................871. Introduction
This document contains the External Data Representation (XDR) [RFC4506] description of the NFSv4.2 protocol [RFC7862].1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].2. XDR Description of NFSv4.2
In order to facilitate implementations that support all of NFSv4.0, NFSv4.1, and NFSv4.2, the description includes operations and other features of NFSv4.0 and NFSv4.1 that do not apply to NFSv4.2. This XDR specification is fully compatible with the specification for NFSv4.0 [RFC7531], with the exception of the clientaddr4 structure, which has been replaced by (strictly, aliased to) netaddr4, which has the same members with the same purposes but the names have changed: (r_netid -> na_r_netid, r_addr -> na_r_addr) This effectively fully reconverges the NFSv4.0 [RFC7531] and NFSv4.1 [RFC5662] strands of the XDR. The XDR description is provided in this document in a way that makes it simple for the reader to extract it into a form that is ready to compile. The reader can feed this document in the following shell script to produce the machine-readable XDR description of NFSv4.2: <CODE BEGINS> #!/bin/sh grep "^ *///" | sed 's?^ */// ??' | sed 's?^ *///$??' <CODE ENDS>
That is, if the above script is stored in a file called "extract.sh" and this document is in a file called "spec.txt", then the reader can do: <CODE BEGINS> sh extract.sh < spec.txt > nfs4_prot.x <CODE ENDS> The effect of the script is to remove leading white space from each line, plus a sentinel sequence of "///". The XDR description, with the sentinel sequence, follows: <CODE BEGINS> /// /* /// * This file was machine generated for [RFC7862]. /// * /// * Last updated Sun Mar 13 10:58:40 PDT 2016 /// */ /// /// /* /// * Copyright (c) 2016 IETF Trust and the persons identified /// * as the authors. All rights reserved. /// * /// * Redistribution and use in source and binary forms, with /// * or without modification, are permitted provided that the /// * following conditions are met: /// * /// * - Redistributions of source code must retain the above /// * copyright notice, this list of conditions and the /// * following disclaimer. /// * /// * - Redistributions in binary form must reproduce the above /// * copyright notice, this list of conditions and the /// * following disclaimer in the documentation and/or other /// * materials provided with the distribution. /// * /// * - Neither the name of Internet Society, IETF or IETF /// * Trust, nor the names of specific contributors, may be /// * used to endorse or promote products derived from this /// * software without specific prior written permission. /// *
/// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS /// * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED /// * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE /// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS /// * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO /// * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /// /// */ /// /// /* /// * This code was derived from RFC 7863. /// */ /// /// /* /// * nfsv42.x /// */ /// /// %#ifndef _AUTH_SYS_DEFINE_FOR_NFSv42 /// %#define _AUTH_SYS_DEFINE_FOR_NFSv42 /// %#include <rpc/auth_sys.h> /// %typedef struct authsys_parms authsys_parms; /// %#endif /* _AUTH_SYS_DEFINE_FOR_NFSv42 */ /// /// /* /// * Basic typedefs for RFC 1832 data type definitions /// */ /// /// /* /// * typedef int int32_t; /// * typedef unsigned int uint32_t; /// * typedef hyper int64_t; /// * typedef unsigned hyper uint64_t; /// */ ///
/// /* /// * Sizes /// */ /// const NFS4_FHSIZE = 128; /// const NFS4_VERIFIER_SIZE = 8; /// const NFS4_OTHER_SIZE = 12; /// const NFS4_OPAQUE_LIMIT = 1024; /// const NFS4_SESSIONID_SIZE = 16; /// /// const NFS4_INT64_MAX = 0x7fffffffffffffff; /// const NFS4_UINT64_MAX = 0xffffffffffffffff; /// const NFS4_INT32_MAX = 0x7fffffff; /// const NFS4_UINT32_MAX = 0xffffffff; /// /// const NFS4_MAXFILELEN = 0xffffffffffffffff; /// const NFS4_MAXFILEOFF = 0xfffffffffffffffe; /// /// /// /* /// * File types /// */ /// enum nfs_ftype4 { /// NF4REG = 1, /* Regular File */ /// NF4DIR = 2, /* Directory */ /// NF4BLK = 3, /* Special File -- block device */ /// NF4CHR = 4, /* Special File -- character device */ /// NF4LNK = 5, /* Symbolic Link */ /// NF4SOCK = 6, /* Special File -- socket */ /// NF4FIFO = 7, /* Special File -- fifo */ /// NF4ATTRDIR = 8, /* Attribute Directory */ /// NF4NAMEDATTR = 9 /* Named Attribute */ /// }; /// /// /* /// * Error status /// */ /// enum nfsstat4 { /// NFS4_OK = 0, /* everything is okay */ /// NFS4ERR_PERM = 1, /* caller not privileged */ /// NFS4ERR_NOENT = 2, /* no such file/directory */ /// NFS4ERR_IO = 5, /* hard I/O error */ /// NFS4ERR_NXIO = 6, /* no such device */ /// NFS4ERR_ACCESS = 13, /* access denied */ /// NFS4ERR_EXIST = 17, /* file already exists */ /// NFS4ERR_XDEV = 18, /* different file systems */ ///
/// /* /// * Please do not allocate value 19; it was used in NFSv3, /// * and we do not want a value in NFSv3 to have a different /// * meaning in NFSv4.x. /// */ /// /// NFS4ERR_NOTDIR = 20, /* should be a directory */ /// NFS4ERR_ISDIR = 21, /* should not be a directory */ /// NFS4ERR_INVAL = 22, /* invalid argument */ /// NFS4ERR_FBIG = 27, /* file exceeds server max */ /// NFS4ERR_NOSPC = 28, /* no space on file system */ /// NFS4ERR_ROFS = 30, /* read-only file system */ /// NFS4ERR_MLINK = 31, /* too many hard links */ /// NFS4ERR_NAMETOOLONG = 63, /* name exceeds server max */ /// NFS4ERR_NOTEMPTY = 66, /* directory not empty */ /// NFS4ERR_DQUOT = 69, /* hard quota limit reached */ /// NFS4ERR_STALE = 70, /* file no longer exists */ /// NFS4ERR_BADHANDLE = 10001, /* illegal filehandle */ /// NFS4ERR_BAD_COOKIE = 10003, /* READDIR cookie is stale */ /// NFS4ERR_NOTSUPP = 10004, /* operation not supported */ /// NFS4ERR_TOOSMALL = 10005, /* response limit exceeded */ /// NFS4ERR_SERVERFAULT = 10006, /* undefined server error */ /// NFS4ERR_BADTYPE = 10007, /* type invalid for CREATE */ /// NFS4ERR_DELAY = 10008, /* file "busy" -- retry */ /// NFS4ERR_SAME = 10009, /* nverify says attrs same */ /// NFS4ERR_DENIED = 10010, /* lock unavailable */ /// NFS4ERR_EXPIRED = 10011, /* lock lease expired */ /// NFS4ERR_LOCKED = 10012, /* I/O failed due to lock */ /// NFS4ERR_GRACE = 10013, /* in grace period */ /// NFS4ERR_FHEXPIRED = 10014, /* filehandle expired */ /// NFS4ERR_SHARE_DENIED = 10015, /* share reserve denied */ /// NFS4ERR_WRONGSEC = 10016, /* wrong security flavor */ /// NFS4ERR_CLID_INUSE = 10017, /* client ID in use */ /// /// /* NFS4ERR_RESOURCE is not a valid error in NFSv4.1. */ /// NFS4ERR_RESOURCE = 10018, /* resource exhaustion */ /// /// NFS4ERR_MOVED = 10019, /* file system relocated */ /// NFS4ERR_NOFILEHANDLE = 10020, /* current FH is not set */ /// NFS4ERR_MINOR_VERS_MISMATCH= 10021, /* minor vers not supp */ /// NFS4ERR_STALE_CLIENTID = 10022, /* server has rebooted */ /// NFS4ERR_STALE_STATEID = 10023, /* server has rebooted */ /// NFS4ERR_OLD_STATEID = 10024, /* state is out of sync */ /// NFS4ERR_BAD_STATEID = 10025, /* incorrect stateid */ /// NFS4ERR_BAD_SEQID = 10026, /* request is out of seq. */ /// NFS4ERR_NOT_SAME = 10027, /* verify -- attrs not same */ /// NFS4ERR_LOCK_RANGE = 10028, /* overlapping lock range */ /// NFS4ERR_SYMLINK = 10029, /* should be file/directory */
/// NFS4ERR_RESTOREFH = 10030, /* no saved filehandle */ /// NFS4ERR_LEASE_MOVED = 10031, /* some file system moved */ /// NFS4ERR_ATTRNOTSUPP = 10032, /* recommended attr not supp */ /// NFS4ERR_NO_GRACE = 10033, /* reclaim outside of grace */ /// NFS4ERR_RECLAIM_BAD = 10034, /* reclaim error at server */ /// NFS4ERR_RECLAIM_CONFLICT= 10035, /* conflict on reclaim */ /// NFS4ERR_BADXDR = 10036, /* XDR decode failed */ /// NFS4ERR_LOCKS_HELD = 10037, /* file locks held at CLOSE */ /// NFS4ERR_OPENMODE = 10038, /* conflict in OPEN and I/O */ /// NFS4ERR_BADOWNER = 10039, /* owner translation bad */ /// NFS4ERR_BADCHAR = 10040, /* UTF-8 char not supported */ /// NFS4ERR_BADNAME = 10041, /* name not supported */ /// NFS4ERR_BAD_RANGE = 10042, /* lock range not supported */ /// NFS4ERR_LOCK_NOTSUPP = 10043, /* no atomic up/downgrade */ /// NFS4ERR_OP_ILLEGAL = 10044, /* undefined operation */ /// NFS4ERR_DEADLOCK = 10045, /* file-locking deadlock */ /// NFS4ERR_FILE_OPEN = 10046, /* open file blocks op */ /// NFS4ERR_ADMIN_REVOKED = 10047, /* lock-owner state revoked */ /// NFS4ERR_CB_PATH_DOWN = 10048, /* callback path down */ /// /// /* NFSv4.1 errors start here. */ /// /// NFS4ERR_BADIOMODE = 10049, /// NFS4ERR_BADLAYOUT = 10050, /// NFS4ERR_BAD_SESSION_DIGEST = 10051, /// NFS4ERR_BADSESSION = 10052, /// NFS4ERR_BADSLOT = 10053, /// NFS4ERR_COMPLETE_ALREADY = 10054, /// NFS4ERR_CONN_NOT_BOUND_TO_SESSION = 10055, /// NFS4ERR_DELEG_ALREADY_WANTED = 10056, /// NFS4ERR_BACK_CHAN_BUSY = 10057, /* backchan reqs outstanding */ /// NFS4ERR_LAYOUTTRYLATER = 10058, /// NFS4ERR_LAYOUTUNAVAILABLE = 10059, /// NFS4ERR_NOMATCHING_LAYOUT = 10060, /// NFS4ERR_RECALLCONFLICT = 10061, /// NFS4ERR_UNKNOWN_LAYOUTTYPE = 10062, /// NFS4ERR_SEQ_MISORDERED = 10063, /* unexpected seq. ID in req */ /// NFS4ERR_SEQUENCE_POS = 10064, /* [CB_]SEQ. op not 1st op */ /// NFS4ERR_REQ_TOO_BIG = 10065, /* request too big */ /// NFS4ERR_REP_TOO_BIG = 10066, /* reply too big */ /// NFS4ERR_REP_TOO_BIG_TO_CACHE =10067, /* rep. not all cached */ /// NFS4ERR_RETRY_UNCACHED_REP =10068, /* retry + rep. uncached */ /// NFS4ERR_UNSAFE_COMPOUND =10069, /* retry/recovery too hard */ /// NFS4ERR_TOO_MANY_OPS = 10070, /* too many ops in [CB_]COMP */ /// NFS4ERR_OP_NOT_IN_SESSION =10071, /* op needs [CB_]SEQ. op */ /// NFS4ERR_HASH_ALG_UNSUPP = 10072, /* hash alg. not supp */ /// /* Error 10073 is unused. */ /// NFS4ERR_CLIENTID_BUSY = 10074, /* client ID has state */
/// NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */ /// NFS4ERR_SEQ_FALSE_RETRY= 10076, /* retry != original req */ /// NFS4ERR_BAD_HIGH_SLOT = 10077, /* req has bad highest_slot */ /// NFS4ERR_DEADSESSION = 10078, /* new req sent to dead sess */ /// NFS4ERR_ENCR_ALG_UNSUPP= 10079, /* encr alg. not supp */ /// NFS4ERR_PNFS_NO_LAYOUT = 10080, /* I/O without a layout */ /// NFS4ERR_NOT_ONLY_OP = 10081, /* addl ops not allowed */ /// NFS4ERR_WRONG_CRED = 10082, /* op done by wrong cred */ /// NFS4ERR_WRONG_TYPE = 10083, /* op on wrong type object */ /// NFS4ERR_DIRDELEG_UNAVAIL=10084, /* delegation not avail. */ /// NFS4ERR_REJECT_DELEG = 10085, /* cb rejected delegation */ /// NFS4ERR_RETURNCONFLICT = 10086, /* layout get before return */ /// NFS4ERR_DELEG_REVOKED = 10087, /* deleg./layout revoked */ /// /// /* NFSv4.2 errors start here. */ /// /// NFS4ERR_PARTNER_NOTSUPP= 10088, /* s2s not supported */ /// NFS4ERR_PARTNER_NO_AUTH= 10089, /* s2s not authorized */ /// NFS4ERR_UNION_NOTSUPP = 10090, /* arm of union not supp */ /// NFS4ERR_OFFLOAD_DENIED = 10091, /* dest not allowing copy */ /// NFS4ERR_WRONG_LFS = 10092, /* LFS not supported */ /// NFS4ERR_BADLABEL = 10093, /* incorrect label */ /// NFS4ERR_OFFLOAD_NO_REQS= 10094 /* dest not meeting reqs */ /// }; /// /// /* /// * Basic data types /// */ /// typedef opaque attrlist4<>; /// typedef uint32_t bitmap4<>; /// typedef uint64_t changeid4; /// typedef uint64_t clientid4; /// typedef uint32_t count4; /// typedef uint64_t length4; /// typedef uint32_t mode4; /// typedef uint64_t nfs_cookie4; /// typedef opaque nfs_fh4<NFS4_FHSIZE>; /// typedef uint64_t offset4; /// typedef uint32_t qop4; /// typedef opaque sec_oid4<>; /// typedef uint32_t sequenceid4; /// typedef uint32_t seqid4; /// typedef opaque sessionid4[NFS4_SESSIONID_SIZE]; /// typedef uint32_t slotid4; /// typedef opaque utf8string<>; /// typedef utf8string utf8str_cis; /// typedef utf8string utf8str_cs; /// typedef utf8string utf8str_mixed;
/// typedef utf8str_cs component4; /// typedef opaque linktext4<>; /// typedef utf8string ascii_REQUIRED4; /// typedef component4 pathname4<>; /// typedef opaque verifier4[NFS4_VERIFIER_SIZE]; /// typedef string secret4<>; /// typedef uint32_t policy4; /// /// /* /// * Timeval /// */ /// struct nfstime4 { /// int64_t seconds; /// uint32_t nseconds; /// }; /// /// enum time_how4 { /// SET_TO_SERVER_TIME4 = 0, /// SET_TO_CLIENT_TIME4 = 1 /// }; /// /// union settime4 switch (time_how4 set_it) { /// case SET_TO_CLIENT_TIME4: /// nfstime4 time; /// default: /// void; /// }; /// /// /// typedef uint32_t nfs_lease4; /// /// /* /// * File attribute definitions /// */ /// /// /* /// * File System ID (FSID) structure for major/minor /// */ /// struct fsid4 { /// uint64_t major; /// uint64_t minor; /// }; ///
/// /* /// * File system locations attribute /// * for relocation/migration and /// * related attributes /// */ /// struct change_policy4 { /// uint64_t cp_major; /// uint64_t cp_minor; /// }; /// /// struct fs_location4 { /// utf8str_cis server<>; /// pathname4 rootpath; /// }; /// /// struct fs_locations4 { /// pathname4 fs_root; /// fs_location4 locations<>; /// }; /// /// /* /// * Various Access Control Entry (ACE) definitions /// */ /// /// /* /// * Mask that indicates which ACEs are supported. /// * Values for the fattr4_aclsupport attribute. /// */ /// const ACL4_SUPPORT_ALLOW_ACL = 0x00000001; /// const ACL4_SUPPORT_DENY_ACL = 0x00000002; /// const ACL4_SUPPORT_AUDIT_ACL = 0x00000004; /// const ACL4_SUPPORT_ALARM_ACL = 0x00000008; /// /// /// typedef uint32_t acetype4; /// /// /// /* /// * acetype4 values. Others can be added as needed. /// */ /// const ACE4_ACCESS_ALLOWED_ACE_TYPE = 0x00000000; /// const ACE4_ACCESS_DENIED_ACE_TYPE = 0x00000001; /// const ACE4_SYSTEM_AUDIT_ACE_TYPE = 0x00000002; /// const ACE4_SYSTEM_ALARM_ACE_TYPE = 0x00000003; /// /// ///
/// /* /// * ACE flag /// */ /// typedef uint32_t aceflag4; /// /// /// /* /// * ACE flag values /// */ /// const ACE4_FILE_INHERIT_ACE = 0x00000001; /// const ACE4_DIRECTORY_INHERIT_ACE = 0x00000002; /// const ACE4_NO_PROPAGATE_INHERIT_ACE = 0x00000004; /// const ACE4_INHERIT_ONLY_ACE = 0x00000008; /// const ACE4_SUCCESSFUL_ACCESS_ACE_FLAG = 0x00000010; /// const ACE4_FAILED_ACCESS_ACE_FLAG = 0x00000020; /// const ACE4_IDENTIFIER_GROUP = 0x00000040; /// const ACE4_INHERITED_ACE = 0x00000080; /// /// /// /// /* /// * ACE mask /// */ /// typedef uint32_t acemask4; /// /// /// /* /// * ACE mask values /// */ /// const ACE4_READ_DATA = 0x00000001; /// const ACE4_LIST_DIRECTORY = 0x00000001; /// const ACE4_WRITE_DATA = 0x00000002; /// const ACE4_ADD_FILE = 0x00000002; /// const ACE4_APPEND_DATA = 0x00000004; /// const ACE4_ADD_SUBDIRECTORY = 0x00000004; /// const ACE4_READ_NAMED_ATTRS = 0x00000008; /// const ACE4_WRITE_NAMED_ATTRS = 0x00000010; /// const ACE4_EXECUTE = 0x00000020; /// const ACE4_DELETE_CHILD = 0x00000040; /// const ACE4_READ_ATTRIBUTES = 0x00000080; /// const ACE4_WRITE_ATTRIBUTES = 0x00000100; /// const ACE4_WRITE_RETENTION = 0x00000200; /// const ACE4_WRITE_RETENTION_HOLD = 0x00000400; ///
/// const ACE4_DELETE = 0x00010000; /// const ACE4_READ_ACL = 0x00020000; /// const ACE4_WRITE_ACL = 0x00040000; /// const ACE4_WRITE_OWNER = 0x00080000; /// const ACE4_SYNCHRONIZE = 0x00100000; /// /// /// /* /// * ACE4_GENERIC_READ -- defined as a combination of /// * ACE4_READ_ACL | /// * ACE4_READ_DATA | /// * ACE4_READ_ATTRIBUTES | /// * ACE4_SYNCHRONIZE /// */ /// /// const ACE4_GENERIC_READ = 0x00120081; /// /// /* /// * ACE4_GENERIC_WRITE -- defined as a combination of /// * ACE4_READ_ACL | /// * ACE4_WRITE_DATA | /// * ACE4_WRITE_ATTRIBUTES | /// * ACE4_WRITE_ACL | /// * ACE4_APPEND_DATA | /// * ACE4_SYNCHRONIZE /// */ /// const ACE4_GENERIC_WRITE = 0x00160106; /// /// /// /* /// * ACE4_GENERIC_EXECUTE -- defined as a combination of /// * ACE4_READ_ACL | /// * ACE4_READ_ATTRIBUTES | /// * ACE4_EXECUTE | /// * ACE4_SYNCHRONIZE /// */ /// const ACE4_GENERIC_EXECUTE = 0x001200A0; /// /// /// /* /// * ACE definition /// */ /// struct nfsace4 { /// acetype4 type; /// aceflag4 flag; /// acemask4 access_mask; /// utf8str_mixed who; /// };
/// /// /// /* /// * Access Control List (ACL) flag /// */ /// /// typedef uint32_t aclflag4; /// /// /* /// * ACL flag values /// */ /// const ACL4_AUTO_INHERIT = 0x00000001; /// const ACL4_PROTECTED = 0x00000002; /// const ACL4_DEFAULTED = 0x00000004; /// /// /// /* /// * Version 4.1 ACL definition /// */ /// struct nfsacl41 { /// aclflag4 na41_flag; /// nfsace4 na41_aces<>; /// }; /// /// /// /* /// * Field definitions for the fattr4_mode /// * and fattr4_mode_set_masked attributes /// */ /// const MODE4_SUID = 0x800; /* set user id on execution */ /// const MODE4_SGID = 0x400; /* set group id on execution */ /// const MODE4_SVTX = 0x200; /* save text even after use */ /// const MODE4_RUSR = 0x100; /* read permission: owner */ /// const MODE4_WUSR = 0x080; /* write permission: owner */ /// const MODE4_XUSR = 0x040; /* execute permission: owner */ /// const MODE4_RGRP = 0x020; /* read permission: group */ /// const MODE4_WGRP = 0x010; /* write permission: group */ /// const MODE4_XGRP = 0x008; /* execute permission: group */ /// const MODE4_ROTH = 0x004; /* read permission: other */ /// const MODE4_WOTH = 0x002; /* write permission: other */ /// const MODE4_XOTH = 0x001; /* execute permission: other */ /// ///
/// /* /// * Masked mode for the mode_set_masked attribute /// */ /// struct mode_masked4 { /// mode4 mm_value_to_set; /* Values of bits /// to set or reset /// in mode */ /// /// mode4 mm_mask_bits; /* Mask of bits to /// set or reset /// in mode */ /// }; /// /// /* /// * Special data/attribute associated with /// * file types NF4BLK and NF4CHR /// */ /// struct specdata4 { /// uint32_t specdata1; /* Major device number */ /// uint32_t specdata2; /* Minor device number */ /// }; /// /// /* /// * Values for fattr4_fh_expire_type /// */ /// const FH4_PERSISTENT = 0x00000000; /// const FH4_NOEXPIRE_WITH_OPEN = 0x00000001; /// const FH4_VOLATILE_ANY = 0x00000002; /// const FH4_VOL_MIGRATION = 0x00000004; /// const FH4_VOL_RENAME = 0x00000008; /// /// /// struct netaddr4 { /// /* See struct rpcb in RFC 1833. */ /// string na_r_netid<>; /* Network id */ /// string na_r_addr<>; /* Universal address */ /// }; /// /// /// /* /// * Data structures new to NFSv4.1 /// */ /// /// struct nfs_impl_id4 { /// utf8str_cis nii_domain; /// utf8str_cs nii_name; /// nfstime4 nii_date; /// };
/// /// /// /* /// * Stateid /// */ /// struct stateid4 { /// uint32_t seqid; /// opaque other[NFS4_OTHER_SIZE]; /// }; /// /// enum layouttype4 { /// LAYOUT4_NFSV4_1_FILES = 0x1, /// LAYOUT4_OSD2_OBJECTS = 0x2, /// LAYOUT4_BLOCK_VOLUME = 0x3 /// }; /// /// struct layout_content4 { /// layouttype4 loc_type; /// opaque loc_body<>; /// }; /// /// /// %/* /// % * LAYOUT4_OSD2_OBJECTS loc_body description /// % * is in a separate .x file. /// % */ /// % /// %/* /// % * LAYOUT4_BLOCK_VOLUME loc_body description /// % * is in a separate .x file. /// % */ /// /// struct layouthint4 { /// layouttype4 loh_type; /// opaque loh_body<>; /// }; /// /// enum layoutiomode4 { /// LAYOUTIOMODE4_READ = 1, /// LAYOUTIOMODE4_RW = 2, /// LAYOUTIOMODE4_ANY = 3 /// }; ///
/// struct layout4 { /// offset4 lo_offset; /// length4 lo_length; /// layoutiomode4 lo_iomode; /// layout_content4 lo_content; /// }; /// /// const NFS4_DEVICEID4_SIZE = 16; /// /// typedef opaque deviceid4[NFS4_DEVICEID4_SIZE]; /// /// struct device_addr4 { /// layouttype4 da_layout_type; /// opaque da_addr_body<>; /// }; /// /// /// struct layoutupdate4 { /// layouttype4 lou_type; /// opaque lou_body<>; /// }; /// /// % /// /* Constants used for LAYOUTRETURN and CB_LAYOUTRECALL */ /// const LAYOUT4_RET_REC_FILE = 1; /// const LAYOUT4_RET_REC_FSID = 2; /// const LAYOUT4_RET_REC_ALL = 3; /// % /// enum layoutreturn_type4 { /// LAYOUTRETURN4_FILE = LAYOUT4_RET_REC_FILE, /// LAYOUTRETURN4_FSID = LAYOUT4_RET_REC_FSID, /// LAYOUTRETURN4_ALL = LAYOUT4_RET_REC_ALL /// }; /// /// struct layoutreturn_file4 { /// offset4 lrf_offset; /// length4 lrf_length; /// stateid4 lrf_stateid; /// % /* layouttype4 specific data */ /// opaque lrf_body<>; /// }; /// /// union layoutreturn4 switch (layoutreturn_type4 lr_returntype) { /// case LAYOUTRETURN4_FILE: /// layoutreturn_file4 lr_layout; /// default: /// void; /// };
/// % /// /// enum fs4_status_type { /// STATUS4_FIXED = 1, /// STATUS4_UPDATED = 2, /// STATUS4_VERSIONED = 3, /// STATUS4_WRITABLE = 4, /// STATUS4_REFERRAL = 5 /// }; /// /// struct fs4_status { /// bool fss_absent; /// fs4_status_type fss_type; /// utf8str_cs fss_source; /// utf8str_cs fss_current; /// int32_t fss_age; /// nfstime4 fss_version; /// }; /// /// /// const TH4_READ_SIZE = 0; /// const TH4_WRITE_SIZE = 1; /// const TH4_READ_IOSIZE = 2; /// const TH4_WRITE_IOSIZE = 3; /// /// typedef length4 threshold4_read_size; /// typedef length4 threshold4_write_size; /// typedef length4 threshold4_read_iosize; /// typedef length4 threshold4_write_iosize; /// /// struct threshold_item4 { /// layouttype4 thi_layout_type; /// bitmap4 thi_hintset; /// opaque thi_hintlist<>; /// }; /// /// struct mdsthreshold4 { /// threshold_item4 mth_hints<>; /// }; /// /// const RET4_DURATION_INFINITE = 0xffffffffffffffff; /// struct retention_get4 { /// uint64_t rg_duration; /// nfstime4 rg_begin_time<1>; /// }; ///
/// struct retention_set4 { /// bool rs_enable; /// uint64_t rs_duration<1>; /// }; /// /// const FSCHARSET_CAP4_CONTAINS_NON_UTF8 = 0x1; /// const FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 = 0x2; /// /// typedef uint32_t fs_charset_cap4; /// /// /// /* /// * Data structures new to NFSv4.2 /// */ /// /// enum netloc_type4 { /// NL4_NAME = 1, /// NL4_URL = 2, /// NL4_NETADDR = 3 /// }; /// union netloc4 switch (netloc_type4 nl_type) { /// case NL4_NAME: utf8str_cis nl_name; /// case NL4_URL: utf8str_cis nl_url; /// case NL4_NETADDR: netaddr4 nl_addr; /// }; /// /// enum change_attr_type4 { /// NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0, /// NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1, /// NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2, /// NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3, /// NFS4_CHANGE_TYPE_IS_UNDEFINED = 4 /// }; /// /// struct labelformat_spec4 { /// policy4 lfs_lfs; /// policy4 lfs_pi; /// }; /// /// struct sec_label4 { /// labelformat_spec4 slai_lfs; /// opaque slai_data<>; /// }; /// ///
/// struct copy_from_auth_priv { /// secret4 cfap_shared_secret; /// netloc4 cfap_destination; /// /* The NFSv4 user name that the user principal maps to */ /// utf8str_mixed cfap_username; /// }; /// /// struct copy_to_auth_priv { /// /* Equal to cfap_shared_secret */ /// secret4 ctap_shared_secret; /// netloc4 ctap_source<>; /// /* The NFSv4 user name that the user principal maps to */ /// utf8str_mixed ctap_username; /// }; /// /// struct copy_confirm_auth_priv { /// /* Equal to GSS_GetMIC() of cfap_shared_secret */ /// opaque ccap_shared_secret_mic<>; /// /* The NFSv4 user name that the user principal maps to */ /// utf8str_mixed ccap_username; /// }; /// /// /// struct app_data_block4 { /// offset4 adb_offset; /// length4 adb_block_size; /// length4 adb_block_count; /// length4 adb_reloff_blocknum; /// count4 adb_block_num; /// length4 adb_reloff_pattern; /// opaque adb_pattern<>; /// }; /// /// /// struct data4 { /// offset4 d_offset; /// opaque d_data<>; /// }; /// /// struct data_info4 { /// offset4 di_offset; /// length4 di_length; /// }; /// ///