From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>, Ico Doornekamp <can@zevv.nl>
Cc: linux-can <linux-can@vger.kernel.org>
Subject: Re: CAN libpcap capture endianess
Date: Wed, 11 Sep 2013 21:17:38 +0200 [thread overview]
Message-ID: <5230C1D2.2080700@hartkopp.net> (raw)
In-Reply-To: <5230B897.7020807@pengutronix.de>
On 11.09.2013 20:38, Marc Kleine-Budde wrote:
> On 09/11/2013 08:30 PM, Ico Doornekamp wrote:
>>> But you're using a 64 bit system while Yegor uses a 32 bit one
>>> (according to your notes below).
>>
I wonder if the used of an unsigned long data type for the u32 can_id
and the use of kstrtoul() might cause an issue on 64 bit platforms?!?
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/slcan.c#n146
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/slcan.c#n164
The 'unsigned long' conversion was introduced in 2009 due to a report of Kurt van Dijck:
http://svn.berlios.de/wsvn/socketcan/trunk/kernel/2.6/drivers/net/can/slcan.c?op=revision&rev=919
http://svn.berlios.de/wsvn/socketcan/trunk/kernel/2.6/drivers/net/can/slcan.c?op=diff&rev=919&peg=919
but maybe kstrtouint()
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/lib/kstrtox.c#n202
would be the better choice now.
>> Indeed, but I believe that should in no way interfere with captured data
>> endianess.
>>
>>> Your dump doesn't look correct in my wireshark, it has alternating
>>> extended and standard frames and the standard frames have identifiers
>>> of 0x060000 which is not valid.
>>>
>>> Does the command line tool candump show proper frames?
>>
>> I'll have to look into that tomorrow, at this time I only have access to
>> the capture file I made earlier.
Yes, that would be my first question too ...
Regards,
Oliver
next prev parent reply other threads:[~2013-09-11 19:17 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 17:42 CAN libpcap capture endianess Ico
2013-09-11 18:22 ` Marc Kleine-Budde
2013-09-11 18:30 ` Ico Doornekamp
2013-09-11 18:38 ` Marc Kleine-Budde
2013-09-11 18:53 ` Ico Doornekamp
2013-09-11 19:22 ` Oliver Hartkopp
2013-09-11 19:17 ` Oliver Hartkopp [this message]
2013-09-11 19:34 ` Marc Kleine-Budde
2013-09-11 19:37 ` Marc Kleine-Budde
2013-09-11 20:05 ` Ico Doornekamp
2013-09-11 20:11 ` Marc Kleine-Budde
2013-09-12 6:52 ` Ico Doornekamp
2013-09-12 8:00 ` Marc Kleine-Budde
2013-09-12 8:47 ` Ico Doornekamp
2013-09-12 8:52 ` Marc Kleine-Budde
2013-09-12 9:09 ` Ico Doornekamp
2013-09-12 9:13 ` Marc Kleine-Budde
2013-09-12 9:31 ` Ico Doornekamp
2016-05-10 19:25 ` Ico Doornekamp
2016-05-11 7:40 ` Oliver Hartkopp
[not found] ` <1462952665-sup-1016@pruts.nl>
2016-05-11 8:17 ` Oliver Hartkopp
2016-05-11 12:28 ` Ico Doornekamp
2016-05-11 13:25 ` Oliver Hartkopp
2016-05-11 17:01 ` Ico Doornekamp
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=5230C1D2.2080700@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=can@zevv.nl \
--cc=linux-can@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;
as well as URLs for NNTP newsgroup(s).