tcpdump mailing list archives
Re: [PATCH] SocketCAN support for libpcap - draft implementation
From: Guy Harris <guy () alum mit edu>
Date: Sun, 11 Oct 2009 10:35:59 -0700
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 checked into the main branch and pushed changes for that
Are there any conventions about the DLT naming?
Not really.
If you ever think that SocketCAN/libpcap will be used on big-endiansystems, you might want to "canonicalize" the layout in the big- endianformat above for a more comprehensible diagram, and because little-endian systems have htonl/ntohl macros that are not no-ops, making portable user-level coding simpler (if you standardize the little-endian format, portable code has to use #ifdefs to determine byte-order and then call a swap() function/macro on big-endian systems).Think that the usage of SocketCAN/libpcap on BE machines may be need once. Think about a Linux and PPC based CAN data logger for example.
Linux USB leaves the pseudo-header in host byte order - and, in the code that reads the savefile, libpcap byte-swaps the fields, if the capture file was written on a machine with the opposite byte order, so that they appear to be in the byte order of the host reading the file.
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Re: [PATCH] SocketCAN support for libpcap -, (continued)
- Re: [PATCH] SocketCAN support for libpcap - Felix Obenhuber (Oct 05)
- Re: [PATCH] SocketCAN support for libpcap - Gianluca Varenni (Oct 05)
- Re: [PATCH] SocketCAN support for libpcap - Michael Richardson (Oct 05)
- Re: [PATCH] SocketCAN support for libpcap - Felix Obenhuber (Oct 06)
- Re: [PATCH] SocketCAN support for libpcap - Michael Richardson (Oct 06)
- Re: [PATCH] SocketCAN support for libpcap - draft implementation Gianluca Varenni (Oct 05)
- Re: [PATCH] SocketCAN support for libpcap - draft implementation Gianluca Varenni (Oct 05)
- Re: [PATCH] SocketCAN support for libpcap - Felix Obenhuber (Oct 11)
- Re: [PATCH] SocketCAN support for libpcap - draft implementation Felix Obenhuber (Oct 11)
- Re: [PATCH] SocketCAN support for libpcap - draft implementation Guy Harris (Oct 11)
- Re: [PATCH] SocketCAN support for libpcap - draft Alexander Dupuy (Oct 11)
- Re: [PATCH] SocketCAN support for libpcap - draft Felix Obenhuber (Oct 25)
- Re: [PATCH] SocketCAN support for libpcap - draft Guy Harris (Dec 07)
- Re: [PATCH] SocketCAN support for libpcap - draft Felix Obenhuber (Dec 07)
- Re: [PATCH] SocketCAN support for libpcap - draft Guy Harris (Dec 07)
- Re: [PATCH] SocketCAN support for libpcap - draft Felix Obenhuber (Dec 08)