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) Description
Abstract
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.
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].
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>
Haynes Standards Track [Page 2]
RFC 7863 NFSv4.2 XDR November 2016
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. /// *
Haynes Standards Track [Page 3]
RFC 7863 NFSv4.2 XDR November 2016
/// * 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; /// */ ///
/// /* /// * 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 */
Haynes Standards Track [Page 6]
RFC 7863 NFSv4.2 XDR November 2016
/// 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 */
Haynes Standards Track [Page 7]
RFC 7863 NFSv4.2 XDR November 2016
/// 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;
/// enum open_claim_type4 { /// /* /// * Not a reclaim /// */ /// CLAIM_NULL = 0, /// /// CLAIM_PREVIOUS = 1, /// CLAIM_DELEGATE_CUR = 2, /// CLAIM_DELEGATE_PREV = 3, /// /// /* /// * Not a reclaim /// * /// * Like CLAIM_NULL, but object identified /// * by the current filehandle /// */ /// CLAIM_FH = 4, /* New to NFSv4.1 */ /// /// /* /// * Like CLAIM_DELEGATE_CUR, but object identified /// * by current filehandle /// */ /// CLAIM_DELEG_CUR_FH = 5, /* New to NFSv4.1 */ /// /// /* /// * Like CLAIM_DELEGATE_PREV, but object identified /// * by current filehandle /// */ /// CLAIM_DELEG_PREV_FH = 6 /* New to NFSv4.1 */ /// }; /// /// struct open_claim_delegate_cur4 { /// stateid4 delegate_stateid; /// component4 file; /// }; /// /// union open_claim4 switch (open_claim_type4 claim) { /// /* /// * No special rights to file. /// * Ordinary OPEN of the specified file. /// */ /// case CLAIM_NULL: /// /* CURRENT_FH: directory */ /// component4 file;
Haynes Standards Track [Page 41]
RFC 7863 NFSv4.2 XDR November 2016
/// /* /// * Right to the file established by an /// * open previous to server reboot. File /// * identified by filehandle obtained at /// * that time rather than by name. /// */ /// case CLAIM_PREVIOUS: /// /* CURRENT_FH: file being reclaimed */ /// open_delegation_type4 delegate_type; /// /// /* /// * Right to file based on a delegation /// * granted by the server. File is /// * specified by name. /// */ /// case CLAIM_DELEGATE_CUR: /// /* CURRENT_FH: directory */ /// open_claim_delegate_cur4 delegate_cur_info; /// /// /* /// * Right to file based on a delegation /// * granted to a previous boot instance /// * of the client. File is specified by name. /// */ /// case CLAIM_DELEGATE_PREV: /// /* CURRENT_FH: directory */ /// component4 file_delegate_prev; /// /// /* /// * Like CLAIM_NULL. No special rights /// * to file. Ordinary OPEN of the /// * specified file by current filehandle. /// */ /// case CLAIM_FH: /* New to NFSv4.1 */ /// /* CURRENT_FH: regular file to open */ /// void; /// /// /* /// * Like CLAIM_DELEGATE_PREV. Right to file based on a /// * delegation granted to a previous boot /// * instance of the client. File is identified /// * by filehandle. /// */ /// case CLAIM_DELEG_PREV_FH: /* New to NFSv4.1 */ /// /* CURRENT_FH: file being opened */ /// void; ///
Haynes Standards Track [Page 42]
RFC 7863 NFSv4.2 XDR November 2016
/// /* /// * Like CLAIM_DELEGATE_CUR. Right to file based on /// * a delegation granted by the server. /// * File is identified by filehandle. /// */ /// case CLAIM_DELEG_CUR_FH: /* New to NFSv4.1 */ /// /* CURRENT_FH: file being opened */ /// stateid4 oc_delegate_stateid; /// /// }; /// /// /* /// * OPEN: Open a file, potentially receiving an open delegation. /// */ /// struct OPEN4args { /// seqid4 seqid; /// uint32_t share_access; /// uint32_t share_deny; /// open_owner4 owner; /// openflag4 openhow; /// open_claim4 claim; /// }; /// /// struct open_read_delegation4 { /// stateid4 stateid; /* Stateid for delegation */ /// bool recall; /* Pre-recalled flag for /// delegations obtained /// by reclaim (CLAIM_PREVIOUS) */ /// /// nfsace4 permissions; /* Defines users who don't /// need an ACCESS call to /// open for read */ /// }; /// /// struct open_write_delegation4 { /// stateid4 stateid; /* Stateid for delegation */ /// bool recall; /* Pre-recalled flag for /// delegations obtained /// by reclaim /// (CLAIM_PREVIOUS) */ /// /// nfs_space_limit4 /// space_limit; /* Defines condition that /// the client must check to /// determine whether the /// file needs to be flushed /// to the server on close */ ///
Haynes Standards Track [Page 43]
RFC 7863 NFSv4.2 XDR November 2016
/// nfsace4 permissions; /* Defines users who don't /// need an ACCESS call as /// part of a delegated /// open */ /// }; /// /// /// enum why_no_delegation4 { /* New to NFSv4.1 */ /// WND4_NOT_WANTED = 0, /// WND4_CONTENTION = 1, /// WND4_RESOURCE = 2, /// WND4_NOT_SUPP_FTYPE = 3, /// WND4_WRITE_DELEG_NOT_SUPP_FTYPE = 4, /// WND4_NOT_SUPP_UPGRADE = 5, /// WND4_NOT_SUPP_DOWNGRADE = 6, /// WND4_CANCELLED = 7, /// WND4_IS_DIR = 8 /// }; /// /// union open_none_delegation4 /* New to NFSv4.1 */ /// switch (why_no_delegation4 ond_why) { /// case WND4_CONTENTION: /// bool ond_server_will_push_deleg; /// case WND4_RESOURCE: /// bool ond_server_will_signal_avail; /// default: /// void; /// }; /// /// union open_delegation4 /// switch (open_delegation_type4 delegation_type) { /// case OPEN_DELEGATE_NONE: /// void; /// case OPEN_DELEGATE_READ: /// open_read_delegation4 read; /// case OPEN_DELEGATE_WRITE: /// open_write_delegation4 write; /// case OPEN_DELEGATE_NONE_EXT: /* New to NFSv4.1 */ /// open_none_delegation4 od_whynone; /// }; /// /// /* /// * Result flags /// */ ///
Haynes Standards Track [Page 44]
RFC 7863 NFSv4.2 XDR November 2016
/// /* Client must confirm open. */ /// const OPEN4_RESULT_CONFIRM = 0x00000002; /// /* Type of file-locking behavior at the server */ /// const OPEN4_RESULT_LOCKTYPE_POSIX = 0x00000004; /// /* Server will preserve file if removed while open. */ /// const OPEN4_RESULT_PRESERVE_UNLINKED = 0x00000008; /// /// /* /// * Server may use CB_NOTIFY_LOCK on locks /// * derived from this open. /// */ /// const OPEN4_RESULT_MAY_NOTIFY_LOCK = 0x00000020; /// /// struct OPEN4resok { /// stateid4 stateid; /* Stateid for open */ /// change_info4 cinfo; /* Directory change info */ /// uint32_t rflags; /* Result flags */ /// bitmap4 attrset; /* Attribute set for create */ /// open_delegation4 delegation; /* Info on any open /// delegation */ /// }; /// /// union OPEN4res switch (nfsstat4 status) { /// case NFS4_OK: /// /* New CURRENT_FH: opened file */ /// OPEN4resok resok4; /// default: /// void; /// }; /// /// struct OPENATTR4args { /// /* CURRENT_FH: object */ /// bool createdir; /// }; /// /// struct OPENATTR4res { /// /* /// * If status is NFS4_OK, /// * New CURRENT_FH: named attribute /// * directory /// */ /// nfsstat4 status; /// }; ///
/// /// union WRITE_SAME4res switch (nfsstat4 wsr_status) { /// case NFS4_OK: /// write_response4 resok4; /// default: /// void; /// }; /// /// /// /* /// * Operation arrays (the rest) /// */ /// /// union nfs_argop4 switch (nfs_opnum4 argop) { /// case OP_ACCESS: ACCESS4args opaccess; /// case OP_CLOSE: CLOSE4args opclose; /// case OP_COMMIT: COMMIT4args opcommit; /// case OP_CREATE: CREATE4args opcreate; /// case OP_DELEGPURGE: DELEGPURGE4args opdelegpurge; /// case OP_DELEGRETURN: DELEGRETURN4args opdelegreturn; /// case OP_GETATTR: GETATTR4args opgetattr; /// case OP_GETFH: void; /// case OP_LINK: LINK4args oplink; /// case OP_LOCK: LOCK4args oplock; /// case OP_LOCKT: LOCKT4args oplockt; /// case OP_LOCKU: LOCKU4args oplocku; /// case OP_LOOKUP: LOOKUP4args oplookup; /// case OP_LOOKUPP: void; /// case OP_NVERIFY: NVERIFY4args opnverify; /// case OP_OPEN: OPEN4args opopen; /// case OP_OPENATTR: OPENATTR4args opopenattr; /// /// /* Not for NFSv4.1 */ /// case OP_OPEN_CONFIRM: OPEN_CONFIRM4args opopen_confirm; /// /// case OP_OPEN_DOWNGRADE: OPEN_DOWNGRADE4args opopen_downgrade; /// /// case OP_PUTFH: PUTFH4args opputfh; /// case OP_PUTPUBFH: void; /// case OP_PUTROOTFH: void; /// case OP_READ: READ4args opread; /// case OP_READDIR: READDIR4args opreaddir; /// case OP_READLINK: void; /// case OP_REMOVE: REMOVE4args opremove; /// case OP_RENAME: RENAME4args oprename; ///
Haynes Standards Track [Page 70]
RFC 7863 NFSv4.2 XDR November 2016
/// /* Not for NFSv4.1 */ /// case OP_RENEW: RENEW4args oprenew; /// /// case OP_RESTOREFH: void; /// case OP_SAVEFH: void; /// case OP_SECINFO: SECINFO4args opsecinfo; /// case OP_SETATTR: SETATTR4args opsetattr; /// /// /* Not for NFSv4.1 */ /// case OP_SETCLIENTID: SETCLIENTID4args opsetclientid; /// /// /* Not for NFSv4.1 */ /// case OP_SETCLIENTID_CONFIRM: /// SETCLIENTID_CONFIRM4args /// opsetclientid_confirm; /// /// case OP_VERIFY: VERIFY4args opverify; /// case OP_WRITE: WRITE4args opwrite; /// /// /* Not for NFSv4.1 */ /// case OP_RELEASE_LOCKOWNER: /// RELEASE_LOCKOWNER4args /// oprelease_lockowner; /// /// /* Operations new to NFSv4.1 */ /// case OP_BACKCHANNEL_CTL: /// BACKCHANNEL_CTL4args opbackchannel_ctl; /// /// case OP_BIND_CONN_TO_SESSION: /// BIND_CONN_TO_SESSION4args /// opbind_conn_to_session; /// /// case OP_EXCHANGE_ID: EXCHANGE_ID4args opexchange_id; /// /// case OP_CREATE_SESSION: CREATE_SESSION4args opcreate_session; /// /// case OP_DESTROY_SESSION: /// DESTROY_SESSION4args opdestroy_session; /// /// case OP_FREE_STATEID: FREE_STATEID4args opfree_stateid; /// /// case OP_GET_DIR_DELEGATION: /// GET_DIR_DELEGATION4args /// opget_dir_delegation; ///
Haynes Standards Track [Page 71]
RFC 7863 NFSv4.2 XDR November 2016
/// case OP_GETDEVICEINFO: GETDEVICEINFO4args opgetdeviceinfo; /// case OP_GETDEVICELIST: GETDEVICELIST4args opgetdevicelist; /// case OP_LAYOUTCOMMIT: LAYOUTCOMMIT4args oplayoutcommit; /// case OP_LAYOUTGET: LAYOUTGET4args oplayoutget; /// case OP_LAYOUTRETURN: LAYOUTRETURN4args oplayoutreturn; /// /// case OP_SECINFO_NO_NAME: /// SECINFO_NO_NAME4args opsecinfo_no_name; /// /// case OP_SEQUENCE: SEQUENCE4args opsequence; /// case OP_SET_SSV: SET_SSV4args opset_ssv; /// case OP_TEST_STATEID: TEST_STATEID4args optest_stateid; /// /// case OP_WANT_DELEGATION: /// WANT_DELEGATION4args opwant_delegation; /// /// case OP_DESTROY_CLIENTID: /// DESTROY_CLIENTID4args /// opdestroy_clientid; /// /// case OP_RECLAIM_COMPLETE: /// RECLAIM_COMPLETE4args /// opreclaim_complete; /// /// /* Operations new to NFSv4.2 */ /// case OP_ALLOCATE: ALLOCATE4args opallocate; /// case OP_COPY: COPY4args opcopy; /// case OP_COPY_NOTIFY: COPY_NOTIFY4args opoffload_notify; /// case OP_DEALLOCATE: DEALLOCATE4args opdeallocate; /// case OP_IO_ADVISE: IO_ADVISE4args opio_advise; /// case OP_LAYOUTERROR: LAYOUTERROR4args oplayouterror; /// case OP_LAYOUTSTATS: LAYOUTSTATS4args oplayoutstats; /// case OP_OFFLOAD_CANCEL: OFFLOAD_CANCEL4args opoffload_cancel; /// case OP_OFFLOAD_STATUS: OFFLOAD_STATUS4args opoffload_status; /// case OP_READ_PLUS: READ_PLUS4args opread_plus; /// case OP_SEEK: SEEK4args opseek; /// case OP_WRITE_SAME: WRITE_SAME4args opwrite_same; /// case OP_CLONE: CLONE4args opclone; ///
Haynes Standards Track [Page 72]
RFC 7863 NFSv4.2 XDR November 2016
/// /* Operations not new to NFSv4.1 */ /// case OP_ILLEGAL: void; /// }; /// /// union nfs_resop4 switch (nfs_opnum4 resop) { /// case OP_ACCESS: ACCESS4res opaccess; /// case OP_CLOSE: CLOSE4res opclose; /// case OP_COMMIT: COMMIT4res opcommit; /// case OP_CREATE: CREATE4res opcreate; /// case OP_DELEGPURGE: DELEGPURGE4res opdelegpurge; /// case OP_DELEGRETURN: DELEGRETURN4res opdelegreturn; /// case OP_GETATTR: GETATTR4res opgetattr; /// case OP_GETFH: GETFH4res opgetfh; /// case OP_LINK: LINK4res oplink; /// case OP_LOCK: LOCK4res oplock; /// case OP_LOCKT: LOCKT4res oplockt; /// case OP_LOCKU: LOCKU4res oplocku; /// case OP_LOOKUP: LOOKUP4res oplookup; /// case OP_LOOKUPP: LOOKUPP4res oplookupp; /// case OP_NVERIFY: NVERIFY4res opnverify; /// case OP_OPEN: OPEN4res opopen; /// case OP_OPENATTR: OPENATTR4res opopenattr; /// /* Not for NFSv4.1 */ /// case OP_OPEN_CONFIRM: OPEN_CONFIRM4res opopen_confirm; /// /// case OP_OPEN_DOWNGRADE: OPEN_DOWNGRADE4res opopen_downgrade; /// /// case OP_PUTFH: PUTFH4res opputfh; /// case OP_PUTPUBFH: PUTPUBFH4res opputpubfh; /// case OP_PUTROOTFH: PUTROOTFH4res opputrootfh; /// case OP_READ: READ4res opread; /// case OP_READDIR: READDIR4res opreaddir; /// case OP_READLINK: READLINK4res opreadlink; /// case OP_REMOVE: REMOVE4res opremove; /// case OP_RENAME: RENAME4res oprename; /// /* Not for NFSv4.1 */ /// case OP_RENEW: RENEW4res oprenew; /// case OP_RESTOREFH: RESTOREFH4res oprestorefh; /// case OP_SAVEFH: SAVEFH4res opsavefh; /// case OP_SECINFO: SECINFO4res opsecinfo; /// case OP_SETATTR: SETATTR4res opsetattr; /// /* Not for NFSv4.1 */ /// case OP_SETCLIENTID: SETCLIENTID4res opsetclientid; ///
Haynes Standards Track [Page 73]
RFC 7863 NFSv4.2 XDR November 2016
/// /* Not for NFSv4.1 */ /// case OP_SETCLIENTID_CONFIRM: /// SETCLIENTID_CONFIRM4res /// opsetclientid_confirm; /// case OP_VERIFY: VERIFY4res opverify; /// case OP_WRITE: WRITE4res opwrite; /// /// /* Not for NFSv4.1 */ /// case OP_RELEASE_LOCKOWNER: /// RELEASE_LOCKOWNER4res /// oprelease_lockowner; /// /// /* Operations new to NFSv4.1 */ /// case OP_BACKCHANNEL_CTL: /// BACKCHANNEL_CTL4res opbackchannel_ctl; /// /// case OP_BIND_CONN_TO_SESSION: /// BIND_CONN_TO_SESSION4res /// opbind_conn_to_session; /// /// case OP_EXCHANGE_ID: EXCHANGE_ID4res opexchange_id; /// /// case OP_CREATE_SESSION: CREATE_SESSION4res opcreate_session; /// /// case OP_DESTROY_SESSION: /// DESTROY_SESSION4res opdestroy_session; /// /// case OP_FREE_STATEID: FREE_STATEID4res opfree_stateid; /// /// case OP_GET_DIR_DELEGATION: /// GET_DIR_DELEGATION4res /// opget_dir_delegation; /// /// case OP_GETDEVICEINFO: GETDEVICEINFO4res opgetdeviceinfo; /// case OP_GETDEVICELIST: GETDEVICELIST4res opgetdevicelist; /// case OP_LAYOUTCOMMIT: LAYOUTCOMMIT4res oplayoutcommit; /// case OP_LAYOUTGET: LAYOUTGET4res oplayoutget; /// case OP_LAYOUTRETURN: LAYOUTRETURN4res oplayoutreturn; /// /// case OP_SECINFO_NO_NAME: /// SECINFO_NO_NAME4res opsecinfo_no_name; /// /// case OP_SEQUENCE: SEQUENCE4res opsequence; /// case OP_SET_SSV: SET_SSV4res opset_ssv; /// case OP_TEST_STATEID: TEST_STATEID4res optest_stateid; /// /// case OP_WANT_DELEGATION: /// WANT_DELEGATION4res opwant_delegation;
Haynes Standards Track [Page 74]
RFC 7863 NFSv4.2 XDR November 2016
/// /// case OP_DESTROY_CLIENTID: /// DESTROY_CLIENTID4res /// opdestroy_clientid; /// /// case OP_RECLAIM_COMPLETE: /// RECLAIM_COMPLETE4res /// opreclaim_complete; /// /// /* Operations new to NFSv4.2 */ /// case OP_ALLOCATE: ALLOCATE4res opallocate; /// case OP_COPY: COPY4res opcopy; /// case OP_COPY_NOTIFY: COPY_NOTIFY4res opcopy_notify; /// case OP_DEALLOCATE: DEALLOCATE4res opdeallocate; /// case OP_IO_ADVISE: IO_ADVISE4res opio_advise; /// case OP_LAYOUTERROR: LAYOUTERROR4res oplayouterror; /// case OP_LAYOUTSTATS: LAYOUTSTATS4res oplayoutstats; /// case OP_OFFLOAD_CANCEL: OFFLOAD_CANCEL4res opoffload_cancel; /// case OP_OFFLOAD_STATUS: OFFLOAD_STATUS4res opoffload_status; /// case OP_READ_PLUS: READ_PLUS4res opread_plus; /// case OP_SEEK: SEEK4res opseek; /// case OP_WRITE_SAME: WRITE_SAME4res opwrite_same; /// case OP_CLONE: CLONE4res opclone; /// /// /* Operations not new to NFSv4.1 */ /// case OP_ILLEGAL: ILLEGAL4res opillegal; /// }; /// /// struct COMPOUND4args { /// utf8str_cs tag; /// uint32_t minorversion; /// nfs_argop4 argarray<>; /// }; /// /// struct COMPOUND4res { /// nfsstat4 status; /// utf8str_cs tag; /// nfs_resop4 resarray<>; /// }; /// ///
[RFC5662] Shepler, S., Ed., Eisler, M., Ed., and D. Noveck, Ed., "Network File System (NFS) Version 4 Minor Version 1 External Data Representation Standard (XDR) Description", RFC 5662, DOI 10.17487/RFC5662, January 2010, <http://www.rfc-editor.org/info/rfc5662>.