Print the values in the BSS Load Element in human readable format as well.

Change-Id: Ie20c340e06b970602a94c601be4c629ccae56e7c
Reviewed-on: https://code.wireshark.org/review/1719
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
This commit is contained in:
Joerg Mayer 2014-05-22 01:01:14 +02:00 committed by Jörg Mayer
parent 011a330b13
commit 0cb180aae4
1 changed files with 14 additions and 8 deletions

View File

@ -13343,6 +13343,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
break;
case TAG_QBSS_LOAD: /* 7.3.2.28 BSS Load element (11) */
/* 8.4.2.30 in 802.11-2012 */
if ((tag_len < 4) || (tag_len > 5))
{
expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 4 or 5", tag_len);
@ -13361,15 +13362,20 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
proto_tree_add_item(tree, hf_ieee80211_qbss_adc, tvb, offset + 5, 1, ENC_BIG_ENDIAN);
}
else if (tag_len == 5)
{
/* QBSS Version 2 */
proto_item_append_text(ti, " 802.11e CCA Version");
/* Extract Values */
proto_tree_add_uint(tree, hf_ieee80211_qbss_version, tvb, offset + 2, tag_len, 2);
proto_tree_add_item(tree, hf_ieee80211_qbss_scount, tvb, offset + 2, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_ieee80211_qbss_cu, tvb, offset + 4, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_ieee80211_qbss_adc, tvb, offset + 5, 2, ENC_LITTLE_ENDIAN);
{
proto_item *base_item;
/* QBSS Version 2 */
proto_item_append_text(ti, " 802.11e CCA Version");
/* Extract Values */
proto_tree_add_uint(tree, hf_ieee80211_qbss_version, tvb, offset + 2, tag_len, 2);
proto_tree_add_item(tree, hf_ieee80211_qbss_scount, tvb, offset + 2, 2, ENC_LITTLE_ENDIAN);
base_item = proto_tree_add_item(tree, hf_ieee80211_qbss_cu, tvb, offset + 4, 1, ENC_BIG_ENDIAN);
proto_item_append_text(base_item, " (%d%%)", 100*tvb_get_guint8(tvb, offset + 4)/255);
base_item = proto_tree_add_item(tree, hf_ieee80211_qbss_adc, tvb, offset + 5, 2, ENC_LITTLE_ENDIAN);
proto_item_append_text(base_item, " (%d us/s)", tvb_get_letohs(tvb, offset + 5)*32);
}
break;