xdrgen: Add a utility for extracting XDR from RFCs
Subsystems (3)
[email protected]
maintainerPATCH 1/1 xdrgen: Add a utility for extracting XDR from RFCs
From: Chuck Lever <[email protected]>
For convenience, copy the XDR extraction script from RFC
--- tools/net/sunrpc/extract.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 tools/net/sunrpc/extract.sh
tools/net/sunrpc/extract.sh new file +10 -0
@@ -0,0 +1,10 @@ +#! /bin/sh +# +# Extract an RPC protocol specification from an RFC document. +# The version of this script comes from RFC 8166. +# +# Usage: +# $ extract.sh < rfcNNNN.txt > protocol.x +# + +grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??'
Signature · 1 line
2.46.2
Quoted 16 lines · On Mon, 2024-10-07 at 14:07 -0400, [email protected] wrote:
From: Chuck Lever <[email protected]>
For convenience, copy the XDR extraction script from RFC
Signed-off-by Chuck Lever <[email protected]>--- tools/net/sunrpc/extract.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 tools/net/sunrpc/extract.shtools/net/sunrpc/extract.sh new file +0
-0
tools/net/sunrpc/extract.sh line 10
Quoted 10 lines
tools/net/sunrpc/extract.sh new file +10
-0@@ -0,0 +1,10 @@ +#! /bin/sh +# +# Extract an RPC protocol specification from an RFC document. +# The version of this script comes from RFC 8166. +# +# Usage: +# $ extract.sh < rfcNNNN.txt > protocol.x +# + +grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??'
It might be nice to mention where to get the versions of the .txt files that have the "///" annotation before the source code bits. Are those available somewhere?
Quoted 27 lines · Jeff Layton
Quoted 22 lines · On Mon, 2024-10-07 at 14:07 -0400, [email protected] wrote:
From: Chuck Lever <[email protected]>
For convenience, copy the XDR extraction script from RFC
Signed-off-by Chuck Lever <[email protected]>---
tools/net/sunrpc/extract.sh| 10 ++++++++++1 file changed, 10 insertions(+)create mode 100755
tools/net/sunrpc/extract.shtools/net/sunrpc/extract.sh new file +6
-0@@ -0,0 +1,10 @@ +#! /bin/sh +# +# Extract an RPC protocol specification from an RFC document. +# The version of this script comes from RFC 8166. +# +# Usage:
Quoted 8 lines
tools/net/sunrpc/extract.sh line 10
Quoted 4 lines
tools/net/sunrpc/extract.sh new file +4
-0+# $ extract.sh < rfcNNNN.txt > protocol.x +# + +grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??'It might be nice to mention where to get the versions of the .txt files that have the "///" annotation before the source code bits. Are those available somewhere?
That kind of index would be appropriate to store under Documentation/sunrpc/xdr/ .
Or you can edit the extracted .x file to include that information as a comment, which is what I've been doing when the extracted .x does not already have that information. For example:
--
Chuck Lever