]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xdrgen: Add a utility for extracting XDR from RFCs
authorChuck Lever <chuck.lever@oracle.com>
Mon, 7 Oct 2024 18:07:54 +0000 (14:07 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 19 Nov 2024 01:22:59 +0000 (20:22 -0500)
For convenience, copy the XDR extraction script from RFC

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
MAINTAINERS
tools/net/sunrpc/extract.sh [new file with mode: 0755]

index 21fdaa19229ae84d8befc4ed0eed1a2167eb0687..f711449753b3e36fb054a1e9f7d76816e4dacd0c 100644 (file)
@@ -12367,6 +12367,7 @@ F:      include/trace/misc/sunrpc.h
 F:     include/uapi/linux/nfsd/
 F:     include/uapi/linux/sunrpc/
 F:     net/sunrpc/
+F:     tools/net/sunrpc/
 
 KERNEL PACMAN PACKAGING (in addition to generic KERNEL BUILD)
 M:     Thomas Weißschuh <linux@weissschuh.net>
diff --git a/tools/net/sunrpc/extract.sh b/tools/net/sunrpc/extract.sh
new file mode 100755 (executable)
index 0000000..f944066
--- /dev/null
@@ -0,0 +1,11 @@
+#! /bin/sh
+# SPDX-License-Identifier: GPL-2.0
+#
+# 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?^ *///$??'