From 86ed15cc8b4bd7dc1458559108e66a07ec6721ec Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 11 Oct 2009 10:16:21 -0700 Subject: Add DLT_CAN_SOCKETCAN, for capturing on the Controller Area Network with Linux SocketCAN. --- savefile.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'savefile.c') diff --git a/savefile.c b/savefile.c index 67da51f..4832f34 100644 --- a/savefile.c +++ b/savefile.c @@ -784,6 +784,15 @@ static const char rcsid[] _U_ = */ #define LINKTYPE_IPNET 226 +/* + * CAN (Controller Area Network) frames, with a pseudo-header as supplied + * by Linux SocketCAN. See Documentation/networking/can.txt in the Linux + * source. + * + * Requested by Felix Obenhuber . + */ +#define LINKTYPE_CAN_SOCKETCAN 227 + static struct linktype_map { int dlt; @@ -1123,6 +1132,9 @@ static struct linktype_map { /* Solaris IPNET */ { DLT_IPNET, LINKTYPE_IPNET }, + /* CAN frames with SocketCAN headers */ + { DLT_CAN_SOCKETCAN, LINKTYPE_CAN_SOCKETCAN }, + { -1, -1 } }; -- cgit v1.2.3