Skip to content

Commit

Permalink
Restore the comment in the original text
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeBishop authored and martinthomson committed Nov 4, 2020
1 parent cc68411 commit da88b36
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions draft-ietf-quic-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -4430,9 +4430,12 @@ sent. A peer receiving the packet will then correctly decode the packet number,
unless the packet is delayed in transit such that it arrives after many
higher-numbered packets have been received. An endpoint SHOULD use a large
enough packet number encoding to allow the packet number to be recovered even if
the packet arrives after packets that are sent afterwards. Pseudo-code and
examples for packet number encoding can be found in
{{sample-packet-number-encoding}}.
the packet arrives after packets that are sent afterwards.

As a result, the size of the packet number encoding is at least one bit more
than the base-2 logarithm of the number of contiguous unacknowledged packet
numbers, including the new packet. Pseudo-code and examples for packet number
encoding can be found in {{sample-packet-number-encoding}}.

At a receiver, protection of the packet number is removed prior to recovering
the full packet number. The full packet number is then reconstructed based on
Expand Down Expand Up @@ -7492,8 +7495,8 @@ EncodePacketNumber(full_pn, largest_acked):
min_bits = log(num_unacked, 2) + 1
num_bytes = ceil(min_bits / 8)

// Encode the integer value and truncate to the
// num_bytes least-significant bytes.
// Encode the integer value and truncate to
// the num_bytes least-significant bytes.
return encode(full_pn, num_bytes)
~~~
{: #alg-encode-pn title="Sample Packet Number Encoding Algorithm"}
Expand Down

0 comments on commit da88b36

Please sign in to comment.