Fix for bug 5425:
authorJaap Keuter <jaap.keuter@xs4all.nl>
Sun, 21 Nov 2010 12:36:24 +0000 (12:36 -0000)
committerJaap Keuter <jaap.keuter@xs4all.nl>
Sun, 21 Nov 2010 12:36:24 +0000 (12:36 -0000)
Add support for dissecting SLL type 0x0C frames.

svn path=/trunk/; revision=34991

epan/dissectors/packet-sll.c
epan/dissectors/packet-sll.h
epan/dissectors/packet-socketcan.c

index 902e53db0acb751f9152c17542a5f08b4bb6f626..14b5fb1934a68d7280f6989bd6c985fe1fb003be 100644 (file)
@@ -82,6 +82,7 @@ static const value_string ltype_vals[] = {
        { LINUX_SLL_P_ETHERNET, "Ethernet" },
        { LINUX_SLL_P_802_2,    "802.2 LLC" },
        { LINUX_SLL_P_PPPHDLC,  "PPP (HDLC)" },
+       { LINUX_SLL_P_CAN,      "CAN" },
        { 0,                    NULL }
 };
 
index 5fd17b2b9ab5c1f505e2f5d42f25ff942feff378..de67e86688e245cb9a2afd883b18bebeb12e6d64 100644 (file)
@@ -31,6 +31,7 @@
 #define LINUX_SLL_P_ETHERNET   0x0003  /* Ethernet */
 #define LINUX_SLL_P_802_2      0x0004  /* 802.2 frames (not D/I/X Ethernet) */
 #define LINUX_SLL_P_PPPHDLC    0x0007  /* PPP HDLC frames */
+#define LINUX_SLL_P_CAN                0x000C  /* Controller Area Network */
 
 void capture_sll(const guchar *, int, packet_counts *);
 
index 00d26ed1622910b13766dac493342a1309f9a461..31851da2795e5733e1b6e21239d2228f8ea77c54 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <glib.h>
 #include <epan/packet.h>
+#include "packet-sll.h"
 
 /* controller area network (CAN) kernel definitions
  * This maskare usualy defined within <linux/can.h> but not
@@ -195,6 +196,7 @@ proto_reg_handoff_socketcan(void)
 
        can_handle = create_dissector_handle(dissect_socketcan, proto_can);
        dissector_add("wtap_encap", WTAP_ENCAP_SOCKETCAN, can_handle);
+       dissector_add("sll.ltype", LINUX_SLL_P_CAN, can_handle);
 }