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

Background info to header overhead constants? #3

Open
daluu opened this issue Sep 29, 2022 · 1 comment
Open

Background info to header overhead constants? #3

daluu opened this issue Sep 29, 2022 · 1 comment

Comments

@daluu
Copy link

daluu commented Sep 29, 2022

RE the current constant values in https://github.com/cevatbarisyilmaz/lossy/blob/master/lossy.go, it would be nice if there was some documentation that explained the derivation of these constant values.

@cevatbarisyilmaz
Copy link
Owner

Hello, you can check the minumum and maximum header size for IPv4 here https://en.wikipedia.org/wiki/IPv4#Packet_structure
in the secition for Internet Header Length. And for IPv6 here: https://en.wikipedia.org/wiki/IPv6_packet#Fixed_header

Rest of the UDP values are just the addition of UDP header size (8) to respective IP header sizes. https://en.wikipedia.org/wiki/User_Datagram_Protocol#UDP_datagram_structure

Will improve the documentation in the future. Feel free to create a PR yourself as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants