<?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-rfc2629 version 1.6.5 (Ruby 3.0.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-taps-quic-mapping-00" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.3 -->
  <front>
    <title abbrev="QUIC Mapping">A Transport Services Mapping for QUIC</title>
    <seriesInfo name="Internet-Draft" value="draft-taps-quic-mapping-00"/>
    <author initials="T." surname="Pauly" fullname="Tommy Pauly">
      <organization>Apple</organization>
      <address>
        <email>tpauly@apple.com</email>
      </address>
    </author>
    <date year="2022" month="March" day="19"/>
    <area>Transport</area>
    <workgroup>TAPS Working Group</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document defines a Transport Services API mapping for QUIC streams.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Discussion of this document takes place on the
    QUIC Working Group mailing list (quic@ietf.org),
    which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/quic/"/>.</t>
      <t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/tfpauly/draft-taps-quic-mapping"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>This document defines a Transport Services mapping, as defined in <xref target="I-D.ietf-taps-impl"/> for
the QUIC protocol <xref target="RFC9000"/>. This mapping, presented in <xref target="mapping"/>, allows QUIC to be used
with the calls defined in the Transport Services API <xref target="I-D.ietf-taps-interface"/>.</t>
      <t>This mapping treats a single QUIC stream as a Transport Services Connection object, since this is an
equivalent abstraction to the byte-stream abstractions offered by TCP or TLS over TCP. QUIC streams are
multiplexed within QUIC connections; a QUIC connection is represented in the Transport Services API as
a Connection Group.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
    </section>
    <section anchor="mapping">
      <name>QUIC Stream Mapping</name>
      <t>Connectedness: Multiplexing Connected</t>
      <t>Data Unit: Byte-stream</t>
      <dl>
        <dt>Connection Object:</dt>
        <dd>
          <t>A Connection object in the Transport Services API maps to a single QUIC stream between two hosts. This stream can be bidirectional or unidirectional.</t>
        </dd>
        <dt>Initiate:</dt>
        <dd>
          <t>Calling <tt>Initiate</tt> on a QUIC stream Connection causes the implementation to prepare a new QUIC stream to the Remote Endpoint. If there is already a QUIC connection to the Remote Endpoint, <tt>Initiate</tt> simply prepares a new stream by allocating a stream ID. If there is not already a QUIC connection established, the implementation will establish a connection first.</t>
        </dd>
        <dt>InitiateWithSend:</dt>
        <dd>
          <t>Early data sent in <tt>InitiateWithSend</tt> will be used for 0-RTT QUIC connection establishment, if the QUIC connection to the Remote Endpoint is not already established and the local device has previously negotiated support for 0-RTT establishment with the Remote Endpoint.</t>
        </dd>
        <dt>Ready:</dt>
        <dd>
          <t>A QUIC stream Connection is ready once the underlying QUIC connection is established, and once a stream ID can be allocated. This may be delayed if stream creation is blocked due to reaching the maximum streams limit.</t>
        </dd>
        <dt>InitiateError:</dt>
        <dd>
          <t>QUIC can throw various errors during connection setup (handshake failure, timeouts, etc). Errors for Initiate will represent QUIC connection-level errors. Once a QUIC connection is established, allocation of a QUIC stream ID may be delayed, but will not generate an error.</t>
        </dd>
        <dt>ConnectionError:</dt>
        <dd>
          <t>Once created, a QUIC stream Connection throws an error whenever the stream is disconnected, such as when a RESET_STREAM frame is receieved.</t>
        </dd>
        <dt>Listen:</dt>
        <dd>
          <t>Calling <tt>Listen</tt> for QUIC binds to a local UDP port and prepare to receive inbound QUIC connections and streams.</t>
        </dd>
        <dt>ConnectionReceived:</dt>
        <dd>
          <t>QUIC listeners will deliver each inbound QUIC stream as a Connection object. The relationship of inbound streams to other streams in a single QUIC connection can be detected by checking <tt>Connection.GroupedConnections()</tt>.</t>
        </dd>
        <dt>Clone:</dt>
        <dd>
          <t>Cloning a QUIC stream Connection creates a new stream on an existing QUIC connection. This new stream will inherently share all parameters with the original stream.</t>
        </dd>
        <dt>Send:</dt>
        <dd>
          <t>Sending data will generate a STREAM frame using the stream ID assigned to the Connection object.</t>
        </dd>
        <dt>Receive:</dt>
        <dd>
          <t>Calling <tt>Receive</tt> will indicate that the caller is ready to receive data from this stream, which is sent by the peer in STREAM frames using the stream ID assigned to the Connection object. Data is delivered in either the <tt>Recieved</tt> or <tt>RecievedPartial</tt> event.</t>
        </dd>
        <dt>Close:</dt>
        <dd>
          <t>Calling <tt>Close</tt> on a QUIC stream Connection indicates that the stream should gracefully closed by setting the FIN bit on the stream.</t>
        </dd>
        <dt>Abort:</dt>
        <dd>
          <t>Calling <tt>Close</tt> on a QUIC stream Connection indicates that the stream should closed immediately, by sending a RESET_STREAM frame.</t>
        </dd>
        <dt>CloseGroup:</dt>
        <dd>
          <t>Calling <tt>CloseGroup</tt> on any QUIC stream in a Connection Group indicates that the shared QUIC connection should be closed using a CONNECTION_CLOSE frame once all open streams have completed.</t>
        </dd>
        <dt>AbortGroup:</dt>
        <dd>
          <t>Calling <tt>AbortGroup</tt> on any QUIC stream in a Connection Group indicates that the shared QUIC connection should be closed immediately using a CONNECTION_CLOSE frame.</t>
        </dd>
      </dl>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The security properties of a QUIC connection are expressed in the QUIC handshake, and thus are shared
amongst all streams on a single QUIC connection. When used with the Transport Services API, security
parameters are expressed in the Preconnection object. Connection objects used for QUIC streams <bcp14>MUST</bcp14>
only be grouped with other QUIC streams when the security parameters defined in the Preconnection
objects are identical or equivalent.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="I-D.ietf-taps-impl">
        <front>
          <title>Implementing Interfaces to Transport Services</title>
          <author fullname="Anna Brunstrom">
            <organization>Karlstad University</organization>
          </author>
          <author fullname="Tommy Pauly">
            <organization>Apple Inc.</organization>
          </author>
          <author fullname="Theresa Enghardt">
            <organization>Netflix</organization>
          </author>
          <author fullname="Philipp S. Tiesel">
            <organization>SAP SE</organization>
          </author>
          <author fullname="Michael Welzl">
            <organization>University of Oslo</organization>
          </author>
          <date day="7" month="March" year="2022"/>
          <abstract>
            <t>   The Transport Services system enables applications to use transport
   protocols flexibly for network communication and defines a protocol-
   independent Transport Services Application Programming Interface
   (API) that is based on an asynchronous, event-driven interaction
   pattern.  This document serves as a guide to implementation on how to
   build such a system.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-taps-impl-12"/>
      </reference>
      <reference anchor="RFC9000">
        <front>
          <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
          <author fullname="J. Iyengar" initials="J." role="editor" surname="Iyengar">
            <organization/>
          </author>
          <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson">
            <organization/>
          </author>
          <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="I-D.ietf-taps-interface">
        <front>
          <title>An Abstract Application Layer Interface to Transport Services</title>
          <author fullname="Brian Trammell">
            <organization>Google Switzerland GmbH</organization>
          </author>
          <author fullname="Michael Welzl">
            <organization>University of Oslo</organization>
          </author>
          <author fullname="Theresa Enghardt">
            <organization>Netflix</organization>
          </author>
          <author fullname="Godred Fairhurst">
            <organization>University of Aberdeen</organization>
          </author>
          <author fullname="Mirja Kuehlewind">
            <organization>Ericsson</organization>
          </author>
          <author fullname="Colin Perkins">
            <organization>University of Glasgow</organization>
          </author>
          <author fullname="Philipp S. Tiesel">
            <organization>SAP SE</organization>
          </author>
          <author fullname="Tommy Pauly">
            <organization>Apple Inc.</organization>
          </author>
          <date day="7" month="March" year="2022"/>
          <abstract>
            <t>   This document describes an abstract application programming
   interface, API, to the transport layer that enables the selection of
   transport protocols and network paths dynamically at runtime.  This
   API enables faster deployment of new protocols and protocol features
   without requiring changes to the applications.  The specified API
   follows the Transport Services architecture by providing
   asynchronous, atomic transmission of messages.  It is intended to
   replace the BSD sockets API as the common interface to the transport
   layer, in an environment where endpoints could select from multiple
   interfaces and potential transport protocols.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-taps-interface-15"/>
      </reference>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner">
            <organization/>
          </author>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba">
            <organization/>
          </author>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAHthNmIAA71Y644iNxb+76fwdv4kK0D0aKTssFEUQpMEqbthgdYoiqLB
VB3AO1V2xXbBVEb9LnmWfbI9x64r0DPZ1WpHLU3VKV++8/k7F9Pv9xlz0iUw
4jdjvjZC2Uwbx1dgjjICyx9Elkm15ztt+D+eZpMbJrZbA0ccT6/V9xsW60iJ
FNeJjdi5vhOZ7f+Wy6ifhhH94ZBFwsFem2LErYsZk5kZcWdy614Nh2+Gr5gw
IEYNCnbS5v3e6DxD43ix4m/xncD8SDb2HgocEI/4TDkwClz/jrZmzDqh4nci
0QrhFGCZTYVx737LtQM74kqzTI74L05HPW5xHwM7i09FSg+/MiZyd9BmxHif
cfwX3FrrNC34QuRJ4a3a7IWSvwsntRrxcZYl4O2QCpmgWxmN/E6QfRDplDHW
7/e52FpnRIQg1wdpOZKWp6Acj2EnFdItrp3BeDHj6dk5IINIVmoHYd1UxjEC
YF8QGUbHeUS4/qNdyh16XNhyYMyl4h8//mXWvxtIcLtwqDLNkudnAsLcAQKY
zGhkUyc0evnD5M1wOHx+HnC/e71uZsAiimrZ0v78jDsmiT7ZsJTTfAs8txCz
k3QHTntEOKADiowvEHWJl9SxExEgopKQikyi0BEdFt8SaBNLLFylaaKVAs8u
19t/4lOPZkeAmHBl/BOKAQr/KBKivDpwGo+uEfBt4aBf7dJ8tlzvdmDQwW3B
15M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