Post
Topic
Board Development & Technical Discussion
Merits 4 from 2 users
Re: Hex value of ip address why reversed?
by
bob123
on 11/03/2018, 09:32:32 UTC
⭐ Merited by achow101 (2) ,ETFbitcoin (2)
If my real IP address is 175.126.37.238 and this address should be input above, then 0xee257eaf   is correct? Internet site hex to ip
https://www.browserling.com/tools/hex-to-ip
shows this 0xee257eaf  is 238.37.126.175


This is due to Endianness (https://en.wikipedia.org/wiki/Endianness).

When communicating via a network, you don't know how your counterparty is 'reading' the values.
Most significant bit at the most left or most right position?

Big-endian (most significant byte has the lowest address [left-to-right reading]) is also referred to network byte order.
Depending on the system you are using your pc might use big- or low- endian format. But when communicating via network, always big endian is used (IPv4/6, TCP/UDP).

Thats the reason for the mysterious reverse order.