diff options
Diffstat (limited to 'epan/dissectors/packet-ieee80211-airopeek.c')
-rw-r--r-- | epan/dissectors/packet-ieee80211-airopeek.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ieee80211-airopeek.c b/epan/dissectors/packet-ieee80211-airopeek.c index 6a321b6776..ff82d9892e 100644 --- a/epan/dissectors/packet-ieee80211-airopeek.c +++ b/epan/dissectors/packet-ieee80211-airopeek.c @@ -29,7 +29,7 @@ void proto_register_ieee80211_airopeek(void); void proto_reg_handoff_ieee80211_airopeek(void); -static dissector_handle_t ieee80211_handle; +static dissector_handle_t ieee80211_radio_handle; static int proto_airopeek = -1; @@ -47,6 +47,7 @@ dissect_airopeek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint8 data_rate; guint8 signal_level; tvbuff_t *next_tvb; + struct ieee_802_11_phdr phdr; col_set_str(pinfo->cinfo, COL_PROTOCOL, "AiroPeek"); col_clear(pinfo->cinfo, COL_INFO); @@ -57,7 +58,17 @@ dissect_airopeek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) airopeek_tree = proto_item_add_subtree(ti, ett_airopeek); } + /* We don't have any 802.11 metadata yet. */ + phdr.fcs_len = 0; + phdr.decrypted = FALSE; + phdr.datapad = FALSE; + phdr.presence_flags = + PHDR_802_11_HAS_CHANNEL| + PHDR_802_11_HAS_DATA_RATE| + PHDR_802_11_HAS_SIGNAL_PERCENT; + data_rate = tvb_get_guint8(tvb, 0); + phdr.data_rate = data_rate; /* Add the radio information to the column information */ col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%u.%u", data_rate / 2, @@ -70,6 +81,7 @@ dissect_airopeek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) data_rate & 1 ? 5 : 0); } + phdr.channel = tvb_get_guint8(tvb, 1); if (tree) proto_tree_add_item(airopeek_tree, hf_channel, tvb, 1, 1, ENC_BIG_ENDIAN); @@ -84,6 +96,7 @@ dissect_airopeek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * an adapter-dependent process, so, as we don't know what type of * adapter was used to do the capture, we can't do the conversion. */ + phdr.signal_percent = signal_level; col_add_fstr(pinfo->cinfo, COL_RSSI, "%u%%", signal_level); proto_tree_add_uint_format_value(airopeek_tree, hf_signal_strength, tvb, 2, 1, @@ -94,7 +107,7 @@ dissect_airopeek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* dissect the 802.11 header next */ pinfo->current_proto = "IEEE 802.11"; next_tvb = tvb_new_subset_remaining(tvb, 4); - call_dissector(ieee80211_handle, next_tvb, pinfo, tree); + call_dissector_with_data(ieee80211_radio_handle, next_tvb, pinfo, tree, &phdr); } void proto_register_ieee80211_airopeek(void) @@ -132,7 +145,7 @@ void proto_reg_handoff_ieee80211_airopeek(void) airopeek_handle = create_dissector_handle(dissect_airopeek, proto_airopeek); dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11_AIROPEEK, airopeek_handle); - ieee80211_handle = find_dissector("wlan"); + ieee80211_radio_handle = find_dissector("wlan_radio"); } /* |