]> The Tcpdump Group git mirrors - libpcap/commitdiff
Propagate from the git tree:
authorguy <guy>
Tue, 18 Nov 2008 07:48:56 +0000 (07:48 +0000)
committerguy <guy>
Tue, 18 Nov 2008 07:48:56 +0000 (07:48 +0000)
Author: Michael Richardson <[email protected]>
Date:   Thu Nov 13 11:42:19 2008 -0500

    added DLT_LINUX_EVDEV for David Gibson <[email protected]>

Fix the name of the devices, and add LINKTYPE_LINUX_EVDEV.

pcap/bpf.h
savefile.c

index 31e0041b297773f4f3d0555034c492425bf1a8c5..c660292a0d6f2dc15c5e1b470ed92574b304e690 100644 (file)
@@ -37,7 +37,7 @@
  *
  *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
  *
- * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.27 2008-09-22 20:14:19 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.28 2008-11-18 07:48:56 guy Exp $ (LBL)
  */
 
 /*
@@ -821,6 +821,14 @@ struct bpf_version {
  */
 #define DLT_IEEE802_15_4_NONASK_PHY    215
 
+/* 
+ * David Gibson <[email protected]> requested this for
+ * captures from the Linux kernel /dev/input/eventN devices. This
+ * is used to communicate keystrokes and mouse movements from the
+ * Linux kernel to display systems, such as Xorg. 
+ */
+#define DLT_LINUX_EVDEV                        216
+
 
 /*
  * DLT and savefile link type values are split into a class and
index 2624e2f8b0893ca28be29d9f96557c823849380e..66ba16b587da44dc45f9e415ac5234fe9a8a9718 100644 (file)
@@ -30,7 +30,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.178 2008-10-06 15:27:32 gianluca Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.179 2008-11-18 07:48:56 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -647,6 +647,14 @@ static const char rcsid[] _U_ =
  */
 #define LINKTYPE_IEEE802_15_4_NONASK_PHY       215
 
+/* 
+ * David Gibson <[email protected]> requested this for
+ * captures from the Linux kernel /dev/input/eventN devices. This
+ * is used to communicate keystrokes and mouse movements from the
+ * Linux kernel to display systems, such as Xorg. 
+ */
+#define LINKTYPE_LINUX_EVDEV                   216
+
 
 static struct linktype_map {
        int     dlt;
@@ -952,6 +960,9 @@ static struct linktype_map {
        /* IEEE 802.15.4 with PHY data for non-ASK PHYs */
        { DLT_IEEE802_15_4_NONASK_PHY, LINKTYPE_IEEE802_15_4_NONASK_PHY },
 
+       /* Input device events from Linux /dev/input/eventN devices */
+       { DLT_LINUX_EVDEV,      LINKTYPE_LINUX_EVDEV },
+
        { -1,                   -1 }
 };