[rfc-i] Embedding stuff (code, etc.) in RFCs

Nico Williams nico at cryptonector.com
Fri Jul 12 13:08:40 PDT 2013

On Fri, Jul 12, 2013 at 1:33 PM, Paul Hoffman <paul.hoffman at vpnc.org> wrote:
> Is the problem statement:
>    Some RFCs have stuff (code, etc.) inline, and it would be useful for a reader
>    to be able to get it easily without having to unindent, remove page breaks,
>    split into separate files, and so on?
> If so, a simple solution would be "the stuff (code, etc.) in this RFC can be found at http://www.rfc-editor.org/rfc-stuff/rfc7890.tgz". The URL would be canonical, the response one gets when resolving it would not be, just as is the response one gets for other non-canonical stuff like PDF versions of RFCs.

We'd have to include a cryptographic (SHA-2, say) hash of the tarball.

For sufficiently large amounts of code this is a good solution (who
wants to bother with 1,000-page RFCs whose only purpose is to
unnecessarily paginate hundreds of pages of code for deliver in RFC

RFC5662 should be the canonical RFC *today* for code extraction.  Its
only purpose is to deliver the XDR referred to from other NFSv4.1 RFCs
(e.g., RFC5661) in extractable form.  RFC5662 weighs in at 73 pages,
including boilerplate, to deliver 3274 lines of XDR.

The extraction command (for Unix-ish systems) is:

   grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??'


More information about the rfc-interest mailing list