From: David Miller <davem@davemloft.net>
To: phoebe.buckheister@itwm.fraunhofer.de
Cc: netdev@vger.kernel.org, linux-zigbee-devel@lists.sourceforge.net
Subject: Re: [PATCH net-next v4 1/4] ieee802154: add generic header handling routines
Date: Tue, 04 Mar 2014 20:09:47 -0500 (EST) [thread overview]
Message-ID: <20140304.200947.355879073064420434.davem@davemloft.net> (raw)
In-Reply-To: <0049a78200f573d8acc64aa879d4412c.squirrel@webmail.itwm.fhg.de>
From: "Phoebe Buckheister" <phoebe.buckheister@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.
next prev parent reply other threads:[~2014-03-05 1:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 14:34 [PATCH net-next v4 0/4] ieee802154: clean up header handling Phoebe Buckheister
[not found] ` <1393943688-24221-1-git-send-email-phoebe.buckheister-mPn0NPGs4xGatNDF+KUbs4QuADTiUCJX@public.gmane.org>
2014-03-04 14:34 ` [PATCH net-next v4 1/4] ieee802154: add generic header handling routines Phoebe Buckheister
2014-03-04 22:00 ` David Miller
2014-03-04 22:16 ` Phoebe Buckheister
2014-03-04 22:20 ` David Miller
2014-03-04 22:49 ` Phoebe Buckheister
2014-03-05 0:23 ` David Miller
[not found] ` <20140304.192309.337489223683931299.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-03-05 1:01 ` Phoebe Buckheister
2014-03-05 1:09 ` David Miller [this message]
2014-03-09 17:59 ` Ben Hutchings
[not found] ` <1394387943.15968.1.camel-nDn/Rdv9kqW9Jme8/bJn5UCKIB8iOfG2tUK59QYPAWc@public.gmane.org>
2014-03-09 22:49 ` David Miller
2014-03-05 19:15 ` Phoebe Buckheister
2014-03-06 0:39 ` David Miller
2014-03-06 10:11 ` Phoebe Buckheister
2014-03-06 18:07 ` David Miller
2014-03-06 18:28 ` Phoebe Buckheister
2014-03-04 14:34 ` [PATCH net-next v4 3/4] ieee802154: remove addresses from mac_cb Phoebe Buckheister
2014-03-04 14:34 ` [PATCH net-next v4 4/4] ieee802154: remove seq member of mac_cb Phoebe Buckheister
2014-03-04 14:34 ` [PATCH net-next v4 2/4] mac802154: use new header ops in wpan devices Phoebe Buckheister
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140304.200947.355879073064420434.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=phoebe.buckheister@itwm.fraunhofer.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).