Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

/proc/net/tcp

615 views
Skip to first unread message

Jeremia d.

unread,
Feb 12, 2001, 4:33:58 PM2/12/01
to
Ok I understand converting the port but I am still stuck on the ip address part, any help will be appreciated..

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.
 

 

Jeremia d.

unread,
Feb 12, 2001, 4:21:01 PM2/12/01
to

jose nazario

unread,
Feb 13, 2001, 11:24:35 AM2/13/01
to
"Jeremia d." wrote:

> 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

Eric Schultz

unread,
Feb 24, 2001, 7:33:47 PM2/24/01
to
It appears to me that you don't understand the part "reverse ordering
of the bytes". Using your example:

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

Jeremia d.

unread,
Feb 25, 2001, 10:17:58 AM2/25/01
to

-- http://www.oreillynet.com/lpt/a/461 - Exploirng /proc/net

0 new messages