Could somebody explain the conversion of the output of this file?
Like O'Reilly's example
0100007F:0017 = rem_address
then they reverse the ordering of the bytes in the IP address part.
7F000001:0017
Then they seperate the bytes of the address
7F 00 00 01 : 0017
Then hexadecimal-to-decimal conversion on each:
127 0 0 1 : 23
-- A little experience often upsets a lot of theory.
> Ok I understand converting the port but I am still stuck on the ip
> address part, any help will be appreciated..
honestly, i'm stuck trying to see where you're stuck. yo useem to
understand hex -> decimal conversions. is it the ordering of the network
address that's confusing you?
jose nazario jo...@cwru.edu
0100007F:0017
So the IP address is 0100007F . Remember that each two hexadecimal
digits represent one byte. So a better way of illustrating how they
reverse it would be to first break the address into bytes:
01 00 00 7F
So when you reverse it, you get:
7F 00 00 01
Remember the reversal is happening on each entire byte, which is
comprised of two hexadecimal digits. I bet you were expecting the
reversal to be exact, like F7000010. I hope that this clears it up
for you.
Eric Schultz
System Administrator
Defunct Company.com