On Wed, 05 Mar 2014 19:39:13 -0500 (EST) David Miller <da...@redhat.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. ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel