aboutsummaryrefslogtreecommitdiffstats
path: root/savefile.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-10-11 10:16:21 -0700
committerGuy Harris <guy@alum.mit.edu>2009-10-11 10:16:21 -0700
commit86ed15cc8b4bd7dc1458559108e66a07ec6721ec (patch)
tree31551f87879ba892c4bac89f82fda112b321b810 /savefile.c
parent8c4dcba6d231957eea3748a50314b79aa17e04b4 (diff)
Add DLT_CAN_SOCKETCAN, for capturing on the Controller Area Network with
Linux SocketCAN.
Diffstat (limited to 'savefile.c')
-rw-r--r--savefile.c12
1 files changed, 12 insertions, 0 deletions
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 <felix@obenhuber.de>.
+ */
+#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 }
};