Re: [tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-11 Thread Guy Harris
On Oct 11, 2009, at 2:58 AM, Felix Obenhuber wrote: On Fri, 2009-10-09 at 08:27 -0400, Alexander Dupuy wrote: ... Summing up the discussion till now, I'd like to request a new DLT for SocketCAN that is called DLT_CAN_SOCKETCAN OK, I've assigned 227 to DLT_CAN_SOCKETCAN, and check

Re: [tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-11 Thread Felix Obenhuber
On Fri, 2009-10-09 at 08:27 -0400, Alexander Dupuy wrote: > Given these differences between the two frame formats I would suggest > that you use a new DLT for SocketCAN, especially as there would be no > way to know for sure whether the flags were present or just padding (a > packet with all zero f

Re: [tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-09 Thread Alexander Dupuy
Felix Obenhuber wrote: 2. The can frame struct is defined like this (from linux/can.h): /** * struct can_frame - basic CAN frame structure * @can_id: the CAN ID of the frame and CAN_*_FLAG flags, see above. * @can_dlc: the data length field of the CAN frame * @data:the CAN frame payload.

Re: [tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-05 Thread Gianluca Varenni
Presumably aligned(8) means "align on an 8-byte boundary"; if canid_t is a 32-bit quantity, then there should be 3 bytes of padding on *all* platforms. However, if you're using DLT_CAN20B, what matters here is what *existing* software that uses DLT_CAN20B expects; you would have to arra

Re: [tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-05 Thread Gianluca Varenni
However, if you're using DLT_CAN20B, what matters here is what *existing* software that uses DLT_CAN20B expects; you would have to arrange to make the frame look like that, regardless of whether it matches "struct can_frame" or not, or you would have to request a different DLT_ value, e.g

Re: [tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-04 Thread Guy Harris
(I'm assuming that I can just reply to the third of your three messages.) On Oct 4, 2009, at 5:20 AM, Felix Obenhuber wrote: I've done some hacks in tcpdump and wireshark that react on incomming packets with DLT_CAN2B to visualize the captured frames but I'd like to get pcap lined up clear

[tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-04 Thread Felix Obenhuber
Hi, some times ago I took a view on SocketCAN [1]. Due I'm using CAN all day long with various protocols, I'd like to get some tool support for debugging and analyzation. I used ethereal for all ip based stuff and would like to do something similar for CAN. With SocketCAN this should be possible

[tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-03 Thread Felix Obenhuber
Hi, some times ago I took a view on SocketCAN [1]. Due I'm using CAN all day long with various protocols, I'd like to get some tool support for debugging and analyzation. I used ethereal for all ip based stuff and would like to do something similiar for CAN. With SocketCAN this should be possibl

[tcpdump-workers] [PATCH] SocketCAN support for libpcap - draft implementation

2009-10-03 Thread Felix Obenhuber
Hi, some times ago I took a view on SocketCAN [1]. Due I'm using CAN all day long with various protocols, I'd like to get some tool support for debugging and analyzation. I used ethereal for all ip based stuff and would like to do something similiar for CAN. With SocketCAN this should be possibl