aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2011-12-09 08:41:38 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2011-12-09 08:41:38 +0000
commit55df38fa9893a0d1a5d26ecb569524b43dea6c8a (patch)
treeda4f31e7bd67defb0eff541282eb57aca2b95416
parent0bcd2e29ec1febe422bcafbece2beb13468d422e (diff)
From Johannes Berg
It's tedious to parse the blockack bitmap by hand, showing it in wireshark directly is much nicer. Attached patch does so, only for compressed BA for now. From me: made it filterable. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40126 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-ieee80211.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index c04102954d..8d08e117eb 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -1961,6 +1961,7 @@ static int hf_ieee80211_block_ack_multi_tid_reserved = -1;
static int hf_ieee80211_block_ack_multi_tid_value = -1;
static int hf_ieee80211_block_ack_type = -1;
static int hf_ieee80211_block_ack_bitmap = -1;
+static int hf_ieee80211_block_ack_bitmap_missing_frame = -1;
static int hf_ieee80211_tag_measure_request_measurement_mode = -1;
static int hf_ieee80211_tag_measure_request_bssid = -1;
@@ -2603,6 +2604,7 @@ static gint ett_cntrl_wrapper_payload = -1;
static gint ett_fragments = -1;
static gint ett_fragment = -1;
static gint ett_block_ack = -1;
+static gint ett_block_ack_bitmap = -1;
static gint ett_ath_cap_tree = -1;
@@ -10368,11 +10370,27 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo,
}
case 2: /* Compressed BlockAck */
{
+ guint16 ssn;
+ guint64 bmap;
+ int f;
+ proto_item *ba_bitmap_item;
+ proto_tree *ba_bitmap_tree;
+
proto_tree_add_uint(ba_sub_tree, hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset+1, 1, ba_control);
offset += 2;
+ ssn = tvb_get_letohs(tvb, offset);
+ ssn >>= 4;
offset += add_fixed_field(hdr_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
- proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, ENC_NA);
+ bmap = tvb_get_letoh64(tvb, offset);
+ ba_bitmap_item = proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, ENC_NA);
+ ba_bitmap_tree = proto_item_add_subtree(ba_bitmap_item, ett_block_ack_bitmap);
+ for (f = 0; f < 64; f++) {
+ if (bmap & (G_GINT64_CONSTANT(1) << f))
+ continue;
+ proto_tree_add_uint_format_value(ba_bitmap_tree, hf_ieee80211_block_ack_bitmap_missing_frame,
+ tvb, offset + (f/8), 1, ssn + f, "%u", ssn + f);
+ }
offset += 8;
break;
}
@@ -12421,6 +12439,10 @@ proto_register_ieee80211 (void)
{&hf_ieee80211_block_ack_bitmap,
{"Block Ack Bitmap", "wlan.ba.bm",
FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
+
+ {&hf_ieee80211_block_ack_bitmap_missing_frame,
+ {"Missing frame", "wlan.ba.bm.missing_frame",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
{&hf_ieee80211_data_encap_payload_type,
{"Payload Type", "wlan.data_encap.payload_type",
@@ -16401,6 +16423,7 @@ proto_register_ieee80211 (void)
&ett_fragments,
&ett_fragment,
&ett_block_ack,
+ &ett_block_ack_bitmap,
&ett_80211_mgt,
&ett_fixed_parameters,
&ett_tagged_parameters,