<?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.35 (Ruby 3.4.9) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-tsvwg-udp-ecn-06" 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-06"/>
    <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>
    </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 67?>

<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 TSV Working Group is not aware of any such efforts.</t>
      <t><xref target="RFC6679"/> defines ECN over RTP over UDP. The Working Group is aware of a
research implementation, but cannot confirm any commercial deployments.</t>
      <t>However, QUIC <xref target="RFC9000"/> runs over UDP and has seen wider deployment than
SCTP. The Low Latency, Low Loss, Scalable Throughput (L4S) experiment
(<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.</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.
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.</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 which 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;), 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
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-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="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="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="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>
      <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>
    </references>
    <?line 332?>

<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:
H4sIAAAAAAAAA91b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