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

Thomas Haynes <Thomas.Haynes@primarydata.com> Mon, 28 August 2017 16:33 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 6362C132C32 for <nfsv4@ietfa.amsl.com>; Mon, 28 Aug 2017 09:33:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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 M2uLgFvpdsuH for <nfsv4@ietfa.amsl.com>; Mon, 28 Aug 2017 09:33:20 -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 3EA80132939 for <nfsv4@ietf.org>; Mon, 28 Aug 2017 09:33:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=primarydata.com; s=mimecast20170802; t=1503937999; h=from:subject:date:message-id:to:cc:mime-version:content-type:content-transfer-encoding; bh=QjGA624kN+araoeltOqGm5gYfG0hL/urvljwwpjlq08=; b=PRRa3dM2r5k9K8tRZgcKPYyjfclh6AW00FvDLP8PxTvmCKRS/5jJ59TbSvSsbCngX61VkES+3n8WrtGLZy1o2k7MQnhto7eNPcg4LbwQr8lnWoj00mlZMrQkRDZ3OCTwWqHzRz+eQ5MPZ7s+ZghXU1Ak+MmnohiB0hfT7KOvV0g=
Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02lp0088.outbound.protection.outlook.com [207.46.163.88]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-64-gw9vwAy_OOyMuVEWm3FTyQ-1; Mon, 28 Aug 2017 12:33:16 -0400
Received: from jhereg.localdomain (63.157.6.18) by BN3PR1101MB1089.namprd11.prod.outlook.com (10.165.75.21) 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 16:33:14 +0000
From: Thomas Haynes <Thomas.Haynes@primarydata.com>
To: bfields@fieldses.org, nfsv4@ietf.org
Cc: Tom Haynes <loghyr@primarydata.com>
Date: Mon, 28 Aug 2017 09:32:38 -0700
Message-Id: <1503937958-119533-1-git-send-email-Thomas.Haynes@primarydata.com>
X-Mailer: git-send-email 2.3.6
MIME-Version: 1.0
X-Originating-IP: [63.157.6.18]
X-ClientProxiedBy: CY4PR15CA0021.namprd15.prod.outlook.com (10.172.74.31) To BN3PR1101MB1089.namprd11.prod.outlook.com (10.165.75.21)
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: f9d41133-01d6-4a56-d9dc-08d4ee327b5d
X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(2017082002075)(300000503095)(300135400095)(201703131423075)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR1101MB1089;
X-Microsoft-Exchange-Diagnostics: 1; BN3PR1101MB1089; 3:CA/r75+bXZRKmwJqfwTCMXJE3KkiFfNRDa1oqjaVO4BaopT7apRG1RFz6Z7UtE/+DxKc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vV9fCTWJ83BXc/z74v5BaAPkFe6cO9BSv50sJs/6g7EiYC83oAWMcIPBDVmB8HeT+p4R/hMg0z7MzodA1u1m1C08ZzSM1uSJZbHNkNweUuQchxP16b751tGsvZiyB3wcbXtHyhCIkuZgLlJqa8fGJ+yoR513bbybjaN/hjJ3rLOcrFyfPH8Sx/WvX5TdeyTWmGiE51w34JY6cMkCdX
X-Exchange-Antispam-Report-Test: UriScan:;
X-Microsoft-Antispam-PRVS: <BN3PR1101MB10890065A2449200B87A5594CE9E0@BN3PR1101MB1089.namprd11.prod.outlook.com>
X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(2016111802025)(6043046)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR1101MB1089; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR1101MB1089;
X-Forefront-PRVS: 0413C9F1ED
X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(7370300001)(6009001)(39830400002)(199003)(189002)(81166006)(8676002)(305945005)(50986999)(7736002)(101416001)(5003940100001)(47776003)(6486002)(6506006)(106356001)(53936002)(66066001)(81156014)(5660300001)(36756003)(105586002)(4326008)(6512007)(42186005)(110136004)(107886003)(68736007)(97736004)(50466002)(25786009)(48376002)(50226002)(6116002)(3846002)(189998001)(6666003)(478600001)(2906002)(7350300001)(403724002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR1101MB1089; H:jhereg.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR1101MB1089; 23:q/L1NQFK/AQMeslPUPEkuEENT1MEcnqXSSU5ir2?= =?us-ascii?Q?gR3NLdNIbqYn0I7vhK9OL53nFhGOl2koq2e7Y8N9bntKGYNcvTXCPxjpWYD/?= =?us-ascii?Q?TMmMxKCgdzF6lvjGanL4XIY0TMt81sCvFnHGy+BQCaez4wV2uAAYB62T0d/5?= =?us-ascii?Q?IQSLSRZoimbjVSrOAmbB19YYuHYBxZYxLBSrc8Hvid81vppAWpTCUJ80EpJm?= =?us-ascii?Q?GFxxg2cqkGU6bAY5zgGsfNBXfd4B5f+DJecWIux4uxUEBnWZTwNn2+vvhIh9?= =?us-ascii?Q?3ewlJ5/OUhRWLiE7BZEB7mr7C3FOuxCXe025EvPq9Er83zaK9BUpZ5Ku65YD?= =?us-ascii?Q?Kecz/0voJLwdP9JbHasgSSKOQkbPWVHWeyWaJQpOYXN08miLqARMnaLws6ME?= =?us-ascii?Q?2iZxGuszKwPUvm7byYoC4nD40Orgaj5hd8W+/+hLcVsgEwHS7Gn/1Vl8phIB?= =?us-ascii?Q?ZUB2g2YSm8l9tUEgmUnKGNo3isYFJTRIs+p0jDW5UqG5KGqwZeVlH9YgUrhO?= =?us-ascii?Q?OiTgpfNx0UtPhR6sTbjxj2xEpq7Yg93V7r8eywKbh+P139kEpOvZkMsiq9rs?= =?us-ascii?Q?l/VA49FEFNmZCEH47yH6mMlIv7hy4S5PIeZEOqEn/RrET41eV1MJLHvjWRZe?= =?us-ascii?Q?r5JgYBWdIXHpst69vV0dzVfYDaJ4cB5vDdkKPu0sMhGppmthA986hcjVVCxg?= =?us-ascii?Q?qFHNh2NCBB/LdYuEAK+JbrCUWdH3O71z8nBXGL1is7YYi+Dw3BtxyXEQ2GIO?= =?us-ascii?Q?+hFnsIvCJR2lIrpRIFjiVCMIFWudFGy4J9EHLgRys3vLjem/ugV24ENlZyz7?= =?us-ascii?Q?2NTEGKJ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GODCK8VgxRi4jT58l2drRjIXY03dSO+PmcyGVeQeO+X3v4+PgRcNbYWss3eopeoAG70t9QbkaRImxNnvjn9TGoH38ZLAOVNmSK8tOQq7dyiqPu2U=
SpamDiagnosticOutput: 1:99
SpamDiagnosticMetadata: NSPM
X-Microsoft-Exchange-Diagnostics: 1; BN3PR1101MB1089; 20:ns7jQLHJFW+Zp0hFWe4RrjuUp+KXq8VewUNZl9YSfCOHbazyMCEqchmfg9ZWDiaXu1Gtsh6RjEZlgg4z1hunFsnipBbunY/bvVutoWnykxyvhaX0P1s+/DtV6+H5G3vZOQZjb3l/yfLdu/Ih+M9d1OX6ayN9tmSHATY99ShWy24=
X-OriginatorOrg: primarydata.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2017 16:33:14.5981 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR1101MB1089
X-MC-Unique: gw9vwAy_OOyMuVEWm3FTyQ-1
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/qk6ntlaJu5iNCQ9VB6eTM8ZGBpQ>
Subject: [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 16:33:22 -0000

From: Tom Haynes <loghyr@primarydata.com>

Signed-off-by: Tom Haynes <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