3.1. SCHC Compound ACK Message Format
3.1. SCHC Compound ACK Message Format
Figure 1 shows the success SCHC ACK format, i.e., when all fragments have been correctly received (C=1), as defined in [RFC8724].
|--- SCHC ACK Header ---|
| |--T-|--M--| 1 |
+--------+----+-----+---+~~~~~~~~~~~~~~~~~~
| RuleID |DTag| W |C=1| padding as needed
+--------+----+-----+---+~~~~~~~~~~~~~~~~~~
Figure 1: SCHC Success ACK Message Format, as Defined in RFC 8724
In case SCHC Fragment losses are found in any of the windows of the SCHC Packet, the SCHC Compound ACK MAY be used. The SCHC Compound ACK message format is shown in Figures 2 and 3.
|--- SCHC ACK Header --|- W=w1 -|...|---- W=wi -----|
|--T-|---M--|-1-| |...|---M--| |---M--|
+------+----+------+---+--------+...+------+--------+------+~~~~~+
|RuleID|DTag| W=w1 |C=0| Bitmap |...| W=wi | Bitmap |00..00| pad |
+------+----+------+---+--------+...+------+--------+------+~~~~~+
next L2 Word boundary ->|<-- L2 Word ->|
Figure 2: SCHC Compound ACK Message Format. Losses are found in windows W = w1,...,wi, where w1 < w2 <...< wi.
The SCHC Compound ACK groups the window number (W) with its corresponding bitmap. Window numbers do not need to be contiguous. However, the window numbers and their corresponding bitmaps included in the SCHC Compound ACK message MUST be ordered from the lowest-numbered to the highest-numbered window. Hence, if the bitmap of window number zero is present in the SCHC Compound ACK message, it MUST always be the first one in order and its window number MUST be placed in the SCHC ACK Header.
If M or more padding bits would be needed after the last bitmap in the message to fill the last layer two (L2) Word, M bits at 0 MUST be appended after the last bitmap, and then padding is applied as needed (see Figure 2). Since window number 0 (if present in the message) is placed as w1, the M bits set to zero can't be confused with window number 0; therefore, they signal the end of the SCHC Compound ACK message.
Figure 3 shows the case when the required padding bits are strictly less than M bits. In this case, the L2 Maximum Transmission Unit (MTU) does not leave room for any extra window value, let alone any bitmap, thereby signaling the end of the SCHC Compound ACK message.
|--- SCHC ACK Header --|- W=w1 -|...|---- W=wi -----|
|--T-|---M--|-1-| |...|---M--| |---M--|
+------+----+------+---+--------+...+------+--------+~~~+
|RuleID|DTag| W=w1 |C=0| Bitmap |...| W=wi | Bitmap |pad|
+------+----+------+---+--------+...+------+--------+~~~+
next L2 Word boundary ->|
Figure 3: SCHC Compound ACK Message Format with Less than M Padding Bits. Losses are found in windows W = w1,...,wi, where w1 < w2 <...< wi.
The SCHC Compound ACK MUST NOT use the Compressed Bitmap format for intermediate windows/bitmaps (i.e., bitmaps that are not the last one of the SCHC Compound ACK message); therefore, intermediate bitmap fields MUST be of size WINDOW_SIZE. Hence, the SCHC Compound ACK MAY use a Compressed Bitmap format only for the last bitmap in the message. The optional usage of this Compressed Bitmap for the last bitmap MUST be specified by the technology-specific SCHC Profile.
The case where the last bitmap is effectively compressed corresponds to Figure 3, with the last bitmap ending (by construction) on an L2 Word boundary, therefore resulting in no padding at all.
Figure 4 illustrates a bitmap compression example of a SCHC Compound ACK, where the bitmap of the last window (wi) indicates that the first tile has not been correctly received. Because the compression algorithm resulted in effective compression, no padding is needed.
|--- SCHC ACK Header --|- W=w1 -|...|-------- W=wi -------|
|--T-|---M--|-1-| |...|---M--|
+------+----+------+---+--------+...+------+--------------+
|RuleID|DTag| W=w1 |C=0| Bitmap |...| W=wi |0 1 1 1 1 1 1 |
+------+----+------+---+--------+...+------+--------------+
next L2 Word boundary ->|
SCHC Compound ACK with Uncompressed Bitmap
|--- SCHC ACK Header --|- W=w1 -|...|-- W=wi --|
|--T-|---M--|-1-| |...|---M--|
+------+----+------+---+--------+...+------+---+
|RuleID|DTag| W=w1 |C=0| Bitmap |...| W=wi |0 1|
+------+----+------+---+--------+...+------+---+
next L2 Word boundary ->|
Transmitted SCHC Compound ACK with Compressed Bitmap
Figure 4: SCHC Compound ACK Message Format with Compressed Bitmap and No Padding Added. Losses are found in windows W = w1,...,wi, where w1 < w2 <...< wi.
Figure 5 illustrates another bitmap compression example of a SCHC Compound ACK, where the bitmap of the last window (wi) indicates that the second and the fourth tiles have not been correctly received. In this example, the compression algorithm does not result in effective compression of the last bitmap. Besides, because more than M bits of padding would be needed to fill the last L2 Word, M bits at 0 are appended to the message before padding is applied.
|--- SCHC ACK Header --|-W=w1-|...|-------- W=wi -------|
|--T-|---M--|-1-| |...|---M--|
+------+----+------+---+------+...+------+--------------+
|RuleID|DTag| W=w1 |C=0|Bitmap|...| W=wi |1 0 1 0 1 1 1 |
+------+----+------+---+------+...+------+--------------+
next L2 Word boundary ->|
SCHC Compound ACK with Uncompressed Bitmap
|--- SCHC ACK Header --|-W=w1-|...|-------- W=wi -------|
|--T-|---M--|-1-| |...|---M--| |---M--|
+------+----+------+---+------+...+------+--------------+------+~~~+
|RuleID|DTag| W=w1 |C=0|Bitmap|...| W=wi |1 0 1 0 1 1 1 |00..00|pad|
+------+----+------+---+------+...+------+--------------+------+~~~+
next L2 Word boundary ->|<------ L2 Word ------>|
Transmitted SCHC Compound ACK
Figure 5: SCHC Compound ACK Message Format with Compressed Bitmap and Padding Added to Reach the L2 Boundary. Losses are found in windows W = w1,...,wi, where w1 < w2 <...<wi.
If a SCHC sender gets a SCHC Compound ACK with invalid window numbers, such as duplicate W values or W values not sent yet, it MUST discard the whole SCHC Compound ACK message.
Note: SCHC Compound ACKs are distinguishable from the Receiver-Abort message in the same way that regular SCHC ACKs are distinguishable, since the Receiver-Abort pattern never occurs in a legitimate SCHC Compound ACK [RFC8724].