From: "Phoebe Buckheister" <phoebe.buckheis...@itwm.fraunhofer.de>
Date: Wed, 5 Mar 2014 02:01:52 +0100

> That's the thing - there are so many different byte orders floating around
> at the moment. Network byte order is little endian. Hardware addresses are
> big endian in the network layer and 6lowpan though, and our sockaddrs are
> host byte order for some parts and big endian for others. It's a real
> mess. The solution in my patch seemed the cleanest option to me.
> 
> Storing *everything* in network byte order would require a small adaption
> layer at every interaction with userspace to fix byte ordering, but that's
> doable. 6lowpan would have to do an extra byteswap for the address that I
> currently do in the header ops.

That's an odd choice, since ipv4/ipv6 universally put things in network
byte order in the sockaddrs.

But since it's been made already, you want to still use network byte
order internally in the stack.  Because you're going to process more
packets than you are going to be handling user sockaddrs.

Translate the values to network byte order on bind() etc. calls and
just be done with it.

------------------------------------------------------------------------------
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

Reply via email to