Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions about Packet Number Encoding And Decoding #3002

Closed
Ainiroad opened this issue Sep 3, 2019 · 3 comments
Closed

Some questions about Packet Number Encoding And Decoding #3002

Ainiroad opened this issue Sep 3, 2019 · 3 comments
Labels
invalid A duplicate, overcome-by-events, ill-formed, or off-topic issue, or a question better asked on-list.

Comments

@Ainiroad
Copy link

Ainiroad commented Sep 3, 2019

Thank you guys a lot! I have some questions about Packet Number Encoding And Decoding

In transport draft Section 17.1. Packet Number Encoding and Decoding

For example, if an endpoint has received an acknowledgment for packet 0xabe8bc, sending a packet with a number of 0xac5c02 requires a packet number encoding with 16 bits or more; whereas the 24-bit packet number encoding is needed to send a packet with a number of 0xace8fe.

  1. What's the purpose of Packet Number Encoding? to be safe or save some bits space or something else?

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.

  1. How can an endpoint know to use a large enough packet number encoding? For example, as example 1 said, an endpoint can send 16 bits to send a number of 0xac5c02 if peer has received an acknowledgment for packet 0xabe8bc, which means it will send 0x5c02. So in the early time when it want to send 0x5c02 exactly(not 0xac5c02), How should it encode packet number to avoid conflict with 0xac5c02 if the packet is delay so much.

  2. If an endpoint is not encoded packet number well, the peer will recover it as a wrong packet number, what happens next?

@martinthomson
Copy link
Member

@Ainiroad I'd like to request that you take these questions to our mailing list. This issue list really isn't the best place for this sort of query.

@martinthomson martinthomson added the invalid A duplicate, overcome-by-events, ill-formed, or off-topic issue, or a question better asked on-list. label Sep 3, 2019
@Ainiroad
Copy link
Author

Ainiroad commented Sep 3, 2019

Sorry for that!
Thanks!

@martinthomson
Copy link
Member

No worries. As our contributing doc says, we use this to track issues, not as a general discussion forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid A duplicate, overcome-by-events, ill-formed, or off-topic issue, or a question better asked on-list.
Projects
None yet
Development

No branches or pull requests

2 participants