<?xml version="1.0" encoding="UTF-8"?>
<!--  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>-->
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.3 -->
<?xml-model href="rfc7991bis.rnc"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc toc="yes"?>

<rfc ipr="trust200902" submissionType="IETF" consensus="true" docName="draft-aguilar-schc-streaming-00" category="std" updates="8724">

  <front>
   <title abbrev="SCHC Streaming Mode">
     SCHC Streaming Mode
   </title>

      <author initials="S." surname="Aguilar" fullname="Sergio Aguilar">
         <organization>Universitat Politecnica de Catalunya</organization>
      <address>
        <postal>
          <street>C/Esteve Terradas, 7</street> <street>08860 Castelldefels</street>
          <country>Spain</country>
        </postal>
        <email>sergio.aguilar.romero@upc.edu</email>
      </address>
   </author>


   <author initials="C." surname="Gomez" fullname="Carles Gomez">
      <organization>Universitat Politecnica de Catalunya</organization>
      <address>
        <postal>
          <street>C/Esteve Terradas, 7</street> <street>08860 Castelldefels</street>
          <country>Spain</country>
        </postal>
        <email>carles.gomez@upc.edu</email>
      </address>
    </author>


<date year="2023" month="May" day="11"/>


<workgroup>schc Working Group</workgroup>


<abstract>

<t>This documents presents an update of SCHC [RFC8724] by providing a new F/R mode called SCHC Streaming mode. </t>

</abstract>


  </front>

  <middle>


<section anchor="Introduction" title="Introduction">

<t>SCHC <xref target="RFC8724"/> provides Fragmentation/Reassembly (F/R) modes, i.e., No-ACK, ACK-Always and ACK-on-Error.
These modes allow for SCHC Packets larger than the Maximum Transmission Unit (MTU) of the underlying Layer 2 (L2) to be transferred between the sender and receiver with a range of reliability options, including SCHC Fragment retransmissions, over delay tolerant networks.
The available F/R modes allow transmitting non-fragmented SCHC Packets concurrently with fragmented SCHC Fragments, and SCHC Packet interleaving.
However, SCHC does not provide an optimal F/R mode for a continuous transmission of un-fragmented SCHC Packets, i.e, streaming of SCHC Packets smaller than, or of the same size as, the L2 MTU.</t>
<t>
The streaming of SCHC Packets can be used to send, e.g., sensor measurements or the location coordinates of an asset tracker, which are sent every number of minutes and are optimized to fit in only one SCHC Fragment, with or without SCHC Compression.
These SCHC Packets may not require fragmentation but require reliability, as some fragment losses may be incurred due to intermittent connectivity (e.g., vehicles going into tunnels, no coverage areas) or opportunistic coverage (e.g., coverage is available for certain time windows, of duration and frequency that might not be deterministic).
With current SCHC F/R modes, each sensor measurement or location information can be sent as a compressed or un-compressed SCHC Packet, with different reliability options, however, each SCHC Packet will require a SCHC ACK, even if it is of only one SCHC Fragment in size.
In networks, e.g., LPWANs <xref target="RFC8376"/>, the downlink traffic or network capacity may be limited. [I.D.Compound ACK] provides an optimization in the ACK traffic by grouping the feedback of several windows of tiles in the same ACK message, providing flexibility on when the receiver sends feedback.
</t>
<t>The present document extends <xref target="RFC8724"/> with a new F/R mode called SCHC Streaming.
This F/R mode optimized the overhead of current F/R modes for a contiuos streaming of compressed or un-compressed SCHC Packets which require one SCHC Fragment to be transferred.
The SCHC Streaming mode provides different configuration option on when the receiver can provide feedback, therefore adapting to the specifics of each network, e.g., the amount of ACK traffic that can be supported, application delay tolerance, L2 MTU size and the maximum number of window bitmaps that can be carried in a SCHC Compound ACK.
</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>It is assumed that the reader is familiar with the terms and mechanisms defined in <xref target="RFC8376"/> and in <xref target="RFC8724"/>, specially Section 8.
</t>

</section>

<section anchor="schc-streaming" title="SCHC Streaming">

<t>The SCHC Streaming mode supports L2 technologies that have variable MTU and out-of-order delivery (to some extent).
It requires an L2 that provides a feedback path from the reassembler to the fragmenter.
</t>

<t>SCHC Streaming mode uses windows, with all tiles, except for the last one, of equal size (regular size).
The last tile MAY be smaller or equal to a regular tile.
</t>

<t>A SCHC Fragment carries one or several contiguous tiles, which may span multiple windows from the same DTag value.
A SCHC Compound ACK reports on the reception of one window of tiles or several windows of tiles, each one identified by its window number and corresponding to the same DTag value.</t>


<t>Each Profile, for each RuleID value, MUST define:</t>
<t><list style="symbols">
<t>the tile size (a tile does not need to be multiple of an L2 Word, but it MUST be at least the size of an L2 Word),</t>
<t>the value of M,</t>
<t>the value of N,</t>
<t>the value of WINDOW_SIZE, which MUST be strictly less than 2^N,</t>
<t>the size and algorithm for the RCS field,</t>
<t>the value of T,</t>
<t>the value of MAX_ACK_REQUESTS,</t>
<t>the expiration time of the Retransmission Timer,</t>
<t>the expiration time of the Inactivity Timer,</t>
<t>when the SCHC Compound ACKs are sent.</t>
</list></t>

 
<t>For each active RuleID value, the sender MUST maintain:</t>
<t><list style="symbols">
<t>one Attempts counter, and</t>
<t>one Retransmission Timer.</t>
</list></t>

<t>For each active RuleID value, the receiver MUST maintain:</t>
<t><list style="symbols">
<t>one Inactivity Timer, and</t>
<t>one Attempts counter.</t>
</list></t>

<section anchor="transfer-cycles" title="Transfer Cycles">

<t>In SCHC Streaming mode the flow of tiles is continuous and it is divided into cycles.
There are two cycles, the Window Cycle and the DTag Cycle (see <xref target="schc-packet-streaming"/>).
To uniquely identify each tile, a combination of DTag, Window Number and FCN is used in each DTag Cycle.</t>
        <t><figure title="SCHC Packets streaming carried in Tiles and Windows using the SCHC Streaming Mode. M = 1 bit (Window Cycle of 2 Windows) and DTag = 1 bit (DTag Cycle of 2 Window Cycles, i.e., 4 Windows)" anchor="schc-packet-streaming"><artwork><![CDATA[


              +---------------------------------------------...-----------....----...
              |               SCHC Streaming flow of SCHC Packets
              +---------------------------------------------...-----------...-----...

Tile#         | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | 4 | ... | 0 | 4 | ... | 0 |...
Window#       |-------- 0 --------|-------- 1 --------|- 0  ...  1 -|- 0  ...  1 -|...
DTag#         |-------------------- 0 ----------------|----- 1 -----|----- 0 -----|... 

Window Cycle# |---------------------0-----------------|------1------|------0------|...
DTag Cycle#   |-------------------------------0---------------------|------1------|...
              ^                                       ^             ^
              |                                       |             |
             Window Cycle 0 start            Window Cycle 0 ends    |
              ^                                                     |
              |                                                     |
             DTag Cycle 0 start                              DTag Cycle 0 ends

]]></artwork></figure></t>
  <t>The sender will begin the first DTag and Window Cycle by sending tiles using DTag = 0 and Window Number = 0 (the tile index, i.e., the FCN, MUST be decremented by 1 from WINDOW_SIZE - 1 downward).
After each window of tiles, the Window Number is increased.
Current Window Cycle ends once the Window Number reaches its maximum value and the last fragment of this window is sent.
Next Window Cycle will begin by increasing the DTag value by one, and resetting the Window Number and FCN values.
The number of Window Cycles without repeating the same DTag, Window Number and FCN value depends on the size of the DTag field, which determines the DTag Cycle.
After the DTag reaches its maximum value, and therefore the end of the DTag Cycle, it MUST be reset.
To manage the receiver feedback, the Receiver MUST send at least one SCHC Compound ACK per DTag Cycle, i.e., before the DTag is reset, indicating tiles losses in any of previous Window Cycles corresponding to this DTag Cycle.
Only one Window Cycle MUST be reported per SCHC Compound ACK.
The SCHC Compound ACK MUST be sent before the start of a new DTag Cycle.
SCHC Fragments MAY be delivered out-of-order in each DTag Cycle, but all tiles MUST be received before advancing to the next DTag Cycle.</t>
<t> The SCHC All-1 message is used to finalize current SCHC Streaming session in case it is needed.</t>

</section>


    <section anchor="ack-behaviour" title="ACK Behaviour">
<t>A SCHC Compound ACK MAY be sent after the All-0 SCHC Fragment message and MUST be sent after the All-1 SCHC Fragment message. 
This allows the receiver to provide feedback after any window of tiles.
The Profile MUST specify when the sender should listen for a SCHC Compound ACK, specially in networks which require the sender to enable reception of incoming SCHC ACKs.
The sender MAY listen after each complete window of tiles (the All-0 message in each window), after the All-0 of the last window of each Window Cycle or after the All-0 of the last window of each DTag Cycle.</t>


<t>The receiver can send SCHC Compound ACKs:</t>
<t><list style="symbols">
<t> at the end of each Window Cycle, in the last window (with the maximum window number), an All-0 message indicates the end of current window, and as it is the last window of current Window Cycle, it indicates the end of current Window Cycle. The receiver MAY send a SCHC Compound ACK. Note that after this Window Cycle ends, the receiver MAY request fragments of previous DTag values (before the DTag Cycle ends).</t>
<!--<t> After the SCHC All-1 message.</t>-->
<t> A success SCHC ACK MUST be sent by the receiver at the end of each DTag Cycle, to acknowledge all SCHC Fragment before continuing to next DTag Cycle. Note that after a new DTag Cycle begins, it is not possible to recover SCHC Fragment from previous DTag Cycles, as the combination of DTag, Window Number and FCN is repeated.</t>
</list></t>

</section>
</section>

<section anchor="schc-streaming-examples" title="SCHC Streaming mode examples">
<t>This section provides examples of the SCHC Streaming mode. The configuration used in these examples is as follows:</t>
<t><list style="symbols">
  <t>RuleID: Same RuleID in all SCHC Fragments.</t>
  <t>M: 2 bits (with values 00,01,10,11)</t>
  <t> N: 3 bits (with values from 6 to 0 plus the All-1)</t>
  <t>DTag: 1 bits</t>
  <t>WINDOW_SIZE: 7 tiles</t>
</list></t>
<t>In <xref target="schc-streaming-mode-example-1"/>, a SCHC Streaming transmission example is shown.
  In this transmission, the first 3 windows have fragment losses. 
  The fourth window has no fragment losses. 
 The receiver sends a SCHC Compound ACK reporting on the fragment losses of the first 3 windows, after receiving the All-0 message that signal the end of current Window Cycle, i.e., the All-0 message of the fourth window. 
The sender resends the missing fragments and continues to next Window Cycle by increasing the DTag value.</t>
  <t>
  Next Window Cycle present fragment losses that are recovered at the end of the cycle, as the receiver sends a SCHC Compound ACK message after receiving the All-0 message.
  The sender resends the missing fragment,
  and as it is the end of the DTag Cycle, a success ACK is sent by the receiver to continue the transmission in the next DTag Cycle.
  </t>



<t><figure title="SCHC Streaming mode sequence example 1" anchor="schc-streaming-mode-example-1"><artwork><![CDATA[
  Sender                         Receiver
  |-----DTag= 0, W=0, FCN=6 ----->|
  |-----DTag= 0, W=0, FCN=5 ----->|
  |-----DTag= 0, W=0, FCN=4 ----->|
  |-----DTag= 0, W=0, FCN=3 ----->|
  |-----DTag= 0, W=0, FCN=2 --X   |
  |-----DTag= 0, W=0, FCN=1 ----->|
  |-----DTag= 0, W=0, FCN=0 ----->| Bitmap: 1111011
(no ACK)
  |-----DTag= 0, W=1, FCN=6 ----->|
  |-----DTag= 0, W=1, FCN=5 ----->|
  |-----DTag= 0, W=1, FCN=4 ----->|
  |-----DTag= 0, W=1, FCN=3 ----->|
  |-----DTag= 0, W=1, FCN=2 ----->|
  |-----DTag= 0, W=1, FCN=1 --X   |
  |-----DTag= 0, W=1, FCN=0 ----->| Bitmap: 1111101
(no ACK)    
  |-----DTag= 0, W=2, FCN=6 ----->|
  |-----DTag= 0, W=2, FCN=5 --X   |
  |-----DTag= 0, W=2, FCN=4 ----->|
  |-----DTag= 0, W=2, FCN=3 ----->|
  |-----DTag= 0, W=2, FCN=2 ----->|
  |-----DTag= 0, W=2, FCN=1 ----->|
  |-----DTag= 0, W=2, FCN=0 ----->| Bitmap: 1011111
(no ACK)    
  |-----DTag= 0, W=3, FCN=6 ----->|
  |-----DTag= 0, W=3, FCN=5 ----->|
  |-----DTag= 0, W=3, FCN=4 ----->|
  |-----DTag= 0, W=3, FCN=3 ----->|
  |-----DTag= 0, W=3, FCN=2 ----->|
  |-----DTag= 0, W=3, FCN=1 ----->|
  |-----DTag= 0, W=2, FCN=0 ----->| Bitmap: 1111111
  |<--- DTag= 0, Compound ACK ----| [C=0, W=0 - Bitmap:1111011, W=1 - Bitmap:1111101, W=2 - Bitmap:1011111]
  |-----DTag= 0, W=0, FCN=2 ----->|        
  |-----DTag= 0, W=1, FCN=1 ----->| 
  |-----DTag= 0, W=2, FCN=5 ----->|
(next Window Cycle)
  |-----DTag= 1, W=0, FCN=6 ----->|
  |-----DTag= 1, W=0, FCN=5 ----->|
  |-----DTag= 1, W=0, FCN=4 ----->|
  |-----DTag= 1, W=0, FCN=3 ----->|
  |-----DTag= 1, W=0, FCN=2 --X   |
  |-----DTag= 1, W=0, FCN=1 ----->|
  |-----DTag= 1, W=0, FCN=0 ----->| Bitmap: 1111011
(no ACK)
  |-----DTag= 1, W=1, FCN=6 ----->|
  |-----DTag= 1, W=1, FCN=5 ----->|
  |-----DTag= 1, W=1, FCN=4 ----->|
  |-----DTag= 1, W=1, FCN=3 ----->|
  |-----DTag= 1, W=1, FCN=2 ----->|
  |-----DTag= 1, W=1, FCN=1 --X   |
  |-----DTag= 1, W=1, FCN=0 ----->| Bitmap: 1111101
(no ACK)    
  |-----DTag= 1, W=2, FCN=6 ----->|
  |-----DTag= 1, W=2, FCN=5 --X   |
  |-----DTag= 1, W=2, FCN=4 ----->|
  |-----DTag= 1, W=2, FCN=3 ----->|
  |-----DTag= 1, W=2, FCN=2 ----->|
  |-----DTag= 1, W=2, FCN=1 ----->|
  |-----DTag= 1, W=2, FCN=0 ----->| Bitmap: 1011111
(no ACK)    
  |-----DTag= 1, W=3, FCN=6 ----->|
  |-----DTag= 1, W=3, FCN=5 ----->|
  |-----DTag= 1, W=3, FCN=4 ----->|
  |-----DTag= 1, W=3, FCN=3 ----->|
  |-----DTag= 1, W=3, FCN=2 ----->|
  |-----DTag= 1, W=3, FCN=1 ----->|
  |-----DTag= 1, W=3, FCN=0 ----->| Bitmap: 1011111
  |<--- DTag= 1, Compound ACK ----| [C=0, W=0 - Bitmap:1111011, W=1 - Bitmap:1111101, W=2 - Bitmap:1011111]
  |-----DTag= 1, W=0, FCN=2 ----->|        
  |-----DTag= 1, W=1, FCN=1 ----->| 
  |-----DTag= 1, W=2, FCN=5 ----->|
  |<--- DTag= 1, ACK, W=3, C=1 ---| C=1 [success ACK is needed before moving to next DTag cycle]
(next Window and DTag Cycle)  
]]></artwork></figure></t>

<t><xref target="schc-streaming-mode-example-2"/> shows another example of SCHC Streaming mode where a SCHC Compound ACK is sent at the ending of the DTag Cycle, recovering SCHC Fragment losses of previous windows of the DTag Cycle. 
  As both Window Cycles present SCHC Fragment losses, two SCHC Compound ACKs are sent by the receiver at the end of the DTag Cycle.</t>


  <t><figure title="SCHC Streaming mode sequence example 2" anchor="schc-streaming-mode-example-2"><artwork><![CDATA[
    Sender                         Receiver
    |-----DTag= 0, W=0, FCN=6 ----->|
    |-----DTag= 0, W=0, FCN=5 ----->|
    |-----DTag= 0, W=0, FCN=4 ----->|
    |-----DTag= 0, W=0, FCN=3 ----->|
    |-----DTag= 0, W=0, FCN=2 --X   |
    |-----DTag= 0, W=0, FCN=1 ----->|
    |-----DTag= 0, W=0, FCN=0 ----->| Bitmap: 1111011
(no ACK)
    |-----DTag= 0, W=1, FCN=6 ----->|
    |-----DTag= 0, W=1, FCN=5 ----->|
    |-----DTag= 0, W=1, FCN=4 ----->|
    |-----DTag= 0, W=1, FCN=3 ----->|
    |-----DTag= 0, W=1, FCN=2 ----->|
    |-----DTag= 0, W=1, FCN=1 --X   |
    |-----DTag= 0, W=1, FCN=0 ----->| Bitmap: 1111101
(no ACK)    
    |-----DTag= 0, W=2, FCN=6 ----->|
    |-----DTag= 0, W=2, FCN=5 --X   |
    |-----DTag= 0, W=2, FCN=4 ----->|
    |-----DTag= 0, W=2, FCN=3 ----->|
    |-----DTag= 0, W=2, FCN=2 ----->|
    |-----DTag= 0, W=2, FCN=1 ----->|
    |-----DTag= 0, W=2, FCN=0 ----->| Bitmap: 1011111
(no ACK)    
    |-----DTag= 0, W=3, FCN=6 ----->|
    |-----DTag= 0, W=3, FCN=5 ----->|
    |-----DTag= 0, W=3, FCN=4 ----->|
    |-----DTag= 0, W=3, FCN=3 ----->|
    |-----DTag= 0, W=3, FCN=2 ----->|
    |-----DTag= 0, W=3, FCN=1 ----->|
    |-----DTag= 0, W=2, FCN=0 ----->| Bitmap: 1011111
(no ACK)   
                          
(next Window Cycle)
    |-----DTag= 1, W=0, FCN=6 ----->|
    |-----DTag= 1, W=0, FCN=5 ----->|
    |-----DTag= 1, W=0, FCN=4 ----->|
    |-----DTag= 1, W=0, FCN=3 ----->|
    |-----DTag= 1, W=0, FCN=2 --X   |
    |-----DTag= 1, W=0, FCN=1 ----->|
    |-----DTag= 1, W=0, FCN=0 ----->| Bitmap: 1111011
(no ACK)
    |-----DTag= 1, W=1, FCN=6 ----->|
    |-----DTag= 1, W=1, FCN=5 ----->|
    |-----DTag= 1, W=1, FCN=4 ----->|
    |-----DTag= 1, W=1, FCN=3 ----->|
    |-----DTag= 1, W=1, FCN=2 ----->|
    |-----DTag= 1, W=1, FCN=1 --X   |
    |-----DTag= 1, W=1, FCN=0 ----->| Bitmap: 1111101
(no ACK)    
    |-----DTag= 1, W=2, FCN=6 ----->|
    |-----DTag= 1, W=2, FCN=5 --X   |
    |-----DTag= 1, W=2, FCN=4 ----->|
    |-----DTag= 1, W=2, FCN=3 ----->|
    |-----DTag= 1, W=2, FCN=2 ----->|
    |-----DTag= 1, W=2, FCN=1 ----->|
    |-----DTag= 1, W=2, FCN=0 ----->| Bitmap: 1011111
(no ACK)    
    |-----DTag= 1, W=3, FCN=6 ----->|
    |-----DTag= 1, W=3, FCN=5 ----->|
    |-----DTag= 1, W=3, FCN=4 ----->|
    |-----DTag= 1, W=3, FCN=3 ----->|
    |-----DTag= 1, W=3, FCN=2 ----->|
    |-----DTag= 1, W=3, FCN=1 ----->|
    |-----DTag= 1, W=3, FCN=0 ----->| Bitmap: 1111111
    
    |<--- DTag= 0, Compound ACK ----| [C=0, W=0 - Bitmap:1111011, W=1 - Bitmap:1111101, W=2 - Bitmap:1011111]
    |-----DTag= 0, W=0, FCN=2 ----->|        
    |-----DTag= 0, W=1, FCN=1 ----->| 
    |-----DTag= 0, W=2, FCN=5 ----->|
    
    |<--- DTag= 1, Compound ACK ----| [C=0, W=0 - Bitmap:1111011, W=1 - Bitmap:1111101, W=2 - Bitmap:1011111]
    |-----DTag= 1, W=0, FCN=2 ----->|        
    |-----DTag= 1, W=1, FCN=1 ----->| 
    |-----DTag= 1, W=2, FCN=5 ----->|
    
    |<--- DTag= 1, ACK, W=3, C=1 ---| C=1 success ACK is needed before moving to next DTag cycle
(next Window and DTag Cycle)  


  ]]></artwork></figure></t>


  <t><xref target="schc-streaming-mode-example-3"/> presents a SCHC Streaming transmission that is closed by the sender using an All-1 message. 
    After the All-1 message, the receiver sends a SCHC Compound ACKs for missing fragments. 
    The sender resends missing fragments and waits for a success SCHC ACK indicating that all SCHC Fragments were correctly received and that current SCHC Streaming transmission can be closed.</t>
  

    <t><figure title="SCHC Streaming mode sequence example 3 - Closed by sender" anchor="schc-streaming-mode-example-3"><artwork><![CDATA[
      Sender                         Receiver
      |-----DTag= 0, W=0, FCN=6 ----->|
      |-----DTag= 0, W=0, FCN=5 ----->|
      |-----DTag= 0, W=0, FCN=4 ----->|
      |-----DTag= 0, W=0, FCN=3 ----->|
      |-----DTag= 0, W=0, FCN=2 --X   |
      |-----DTag= 0, W=0, FCN=1 ----->|
      |-----DTag= 0, W=0, FCN=0 ----->| Bitmap: 1111011
  (no ACK)
      |-----DTag= 0, W=1, FCN=6 ----->|
      |-----DTag= 0, W=1, FCN=5 ----->|
      |-----DTag= 0, W=1, FCN=4 ----->|
      |-----DTag= 0, W=1, FCN=3 ----->|
      |-----DTag= 0, W=1, FCN=2 ----->|
      |-----DTag= 0, W=1, FCN=1 --X   |
      |-----DTag= 0, W=1, FCN=0 ----->| Bitmap: 1111101
  (no ACK)    
      |-----DTag= 0, W=2, FCN=6 ----->|
      |-----DTag= 0, W=2, FCN=5 --X   |
      |-----DTag= 0, W=2, FCN=4 ----->|
      |-----DTag= 0, W=2, FCN=3 ----->|
      |-----DTag= 0, W=2, FCN=2 ----->|
      |-----DTag= 0, W=2, FCN=1 ----->|
      |-----DTag= 0, W=2, FCN=0 ----->| Bitmap: 1011111
  (no ACK)    
      |-----DTag= 0, W=3, FCN=6 ----->|
      |-----DTag= 0, W=3, FCN=5 ----->|
      |-----DTag= 0, W=3, FCN=4 ----->|
      |-----DTag= 0, W=3, FCN=3 ----->|
      |-----DTag= 0, W=3, FCN=2 ----->|
      |-----DTag= 0, W=3, FCN=1 ----->|
      |-----DTag= 0, W=2, FCN=0 ----->| Bitmap: 1011111
  (no ACK)   
                            
  (next Window Cycle)
      |-----DTag= 1, W=0, FCN=6 ----->|
      |-----DTag= 1, W=0, FCN=5 ----->|
      |-----DTag= 1, W=0, FCN=4 ----->|
      |-----DTag= 1, W=0, FCN=3 ----->|
      |-----DTag= 1, W=0, FCN=2 --X   |
      |-----DTag= 1, W=0, FCN=1 ----->|
      |-----DTag= 1, W=0, FCN=0 ----->| Bitmap: 1111011
  (no ACK)
      |-----DTag= 1, W=1, FCN=6 ----->|
      |-----DTag= 1, W=1, FCN=5 ----->|
      |-----DTag= 1, W=1, FCN=4 ----->|
      |-----DTag= 1, W=1, FCN=3 ----->|
      |-----DTag= 1, W=1, FCN=2 ----->|
      |-----DTag= 1, W=1, FCN=1 --X   |
      |-----DTag= 1, W=1, FCN=0 ----->| Bitmap: 1111101
  (no ACK)    
      |-----DTag= 1, W=2, FCN=6 ----->|
      |-----DTag= 1, W=2, FCN=5 --X   |
      |-----DTag= 1, W=2, FCN=4 ----->|
      |-----DTag= 1, W=2, FCN=3 ----->|
      |-----DTag= 1, W=2, FCN=2 ----->|
      |-----DTag= 1, W=2, FCN=1 ----->|
      |-----DTag= 1, W=2, FCN=0 ----->| Bitmap: 1011111
  (no ACK)    
      |-----DTag= 1, W=3, FCN=6 ----->|
      |--DTag= 1, W=3, FCN=7, RCS --->| All-1, Bitmap: 1011111
      
      |<--- DTag= 0, Compound ACK ----| [C=0, W=0 - Bitmap:1111011, W=1 - Bitmap:1111101, W=2 - Bitmap:1011111]
      |-----DTag= 0, W=0, FCN=2 ----->|        
      |-----DTag= 0, W=1, FCN=1 ----->| 
      |-----DTag= 0, W=2, FCN=5 ----->|
      
      |<--- DTag= 1, Compound ACK ----| [C=0, W=0 - Bitmap:1111011, W=1 - Bitmap:1111101, W=2 - Bitmap:1011111]
      |-----DTag= 1, W=0, FCN=2 ----->|        
      |-----DTag= 1, W=1, FCN=1 ----->| 
      |-----DTag= 1, W=2, FCN=5 ----->|
      
      |<--- DTag= 1, ACK, W=3, C=1 ---| C=1
  
    ]]></artwork></figure></t>



<t><xref target="schc-streaming-mode-example-4"/> shows a SCHC Streaming example where the receiver aborts current transmission.</t>


<t><figure title="SCHC Streaming mode sequence example 4 - Aborted by receiver" anchor="schc-streaming-mode-example-4"><artwork><![CDATA[
  Sender                         Receiver
  |-----DTag= 0, W=0, FCN=6 ----->|
  |-----DTag= 0, W=0, FCN=5 ----->|
  |-----DTag= 0, W=0, FCN=4 ----->|
  |-----DTag= 0, W=0, FCN=3 ----->|
  |-----DTag= 0, W=0, FCN=2 --X   |
  |-----DTag= 0, W=0, FCN=1 ----->|
  |-----DTag= 0, W=0, FCN=0 ----->| Bitmap: 1111011
(no ACK)
  |-----DTag= 0, W=1, FCN=6 ----->|
  |-----DTag= 0, W=1, FCN=5 ----->|
  |-----DTag= 0, W=1, FCN=4 ----->|
  |-----DTag= 0, W=1, FCN=3 ----->|
  |-----DTag= 0, W=1, FCN=2 ----->|
  |-----DTag= 0, W=1, FCN=1 --X   |
  |-----DTag= 0, W=1, FCN=0 ----->| Bitmap: 1111101
(no ACK)    
  |-----DTag= 0, W=2, FCN=6 ----->|
  |-----DTag= 0, W=2, FCN=5 --X   |
  |-----DTag= 0, W=2, FCN=4 ----->|
  |-----DTag= 0, W=2, FCN=3 ----->|
  |-----DTag= 0, W=2, FCN=2 ----->|
  |-----DTag= 0, W=2, FCN=1 ----->|
  |-----DTag= 0, W=2, FCN=0 ----->| Bitmap: 1011111
(no ACK)    
  |-----DTag= 0, W=3, FCN=6 ----->|
  |-----DTag= 0, W=3, FCN=5 ----->|
  |-----DTag= 0, W=3, FCN=4 ----->|
  |-----DTag= 0, W=3, FCN=3 ----->|
  |-----DTag= 0, W=3, FCN=2 ----->|
  |-----DTag= 0, W=3, FCN=1 ----->|
  |-----DTag= 0, W=2, FCN=0 ----->| Bitmap: 1011111
(no ACK)   
                        
(next Window Cycle)
  |-----DTag= 1, W=0, FCN=6 ----->|
  |-----DTag= 1, W=0, FCN=5 ----->|
  |-----DTag= 1, W=0, FCN=4 ----->|
  |-----DTag= 1, W=0, FCN=3 ----->|
  |-----DTag= 1, W=0, FCN=2 --X   |
  |-----DTag= 1, W=0, FCN=1 ----->|
  |-----DTag= 1, W=0, FCN=0 ----->| Bitmap: 1111011
(no ACK)
  |-----DTag= 1, W=1, FCN=6 ----->|
  |-----DTag= 1, W=1, FCN=5 ----->|
  |-----DTag= 1, W=1, FCN=4 ----->|
  |-----DTag= 1, W=1, FCN=3 ----->|
  |-----DTag= 1, W=1, FCN=2 ----->|
  |-----DTag= 1, W=1, FCN=1 --X   |
  |-----DTag= 1, W=1, FCN=0 ----->| Bitmap: 1111101
(no ACK)    
  |-----DTag= 1, W=2, FCN=6 ----->|
  |-----DTag= 1, W=2, FCN=5 --X   |
  |-----DTag= 1, W=2, FCN=4 ----->|
  |-----DTag= 1, W=2, FCN=3 ----->|
  |-----DTag= 1, W=2, FCN=2 ----->|
  |-----DTag= 1, W=2, FCN=1 ----->|
  |-----DTag= 1, W=2, FCN=0 ----->| Bitmap: 1011111
(no ACK) 
  |<--------- RECV ABORT ---------|    

]]></artwork></figure></t>

</section>

<section anchor="schc-streaming-mode-yang-model" title="SCHC Streaming mode YANG Data Model">


<t>The present document also extends the SCHC YANG data model defined in <xref target="RFC9363"/> by including
a new identity in the fragmentation mode type. </t>

<section anchor="yang-model" title="SCHC YANG Data Model Extension">
  <t>TBD</t>

<!-- <t><figure title="SCHC YANG Data Model - Compound ACK extension" anchor="schc-data-model"><artwork><![CDATA[

<CODE BEGINS> file "ietf-lpwan-schc-compound-ack@2022-12-02.yang"
   
module ietf-lpwan-schc-compound-ack {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:"
     +"ietf-lpwan-schc-compound-ack";
  prefix schc-compound-ack;

  import ietf-schc {
      prefix schc;
  }

 organization
   "IETF IPv6 over Low Power Wide-Area Networks (lpwan)
    working group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/lpwan/about/>
     WG List:  <mailto:lp-wan@ietf.org>
     Editor:   Laurent Toutain
       <mailto:laurent.toutain@imt-atlantique.fr>
     Editor:   Juan Carlos Zuniga
       <mailto:j.c.zuniga@ieee.org>";
  description
     "
     Copyright (c) 2021 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.
     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Simplified BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).
     This version of this YANG module is part of RFC XXXX
     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.
     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 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.
	 
     ***************************************************************
	 
     This module extends the ietf-schc module to include the 
     Compound ACK behavior for ACK-on-Error as defined in RFC YYYY. 
     It introduces a new leaf for ACK-on-Error defining the format 
     of the SCHC Compound ACK, adding the possibility to send 
     several bitmaps in a single SCHC ACK message.";

  revision 2022-12-02 {
    description
      "Initial version for RFC YYYY ";
    reference
      "RFC YYYY: SCHC Compound ACK";
  }

  identity bitmap-format-base-type {
    description
      "Define how the bitmap is formed in ACK messages.";
  }

  identity bitmap-RFC8724 {
    base bitmap-format-base-type;
    description
      "Bitmap by default as defined in RFC8724.";
  }

  identity bitmap-compound-ack {
    base bitmap-format-base-type;
    description
      "Compound ACK.";
  }

  typedef bitmap-format-type {
    type identityref {
      base bitmap-format-base-type;
    }
    description
      "type used in rules";
  }

  augment "/schc:schc/schc:rule/schc:nature/"
    +"schc:fragmentation/schc:mode/schc:ack-on-error" {
    leaf bitmap-format {
        when "derived-from(../schc:fragmentation-mode,"
        +" 'schc:fragmentation-mode-ack-on-error')";
        type schc-compound-ack:bitmap-format-type;
        default "schc-compound-ack:bitmap-RFC8724";
        description
           "How the bitmaps are included in the"
           +" SCHC ACK message.";
    }
	
	leaf last-bitmap-compression {
	when "derived-from(../schc:fragmentation-mode,"
	+" 'schc:fragmentation-mode-ack-on-error')";
	type boolean;
	default true;
	description 
	    "when true ultimate bitmap in the SCHC ACK message
	     can be compressed";
	}		
		
    description
      "added to SCHC rules";
  }

}

<CODE ENDS>
		
]]></artwork></figure></t> -->


</section>

<section anchor="yang-tree" title="SCHC YANG Tree Extension">
<t>TBD</t>
<!-- <t><figure title="SCHC YANG Tree - Compound ACK extension" anchor="schc-data-tree"><artwork><![CDATA[ -->
  
  
<!-- augment /schc:schc/schc:rule/schc:nature/schc:fragmentation/ -->
        <!-- schc:mode/schc:ack-on-error: -->
    <!-- +rw bitmap-format?   schc-compound-ack:bitmap-format-type -->
	
<!-- ]]></artwork></figure></t> -->

</section>

</section>




<section anchor="security-considerations" title="Security considerations">
<t>TBD</t>
<!-- <t>The current document specifies a message format extension for SCHC. Hence, the same Security Considerations defined in <xref target="RFC8724"/> apply.</t> -->

</section>
<section anchor="ianaconsiderations" title="IANA Considerations">
    <t>This document has no IANA actions.</t>
</section>

<section anchor="acknowledgements" title="Acknowledgements">

<t>Carles Gomez has been funded in part by the Spanish Government
   through the TEC2016-79988-P
   grant, and the PID2019-106808RA-I00 grant (funded by MCIN / AEI / 10.13039/501100011033), and by Secretaria
   d'Universitats i Recerca del Departament d'Empresa i Coneixement de
   la Generalitat de Catalunya 2017 through grant SGR 376.</t>
<t>Sergio Aguilar has been funded by the ERDF and the Spanish Government through project TEC2016-79988-P and project PID2019-106808RA-I00,
AEI/FEDER, EU (funded by MCIN / AEI / 10.13039/501100011033).</t>

</section>


  </middle>

  <back>

   <references title='Normative References'>


<?rfc include='reference.RFC.2119'?>
<?rfc include='reference.RFC.8174'?>
<?rfc include='reference.RFC.9363'?>

<?rfc include='reference.RFC.8724'?>
    </references>


	<references title='Informative References'>
        <?rfc include='reference.RFC.8376'?>

    </references>


  </back>

</rfc>
