forked from osmocom/wireshark
ieee80211: Dissect WFA WNM notification request
"Wi-fi Agile Multiband" specification also defines WFA vendor specific sub-elements for WNM notification request. For simplicity treat those sub-element as normal WFA vendor specific elements. This is OK as the 'OUI type' for those sub-elements doesn't clash with 'OUI type' defined for normal elements. Bug: 16494 Change-Id: Id2321ec283647a6db4be7f475fd5fc107596f854 Reviewed-on: https://code.wireshark.org/review/36869 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
parent
c7316b4c78
commit
adf3826e9f
|
@ -661,6 +661,8 @@ static const value_string wfa_subtype_vals[] = {
|
|||
{ WFA_SUBTYPE_IEEE1905_MULTI_AP, "IEEE1905 Multi-AP" },
|
||||
{ WFA_SUBTYPE_OWE_TRANSITION_MODE, "OWE Transition Mode" },
|
||||
{ WFA_SUBTYPE_WIFI_60G, "60GHz Information Element" },
|
||||
{ WFA_WNM_SUBTYPE_NON_PREF_CHAN_REPORT, "Non-preferred Channel Report" },
|
||||
{ WFA_WNM_SUBTYPE_CELL_DATA_CAPABILITIES, "Cellular Data Capabilities" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
@ -14393,6 +14395,50 @@ dissect_mbo_oce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
|
|||
return offset;
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_wfa_wnm_non_pref_chan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int len = tvb_reported_length(tvb);
|
||||
int offset = 0;
|
||||
|
||||
if (len == 0)
|
||||
return 0;
|
||||
|
||||
if (len < 3) {
|
||||
expert_add_info(pinfo, tree, &ei_ieee80211_bad_length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
proto_tree_add_item(tree, hf_ieee80211_wfa_ie_mbo_non_pref_chan_op_class, tvb, offset, 1, ENC_NA);
|
||||
offset ++;
|
||||
len --;
|
||||
while (len > 2) {
|
||||
proto_tree_add_item(tree, hf_ieee80211_wfa_ie_mbo_non_pref_chan_chan, tvb, offset, 1, ENC_NA);
|
||||
offset ++;
|
||||
len --;
|
||||
}
|
||||
|
||||
proto_tree_add_item(tree, hf_ieee80211_wfa_ie_mbo_non_pref_chan_pref, tvb, offset, 1, ENC_NA);
|
||||
offset ++;
|
||||
proto_tree_add_item(tree, hf_ieee80211_wfa_ie_mbo_non_pref_chan_reason, tvb, offset, 1, ENC_NA);
|
||||
offset ++;
|
||||
return offset;
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_wfa_wnm_cell_cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int len = tvb_reported_length(tvb);
|
||||
|
||||
if (len != 1) {
|
||||
expert_add_info(pinfo, tree, &ei_ieee80211_bad_length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
proto_tree_add_item(tree, hf_ieee80211_wfa_ie_mbo_cellular_cap, tvb, 0, 1, ENC_NA);
|
||||
return len;
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_vendor_ie_wfa(packet_info *pinfo, proto_item *item, tvbuff_t *tag_tvb)
|
||||
{
|
||||
|
@ -39432,6 +39478,8 @@ proto_reg_handoff_ieee80211(void)
|
|||
dissector_add_uint("wlan.ie.wifi_alliance.subtype", WFA_SUBTYPE_OWE_TRANSITION_MODE, create_dissector_handle(dissect_owe_transition_mode, -1));
|
||||
dissector_add_uint("wlan.ie.wifi_alliance.subtype", WFA_SUBTYPE_WIFI_60G, create_dissector_handle(dissect_wfa_60g_ie, -1));
|
||||
dissector_add_uint("wlan.ie.wifi_alliance.subtype", WFA_SUBTYPE_MBO_OCE, create_dissector_handle(dissect_mbo_oce, -1));
|
||||
dissector_add_uint("wlan.ie.wifi_alliance.subtype", WFA_WNM_SUBTYPE_NON_PREF_CHAN_REPORT, create_dissector_handle(dissect_wfa_wnm_non_pref_chan, -1));
|
||||
dissector_add_uint("wlan.ie.wifi_alliance.subtype", WFA_WNM_SUBTYPE_CELL_DATA_CAPABILITIES, create_dissector_handle(dissect_wfa_wnm_cell_cap, -1));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -304,6 +304,10 @@ typedef struct anqp_info_dissector_data {
|
|||
#define WFA_ANQP_SUBTYPE_HS20 17
|
||||
#define WFA_ANQP_SUBTYPE_MBO 18
|
||||
|
||||
/* WFA WNM notification request subtypes */
|
||||
#define WFA_WNM_SUBTYPE_NON_PREF_CHAN_REPORT 2
|
||||
#define WFA_WNM_SUBTYPE_CELL_DATA_CAPABILITIES 3
|
||||
|
||||
/* Information Element tags */
|
||||
#define TAG_SSID 0
|
||||
#define TAG_SUPP_RATES 1
|
||||
|
|
Loading…
Reference in New Issue