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

integer form of addresses uses wrong endianness #4

Open
no-lex opened this issue Feb 1, 2021 · 0 comments
Open

integer form of addresses uses wrong endianness #4

no-lex opened this issue Feb 1, 2021 · 0 comments
Labels
bug When the code doesn't work as intended

Comments

@no-lex
Copy link
Member

no-lex commented Feb 1, 2021

For example, when querying the the host of 127.0.0.1 the result is 16777343, or 1x2^24 + 127x2^0. This value corresponds to the IP of 1.0.0.127. This is caused because network endianness is big-endian while x86 and other common architectures are little-endian.

@no-lex no-lex added the bug When the code doesn't work as intended label Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug When the code doesn't work as intended
Projects
None yet
Development

No branches or pull requests

1 participant