Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
All Coded Packets have a sequence number that identifies their sending order. The sequence number uniquely identifies each datagram sent by the Sender. The sequence number value is increased by one for each Coded Packet that was sent. Retransmitted packets can have a different coded sequence number. The full resolution of a sequence number is 64 bit.
To reduce the payload size of sending a sequence number in each packet, only the lower 16 bits of the sequence number is sent in a DATA payload. The Receiver SHOULD reconstruct the full sequence number using the technique described below. The active range of sequence numbers in use is limited to (1<< LogWindowSize)-1, where the variable LogWindowSize is specified in the header (section 2.2.2.1.2) and has a maximum value of 15. So, the active range of the sequence numbers is limited to 32,767. This ensures that the full sequence number can be recovered without ambiguity using a nearby reference sequence number, which should be the sequence number of the last packet sent by the Sender or the sequence number of the last packet received by the Receiver.
Form a candidate sequence number by combining the higher 16 bits taken from the reference sequence number and the received sequence number's lower 16 bits.
Compare the candidate sequence number with the reference sequence number as follows:
If candidate sequence number is higher by more than 0x8000, subtract 0x10000 from the candidate sequence number.
If candidate sequence number is lower by more than 0x8000, add 0x10000 to the candidate sequence number.
Example 1: The Sender generates a sequence number of 0x1234ff78 for a new data packet. The DATA payload is sent with the lower 16 bits as sequence number, which is 0xff78. The Receiver has previously inferred a full sequence number of 0x1234ff68 based on the last received 16-bit sequence number of 0xff68. The full sequence number of the current packet is obtained by combining the higher 16 bit from the last inferred sequence number (0x1234) with the lower 16-bit sequence number received in the current packet (0xff78) for a full sequence number of 0x1234ff78. No further action is needed because this sequence number is within a 0x8000 range of the reference sequence number.
Example 2: The Sender generates a sequence number of 0x12350003 for a new data packet. The DATA payload is sent with the lower 16 bits as sequence number, which is 0x0003. The Receiver has previously inferred a full sequence number of 0x1234ff68 based on the last received 16-bit sequence number of 0xff68. The candidate sequence number of the current packet is obtained by combining the higher 16 bit from the last inferred sequence number (0x1234) with the lower 16-bit sequence number received in the current packet (0x0003) for a full sequence number of 0x12340003. Because the candidate sequence number is 0x8000 less than the last known full sequence number (0x1234ff68), 0x10000 is added to the candidate sequence number to generate the corrected full sequence number of 0x12350003.