diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-10-29 17:08:56 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-10-30 00:09:25 +0000 |
commit | aff087af98ec27eced9bf19e3c72278365096a56 (patch) | |
tree | e9c6d6010723cdb2665d0676b27961cc87843f25 /epan/dissectors/packet-ieee80211-radio.c | |
parent | 8165448504749c0a0554e2eef1964f6c88bad15d (diff) |
Handle the MCS index in Peek tagged files.
Use the "MCS index used" extended flag bit to indicate whether the "data
rate or MCS index" field is a data rate or MCS index.
Display the MCS index value if it's present.
(More to come - MCS indices, plus other information, should be used to
calculate the data rate for 11n and beyond.)
Get rid of the hdr_info_t structure while we're at it; just use local
variables for each of the fields.
Change-Id: I546f53a8ebd89078d5f23e1290557b97348aff38
Reviewed-on: https://code.wireshark.org/review/4988
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ieee80211-radio.c')
-rw-r--r-- | epan/dissectors/packet-ieee80211-radio.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ieee80211-radio.c b/epan/dissectors/packet-ieee80211-radio.c index b04c3ff32a..21a34b6c7f 100644 --- a/epan/dissectors/packet-ieee80211-radio.c +++ b/epan/dissectors/packet-ieee80211-radio.c @@ -40,6 +40,7 @@ static int proto_radio = -1; /* Header field info values for radio information */ /* ************************************************************************* */ static int hf_data_rate = -1; +static int hf_mcs_index = -1; static int hf_channel = -1; static int hf_frequency = -1; static int hf_signal_percent = -1; @@ -100,6 +101,11 @@ dissect_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) pinfo->pseudo_header->ieee_802_11.data_rate & 1 ? 5 : 0); } + if (pinfo->pseudo_header->ieee_802_11.presence_flags & PHDR_802_11_HAS_MCS_INDEX) { + proto_tree_add_uint(radio_tree, hf_mcs_index, tvb, 0, 0, + pinfo->pseudo_header->ieee_802_11.mcs_index); + } + if (pinfo->pseudo_header->ieee_802_11.presence_flags & PHDR_802_11_HAS_CHANNEL) { proto_tree_add_uint(radio_tree, hf_channel, tvb, 0, 0, pinfo->pseudo_header->ieee_802_11.channel); @@ -151,6 +157,10 @@ static hf_register_info hf_radio[] = { {"Data Rate", "wlan.data_rate", FT_UINT64, BASE_DEC, NULL, 0, "Data rate (b/s)", HFILL }}, + {&hf_mcs_index, + {"MCS Index", "wlan.mcs_index", FT_UINT32, BASE_DEC, NULL, 0, + "MCS index", HFILL }}, + {&hf_channel, {"Channel", "wlan.channel", FT_UINT8, BASE_DEC, NULL, 0, "802.11 channel number that this frame was sent/received on", HFILL }}, |