From: Alexander Aring <alex.aring@gmail.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-wpan@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH bluetooth-next 1/3] ieee802154: 6lowpan: fix ARPHRD to ARPHRD_6LOWPAN
Date: Mon, 2 Mar 2015 15:29:36 +0100 [thread overview]
Message-ID: <20150302142933.GB2314@omega> (raw)
In-Reply-To: <54F470D2.30703@pengutronix.de>
Hi Marc,
On Mon, Mar 02, 2015 at 03:16:50PM +0100, Marc Kleine-Budde wrote:
> On 03/02/2015 03:10 PM, Alexander Aring wrote:
> > Currently there exists two interface types with ARPHRD_IEEE802154. These
> > are the 802.15.4 interfaces and 802.15.4 6LoWPAN interfaces. This is
> > more a bug because some userspace applications checks on this value like
> > wireshark. This occurs that wireshark will always try to parse a lowpan
> > interface as 802.15.4 frames. With ARPHRD_6LOWPAN wireshark will parse
> > it as IPv6 frames which is correct.
> >
> > Much applications checks on this value to readout the EUI64 mac address
> > which should be the same for ARPHRD_6LOWPAN. BTLE 6LoWPAN and ieee802154
> > 6LoWPAN will share now the same ARPHRD.
>
> Does this have effects on libpcap/tcpdump and/or wireshark?
>
The define ARPHRD_6LOWPAN is UAPI. It has effects on every application
which checks on the previous type ARPHRD_IEEE802154, but we can't still
longer use the same type for two interfaces which should be different.
Examples from my previous mail which was marked as RFC:
A little list of applications which need to update afterwards this
patch:
- radvd [0]
- unstrung [1]
[0] https://github.com/reubenhwk/radvd/blob/master/device-linux.c#L82
[1] https://github.com/mcr/unstrung/blob/5e7c4060730ab4f81ddcd75657d87ec78da91bd6/lib/libndmgmt/netlink.cpp#L358
These examples checks for EUI64 address which should be the same for
ARPHRD_6LOWPAN.
It would be problematic to check which is the underlaying interface
(It's 802.15.4 or BTLE) but I am sure we can get this information
somewhere else or via NETDEV devtype (SET_NETDEV_DEVTYPE).
For your exactly question, I think libpcap evaluate this. See:
https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-linux.c#L3052
but I am not sure, in this example the change to ARPHRD_6LOWPAN is
correct because the interface doesn't have 802.15.4 frames, it's plain
IPv6 and upper without L2 information.
Somewhere is also an ARPHRD_IEEE802154_MONITOR type, which is also not
necessary by 802.15.4 frame. We should do it like the wireless monitor
implementation which set's some special flags to indenticate monitors.
But this is already UAPI, we can't delete it and now this should life in
UAPI headers forever. :-)
Does this answer your question?
- Alex
next prev parent reply other threads:[~2015-03-02 14:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 14:10 [PATCH bluetooth-next 0/3] ieee802154: UAPI changes Alexander Aring
2015-03-02 14:10 ` [PATCH bluetooth-next 1/3] ieee802154: 6lowpan: fix ARPHRD to ARPHRD_6LOWPAN Alexander Aring
2015-03-02 14:16 ` Marc Kleine-Budde
2015-03-02 14:29 ` Alexander Aring [this message]
2015-03-02 14:10 ` [PATCH bluetooth-next 2/3] ieee802154: change wpan-phy name to phy Alexander Aring
2015-03-02 14:10 ` [PATCH bluetooth-next 3/3] ieee802154: remove deprecated sysfs entries Alexander Aring
2015-03-14 16:14 ` [PATCH bluetooth-next 0/3] ieee802154: UAPI changes Marcel Holtmann
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=20150302142933.GB2314@omega \
--to=alex.aring@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@vger.kernel.org \
--cc=mkl@pengutronix.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