Skip to main content.
home | support | download

Back to List Archive

RE: Re: Document properties

Date: Fri Sep 03 1999 - 09:03:07 GMT
Thanks for the plugs. I see it can make the code much simpler.
If I have time I will update it with htons and ntohs.

-----Original Message-----
From: []
Sent: 3 septembre 1999 04:35
Subject: [SWISH-E] Re: Document properties

>> big endian without a formal proof - anyone to confim this?
> I don't know, it's not in the man page, and no one I ask knows.  If you
> want to write portable code, use network order.  It will be easier to

Here is documentation on the network byte-order conversion functions in the
GNU C Library.

_BIG_ENDIAN and _LITTLE_ENDIAN are macros provided by many compilers.  They
shouldn't be necessary if the htonl, htons, ntohl, and ntohs functions are
usable across platforms.

As a note: The network byte order is big endian.  Intel 16/32-bit 80x86 
are little endian; SUN SPARCs and Compaq Alpha are big endian; Motorola/IBM
PowerPC, Intel ArmStrong (8096x), Intel IA-64 (64-bit Pentium or whatever),
and other newer CPUs are swappable between big or little endian in hardware
depending on the operating system's requirements.  (Furthermore, 64-bit
Linux runs as little endian on IA-64 while it runs as big endian on Alpha
and SPARC.)

,David Norris

World Wide Web -
Page via mail -
ICQ Universal Internet Number - 412039
E-Mail -
Received on Fri Sep 3 01:57:52 1999