Skip to main content

3.2.1.1. Sender Behavior (Replaces Section 8.4.3.1, RFC 8724)

3.2.1.1. Sender Behavior

At the beginning of the fragmentation of a new SCHC Packet:

  • the fragment sender MUST select a RuleID and DTag value pair for this SCHC Packet. A Rule MUST NOT be selected if the values of M and WINDOW_SIZE for that Rule are such that the SCHC Packet cannot be fragmented in (2^M) * WINDOW_SIZE tiles or less.

  • the fragment sender MUST initialize the Attempts counter to 0 for that RuleID and DTag value pair.

A Regular SCHC Fragment message carries in its payload one or more tiles. If more than one tile is carried in one Regular SCHC Fragment:

  • the selected tiles MUST be contiguous in the original SCHC Packet, and

  • they MUST be placed in the SCHC Fragment Payload adjacent to one another, in the order they appear in the SCHC Packet, from the start of the SCHC Packet toward its end.

Tiles that are not the last one MUST be sent in Regular SCHC Fragments as specified in Section 8.3.1.1. The FCN field MUST contain the tile index of the first tile sent in that SCHC Fragment.

In a Regular SCHC Fragment message, the sender MUST fill the W field with the window number of the first tile sent in that SCHC Fragment.

A Profile MUST define if the last tile of a SCHC Packet is sent:

  • in a Regular SCHC Fragment, alone or as part of a multi-tiles Payload,

  • alone in an All-1 SCHC Fragment, or

  • with either one of the above two methods.

In an All-1 SCHC Fragment message, the sender MUST fill the W field with the window number of the last tile of the SCHC Packet.

The fragment sender MUST send SCHC Fragments such that, all together, they contain all the tiles of the fragmented SCHC Packet.

The fragment sender MUST send at least one All-1 SCHC Fragment.

In doing the two items above, the sender MUST ascertain that the receiver will not receive the last tile through both a Regular SCHC Fragment and an All-1 SCHC Fragment.

The fragment sender MUST listen for SCHC Compound ACK messages after having sent:

  • an All-1 SCHC Fragment or

  • a SCHC ACK REQ.

A Profile MAY specify other times at which the fragment sender MUST listen for SCHC Compound ACK messages. For example, this could be after sending a complete window of tiles.

Each time a fragment sender sends an All-1 SCHC Fragment or a SCHC ACK REQ:

  • it MUST increment the Attempts counter, and

  • it MUST reset the Retransmission Timer.

On Retransmission Timer expiration:

  • if the Attempts counter is strictly less than MAX_ACK_REQUESTS, the fragment sender MUST send either the All-1 SCHC Fragment or a SCHC ACK REQ with the W field corresponding to the last window,

  • otherwise, the fragment sender MUST send a SCHC Sender-Abort, and it MAY exit with an error condition.

All message receptions being discussed in the rest of this section are to be understood as "matching the RuleID and DTag pair being processed", even if not spelled out, for brevity.

On receiving a SCHC Compound ACK:

  • if one of the W fields in the SCHC Compound ACK corresponds to the last window of the SCHC Packet:

    • if the C bit is set, the sender MAY exit successfully.

    • otherwise:

      • if the Profile mandates that the last tile be sent in an All-1 SCHC Fragment:

        • if the SCHC Compound ACK shows no missing tile at the receiver, the sender:

          • MUST send a SCHC Sender-Abort and

          • MAY exit with an error condition.

        • otherwise:

          • the fragment sender MUST send SCHC Fragment messages containing all the tiles of all the windows that are reported missing in the SCHC Compound ACK.

          • if the last of these SCHC Fragment messages is not an All-1 SCHC Fragment, then the fragment sender MAY either send, in addition, a SCHC ACK REQ with the W field corresponding to the last window or repeat the All-1 SCHC Fragment to ask the receiver to confirm that all tiles have been correctly received.

          • in doing the two items above, the sender MUST ascertain that the receiver will not receive the last tile through both a Regular SCHC Fragment and an All-1 SCHC Fragment.

      • otherwise:

        • if the SCHC Compound ACK shows no missing tile at the receiver, the sender MUST send the All-1 SCHC Fragment

        • otherwise:

          • the fragment sender MUST send SCHC Fragment messages containing all the tiles that are reported missing in the SCHC Compound ACK.

          • the fragment sender MUST then send either the All-1 SCHC Fragment or a SCHC ACK REQ with the W field corresponding to the last window.

  • otherwise, the fragment sender:

    • MUST send SCHC Fragment messages containing the tiles that are reported missing in the SCHC Compound ACK.

    • then, it MAY send a SCHC ACK REQ with the W field corresponding to the last window.

See Figure 43 of RFC 8724 for one among several possible examples of a Finite State Machine implementing a sender behavior obeying this specification.