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 UDP with Augmented Packet Header Diagrams draft-mcquistin-augmented-udp-example-00 Abstract This document describes UDP using Augmented Packet Header Diagrams. This document is an example of the Augmented Packet Header Diagram language: it is not intended as a contribution to any ongoing or future work on maintaining or extending UDP. 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 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. McQuistin, et al. Expires 6 May 2021 [Page 1] Internet-Draft UDP APHD Example November 2020 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. UDP Header . . . . . . . . . . . . . . . . . . . . . . . . . 2 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 3 4. Security Considerations . . . . . . . . . . . . . . . . . . . 3 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 3 6. Informative References . . . . . . . . . . . . . . . . . . . 3 Appendix A. Source code repository . . . . . . . . . . . . . . . 3 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction This document uses Augmented Packet Header Diagrams [AUGMENTED-DIAGRAMS] to describe UDP [RFC768], and is intended to further discussion about the design and implementation of the Augmented Packet Header Diagram language and tooling. Given this purpose, this document is not intended as a contribution to any ongoing or future work on maintaining or extending UDP. Further, this document does not necessarily reflect UDP, and its extensions, as presently standardised. 2. UDP Header This document describes the UDP protocol. The UDP protocol uses UDP Headers. A UDP Header is formatted as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source port | Destination port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : : Payload : : | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ where: Source port (Src): 2 bytes. Sending port. Destination port (Dest): 2 bytes. Destination port. Length (L): 2 bytes; L >= 8. Length of the header and payload in McQuistin, et al. Expires 6 May 2021 [Page 2] Internet-Draft UDP APHD Example November 2020 bytes. Checksum: 2 bytes. Checksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the UDP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets. Payload: L-8 bytes. The payload of the UDP datagram, which is the whose size is the value of the Length field, less 8 bytes for the header. 3. IANA Considerations This document contains no actions for IANA. 4. Security Considerations The security implications of the Augmented Packet Header Diagrams format are considered in [AUGMENTED-DIAGRAMS]. 5. Acknowledgements This work has received funding from the UK Engineering and Physical Sciences Research Council under grant EP/R04144X/1. 6. Informative References [AUGMENTED-DIAGRAMS] McQuistin, S., Band, V., Jacob, D., and C. S. Perkins, "Describing Protocol Data Units with Augmented Packet Header Diagrams", Work in Progress, Internet-Draft, draft- mcquistin-augmented-ascii-diagrams-07, 2 November 2020, . [RFC768] Postel, J., "User Datagram Protocol", RFC 768, August 1980, . Appendix A. Source code repository The source code for tooling that can be used to parse this document, and generate parser code for the protocol it describes, is available from https://github.com/glasgow-ipl/ips-protodesc-code. Authors' Addresses McQuistin, et al. Expires 6 May 2021 [Page 3] Internet-Draft UDP APHD Example November 2020 Stephen McQuistin University of Glasgow School of Computing Science Glasgow G12 8QQ United Kingdom Email: sm@smcquistin.uk Vivian Band University of Glasgow School of Computing Science Glasgow G12 8QQ United Kingdom Email: vivianband0@gmail.com Dejice Jacob University of Glasgow School of Computing Science Glasgow G12 8QQ United Kingdom Email: d.jacob.1@research.gla.ac.uk Colin Perkins University of Glasgow School of Computing Science Glasgow G12 8QQ United Kingdom Email: csp@csperkins.org McQuistin, et al. Expires 6 May 2021 [Page 4]