lkml.org 
[lkml]   [2004]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] netpoll endian fixes
Date
On Wednesday 08 September 2004 01:29, Matt Mackall wrote:
> On Wed, Sep 08, 2004 at 01:24:43AM +0200, Duncan Sands wrote:
> > The big-endians took their revenge in netpoll.c: on i386,
> > the ip header length / version nibbles need to be the other
> > way round; and the htonl leaves only zeros in tot_len...
>
> I'm completely baffled as to how length / version nibbles could be
> swapped. Endianness here should be a matter of _bytes_.

I also don't understand it. The definition of struct iphdr contains:

#if defined(__LITTLE_ENDIAN_BITFIELD)
__u8 ihl:4,
version:4;
#elif defined (__BIG_ENDIAN_BITFIELD)
__u8 version:4,
ihl:4;

What does it mean?

All the best,

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

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.106 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site