<commit_before>CCNx Link Messages
==================

In some cases it may be advantageous for adjacent nodes to exchange
some extra information beyond the Interest and ContentObject messages
themselves, for the purpose of making the overall operation more efficient.
We call these *link messages*, and describe them here.

== SequenceNumber
.......................................................
SequenceNumber ::= BLOB
.......................................................

The *SequenceNumber* message may be included in a series of messages.
The primary use of this message is when unreliable datagrams are being used as a transport.
The BLOB is interpreted as a binary number in network byte order (i.e., big endian).
Typically, one SequenceNumber message would be included in each datagram,
with the value being advanced by one.
This allows the receiving side to detect gaps in the sequence, an indication
of missing or reordered packets.

The starting value and BLOB size are chosen by the sending side.
The value should to wrap back to zero after the maximum value for the chosen
BLOB size has been reached.
The BLOB size should remain consistent on a given link, except that it may
change when the value wraps to zero.
The minimum BLOB size is one byte, and the maximum is 8 bytes.

== SequenceAcknowledgement
.......................................................
SequenceAcknowledgement ::= BLOB
.......................................................
The *SequenceAcknowledgement* acknowledges the receipt of a consecutive series of SequenceNumber messages.

The first byte of the BLOB is a count, indicating how many items are in the series.
The remaining bytes of the BLOB encode the highest sequence number in the series,
using the same number of bytes as in the received SequenceNumber message.
The acknowledged range should not span the wrap back to zero.
<commit_msg>Relax the spec of SequenceNumber to allow restarting the sequence.  Reorder pieces of SequenceAcknowledgement blob to simplify parsing as binary number.  Cap sequence number size at 6 bytes.  refs #100275<commit_after>CCNx Link Messages
==================

In some cases it may be advantageous for adjacent nodes to exchange
some extra information beyond the Interest and ContentObject messages
themselves, for the purpose of making the overall operation more efficient.
We call these *link messages*, and describe them here.

== SequenceNumber
.......................................................
SequenceNumber ::= BLOB
.......................................................

The *SequenceNumber* message may be included in a series of messages.
The primary use of this message is when unreliable datagrams are being used as a transport.
The BLOB is interpreted as a binary number in network byte order (i.e., big endian).
Typically, one SequenceNumber message would be included in each datagram,
with the value being advanced by one.
This allows the receiving side to detect gaps in the sequence, an indication
of missing or reordered packets.

The starting value is chosen by the sending side.
The sending side may choose to restart the sequence at a different point.
To minimize confusion, the new origin should differ from the last-used sequence number by a value of at least 255.

The minimum BLOB size is one byte, and the maximum is 6 bytes.

== SequenceAcknowledgement
.......................................................
SequenceAcknowledgement ::= BLOB
.......................................................
The *SequenceAcknowledgement* acknowledges the receipt of a consecutive series of SequenceNumber messages.

The final byte of the BLOB is a count, indicating how many items are in the series.
The leading bytes of the BLOB encode the highest sequence number in the series.
The acknowledged range should not span a wrap back to zero.

{'fraction_non_alphanumeric': 0.14964925954793454, 'fraction_numerical': 0.003117692907248636, 'mean_word_length': 2.712632594021215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5370810', 'n_tokens_mistral': 840, 'n_tokens_neox': 791, 'n_words': 524}