Endianness and comparing IP's
Iain Sandoe
iain at sandoe.co.uk
Sat Jan 6 11:22:33 EST 2001
I wrote:
> IIRC IP addresses are defined as big-endian in which case they should not
> need swapping for PPC.
sorry, that's not very helpful...
more to the point is that there are a set of macros/functions designed for
this purpose (try man htons)... which avoids thinking to hard about
transferring between endian-ness of machines.
I'm not sure why the BSWAP32 is being used instead of one of the network
macros... maybe a red-herring but...
Iain.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev
mailing list