Wireshark-dev: [Wireshark-dev] RFC: Filter on more fields when filtering on wlan.addr

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Wed, 15 Feb 2012 19:35:57 +0100
Hello,

the attached patch tries to show what I intend to do - wlan.addr should also
filter on the BSSID and the TA and RA addresses. Still to do: ra and ta.

Feedback is welcome

Thanks
   Joerg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
Index: epan/dissectors/packet-ieee80211.c
===================================================================
--- epan/dissectors/packet-ieee80211.c	(revision 41031)
+++ epan/dissectors/packet-ieee80211.c	(working copy)
@@ -10136,13 +10136,17 @@
 
         proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_sa, tvb, 10, 6, src);
 
+        proto_tree_add_item (hdr_tree, hf_ieee80211_addr_bssid, tvb, 16, 6, ENC_NA);
+
         /* add items for wlan.addr filter */
         hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, dst);
         PROTO_ITEM_SET_HIDDEN(hidden_item);
         hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, src);
         PROTO_ITEM_SET_HIDDEN(hidden_item);
 
-        proto_tree_add_item (hdr_tree, hf_ieee80211_addr_bssid, tvb, 16, 6, ENC_NA);
+        hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, ENC_NA);
+        PROTO_ITEM_SET_HIDDEN(hidden_item);
+
 
         proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2,
             frag_number);
@@ -10515,6 +10519,8 @@
             PROTO_ITEM_SET_HIDDEN(hidden_item);
             hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, src);
             PROTO_ITEM_SET_HIDDEN(hidden_item);
+            hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, ENC_NA);
+            PROTO_ITEM_SET_HIDDEN(hidden_item);
             break;
 
           case DATA_ADDR_T2:
@@ -10529,6 +10535,8 @@
             /* add items for wlan.addr filter */
             hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, dst);
             PROTO_ITEM_SET_HIDDEN(hidden_item);
+            hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, ENC_NA);
+            PROTO_ITEM_SET_HIDDEN(hidden_item);
             hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, src);
             PROTO_ITEM_SET_HIDDEN(hidden_item);
             break;
@@ -10544,6 +10552,8 @@
                seq_number);
 
             /* add items for wlan.addr filter */
+            hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, ENC_NA);
+            PROTO_ITEM_SET_HIDDEN(hidden_item);
             hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, src);
             PROTO_ITEM_SET_HIDDEN(hidden_item);
             hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, dst);