Re: [nfsv4] [PATCH] Add the ability to extract the new XDR from the draft

Thomas Haynes <loghyr@primarydata.com> Mon, 28 August 2017 18:43 UTC

Return-Path: <loghyr@primarydata.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C3E6C1200F3 for <nfsv4@ietfa.amsl.com>; Mon, 28 Aug 2017 11:43:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=primarydata.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dFgzHEST2a-S for <nfsv4@ietfa.amsl.com>; Mon, 28 Aug 2017 11:43:10 -0700 (PDT)
Received: from us-smtp-delivery-194.mimecast.com (us-smtp-delivery-194.mimecast.com [63.128.21.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4E5FF13291C for <nfsv4@ietf.org>; Mon, 28 Aug 2017 11:43:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=primarydata.com; s=mimecast20170802; t=1503945788; h=from:subject:date:message-id:to:cc:mime-version:content-type:in-reply-to:references; bh=0UVRSip3L7Lp7jfM8aRedKfrG3LN/PsQeazfobPcmZA=; b=ZgflZtlf7PFaiKuDyNqEuPw/hvTcX12EmYHbR2hupY9HM2WobACLUmcwUQ1vcGRj/8v0Z20uc6upj9/GEU4E8ddJBiJ2mod0hNubASBsbLWLzd+rbuetE2MZwr9BdSUrmN25t4zl8Lv38xTkgF0ux0PXKNlKxouodTztdwFzDUg=
Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01lp0177.outbound.protection.outlook.com [216.32.180.177]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-174-1kTdhJvfM324WsRoCP7Knw-1; Mon, 28 Aug 2017 14:43:05 -0400
Received: from BY2PR1101MB1093.namprd11.prod.outlook.com (10.164.166.21) by BY2PR1101MB1192.namprd11.prod.outlook.com (10.164.166.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Mon, 28 Aug 2017 18:43:02 +0000
Received: from BY2PR1101MB1093.namprd11.prod.outlook.com ([10.164.166.21]) by BY2PR1101MB1093.namprd11.prod.outlook.com ([10.164.166.21]) with mapi id 15.01.1385.013; Mon, 28 Aug 2017 18:43:02 +0000
From: Thomas Haynes <loghyr@primarydata.com>
To: Dave Noveck <davenoveck@gmail.com>
CC: Thomas Haynes <loghyr@primarydata.com>, "J. Bruce Fields" <bfields@fieldses.org>, "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: [nfsv4] [PATCH] Add the ability to extract the new XDR from the draft
Thread-Index: AQHTIBtaUo31/dEITUipWJVEqK3IYqKZ/UCAgAAdfIA=
Date: Mon, 28 Aug 2017 18:43:02 +0000
Message-ID: <6BC90957-8185-4121-A698-C774FA202875@primarydata.com>
References: <1503937958-119533-1-git-send-email-Thomas.Haynes@primarydata.com> <CADaq8jcBtZqtOwhzeuFOHNR=2_tmcQoCWTMTxDhEWiWzDj=P4w@mail.gmail.com>
In-Reply-To: <CADaq8jcBtZqtOwhzeuFOHNR=2_tmcQoCWTMTxDhEWiWzDj=P4w@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [63.157.6.18]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BY2PR1101MB1192; 20:thdFqGgeYD0dtVlrQfaI2IdDfsQeGzQLQjUXNYaGppbspb07LJe6+MB5VImNbZSmdlvE/puwrKttmq0oZl9nVMo2/p7UMvMJNw7rq4ypnsoho90WaRky45ksySfe6aNeBH3QCKHOzMwyiZ6DkTq1IeXr+TOWprRbwZskArvk2ls=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR;
x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10019020)(39830400002)(24454002)(199003)(377454003)(189002)(39060400002)(105586002)(106356001)(6436002)(3846002)(4326008)(101416001)(966005)(2950100002)(6916009)(54356999)(76176999)(68736007)(33656002)(478600001)(6486002)(97736004)(86362001)(229853002)(77096006)(2900100001)(189998001)(50986999)(6506006)(6512007)(36756003)(54896002)(236005)(6246003)(82746002)(6306002)(53546010)(53936002)(606006)(5660300001)(14454004)(102836003)(6116002)(66066001)(81166006)(81156014)(83716003)(1411001)(3660700001)(7736002)(2906002)(110136004)(54906002)(3280700002)(8676002)(8936002)(99286003)(25786009)(403724002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR1101MB1192; H:BY2PR1101MB1093.namprd11.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
x-ms-office365-filtering-correlation-id: 71244683-4e20-4c9a-d6ce-08d4ee449cd8
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(2017082002075)(300000503095)(300135400095)(2017052603199)(201703131423075)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR1101MB1192;
x-ms-traffictypediagnostic: BY2PR1101MB1192:
x-exchange-antispam-report-test: UriScan:;
x-microsoft-antispam-prvs: <BY2PR1101MB1192923FBC0145A4CCDE331ECE9E0@BY2PR1101MB1192.namprd11.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123562025)(20161123558100)(2016111802025)(6043046)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR1101MB1192; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR1101MB1192;
x-forefront-prvs: 0413C9F1ED
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
MIME-Version: 1.0
X-OriginatorOrg: primarydata.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2017 18:43:02.1163 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 03193ed6-8726-4bb3-a832-18ab0d28adb7
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR1101MB1192
X-MC-Unique: 1kTdhJvfM324WsRoCP7Knw-1
Content-Type: multipart/alternative; boundary="_000_6BC9095781854121A698C774FA202875primarydatacom_"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/cyZqb21u8TxQGN9Y6mkylRP9R-0>
Subject: Re: [nfsv4] [PATCH] Add the ability to extract the new XDR from the draft
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 28 Aug 2017 18:43:13 -0000

On Aug 28, 2017, at 9:57 AM, David Noveck <davenoveck@gmail.com<mailto:davenoveck@gmail.com>> wrote:

Suggest replacing:

The external data representation (XDR)
 <xref target='RFC4506' /> description
embedded in this document can be extracted
into a ready-to-compile by feeding this document
 into the following shell script:

By:
The additional lines of external data
representation (XDR) <xref target='RFC4506' />
description embedded in this document  can be
extracted by feeding this document into the
following shell script:

And replacing:

Note that the XDR code contained in this document depends on
types from the NFSv4.2 nfs42_prot.x file <xref target='RFC7863' />.
As such, the reader will need to add the generated XDR to
that from <xref target='RFC7863'

By:

Once that exraction is done, these added lines need to be
inseted into an appropiate base XDR including the generated
XDR from <xref target="RFC7863">,  together with XDR from
any additional extensions to be recognized by the implementation.
This will result in a ready-to compile XDR description that provides
a desctription of NFSv4.2 including this this extensin together with
the others included in the base XDR description provided.


That last sentence is a mouthful and repeats most of the prior sentence.

    Once that extraction is done, these added lines need to be
    inserted into an appropiate base XDR of the generated
    XDR from <xref target="RFC7863">, together with XDR from
    any additional extensions to be recognized by the implementation.
    This will result in a ready-to compile XDR file.






On Mon, Aug 28, 2017 at 12:32 PM, Thomas Haynes <Thomas.Haynes@primarydata.com<mailto:Thomas.Haynes@primarydata.com>> wrote:
From: Tom Haynes <loghyr@primarydata.com<mailto:loghyr@primarydata.com>>

Signed-off-by: Tom Haynes <loghyr@primarydata.com<mailto:loghyr@primarydata.com>>
---
 Makefile                   |  5 +++--
 umask_back_references.xml  | 12 +++++++++++
 umask_middle_attribute.xml | 19 +++++++++++++----
 umask_middle_xdr.xml       | 51 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 81 insertions(+), 6 deletions(-)
 create mode 100644 umask_middle_xdr.xml

diff --git a/Makefile b/Makefile
index d105830..f587a1e 100755
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,8 @@
 YEAR=`date +%Y`
 MONTH=`date +%B`
 DAY=`date +%d`
-PREVVERS=00
-VERS=04
+PREVVERS=04
+VERS=05

 XML2RFC=xml2rfc

@@ -84,6 +84,7 @@ FRONT_PREGEN = ${DOC_PREFIX}_front.xml
 IDXMLSRC_BASE = \
        ${DOC_PREFIX}_middle_start.xml \
        ${DOC_PREFIX}_middle_introduction.xml \
+       ${DOC_PREFIX}_middle_xdr.xml \
        ${DOC_PREFIX}_middle_attribute.xml \
        ${DOC_PREFIX}_middle_security.xml \
        ${DOC_PREFIX}_middle_end.xml \
diff --git a/umask_back_references.xml b/umask_back_references.xml
index bf25df5..2bba1ba 100644
--- a/umask_back_references.xml
+++ b/umask_back_references.xml
@@ -19,6 +19,18 @@
       </front>
     </reference>

+  <reference anchor='RFC4506'>
+    <front>
+    <title abbrev='XDR'>XDR: External Data Representation Standard</title>
+    <author initials='M.' surname='Eisler' fullname='Mike Eisler'>
+    <organization>Network Appliance, Inc.</organization>
+    </author>
+    <date month='May' year='2006'/>
+    </front>
+    <seriesInfo name='STD' value='67' />
+    <seriesInfo name="RFC" value="4506"/>
+  </reference>
+
   <reference anchor='RFC7530'>
     <front>
       <title>Network File System (NFS) version 4 Protocol</title>
diff --git a/umask_middle_attribute.xml b/umask_middle_attribute.xml
index 4355729..4892bd2 100644
--- a/umask_middle_attribute.xml
+++ b/umask_middle_attribute.xml
@@ -3,14 +3,25 @@

 <section anchor="sec:solution" title="mode_umask Attribute">

+  <t>
+    &lt;CODE BEGINS&gt;
+  </t>
   <figure>
     <artwork>
-      struct mode_umask4 {
-        mode4  mu_mode;
-        mode4  mu_umask;
-      };
+///   struct mode_umask4 {
+///     mode4  mu_mode;
+///     mode4  mu_umask;
+///   };
+///
+///   %/*
+///   % * New For UMASK
+///   % */
+///   const FATTR4_MODE_UMASK         = 81;
     </artwork>
   </figure>
+  <t>
+    &lt;CODE ENDS&gt;
+  </t>

   <texttable anchor="tbl:rec_attr">
     <ttcol align="left">Name</ttcol>
diff --git a/umask_middle_xdr.xml b/umask_middle_xdr.xml
new file mode 100644
index 0000000..f6450e9
--- /dev/null
+++ b/umask_middle_xdr.xml
@@ -0,0 +1,51 @@
+<!-- Copyright (C) The IETF Trust (2014) -->
+<!-- Copyright (C) The Internet Society (2014) -->
+
+<section anchor="xdr" title="XDR Extraction">
+  <t>
+    The external data representation (XDR)
+    <xref target='RFC4506' /> description
+    embedded in this document can be extracted
+    into a ready-to-compile by feeding this document
+    into the following shell script:
+  </t>
+
+  <t>
+    &lt;CODE BEGINS&gt;
+  </t>
+
+  <figure>
+    <artwork>
+#!/bin/sh
+grep '^ *///' $* | sed 's?^ */// ??' | sed 's?^ *///$??'
+    </artwork>
+  </figure>
+
+  <t>
+    &lt;CODE ENDS&gt;
+  </t>
+
+  <t>
+    That is, if the above script is stored in a file called "extract.sh", and
+    this document is in a file called "umask.txt", then the reader can do:
+  </t>
+
+  <figure>
+    <artwork>
+sh extract.sh &lt; umask.txt &gt; umask.x
+    </artwork>
+  </figure>
+
+  <t>
+    The effect of the script is to remove leading white space from each
+    line, plus a sentinel sequence of "///".
+  </t>
+
+  <t>
+    Note that the XDR code contained in this document depends on
+    types from the NFSv4.2 nfs42_prot.x file <xref target='RFC7863' />.
+    As such, the reader will need to add the generated XDR to
+    that from <xref target='RFC7863' />.
+  </t>
+
+</section>
--
2.3.6

_______________________________________________
nfsv4 mailing list
nfsv4@ietf.org<mailto:nfsv4@ietf.org>
https://www.ietf.org/mailman/listinfo/nfsv4