]> The Tcpdump Group git mirrors - libpcap/commitdiff
DLT_ value for IPMB with a Linux-specific pseudo-header,a s requested by
authorguy <guy>
Sun, 23 Dec 2007 04:42:14 +0000 (04:42 +0000)
committerguy <guy>
Sun, 23 Dec 2007 04:42:14 +0000 (04:42 +0000)
Alexey Neyman.

Add LINKTYPE_ values corresponding to the DLT_ values added earlier.

pcap/bpf.h
savefile.c

index 306d953e33518a3fbc41108bbea4480d58492bb5..5de42500bc5db6cf57851b08c5480e5aba538add 100644 (file)
@@ -37,7 +37,7 @@
  *
  *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
  *
- * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19.2.2 2007-12-22 01:20:07 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19.2.3 2007-12-23 04:42:14 guy Exp $ (LBL)
  */
 
 /*
@@ -774,6 +774,12 @@ struct bpf_version {
  */
 
 
+/*
+ * IPMB with a Linux-specific pseudo-header; as equested by Alexey Neyman
+ */
+#define DLT_IPMB_LINUX         209
+
 /*
  * DLT and savefile link type values are split into a class and
  * a member of that class.  A class value of 0 indicates a regular
index aee920f9af87bd3f8bdab70458ea4fecf5ea459b..10e75f49f98b31fbb1147823fbdd232de24558c0 100644 (file)
@@ -30,7 +30,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.168.2.2 2007-10-21 08:39:59 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.168.2.3 2007-12-23 04:42:14 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -581,6 +581,29 @@ static const char rcsid[] _U_ =
  */
 #define LINKTYPE_LAPD          203
 
+/*
+ * Variants of various link-layer headers, with a one-byte direction
+ * pseudo-header prepended - zero means "received by this host",
+ * non-zero (any non-zero value) means "sent by this host" - as per
+ * Will Barker <[email protected]>.
+ */
+#define LINKTYPE_PPP_WITH_DIR  204     /* PPP */
+#define LINKTYPE_C_HDLC_WITH_DIR 205   /* Cisco HDLC */
+#define LINKTYPE_FRELAY_WITH_DIR 206   /* Frame Relay */
+#define LINKTYPE_LAPB_WITH_DIR 207     /* LAPB */
+
+/*
+ * 208 is reserved for an as-yet-unspecified proprietary link-layer
+ * type, as requested by Will Barker.
+ */
+
+
+/*
+ * IPMB with a Linux-specific pseudo-header; as equested by Alexey Neyman
+ */
+#define LINKTYPE_IPMB_LINUX            209
+
 
 static struct linktype_map {
        int     dlt;
@@ -853,6 +876,21 @@ static struct linktype_map {
        /* Raw LAPD, with no pseudo-header */
        { DLT_LAPD,             LINKTYPE_LAPD },
 
+       /* PPP with one-byte pseudo-header giving direction */
+       { DLT_PPP_WITH_DIR,     LINKTYPE_PPP_WITH_DIR },
+
+       /* Cisco HDLC with one-byte pseudo-header giving direction */
+       { DLT_C_HDLC_WITH_DIR,  LINKTYPE_C_HDLC_WITH_DIR },
+
+       /* Frame Relay with one-byte pseudo-header giving direction */
+       { DLT_FRELAY_WITH_DIR,  LINKTYPE_FRELAY_WITH_DIR },
+
+       /* LAPB with one-byte pseudo-header giving direction */
+       { DLT_LAPB_WITH_DIR,    LINKTYPE_LAPB_WITH_DIR },
+
+       /* IPMB with Linux pseudo-header */
+       { DLT_IPMB_LINUX,       LINKTYPE_IPMB_LINUX },
+
        { -1,                   -1 }
 };