/proc/net/tcp format question

thoth@purplefrog.com
Thu, 06 Mar 1997 11:29:50 EST


Prompted by a few postings to this list, I did a cat /proc/net/tcp on my
intel box and proceeded to analyze the output. The thing that got my
attention was the fact that

*) port numbers are printed MSB->LSB as if someone did a printf("%04x",
portnum);
*) internet numbers are printed LSB-)MSB as if someone was dumping the bytes
one-by-one.

Damn non-network-byte-order intel architecture.

Lord knows what would break if you made the two consistent (either both host
order or both network order; I'd prefer the latter).

---
Bob Forsman                                   thoth@gainesville.fl.us
           http://www.gainesville.fl.us/~thoth/