| draft-mcquistin-augmented-ascii-diagrams-12.txt | draft-mcquistin-augmented-ascii-diagrams-13.txt | |||
|---|---|---|---|---|
| Network Working Group S. McQuistin | Network Working Group S. McQuistin | |||
| Internet-Draft V. Band | Internet-Draft University of St Andrews | |||
| Intended status: Experimental D. Jacob | Intended status: Experimental V. Band | |||
| Expires: 14 September 2023 C. S. Perkins | Expires: 24 April 2024 D. Jacob | |||
| C. S. Perkins | ||||
| University of Glasgow | University of Glasgow | |||
| 13 March 2023 | 22 October 2023 | |||
| Describing Protocol Data Units with Augmented Packet Header Diagrams | Describing Protocol Data Units with Augmented Packet Header Diagrams | |||
| draft-mcquistin-augmented-ascii-diagrams-12 | draft-mcquistin-augmented-ascii-diagrams-13 | |||
| Abstract | Abstract | |||
| This document describes a machine-readable format for specifying the | This document describes a machine-readable format for specifying the | |||
| syntax of protocol data units within a protocol specification. This | syntax of protocol data units within a protocol specification, known | |||
| format is comprised of a consistently formatted packet header | as an Augmented Packet Header Diagram. This comprises a consistently | |||
| diagram, followed by structured explanatory text. It is designed to | formatted packet header diagram, using a well-defined syntax, that is | |||
| maintain human readability while enabling support for automated | followed by structured explanatory text. The Augmented Packet Header | |||
| parser generation from the specification document. This document is | Diagram format is designed to maintain human readability, while also | |||
| itself an example of how the format can be used. | supporting automated parser generation from protocol specification | |||
| documents. This document is itself an example of how the format can | ||||
| be used. | ||||
| Status of This Memo | Status of This Memo | |||
| This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
| provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on 14 September 2023. | This Internet-Draft will expire on 24 April 2024. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2023 IETF Trust and the persons identified as the | Copyright (c) 2023 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents (https://trustee.ietf.org/ | Provisions Relating to IETF Documents (https://trustee.ietf.org/ | |||
| license-info) in effect on the date of publication of this document. | license-info) in effect on the date of publication of this document. | |||
| Please review these documents carefully, as they describe your rights | Please review these documents carefully, as they describe your rights | |||
| and restrictions with respect to this document. Code Components | and restrictions with respect to this document. Code Components | |||
| extracted from this document must include Revised BSD License text as | extracted from this document must include Revised BSD License text as | |||
| described in Section 4.e of the Trust Legal Provisions and are | described in Section 4.e of the Trust Legal Provisions and are | |||
| provided without warranty as described in the Revised BSD License. | provided without warranty as described in the Revised BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 2. Background . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 2. Background . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 2.1. Limitations of Current Packet Format Diagrams . . . . . . 4 | 2.1. Limitations of Current Packet Header Diagrams . . . . . . 4 | |||
| 2.2. Formal languages in standards documents . . . . . . . . . 7 | 2.2. Formal languages in standards documents . . . . . . . . . 7 | |||
| 3. Augmented Packet Header Diagrams . . . . . . . . . . . . . . 7 | 3. Augmented Packet Header Diagrams . . . . . . . . . . . . . . 7 | |||
| 3.1. Defining Protocol Data Units . . . . . . . . . . . . . . 8 | 3.1. Defining Protocol Data Units . . . . . . . . . . . . . . 8 | |||
| 3.2. Cross-Referencing Previously Defined Fields . . . . . . . 13 | 3.2. Cross-Referencing Previously Defined Fields . . . . . . . 13 | |||
| 3.3. Specifying Enumerated Types . . . . . . . . . . . . . . . 14 | 3.3. Specifying Enumerated Types . . . . . . . . . . . . . . . 14 | |||
| 3.4. Splitting Fields . . . . . . . . . . . . . . . . . . . . 15 | 3.4. Splitting Fields . . . . . . . . . . . . . . . . . . . . 15 | |||
| 3.5. Extending Sub-Structures . . . . . . . . . . . . . . . . 15 | 3.5. Extending Sub-Structures . . . . . . . . . . . . . . . . 15 | |||
| 3.6. Storing Data for Parsing . . . . . . . . . . . . . . . . 18 | 3.6. Storing Data for Parsing . . . . . . . . . . . . . . . . 18 | |||
| 3.7. Connecting Structures with Functions . . . . . . . . . . 18 | 3.7. Connecting Structures with Functions . . . . . . . . . . 18 | |||
| 3.8. Specifying Protocols . . . . . . . . . . . . . . . . . . 19 | 3.8. Specifying Protocols . . . . . . . . . . . . . . . . . . 19 | |||
| skipping to change at page 2, line 37 ¶ | skipping to change at page 2, line 43 ¶ | |||
| 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 23 | 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 23 | |||
| 8. Informative References . . . . . . . . . . . . . . . . . . . 23 | 8. Informative References . . . . . . . . . . . . . . . . . . . 23 | |||
| Appendix A. ABNF specification . . . . . . . . . . . . . . . . . 25 | Appendix A. ABNF specification . . . . . . . . . . . . . . . . . 25 | |||
| A.1. Constraint Expressions . . . . . . . . . . . . . . . . . 25 | A.1. Constraint Expressions . . . . . . . . . . . . . . . . . 25 | |||
| A.2. Augmented packet diagrams . . . . . . . . . . . . . . . . 26 | A.2. Augmented packet diagrams . . . . . . . . . . . . . . . . 26 | |||
| Appendix B. Tooling & source code . . . . . . . . . . . . . . . 26 | Appendix B. Tooling & source code . . . . . . . . . . . . . . . 26 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 | |||
| 1. Introduction | 1. Introduction | |||
| Packet header diagrams have become a widely used format for | Packet header diagrams are widely used for describing the syntax of | |||
| describing the syntax of binary protocols. In otherwise largely | binary protocols. In otherwise largely textual documents, they allow | |||
| textual documents, they allow for the visualisation of packet | for the visualisation of packet formats in a readily understandable | |||
| formats, reducing human error, and aiding in the implementation of | manner, aiding the implementation of parsers for the protocols that | |||
| parsers for the protocols that they specify. | they describe. | |||
| Figure 1 gives an example of how packet header diagrams are used to | Figure 1 gives an example of how packet header diagrams are used to | |||
| define binary protocol formats. The format has an obvious structure: | define binary protocol formats. The format has an obvious structure: | |||
| the diagram clearly delineates each field, showing its width and its | the diagram clearly delineates each field, showing its width and its | |||
| position within the header. This type of diagram is designed for | position within the header. This type of diagram is designed for | |||
| human readers, but is consistent enough that it should be possible to | human readers, but is consistent enough that it should be possible to | |||
| develop a tool that generates a parser for the packet format from the | develop a tool that generates a parser for the packet format from the | |||
| diagram. | diagram. | |||
| : 0 1 2 3 | : 0 1 2 3 | |||
| skipping to change at page 3, line 25 ¶ | skipping to change at page 3, line 28 ¶ | |||
| : | Offset| Reserved |R|C|S|S|Y|I| Window | | : | Offset| Reserved |R|C|S|S|Y|I| Window | | |||
| : | | |G|K|H|T|N|N| | | : | | |G|K|H|T|N|N| | | |||
| : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| : | Checksum | Urgent Pointer | | : | Checksum | Urgent Pointer | | |||
| : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| : | Options | Padding | | : | Options | Padding | | |||
| : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| : | data | | : | data | | |||
| : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Figure 1: TCP's header format (from [RFC793]) | Figure 1: The TCP packet header format (from [RFC793]) | |||
| Unfortunately, the format of such packet diagrams varies both within | Unfortunately, the format of such packet diagrams varies both within | |||
| and between documents. This variation makes it difficult to build | and between documents in the RFC series. This variation makes it | |||
| tools to generate parsers from the specifications. Better tooling | difficult to build tools to generate parsers from the specifications. | |||
| could be developed if protocol specifications adopted a consistent | Better tooling could be developed if protocol specifications adopted | |||
| format for their packet descriptions. Indeed, this underpins the | a consistent format for their packet descriptions. Indeed, this | |||
| format described by this draft: we want to retain the benefits that | underpins the format described by this draft: we want to retain the | |||
| packet header diagrams provide, while identifying the benefits of | benefits that packet header diagrams provide, while identifying the | |||
| adopting a consistent format. | benefits of adopting a consistent format. | |||
| This document describes a consistent packet header diagram format and | This document describes a consistent packet header diagram format and | |||
| accompanying structured text constructs that allow for the parsing | accompanying structured text phrases, collectively known as Augmented | |||
| process of protocol headers to be fully specified. This provides | Packet Header Diagrams, that fully specify the syntax of protocol | |||
| support for the automatic generation of parser code. Broad design | data units allowing for the automated generation of packet parsing | |||
| principles, that seek to maintain the primacy of human readability | code. Broad design principles, that maintain the primacy of human | |||
| and flexibility in writing, are described, before the format itself | readability and flexibility in writing, are described, before the | |||
| is given. | format itself is given. | |||
| This document is itself an example of the approach that it describes, | This document is itself an example of the approach that it describes, | |||
| with the packet header diagrams and structured text format described | with the packet header diagrams and structured text format described | |||
| by example. Examples that do not form part of the protocol | by example. Packet header diagrams that do not use the Augmented | |||
| description language are marked by a colon at the beginning of each | Packet Header Diagram format are marked by a colon at the beginning | |||
| line; this prevents them from being parsed by the accompanying | of each line, as in Figure 1; this prevents them from being parsed by | |||
| tooling. | the accompanying tooling. | |||
| The goal of this document is to define a format that, with minimal | ||||
| effort on the part of authors, provides benefits to the users of | ||||
| those documents that adopt it. An explicit non-goal of this work, as | ||||
| will be further discussed in Section 4, is to be prescriptive about | ||||
| how the format should be adopted. For example, alterations to the | ||||
| underlying XML format of RFCs are out-of-scope. | ||||
| This draft describes early work. As consensus builds around the | This draft describes early work. As consensus builds around the | |||
| particular syntax of the format described, a formal ABNF | particular syntax of the format described, a formal ABNF | |||
| specification (Appendix A) will be provided. | specification (Appendix A) will be provided. Code that parses | |||
| documents written using this format, and that automatically generates | ||||
| parser code for the described protocols, is described in Appendix B. | ||||
| Code that parses documents written using this format, and that | ||||
| automatically generates parser code for the described protocols, is | ||||
| described in Appendix B. | ||||
| 2. Background | 2. Background | |||
| This section begins by considering how packet header diagrams are | We begin by considering how packet header diagrams are currently used | |||
| used in existing documents. This exposes the limitations that the | within the RFC series. This exposes the limitations that the current | |||
| current usage has in terms of machine-readability, guiding the design | usage has in terms of machine-readability, guiding the design of the | |||
| of the format that this document proposes. | augmented packet header format that we propose. | |||
| While this document focuses on the machine-readability of packet | While this document focuses on machine-readability of packet header | |||
| format diagrams, this section also discusses the use of other | diagrams, this section also discusses the use of other structured or | |||
| structured or formal languages within IETF documents. Considering | formal languages within IETF documents. Considering how and why | |||
| how and why these languages are used provides an instructive contrast | these languages are used provides an instructive contrast to the | |||
| to the relatively incremental approach proposed here. | relatively incremental approach proposed here. | |||
| 2.1. Limitations of Current Packet Format Diagrams | 2.1. Limitations of Current Packet Header Diagrams | |||
| Packet header diagrams are frequently used in IETF standards to | ||||
| describe the format of binary protocols. While there is no standard | ||||
| for how these diagrams should be formatted, they have a broadly | ||||
| similar structure, where the layout of a protocol data unit (PDU) or | ||||
| structure is shown in diagrammatic form, followed by a description of | ||||
| the fields that it contains. An example of this format, taken from a | ||||
| draft of the QUIC specification, is given in Figure 2. | ||||
| : The RESET_STREAM frame is as follows: | : The RESET_STREAM frame is as follows: | |||
| : | : | |||
| : 0 1 2 3 | : 0 1 2 3 | |||
| : 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | : 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
| : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| : | Stream ID (i) ... | : | Stream ID (i) ... | |||
| : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| : | Application Error Code (16) | | : | Application Error Code (16) | | |||
| : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| : | Final Size (i) ... | : | Final Size (i) ... | |||
| skipping to change at page 5, line 5 ¶ | skipping to change at page 5, line 31 ¶ | |||
| : | : | |||
| : Application Protocol Error Code: A 16-bit application protocol | : Application Protocol Error Code: A 16-bit application protocol | |||
| : error code (see Section 20.1) which indicates why the stream | : error code (see Section 20.1) which indicates why the stream | |||
| : is being closed. | : is being closed. | |||
| : | : | |||
| : Final Size: A variable-length integer indicating the final size | : Final Size: A variable-length integer indicating the final size | |||
| : of the stream by the RESET_STREAM sender, in unit of bytes. | : of the stream by the RESET_STREAM sender, in unit of bytes. | |||
| Figure 2: QUIC's RESET_STREAM frame format (from [QUIC-TRANSPORT]) | Figure 2: QUIC's RESET_STREAM frame format (from [QUIC-TRANSPORT]) | |||
| Packet header diagrams are frequently used in IETF standards to | ||||
| describe the format of binary protocols. While there is no standard | ||||
| for how these diagrams should be formatted, they have a broadly | ||||
| similar structure, where the layout of a protocol data unit (PDU) or | ||||
| structure is shown in diagrammatic form, followed by a description | ||||
| list of the fields that it contains. An example of this format, | ||||
| taken from the QUIC specification, is given in Figure 2. | ||||
| These packet header diagrams, and the accompanying descriptions, are | These packet header diagrams, and the accompanying descriptions, are | |||
| formatted for human readers rather than for automated processing. As | formatted for human readers rather than for automated processing. As | |||
| a result, while there is rough consistency in how packet header | a result, while there is rough consistency in how packet header | |||
| diagrams are formatted, there are a number of limitations that make | diagrams are formatted, there are a number of limitations that make | |||
| them difficult to work with programmatically: | them difficult to work with programmatically: | |||
| Inconsistent syntax: There are two classes of consistency that are | Inconsistent syntax: There are two classes of consistency that are | |||
| needed to support automated processing of specifications: internal | needed to support automated processing of specifications: internal | |||
| consistency within a diagram or document, and external consistency | consistency within a diagram or document, and external consistency | |||
| across all documents. | across all documents. | |||
| skipping to change at page 6, line 15 ¶ | skipping to change at page 6, line 26 ¶ | |||
| cannot be parsed easily. In Figure 3, each of the three fields in | cannot be parsed easily. In Figure 3, each of the three fields in | |||
| the structure is constrained. The first two fields ("Option-Code" | the structure is constrained. The first two fields ("Option-Code" | |||
| and "Option-Len") are to be set to constant values (note the | and "Option-Len") are to be set to constant values (note the | |||
| inconsistency in how these constraints are expressed in the | inconsistency in how these constraints are expressed in the | |||
| description). However, the third field ("Downstream Source Port") | description). However, the third field ("Downstream Source Port") | |||
| can take a value from a constrained set. This constraint is | can take a value from a constrained set. This constraint is | |||
| expressed in prose that cannot readily by understood by machine. | expressed in prose that cannot readily by understood by machine. | |||
| Poor linking between sub-structures: Protocol data units and other | Poor linking between sub-structures: Protocol data units and other | |||
| structures are often comprised of sub-structures that are defined | structures are often comprised of sub-structures that are defined | |||
| elsewhere, either in the same document, or within another | elsewhere, either in the same document or within a related | |||
| document. Chaining these structures together is essential for | document (e.g., a base protocol specification document and a set | |||
| machine parsing: the parsing process for a protocol data unit is | of extensions). Chaining these structures together is essential | |||
| only fully expressed if all elements can be parsed. | for machine parsing: the parsing process for a protocol data unit | |||
| is only fully expressed if all elements can be parsed. | ||||
| Figure 2 highlights the difficulty that machine parsers have in | Figure 2 highlights the difficulty that machine parsers have in | |||
| chaining structures together. Two fields ("Stream ID" and "Final | chaining structures together. Two fields ("Stream ID" and "Final | |||
| Size") are described as being encoded as variable-length integers; | Size") are described as being encoded as variable-length integers; | |||
| this is a structure described elsewhere in the same document. | this is a structure described elsewhere in the same document. | |||
| Structured text is required both alongside the definition of the | Structured text is required both alongside the definition of the | |||
| containing structure and with the definition of the sub-structure, | containing structure and with the definition of the sub-structure | |||
| to allow a parser to link the two together. | to allow a parser to link the two together. | |||
| Lack of extension and evolution syntax: Protocols are often | Lack of extension and evolution syntax: Protocols are often | |||
| specified across multiple documents, either because the protocol | specified across multiple documents, either because the protocol | |||
| explicitly includes extension points (e.g., profiles and payload | explicitly includes extension points (e.g., profiles and payload | |||
| format specifications in RTP [RFC3550]) or because definition of a | format specifications in RTP [RFC3550]) or because definition of a | |||
| protocol data unit has changed and evolved over time. As a | protocol data unit has changed and evolved over time. As a | |||
| result, it is essential that syntax be provided to allow for a | result, it is essential that syntax be provided to allow for a | |||
| complete definition of a protocol's parsing process to be | complete definition of a protocol's parsing process to be | |||
| constructed across multiple documents. | constructed across multiple documents. | |||
| skipping to change at page 7, line 26 ¶ | skipping to change at page 7, line 26 ¶ | |||
| : | : | |||
| : Option-Code: OPTION_RELAY_PORT. 16-bit value, 135. | : Option-Code: OPTION_RELAY_PORT. 16-bit value, 135. | |||
| : | : | |||
| : Option-Len: 16-bit value to be set to 2. | : Option-Len: 16-bit value to be set to 2. | |||
| : | : | |||
| : Downstream Source Port: 16-bit value. To be set by the IPv6 | : Downstream Source Port: 16-bit value. To be set by the IPv6 | |||
| : relay either to the downstream relay agent's UDP source port | : relay either to the downstream relay agent's UDP source port | |||
| : used for the UDP packet, or to zero if only the local relay | : used for the UDP packet, or to zero if only the local relay | |||
| : agent uses the non-DHCP UDP port (not 547). | : agent uses the non-DHCP UDP port (not 547). | |||
| Figure 3: DHCPv6's Relay Source Port Option (from [RFC8357]) | Figure 3: The DHCPv6 Relay Source Port Option (from [RFC8357]) | |||
| 2.2. Formal languages in standards documents | 2.2. Formal languages in standards documents | |||
| A small proportion of IETF standards documents contain structured and | A small proportion of IETF standards documents contain structured and | |||
| formal languages, including ABNF [RFC5234], ASN.1 [ASN1], C, CBOR | formal languages, including ABNF [RFC5234], ASN.1 [ASN1], C, CBOR | |||
| [RFC7049], JSON, the TLS presentation language [RFC8446], YANG models | [RFC7049], JSON, the TLS presentation language [RFC8446], YANG models | |||
| [RFC7950], and XML. While this broad range of languages may be | [RFC7950], and XML. While this broad range of languages may be | |||
| problematic for the development of tooling to parse specifications, | problematic for the development of tooling to parse specifications, | |||
| these, and other, languages serve a range of different use cases. | these, and other, languages serve a range of different use cases. | |||
| ABNF, for example, is typically used to specify text protocols, while | ABNF, for example, is typically used to specify text protocols, while | |||
| skipping to change at page 7, line 51 ¶ | skipping to change at page 7, line 51 ¶ | |||
| 3. Augmented Packet Header Diagrams | 3. Augmented Packet Header Diagrams | |||
| As discussed in Section 2.1 there are limitations to how packet | As discussed in Section 2.1 there are limitations to how packet | |||
| header diagrams are used that must be addressed if they are to be | header diagrams are used that must be addressed if they are to be | |||
| parsed by machine. In this section, an augmented packet header | parsed by machine. In this section, an augmented packet header | |||
| diagram format is described. The principles that underpin the design | diagram format is described. The principles that underpin the design | |||
| of this format are discussed in Section 4. | of this format are discussed in Section 4. | |||
| The concept is illustrated by example, with accompanying explanatory | The concept is illustrated by example, with accompanying explanatory | |||
| descriptions. This is appropriate, given the visual nature of the | descriptions. This is appropriate, given the visual nature of the | |||
| language. In future drafts a formal specification of the format will | language. A formal specification of the grammar for the augmented | |||
| be given in Appendix A. | packet header diagrams is given in Appendix A. | |||
| The augmented packet header diagram format described in this document | ||||
| aligns with an underlying protocol data model, the Network Packet | ||||
| Representation, outlined in [NETWORKING2021]. Using a typed data | ||||
| model to express the syntax of protocols, and the way that they are | ||||
| parsed, allows for safety and complexity properties to be defined and | ||||
| enforced. This underlying representation is independent of the | ||||
| description language used: the Augmented Packet Header Diagram | ||||
| format, defined in the sections that follow, is only one such | ||||
| approach. | ||||
| Our examples are drawn from the specifications of TCP [RFC9293], STUN | Our examples are drawn from the specifications of TCP [RFC9293], STUN | |||
| [RFC8489], and QUIC [QUIC-TRANSPORT]. These examples are | [RFC8489], and QUIC [QUIC-TRANSPORT]. These examples are | |||
| illustrative only of the Augmented Packet Header Diagram format that | illustrative only of the Augmented Packet Header Diagram format that | |||
| we define in this document, and they do not necessarily reflect the | we define in this document, and they do not necessarily reflect the | |||
| current state of the specifications they are taken from. For | current state of the specifications they are taken from. For | |||
| example, the published QUIC specification [RFC9000] does not use | example, the published QUIC specification [RFC9000] does not use | |||
| packet header diagrams to describe the syntax of the protocol. | packet header diagrams to describe the syntax of the protocol. | |||
| 3.1. Defining Protocol Data Units | 3.1. Defining Protocol Data Units | |||
| A PDU description is introduced by the exact phrase "A/An _______ is | The Augmented Packet Header Diagram format introduces a new protocol | |||
| formatted as follows" within a paragraph. Optionally, this phrase | data unit description using the exact phrase "A _______ is formatted | |||
| can include a note or comment, delimited by commas, immediately | as follows" within a paragraph (the phrasing "An ______ is formatted | |||
| following the PDU name. That is, "A/An _______, with an optional | as follows" can also be used). Optionally, this phrase can include a | |||
| comment, is formatted as follows" can be used to introduce a PDU | note or comment, delimited by commas, immediately following the PDU | |||
| description. The introductory phrase is followed by the PDU | name. That is, "A/An _______, with an optional comment, is formatted | |||
| description itself, as a packet diagram within an <artwork> element | as follows" can be used to introduce a PDU description. This | |||
| (itself optionally within a <figure> element) in the XML | introductory phrase is followed by the PDU description itself, as a | |||
| representation, starting with a header line to show the bit width of | packet diagram, starting with a header line to show the bit width of | |||
| the diagram. The description of the fields follows the diagram, as | the diagram. The description of the fields follows the diagram, | |||
| an XML list (either <dl> or hanging <list>), after a paragraph that | after a paragraph that begins with the text "where:". | |||
| begins with the text "where:". | ||||
| PDU names must be unique, both within a document, and across all | PDU names must be unique, both within a document, and across all | |||
| documents that are linked together (i.e., using the structured | documents that are linked together using the structured language | |||
| language defined in Section 3.9). | defined in Section 3.9. | |||
| Each field is defined by a structured text definition and a prose | Each field in the PDU is defined by a field in the packet header | |||
| description. The structured text definition comprises the field name | diagram, a structured text definition, and a prose description. The | |||
| and an optional short name in parenthesis. These are followed by a | structured text definition comprises the field name and an optional | |||
| colon, the field length, an optional expression constraining the | short name in parenthesis. These are followed by a colon, the field | |||
| value of the field, an optional presence constraint, and, optionally, | length, an optional expression constraining the value of the field, | |||
| a terminating period. Text following the terminating period is not | an optional presence constraint, and, optionally, a terminating | |||
| parsed, and this space can be used for optional notes or comments. | period. The prose following the terminating period provides space | |||
| Field names cannot be the same as a previously defined PDU name, and | for optional notes or comments. Field names cannot be the same as a | |||
| must be unique within a given structure definition. The structured | previously defined PDU name, and must be unique within a given | |||
| text definition is given either in a <dt> tag (if using a <dl>) or as | structure definition. Prose descriptions may include structured text | |||
| the "hangText" (if using a hanging <list>) of a <t> element. The | (e.g., as defined in Section 3.6). | |||
| field's prose description is given in the following <dd> element or | ||||
| within the same <t> element. Prose descriptions may include | ||||
| structured text (e.g., as defined in Section 3.6). | ||||
| A PDU may be defined not only by the layout and type of its fields, | A PDU may be defined not only by the layout and type of its fields, | |||
| but also by the value of those fields. For example, field values may | but also by the values of those fields. For example, field values | |||
| be constrained to be of a known exact value or to be within a range. | may be constrained to some known value or to be within a range. The | |||
| The "Data Offset" and "Reserved" fields in the example below make use | "Data Offset" and "Reserved" fields in the example below make use of | |||
| of value constraints. More generally, our format enables a boolean | value constraints. More generally, the augmented packet header | |||
| expression to be attached to a field, which must be true for the PDU | diagram format enables a boolean expression to be attached to a | |||
| to be parsed successfully. | field, which must be true for the PDU to be parsed successfully. | |||
| In addition, a PDU may contain fields that have a size that is | In addition, a PDU may contain fields that have a size that is | |||
| specified in terms of the value of another field. Our constraint | specified in terms of the value of another field. The constraint | |||
| syntax can be used to specify the length of fields in known units (of | syntax can be used to specify the length of fields in known units (of | |||
| bits, bytes, or other structures). In the example below, the | bits, bytes, or other structures). In the example below, the | |||
| "Options" field is defined in units of "TCP Option" structures, and | "Options" field is defined in units of "TCP Option" structures, and | |||
| this is indicated by square brackets in the diagram and description | this is indicated by square brackets in the diagram and description | |||
| list. | list. | |||
| If the units are of variable-width, then it may not be possible to | If the units are of variable-width, then it may not be possible to | |||
| specify the length of the sequence. However, it is still necessary | specify the length of the sequence. However, it is still necessary | |||
| to be able to constrain the overall width of the field. To support | to be able to constrain the overall width of the field. To support | |||
| this, our constraint syntax includes a "size" function that evaluates | this, the constraint syntax includes a "size" function that evaluates | |||
| to the width, in bits, of the given named field. The "Options" field | to the width, in bits, of the given named field. The "Options" field | |||
| in the example below makes use of this syntax to constrain the size | in the example below makes use of this syntax to constrain the size | |||
| of the field. | of the field. | |||
| Finally, the presence of a field in a PDU may depend on the value of | Finally, the presence of a field in a PDU may depend on the value of | |||
| other fields in that PDU. As shown by the "Options" field in the | other fields in that PDU. As shown by the "Options" field in the | |||
| example below, a constraint expression can be attached to each field, | example below, a constraint expression can be attached to each field, | |||
| where that field is only present in the PDU when the expression is | where that field is only present in the PDU when the expression is | |||
| true. | true. | |||
| We define an ABNF grammar for constraint expressions in Appendix A.1. | We define an ABNF grammar for constraint expressions in Appendix A.1. | |||
| This grammar is used across value, size, and presence constraint | This grammar is used across value, size, and presence constraint | |||
| expressions. | expressions. | |||
| These elements can be illustrated using the TCP Header format | The elements of an augmented packet header diagram can be illustrated | |||
| [RFC9293]. A TCP Header is formatted as follows: | using the TCP Header format [RFC9293]. A TCP Header is formatted as | |||
| follows: | ||||
| 0 1 2 3 | 0 1 2 3 | |||
| 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Source Port | Destination Port | | | Source Port | Destination Port | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Sequence Number | | | Sequence Number | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Acknowledgment Number | | | Acknowledgment Number | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| skipping to change at page 10, line 30 ¶ | skipping to change at page 10, line 30 ¶ | |||
| | [Options] | | | [Options] | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | : | | : | |||
| : Payload : | : Payload : | |||
| : | | : | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| where: | where: | |||
| Source Port: 16 bits. This is a fixed-width field, whose full label | Source Port: 16 bits. This is a fixed-width field, whose full label | |||
| is shown in the diagram. The field's width -- 16 bits -- is given | is shown in the diagram. The field's width, 16 bits, is given in | |||
| in the label of the description list, separated from the field's | this description, separated from the field's label by a colon. | |||
| label by a colon. | ||||
| Destination Port: 2 bytes. This is a fixed-width field as previously | Destination Port: 2 bytes. This is a fixed-width field as previously | |||
| described. Where fields are an integral number of bytes in size, | described. Where fields are an integral number of bytes in size, | |||
| the field length can be given in bytes rather than in bits. | the field length can be given in bytes rather than in bits. | |||
| Sequence Number: 32 bits. This is a fixed-width field as previously | Sequence Number: 32 bits. This is a fixed-width field as previously | |||
| described. | described. | |||
| Acknowledgment Number: 32 bits. This is a fixed-width field as | Acknowledgment Number: 32 bits. This is a fixed-width field as | |||
| previously described. | previously described. | |||
| Data Offset (DOffset): 4 bits; DOffset >= 5. This is a fixed-width | Data Offset (DOffset): 4 bits; DOffset >= 5. This is a fixed-width | |||
| field, with a constraint on its value. At most one field value | field, with a constraint on its value. At most one field value | |||
| constraint may be given per field, and if provided, it must be | constraint may be given per field, and if provided, it must be | |||
| given as a boolean expression, separated by a semi-colon in the | given as a boolean expression, separated by a semi-colon in the | |||
| field definition name (i.e., the text contained within the <dt> | field definition name. If present, a value constraint must follow | |||
| tag or "hangText" attribute). If present, a value constraint must | the name, short name, and length of the field, but appear before | |||
| follow the name, short name, and length of the field, but appear | any presence constraint, if applicable. The order of the field | |||
| before any presence constraint, if applicable. The order of the | must be the same in both the diagram and description list. | |||
| field must be the same in both the diagram and description list. | ||||
| Reserved (Rsrvd): 4 bits; Rsrvd == 0. This is a fixed-width field, | Reserved (Rsrvd): 4 bits; Rsrvd == 0. This is a fixed-width field, | |||
| with a value constraint, as previously described. This is a | with a value constraint, as previously described. This is a | |||
| shorter field, whose full label is too large to be shown in the | shorter field, whose full label is too large to be shown in the | |||
| diagram. A short label (Rsrvd) is used in the diagram, and this | diagram. A short label (Rsrvd) is used in the diagram, and this | |||
| short label is provided, in brackets, after the full label in the | short label is provided, in brackets, after the full label in the | |||
| description list. | description list. | |||
| Control bits: Optionally, field description lists can be nested. If | Control bits: Optionally, field description lists can be nested. In | |||
| the XML element (either a <dd> or a <t>) containing the | ||||
| description of a field contains an XML list (either <dl> or | ||||
| hanging <list>) as its last element, then this nested list will be | ||||
| parsed for fields, and the outer description will be ignored. In | ||||
| this example, "Control bits" describes the group of 8 single bit | this example, "Control bits" describes the group of 8 single bit | |||
| fields that are described in the list that follows; it is these | fields that are described in the list that follows; it is these | |||
| single bit fields that will form part of the structure. | single bit fields that will form part of the structure. | |||
| CWR: 1 bit. This is a fixed-width field as previously described. | CWR: 1 bit. This is a fixed-width field as previously described. | |||
| ECE: 1 bit. This is a fixed-width field as previously described. | ECE: 1 bit. This is a fixed-width field as previously described. | |||
| URG: 1 bit. This is a fixed-width field as previously described. | URG: 1 bit. This is a fixed-width field as previously described. | |||
| skipping to change at page 12, line 20 ¶ | skipping to change at page 12, line 23 ¶ | |||
| name of the field being defined, or of a previously defined field. | name of the field being defined, or of a previously defined field. | |||
| The "DOffset" field contains the number of 32-bit words that are | The "DOffset" field contains the number of 32-bit words that are | |||
| present in the TCP Header. By default, with no TCP options, this | present in the TCP Header. By default, with no TCP options, this | |||
| is 5. As a result, the size of the Options field is constrained | is 5. As a result, the size of the Options field is constrained | |||
| to the value of DOffset, less 5, and multiplied to get the value | to the value of DOffset, less 5, and multiplied to get the value | |||
| in bits. | in bits. | |||
| The presence of the "Options" field is predicated on an | The presence of the "Options" field is predicated on an | |||
| expression. Optional fields are indicated by the presence of "; | expression. Optional fields are indicated by the presence of "; | |||
| present only when [expr]." at the end of the definition term | present only when [expr]." at the end of the definition term. | |||
| (i.e., the text contained within the <dt> tag or "hangText" | ||||
| attribute). | ||||
| Payload. This is a multi-row variable-length field, denoted in the | Payload. This is a multi-row variable-length field, denoted in the | |||
| diagram by the ":" notation in the field's border. The length of | packet header diagram by the ":" notation in the field's border. | |||
| the Payload is not specified, and hence needs to be inferred from | The length of the Payload is not specified, and hence needs to be | |||
| the total length of the packet and the lengths of the known | inferred from the total length of the packet and the lengths of | |||
| fields. There can only be one field of unspecified size in a PDU | the known fields. There can only be one field of unspecified size | |||
| Fields where the length is not specified may also denote this with | in a PDU Fields where the length is not specified may also denote | |||
| the phrase "variable length" in place of the length definition. | this with the phrase "variable length" in place of the length | |||
| definition. | ||||
| The simplest PDU is one that contains only a set of fixed-width | The simplest PDU is one that contains only a set of fixed-width | |||
| fields in a known order, with no optional fields or variation in the | fields in a known order, with no optional fields or variation in the | |||
| packet format. | packet format. | |||
| Some packet formats include variable-width fields (e.g., the | Some packet formats include variable-width fields (e.g., the | |||
| "Options" field in the example above), where the size of a field is | "Options" field in the example above), where the size of a field is | |||
| either derived from the value of some previous field, or is | either derived from the value of some previous field, or is | |||
| unspecified and inferred from the total size of the packet and the | unspecified and inferred from the total size of the packet and the | |||
| size of the other fields. | size of the other fields. | |||
| skipping to change at page 18, line 14 ¶ | skipping to change at page 18, line 14 ¶ | |||
| 3.6. Storing Data for Parsing | 3.6. Storing Data for Parsing | |||
| The parsing process may require data from previously parsed | The parsing process may require data from previously parsed | |||
| structures. This means that data needs to be stored persistently | structures. This means that data needs to be stored persistently | |||
| throughout the process. This data needs to be identified. | throughout the process. This data needs to be identified. | |||
| That the value of a particular field be stored upon parsing is | That the value of a particular field be stored upon parsing is | |||
| indicated by the exact phrase "On receipt, the value of <field name> | indicated by the exact phrase "On receipt, the value of <field name> | |||
| is stored as <stored name>." being present at the end of the | is stored as <stored name>." being present at the end of the | |||
| description of a field (i.e., at the end of the <dd> or <t> element.) | description of a field. | |||
| An Initial Packet is formatted as follows: | An Initial Packet is formatted as follows: | |||
| 0 1 2 3 | 0 1 2 3 | |||
| 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | : | | : | |||
| : Long Header : | : Long Header : | |||
| : | | : | | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| skipping to change at page 18, line 46 ¶ | skipping to change at page 18, line 46 ¶ | |||
| The parsing or serialisation of some binary formats cannot be fully | The parsing or serialisation of some binary formats cannot be fully | |||
| described without the use of functions. These functions take | described without the use of functions. These functions take | |||
| arguments (values from another structure), perform some computation, | arguments (values from another structure), perform some computation, | |||
| and generate a new structure. | and generate a new structure. | |||
| Given the goal of fully capturing the parsing or serialisation of | Given the goal of fully capturing the parsing or serialisation of | |||
| binary protocols, it is necessary to include the signature of these | binary protocols, it is necessary to include the signature of these | |||
| helper functions. | helper functions. | |||
| Function signatures are described in <artwork> elements. They are | Function signatures are constructed by the word "func", followed by a | |||
| constructed as the word "func", followed by a space, then the name of | space, then the name of the function. This is immediately followed | |||
| the function. This is immediately followed by a set of brackets | by a set of brackets containing a comma separated list of the | |||
| containing a comma separated list of the function's parameters, | function's parameters, formatted as "<parameter name>: <parameter | |||
| formatted as "<parameter name>: <parameter type>". This is followed | type>". This is followed by "->" and the return type of the | |||
| by "->" and the return type of the function, followed by a colon. | function, followed by a colon. | |||
| The body of the function is not captured, owing to the complexity of | The body of the function is not captured, owing to the complexity of | |||
| both capturing and translating arbitrary code. As a result, it can | both capturing and translating arbitrary code. As a result, it can | |||
| be described in whichever format is most suitable for the document | be described in whichever format is most suitable for the document | |||
| and its readership. | and its readership. | |||
| Those values that are stored persistently, as defined in Section 3.6, | Those values that are stored persistently, as defined in Section 3.6, | |||
| are accessible by functions. | are accessible by functions. | |||
| As an example, the "apply_protection" function is defined as: | As an example, the "apply_protection" function is defined as: | |||
| func apply_protection(to: Unprotected Packet) | func apply_protection(to: Unprotected Packet) | |||
| -> Protected Packet: | -> Protected Packet: | |||
| apply packet protection to payload | apply packet protection to payload | |||
| apply header protection to first_byte and packet_number | apply header protection to first_byte and packet_number | |||
| construct appropriate Protected Packet based on first_byte | construct appropriate Protected Packet based on first_byte | |||
| return Protected Packet | return Protected Packet | |||
| In this example, 'Unprotected Packet' and 'Protected Packet' are | In this example, 'Unprotected Packet' and 'Protected Packet' are | |||
| existing types. | existing types. The text in the function body is not interpreted. | |||
| A common use of functions is to specify operations used during packet | ||||
| parsing and serialisation. | ||||
| To indicate that a PDU is created from another by way of a function, | To indicate that a PDU is created from another by way of a function, | |||
| the sentence "A/An <PDU name A> is parsed from a <PDU name B> using | the sentence "A/An <PDU name A> is parsed from a <PDU name B> using | |||
| the <function name> function" is used. This indicates that a PDU A | the <function name> function" is used. This indicates that a PDU A | |||
| is generated by passing PDU B into the named function. The function | is generated by passing PDU B into the named function. The function | |||
| must take a single parameter, of the same type as PDU B, and return a | must take a single parameter, of the same type as PDU B, and return a | |||
| PDU B. | PDU B. | |||
| To indicate that a PDU can be serialised to another by way of a | To indicate that a PDU can be serialised to another by way of a | |||
| function, the sentence "A/An <PDU name A> is serialised to a <PDU | function, the sentence "A/An <PDU name A> is serialised to a <PDU | |||
| name B> using the <function name> function" is used. This indicates | name B> using the <function name> function" is used. This indicates | |||
| skipping to change at page 21, line 6 ¶ | skipping to change at page 21, line 6 ¶ | |||
| described by this document are given. However, these principles | described by this document are given. However, these principles | |||
| apply more generally to any approach that introduces structured and | apply more generally to any approach that introduces structured and | |||
| formal languages into standards documents. | formal languages into standards documents. | |||
| It should be noted that these are design principles: they expose the | It should be noted that these are design principles: they expose the | |||
| trade-offs that are inherent within any given approach. Violating | trade-offs that are inherent within any given approach. Violating | |||
| these principles is sometimes necessary and beneficial, and this | these principles is sometimes necessary and beneficial, and this | |||
| document sets out the potential consequences of doing so. | document sets out the potential consequences of doing so. | |||
| The central tenet that underpins these design principles is a | The central tenet that underpins these design principles is a | |||
| recognition that the standardisation process is not broken, and so | recognition that the IETF standardisation process is not broken, and | |||
| does not need to be fixed. Failure to recognise this will likely | so does not need to be fixed. Failure to recognise this will likely | |||
| lead to approaches that are incompatible with the standards process, | lead to approaches that are incompatible with the standards process, | |||
| or that will see limited adoption. However, the standards process | or that will see limited adoption. However, the standards process | |||
| can be improved with appropriate approaches, as guided by the | can be improved with appropriate approaches, as guided by the | |||
| following broad design principles: | following broad design principles: | |||
| Most readers are human: Primarily, standards documents should be | Most readers are human: Primarily, standards documents should be | |||
| written for people, who require text and diagrams that they can | written for people, who require text and diagrams that they can | |||
| understand. Structures that cannot be easily parsed by people | understand. Structures that cannot be easily parsed by people | |||
| should be avoided, and if included, should be clearly delineated | should be avoided, and if included, should be clearly delineated | |||
| from human-readable content. | from human-readable content. | |||
| skipping to change at page 24, line 26 ¶ | skipping to change at page 24, line 26 ¶ | |||
| <https://www.rfc-editor.org/info/rfc7950>. | <https://www.rfc-editor.org/info/rfc7950>. | |||
| [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol | [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol | |||
| Version 1.3", RFC 8446, August 2018, | Version 1.3", RFC 8446, August 2018, | |||
| <https://www.rfc-editor.org/info/rfc8446>. | <https://www.rfc-editor.org/info/rfc8446>. | |||
| [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax | [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax | |||
| Specifications: ABNF", RFC 5234, January 2008, | Specifications: ABNF", RFC 5234, January 2008, | |||
| <https://www.rfc-editor.org/info/rfc5234>. | <https://www.rfc-editor.org/info/rfc5234>. | |||
| [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", | ||||
| RFC 7405, December 2014, | ||||
| <https://www.rfc-editor.org/info/rfc7405>. | ||||
| [ASN1] ITU-T, "ITU-T Recommendation X.680, X.681, X.682, and | [ASN1] ITU-T, "ITU-T Recommendation X.680, X.681, X.682, and | |||
| X.683", ITU-T Recommendation X.680, X.681, X.682, and | X.683", ITU-T Recommendation X.680, X.681, X.682, and | |||
| X.683. | X.683. | |||
| [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object | [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object | |||
| Representation (CBOR)", RFC 7049, October 2013, | Representation (CBOR)", RFC 7049, October 2013, | |||
| <https://www.rfc-editor.org/info/rfc7049>. | <https://www.rfc-editor.org/info/rfc7049>. | |||
| [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. | [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. | |||
| Jacobson, "RTP: A Transport Protocol for Real-Time | Jacobson, "RTP: A Transport Protocol for Real-Time | |||
| Applications", RFC 3550, July 2003, | Applications", RFC 3550, July 2003, | |||
| <https://www.rfc-editor.org/info/rfc3550>. | <https://www.rfc-editor.org/info/rfc3550>. | |||
| [RFC8489] Petit-Huguenin, M., Salgueiro, G., Rosenberg, J., Wing, | [RFC8489] Petit-Huguenin, M., Salgueiro, G., Rosenberg, J., Wing, | |||
| D., Mahy, R., and P. Matthews, "Session Traversal | D., Mahy, R., and P. Matthews, "Session Traversal | |||
| Utilities for NAT (STUN)", RFC 8489, February 2020, | Utilities for NAT (STUN)", RFC 8489, February 2020, | |||
| <https://www.rfc-editor.org/info/rfc8489>. | <https://www.rfc-editor.org/info/rfc8489>. | |||
| [RFC791] Postel, J., "Internet Protocol", RFC 791, September 1981, | ||||
| <https://www.rfc-editor.org/info/rfc791>. | ||||
| [RFC793] Postel, J., "Transmission Control Protocol", RFC 793, | [RFC793] Postel, J., "Transmission Control Protocol", RFC 793, | |||
| September 1981, <https://www.rfc-editor.org/info/rfc793>. | September 1981, <https://www.rfc-editor.org/info/rfc793>. | |||
| [LANGSEC] LANGSEC, "LANGSEC: Language-theoretic Security", | [LANGSEC] LANGSEC, "LANGSEC: Language-theoretic Security", | |||
| <http://langsec.org>. | <http://langsec.org>. | |||
| [SASSAMAN] Sassaman, L., Patterson, M. L., Bratus, S., and A. | [SASSAMAN] Sassaman, L., Patterson, M. L., Bratus, S., and A. | |||
| Shubina, "The Halting Problems of Network Stack | Shubina, "The Halting Problems of Network Stack | |||
| Insecurity", ;login: -- December 2011, Volume 36, Number | Insecurity", ;login: -- December 2011, Volume 36, Number | |||
| 6, <https://www.usenix.org/publications/login/december- | 6, <https://www.usenix.org/publications/login/december- | |||
| 2011-volume-36-number-6/halting-problems-network-stack- | 2011-volume-36-number-6/halting-problems-network-stack- | |||
| insecurity>. | insecurity>. | |||
| [RFC9293] Eddy, W., "Transmission Control Protocol", RFC 9293, | [RFC9293] Eddy, W., "Transmission Control Protocol", RFC 9293, | |||
| August 2022, <https://www.rfc-editor.org/info/rfc9293>. | August 2022, <https://www.rfc-editor.org/info/rfc9293>. | |||
| [RFC768] Postel, J., "User Datagram Protocol", RFC 768, August | [NETWORKING2021] | |||
| 1980, <https://www.rfc-editor.org/info/rfc768>. | McQuistin, S., Band, V., Jacob, D., and C. Perkins, | |||
| "Investigating Automatic Code Generation for Network | ||||
| Packet Parsing", Proceedings of the 20th International | ||||
| IFIP TC6 Networking Conference, Networking 2021, Espoo, | ||||
| Finland, June 21-24, 2021, | ||||
| <http://dl.ifip.org/db/conf/networking/ | ||||
| networking2021/1570702659.pdf>. | ||||
| Appendix A. ABNF specification | Appendix A. ABNF specification | |||
| A.1. Constraint Expressions | A.1. Constraint Expressions | |||
| constant = %x31-39 *(%x30-39) ; natural numbers without leading 0s | constant = %x31-39 *(%x30-39) ; natural numbers without leading 0s | |||
| short-name = ALPHA *(ALPHA / DIGIT / "-" / "_") | short-name = ALPHA *(ALPHA / DIGIT / "-" / "_") | |||
| name = short-name *(" " short-name) | name = short-name *(" " short-name) | |||
| sp = [" "] ; optional space in expression | sp = [" "] ; optional space in expression | |||
| bool-expr = "(" sp bool-expr sp ")" / | bool-expr = "(" sp bool-expr sp ")" / | |||
| skipping to change at page 26, line 30 ¶ | skipping to change at page 26, line 30 ¶ | |||
| is available from https://github.com/glasgow-ipl/ips-protodesc-code. | is available from https://github.com/glasgow-ipl/ips-protodesc-code. | |||
| This tooling supports the automatic generation of Rust parser code | This tooling supports the automatic generation of Rust parser code | |||
| from protocol descriptions written in the Augmented Packet Header | from protocol descriptions written in the Augmented Packet Header | |||
| Diagram format. It also provides test harnesses that demonstrate | Diagram format. It also provides test harnesses that demonstrate | |||
| that the description of TCP [RFC9293] written in this format can be | that the description of TCP [RFC9293] written in this format can be | |||
| used to generate parser code. | used to generate parser code. | |||
| Authors' Addresses | Authors' Addresses | |||
| Stephen McQuistin | Stephen McQuistin | |||
| University of Glasgow | University of St Andrews | |||
| School of Computing Science | School of Computer Science | |||
| Glasgow | St Andrews | |||
| G12 8QQ | KY16 9AJ | |||
| United Kingdom | United Kingdom | |||
| Email: sm@smcquistin.uk | Email: sm@smcquistin.uk | |||
| Vivian Band | Vivian Band | |||
| University of Glasgow | University of Glasgow | |||
| School of Computing Science | School of Computing Science | |||
| Glasgow | Glasgow | |||
| G12 8QQ | G12 8QQ | |||
| United Kingdom | United Kingdom | |||
| Email: vivianband0@gmail.com | Email: vivianband0@gmail.com | |||
| Dejice Jacob | Dejice Jacob | |||
| University of Glasgow | University of Glasgow | |||
| School of Computing Science | School of Computing Science | |||
| Glasgow | Glasgow | |||
| G12 8QQ | G12 8QQ | |||
| United Kingdom | United Kingdom | |||
| Email: d.jacob.1@research.gla.ac.uk | Email: dejice.jacob@glasgow.ac.uk | |||
| Colin Perkins | Colin Perkins | |||
| University of Glasgow | University of Glasgow | |||
| School of Computing Science | School of Computing Science | |||
| Glasgow | Glasgow | |||
| G12 8QQ | G12 8QQ | |||
| United Kingdom | United Kingdom | |||
| Email: csp@csperkins.org | Email: csp@csperkins.org | |||
| End of changes. 46 change blocks. | ||||
| 151 lines changed or deleted | 162 lines changed or added | |||
This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||