[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140306111139.2b7b6b8b@zoidberg>
Date: Thu, 6 Mar 2014 11:11:39 +0100
From: Phoebe Buckheister <phoebe.buckheister@...m.fraunhofer.de>
To: David Miller <davem@...hat.com>
Cc: netdev@...r.kernel.org, linux-zigbee-devel@...ts.sourceforge.net
Subject: Re: [PATCH net-next v4 1/4] ieee802154: add generic header handling
routines
On Wed, 05 Mar 2014 19:39:13 -0500 (EST)
David Miller <davem@...hat.com> wrote:
> This is how we handle some fields of struct iphdr, and it's fine with
> me.
Wonderful, this will unclutter everything that concerns itself with
some degree of header handling.
> Be sure to use __LITTLE_ENDIAN_BITFIELD and __BIG_ENDIAN_BITFIELD for
> your CPP checks.
I looked at struct iphdr now that you mentioned it, and i was a little
surprised to see that this header is often pointer-cast from an
skb_network_header. As far as I can see, declaring all subfields (say)
u16 in the bitfield endianness order when the entire bitfield is a u16
in the header will result in correct behaviour for cast/memcpy. Is this
correct? If not, I'll write out explicit operations for each bitfield
member.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists