]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Support DLT_IEEE802_11_RADIO_AVS.
authorguy <guy>
Thu, 20 Dec 2007 08:13:35 +0000 (08:13 +0000)
committerguy <guy>
Thu, 20 Dec 2007 08:13:35 +0000 (08:13 +0000)
Update a comment (we now parse the radiotap header).

interface.h
print-802_11.c
tcpdump.c

index 52264e16a28022ec2909e28cbb1d3d805c1b22c7..ff43534ff7304a8a510167222eebee0b818e441c 100644 (file)
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.281 2007-12-09 00:30:47 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.282 2007-12-20 08:13:35 guy Exp $ (LBL)
  */
 
 #ifndef tcpdump_interface_h
@@ -219,6 +219,8 @@ extern u_int ieee802_11_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *,
        const u_char *);
 extern u_int ap1394_if_print(const struct pcap_pkthdr *, const u_char *);
+extern u_int ieee802_11_radio_avs_if_print(const struct pcap_pkthdr *,
+       const u_char *);
 extern void gre_print(const u_char *, u_int);
 extern void icmp_print(const u_char *, u_int, const u_char *, int);
 extern void igmp_print(const u_char *, u_int);
index 611ae602ae614bf6fcf285e319e926a8ef233093..99a3f8eaf95db501ea4d72150c1f052313417bba 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.47 2007-07-22 23:13:41 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.48 2007-12-20 08:13:35 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -1209,6 +1209,11 @@ ieee802_11_avs_radio_print(const u_char *p, u_int length, u_int caplen)
 {
        u_int32_t caphdr_len;
 
+       if (caplen < 8) {
+               printf("[|802.11]");
+               return caplen;
+       }
+
        caphdr_len = EXTRACT_32BITS(p + 4);
        if (caphdr_len < 8) {
                /*
@@ -1270,19 +1275,21 @@ prism_if_print(const struct pcap_pkthdr *h, const u_char *p)
 
 /*
  * For DLT_IEEE802_11_RADIO; like DLT_IEEE802_11, but with an extra
- * header, containing information such as radio information, which we
- * currently ignore.
+ * header, containing information such as radio information.
  */
 u_int
 ieee802_11_radio_if_print(const struct pcap_pkthdr *h, const u_char *p)
 {
-       u_int caplen = h->caplen;
-       u_int length = h->len;
-
-       if (caplen < 8) {
-               printf("[|802.11]");
-               return caplen;
-       }
+       return ieee802_11_radio_print(p, h->len, h->caplen);
+}
 
-       return ieee802_11_radio_print(p, length, caplen);
+/*
+ * For DLT_IEEE802_11_RADIO_AVS; like DLT_IEEE802_11, but with an
+ * extra header, containing information such as radio information,
+ * which we currently ignore.
+ */
+u_int
+ieee802_11_radio_avs_if_print(const struct pcap_pkthdr *h, const u_char *p)
+{
+       return ieee802_11_avs_radio_print(p, h->len, h->caplen);
 }
index e004378708f0e56970c1a3f5313d4f90d8c076f1..aabcd4de27d3f38da3e6e9764e390f22c498eb23 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -30,7 +30,7 @@ static const char copyright[] _U_ =
     "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.274 2007-11-21 20:39:24 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.275 2007-12-20 08:13:35 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -222,6 +222,9 @@ static struct printer printers[] = {
 #ifdef DLT_APPLE_IP_OVER_IEEE1394
        { ap1394_if_print,      DLT_APPLE_IP_OVER_IEEE1394 },
 #endif
+#ifdef DLT_IEEE802_11_RADIO_AVS
+       { ieee802_11_radio_avs_if_print,        DLT_IEEE802_11_RADIO_AVS },
+#endif
 #ifdef DLT_JUNIPER_ATM1
        { juniper_atm1_print,   DLT_JUNIPER_ATM1 },
 #endif