<?xml version='1.0' encoding='US-ASCII'?>
<rfc version='3' ipr='trust200902' submissionType='IETF' docName='draft-mcquistin-augmented-udp-example-02' category='exp'>
    <front>
        <title abbrev='UDP APHD Example'>
            Describing UDP with Augmented Packet Header Diagrams
        </title>
        <seriesInfo name='Internet-Draft' value='drdraft-mcquistin-augmented-udp-example-02' status="experimental" />

        <author fullname='Stephen McQuistin' initials='S.' surname='McQuistin'>
            <organization>University of Glasgow</organization>
            <address>
                <postal>
                    <street>School of Computing Science</street>
                    <city>Glasgow</city>
                    <code>G12 8QQ</code>
                    <country>UK</country>
                </postal>
                <email>sm@smcquistin.uk</email>
            </address>
        </author>

        <author fullname='Vivian Band' initials='V.' surname='Band'>
            <organization>University of Glasgow</organization>
            <address>
                <postal>
                    <street>School of Computing Science</street>
                    <city>Glasgow</city>
                    <code>G12 8QQ</code>
                    <country>UK</country>
                </postal>
                <email>vivianband0@gmail.com</email>
            </address>
        </author>

        <author fullname='Dejice Jacob' initials='D.' surname='Jacob'>
            <organization>University of Glasgow</organization>
            <address>
                <postal>
                    <street>School of Computing Science</street>
                    <city>Glasgow</city>
                    <code>G12 8QQ</code>
                    <country>UK</country>
                </postal>
                <email>d.jacob.1@research.gla.ac.uk</email>
            </address>
        </author>

        <author fullname='Colin Perkins' initials='C. S.' surname='Perkins'>
            <organization>University of Glasgow</organization>
            <address>
                <postal>
                    <street>School of Computing Science</street>
                    <city>Glasgow</city>
                    <code>G12 8QQ</code>
                    <country>UK</country>
                </postal>
                <email>csp@csperkins.org</email>
            </address>
        </author>

        <?date year='2021' month='October' day='25'/?>

        <abstract>
            <t>
                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.
            </t>
        </abstract>
    </front>

    <middle>
        <section>
            <name>
                Introduction
            </name>
            <t>
                This document uses Augmented Packet Header Diagrams <xref target="AUGMENTED-DIAGRAMS" /> to describe UDP <xref target="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.
            </t>
        </section>
            <section>
                <name>UDP Header</name>
                <t>
                  This document describes the UDP protocol. The UDP protocol uses UDP Headers.
                </t>
                    <t>
                     A UDP Header is formatted as follows:
                    </t>
                    <artwork>
 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                            :
:                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                    </artwork>
                    <t>
                        where:
                    </t>
                    <dl>
                        <dt>
                            Source port (Src): 2 bytes.
                        </dt>
                        <dd>
                            <t>
                                Sending port.
                            </t>
                        </dd>
                        <dt>
                            Destination port (Dest): 2 bytes.
                        </dt>
                        <dd>
                            <t>
                                Destination port.
                            </t>
                        </dd>
                        <dt>
                            Length (L): 2 bytes; L >= 8.
                        </dt>
                        <dd>
                            <t>
                                Length of the header and payload in bytes.
                            </t>
                        </dd>
                        <dt>
                            Checksum: 2 bytes.
                        </dt>
                        <dd>
                            <t>
                                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.
                            </t>
                        </dd>
                        <dt>
                            Payload: L-8 bytes.
                        </dt>
                        <dd>
                            <t>
                                The payload of the UDP datagram, which is the
                                whose size is the value of the Length field,
                                less 8 bytes for the header.
                            </t>
                        </dd>
                    </dl>
                </section>

        <section anchor='IANA'>
            <name>IANA Considerations</name>
            <t>
                This document contains no actions for IANA.
            </t>
        </section>

        <section anchor='security'>
            <name>Security Considerations</name>
            <t>
                The security implications of the Augmented Packet Header Diagrams format are
                considered in <xref target="AUGMENTED-DIAGRAMS" />.
            </t>
        </section>

        <section anchor='Acknowledgements'>
            <name>Acknowledgements</name>
            <t>
                This work has received funding from the UK Engineering and Physical
                Sciences Research Council under grant EP/R04144X/1.
            </t>
        </section>
    </middle>

    <back>
        <references>
            <name>Informative References</name>
            <reference anchor="AUGMENTED-DIAGRAMS" target="http://www.ietf.org/internet-drafts/draft-mcquistin-augmented-ascii-diagrams-09.txt">
                <front>
                    <title>Describing Protocol Data Units with Augmented Packet Header Diagrams</title>

                    <author initials='S' surname='McQuistin' fullname='Stephen McQuistin'><organization /></author>
                    <author initials='V' surname='Band' fullname='Vivian Band'><organization /></author>
                    <author initials='D' surname='Jacob' fullname='Dejice Jacob'><organization /></author>
                    <author initials='C. S.' surname='Perkins' fullname='Colin Perkins'><organization /></author>

                    <date month='October' day='25' year='2021' />
                </front>

                <seriesInfo name='Internet-Draft' value='draft-mcquistin-augmented-ascii-diagrams-09' />
            </reference>
            <reference anchor="RFC768" target="https://www.rfc-editor.org/info/rfc768">
                <front>
                    <title>User Datagram Protocol</title>

                    <author initials='J' surname='Postel' fullname='Jon Postel'><organization /></author>

                    <date month='August' year='1980' />
                </front>
                <seriesInfo name='RFC' value='768'/>
            </reference>
        </references>

        <section anchor='source'>
            <name>Source code repository</name>
            <t>
                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 <eref target="https://github.com/glasgow-ipl/ips-protodesc-code" />.
            </t>
        </section>
    </back>
 </rfc>
