From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Kurt Van Dijck <kurt.van.dijck@eia.be>,
Felix Obenhuber <felix@obenhuber.de>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Wireshark / libpcap - was Re: [RFC] CAN FD support part 2 - ideas and commented source
Date: Thu, 03 May 2012 20:01:32 +0200 [thread overview]
Message-ID: <4FA2C7FC.9070103@hartkopp.net> (raw)
In-Reply-To: <4FA27F18.9080106@hartkopp.net>
On 03.05.2012 14:50, Oliver Hartkopp wrote:
> On 03.05.2012 14:37, Kurt Van Dijck wrote:
>> I don't see benefit in introducing ETH_P_CANFD.
>> Using the skb's payload length differentiates enough between CAN_MTU & CANFD_MTU.
>> Why not using that info. IMHO, ETH_P_CANFD duplicates the info.
>
>
> This has a big advantage when thinking about wireshark & friends.
>
> You can look into the eth protocol and know the skb data layout.
> The length information is some kind of implicit knowledge.
Hi Kurt,
i just wanted to pick up the ETH_P_CANFD topic you asked for.
As you can see in packet_sendmsg_spkt() here
http://lxr.linux.no/#linux+v3.3.4/net/packet/af_packet.c#L1447
the 'proto' can be set directly when creating a skb with packet sockets:
http://lxr.linux.no/#linux+v3.3.4/net/packet/af_packet.c#L1466
At this point the value is put into the skb:
http://lxr.linux.no/#linux+v3.3.4/net/packet/af_packet.c#L1542
So e.g. the packet socket is definitely aware of the ETH_P_xxx values, try
'man packet' :
(..)
protocol is the IEEE 802.3 protocol number in network order. See the
<linux/if_ether.h> include file for a list of allowed protocols.
When protocol is set to htons(ETH_P_ALL) then all protocols are received.
All incoming packets of that protocol type will be passed to the packet socket
before they are passed to the protocols implemented in the kernel.
(..)
For that reason and because of the reference to <linux/if_ether.h> i think
it's pretty relevant to wireshark and libpcap - that's why i added Felix in CC.
http://sourceforge.net/tracker/?func=detail&aid=2872132&group_id=53067&atid=469579
Regards,
Oliver
next prev parent reply other threads:[~2012-05-03 18:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4FA242D0.2070604@hartkopp.net>
2012-05-03 11:14 ` [RFC] CAN FD support part 2 - ideas and commented source Oliver Hartkopp
2012-05-03 12:37 ` Kurt Van Dijck
2012-05-03 12:50 ` Oliver Hartkopp
2012-05-03 13:22 ` Kurt Van Dijck
2012-05-07 11:51 ` Felix Obenhuber
2012-05-07 18:03 ` Oliver Hartkopp
2012-05-03 18:01 ` Oliver Hartkopp [this message]
2012-05-04 9:29 ` Wireshark / libpcap - was " Kurt Van Dijck
2012-05-04 9:59 ` Oliver Hartkopp
2012-05-07 12:19 ` Felix Obenhuber
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=4FA2C7FC.9070103@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=felix@obenhuber.de \
--cc=kurt.van.dijck@eia.be \
--cc=linux-can@vger.kernel.org \
/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