Describing Protocol Data Units with Augmented Packet Header Diagrams
draft-mcquistin-augmented-ascii-diagrams-01

Document Type Active Internet-Draft (individual)
Last updated 2019-11-04
Stream (None)
Intended RFC status (None)
Formats plain text html xml pdf htmlized bibtex
Additional URLs
- Document source repository
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                       S. McQuistin
Internet-Draft                                                   V. Band
Intended status: Experimental                              C. S. Perkins
Expires: 6 May 2020                                University of Glasgow
                                                         3 November 2019

  Describing Protocol Data Units with Augmented Packet Header Diagrams
              draft-mcquistin-augmented-ascii-diagrams-01

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 2020.

Copyright Notice

   Copyright (c) 2019 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
   extracted from this document must include Simplified BSD License text

McQuistin, et al.          Expires 6 May 2020                   [Page 1]
Internet-Draft          Augmented Packet Diagrams          November 2019

   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 . . . . . . . . .   6
   3.  Design Principles . . . . . . . . . . . . . . . . . . . . . .   7
   4.  Augmented Packet Header Diagrams  . . . . . . . . . . . . . .   8
     4.1.  PDUs with Fixed and Variable-Width Fields . . . . . . . .   9
     4.2.  PDUs That Cross-Reference Previously Defined
           Fields  . . . . . . . . . . . . . . . . . . . . . . . . .  11
     4.3.  PDUs with Non-Contiguous Fields . . . . . . . . . . . . .  14
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  14
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  14
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  14
   8.  Informative References  . . . . . . . . . . . . . . . . . . .  15
   Appendix A.  ABNF specification . . . . . . . . . . . . . . . . .  16
     A.1.  Constraint Expressions  . . . . . . . . . . . . . . . . .  16
     A.2.  Augmented packet diagrams . . . . . . . . . . . . . . . .  16
   Appendix B.  Source code repository . . . . . . . . . . . . . . .  16
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  16

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:
   the diagram clearly delineates each field, showing its width and its
   position within the header.  This type of diagram is designed for
   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
   diagram.

McQuistin, et al.          Expires 6 May 2020                   [Page 2]
Internet-Draft          Augmented Packet Diagrams          November 2019

   :    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
Show full document text