<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.36 (Ruby 3.4.9) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-tsvwg-udp-ecn-08" category="info" submissionType="IETF" version="3">
  <!-- xml2rfc v2v3 conversion 3.33.0 -->
  <front>
    <title abbrev="udp-ecn">Configuring UDP Sockets for ECN for Common Platforms</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-tsvwg-udp-ecn-08"/>
    <author fullname="Martin Duke">
      <organization>Google</organization>
      <address>
        <email>martin.h.duke@gmail.com</email>
      </address>
    </author>
    <date/>
    <area>Web and Internet Transport</area>
    <workgroup>Transport and Services Working Group</workgroup>
    <keyword>udp</keyword>
    <keyword>ecn</keyword>
    <abstract>
      <?line 58?>

<t>Explicit Congestion Notification (ECN) applies to all transport protocols in
principle. However, it had limited deployment for UDP until QUIC became widely
adopted. As a result, documentation of UDP socket APIs for ECN on various
platforms is sparse. This document records the results of experimenting with
these APIs in order to get ECN working on UDP for Chromium on Apple, Linux, and
Windows platforms.</t>
      <t>This document provides a snapshot of ECN state of affairs as supported by these
platforms at the time of writing. Readers should refer to the documentations of
the various platforms for an up-to-date information on the matter.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://tsvwg.github.io/udp-ecn/draft-ietf-tsvwg-udp-ecn.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-tsvwg-udp-ecn/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Transport and Services Working Group Working Group mailing list (<eref target="mailto:tsvwg@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/tsvwg/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/tsvwg/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/tsvwg/udp-ecn"/>.</t>
    </note>
  </front>
  <middle>
    <?line 71?>

<section anchor="introduction">
      <name>Introduction</name>
      <t><xref target="RFC3168"/> defines a two-bit field in the IP header for Explicit Congestion
Notification (ECN), which provides network feedback to endpoint congestion
controllers. This has historically mostly been relevant to TCP (<xref target="RFC9293"/>),
where any incoming ECN codepoints are internally consumed by the kernel, and
therefore imply no application interface except enabling and disabling the
capability.</t>
      <t>The Stream Control Transport Protocol (SCTP) (<xref target="RFC9260"/>) has long supported
ECN in its design. SCTP is sometimes carried over DTLS and UDP (<xref target="RFC8261"/>).
In principle, user-space implementers might have leveraged UDP ECN APIs to
deliver ECN codepoints between SCTP and the UDP socket. At the time of
publication, the IETF is not aware of any such efforts.</t>
      <t><xref target="RFC6679"/> defines ECN over RTP over UDP. The IETF is aware of a research
implementation, but cannot confirm any commercial deployments.</t>
      <t>QUIC <xref target="RFC9000"/> runs over UDP and has seen wider deployment than SCTP. The Low
Latency, Low Loss, Scalable Throughput (L4S) architecture (<xref target="RFC9330"/>) and
QUIC have combined to increase interest in ECN over UDP.</t>
      <t>The Chromium Projects (<xref target="CHROMIUM"/>) provide a widely-deployed protocol library
that includes QUIC. An effort to provide ECN support for QUIC on the many
platforms on which Chromium is deployed revealed that many ECN-related UDP
socket interfaces are poorly documented.</t>
      <t>This informational document provides a record of that experience, to encourage
further support for ECN in other QUIC implementations, and indeed any consumer
of ECN codepoints that operates over UDP. It is not a standards-track document
and does not bind platforms to any API, or suggest any such API.</t>
      <t>Many socket APIs continue to reference the "ToS (Type of Service) byte",
including the IP_TOS label, even though <xref target="RFC2474"/> obsoleted that in 1998.
That 8-bit field now contains a 6-bit Differentiated Services Code Point (DSCP)
and the 2-bit ECN field.</t>
      <t>This document focuses on the APIs for the C and C++ languages. Other languages
are likely to have different syntax and capabilities.</t>
      <t>The "ecn-examples" code repository (<xref target="EXAMPLES"/>) is extremely compact code that
can verify the information in this document.</t>
      <t>This document addresses access to the ECN field in the IP header via socket
APIs. It does not address UDP transport-layer options <xref target="RFC9868"/>, which are a
separate extension mechanism operating at a different layer.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>This document is not a general tutorial on UDP socket programming, and assumes
familiarity with basic socket concepts like binding, socket options, and
common system error codes.</t>
      <t>Throughout this document, "Apple" refers to both macOS and iOS. "Linux" guidance
also applies to Android.</t>
    </section>
    <section anchor="receiving-ecn-codepoints">
      <name>Receiving ECN codepoints</name>
      <t>Network devices can change the ECN codepoint in the IP header. Since this
feedback is required at the packet sender, the packet receiver needs to extract
this codepoint from the UDP socket in order to report to the sender.</t>
      <t>There are two components to this: setting the socket to report incoming ECN
marks, and retrieving the ECN codepoint for each incoming packet.</t>
      <t>Note that Apple platforms additionally provide a framework for network
connections that allows receiving ECN flags when using UDP without traditional
socket option semantics. When sending or receiving UDP datagrams, IP protocol
metadata carries ECN information in both directions. See
<xref target="APPLE-NETWORK-FRAMEWORK"/>.</t>
      <section anchor="setting-the-socket-to-report-incoming-ecn-codepoints">
        <name>Setting the socket to report incoming ECN codepoints</name>
        <section anchor="linux-apple-and-freebsd">
          <name>Linux, Apple, and FreeBSD</name>
          <t>To receive ECN codepoints, applications set a socket option to true using a setsockopt()
call.</t>
          <t>On all platforms, IPv4 sockets require the IPPROTO_IP-level socket option with
name IP_RECVTOS to be set.</t>
          <t>On all platforms, IPv6 sockets require the IPPROTO_IPV6-level socket option with
name IPV6_RECVTCLASS to be set.</t>
          <t>If the IPv6 socket is not IPv6 only, on Linux hosts it is required to also set
the IPPROTO_IP-level socket option IP_RECVTOS to receive ECN codepoints for
UDP/IPv4 packets. This step is not necessary for Apple and FreeBSD.</t>
          <t>At the time of writing, an example implementation can be found at
<xref target="CHROMIUM-POSIX"/>.</t>
        </section>
        <section anchor="windows">
          <name>Windows</name>
          <t>Windows documentation recommends using the function WSASetRecvIPEcn() to
enable ECN codepoint reporting regardless of the IP version. This function dates
to Windows 10 Build 20348, according to <xref target="WINDOWS-DOC"/>.</t>
          <t>However, this can also be accomplished by calling setsockopt() and using
options of level IPPROTO_IP and name IP_RECVECN for IPv4, and IPPROTO_IPV6
and IPV6_RECVECN for IPv6. These options are documented at
<xref target="WINDOWS-SOCKOPT"/>.</t>
          <t>For IPv6 sockets that are not IPv6 only, WSASetRecvIPEcn() will not enable ECN
reporting for IPv4. This requires a separate setsockopt() call using the
IP_RECVECN option.</t>
          <t>If a socket is bound to a IPv4-mapped IPv6 address (i.e. it is of the format
::ffff:&lt;IPv4 address&gt;, see <xref section="2.5.5.2" sectionFormat="comma" target="RFC4291"/>) calls to
WSASetRecvIpEcn() return error EINVAL. These sockets should instead use an
explicit setsockopt() call to set IP_RECVECN.</t>
          <t>At the time of writing, an example implementation can be found at
<xref target="CHROMIUM-WINDOWS"/>.</t>
        </section>
      </section>
      <section anchor="retrieving-ecn-codepoints-on-incoming-packets">
        <name>Retrieving ECN codepoints on incoming packets</name>
        <t>All platforms described in this document require the use of a recvmsg() call to
read data from the socket to retrieve the ECN codepoint, because that information
is provided as ancillary data.
Those platforms all return zero or more "cmsg"s that contain requested information
about the arriving packet.</t>
        <t>Examples of the technique described below can be found at <xref target="CHROMIUM-POSIX"/>
and <xref target="CHROMIUM-WINDOWS"/>.</t>
        <section anchor="linux">
          <name>Linux</name>
          <t>If a UDP/IPv4 message is received, Linux will include a cmsg of level IPPROTO_IP
and type IP_TOS. The cmsg data contains an unsigned char.
This applies to IPv4 sockets and IPv6 socket, which are not IPv6 only.</t>
          <t>If a UDP/IPv6 message is received, Linux will include a cmsg of level IPPROTO_IPV6
and type IPV6_TCLASS. The cmsg data contains an int.
This applies to IPv6 sockets.</t>
          <t>The cmsg data contains the entire IP header byte, which includes the DSCP
and the ECN codepoint.
The ECN codepoint constitutes the two least-significant bits of this byte.</t>
          <t>The same applies to the Linux-specific recvmmsg() call.</t>
        </section>
        <section anchor="apple-and-freebsd">
          <name>Apple and FreeBSD</name>
          <t>If a UDP/IPv4 message is received on an IPv4 socket, the ancillary data
will contain a cmsg of level IPPROTO_IP and type IP_RECVTOS. The cmsg data
contains an unsigned char.</t>
          <t>If a UDP/IPv6 or UDP/IPv4 message is received on an IPv6 socket, the
ancillary data will contain a cmsg of level IPPROTO_IPV6 and type IPV6_TCLASS.
The cmsg data contains an int.</t>
          <t>The cmsg data contains the entire IP header byte, which includes the DSCP
and the ECN codepoint.
The ECN codepoint constitutes the two least-significant bits of this byte.</t>
        </section>
        <section anchor="windows-1">
          <name>Windows</name>
          <t>If the incoming packet is UDP/IPv4, the socket will include a cmsg of level
IPPROTO_IP and type IP_ECN. The cmsg data contains an int.</t>
          <t>If the incoming packet is UDP/IPv6, the socket will include a cmsg of level
IPPROTO_IPV6 and type IPV6_ECN. The cmsg data contains an int.</t>
          <t>The cmsg data solely consists of the ECN codepoint, and requires no
further bitwise operations.</t>
        </section>
      </section>
    </section>
    <section anchor="sending-ecn-codepoints">
      <name>Sending ECN codepoints</name>
      <t>Existing ECN specifications (<xref target="RFC3168"/>, <xref target="RFC9330"/>) envision a particular
connection consistently sending the same ECN codepoint. It might transition that
marking after successfully completing a handshake, recognizing the path or the
peer do not support ECN, or transitioning to a new path. Therefore, using a
socket option to configure a consistent marking is generally more
resource-efficient.</t>
      <t>However, some server designs receive all incoming packets on a single socket.
As the many connections that constitute this packet stream may have different
support for ECN, it is suitable to provide the ECN codepoint on a per-packet basis.</t>
      <t>Note that Apple platforms additionally provide a framework for network
connections that allows sending ECN flags when using UDP without traditional
socket option semantics. When sending or receiving UDP datagrams, IP protocol
metadata carries ECN information in both directions. See
<xref target="APPLE-NETWORK-FRAMEWORK"/>.</t>
      <section anchor="on-a-per-socket-basis">
        <name>On a per-socket basis</name>
        <section anchor="apple-freebsd-and-linux">
          <name>Apple, FreeBSD, and Linux</name>
          <t>For sending UDP/IPv4 packets on an IPv4 socket, Apple, FreeBSD, and Linux platforms
allow the outgoing ECN codepoint to be configured by using the IPPROTO_IP-level socket
option with name IP_TOS.
The value has the type int.</t>
          <t>For sending UDP/IPv6 packets on an IPv6 socket, Apple, FreeBSD, and Linux platforms
allow the outgoing ECN codepoint to be configured by using the IPPROTO_IPV6-level socket
option with name IPV6_TCLASS.
The value has the type int.</t>
          <t>For sending UDP/IPv4 packets on an IPv6 socket, Linux platforms allow
the outgoing ECN codepoint to be configured by using the IPPROTO_IP-level socket
option with name IP_TOS.</t>
          <t>For sending UDP/IPv4 packets on an IPv6 socket, Apple and FreeBSD platforms allow
the outgoing ECN codepoint to be configured by using the IPPROTO_IPV6-level socket
option with name IPV6_TCLASS.</t>
          <t>Except for Apple platforms, this setsockopt() call also sets the Differentiated
Services Code Point (DSCP) that make up the rest of the header byte.
Applications making this call ought to preserve any existing DSCP setting, which
might require an additional getsockopt() call, to avoid overriding commands set
by other code in the stack. If there are multiple threads making changes to this
byte, further safeguards will be necessary.</t>
          <t>An example of the technique described above can be found at <xref target="CHROMIUM-POSIX"/>.</t>
        </section>
        <section anchor="windows-2">
          <name>Windows</name>
          <t>At the time of this writing, Windows does not provide a way to configure
marking on a per-socket basis.</t>
        </section>
      </section>
      <section anchor="on-a-per-packet-basis">
        <name>On a per-packet basis</name>
        <t>Packets can be individually marked with ECN codepoints using the ancillary data
that accompanies a sendmsg() call.</t>
        <section anchor="apple-freebsd-and-linux-1">
          <name>Apple, FreeBSD, and Linux</name>
          <t>For sending UDP/IPv4 packets on an IPv4 socket, Apple, FreeBSD, and Linux use
a cmsg with level IPPROTO_IP and type IP_TOS. On Apple and Linux the type of
data is int and for FreeBSD it is unsigned char.</t>
          <t>For sending UDP/IPv6 packets on an IPv6 socket, Apple, FreeBSD, and Linux use
a cmsg with level IPPROTO_IPV6 and type IPV6_TCLASS. The type of the data
is int.</t>
          <t>For sending UDP/IPv4 packets on an IPv6 socket, Linux requires a cmsg with
level IPPROTO_IP and type IP_TOS.
Apple and FreeBSD accept a cmsg with level IPPROTO_IPV6 and type IPV6_TCLASS.</t>
          <t>The same applies to the Linux-specific sendmmsg() call.</t>
        </section>
        <section anchor="windows-3">
          <name>Windows</name>
          <t>Windows uses a cmsg with level IPPROTO_IP and type IP_ECN for IPv4 packets.</t>
          <t>Windows uses a cmsg with level IPPROTO_IPV6 and type IPV6_ECN for IPv6 packets.</t>
          <t>An example of the technique described above can be found at
<xref target="CHROMIUM-WINDOWS"/>.</t>
        </section>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The security implications of ECN are documented in <xref target="RFC3168"/> and <xref target="RFC9330"/>.
This document is a guide to enabling these capabilities, which incurs no
additional security considerations.</t>
      <t>Note that implementing ECN capabilities on some platforms, but not others, can
help peers identify the operating system in use by a host, which can have
privacy implications. This document aims to mitigate that possibility.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC3168" target="https://www.rfc-editor.org/info/rfc3168" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3168.xml">
          <front>
            <title>The Addition of Explicit Congestion Notification (ECN) to IP</title>
            <author fullname="K. Ramakrishnan" initials="K." surname="Ramakrishnan"/>
            <author fullname="S. Floyd" initials="S." surname="Floyd"/>
            <author fullname="D. Black" initials="D." surname="Black"/>
            <date month="September" year="2001"/>
            <abstract>
              <t>This memo specifies the incorporation of ECN (Explicit Congestion Notification) to TCP and IP, including ECN's use of two bits in the IP header. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3168"/>
          <seriesInfo name="DOI" value="10.17487/RFC3168"/>
        </reference>
        <reference anchor="RFC9330" target="https://www.rfc-editor.org/info/rfc9330" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9330.xml">
          <front>
            <title>Low Latency, Low Loss, and Scalable Throughput (L4S) Internet Service: Architecture</title>
            <author fullname="B. Briscoe" initials="B." role="editor" surname="Briscoe"/>
            <author fullname="K. De Schepper" initials="K." surname="De Schepper"/>
            <author fullname="M. Bagnulo" initials="M." surname="Bagnulo"/>
            <author fullname="G. White" initials="G." surname="White"/>
            <date month="January" year="2023"/>
            <abstract>
              <t>This document describes the L4S architecture, which enables Internet applications to achieve low queuing latency, low congestion loss, and scalable throughput control. L4S is based on the insight that the root cause of queuing delay is in the capacity-seeking congestion controllers of senders, not in the queue itself. With the L4S architecture, all Internet applications could (but do not have to) transition away from congestion control algorithms that cause substantial queuing delay and instead adopt a new class of congestion controls that can seek capacity with very little queuing. These are aided by a modified form of Explicit Congestion Notification (ECN) from the network. With this new architecture, applications can have both low latency and high throughput.</t>
              <t>The architecture primarily concerns incremental deployment. It defines mechanisms that allow the new class of L4S congestion controls to coexist with 'Classic' congestion controls in a shared network. The aim is for L4S latency and throughput to be usually much better (and rarely worse) while typically not impacting Classic performance.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9330"/>
          <seriesInfo name="DOI" value="10.17487/RFC9330"/>
        </reference>
        <reference anchor="RFC2474" target="https://www.rfc-editor.org/info/rfc2474" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2474.xml">
          <front>
            <title>Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers</title>
            <author fullname="K. Nichols" initials="K." surname="Nichols"/>
            <author fullname="S. Blake" initials="S." surname="Blake"/>
            <author fullname="F. Baker" initials="F." surname="Baker"/>
            <author fullname="D. Black" initials="D." surname="Black"/>
            <date month="December" year="1998"/>
            <abstract>
              <t>This document defines the IP header field, called the DS (for differentiated services) field. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2474"/>
          <seriesInfo name="DOI" value="10.17487/RFC2474"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="APPLE-NETWORK-FRAMEWORK" target="https://developer.apple.com/documentation/network/nwprotocolip/metadata">
          <front>
            <title>NWProtocolIP.Metadata</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="CHROMIUM" target="https://www.chromium.org/chromium-projects/">
          <front>
            <title>The Chromium Projects</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="CHROMIUM-POSIX" target="https://source.chromium.org/chromium/chromium/src/+/main:net/socket/udp_socket_posix.cc">
          <front>
            <title>udp_socket_posix.cc</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="CHROMIUM-WINDOWS" target="https://source.chromium.org/chromium/chromium/src/+/main:net/socket/udp_socket_win.cc">
          <front>
            <title>udp_socket_win.cc</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="EXAMPLES" target="https://github.com/nplab/ecn-examples">
          <front>
            <title>ecn-examples</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="WINDOWS-DOC" target="https://learn.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-wsasetrecvipecn">
          <front>
            <title>WSASetRecvIPEcn function (ws2tcpip.h)</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="WINDOWS-SOCKOPT" target="https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options">
          <front>
            <title>MSDN - IPPROTO_IP socket options</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="RFC9293" target="https://www.rfc-editor.org/info/rfc9293" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9293.xml">
          <front>
            <title>Transmission Control Protocol (TCP)</title>
            <author fullname="W. Eddy" initials="W." role="editor" surname="Eddy"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>This document specifies the Transmission Control Protocol (TCP). TCP is an important transport-layer protocol in the Internet protocol stack, and it has continuously evolved over decades of use and growth of the Internet. Over this time, a number of changes have been made to TCP as it was specified in RFC 793, though these have only been documented in a piecemeal fashion. This document collects and brings those changes together with the protocol specification from RFC 793. This document obsoletes RFC 793, as well as RFCs 879, 2873, 6093, 6429, 6528, and 6691 that updated parts of RFC 793. It updates RFCs 1011 and 1122, and it should be considered as a replacement for the portions of those documents dealing with TCP requirements. It also updates RFC 5961 by adding a small clarification in reset handling while in the SYN-RECEIVED state. The TCP header control bits from RFC 793 have also been updated based on RFC 3168.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="7"/>
          <seriesInfo name="RFC" value="9293"/>
          <seriesInfo name="DOI" value="10.17487/RFC9293"/>
        </reference>
        <reference anchor="RFC9260" target="https://www.rfc-editor.org/info/rfc9260" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9260.xml">
          <front>
            <title>Stream Control Transmission Protocol</title>
            <author fullname="R. Stewart" initials="R." surname="Stewart"/>
            <author fullname="M. Tüxen" initials="M." surname="Tüxen"/>
            <author fullname="K. Nielsen" initials="K." surname="Nielsen"/>
            <date month="June" year="2022"/>
            <abstract>
              <t>This document describes the Stream Control Transmission Protocol (SCTP) and obsoletes RFC 4960. It incorporates the specification of the chunk flags registry from RFC 6096 and the specification of the I bit of DATA chunks from RFC 7053. Therefore, RFCs 6096 and 7053 are also obsoleted by this document. In addition, RFCs 4460 and 8540, which describe errata for SCTP, are obsoleted by this document.</t>
              <t>SCTP was originally designed to transport Public Switched Telephone Network (PSTN) signaling messages over IP networks. It is also suited to be used for other applications, for example, WebRTC.</t>
              <t>SCTP is a reliable transport protocol operating on top of a connectionless packet network, such as IP. It offers the following services to its users:</t>
              <t>The design of SCTP includes appropriate congestion avoidance behavior and resistance to flooding and masquerade attacks.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9260"/>
          <seriesInfo name="DOI" value="10.17487/RFC9260"/>
        </reference>
        <reference anchor="RFC8261" target="https://www.rfc-editor.org/info/rfc8261" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8261.xml">
          <front>
            <title>Datagram Transport Layer Security (DTLS) Encapsulation of SCTP Packets</title>
            <author fullname="M. Tuexen" initials="M." surname="Tuexen"/>
            <author fullname="R. Stewart" initials="R." surname="Stewart"/>
            <author fullname="R. Jesup" initials="R." surname="Jesup"/>
            <author fullname="S. Loreto" initials="S." surname="Loreto"/>
            <date month="November" year="2017"/>
            <abstract>
              <t>The Stream Control Transmission Protocol (SCTP) is a transport protocol originally defined to run on top of the network protocols IPv4 or IPv6. This document specifies how SCTP can be used on top of the Datagram Transport Layer Security (DTLS) protocol. Using the encapsulation method described in this document, SCTP is unaware of the protocols being used below DTLS; hence, explicit IP addresses cannot be used in the SCTP control chunks. As a consequence, the SCTP associations carried over DTLS can only be single-homed.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8261"/>
          <seriesInfo name="DOI" value="10.17487/RFC8261"/>
        </reference>
        <reference anchor="RFC6679" target="https://www.rfc-editor.org/info/rfc6679" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6679.xml">
          <front>
            <title>Explicit Congestion Notification (ECN) for RTP over UDP</title>
            <author fullname="M. Westerlund" initials="M." surname="Westerlund"/>
            <author fullname="I. Johansson" initials="I." surname="Johansson"/>
            <author fullname="C. Perkins" initials="C." surname="Perkins"/>
            <author fullname="P. O'Hanlon" initials="P." surname="O'Hanlon"/>
            <author fullname="K. Carlberg" initials="K." surname="Carlberg"/>
            <date month="August" year="2012"/>
            <abstract>
              <t>This memo specifies how Explicit Congestion Notification (ECN) can be used with the Real-time Transport Protocol (RTP) running over UDP, using the RTP Control Protocol (RTCP) as a feedback mechanism. It defines a new RTCP Extended Report (XR) block for periodic ECN feedback, a new RTCP transport feedback message for timely reporting of congestion events, and a Session Traversal Utilities for NAT (STUN) extension used in the optional initialisation method using Interactive Connectivity Establishment (ICE). Signalling and procedures for negotiation of capabilities and initialisation methods are also defined. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6679"/>
          <seriesInfo name="DOI" value="10.17487/RFC6679"/>
        </reference>
        <reference anchor="RFC9000" target="https://www.rfc-editor.org/info/rfc9000" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml">
          <front>
            <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
            <author fullname="J. Iyengar" initials="J." role="editor" surname="Iyengar"/>
            <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson"/>
            <date month="May" year="2021"/>
            <abstract>
              <t>This document defines the core of the QUIC transport protocol. QUIC provides applications with flow-controlled streams for structured communication, low-latency connection establishment, and network path migration. QUIC includes security measures that ensure confidentiality, integrity, and availability in a range of deployment circumstances. Accompanying documents describe the integration of TLS for key negotiation, loss detection, and an exemplary congestion control algorithm.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9000"/>
          <seriesInfo name="DOI" value="10.17487/RFC9000"/>
        </reference>
        <reference anchor="RFC9868" target="https://www.rfc-editor.org/info/rfc9868" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9868.xml">
          <front>
            <title>Transport Options for UDP</title>
            <author fullname="J. Touch" initials="J." surname="Touch"/>
            <author fullname="C. Heard" initials="C." role="editor" surname="Heard"/>
            <date month="October" year="2025"/>
            <abstract>
              <t>Transport protocols are extended through the use of transport header options. This document updates RFC 768 (UDP) by indicating the location, syntax, and semantics for UDP transport layer options within the surplus area after the end of the UDP user data but before the end of the IP datagram.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9868"/>
          <seriesInfo name="DOI" value="10.17487/RFC9868"/>
        </reference>
        <reference anchor="RFC4291" target="https://www.rfc-editor.org/info/rfc4291" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4291.xml">
          <front>
            <title>IP Version 6 Addressing Architecture</title>
            <author fullname="R. Hinden" initials="R." surname="Hinden"/>
            <author fullname="S. Deering" initials="S." surname="Deering"/>
            <date month="February" year="2006"/>
            <abstract>
              <t>This specification defines the addressing architecture of the IP Version 6 (IPv6) protocol. The document includes the IPv6 addressing model, text representations of IPv6 addresses, definition of IPv6 unicast addresses, anycast addresses, and multicast addresses, and an IPv6 node's required addresses.</t>
              <t>This document obsoletes RFC 3513, "IP Version 6 Addressing Architecture". [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4291"/>
          <seriesInfo name="DOI" value="10.17487/RFC4291"/>
        </reference>
      </references>
    </references>
    <?line 339?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>The author would like to thank Ryan Hamilton, who provided constant advice
through this effort. Randall Meyer from Apple and Nick Grifka from Microsoft
provided useful hints about the behavior of their respective operating systems.
However, the author takes full responsibility for any errors above.</t>
      <t>Michael Tuexen wrote the "ecn-examples" code that was very helpful in verifying
the conclusions in this document. He also made multiple editorial contributions.</t>
      <t>Neal Cardwell, Gorry Fairhurst, Max Franke, Rodney Grimes, Will Hawkins,
Guillaume Hétier, Max Inden, Jonathan Lennox, Colin Perkins, Marten
Seemann, and Greg White made improvements to this draft.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA91ba3Mbt5L9jl+BpatScoUPR/bq2kpt7VUk2dZey9KVlPh+
S4FDkMRqODMLYEgxLv/3Pd0AhjMk5Uduslu7SSXiY9Dod59ugIPBQHjjc30s
e6dlMTWz2ppiJn8+u5a3ZXavvZPT0srz0/f897RcLMpCXufK4+3C9YQaj61e
Ynk9qQY6K3oiU17PSrs+lqaYlsJU9lh6Wzt/+OzZq2eHQkzKrFALbDmxauoH
RvvpwLvlajaINAbPXgpXjxfGOVMWfl3h2Yvzu9dSPpEqdyV2M8VEVxr/K3yv
L3t6YnxpjcrpzcXJT/gDbnsXN3eve2ICho7lx7OTu/NPQlmtsP6DHktVTORF
4bUttJd3VhWuKq3viVVp72e2rCs813zMT99quzSZdvIDHiE9vaHHeuJer7Fo
cizkQEIG+gMx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