<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that
    most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-lin-opsawg-ipfix-quic-header-01"
ipr="trust200902" consensus="true">
  <!-- category values: std, bcp, info, exp, and historic
    ipr values: full3667, noModification3667, noDerivatives3667
    you can add the attributes updates="NNNN" and obsoletes="NNNN"
    they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>

    <title abbrev="Export of QUIC Information in IPFIX">Export of QUIC Information in IP Flow Information Export (IPFIX)</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Changwang Lin" initials="C."
            surname="Lin">
      <organization>New H3C Technologies</organization>

      <address>
        <postal>
          <street>8 Yongjia North Road</street>
          <!-- Reorder these if your country does things differently -->

          <city>Beijing</city>

          <region>Haidian District</region>

          <code>100094</code>

          <country>China</country>
        </postal>

        <email>linchangwang.04414@h3c.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Yisong Liu" initials="Y."
            surname="Liu">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>32 Xuanwumen West Street</street>
          <!-- Reorder these if your country does things differently -->

          <city>Beijing</city>

          <region>Xicheng District</region>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>liuyisong@chinamobile.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

  <author fullname="Yao Liu" initials="Y."
            surname="Liu">
      <organization>ZTE</organization>

      <address>
        <postal>
          <city>Nanjing</city>

          <country>China</country>
        </postal>

        <email>liu.yao71@zte.com.cn</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date year="2025" />

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Network Working Group</workgroup>

    <keyword>IPFIX </keyword>
    <keyword>QUIC</keyword>

<abstract>
<t>
	This document introduces new IP Flow Information Export (IPFIX) Information Elements to identify a set of QUIC related information which contained QUIC Header, 
  QUIC Frame and Stream that traffic is being forwarded with.
</t>

</abstract>

  </front>

  <middle>

<section anchor="Introduction" title="Introduction">
<t>
	QUIC Packets are carried in UDP datagrams and exchanged for communication of QUIC endpoints <xref target="RFC9000"/>. A QUIC packet consists of a QUIC header and a QUIC payload.
</t>
<t>
  QUIC Header is divided into Long Header and Short Header. Long Headers are used for packets that are sent prior to the establishment of 1-RTT keys. 
  The Long Header contains an 8-bit Public Flag, a 32-bit QUIC Version, a variable-length Destination Connection ID, 
  a variable-length Source Connection ID and Type-Specific field which has different content based on the Packet type. 
  The Packet types that use the long header contain Version Negotiation Packet, Initial Packet, 0-RTT Packet, 
  Handshake Packet and Retry Packet. Once 1-RTT keys are available, a sender switches to sending packets using the Short Header. 
  The Short Header includes an 8-bit Public Flag, a variable-length Destination Connection ID and a Packet Number.
</t>
<t>
  QUIC payload MAY contain a sequence of Frames which begin with a Frame Type. In the generic Frame Layout, the Frame Type is followed by additional type-dependent fields. 
  Since Stream in QUIC is the one core component to provide a lightweight, ordered byte-stream abstraction to an application, 
  the Stream ID of Frames related to Stream is an important information that indicates the stream in which the Frame is located or that the Frame affects.
</t>
<t>
  This document specifies several new IPFIX Information Elements (IEs) within the "IPFIX Information Elements" registry <xref target="RFC7012"/> for purposes of getting QUIC information. 
  These IEs are used to export the main parameters of QUIC Header, QUIC Frame and Stream.
</t>
</section>
<section anchor="Terminology" title="Terminology">
  <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
    "MAY", and "OPTIONAL" 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>
  <t>
    This document makes use of the terms defined in <xref target="RFC7011"/> and <xref target="RFC9000"/>.
  </t>
  <t>
    The following terms are used as defined in <xref target="RFC7011"/>:
  </t>
  <t>
    <list style="symbols">
    <t>IPFIX</t>
    <t>IPFIX Information Elements</t>
    </list>
  </t>
  <t>
    The following terms are used as defined in <xref target="RFC9000"/>:
  </t>
  <t>
    <list style="symbols">
    <t>QUIC</t>
    <t>Endpoint</t>
    <t>Server</t>
    <t>QUIC packet</t>
    <t>Frame</t>
    <t>Connection ID</t>
    <t>Stream</t>
    <t>Application</t>
    </list>
  </t>
</section>
<section anchor="New IPFIX QUIC Information Elements" title="New IPFIX QUIC Information Elements">
<t>
  This section specifies the new IPFIX QUIC IEs.
  <list style="hanging">
    <t hangText="quicHeaderFlag"><vspace blankLines="0"/>
    8-bit flag defined in the QUIC Header (Section 17.2 and 17.3 of <xref target="RFC9000"/>), as the first byte of QUIC Packet, 
    which primarily indicates the Packet Type and the Length of followed fields.
    </t>
    <t hangText="quicVersion"><vspace blankLines="0"/>
      32-bit QUIC Version that is in use and determines how the rest of the protocol packet fields are interpreted.
    </t>
    <t hangText="quicDestinationConnectionID"><vspace blankLines="0"/>
      The Destination Connection ID included in the Long Header or Short Header of QUIC Packet. 
      The Destination Connection ID is chosen by the recipient of the packet and is used to provide consistent routing.
    </t>
    <t hangText="quicSourceConnectionID"><vspace blankLines="0"/>
      The Source Connection ID included by the Long Header of QUIC Packet. The Source Connection ID is used to set the Destination Connection ID used by the peer.
    </t>
    <t hangText="quicSupportedVersion"><vspace blankLines="0"/>
      32-bit Supported Version included by Version Negotiation packet with the Long Header.
    </t>
    <t hangText="quicPacketNumber"><vspace blankLines="0"/>
      The Packet Number that appears in some packet types such as Initial packet, 0-RTT packet and Handshake packet. 
      The underlying packet number increases with each packet sent in a given packet number space. 
      The Packet Number is an integer in the range 0 to 262-1. When present in a Long or Short Header, packet numbers are reduced and encoded in 1 to 4 bytes.
    </t>
    <t hangText="quicFrameType"><vspace blankLines="0"/>
      Frame Type that indicates the type of Frame contained in the Payload of QUIC Packet. 
      The Frame Type value uses a variable-length integer encoding which means that integers are encoded on 1, 2, 4, or 8 bytes and can encode 6-, 14-, 30-, or 62-bit values, respectively. 
      Some Frame Types are defined in section 12.4 of <xref target="RFC9000"/>.
    </t>
    <t hangText="quicStreamID"><vspace blankLines="0"/>
      The Stream ID included in the Frame related to Stream such as RESET_STREAM frame, STOP_SENDING frame, STREAM frame and MAX_STREAM_DATA frame. 
      A stream ID is a 62-bit integer (0 to 262-1) that is unique for all streams on a connection. Stream IDs are encoded as variable-length integers, 
      which means that integers are encoded on 1, 2, 4, or 8 bytes and can encode 6-, 14-, 30-, or 62-bit values, respectively. 
      The two least significant bits from a stream ID identify the stream types defined in section 2.1 of <xref target="RFC9000"/>.
    </t>
  </list>
</t>
</section>

<section anchor="Sample Use Cases" title="Sample Use Cases">
<t>
	The IPFIX IEs listed in the Section 3, forwardingStatus (89) <xref target="RFC7270"/> 
  and some existing counter information <xref target="IANA-IPFIX"/> provide answers to the following questions (amongst others).
</t>
<t>
  <list style="symbols">
  <t>How many packets are forwarded or dropped using QUIC in a network?</t>
  <t>If dropped, for which reasons?</t>
  <t>What is the type of QUIC packet?</t>
  <t>What is the QUIC version that is in use?</t>
  <t>What is the Destination or Source Connection ID of QUIC packet?</t>
  <t>Have all the QUIC packets been fully received?</t>
  <t>Which frames does the QUIC packet carry?</t>
  <t>Which stream is the QUIC packet located in?</t>
  <t>Which stream is affected by the QUIC packet?</t>
  </list>
</t>
</section>

<section anchor="Security Considerations" title="Security Considerations">
<t>
	There exists no extra security considerations regarding allocation of these new IPFIX IEs compared to <xref target="RFC7012"/>.
</t>
</section>

<section anchor="IANA Considerations" title="IANA Considerations">
  <section anchor="New IPFIX QUIC IEs" title="New IPFIX QUIC Information Elements">
    <t>
      This document requests IANA to add new IPFIX QUIC IEs to the "IPFIX Information Elements" registry <xref target="RFC7012"/> available at <xref target="IANA-IPFIX"/>.
    </t>
    <t>
      Table 1 lists the new IPFIX QUIC IEs:
    </t>
    <t><figure>
      <artwork align="center" name="Table 1"><![CDATA[
    +============+=============================+===============+
    | Element ID | Name                        | Reference     |
    +============+=============================+===============+
    | TBD1       | quicHeaderFlag              | This document |
    +------------+-----------------------------+---------------+
    | TBD2       | quicVersion                 | This document |
    +------------+-----------------------------+---------------+
    | TBD3       | quicDestinationConnectionID | This document |
    +------------+-----------------------------+---------------+
    | TBD4       | quicSourceConnectionID      | This document |
    +------------+-----------------------------+---------------+
    | TBD5       | quicSupportedVersion        | This document |
    +------------+-----------------------------+---------------+
    | TBD6       | quicPacketNumber            | This document |
    +------------+-----------------------------+---------------+
    | TBD7       | quicFrameType               | This document |
    +------------+-----------------------------+---------------+
    | TBD8       | quicStreamID                | This document |
    +------------+-----------------------------+---------------+

 Table 1: New QUIC IEs in the "IPFIX Information Elements" Registry]]></artwork>
    </figure></t>
    <section anchor="IANAquicHeaderFlag" title="quicHeaderFlag">
      <dl>
        <dt>Name:</dt><dd>quicHeaderFlag</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD1</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>The 8-bit flag defined in the QUIC Header (Section 17.2 and 17.3 of <xref target="RFC9000"/>). 
            The meanings of the flag are provided in the first byte of the QUIC Header Packet <xref target="RFC9000"/>.</dd>
      </dl>

      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned8</dd>
      </dl>

      <dl>
        <dt>Data Type Semantics:</dt><dd>flags</dd>
      </dl>

      <dl>
        <dt>Additional Information:</dt>
        <dd>See RFC9000 for the QUIC Header specification.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicVersion" title="quicVersion">
      <dl>
        <dt>Name:</dt><dd>quicVersion</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD2</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>32-bit unsigned integer defining the number of Version, which is in use and determines how the rest of the protocol packet fields are interpreted. 
            Its values are provided in the "QUIC Versions" IANA registry.</dd>
      </dl>

      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned32</dd>
      </dl>

      <dl>
        <dt>Data Type Semantics:</dt><dd>default</dd>
      </dl>

      <dl>
        <dt>Additional Information:</dt>
        <dd>See the assignments in the "QUIC Versions" IANA registry at 
            https://www.iana.org/assignments/quic/quic.xhtml#quic-versions. 
            See also RFC9000 for the QUIC Versions specification.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicDestinationConnectionID" title="quicDestinationConnectionID">
      <dl>
        <dt>Name:</dt><dd>quicDestinationConnectionID</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD3</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>The Destination Connection ID as defined in Section 7.2 of <xref target="RFC9000"/> as a series of octets in IPFIX.</dd>
      </dl>

      <dl>
        <dt>Abstract Data Type:</dt><dd>octetArray</dd>
      </dl>

      <dl>
        <dt>Data Type Semantics:</dt><dd>default</dd>
      </dl>

      <dl>
        <dt>Additional Information:</dt>
        <dd>See Section 7.2 of <xref target="RFC9000"/> for more details about The Destination Connection ID.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicSourceConnectionID" title="quicSourceConnectionID">
      <dl>
        <dt>Name:</dt><dd>quicSourceConnectionID</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD4</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>The Source Connection ID as defined in Section 7.2 of <xref target="RFC9000"/> as a series of octets in IPFIX.</dd>
      </dl>

      <dl>
        <dt>Abstract Data Type:</dt><dd>octetArray</dd>
      </dl>

      <dl>
        <dt>Data Type Semantics:</dt><dd>default</dd>
      </dl>

      <dl>
        <dt>Additional Information:</dt>
        <dd>See Section 7.2 of <xref target="RFC9000"/> for more details about The Source Connection ID.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicSupportedVersion" title="quicSupportedVersion">
      <dl>
        <dt>Name:</dt><dd>quicSupportedVersion</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD5</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>32-bit unsigned integer defining the number of Version, which indicates the supported QUIC version of server. 
            Its values are provided in the "QUIC Versions" IANA registry.</dd>
      </dl>

      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned32</dd>
      </dl>

      <dl>
        <dt>Data Type Semantics:</dt><dd>default</dd>
      </dl>

      <dl>
        <dt>Additional Information:</dt>
        <dd>See the assignments in the "QUIC Versions" IANA registry at https://www.iana.org/assignments/quic/quic.xhtml#quic-versions. 
            See also RFC9000 for the QUIC Versions specification.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicPacketNumber" title="quicPacketNumber">
      <dl>
        <dt>Name:</dt><dd>quicPacketNumber</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD6</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>8~32-bit unsigned integer defining the packet number of QUIC Header, which is used in determining the cryptographic nonce for packet protection.</dd>
      </dl>

      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned32</dd>
      </dl>

      <dl>
        <dt>Data Type Semantics:</dt><dd>default</dd>
      </dl>

      <dl>
        <dt>Additional Information:</dt>
        <dd>See Section 12.3 of <xref target="RFC9000"/> for more details about The Packet Number.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicFrameType" title="quicFrameType">
      <dl>
        <dt>Name:</dt><dd>quicFrameType</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD7</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>62-bit unsigned integer defining the value of Frame Type, which indicates the type of QUIC Frame. Its values are provided in the "QUIC Frame Types" IANA registry.</dd>
      </dl>

      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned64</dd>
      </dl>

      <dl>
        <dt>Data Type Semantics:</dt><dd>default</dd>
      </dl>

      <dl>
        <dt>Additional Information:</dt>
        <dd>See the assignments in the "QUIC Frame Types" IANA registry at https://www.iana.org/assignments/quic/quic.xhtml#quic-frame-types. 
            See also RFC9000 for the Frame Types specification of QUIC.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicStreamID" title="quicStreamID">
      <dl>
        <dt>Name:</dt><dd>quicStreamID</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD8</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>62-bit unsigned integer defining the value of Stream ID, which identifies a Stream. 
            The two least significant bits from a stream ID identify the stream types defined in section 2.1 of <xref target="RFC9000"/>.</dd>
      </dl>

      <dl>
        <dt>Abstract Data Type:</dt><dd>unsigned64</dd>
      </dl>

      <dl>
        <dt>Data Type Semantics:</dt><dd>identifier</dd>
      </dl>

      <dl>
        <dt>Additional Information:</dt>
        <dd>See Section 2.1 of <xref target="RFC9000"/> for more details about The Stream ID.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
  </section>
</section>

<!-- <section anchor="Acknowledgements" title="Acknowledgements">
<t>
	The author would like to thank xxx for his valuable input.
</t>
</section> -->

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
  <references title="References">
    <references title="Normative References">
        <?rfc include="reference.RFC.2119.xml"?>
        <?rfc include="reference.RFC.7011.xml"?>
        <?rfc include="reference.RFC.7012.xml"?>
        <?rfc include="reference.RFC.8174.xml"?>
        <!--<?rfc include="reference.I-D.li-dmsc-architecture.xml"?>-->
        <?rfc include="reference.RFC.9000.xml"?>
    </references>
    <references title="Informative References">
        <reference anchor="IANA-IPFIX"
                 target="https://www.iana.org/assignments/ipfix/ipfix.xhtml">
          <front>
            <title>IANA, "IP Flow Information Export (IPFIX) Entities"</title>

            <author/>

            <date/>
          </front>
        </reference>
        <?rfc include="reference.RFC.7270.xml"?>
    </references>
  </references>
  </back>
</rfc>
