target = "https://www.rfc-editor.org/rfc/rfc9000#section-19.3.1" # 19.3.1. ACK Ranges # # Each ACK Range consists of alternating Gap and ACK Range Length # values in descending packet number order. ACK Ranges can be # repeated. The number of Gap and ACK Range Length values is # determined by the ACK Range Count field; one of each value is present # for each value in the ACK Range Count field. # # ACK Ranges are structured as shown in Figure 26. # # ACK Range { # Gap (i), # ACK Range Length (i), # } # # Figure 26: ACK Ranges # # The fields that form each ACK Range are: # # Gap: A variable-length integer indicating the number of contiguous # unacknowledged packets preceding the packet number one lower than # the smallest in the preceding ACK Range. # # ACK Range Length: A variable-length integer indicating the number of # contiguous acknowledged packets preceding the largest packet # number, as determined by the preceding Gap. # # Gap and ACK Range Length values use a relative integer encoding for # efficiency. Though each encoded value is positive, the values are # subtracted, so that each ACK Range describes progressively lower- # numbered packets. # # Each ACK Range acknowledges a contiguous range of packets by # indicating the number of acknowledged packets that precede the # largest packet number in that range. A value of 0 indicates that # only the largest packet number is acknowledged. Larger ACK Range # values indicate a larger range, with corresponding lower values for # the smallest packet number in the range. Thus, given a largest # packet number for the range, the smallest value is determined by the # following formula: # # smallest = largest - ack_range # # An ACK Range acknowledges all packets between the smallest packet # number and the largest, inclusive. # # The largest value for an ACK Range is determined by cumulatively # subtracting the size of all preceding ACK Range Lengths and Gaps. # # Each Gap indicates a range of packets that are not being # acknowledged. The number of packets in the gap is one higher than # the encoded value of the Gap field. # # The value of the Gap field establishes the largest packet number # value for the subsequent ACK Range using the following formula: # # largest = previous_smallest - gap - 2 # # If any computed packet number is negative, an endpoint MUST generate # a connection error of type FRAME_ENCODING_ERROR. [[spec]] level = "MUST" quote = ''' If any computed packet number is negative, an endpoint MUST generate a connection error of type FRAME_ENCODING_ERROR. '''