09-16-2001
438,
1
Join Date: Aug 2001
Last Activity: 16 October 2009, 2:04 PM EDT
Location: Virginia, USA
Posts: 438
Thanks Given: 0
Thanked 1 Time in 1 Post
Are you trying to write your own htons/ntohs
functions? If you use these functions when
transferring data across a network between
machines, you don't have to worry about it
since the compiled program will do it correctly
for that hardware architecture.
The rule is:
Network byte order, as used on the
Internet, is Most Significant Byte first.
On the i80x86 the host byte order is Least Significant Byte first.