summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguy <guy>2002-06-07 04:31:56 +0000
committerguy <guy>2002-06-07 04:31:56 +0000
commit529c99f337854c4e0d766670b74f371042596a7a (patch)
tree4c2d5343ae04862d2ca1be6ca50fb076f2d02ad6
parentf2b787596ecd9110358175ab5ae417cc654d0c7a (diff)
downloadlibpcap-529c99f337854c4e0d766670b74f371042596a7a.tar.gz
We'd already reserved 107 for Frame Relay; use that instead of a new
value.
-rw-r--r--bpf/net/bpf.h22
-rw-r--r--savefile.c11
2 files changed, 17 insertions, 16 deletions
diff --git a/bpf/net/bpf.h b/bpf/net/bpf.h
index 9d791976..763d9385 100644
--- a/bpf/net/bpf.h
+++ b/bpf/net/bpf.h
@@ -37,7 +37,7 @@
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
- * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.52.2.5 2002-06-07 04:17:57 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.52.2.6 2002-06-07 04:31:57 guy Exp $ (LBL)
*/
#ifndef BPF_MAJOR_VERSION
@@ -256,10 +256,18 @@ struct bpf_hdr {
#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */
/*
- * Values between 106 and 107 are used in capture file headers as
- * link-layer types corresponding to DLT_ types that might differ
- * between platforms; don't use those values for new DLT_ new types.
+ * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
+ * except when it isn't. (I.e., sometimes it's just raw IP, and
+ * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL,
+ * so that we don't have to worry about the link-layer header.)
+ */
+
+/*
+ * Reserved for Frame Relay; BSD/OS has a DLT_FR, with a value of 11,
+ * but that collides with other values. DLT_FR and DLT_FRELAY packets
+ * start with the Frame Relay header (DLCI, etc.).
*/
+#define DLT_FRELAY 107
/*
* OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
@@ -347,12 +355,6 @@ struct bpf_hdr {
#define DLT_SUNATM 123 /* Solaris+SunATM */
/*
- * Reserved for Frame Relay; BSD/OS has a DLT_FR, with a value of 11,
- * but that collides with other values.
- */
-#define DLT_FRELAY 124
-
-/*
* The instruction encodings.
*/
/* instruction classes */
diff --git a/savefile.c b/savefile.c
index f5304689..8326267f 100644
--- a/savefile.c
+++ b/savefile.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.55.2.6 2002-06-07 04:17:56 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.55.2.7 2002-06-07 04:31:56 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -167,7 +167,7 @@ static const char rcsid[] =
/*
* These types are reserved for future use.
*/
-#define LINKTYPE_FR 107 /* BSD/OS Frame Relay */
+#define LINKTYPE_FRELAY 107 /* Frame Relay */
#define LINKTYPE_ENC 109 /* OpenBSD IPSEC enc */
#define LINKTYPE_LANE8023 110 /* ATM LANE + 802.3 */
#define LINKTYPE_HIPPI 111 /* NetBSD HIPPI */
@@ -177,7 +177,6 @@ static const char rcsid[] =
#define LINKTYPE_HHDLC 121 /* Siemens HiPath HDLC */
#define LINKTYPE_IP_OVER_FC 122 /* RFC 2625 IP-over-Fibre Channel */
#define LINKTYPE_SUNATM 123 /* Solaris+SunATM */
-#define LINKTYPE_FRELAY 124 /* Frame Relay */
static struct linktype_map {
int dlt;
@@ -236,6 +235,9 @@ static struct linktype_map {
/* IEEE 802.11 wireless */
{ DLT_IEEE802_11, LINKTYPE_IEEE802_11 },
+ /* Frame Relay */
+ { DLT_FRELAY, LINKTYPE_FRELAY },
+
/* OpenBSD loopback */
{ DLT_LOOP, LINKTYPE_LOOP },
@@ -266,9 +268,6 @@ static struct linktype_map {
/* Solaris+SunATM */
{ DLT_SUNATM, LINKTYPE_SUNATM },
- /* Frame Relay */
- { DLT_FRELAY, LINKTYPE_FRELAY },
-
/*
* Any platform that defines additional DLT_* codes should:
*