aboutsummaryrefslogtreecommitdiffstats
path: root/savefile.c
diff options
context:
space:
mode:
authorguy <guy>2007-12-23 04:40:45 +0000
committerguy <guy>2007-12-23 04:40:45 +0000
commit41995a4191db3e7e823aae3db5ad2af9decc2615 (patch)
tree7f740b1ad6fb30c41c7e6c8c5530479fc0383217 /savefile.c
parent2fcbb1f5a2ce49185544f79729dc431b899a7a47 (diff)
DLT_ value for IPMB with a Linux-specific pseudo-header,a s requested by
Alexey Neyman. Add LINKTYPE_ values corresponding to the DLT_ values added earlier.
Diffstat (limited to 'savefile.c')
-rw-r--r--savefile.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/savefile.c b/savefile.c
index 4eab53c..e330a1d 100644
--- a/savefile.c
+++ b/savefile.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.170 2007-10-21 08:39:27 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.171 2007-12-23 04:40:45 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 <w.barker@zen.co.uk>.
+ */
+#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
+ * <avn@pigeonpoint.com>.
+ */
+#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 }
};