Describing Protocol Data Units with Augmented Packet Header Diagrams
draft-mcquistin-augmented-ascii-diagrams-07
Network Working Group S. McQuistin
Internet-Draft V. Band
Intended status: Experimental D. Jacob
Expires: 6 May 2021 C. S. Perkins
University of Glasgow
2 November 2020
Describing Protocol Data Units with Augmented Packet Header Diagrams
draft-mcquistin-augmented-ascii-diagrams-07
Abstract
This document describes a machine-readable format for specifying the
syntax of protocol data units within a protocol specification. This
format is comprised of a consistently formatted packet header
diagram, followed by structured explanatory text. It is designed to
maintain human readability while enabling support for automated
parser generation from the specification document. This document is
itself an example of how the format can be used.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on 6 May 2021.
Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components
McQuistin, et al. Expires 6 May 2021 [Page 1]
Internet-Draft Augmented Packet Diagrams November 2020
extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Background . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Limitations of Current Packet Format Diagrams . . . . . . 4
2.2. Formal languages in standards documents . . . . . . . . . 7
3. Design Principles . . . . . . . . . . . . . . . . . . . . . . 7
4. Augmented Packet Header Diagrams . . . . . . . . . . . . . . 10
4.1. PDUs with Fixed and Variable-Width Fields . . . . . . . . 10
4.2. PDUs That Cross-Reference Previously Defined Fields . . . 13
4.3. PDUs with Non-Contiguous Fields . . . . . . . . . . . . . 16
4.4. PDUs with Constraints on Field Values . . . . . . . . . . 16
4.5. PDUs That Extend Sub-Structures . . . . . . . . . . . . . 18
4.6. Storing Data for Parsing . . . . . . . . . . . . . . . . 19
4.7. Connecting Structures with Functions . . . . . . . . . . 20
4.8. Specifying Enumerated Types . . . . . . . . . . . . . . . 21
4.9. Specifying Protocol Data Units . . . . . . . . . . . . . 22
4.10. Importing PDU Definitions from Other Documents . . . . . 22
5. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 22
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23
7. Security Considerations . . . . . . . . . . . . . . . . . . . 23
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 23
9. Informative References . . . . . . . . . . . . . . . . . . . 23
Appendix A. ABNF specification . . . . . . . . . . . . . . . . . 26
A.1. Constraint Expressions . . . . . . . . . . . . . . . . . 26
A.2. Augmented packet diagrams . . . . . . . . . . . . . . . . 26
Appendix B. Tooling & source code . . . . . . . . . . . . . . . 26
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27
1. Introduction
Packet header diagrams have become a widely used format for
describing the syntax of binary protocols. In otherwise largely
textual documents, they allow for the visualisation of packet
formats, reducing human error, and aiding in the implementation of
parsers for the protocols that they specify.
Figure 1 gives an example of how packet header diagrams are used to
define binary protocol formats. The format has an obvious structure:
Show full document text