Fully Specifying Protocol Parsing with Augmented ASCII Diagrams
draft-mcquistin-augmented-ascii-diagrams-00

Document Type Active Internet-Draft (individual)
Last updated 2019-07-08
Stream (None)
Intended RFC status (None)
Formats plain text pdf html bibtex
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: Informational                                C. Perkins
Expires: 9 January 2020                            University of Glasgow
                                                             8 July 2019

    Fully Specifying Protocol Parsing with Augmented ASCII Diagrams
              draft-mcquistin-augmented-ascii-diagrams-00

Abstract

   This document describes a machine-readable format for fully
   specifying the process by which a protocol can be parsed.  This
   format combines a consistent ASCII packet diagram format with the use
   of structured text, maintaining human readability while enabling
   support for machine parsing.  This document is itself an example of
   how this 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 9 January 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 9 January 2020                 [Page 1]
Internet-Draft          Augmented ASCII Diagrams               July 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  . . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Limitations of current ASCII packet diagrams usage  . . .   3
     2.2.  Formal languages in standards documents . . . . . . . . .   6
   3.  Design Principles . . . . . . . . . . . . . . . . . . . . . .   6
   4.  Augmented ASCII Packet Header Diagrams  . . . . . . . . . . .   8
     4.1.  Fixed-width Field Format  . . . . . . . . . . . . . . . .   8
     4.2.  Variable-width Field Format . . . . . . . . . . . . . . .  10
     4.3.  Cross-referencing and Sequences Format  . . . . . . . . .  11
     4.4.  Optional Field Format . . . . . . . . . . . . . . . . . .  12
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  13
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  13
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  13
   8.  Informative References  . . . . . . . . . . . . . . . . . . .  13
   Appendix A.  ABNF specification . . . . . . . . . . . . . . . . .  14
     A.1.  Constraint Expressions  . . . . . . . . . . . . . . . . .  14
     A.2.  Augmented ASCII diagrams  . . . . . . . . . . . . . . . .  14
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  14

1.  Introduction

   ASCII packet header diagrams have become the de-facto 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.  Given their widespread
   use, and relatively structured form, ASCII packet header diagrams
   provide a good base from which to develop a format that supports the
   automatic generation of parser code from protocol standards
   documents.

   There are two broad issues with the existing ASCII packet header
   diagrams that need to be addressed to enable machine-readability.
   First, their use, while sufficiently consistent for human
   readability, contains enough variation to make machine parsing
   difficult: different documents tend to use subtly different formats
   and conventions.  Second, ASCII packet header diagrams alone do not
   fully capture the parsing process for protocols, requiring
   supplementary text.  To support machine parsing, this supplementary
   text must be consistently structured.

   This document describes a consistent ASCII packet header format and
Show full document text