DLT_IEEE802_11_RADIO is used for the BSD radio header; add a new
DLT_IEEE802_11_RADIO_AVS for future use with the AVS radio header.
Fix a comment.
Put in reserved LINKTYPE_USERn values corresponding to the reserved
DLT_USERn values.
diff --git a/gencode.c b/gencode.c
index 9458553..a29d926 100644
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.197 2004-01-29 10:25:19 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.198 2004-01-29 10:36:43 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -862,13 +862,14 @@
off_nl_nosnap = 144+27; /* Prism+802.11+802.2 */
return;
- case DLT_IEEE802_11_RADIO:
+ case DLT_IEEE802_11_RADIO_AVS:
/*
* Same as 802.11, but with an additional header before
* the 802.11 header, containing a bunch of additional
* information including radio-level information.
*
- * The header is 64 bytes long.
+ * The header is 64 bytes long, at least in its
+ * current incarnation.
*
* XXX - same variable-length header problem, only
* more so; this header is also variable-length,
diff --git a/pcap-bpf.h b/pcap-bpf.h
index 7be164b..6b6add9 100644
--- a/pcap-bpf.h
+++ b/pcap-bpf.h
@@ -37,7 +37,7 @@
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.13 2003-12-20 02:38:23 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.14 2004-01-29 10:36:44 guy Exp $ (LBL)
*/
/*
@@ -337,15 +337,10 @@
#define DLT_AURORA 126 /* Xilinx Aurora link layer */
/*
- * For future use with 802.11 captures - defined by AbsoluteValue
- * Systems to store a number of bits of link-layer information:
- *
- * http://www.shaftnet.org/~pizza/software/capturefrm.txt
- *
- * but could and arguably should also be used by non-AVS Linux
- * 802.11 drivers and BSD drivers; that may happen in the future.
+ * BSD header for 802.11 plus a number of bits of link-layer information
+ * including radio information.
*/
-#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus WLAN header */
+#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus BSD radio header */
/*
* Reserved for the TZSP encapsulation, as per request from
@@ -473,6 +468,18 @@
#define DLT_USER15 162
/*
+ * For future use with 802.11 captures - defined by AbsoluteValue
+ * Systems to store a number of bits of link-layer information
+ * including radio information:
+ *
+ * http://www.shaftnet.org/~pizza/software/capturefrm.txt
+ *
+ * but could and arguably should also be used by non-AVS Linux
+ * 802.11 drivers; that may happen in the future.
+ */
+#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */
+
+/*
* The instruction encodings.
*/
/* instruction classes */
diff --git a/pcap.c b/pcap.c
index 8af2226..300f0f5 100644
--- a/pcap.c
+++ b/pcap.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.70 2003-12-18 23:32:34 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.71 2004-01-29 10:36:44 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -345,10 +345,11 @@
DLT_CHOICE(DLT_PRISM_HEADER, "802.11 plus Prism header"),
DLT_CHOICE(DLT_IP_OVER_FC, "RFC 2625 IP-over-Fibre Channel"),
DLT_CHOICE(DLT_SUNATM, "Sun raw ATM"),
- DLT_CHOICE(DLT_IEEE802_11_RADIO, "802.11 plus radio information header"),
+ DLT_CHOICE(DLT_IEEE802_11_RADIO, "802.11 plus BSD radio information header"),
DLT_CHOICE(DLT_ARCNET_LINUX, "Linux ARCNET"),
DLT_CHOICE(DLT_DOCSIS, "DOCSIS"),
DLT_CHOICE(DLT_LINUX_IRDA, "Linux IrDA"),
+ DLT_CHOICE(DLT_IEEE802_11_RADIO_AVS, "802.11 plus AVS radio information header"),
DLT_CHOICE_SENTINEL
};
diff --git a/savefile.c b/savefile.c
index ec29b73..68f7425 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.100 2003-12-21 21:58:50 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.101 2004-01-29 10:36:44 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -172,7 +172,7 @@
#define LINKTYPE_IP_OVER_FC 122 /* RFC 2625 IP-over-Fibre Channel */
#define LINKTYPE_SUNATM 123 /* Solaris+SunATM */
-#define LINKTYPE_IEEE802_11_RADIO 127 /* 802.11 plus WLAN header */
+#define LINKTYPE_IEEE802_11_RADIO 127 /* 802.11 plus BSD radio header */
#define LINKTYPE_TZSP 128 /* Tazmen Sniffer Protocol */
@@ -198,6 +198,8 @@
#define LINKTYPE_LINUX_IRDA 144 /* Linux-IrDA */
+#define LINKTYPE_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */
+
/*
* These types are reserved for future use.
*/
@@ -212,6 +214,44 @@
#define LINKTYPE_IBM_SP 145 /* IBM SP switch */
#define LINKTYPE_IBM_SN 146 /* IBM Next Federation switch */
+/*
+ * Reserved for private use. If you have some link-layer header type
+ * that you want to use within your organization, with the capture files
+ * using that link-layer header type not ever be sent outside your
+ * organization, you can use these values.
+ *
+ * No libpcap release will use these for any purpose, nor will any
+ * tcpdump release use them, either.
+ *
+ * Do *NOT* use these in capture files that you expect anybody not using
+ * your private versions of capture-file-reading tools to read; in
+ * particular, do *NOT* use them in products, otherwise you may find that
+ * people won't be able to use tcpdump, or snort, or Ethereal, or... to
+ * read capture files from your firewall/intrusion detection/traffic
+ * monitoring/etc. appliance, or whatever product uses that LINKTYPE_ value,
+ * and you may also find that the developers of those applications will
+ * not accept patches to let them read those files.
+ *
+ * Instead, ask "tcpdump-workers@tcpdump.org" for a new DLT_ and LINKTYPE_
+ * value, as per the comment in pcap-bpf.h
+ */
+#define LINKTYPE_USER0 147
+#define LINKTYPE_USER1 148
+#define LINKTYPE_USER2 149
+#define LINKTYPE_USER3 150
+#define LINKTYPE_USER4 151
+#define LINKTYPE_USER5 152
+#define LINKTYPE_USER6 153
+#define LINKTYPE_USER7 154
+#define LINKTYPE_USER8 155
+#define LINKTYPE_USER9 156
+#define LINKTYPE_USER10 157
+#define LINKTYPE_USER11 158
+#define LINKTYPE_USER12 159
+#define LINKTYPE_USER13 160
+#define LINKTYPE_USER14 161
+#define LINKTYPE_USER15 162
+
static struct linktype_map {
int dlt;
int linktype;
@@ -314,7 +354,7 @@
/* Xilinx Aurora link layer */
{ DLT_AURORA, LINKTYPE_AURORA },
- /* 802.11 plus WLAN header */
+ /* 802.11 plus BSD radio header */
{ DLT_IEEE802_11_RADIO, LINKTYPE_IEEE802_11_RADIO },
/* Tazmen Sniffer Protocol */
@@ -346,6 +386,9 @@
{ DLT_IBM_SP, LINKTYPE_IBM_SP },
{ DLT_IBM_SN, LINKTYPE_IBM_SN },
+ /* 802.11 plus AVS radio header */
+ { DLT_IEEE802_11_RADIO_AVS, LINKTYPE_IEEE802_11_RADIO_AVS },
+
/*
* Any platform that defines additional DLT_* codes should:
*