Re: struct iphdr in include/linux/ip.h (probably bug in headerfile)

From: Alan Cox
Date: Tue Jun 21 2005 - 07:41:51 EST


On Maw, 2005-06-21 at 08:15, k8 s wrote:
> Hello,
>
> The following definition in linux/include/ip.h is creating problems.
>
> How does Endianness affect BIT ORDER
> IT affetc only BYTE ORDER

Bitfield order is a compiler property. Byte order is usually a processor
property and the two are not exactly connected.

A compiler given two bit fields can pack them from the high bit or from
the low bit and may do different things depending on the platform. The
defines tell the kernel whether the compiler packs bitfields into the
low bits first or the high bits first.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/