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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



k8 s <[email protected]> writes:

> Hello,
>
> The following definition in linux/include/ip.h is creating problems.
>
> How does Endianness affect BIT ORDER 
> IT affetc only  BYTE ORDER

Bit order and byte order are independent properties of the architecture.
That's why they are configured with different macros.

> ------------------------------------------------------------------------
> struct iphdr {
> #if defined(__LITTLE_ENDIAN_BITFIELD)
>         __u8    ihl:4,
>                 version:4;
> #elif defined (__BIG_ENDIAN_BITFIELD)
>         __u8    version:4,
>                 ihl:4;
> --------------------------------------------------------------------------
> Here I have a network device which works on both little endian and big
> endian machines.
> I found out that the driver of the device was saying unrecognizable
> packet when i assign

The you probably didn't define the right macro of the ones referenced
above.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux