-
> Is there any way to check what canN/vcanN devices exist, so that we can
> enumerate them in pcap_findalldevs(), as we already do for DAG, USB, and
> Bluetooth devices on Linux?
I looked around, but didn't find anything appropriate. The devices are listed in proc with any other network interfaces - but cannot be identified as CAN devices somehow.
The statistics of the CAN interfaces are...
2010-01-03 13:32:03 UTC by asu_fo
-
> If the latter is true, would the existing Linux PF_PACKET socket code in
> ibpcap be able to capture on CAN devices?
Yes, it is - and does as sll header without this patch.
2010-01-03 13:25:02 UTC by asu_fo
-
BTW, I checked in a change to the top-of-tree Git version to fix the problems with autoconf 2.64 and later.
2010-01-02 22:25:06 UTC by guy_harris
-
Also, are CAN devices like other network devices, so that they might show up in, for example, /proc/net/dev - or so that you can bind a PF_PACKET socket to them, and capture on that socket and see CAN packets?
If the latter is true, would the existing Linux PF_PACKET socket code in libpcap be able to capture on CAN devices?.
2010-01-01 03:02:21 UTC by guy_harris
-
We already require in other places, including pcap-linux.c, and we don't check for its availability anywhere. Other tests in the configure script just assume it's available; I changed the SocketCAN test not to bother checking for either, and checked it in.
Is there any way to check what canN/vcanN devices exist, so that we can enumerate them in...
2009-12-31 01:19:47 UTC by guy_harris
-
Yep, you're right. sys/socket.h is the better choice, cause it satisfies can.h's dependencies. Furthermore it's also needed for the SocketCAN patch anyway.
I removed the obsolete include directive of can.h.
2009-12-30 22:57:52 UTC by asu_fo
-
Fixed in the top of the Git tree.
2009-12-30 21:01:32 UTC by guy_harris
-
pcap-can-linux.c itself includes before ; should the check for include rather than checking for and including it if present?
Also, the fourth argument to AC_CHECK_HEADER() should just be the additional headers required, such as , not the header you're checking for (AC_CHECK_HEADER() generates the include...
2009-12-30 20:59:33 UTC by guy_harris
-
Using autoconf2.59 did the trick.
I attached two patches to this ticket with:
1. Patch for configure.in to check for linux/can.h in order to enable CAN sniffing support
2. Patch for configure script: This is regenerated with autotools2.59
Two separate patches, cause maybe you'd like to regenerate configure with your favorite autoconf version..
2009-12-30 12:07:44 UTC by asu_fo
-
Thanks Guy!
You're right, that configure should check for can.h.
I updated configure.in, but autoconf (2.64) produced a malformed script ( same behaviour with the checked in configure.in). :
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
./configure: line 2461: syntax error near...
2009-12-30 11:21:16 UTC by asu_fo