netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	linux-zigbee-devel@lists.sourceforge.net
Subject: Re: [Linux-zigbee-devel] [PATCH net-next v3 1/4] ieee802154: add generic header handling routines
Date: Tue, 4 Mar 2014 15:14:08 +0100	[thread overview]
Message-ID: <20140304141406.GA4762@omega> (raw)
In-Reply-To: <1393884475-20927-2-git-send-email-phoebe.buckheister@itwm.fraunhofer.de>

Hi Phoebe,

On Mon, Mar 03, 2014 at 11:07:52PM +0100, Phoebe Buckheister wrote:
> Add a generic set of 802.15.4 header operations on sk_buffs: push header
> onto skb, pull header from skb, and peek address fields from the mac_hdr
> part of an skb.
> 
> These routines support the full 802.15.4 header as described in the
> standard, including the security header. They are useful for everything
> that must create, modify or read 802.15.4 headers, which of course
> includes the wpan rx/tx path, but also 6lowpan. In the future,
> link-layer security will also require means to modify packet headers.
> 
> Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
> Tested-by: Alexander Aring <alex.aring@gmail.com>
> ---
> +static int
> +ieee802154_hdr_get_addrs(const u8 *buf, struct ieee802154_hdr *hdr)
> +{
> +	int pos = 0;
> +
> +	pos += ieee802154_hdr_get_addr(buf + pos,
> +				       IEEE802154_FC_DAMODE(hdr->fc),
> +				       false, &hdr->dest);
> +	pos += ieee802154_hdr_get_addr(buf + pos,
> +				       IEEE802154_FC_SAMODE(hdr->fc),
> +				       hdr->fc & IEEE802154_FC_INTRA_PAN,
> +				       &hdr->source);
> +
> +	if (hdr->fc && IEEE802154_FC_INTRA_PAN)
I think this should be:

if (hdr->fc & IEEE802154_FC_INTRA_PAN)

- Alex

  reply	other threads:[~2014-03-04 14:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 22:07 [PATCH net-next v3 0/4] ieee802154: clean up header handling Phoebe Buckheister
     [not found] ` <1393884475-20927-1-git-send-email-phoebe.buckheister-mPn0NPGs4xGatNDF+KUbs4QuADTiUCJX@public.gmane.org>
2014-03-03 22:07   ` [PATCH net-next v3 1/4] ieee802154: add generic header handling routines Phoebe Buckheister
2014-03-04 14:14     ` Alexander Aring [this message]
2014-03-03 22:07   ` [PATCH net-next v3 2/4] mac802154: use new header ops in wpan devices Phoebe Buckheister
2014-03-03 22:07   ` [PATCH net-next v3 3/4] ieee802154: remove addresses from mac_cb Phoebe Buckheister
2014-03-03 22:07   ` [PATCH net-next v3 4/4] ieee802154: remove seq member of mac_cb 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=20140304141406.GA4762@omega \
    --to=alex.aring@gmail.com \
    --cc=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).