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

From: Thomas Haynes <[email-masked]>
Date: Mon, 28 Aug 2017 09:32:38 -0700

From: Tom Haynes <[email-masked]>

Signed-off-by: Tom Haynes <[email-masked]>
---
 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

---

From: David Noveck <[email-masked]>
Date: Mon, 28 Aug 2017 12:57:29 -0400

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.

On Mon, Aug 28, 2017 at 12:32 PM, Thomas Haynes <
[email-masked]> wrote:

> _______________________________________________
> nfsv4 mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/nfsv4
>

---

From: Thomas Haynes <[email-masked]>
Date: Mon, 28 Aug 2017 18:43:02 +0000

On Aug 28, 2017, at 9:57 AM, David Noveck <[email-masked]<mailto:[email-masked]>> wrote:

Suggest replacing:

By:

And replacing:

By:

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 <[email-masked]<mailto:[email-masked]>> wrote:
From: Tom Haynes <[email-masked]<mailto:[email-masked]>>

Signed-off-by: Tom Haynes <[email-masked]<mailto:[email-masked]>>
---
 Makefile                   |  5 +++--

 XML2RFC=xml2rfc

+  <t>
+    &lt;CODE BEGINS&gt;
+  </t>
   <figure>
     <artwork>
-      struct mode_umask4 {
-        mode4  mu_mode;
-        mode4  mu_umask;
-      };

_______________________________________________
nfsv4 mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/nfsv4