FIELD_MESH_CONTROL,
FIELD_SELFPROT_ACTION,
FIELD_WNM_ACTION_CODE,
+ FIELD_KEY_DATA_LENGTH,
+ FIELD_WNM_NOTIFICATION_TYPE,
/* add any new fixed field value above this line */
MAX_FIELD_NUM
};
#define TAG_BSS_MAX_IDLE_PERIOD 90
#define TAG_TFS_REQUEST 91
#define TAG_TFS_RESPONSE 92
-#define TAG_WMM_SLEEP_MODE 93
+#define TAG_WNM_SLEEP_MODE 93
#define TAG_TIM_BROADCAST_REQUEST 94
#define TAG_TIM_BROADCAST_RESPONSE 95
#define TAG_COLLOCATED_INTER_REPORT 96
#define TAG_MESH_PREQ 130 /* IEEE Std 802.11s-2011 */
#define TAG_MESH_PREP 131 /* IEEE Std 802.11s-2011 */
#define TAG_MESH_PERR 132 /* IEEE Std 802.11s-2011 */
-#define TAG_CISCO_CCX1_CKIP 133 /* Cisco Compatible eXtensions */
-#define TAG_CISCO_UNKNOWN_88 136 /* Cisco Compatible eXtensions? */
+#define TAG_CISCO_CCX1_CKIP 133 /* Cisco Compatible eXtensions v1 */
+#define TAG_CISCO_CCX2 136 /* Cisco Compatible eXtensions v2 */
#define TAG_PXU 137
#define TAG_PXUC 138
#define TAG_AUTH_MESH_PEERING_EXCH 139
#define TAG_MIC 140
#define TAG_DESTINATION_URI 141
#define TAG_U_APSD_COEX 142
-#define TAG_CISCO_UNKNOWN_95 149 /* Cisco Compatible eXtensions */
+#define TAG_CISCO_CCX3 149 /* Cisco Compatible eXtensions v3 */
#define TAG_CISCO_UNKNOWN_96 150 /* Cisco Compatible eXtensions */
#define TAG_SYMBOL_PROPRIETARY 173
#define TAG_MCCAOP_ADVERTISSEMENT_OV 174
{ TAG_BSS_AVB_ADM_CAPACITY, "BSS Available Admission Capacity" },
{ TAG_IE_68_CONFLICT, "BSS AC Access Delay/WAPI Parameter Set" },
{ TAG_TIME_ADV, "Time Advertisement" },
- { TAG_RM_ENABLED_CAPABILITY, "RM Enabled Capabilites" },
+ { TAG_RM_ENABLED_CAPABILITY, "RM Enabled Capabilities" },
{ TAG_MULTIPLE_BSSID, "Multiple BSSID" },
{ TAG_20_40_BSS_CO_EX, "20/40 BSS Coexistence" },
{ TAG_20_40_BSS_INTOL_CH_REP, "20/40 BSS Intolerant Channel Report" }, /* IEEE P802.11n/D6.0 */
{ TAG_BSS_MAX_IDLE_PERIOD, "BSS Max Idle Period" },
{ TAG_TFS_REQUEST, "TFS Request" },
{ TAG_TFS_RESPONSE, "TFS Response" },
- { TAG_WMM_SLEEP_MODE, "WMM Sleep Mode" },
+ { TAG_WNM_SLEEP_MODE, "WNM-Sleep Mode" },
{ TAG_TIM_BROADCAST_REQUEST, "TIM Broadcast Request" },
{ TAG_TIM_BROADCAST_RESPONSE, "TIM Broadcast Response" },
{ TAG_COLLOCATED_INTER_REPORT, "Collocated Interference Report" },
{ TAG_MESH_PREP, "Path Reply" },
{ TAG_MESH_PERR, "Path Error" },
{ TAG_CISCO_CCX1_CKIP, "Cisco CCX1 CKIP + Device Name" },
- { TAG_CISCO_UNKNOWN_88, "Cisco Unknown 88" },
+ { TAG_CISCO_CCX2, "Cisco CCX2" },
{ TAG_PXU, "Proxy Update" },
{ TAG_PXUC, "Proxy Update Confirmation"},
{ TAG_AUTH_MESH_PEERING_EXCH, "Auhenticated Mesh Perring Exchange" },
{ TAG_MIC, "MIC (Message Integrity Code)" },
{ TAG_DESTINATION_URI, "Destination URI" },
{ TAG_U_APSD_COEX, "U-APSD Coexistence" },
- { TAG_CISCO_UNKNOWN_95, "Cisco Unknown 95" },
+ { TAG_CISCO_CCX3, "Cisco Unknown 95" },
{ TAG_CISCO_UNKNOWN_96, "Cisco Unknown 96" },
{ TAG_SYMBOL_PROPRIETARY, "Symbol Proprietary" },
{ TAG_MCCAOP_ADVERTISSEMENT_OV, "MCCAOP Advertissement Overviw" },
};
static value_string_ext tag_num_vals_ext = VALUE_STRING_EXT_INIT(tag_num_vals);
-#define WPA_OUI (const guint8 *) "\x00\x50\xF2"
-#define RSN_OUI (const guint8 *) "\x00\x0F\xAC"
-#define WME_OUI (const guint8 *) "\x00\x50\xF2"
-#define PRE_11N_OUI (const guint8 *) "\x00\x90\x4c" /* 802.11n pre 1 oui */
-#define WFA_OUI (const guint8 *) "\x50\x6f\x9a"
-#define WAPI_OUI (const guint8 *) "\x00\x14\x72"
-
/* WFA vendor specific subtypes */
#define WFA_SUBTYPE_P2P 9
+#define WFA_SUBTYPE_WIFI_DISPLAY 10
+#define WFA_SUBTYPE_HS20_INDICATION 16
+#define WFA_SUBTYPE_HS20_ANQP 17
+
+static const value_string wfa_subtype_vals[] = {
+ { WFA_SUBTYPE_P2P, "P2P" },
+ { WFA_SUBTYPE_HS20_INDICATION, "Hotspot 2.0 Indication" },
+ { WFA_SUBTYPE_HS20_ANQP, "Hotspot 2.0 ANQP" },
+ { 0, NULL }
+};
/* ************************************************************************* */
/* Supported Rates (7.3.2.2) */
};
static value_string_ext wnm_action_codes_ext = VALUE_STRING_EXT_INIT(wnm_action_codes);
+
+static const value_string wnm_notification_types[] = {
+ { 0, "Firmware Update Notification" },
+ { 1, "Reserved for use by WFA" },
+ { 221, "Vendor Specific" },
+ { 0, NULL }
+};
+
+static value_string_ext wnm_notification_types_ext =
+ VALUE_STRING_EXT_INIT(wnm_notification_types);
+
/*** End: Action Fixed Parameter ***/
static const value_string ieee80211_tag_measure_request_type_flags[] = {
{ 0x00, NULL }
};
+static const value_string ieee80211_ht_pren_type_vals[] = {
+ { 51, "HT Capabilities (802.11n D1.10)" },
+ { 52, "HT Additional Capabilities (802.11n D1.00)" },
+ { 0, NULL }
+};
+
static int proto_wlan = -1;
static int proto_aggregate = -1;
-static packet_info * g_pinfo;
static gboolean ieee80211_tvb_invalid = FALSE;
/* ************************************************************************* */
static int hf_ieee80211_ff_target_channel = -1;
static int hf_ieee80211_ff_regulatory_class = -1;
static int hf_ieee80211_ff_wnm_action_code = -1;
+static int hf_ieee80211_ff_key_data_length = -1;
+static int hf_ieee80211_ff_key_data = -1;
+static int hf_ieee80211_ff_wnm_notification_type = -1;
static int hf_ieee80211_ff_request_mode_pref_cand = -1;
static int hf_ieee80211_ff_request_mode_abridged = -1;
static int hf_ieee80211_ff_request_mode_disassoc_imminent = -1;
static int hf_ieee80211_tag_measure_request_peer_mac_address = -1;
static int hf_ieee80211_tag_measure_request_group_id = -1;
+static int hf_ieee80211_ht_pren_type = -1;
+static int hf_ieee80211_ht_pren_unknown = -1;
+
static int hf_ieee80211_ht_cap = -1;
static int hf_ieee80211_ht_vs_cap = -1;
static int hf_ieee80211_ht_ldpc_coding = -1;
static int hf_ieee80211_tag_cisco_ccx1_unknown = -1;
static int hf_ieee80211_tag_cisco_ccx1_name = -1;
static int hf_ieee80211_tag_cisco_ccx1_clients = -1;
+static int hf_ieee80211_tag_cisco_ccx1_unknown2 = -1;
static int hf_ieee80211_vht_cap = -1;
static int hf_ieee80211_vht_max_mpdu_length = -1;
static int hf_ieee80211_tag_time_adv_time_error = -1;
static int hf_ieee80211_tag_time_adv_time_update_counter = -1;
+/* IEEE Std 802.11-2012 8.4.2.81 */
+static int hf_ieee80211_tag_bss_max_idle_period = -1;
+static int hf_ieee80211_tag_bss_max_idle_options_protected = -1;
+
+/* IEEE Std 802.11-2012 8.4.2.82 */
+static int hf_ieee80211_tag_tfs_request_id = -1;
+static int hf_ieee80211_tag_tfs_request_ac_delete_after_match = -1;
+static int hf_ieee80211_tag_tfs_request_ac_notify = -1;
+static int hf_ieee80211_tag_tfs_request_subelem_id = -1;
+static int hf_ieee80211_tag_tfs_request_subelem_len = -1;
+static int hf_ieee80211_tag_tfs_request_subelem = -1;
+
+/* IEEE Std 802.11-2012 8.4.2.83 */
+static int hf_ieee80211_tag_tfs_response_subelem_id = -1;
+static int hf_ieee80211_tag_tfs_response_subelem_len = -1;
+static int hf_ieee80211_tag_tfs_response_subelem = -1;
+static int hf_ieee80211_tag_tfs_response_status = -1;
+static int hf_ieee80211_tag_tfs_response_id = -1;
+
+/* IEEE Std 802.11-2012 8.4.2.84 */
+static int hf_ieee80211_tag_wnm_sleep_mode_action_type = -1;
+static int hf_ieee80211_tag_wnm_sleep_mode_response_status = -1;
+static int hf_ieee80211_tag_wnm_sleep_mode_interval = -1;
+
/* IEEE Std 802.11v-2011 7.3.2.87 */
static int hf_ieee80211_tag_time_zone = -1;
static int hf_ieee80211_aironet_ie_type = -1;
static int hf_ieee80211_aironet_ie_version = -1;
static int hf_ieee80211_aironet_ie_data = -1;
-static int hf_ieee80211_aironet_ie_qos_unk1 = -1;
+static int hf_ieee80211_aironet_ie_qos_reserved = -1;
static int hf_ieee80211_aironet_ie_qos_paramset = -1;
static int hf_ieee80211_aironet_ie_qos_val = -1;
+static int hf_ieee80211_vs_aruba_subtype = -1;
+static int hf_ieee80211_vs_aruba_apname = -1;
+static int hf_ieee80211_vs_aruba_data = -1;
+
static int hf_ieee80211_rsn_ie_pmkid = -1;
static int hf_ieee80211_rsn_ie_unknown = -1;
static int hf_ieee80211_tclas_up = -1;
static int hf_ieee80211_tclas_class_type = -1;
static int hf_ieee80211_tclas_class_mask = -1;
+static int hf_ieee80211_tclas_class_mask0_src_addr = -1;
+static int hf_ieee80211_tclas_class_mask0_dst_addr = -1;
+static int hf_ieee80211_tclas_class_mask0_type = -1;
+static int hf_ieee80211_tclas_class_mask1_ver = -1;
+static int hf_ieee80211_tclas_class_mask1_src_ip = -1;
+static int hf_ieee80211_tclas_class_mask1_dst_ip = -1;
+static int hf_ieee80211_tclas_class_mask1_src_port = -1;
+static int hf_ieee80211_tclas_class_mask1_dst_port = -1;
+static int hf_ieee80211_tclas_class_mask1_ipv4_dscp = -1;
+static int hf_ieee80211_tclas_class_mask1_ipv4_proto = -1;
+static int hf_ieee80211_tclas_class_mask1_ipv6_flow = -1;
+static int hf_ieee80211_tclas_class_mask2_tci = -1;
static int hf_ieee80211_tclas_src_mac_addr = -1;
static int hf_ieee80211_tclas_dst_mac_addr = -1;
static int hf_ieee80211_tclas_ether_type = -1;
static int hf_ieee80211_aruba_mtu = -1;
static int hf_ieee80211_tag_vendor_oui_type = -1;
+static int hf_ieee80211_tag_vendor_data = -1;
/* IEEE Std 802.11z-2010 7.3.2.62 */
static int hf_ieee80211_tag_link_id_bssid = -1;
/* Ethertype 89-0d */
static int hf_ieee80211_data_encap_payload_type = -1;
+static int hf_ieee80211_anqp_wfa_subtype = -1;
+
+/* Hotspot 2.0 */
+static int hf_hs20_indication_dgaf_disabled = -1;
+
+static int hf_hs20_anqp_subtype = -1;
+static int hf_hs20_anqp_reserved = -1;
+static int hf_hs20_anqp_payload = -1;
+static int hf_hs20_anqp_hs_query_list = -1;
+static int hf_hs20_anqp_hs_capability_list = -1;
+static int hf_hs20_anqp_ofn_length = -1;
+static int hf_hs20_anqp_ofn_language = -1;
+static int hf_hs20_anqp_ofn_name = -1;
+static int hf_hs20_anqp_wan_metrics_link_status = -1;
+static int hf_hs20_anqp_wan_metrics_symmetric_link = -1;
+static int hf_hs20_anqp_wan_metrics_at_capacity = -1;
+static int hf_hs20_anqp_wan_metrics_reserved = -1;
+static int hf_hs20_anqp_wan_metrics_downlink_speed = -1;
+static int hf_hs20_anqp_wan_metrics_uplink_speed = -1;
+static int hf_hs20_anqp_wan_metrics_downlink_load = -1;
+static int hf_hs20_anqp_wan_metrics_uplink_load = -1;
+static int hf_hs20_anqp_wan_metrics_lmd = -1;
+static int hf_hs20_anqp_cc_proto_ip_proto = -1;
+static int hf_hs20_anqp_cc_proto_port_num = -1;
+static int hf_hs20_anqp_cc_proto_status = -1;
+static int hf_hs20_anqp_nai_hrq_count = -1;
+static int hf_hs20_anqp_nai_hrq_encoding_type = -1;
+static int hf_hs20_anqp_nai_hrq_length = -1;
+static int hf_hs20_anqp_nai_hrq_realm_name = -1;
+static int hf_hs20_anqp_oper_class_indic = -1;
+
/* ************************************************************************* */
/* Protocol trees */
/* ************************************************************************* */
static gint ett_tag_rm_cap3 = -1;
static gint ett_tag_rm_cap4 = -1;
static gint ett_tag_rm_cap5 = -1;
-
+static gint ett_tag_tclas_mask_tree = -1;
static gint ett_tag_supported_channels = -1;
static gint ett_tag_ric_data_desc_ie = -1;
static gint ett_anqp_vendor_capab = -1;
+static gint ett_hs20_cc_proto_port_tuple = -1;
+
+static gint ett_ssid_list = -1;
+
static const fragment_items frag_items = {
&ett_fragment,
&ett_fragments,
}
static void
-dissect_anqp_query_list(proto_tree *tree, tvbuff_t *tvb, int offset, int end)
+dissect_anqp_query_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
{
while (offset + 2 <= end) {
proto_tree_add_item(tree, hf_ieee80211_ff_anqp_query_id,
offset += 2;
}
if (offset != end) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"Unexpected ANQP Query list format");
}
}
+static void dissect_hs20_anqp_hs_capability_list(proto_tree *tree,
+ tvbuff_t *tvb,
+ int offset, int end)
+{
+ while (offset < end) {
+ proto_tree_add_item(tree, hf_hs20_anqp_hs_capability_list,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ }
+}
+
static void
-dissect_anqp_capab_list(proto_tree *tree, tvbuff_t *tvb, int offset, int end)
+dissect_anqp_capab_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
{
guint16 id, len;
proto_item *item;
proto_tree *vtree;
guint32 oui;
+ guint8 subtype;
while (offset + 2 <= end) {
id = tvb_get_letohs(tvb, offset);
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
if ((len < 3) || ((offset + len) > end)) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"Invalid vendor-specific ANQP capability");
return;
}
len -= 3;
switch (oui) {
+ case OUI_WFA:
+ if (len == 0)
+ break;
+ subtype = tvb_get_guint8(tvb, offset);
+ proto_item_append_text(vtree, " - WFA - %s",
+ val_to_str(subtype, wfa_subtype_vals,
+ "Unknown (%u)"));
+ proto_tree_add_item(vtree, hf_ieee80211_anqp_wfa_subtype,
+ tvb, offset, 1, ENC_NA);
+ offset++;
+ len--;
+ switch (subtype) {
+ case WFA_SUBTYPE_HS20_ANQP:
+ dissect_hs20_anqp_hs_capability_list(vtree, tvb, offset, end);
+ break;
+ default:
+ proto_tree_add_item(vtree, hf_ieee80211_ff_anqp_capability_vendor,
+ tvb, offset, len, ENC_NA);
+ break;
+ }
+ break;
default:
proto_tree_add_item(vtree, hf_ieee80211_ff_anqp_capability_vendor,
tvb, offset, len, ENC_NA);
}
}
if (offset != end) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"Unexpected ANQP Capability list format");
}
}
}
static void
-dissect_venue_name_info(proto_tree *tree, tvbuff_t *tvb, int offset, int end)
+dissect_venue_name_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
{
proto_item *item;
tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if ((vlen > (end - offset)) || (vlen < 3)) {
- expert_add_info_format(g_pinfo, item, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
"Invalid Venue Name Duple length");
break;
}
proto_tree_add_item(tree, hf_ieee80211_ff_anqp_venue_language,
tvb, offset, 3, ENC_ASCII|ENC_NA);
proto_tree_add_item(tree, hf_ieee80211_ff_anqp_venue_name,
- tvb, offset + 3, vlen - 3, ENC_ASCII|ENC_NA);
+ tvb, offset + 3, vlen - 3, ENC_UTF_8|ENC_NA);
offset += vlen;
}
}
}
static void
-dissect_roaming_consortium_list(proto_tree *tree, tvbuff_t *tvb, int offset,
+dissect_roaming_consortium_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
int end)
{
proto_item *item;
tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if ((len > (end - offset)) || (len < 3)) {
- expert_add_info_format(g_pinfo, item, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
"Invalid Roaming Consortium OI");
break;
}
};
static void
-dissect_nai_realm_list(proto_tree *tree, tvbuff_t *tvb, int offset, int end)
+dissect_nai_realm_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
{
guint16 count, len;
proto_item *item, *r_item;
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
if (offset + len > end) {
- expert_add_info_format(g_pinfo, item, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
"Invalid NAI Realm List");
break;
}
tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
if (offset + nai_len > f_end) {
- expert_add_info_format(g_pinfo, item, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
"Invalid NAI Realm Data");
break;
}
tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
if (offset + eap_len > f_end) {
- expert_add_info_format(g_pinfo, item, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
"Invalid EAP Method subfield");
break;
}
}
}
+#define HS20_ANQP_HS_QUERY_LIST 1
+#define HS20_ANQP_HS_CAPABILITY_LIST 2
+#define HS20_ANQP_OPERATOR_FRIENDLY_NAME 3
+#define HS20_ANQP_WAN_METRICS 4
+#define HS20_ANQP_CONNECTION_CAPABILITY 5
+#define HS20_ANQP_NAI_HOME_REALM_QUERY 6
+#define HS20_ANQP_OPERATING_CLASS_INDICATION 7
+
+static const value_string hs20_anqp_subtype_vals[] = {
+ { HS20_ANQP_HS_QUERY_LIST, "HS Query list" },
+ { HS20_ANQP_HS_CAPABILITY_LIST, "HS Capability List" },
+ { HS20_ANQP_OPERATOR_FRIENDLY_NAME, "Operator Friendly Name" },
+ { HS20_ANQP_WAN_METRICS, "WAN Metrics" },
+ { HS20_ANQP_CONNECTION_CAPABILITY, "Connection Capability" },
+ { HS20_ANQP_NAI_HOME_REALM_QUERY, "NAI Home Realm Query" },
+ { HS20_ANQP_OPERATING_CLASS_INDICATION, "Operating Class Indication" },
+ { 0, NULL }
+};
+
+static void dissect_hs20_anqp_hs_query_list(proto_tree *tree, tvbuff_t *tvb,
+ int offset, int end)
+{
+ while (offset < end) {
+ proto_tree_add_item(tree, hf_hs20_anqp_hs_query_list,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ }
+}
+
+static void dissect_hs20_anqp_operator_friendly_name(proto_tree *tree,
+ tvbuff_t *tvb, packet_info *pinfo,
+ int offset, int end)
+{
+ while (offset + 4 <= end) {
+ guint8 vlen = tvb_get_guint8(tvb, offset);
+ proto_item *item = proto_tree_add_item(tree, hf_hs20_anqp_ofn_length,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ if (vlen > end - offset || vlen < 3) {
+ expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
+ "Invalid Operator Friendly Name Duple length");
+ break;
+ }
+ proto_tree_add_item(tree, hf_hs20_anqp_ofn_language,
+ tvb, offset, 3, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_hs20_anqp_ofn_name,
+ tvb, offset + 3, vlen - 3, ENC_UTF_8|ENC_NA);
+ offset += vlen;
+ }
+}
+
+static const value_string hs20_wm_link_status_vals[] = {
+ { 0, "Reserved" },
+ { 1, "Link up" },
+ { 2, "Link down" },
+ { 3, "Link in test state" },
+ { 0, NULL }
+};
+
+static void dissect_hs20_anqp_wan_metrics(proto_tree *tree, tvbuff_t *tvb,
+ int offset, gboolean request)
+{
+ if (request)
+ return;
+
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_link_status,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_symmetric_link,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_at_capacity,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_reserved,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_downlink_speed,
+ tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ offset += 4;
+
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_uplink_speed,
+ tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ offset += 4;
+
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_downlink_load,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_uplink_load,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+
+ proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_lmd,
+ tvb, offset, 2, ENC_LITTLE_ENDIAN);
+}
+
+static const value_string hs20_cc_status_vals[] = {
+ { 0, "Closed" },
+ { 1, "Open" },
+ { 2, "Unknown" },
+ { 0, NULL }
+};
+
+static void
+dissect_hs20_anqp_connection_capability(proto_tree *tree, tvbuff_t *tvb,
+ int offset, int end)
+{
+ proto_item *item;
+ proto_tree *tuple;
+ while (offset + 4 <= end) {
+ guint8 ip_proto, status;
+ guint16 port_num;
+
+ ip_proto = tvb_get_guint8(tvb, offset);
+ port_num = tvb_get_letohs(tvb, offset + 1);
+ status = tvb_get_guint8(tvb, offset + 3);
+
+ item = proto_tree_add_text(tree, tvb, offset, 4, "ProtoPort Tuple - "
+ "ip_proto=%u port_num=%u status=%s",
+ ip_proto, port_num,
+ val_to_str(status, hs20_cc_status_vals,
+ "Unknown (%u)"));
+ tuple = proto_item_add_subtree(item, ett_hs20_cc_proto_port_tuple);
+ proto_tree_add_item(tuple, hf_hs20_anqp_cc_proto_ip_proto,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tuple, hf_hs20_anqp_cc_proto_port_num,
+ tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tuple, hf_hs20_anqp_cc_proto_status,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ }
+}
+
+static void
+dissect_hs20_anqp_nai_home_realm_query(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
+ int offset, int end)
+{
+ guint8 len;
+ proto_item *item;
+
+ proto_tree_add_item(tree, hf_hs20_anqp_nai_hrq_count,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+
+ while (offset + 2 <= end) {
+ proto_tree_add_item(tree, hf_hs20_anqp_nai_hrq_encoding_type,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ len = tvb_get_guint8(tvb, offset);
+ item = proto_tree_add_item(tree, hf_hs20_anqp_nai_hrq_length,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ if (offset + len > end) {
+ expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
+ "Invalid NAI Home Realm Query length");
+ break;
+ }
+ proto_tree_add_item(tree, hf_hs20_anqp_nai_hrq_realm_name,
+ tvb, offset, len, ENC_ASCII|ENC_NA);
+ offset += len;
+ }
+}
+
+static void dissect_hs20_anqp_oper_class_indic(proto_tree *tree, tvbuff_t *tvb,
+ int offset, int end)
+{
+ while (offset < end) {
+ proto_tree_add_item(tree, hf_hs20_anqp_oper_class_indic,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ }
+}
+
+static void dissect_hs20_anqp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
+ int end, gboolean request, int idx)
+{
+ guint8 subtype;
+
+ subtype = tvb_get_guint8(tvb, offset);
+ proto_item_append_text(tree, " - HS 2.0 %s",
+ val_to_str(subtype, hs20_anqp_subtype_vals,
+ "Unknown (%u)"));
+ if (idx == 0) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " HS 2.0 %s",
+ val_to_str(subtype, hs20_anqp_subtype_vals,
+ "Unknown (%u)"));
+ } else if (idx == 1) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", ..");
+ }
+ proto_tree_add_item(tree, hf_hs20_anqp_subtype, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ offset++;
+
+ proto_tree_add_item(tree, hf_hs20_anqp_reserved, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ offset++;
+
+ switch (subtype) {
+ case HS20_ANQP_HS_QUERY_LIST:
+ dissect_hs20_anqp_hs_query_list(tree, tvb, offset, end);
+ break;
+ case HS20_ANQP_HS_CAPABILITY_LIST:
+ dissect_hs20_anqp_hs_capability_list(tree, tvb, offset, end);
+ break;
+ case HS20_ANQP_OPERATOR_FRIENDLY_NAME:
+ dissect_hs20_anqp_operator_friendly_name(tree, tvb, pinfo, offset, end);
+ break;
+ case HS20_ANQP_WAN_METRICS:
+ dissect_hs20_anqp_wan_metrics(tree, tvb, offset, request);
+ break;
+ case HS20_ANQP_CONNECTION_CAPABILITY:
+ dissect_hs20_anqp_connection_capability(tree, tvb, offset, end);
+ break;
+ case HS20_ANQP_NAI_HOME_REALM_QUERY:
+ dissect_hs20_anqp_nai_home_realm_query(tree, tvb, pinfo, offset, end);
+ break;
+ case HS20_ANQP_OPERATING_CLASS_INDICATION:
+ dissect_hs20_anqp_oper_class_indic(tree, tvb, offset, end);
+ break;
+ default:
+ if (offset == end)
+ break;
+ proto_tree_add_item(tree, hf_hs20_anqp_payload, tvb, offset,
+ end - offset, ENC_NA);
+ break;
+ }
+}
+
static int
-dissect_anqp_info(proto_tree *tree, tvbuff_t *tvb, int offset,
+dissect_anqp_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
gboolean request, int idx)
{
guint16 id, len;
guint32 oui;
- guint8 subtype;
proto_item *item;
item = proto_tree_add_item(tree, hf_ieee80211_ff_anqp_info_id,
if (idx == 0) {
proto_item_append_text(tree, " - %s",
val_to_str_ext(id, &anqp_info_id_vals_ext, "Unknown (%u)"));
- col_append_fstr(g_pinfo->cinfo, COL_INFO, " %s",
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
val_to_str_ext(id, &anqp_info_id_vals_ext, "Unknown (%u)"));
} else if (idx == 1) {
proto_item_append_text(tree, ", ..");
- col_append_fstr(g_pinfo->cinfo, COL_INFO, ", ..");
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", ..");
}
}
tree = proto_item_add_subtree(item, ett_gas_anqp);
len = tvb_get_letohs(tvb, offset);
offset += 2;
if (tvb_reported_length_remaining(tvb, offset) < len) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"Invalid ANQP Info length");
return 4 + len;
}
switch (id)
{
case ANQP_INFO_ANQP_QUERY_LIST:
- dissect_anqp_query_list(tree, tvb, offset, offset + len);
+ dissect_anqp_query_list(tree, tvb, pinfo, offset, offset + len);
break;
case ANQP_INFO_ANQP_CAPAB_LIST:
- dissect_anqp_capab_list(tree, tvb, offset, offset + len);
+ dissect_anqp_capab_list(tree, tvb, pinfo, offset, offset + len);
break;
case ANQP_INFO_VENUE_NAME_INFO:
- dissect_venue_name_info(tree, tvb, offset, offset + len);
+ dissect_venue_name_info(tree, tvb, pinfo, offset, offset + len);
break;
case ANQP_INFO_NETWORK_AUTH_TYPE_INFO:
dissect_network_auth_type(tree, tvb, offset, offset + len);
break;
case ANQP_INFO_ROAMING_CONSORTIUM_LIST:
- dissect_roaming_consortium_list(tree, tvb, offset, offset + len);
+ dissect_roaming_consortium_list(tree, tvb, pinfo, offset, offset + len);
break;
case ANQP_INFO_IP_ADDR_TYPE_AVAILABILITY_INFO:
dissect_ip_addr_type_availability_info(tree, tvb, offset);
break;
case ANQP_INFO_NAI_REALM_LIST:
- dissect_nai_realm_list(tree, tvb, offset, offset + len);
+ dissect_nai_realm_list(tree, tvb, pinfo, offset, offset + len);
break;
case ANQP_INFO_3GPP_CELLULAR_NETWORK_INFO:
dissect_3gpp_cellular_network_info(tree, tvb, offset);
switch (oui) {
case OUI_WFA:
- subtype = tvb_get_guint8(tvb, offset);
- if (subtype == WFA_SUBTYPE_P2P) {
- proto_tree_add_text(tree, tvb, offset, 1, "Subtype %u: P2P ANQP",
- subtype);
- dissect_wifi_p2p_anqp(g_pinfo, tree, tvb, offset + 1, request);
- } else {
- proto_tree_add_text(tree, tvb, offset, 1, "Subtype %u", subtype);
+ proto_tree_add_item(tree, hf_ieee80211_anqp_wfa_subtype, tvb, offset, 1,
+ ENC_NA);
+ switch (tvb_get_guint8(tvb, offset)) {
+ case WFA_SUBTYPE_P2P:
+ dissect_wifi_p2p_anqp(pinfo, tree, tvb, offset + 1, request);
+ break;
+ case WFA_SUBTYPE_HS20_ANQP:
+ dissect_hs20_anqp(tree, tvb, pinfo, offset + 1, offset + len - 3, request,
+ idx);
+ break;
}
break;
default:
}
static void
-dissect_anqp(proto_tree *tree, tvbuff_t *tvb, int offset, gboolean request)
+dissect_anqp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, gboolean request)
{
int idx = 0;
proto_item_append_text(tree, ": ANQP ");
proto_item_append_text(tree, request ? "Request" : "Response");
if (tvb_reported_length_remaining(tvb, offset) < 4) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"Not enough room for ANQP header");
return;
}
- col_append_fstr(g_pinfo->cinfo, COL_INFO, ", ANQP %s",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", ANQP %s",
request ? "Req" : "Resp");
while (tvb_reported_length_remaining(tvb, offset) > 0) {
- offset += dissect_anqp_info(tree, tvb, offset, request, idx);
+ offset += dissect_anqp_info(tree, tvb, pinfo, offset, request, idx);
idx += 1;
}
}
static guint
-dissect_gas_initial_request(proto_tree *tree, tvbuff_t *tvb, int offset,
+dissect_gas_initial_request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
gboolean anqp)
{
guint16 req_len;
item = proto_tree_add_text(tree, tvb, offset, 2 + req_len, "Query Request");
if (tvb_reported_length_remaining(tvb, offset) < 2 + req_len) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"Invalid Query Request Length");
return tvb_reported_length_remaining(tvb, offset);
}
* Advertisement Protocol IE)
*/
if (anqp)
- dissect_anqp(query, tvb, offset, TRUE);
+ dissect_anqp(query, tvb, pinfo, offset, TRUE);
else
proto_tree_add_item(query, hf_ieee80211_ff_query_request,
tvb, offset, req_len, ENC_NA);
}
static guint
-dissect_gas_initial_response(proto_tree *tree, tvbuff_t *tvb, int offset,
+dissect_gas_initial_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
gboolean anqp)
{
guint16 resp_len;
item = proto_tree_add_text(tree, tvb, offset, 2 + resp_len,
"Query Response");
if (tvb_reported_length_remaining(tvb, offset) < 2 + resp_len) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"Invalid Query Response Length");
return tvb_reported_length_remaining(tvb, offset);
}
/* Query Response (optional) */
if (resp_len) {
if (anqp)
- dissect_anqp(query, tvb, offset, FALSE);
+ dissect_anqp(query, tvb, pinfo, offset, FALSE);
else
proto_tree_add_item(query, hf_ieee80211_ff_query_response,
tvb, offset, resp_len, ENC_NA);
};
static guint
-dissect_gas_comeback_response(proto_tree *tree, tvbuff_t *tvb, int offset,
+dissect_gas_comeback_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
gboolean anqp, guint8 frag, gboolean more,
guint8 dialog_token)
{
item = proto_tree_add_text(tree, tvb, offset, 2 + resp_len,
"Query Response");
if (tvb_reported_length_remaining(tvb, offset) < 2 + resp_len) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"Invalid Query Response Length");
return tvb_reported_length_remaining(tvb, offset);
}
/* Query Response (optional) */
if (resp_len) {
if (anqp && (frag == 0) && !more)
- dissect_anqp(query, tvb, offset, FALSE);
+ dissect_anqp(query, tvb, pinfo, offset, FALSE);
else {
fragment_data *frag_msg;
gboolean save_fragmented;
tvbuff_t *new_tvb;
- save_fragmented = g_pinfo->fragmented;
- g_pinfo->fragmented = TRUE;
+ save_fragmented = pinfo->fragmented;
+ pinfo->fragmented = TRUE;
frag_msg = fragment_add_seq_check(&gas_reassembly_table, tvb, offset,
- g_pinfo, dialog_token, NULL,
+ pinfo, dialog_token, NULL,
frag, resp_len, more);
- new_tvb = process_reassembled_data(tvb, offset, g_pinfo,
+ new_tvb = process_reassembled_data(tvb, offset, pinfo,
"Reassembled GAS Query Response",
frag_msg, &gas_resp_frag_items,
NULL, tree);
if (new_tvb) {
if (anqp)
- dissect_anqp(query, new_tvb, 0, FALSE);
+ dissect_anqp(query, new_tvb, pinfo, 0, FALSE);
else
proto_tree_add_item(query, hf_ieee80211_ff_query_response,
new_tvb, 0,
/* The old tvb cannot be used anymore */
ieee80211_tvb_invalid = TRUE;
- g_pinfo->fragmented = save_fragmented;
+ pinfo->fragmented = save_fragmented;
}
offset += resp_len;
}
/* ************************************************************************* */
static guint
-add_fixed_field(proto_tree *tree, tvbuff_t *tvb, int offset,
+add_fixed_field(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
enum fixed_field lfcode);
static guint64 last_timestamp;
static guint
-add_ff_timestamp(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_timestamp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
last_timestamp = tvb_get_letoh64(tvb, offset);
proto_tree_add_item(tree, hf_ieee80211_ff_timestamp, tvb, offset, 8,
}
static guint
-add_ff_beacon_interval(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_beacon_interval(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_beacon_interval, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
- col_append_fstr(g_pinfo->cinfo, COL_INFO, ", BI=%d",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", BI=%d",
tvb_get_letohs(tvb, offset));
return 2;
}
static guint
-add_ff_cap_info(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_cap_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_item *cap_item;
proto_tree *cap_tree;
}
static guint
-add_ff_auth_alg(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_auth_alg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_auth_alg, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_auth_trans_seq(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_auth_trans_seq(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_auth_seq, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_current_ap_addr(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_current_ap_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_current_ap, tvb, offset, 6,
ENC_NA);
}
static guint
-add_ff_listen_ival(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_listen_ival(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_listen_ival, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_reason_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_reason_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_reason, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_assoc_id(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_assoc_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_assoc_id, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_status_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_status_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_status_code, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_category_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_category_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_category_code, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_action_code, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_dialog_token(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_dialog_token(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_dialog_token, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_wme_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_wme_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_wme_action_code, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_wme_status_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_wme_status_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_wme_status_code, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_qos_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_qos_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_qos_action_code, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_block_ack_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_block_ack_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_ba_action, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_block_ack_param(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_block_ack_param(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_block_ack_params,
ett_ff_ba_param_tree,
}
static guint
-add_ff_block_ack_timeout(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_block_ack_timeout(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_block_ack_timeout, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_block_ack_ssc(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_block_ack_ssc(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_block_ack_ssc,
ett_ff_ba_ssc_tree, ieee80211_ff_block_ack_ssc_fields,
}
static guint
-add_ff_qos_ts_info(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_qos_ts_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_tsinfo,
ett_tsinfo_tree, ieee80211_tsinfo_fields,
}
static guint
-add_ff_mesh_action(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_mesh_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_mesh_action, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_multihop_action(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_multihop_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_multihop_action, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_mesh_control(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_mesh_control(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
int start = offset;
guint8 flags;
}
static guint
-add_ff_selfprot_action(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_selfprot_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_selfprot_action, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_dls_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_dls_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_dls_action_code, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_dst_mac_addr(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_dst_mac_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_dst_mac_addr, tvb, offset, 6,
ENC_NA);
}
static guint
-add_ff_src_mac_addr(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_src_mac_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_src_mac_addr, tvb, offset, 6,
ENC_NA);
}
static guint
-add_ff_dls_timeout(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_dls_timeout(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_dls_timeout, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_delba_param_set(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_delba_param_set(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_delba_param,
ett_ff_ba_param_tree, ieee80211_ff_delba_param_fields,
}
static guint
-add_ff_max_reg_pwr(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_max_reg_pwr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_max_reg_pwr, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_measurement_pilot_int(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_measurement_pilot_int(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_measurement_pilot_int, tvb, offset,
2, ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_country_str(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_country_str(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_country_str, tvb, offset, 3,
ENC_ASCII|ENC_NA);
}
static guint
-add_ff_max_tx_pwr(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_max_tx_pwr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_max_tx_pwr, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_tx_pwr_used(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_tx_pwr_used(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_tx_pwr_used, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_transceiver_noise_floor(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_transceiver_noise_floor(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_transceiver_noise_floor, tvb,
offset, 1, ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_channel_width(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_channel_width(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_channel_width, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_qos_info_ap(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_qos_info_ap(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_qos_info_ap,
ett_ff_qos_info, ieee80211_ff_qos_info_ap_fields,
}
static guint
-add_ff_qos_info_sta(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_qos_info_sta(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_qos_info_sta,
ett_ff_qos_info, ieee80211_ff_qos_info_sta_fields,
}
static guint
-add_ff_sm_pwr_cntrl(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_sm_pwr_cntrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_sm_pwr_save,
ett_ff_sm_pwr_save, ieee80211_ff_sw_pwr_save_fields,
}
static guint
-add_ff_pco_phase_cntrl(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_pco_phase_cntrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_pco_phase_cntrl, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_psmp_param_set(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_psmp_param_set(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_psmp_param_set,
ett_ff_psmp_param_set,
}
static guint
-add_ff_mimo_cntrl(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_mimo_cntrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_item *mimo_item;
proto_tree *mimo_tree;
}
static guint
-add_ff_ant_selection(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_ant_selection(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_ant_selection,
ett_ff_ant_sel, ieee80211_ff_ant_selection_fields,
static guint
add_ff_extended_channel_switch_announcement(proto_tree *tree, tvbuff_t *tvb,
- int offset)
+ packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset,
hf_ieee80211_ff_ext_channel_switch_announcement,
}
static guint
-add_ff_ht_information(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_ht_information(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_ht_info,
ett_ff_ht_info, ieee80211_ff_ht_info_fields,
}
static guint
-add_ff_ht_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_ht_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_ht_action, tvb, offset, 1,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_psmp_sta_info(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_psmp_sta_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_item *psmp_item;
proto_tree *psmp_tree;
}
static guint
-add_ff_schedule_info(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_schedule_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_item *sched_item;
proto_tree *sched_tree;
}
static guint
-add_ff_pa_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_pa_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_public_action, tvb, offset, 1,
ENC_BIG_ENDIAN);
}
static guint
-add_ff_action_spectrum_mgmt(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_spectrum_mgmt(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
switch (tvb_get_guint8(tvb, offset + 1)) {
case SM_ACTION_MEASUREMENT_REQUEST:
case SM_ACTION_MEASUREMENT_REPORT:
case SM_ACTION_TPC_REQUEST:
case SM_ACTION_TPC_REPORT:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_ACTION_CODE);
- add_fixed_field(tree, tvb, offset + 2, FIELD_DIALOG_TOKEN);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
return 3;
case SM_ACTION_CHAN_SWITCH_ANNC:
case SM_ACTION_EXT_CHAN_SWITCH_ANNC:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
return 2;
default:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
return 2;
}
}
static guint
-add_ff_action_qos(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_qos(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
switch (tvb_get_guint8(tvb, offset + 1)) {
case SM_ACTION_ADDTS_REQUEST:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_QOS_ACTION_CODE);
- add_fixed_field(tree, tvb, offset + 2, FIELD_DIALOG_TOKEN);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
return 3;
case SM_ACTION_ADDTS_RESPONSE:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_QOS_ACTION_CODE);
- add_fixed_field(tree, tvb, offset + 2, FIELD_DIALOG_TOKEN);
- add_fixed_field(tree, tvb, offset + 3, FIELD_STATUS_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
+ add_fixed_field(tree, tvb, pinfo, offset + 3, FIELD_STATUS_CODE);
return 5;
case SM_ACTION_DELTS:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_QOS_ACTION_CODE);
- add_fixed_field(tree, tvb, offset + 2, FIELD_QOS_TS_INFO);
- add_fixed_field(tree, tvb, offset + 5, FIELD_REASON_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_QOS_TS_INFO);
+ add_fixed_field(tree, tvb, pinfo, offset + 5, FIELD_REASON_CODE);
return 7;
case SM_ACTION_QOS_SCHEDULE:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_QOS_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
return 2;
default:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
return 2;
}
}
static guint
-add_ff_action_dls(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_dls(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
switch (tvb_get_guint8(tvb, offset + 1)) {
case SM_ACTION_DLS_REQUEST:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_DLS_ACTION_CODE);
- add_fixed_field(tree, tvb, offset + 2, FIELD_DST_MAC_ADDR);
- add_fixed_field(tree, tvb, offset + 8, FIELD_SRC_MAC_ADDR);
- add_fixed_field(tree, tvb, offset + 14, FIELD_CAP_INFO);
- add_fixed_field(tree, tvb, offset + 16, FIELD_DLS_TIMEOUT);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DST_MAC_ADDR);
+ add_fixed_field(tree, tvb, pinfo, offset + 8, FIELD_SRC_MAC_ADDR);
+ add_fixed_field(tree, tvb, pinfo, offset + 14, FIELD_CAP_INFO);
+ add_fixed_field(tree, tvb, pinfo, offset + 16, FIELD_DLS_TIMEOUT);
return 18;
case SM_ACTION_DLS_RESPONSE:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_DLS_ACTION_CODE);
- add_fixed_field(tree, tvb, offset + 2, FIELD_STATUS_CODE);
- add_fixed_field(tree, tvb, offset + 4, FIELD_DST_MAC_ADDR);
- add_fixed_field(tree, tvb, offset + 10, FIELD_SRC_MAC_ADDR);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_STATUS_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 4, FIELD_DST_MAC_ADDR);
+ add_fixed_field(tree, tvb, pinfo, offset + 10, FIELD_SRC_MAC_ADDR);
if (!hf_ieee80211_ff_status_code) {
- add_fixed_field(tree, tvb, offset + 16, FIELD_CAP_INFO);
+ add_fixed_field(tree, tvb, pinfo, offset + 16, FIELD_CAP_INFO);
}
return 16;
case SM_ACTION_DLS_TEARDOWN:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, offset + 1, FIELD_DLS_ACTION_CODE);
- add_fixed_field(tree, tvb, offset + 2, FIELD_DST_MAC_ADDR);
- add_fixed_field(tree, tvb, offset + 8, FIELD_SRC_MAC_ADDR);
- add_fixed_field(tree, tvb, offset + 14, FIELD_REASON_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DST_MAC_ADDR);
+ add_fixed_field(tree, tvb, pinfo, offset + 8, FIELD_SRC_MAC_ADDR);
+ add_fixed_field(tree, tvb, pinfo, offset + 14, FIELD_REASON_CODE);
return 16;
default:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
return 2;
}
}
static guint
-add_ff_action_block_ack(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_block_ack(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
switch (tvb_get_guint8(tvb, offset + 1)) {
case BA_ADD_BLOCK_ACK_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_BLOCK_ACK_ACTION_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, offset, FIELD_BLOCK_ACK_PARAM);
- offset += add_fixed_field(tree, tvb, offset, FIELD_BLOCK_ACK_TIMEOUT);
- offset += add_fixed_field(tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_PARAM);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_TIMEOUT);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
break;
case BA_ADD_BLOCK_ACK_RESPONSE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_BLOCK_ACK_ACTION_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_BLOCK_ACK_PARAM);
- offset += add_fixed_field(tree, tvb, offset, FIELD_BLOCK_ACK_TIMEOUT);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_PARAM);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_TIMEOUT);
break;
case BA_DELETE_BLOCK_ACK:
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_BLOCK_ACK_ACTION_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_DELBA_PARAM_SET);
- offset += add_fixed_field(tree, tvb, offset, FIELD_REASON_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DELBA_PARAM_SET);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
break;
}
}
static guint
-add_ff_action_public(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_public(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
guint32 oui;
guint8 frag;
gboolean more;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_PA_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PA_ACTION_CODE);
switch (code) {
case PA_EXT_CHANNEL_SWITCH_ANNOUNCEMENT:
- offset += add_ff_extended_channel_switch_announcement(tree, tvb, offset);
+ offset += add_ff_extended_channel_switch_announcement(tree, tvb, pinfo, offset);
break;
case PA_VENDOR_SPECIFIC:
oui = tvb_get_ntoh24(tvb, offset);
proto_tree_add_text(tree, tvb, offset, 1, "Subtype %u", subtype);
offset += 1;
if (subtype == WFA_SUBTYPE_P2P) {
- offset = dissect_wifi_p2p_public_action(g_pinfo, tree, tvb, offset);
+ offset = dissect_wifi_p2p_public_action(pinfo, tree, tvb, offset);
}
break;
default:
}
break;
case PA_GAS_INITIAL_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += dissect_advertisement_protocol(g_pinfo, tree, tvb, offset,
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
&anqp);
- offset += dissect_gas_initial_request(tree, tvb, offset, anqp);
+ offset += dissect_gas_initial_request(tree, tvb, pinfo, offset, anqp);
break;
case PA_GAS_INITIAL_RESPONSE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_GAS_COMEBACK_DELAY);
- offset += dissect_advertisement_protocol(g_pinfo, tree, tvb, offset,
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_COMEBACK_DELAY);
+ offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
&anqp);
- offset += dissect_gas_initial_response(tree, tvb, offset, anqp);
+ offset += dissect_gas_initial_response(tree, tvb, pinfo, offset, anqp);
break;
case PA_GAS_COMEBACK_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
break;
case PA_GAS_COMEBACK_RESPONSE:
dialog_token = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
frag = tvb_get_guint8(tvb, offset) & 0x7f;
more = (tvb_get_guint8(tvb, offset) & 0x80) != 0;
- offset += add_fixed_field(tree, tvb, offset, FIELD_GAS_FRAGMENT_ID);
- offset += add_fixed_field(tree, tvb, offset, FIELD_GAS_COMEBACK_DELAY);
- offset += dissect_advertisement_protocol(g_pinfo, tree, tvb, offset,
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_FRAGMENT_ID);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_COMEBACK_DELAY);
+ offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
&anqp);
- offset += dissect_gas_comeback_response(tree, tvb, offset, anqp, frag,
+ offset += dissect_gas_comeback_response(tree, tvb, pinfo, offset, anqp, frag,
more, dialog_token);
break;
case PA_TDLS_DISCOVERY_RESPONSE:
- col_set_str(g_pinfo->cinfo, COL_PROTOCOL, "TDLS");
- col_set_str(g_pinfo->cinfo, COL_INFO, "TDLS Discovery Response");
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, offset, FIELD_CAP_INFO);
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDLS");
+ col_set_str(pinfo->cinfo, COL_INFO, "TDLS Discovery Response");
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
break;
}
}
static guint
-add_ff_action_fast_bss_transition(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_fast_bss_transition(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
guint8 code;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_FT_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_FT_ACTION_CODE);
switch (code) {
case FT_ACTION_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_STA_ADDRESS);
- offset += add_fixed_field(tree, tvb, offset, FIELD_TARGET_AP_ADDRESS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
/* Followed by FT Request frame body (IEs) */
break;
case FT_ACTION_RESPONSE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_STA_ADDRESS);
- offset += add_fixed_field(tree, tvb, offset, FIELD_TARGET_AP_ADDRESS);
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
/* Followed by FT Response frame body (IEs) */
break;
case FT_ACTION_CONFIRM:
- offset += add_fixed_field(tree, tvb, offset, FIELD_STA_ADDRESS);
- offset += add_fixed_field(tree, tvb, offset, FIELD_TARGET_AP_ADDRESS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
/* Followed by FT Confirm frame body (IEs) */
break;
case FT_ACTION_ACK:
- offset += add_fixed_field(tree, tvb, offset, FIELD_STA_ADDRESS);
- offset += add_fixed_field(tree, tvb, offset, FIELD_TARGET_AP_ADDRESS);
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
/* Followed by FT Ack frame body (IEs) */
break;
}
}
static guint
-add_ff_action_sa_query(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_sa_query(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
guint8 code;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_SA_QUERY_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SA_QUERY_ACTION_CODE);
switch (code) {
case SA_QUERY_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_TRANSACTION_ID);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TRANSACTION_ID);
break;
case SA_QUERY_RESPONSE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_TRANSACTION_ID);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TRANSACTION_ID);
break;
}
}
static guint
-add_ff_action_mesh(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_mesh(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint length;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_MESH_ACTION);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MESH_ACTION);
/* The only fixed fields are the category and mesh action. The rest are IEs.
*/
length = 2;
if (tvb_get_guint8(tvb, 1) == MESH_ACTION_TBTT_ADJ_RESPONSE) {
/* ..except for the TBTT Adjustment Response, which has a status code field
*/
- length += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
+ length += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
}
return length;
}
static guint
-add_ff_action_multihop(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_multihop(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_MULTIHOP_ACTION);
- offset += add_fixed_field(tree, tvb, offset, FIELD_MESH_CONTROL);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MULTIHOP_ACTION);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MESH_CONTROL);
return offset - start;
}
static guint
-add_ff_action_self_protected(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_self_protected(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_SELFPROT_ACTION);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SELFPROT_ACTION);
switch (tvb_get_guint8(tvb, start + 1)) {
case SELFPROT_ACTION_MESH_PEERING_OPEN:
- offset += add_fixed_field(tree, tvb, offset, FIELD_CAP_INFO);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
break;
case SELFPROT_ACTION_MESH_PEERING_CONFIRM:
- offset += add_fixed_field(tree, tvb, offset, FIELD_CAP_INFO);
- offset += add_fixed_field(tree, tvb, offset, FIELD_ASSOC_ID);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ASSOC_ID);
break;
}
}
static guint
-wnm_bss_trans_mgmt_req(proto_tree *tree, tvbuff_t *tvb, int offset)
+wnm_bss_trans_mgmt_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
int start = offset;
guint8 mode;
gint left;
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
mode = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_ieee80211_ff_request_mode_pref_cand,
}
static guint
-add_ff_action_wnm(proto_tree *tree, tvbuff_t *tvb, int offset)
+wnm_sleep_mode_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
+{
+ int start = offset;
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ return offset - start;
+}
+
+static guint
+wnm_sleep_mode_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
+{
+ int start = offset;
+ guint16 key_data_len;
+ gint left;
+
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ key_data_len = tvb_get_letohs(tvb, offset);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_KEY_DATA_LENGTH);
+ left = tvb_reported_length_remaining(tvb, offset);
+ if (left < key_data_len) {
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
+ "WNM-Sleep Mode Response is not long enough to "
+ "include Key Data");
+ return offset - start;
+ }
+ proto_tree_add_item(tree, hf_ieee80211_ff_key_data, tvb, offset,
+ key_data_len, ENC_NA);
+ offset += key_data_len;
+ return offset - start;
+}
+
+static guint
+wnm_tfs_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
+{
+ int start = offset;
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ return offset - start;
+}
+
+static guint
+wnm_tfs_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
+{
+ int start = offset;
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ return offset - start;
+}
+
+static guint
+wnm_notification_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
+{
+ int start = offset;
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WNM_NOTIFICATION_TYPE);
+ return offset - start;
+}
+
+static guint
+add_ff_action_wnm(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint8 code;
guint start = offset;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_WNM_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WNM_ACTION_CODE);
switch (code) {
case WNM_BSS_TRANS_MGMT_REQ:
- offset += wnm_bss_trans_mgmt_req(tree, tvb, offset);
+ offset += wnm_bss_trans_mgmt_req(tree, tvb, pinfo, offset);
+ break;
+ case WNM_TFS_REQ:
+ offset += wnm_tfs_req(tree, tvb, pinfo, offset);
+ break;
+ case WNM_TFS_RESP:
+ offset += wnm_tfs_resp(tree, tvb, pinfo, offset);
+ break;
+ case WNM_SLEEP_MODE_REQ:
+ offset += wnm_sleep_mode_req(tree, tvb, pinfo, offset);
+ break;
+ case WNM_SLEEP_MODE_RESP:
+ offset += wnm_sleep_mode_resp(tree, tvb, pinfo, offset);
+ break;
+ case WNM_NOTIFICATION_REQ:
+ offset += wnm_notification_req(tree, tvb, pinfo, offset);
break;
}
}
static guint
-add_ff_action_tdls(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_tdls(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint8 code;
guint16 status;
guint start = offset;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_TDLS_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TDLS_ACTION_CODE);
switch (code) {
case TDLS_SETUP_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, offset, FIELD_CAP_INFO);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
break;
case TDLS_SETUP_RESPONSE:
status = tvb_get_letohs(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
if (tvb_reported_length_remaining(tvb, offset) < 2) {
if (status == 0) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"TDLS Setup Response (success) does not "
"include mandatory fields");
}
break;
}
- offset += add_fixed_field(tree, tvb, offset, FIELD_CAP_INFO);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
break;
case TDLS_SETUP_CONFIRM:
status = tvb_get_letohs(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
if (tvb_reported_length_remaining(tvb, offset) < 1) {
if (status == 0) {
- expert_add_info_format(g_pinfo, tree, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
"TDLS Setup Confirm (success) does not include "
"mandatory fields");
}
break;
}
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
break;
case TDLS_TEARDOWN:
- offset += add_fixed_field(tree, tvb, offset, FIELD_REASON_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
break;
case TDLS_PEER_TRAFFIC_INDICATION:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
break;
case TDLS_CHANNEL_SWITCH_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_TARGET_CHANNEL);
- offset += add_fixed_field(tree, tvb, offset, FIELD_REGULATORY_CLASS);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_CHANNEL);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REGULATORY_CLASS);
break;
case TDLS_CHANNEL_SWITCH_RESPONSE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
break;
case TDLS_PEER_PSM_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
break;
case TDLS_PEER_PSM_RESPONSE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, offset, FIELD_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
break;
case TDLS_PEER_TRAFFIC_RESPONSE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
break;
case TDLS_DISCOVERY_REQUEST:
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
break;
}
}
static guint
-add_ff_action_mgmt_notification(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_mgmt_notification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_WME_ACTION_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, offset, FIELD_WME_STATUS_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WME_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WME_STATUS_CODE);
return offset - start; /* Size of fixed fields */
}
static guint
-add_ff_action_vendor_specific(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_vendor_specific(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
guint32 oui;
guint8 subtype;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
oui = tvb_get_ntoh24(tvb, offset);
proto_tree_add_item(tree, hf_ieee80211_tag_oui, tvb, offset, 3, ENC_NA);
offset += 3;
}
static guint
-add_ff_action_ht(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action_ht(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint start = offset;
guint8 n_sta, i;
mimo_control_t mimo_cntrl;
- offset += add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, offset, FIELD_HT_ACTION_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HT_ACTION_CODE);
switch (tvb_get_guint8(tvb, offset - 1)) {
case HT_ACTION_NOTIFY_CHAN_WIDTH:
- offset += add_fixed_field(tree, tvb, offset, FIELD_CHANNEL_WIDTH);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CHANNEL_WIDTH);
break;
case HT_ACTION_SM_PWR_SAVE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_SM_PWR_CNTRL);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SM_PWR_CNTRL);
break;
case HT_ACTION_PSMP_ACTION:
n_sta = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_PSMP_PARAM_SET);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PSMP_PARAM_SET);
for (i = 0; i < (n_sta & 0x0F); i++) {
- offset += add_fixed_field(tree, tvb, offset, FIELD_PSMP_STA_INFO);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PSMP_STA_INFO);
}
break;
case HT_ACTION_SET_PCO_PHASE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_PCO_PHASE_CNTRL);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PCO_PHASE_CNTRL);
break;
case HT_ACTION_MIMO_CSI:
mimo_cntrl = get_mimo_control(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_MIMO_CNTRL);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
offset += add_mimo_csi_matrices_report(tree, tvb, offset, mimo_cntrl);
break;
case HT_ACTION_MIMO_BEAMFORMING:
mimo_cntrl = get_mimo_control(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_MIMO_CNTRL);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
offset += add_mimo_beamforming_feedback_report(tree, tvb, offset,
mimo_cntrl);
break;
case HT_ACTION_MIMO_COMPRESSED_BEAMFORMING:
mimo_cntrl = get_mimo_control(tvb, offset);
- offset += add_fixed_field(tree, tvb, offset, FIELD_MIMO_CNTRL);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
offset += add_mimo_compressed_beamforming_feedback_report(tree, tvb,
offset,
mimo_cntrl);
break;
case HT_ACTION_ANT_SEL_FEEDBACK:
- offset += add_fixed_field(tree, tvb, offset, FIELD_ANT_SELECTION);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ANT_SELECTION);
break;
case HT_ACTION_HT_INFO_EXCHANGE:
- offset += add_fixed_field(tree, tvb, offset, FIELD_HT_INFORMATION);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HT_INFORMATION);
break;
}
}
static guint
-add_ff_action(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
switch (tvb_get_guint8(tvb, offset) & 0x7f) {
case CAT_SPECTRUM_MGMT:
- return add_ff_action_spectrum_mgmt(tree, tvb, offset);
+ return add_ff_action_spectrum_mgmt(tree, tvb, pinfo, offset);
case CAT_QOS:
- return add_ff_action_qos(tree, tvb, offset);
+ return add_ff_action_qos(tree, tvb, pinfo, offset);
case CAT_DLS:
- return add_ff_action_dls(tree, tvb, offset);
+ return add_ff_action_dls(tree, tvb, pinfo, offset);
case CAT_BLOCK_ACK:
- return add_ff_action_block_ack(tree, tvb, offset);
+ return add_ff_action_block_ack(tree, tvb, pinfo, offset);
case CAT_PUBLIC:
- return add_ff_action_public(tree, tvb, offset);
+ return add_ff_action_public(tree, tvb, pinfo, offset);
case CAT_FAST_BSS_TRANSITION:
- return add_ff_action_fast_bss_transition(tree, tvb, offset);
+ return add_ff_action_fast_bss_transition(tree, tvb, pinfo, offset);
case CAT_SA_QUERY:
- return add_ff_action_sa_query(tree, tvb, offset);
+ return add_ff_action_sa_query(tree, tvb, pinfo, offset);
case CAT_MESH:
- return add_ff_action_mesh(tree, tvb, offset);
+ return add_ff_action_mesh(tree, tvb, pinfo, offset);
case CAT_MULTIHOP:
- return add_ff_action_multihop(tree, tvb, offset);
+ return add_ff_action_multihop(tree, tvb, pinfo, offset);
case CAT_SELF_PROTECTED:
- return add_ff_action_self_protected(tree, tvb, offset);
+ return add_ff_action_self_protected(tree, tvb, pinfo, offset);
case CAT_WNM:
- return add_ff_action_wnm(tree, tvb, offset);
+ return add_ff_action_wnm(tree, tvb, pinfo, offset);
case CAT_TDLS:
- return add_ff_action_tdls(tree, tvb, offset);
+ return add_ff_action_tdls(tree, tvb, pinfo, offset);
case CAT_MGMT_NOTIFICATION: /* Management notification frame */
- return add_ff_action_mgmt_notification(tree, tvb, offset);
+ return add_ff_action_mgmt_notification(tree, tvb, pinfo, offset);
case CAT_VENDOR_SPECIFIC: /* Vendor Specific Category */
- return add_ff_action_vendor_specific(tree, tvb, offset);
+ return add_ff_action_vendor_specific(tree, tvb, pinfo, offset);
case CAT_HT:
- return add_ff_action_ht(tree, tvb, offset);
+ return add_ff_action_ht(tree, tvb, pinfo, offset);
default:
- add_fixed_field(tree, tvb, offset, FIELD_CATEGORY_CODE);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
return 1;
}
}
static guint
-add_ff_ft_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_ft_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_ft_action_code, tvb, offset, 1,
ENC_BIG_ENDIAN);
}
static guint
-add_ff_sta_address(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_sta_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_sta_address, tvb, offset, 6,
ENC_NA);
}
static guint
-add_ff_target_ap_address(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_target_ap_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_target_ap_address, tvb, offset, 6,
ENC_NA);
}
static guint
-add_ff_gas_comeback_delay(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_gas_comeback_delay(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_gas_comeback_delay, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_gas_fragment_id(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_gas_fragment_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_gas_fragment_id, tvb, offset, 1,
ENC_BIG_ENDIAN);
}
static guint
-add_ff_sa_query_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_sa_query_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_sa_query_action_code, tvb, offset,
1, ENC_BIG_ENDIAN);
}
static guint
-add_ff_transaction_id(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_transaction_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_transaction_id, tvb, offset, 2,
ENC_LITTLE_ENDIAN);
}
static guint
-add_ff_tdls_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_tdls_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint8 code;
code = tvb_get_guint8(tvb, offset);
- col_set_str(g_pinfo->cinfo, COL_INFO,
+ col_set_str(pinfo->cinfo, COL_INFO,
val_to_str_ext_const(code, &tdls_action_codes_ext,
"Unknown TDLS Action"));
proto_tree_add_item(tree, hf_ieee80211_ff_tdls_action_code, tvb, offset, 1,
}
static guint
-add_ff_target_channel(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_target_channel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_target_channel, tvb, offset, 1,
ENC_BIG_ENDIAN);
}
static guint
-add_ff_regulatory_class(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_regulatory_class(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(tree, hf_ieee80211_ff_regulatory_class, tvb, offset, 1,
ENC_BIG_ENDIAN);
}
static guint
-add_ff_wnm_action_code(proto_tree *tree, tvbuff_t *tvb, int offset)
+add_ff_wnm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
guint8 code;
code = tvb_get_guint8(tvb, offset);
- col_set_str(g_pinfo->cinfo, COL_INFO,
+ col_set_str(pinfo->cinfo, COL_INFO,
val_to_str_ext_const(code, &wnm_action_codes_ext, "Unknown WNM Action"));
proto_tree_add_item(tree, hf_ieee80211_ff_wnm_action_code, tvb, offset, 1, ENC_BIG_ENDIAN);
return 1;
}
+static guint
+add_ff_key_data_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_key_data_length, tvb, offset, 2,
+ ENC_LITTLE_ENDIAN);
+ return 2;
+}
+
struct ieee80211_fixed_field_dissector {
enum fixed_field lfcode;
- guint (*dissector)(proto_tree *tree, tvbuff_t *tvb, int offset);
+ guint (*dissector)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset);
};
+static guint
+add_ff_wnm_notification_type(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_wnm_notification_type,
+ tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
#define FF_FIELD(f, func) { FIELD_ ## f, add_ff_ ## func }
static const struct ieee80211_fixed_field_dissector ff_dissectors[] = {
FF_FIELD(TARGET_CHANNEL , target_channel),
FF_FIELD(REGULATORY_CLASS , regulatory_class),
FF_FIELD(WNM_ACTION_CODE , wnm_action_code),
+ FF_FIELD(KEY_DATA_LENGTH , key_data_length),
+ FF_FIELD(WNM_NOTIFICATION_TYPE , wnm_notification_type),
{ (enum fixed_field)-1 , NULL }
};
#undef FF_FIELD
static guint
-add_fixed_field(proto_tree *tree, tvbuff_t *tvb, int offset,
+add_fixed_field(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
enum fixed_field lfcode)
{
int i;
for (i = 0; ff_dissectors[i].dissector; i++) {
if (ff_dissectors[i].lfcode == lfcode) {
- return ff_dissectors[i].dissector(tree, tvb, offset);
+ return ff_dissectors[i].dissector(tree, tvb, pinfo, offset);
}
}
return 0;
};
static int
-dissect_qos_info(proto_tree *tree, tvbuff_t *tvb, int offset, int ftype)
+dissect_qos_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int ftype)
{
proto_tree *qos_info_tree;
proto_item *qos_info_item;
break;
}
default:
- expert_add_info_format(g_pinfo, qos_info_item, PI_UNDECODED, PI_WARN, "Could not deduce direction to decode correctly, ftype %u", ftype);
+ expert_add_info_format(pinfo, qos_info_item, PI_UNDECODED, PI_WARN, "Could not deduce direction to decode correctly, ftype %u", ftype);
break;
}
}
static int
-dissect_vendor_ie_wpawme(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 tag_len, int ftype)
+dissect_vendor_ie_wpawme(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 tag_len, int ftype)
{
guint8 type;
proto_tree_add_item(wpa_mcs_tree, hf_ieee80211_wfa_ie_wpa_mcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Check if OUI is 00:50:F2 (WFA) */
- if (tvb_get_ntoh24(tvb, offset) == 0x0050F2)
+ if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME)
{
proto_tree_add_item(wpa_mcs_tree, hf_ieee80211_wfa_ie_wpa_mcs_wfa_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
} else {
proto_tree_add_item(wpa_sub_ucs_tree, hf_ieee80211_wfa_ie_wpa_ucs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Check if OUI is 00:50:F2 (WFA) */
- if (tvb_get_ntoh24(tvb, offset) == 0x0050F2)
+ if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME)
{
proto_tree_add_item(wpa_sub_ucs_tree, hf_ieee80211_wfa_ie_wpa_ucs_wfa_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
proto_item_append_text(wpa_ucs_item, " %s", wpa_ucs_return(tvb_get_ntohl(tvb, offset)));
proto_tree_add_item(wpa_sub_akms_tree, hf_ieee80211_wfa_ie_wpa_akms_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Check if OUI is 00:50:F2 (WFA) */
- if (tvb_get_ntoh24(tvb, offset) == 0x0050F2)
+ if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME)
{
proto_tree_add_item(wpa_sub_akms_tree, hf_ieee80211_wfa_ie_wpa_akms_wfa_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
proto_item_append_text(wpa_akms_item, " %s", wpa_akms_return(tvb_get_ntohl(tvb, offset)));
case 0: /* WME Information Element */
{
/* WME QoS Info Field */
- offset = dissect_qos_info(tree, tvb, offset, ftype);
+ offset = dissect_qos_info(tree, tvb, pinfo, offset, ftype);
break;
}
case 1: /* WME Parameter Element */
{
int i;
/* WME QoS Info Field */
- offset = dissect_qos_info(tree, tvb, offset, ftype);
+ offset = dissect_qos_info(tree, tvb, pinfo, offset, ftype);
proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_reserved, tvb, offset, 1, ENC_NA);
offset += 1;
/* AC Parameters */
}
case 4: /* WPS: Wifi Protected Setup */
{
- dissect_wps_tlvs(tree, tvb, offset, tag_len-4, NULL);
+ dissect_wps_tlvs(tree, tvb, offset, tag_len-1, NULL);
}
break;
default:
return offset;
}
+static void dissect_hs20_indication(proto_tree *tree, tvbuff_t *tvb,
+ int offset)
+{
+ proto_tree_add_item(tree, hf_hs20_indication_dgaf_disabled, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+}
+
static void
dissect_vendor_ie_wfa(packet_info *pinfo, proto_item *item, tvbuff_t *tag_tvb)
{
dissect_wifi_p2p_ie(pinfo, item, tag_tvb, 4, tag_len - 4);
proto_item_append_text(item, ": P2P");
break;
+ case WFA_SUBTYPE_WIFI_DISPLAY:
+ dissect_wifi_display_ie(pinfo, item, tag_tvb, 4, tag_len - 4);
+ proto_item_append_text(item, ": Wi-Fi Display");
+ break;
+ case WFA_SUBTYPE_HS20_INDICATION:
+ dissect_hs20_indication(item, tag_tvb, 4);
+ proto_item_append_text(item, ": Hotspot 2.0 Indication");
+ break;
}
}
dont_change = TRUE;
break;
case AIRONET_IE_QOS:
- proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_qos_unk1, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_qos_reserved, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_qos_paramset, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
byte2 = tvb_get_guint8(tvb, offset + 1);
txop = tvb_get_letohs(tvb, offset + 2);
proto_tree_add_bytes_format(ietree, hf_ieee80211_aironet_ie_qos_val, tvb, offset, 4, NULL,
- "CCX QoS Parameters??: ACI %u (%s), Admission Control %sMandatory, AIFSN %u, ECWmin %u, ECWmax %u, TXOP %u",
+ "CCX QoS Parameters: ACI %u (%s), Admission Control %sMandatory, AIFSN %u, ECWmin %u, ECWmax %u, TXOP %u",
(byte1 & 0x60) >> 5, val_to_str((byte1 & 0x60) >> 5, wme_acs, "(Unknown: %d)"),
(byte1 & 0x10) ? "" : "not ", byte1 & 0x0f,
byte2 & 0x0f, (byte2 & 0xf0) >> 4,
}
}
+#define ARUBA_APNAME 3
+static const value_string ieee80211_vs_aruba_subtype_vals[] = {
+ { ARUBA_APNAME, "AP Name"},
+ { 0, NULL }
+};
+static void
+dissect_vendor_ie_aruba(proto_item *item, proto_tree *ietree,
+ tvbuff_t *tvb, int offset, guint32 tag_len)
+{
+ guint8 type;
+
+ offset += 1; /* VS OUI Type */
+ tag_len -= 1;
+
+ type = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item (ietree, hf_ieee80211_vs_aruba_subtype, tvb, offset, 1, ENC_NA);
+ proto_item_append_text(item, ": %s", val_to_str_const(type, ieee80211_vs_aruba_subtype_vals, "Unknown"));
+ offset += 1;
+ tag_len -= 1;
+
+ switch (type) {
+ case ARUBA_APNAME:
+ offset += 1;
+ tag_len -= 1;
+
+ proto_tree_add_item (ietree, hf_ieee80211_vs_aruba_apname, tvb,
+ offset, tag_len, ENC_ASCII|ENC_NA);
+ proto_item_append_text(item, " (%s)", tvb_get_ephemeral_string(tvb, offset, tag_len));
+ break;
+
+ default:
+ proto_tree_add_item(ietree, hf_ieee80211_vs_aruba_data, tvb, offset,
+ tag_len, ENC_NA);
+ proto_item_append_text(item, " (Data: %s)", tvb_bytes_to_str(tvb, offset, tag_len));
+ break;
+ }
+}
+
/* 802.11e 7.3.2.33 QoS Capability element */
static int
-dissect_qos_capability(proto_tree *tree, tvbuff_t *tvb, int offset, int ftype)
+dissect_qos_capability(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int ftype)
{
proto_item *cap_info_item;
proto_tree *cap_info_tree;
break;
}
default:
- expert_add_info_format(g_pinfo, cap_info_item, PI_UNDECODED, PI_WARN, "Could not deduce direction to decode correctly, ftype %u", ftype);
+ expert_add_info_format(pinfo, cap_info_item, PI_UNDECODED, PI_WARN, "Could not deduce direction to decode correctly, ftype %u", ftype);
break;
}
proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Check if OUI is 00:0F:AC (ieee80211) */
- if (tvb_get_ntoh24(tvb, offset) == 0x000FAC)
+ if (tvb_get_ntoh24(tvb, offset) == OUI_RSN)
{
proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_80211_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
} else {
proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Check if OUI is 00:0F:AC (ieee80211) */
- if (tvb_get_ntoh24(tvb, offset) == 0x000FAC)
+ if (tvb_get_ntoh24(tvb, offset) == OUI_RSN)
{
proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_80211_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
proto_item_append_text(rsn_pcs_item, " %s", rsn_pcs_return(tvb_get_ntohl(tvb, offset)));
proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Check if OUI is 00:0F:AC (ieee80211) */
- if (tvb_get_ntoh24(tvb, offset) == 0x000FAC)
+ if (tvb_get_ntoh24(tvb, offset) == OUI_RSN)
{
proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_80211_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
proto_item_append_text(rsn_akms_item, " %s", rsn_akms_return(tvb_get_ntohl(tvb, offset)));
rsn_gmcs_tree = proto_item_add_subtree(rsn_gmcs_item, ett_rsn_gmcs_tree);
proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Check if OUI is 00:0F:AC (ieee80211) */
- if (tvb_get_ntoh24(tvb, offset) == 0x000FAC)
+ if (tvb_get_ntoh24(tvb, offset) == OUI_RSN)
{
proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_80211_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
} else {
ENC_NA);
}
+static void
+dissect_ssid_list(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 tag_len)
+{
+ int end = offset + tag_len;
+ proto_item *ssid;
+ proto_tree *entry;
+ gboolean first = TRUE;
+
+ while (offset + 1 <= end) {
+ guint8 len = tvb_get_guint8(tvb, offset + 1);
+ guint8 *str;
+
+ if (offset + 2 + len > end)
+ break;
+
+ str = tvb_get_ephemeral_string(tvb, offset + 2, len);
+ proto_item_append_text(tree, "%c %s", (first ? ':' : ','), str);
+ first = FALSE;
+ ssid = proto_tree_add_text(tree, tvb, offset, 2 + len, "SSID: %s", str);
+ entry = proto_item_add_subtree(ssid, ett_ssid_list);
+ proto_tree_add_item(entry, hf_ieee80211_tag_number, tvb, offset, 1,
+ ENC_BIG_ENDIAN);
+ offset++;
+ proto_tree_add_uint(entry, hf_ieee80211_tag_length, tvb, offset, 1, len);
+ offset++;
+ proto_tree_add_item(entry, hf_ieee80211_tag_ssid, tvb, offset, len,
+ ENC_ASCII|ENC_NA);
+ offset += len;
+ }
+}
+
static void
dissect_link_identifier(proto_tree *tree, tvbuff_t *tvb, int offset,
guint32 tag_len)
}
static void
-dissect_timeout_interval(proto_tree *tree, tvbuff_t *tvb, int offset,
+dissect_timeout_interval(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
guint32 tag_len)
{
proto_item *pi;
pi = proto_tree_add_item(tree, hf_ieee80211_tag_timeout_int_type, tvb,
offset, 1, ENC_BIG_ENDIAN);
if (tag_len < 5) {
- expert_add_info_format(g_pinfo, pi, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
"Timeout Interval content length must be at least "
"5 bytes");
return;
return offset;
}
+static int dissect_bss_max_idle_period(proto_tree *tree, tvbuff_t *tvb,
+ int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_tag_bss_max_idle_period,
+ tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_ieee80211_tag_bss_max_idle_options_protected,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ return offset;
+}
+
+static int add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
+ int offset, int ftype);
+
+enum tfs_request_subelem_id {
+ TFS_REQ_SUBELEM_TFS = 1,
+ TFS_REQ_SUBELEM_VENDOR_SPECIFIC = 221
+};
+
+static const value_string tfs_request_subelem_ids[] = {
+ { TFS_REQ_SUBELEM_TFS, "TFS subelement" },
+ { TFS_REQ_SUBELEM_VENDOR_SPECIFIC, "Vendor Specific subelement" },
+ { 0, NULL }
+};
+
+static int dissect_tfs_request(packet_info *pinfo, proto_tree *tree,
+ tvbuff_t *tvb, int offset, guint32 tag_len,
+ int ftype)
+{
+ int end = offset + tag_len;
+
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_id,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_ac_delete_after_match,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_ac_notify,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ if (offset + 1 >= end) {
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_WARN,
+ "No TFS Request subelements in TFS Request");
+ return end;
+ }
+
+ while (offset + 1 < end) {
+ guint8 id, len;
+ int s_offset, s_end;
+
+ id = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_subelem_id,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_subelem_len,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ if (offset + len > end) {
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
+ "Not enough data for TFS Request subelement");
+ return end;
+ }
+ switch (id) {
+ case TFS_REQ_SUBELEM_TFS:
+ s_offset = offset;
+ s_end = offset + len;
+ while (s_offset < s_end) {
+ int tlen = add_tagged_field(pinfo, tree, tvb, s_offset, ftype);
+ s_offset += tlen;
+ }
+ break;
+ default:
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_subelem,
+ tvb, offset, len, ENC_NA);
+ break;
+ }
+ offset += len;
+ }
+
+ if (offset < end) {
+ proto_tree_add_text(tree, tvb, offset, end - offset,
+ "Unexpected extra data");
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_WARN,
+ "Extra data after TFS Subelements");
+ }
+
+ return end;
+}
+
+enum tfs_response_subelem_id {
+ TFS_RESP_SUBELEM_TFS_STATUS = 1,
+ TFS_RESP_SUBELEM_TFS = 2,
+ TFS_RESP_SUBELEM_VENDOR_SPECIFIC = 221
+};
+
+static const value_string tfs_response_subelem_ids[] = {
+ { TFS_RESP_SUBELEM_TFS_STATUS, "TFS Status subelement" },
+ { TFS_RESP_SUBELEM_TFS, "TFS subelement" },
+ { TFS_RESP_SUBELEM_VENDOR_SPECIFIC, "Vendor Specific subelement" },
+ { 0, NULL }
+};
+
+static int dissect_tfs_response(packet_info *pinfo, proto_tree *tree,
+ tvbuff_t *tvb, int offset, guint32 tag_len,
+ int ftype)
+{
+ int end = offset + tag_len;
+
+ while (offset + 3 <= end) {
+ guint8 id, len;
+ int s_offset, s_end;
+
+ id = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_subelem_id,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_subelem_len,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ if (offset + len > end) {
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR,
+ "Not enough data for TFS Request subelement");
+ return end;
+ }
+ switch (id) {
+ case TFS_RESP_SUBELEM_TFS_STATUS:
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_status,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_id,
+ tvb, offset + 1, 1, ENC_LITTLE_ENDIAN);
+ break;
+ case TFS_RESP_SUBELEM_TFS:
+ s_offset = offset;
+ s_end = offset + len;
+ while (s_offset < s_end) {
+ int tlen = add_tagged_field(pinfo, tree, tvb, s_offset, ftype);
+ s_offset += tlen;
+ }
+ break;
+ default:
+ proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_subelem,
+ tvb, offset, len, ENC_NA);
+ break;
+ }
+
+ offset += len;
+ }
+
+ if (offset < end) {
+ proto_tree_add_text(tree, tvb, offset, end - offset,
+ "Unexpected extra data");
+ expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_WARN,
+ "Extra data after TFS Status subelements");
+ }
+
+ return end;
+}
+
+static const value_string wnm_sleep_mode_action_types[] = {
+ { 0, "Enter WNM-Sleep Mode" },
+ { 1, "Exit WNM-Sleep Mode" },
+ { 0, NULL }
+};
+
+static const value_string wnm_sleep_mode_response_status_vals[] = {
+ { 0, "Enter/Exit WNM-Sleep Mode Accept" },
+ { 1, "Exit WNM-Sleep Mode Accept, GTK/IGTK update required" },
+ { 2, "Denied. The AP is unable to perform the requested action." },
+ { 3, "Denied temporarily. The AP is unable to perform the requested action "
+ "at the current time. The request can be submitted again at a later time."
+ },
+ { 4, "Denied. Due to the pending key expiration." },
+ { 5, "Denied. The requested action was not granted due to other WNM services "
+ "in use by the requesting STA." },
+ { 0, NULL }
+};
+
+static int dissect_wnm_sleep_mode(proto_tree *tree, tvbuff_t *tvb, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_tag_wnm_sleep_mode_action_type,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tree, hf_ieee80211_tag_wnm_sleep_mode_response_status,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+ proto_tree_add_item(tree, hf_ieee80211_tag_wnm_sleep_mode_interval,
+ tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
+ return offset;
+}
+
static const value_string time_adv_timing_capab_vals[] = {
{ 0, "No standardized external time source" },
{ 1, "Timestamp offset based on UTC" },
if (tag_len != 5)
{
- expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "RM Enabled Capabilites length %u wrong, must = 4", tag_len);
+ expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "RM Enabled Capabilities length %u wrong, must = 4", tag_len);
return offset;
}
proto_item_append_text(ti, " (%d octets)", tag_len);
proto_tree_add_uint(tree, hf_ieee80211_fc_frame_type_subtype, tvb, offset, 1, frame_type_subtype);
- fc_item = proto_tree_add_item(tree, hf_ieee80211_fc_field, tvb, offset, 2, ENC_NA);
+ fc_item = proto_tree_add_item(tree, hf_ieee80211_fc_field, tvb, offset, 2, ENC_BIG_ENDIAN);
fc_tree = proto_item_add_subtree(fc_item, ett_fc_tree);
}
}
+
static void
dissect_vendor_ie_ht(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint offset, proto_item *item, proto_item *ti_len, gint tag_len)
{
- proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, 3, "802.11n (Pre) OUI");
- /* 802.11n OUI Information Element */
- if ((4 <= tag_len) && !tvb_memeql(tvb, offset, PRE_11N_OUI"\x33", 4)) {
- proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, 3, 1,"802.11n (Pre) HT information");
+ guint8 type;
- dissect_ht_capability_ie(tvb, pinfo, tree, offset+4, tag_len - 4, ti_len, TRUE);
- proto_item_append_text(item, ": HT Capabilities (802.11n D1.10)");
- }
- else {
- if ((4 <= tag_len) && !tvb_memeql(tvb, offset, PRE_11N_OUI"\x34", 4)) {
- proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, 3, 1, "HT additional information (802.11n D1.00)");
+ proto_tree_add_item(tree, hf_ieee80211_ht_pren_type, tvb, offset, 1, ENC_NA);
+ type = tvb_get_guint8(tvb, offset);
+ offset += 1;
+ tag_len -= 1;
+
+
+ switch(type){
+ case 51:
+ dissect_ht_capability_ie(tvb, pinfo, tree, offset, tag_len, ti_len, TRUE);
+ proto_item_append_text(item, ": HT Capabilities (802.11n D1.10)");
+ break;
- dissect_ht_info_ie_1_0(tvb, pinfo, tree, offset+4, tag_len - 4, ti_len);
+ case 52:
+ dissect_ht_info_ie_1_0(tvb, pinfo, tree, offset, tag_len, ti_len);
proto_item_append_text(item, ": HT Additional Capabilities (802.11n D1.00)");
- }
- else {
- proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, 3, 1, "Unknown type");
- proto_item_append_text(item, ": 802.11n (pre) Unknown type");
- proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, 4,
- tag_len - 4, "Not interpreted");
- }
+ break;
+
+ default:
+ proto_tree_add_item(tree, hf_ieee80211_ht_pren_unknown, tvb, offset, tag_len, ENC_NA);
+ break;
}
+
}
static guint
/* Dissect and add tagged (optional) fields to proto tree */
/* ************************************************************************* */
-
static int beacon_padding = 0; /* beacon padding bug */
static int
}
offset += 2;
- add_fixed_field(tree, tvb, offset, FIELD_QOS_TS_INFO);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_QOS_TS_INFO);
offset += 3;
proto_tree_add_item(tree, hf_ieee80211_tspec_nor_msdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
{
guint8 type;
guint8 version;
+ proto_item *class_mask;
+ proto_tree *mask_tree;
offset += 2;
proto_tree_add_item(tree, hf_ieee80211_tclas_up, tvb, offset, 1, ENC_LITTLE_ENDIAN);
- type = tvb_get_guint8(tvb, offset);
offset += 1;
+ type = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_ieee80211_tclas_class_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
- proto_tree_add_item(tree, hf_ieee80211_tclas_class_mask, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ class_mask = proto_tree_add_item(tree, hf_ieee80211_tclas_class_mask,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
switch (type)
{
case 0:
+ offset--;
+ mask_tree = proto_item_add_subtree(class_mask,
+ ett_tag_tclas_mask_tree);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask0_src_addr,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask0_dst_addr,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask0_type,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+
proto_tree_add_item(tree, hf_ieee80211_tclas_src_mac_addr, tvb, offset, 6, ENC_NA);
offset += 6;
break;
case 1:
- version = tvb_get_guint8(tvb, offset + 5);
- proto_tree_add_item(tree, hf_ieee80211_tclas_version, tvb, offset + 5, 1, ENC_LITTLE_ENDIAN);
+ version = tvb_get_guint8(tvb, offset);
+ offset--;
+
+ mask_tree = proto_item_add_subtree(class_mask,
+ ett_tag_tclas_mask_tree);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask1_ver,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask1_src_ip,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask1_dst_ip,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask1_src_port,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask1_dst_port,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ if (version == 4) {
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask1_ipv4_dscp,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask1_ipv4_proto,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ } else {
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask1_ipv6_flow,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ }
+ offset += 1;
+
+ proto_tree_add_item(tree, hf_ieee80211_tclas_version, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
if (version == 4)
{
break;
case 2:
+ offset--;
+ mask_tree = proto_item_add_subtree(class_mask,
+ ett_tag_tclas_mask_tree);
+ proto_tree_add_item(mask_tree,
+ hf_ieee80211_tclas_class_mask2_tci,
+ tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ offset++;
+
proto_tree_add_item(tree, hf_ieee80211_tclas_tag_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
break;
}
offset += 2;
- add_fixed_field(tree, tvb, offset, FIELD_SCHEDULE_INFO);
+ add_fixed_field(tree, tvb, pinfo, offset, FIELD_SCHEDULE_INFO);
offset += 2;
proto_tree_add_item(tree, hf_ieee80211_sched_srv_start, tvb, offset, 4, ENC_LITTLE_ENDIAN);
/* proto_item *ti_cap;
proto_tree *cap_tree; */
offset += 2;
- offset = dissect_qos_capability(tree, tvb, offset, ftype);
+ offset = dissect_qos_capability(tree, tvb, pinfo, offset, ftype);
}
break;
/* Total number off associated clients and repeater access points */
proto_tree_add_item(tree, hf_ieee80211_tag_cisco_ccx1_clients, tvb, offset, 1, ENC_NA);
offset += 1;
+ proto_tree_add_item(tree, hf_ieee80211_tag_cisco_ccx1_unknown2, tvb, offset, 3, ENC_NA);
+ offset += 3;
break;
case TAG_VHT_CAPABILITY:
break;
}
{
+ guint32 tag_vs_len = tag_len;
offset += 2;
oui = tvb_get_ntoh24(tvb, offset);
tag_tvb = tvb_new_subset(tvb, offset, tag_len, tag_len);
proto_tree_add_item(tree, hf_ieee80211_tag_oui, tvb, offset, 3, ENC_NA);
proto_item_append_text(ti, ": %s", uint_get_manuf_name(oui));
+ offset += 3;
+ tag_vs_len -= 3;
- if (tag_len > 3) {
- proto_tree_add_item(ti, hf_ieee80211_tag_vendor_oui_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
+ if (tag_len > 0) {
+ proto_tree_add_item(ti, hf_ieee80211_tag_vendor_oui_type, tvb, offset, 1, ENC_BIG_ENDIAN);
}
switch (oui) {
/* 802.11 specific vendor ids */
-# define WPAWME_OUI 0x0050F2
-# define RSNOUI_VAL 0x000FAC
-# define PRE11N_OUI 0x00904c
- case WPAWME_OUI:
- offset = dissect_vendor_ie_wpawme(tree, tvb, offset + 3, tag_len, ftype);
+ case OUI_WPAWME:
+ offset = dissect_vendor_ie_wpawme(tree, tvb, pinfo, offset, tag_vs_len, ftype);
break;
- case RSNOUI_VAL:
- dissect_vendor_ie_rsn(ti, tree, tvb, offset + 3, tag_len - 3);
+ case OUI_RSN:
+ dissect_vendor_ie_rsn(ti, tree, tvb, offset, tag_vs_len);
break;
- case PRE11N_OUI:
- dissect_vendor_ie_ht(tvb, pinfo, tree, offset, ti, ti_len, tag_len);
+ case OUI_PRE11N:
+ dissect_vendor_ie_ht(tvb, pinfo, tree, offset, ti, ti_len, tag_vs_len);
break;
case OUI_WFA:
dissect_vendor_ie_wfa(pinfo, ti, tag_tvb);
/* Normal IEEE vendor ids (from oui.h) */
case OUI_CISCOWL: /* Cisco Wireless (Aironet) */
- dissect_vendor_ie_aironet(ti, tree, tvb, offset + 3, tag_len - 3);
+ dissect_vendor_ie_aironet(ti, tree, tvb, offset, tag_vs_len);
break;
case OUI_MARVELL:
- dissect_vendor_ie_marvell(ti, tree, tvb, offset + 3, tag_len - 3);
+ dissect_vendor_ie_marvell(ti, tree, tvb, offset, tag_vs_len);
break;
case OUI_ATHEROS:
- dissect_vendor_ie_atheros(ti, tree, tvb, offset + 3, tag_len - 3, pinfo, ti_len);
+ dissect_vendor_ie_atheros(ti, tree, tvb, offset, tag_vs_len, pinfo, ti_len);
+ break;
+ case OUI_ARUBA:
+ dissect_vendor_ie_aruba(ti, tree, tvb, offset, tag_vs_len);
break;
default:
- proto_tree_add_string (tree, hf_ieee80211_tag_interpretation, tvb, offset + 3,
- tag_len - 3, "Not interpreted");
+ proto_tree_add_item(tree, hf_ieee80211_tag_vendor_data, tvb, offset, tag_vs_len, ENC_NA);
break;
}
dissect_mmie(tree, tvb, offset + 2, tag_len);
break;
+ case TAG_SSID_LIST:
+ dissect_ssid_list(tree, tvb, offset + 2, tag_len);
+ break;
+
case TAG_TIME_ZONE:
dissect_time_zone(tree, tvb, offset + 2, tag_len);
break;
case TAG_TIMEOUT_INTERVAL:
- dissect_timeout_interval(tree, tvb, offset + 2, tag_len);
+ dissect_timeout_interval(tree, tvb, pinfo, offset + 2, tag_len);
break;
case TAG_RIC_DATA: /* RIC Data (RDE) (57) */
}
break;
+ case TAG_BSS_MAX_IDLE_PERIOD:
+ dissect_bss_max_idle_period(tree, tvb, offset + 2);
+ break;
+
+ case TAG_TFS_REQUEST:
+ dissect_tfs_request(pinfo, tree, tvb, offset + 2, tag_len, ftype);
+ break;
+
+ case TAG_TFS_RESPONSE:
+ dissect_tfs_response(pinfo, tree, tvb, offset + 2, tag_len, ftype);
+ break;
+
+ case TAG_WNM_SLEEP_MODE:
+ dissect_wnm_sleep_mode(tree, tvb, offset + 2);
+ break;
+
case TAG_TIME_ADV:
dissect_time_adv(tree, tvb, offset + 2);
break;
proto_tree_add_item (tree, hf_ieee80211_mesh_peering_peer_link_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
}
- offset += add_fixed_field(tree, tvb, offset, FIELD_REASON_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
break;
/* unexpected values */
proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_ext, tvb, offset, 6, ENC_NA);
offset += 6;
}
- offset += add_fixed_field(tree, tvb, offset, FIELD_REASON_CODE);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
}
break;
}
offset += 2;
tag_offset = offset;
- offset += add_fixed_field(tree, tvb, offset, FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT);
if (tag_len > (offset - tag_offset))
{
int offset = 0;
int tagged_parameter_tree_len;
- g_pinfo = pinfo;
ieee80211_tvb_invalid = FALSE;
CHECK_DISPLAY_AS_X(data_handle,proto_wlan_mgt, tvb, pinfo, tree);
case MGT_ASSOC_REQ:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 4);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_CAP_INFO);
- add_fixed_field(fixed_tree, tvb, 2, FIELD_LISTEN_IVAL);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
+ add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_LISTEN_IVAL);
offset = 4; /* Size of fixed fields */
tagged_parameter_tree_len =
case MGT_ASSOC_RESP:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_CAP_INFO);
- add_fixed_field(fixed_tree, tvb, 2, FIELD_STATUS_CODE);
- add_fixed_field(fixed_tree, tvb, 4, FIELD_ASSOC_ID);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
+ add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_STATUS_CODE);
+ add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_ASSOC_ID);
offset = 6; /* Size of fixed fields */
tagged_parameter_tree_len =
case MGT_REASSOC_REQ:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 10);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_CAP_INFO);
- add_fixed_field(fixed_tree, tvb, 2, FIELD_LISTEN_IVAL);
- add_fixed_field(fixed_tree, tvb, 4, FIELD_CURRENT_AP_ADDR);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
+ add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_LISTEN_IVAL);
+ add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_CURRENT_AP_ADDR);
offset = 10; /* Size of fixed fields */
tagged_parameter_tree_len =
case MGT_REASSOC_RESP:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_CAP_INFO);
- add_fixed_field(fixed_tree, tvb, 2, FIELD_STATUS_CODE);
- add_fixed_field(fixed_tree, tvb, 4, FIELD_ASSOC_ID);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
+ add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_STATUS_CODE);
+ add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_ASSOC_ID);
offset = 6; /* Size of fixed fields */
tagged_parameter_tree_len =
case MGT_PROBE_RESP:
{
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_TIMESTAMP);
- add_fixed_field(fixed_tree, tvb, 8, FIELD_BEACON_INTERVAL);
- add_fixed_field(fixed_tree, tvb, 10, FIELD_CAP_INFO);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_TIMESTAMP);
+ add_fixed_field(fixed_tree, tvb, pinfo, 8, FIELD_BEACON_INTERVAL);
+ add_fixed_field(fixed_tree, tvb, pinfo, 10, FIELD_CAP_INFO);
offset = 12; /* Size of fixed fields */
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
case MGT_MEASUREMENT_PILOT:
{
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_TIMESTAMP);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_MEASUREMENT_PILOT_INT);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_BEACON_INTERVAL);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_CAP_INFO);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_COUNTRY_STR);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_MAX_REG_PWR);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_MAX_TX_PWR);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_TX_PWR_USED);
- offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_TRANSCEIVER_NOISE_FLOOR);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TIMESTAMP);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MEASUREMENT_PILOT_INT);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_BEACON_INTERVAL);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_CAP_INFO);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_COUNTRY_STR);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MAX_REG_PWR);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MAX_TX_PWR);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TX_PWR_USED);
+ offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TRANSCEIVER_NOISE_FLOOR);
/* TODO DS Parameter Set ??? */
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
}
case MGT_BEACON: /* Dissect protocol payload fields */
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_TIMESTAMP);
- add_fixed_field(fixed_tree, tvb, 8, FIELD_BEACON_INTERVAL);
- add_fixed_field(fixed_tree, tvb, 10, FIELD_CAP_INFO);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_TIMESTAMP);
+ add_fixed_field(fixed_tree, tvb, pinfo, 8, FIELD_BEACON_INTERVAL);
+ add_fixed_field(fixed_tree, tvb, pinfo, 10, FIELD_CAP_INFO);
offset = 12; /* Size of fixed fields */
tagged_parameter_tree_len =
case MGT_DISASS:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 2);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_REASON_CODE);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_REASON_CODE);
offset = 2; /* Size of fixed fields */
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
if (tagged_parameter_tree_len > 0) {
case MGT_AUTHENTICATION:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_AUTH_ALG);
- add_fixed_field(fixed_tree, tvb, 2, FIELD_AUTH_TRANS_SEQ);
- add_fixed_field(fixed_tree, tvb, 4, FIELD_STATUS_CODE);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_AUTH_ALG);
+ add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_AUTH_TRANS_SEQ);
+ add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_STATUS_CODE);
offset = 6; /* Size of fixed fields */
tagged_parameter_tree_len =
case MGT_DEAUTHENTICATION:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 2);
- add_fixed_field(fixed_tree, tvb, 0, FIELD_REASON_CODE);
+ add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_REASON_CODE);
offset = 2; /* Size of fixed fields */
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
if (tagged_parameter_tree_len > 0) {
lcl_fixed_hdr = proto_tree_add_text(mgt_tree, tvb, 0, 0, "Fixed parameters");
lcl_fixed_tree = proto_item_add_subtree (lcl_fixed_hdr, ett_fixed_parameters);
- offset += add_fixed_field(lcl_fixed_tree, tvb, 0, FIELD_ACTION);
+ offset += add_fixed_field(lcl_fixed_tree, tvb, pinfo, 0, FIELD_ACTION);
proto_item_set_len(lcl_fixed_hdr, offset);
if (ieee80211_tvb_invalid)
lcl_fixed_hdr = proto_tree_add_text(mgt_tree, tvb, 0, 0, "Fixed parameters");
lcl_fixed_tree = proto_item_add_subtree (lcl_fixed_hdr, ett_fixed_parameters);
- offset += add_fixed_field(lcl_fixed_tree, tvb, 0, FIELD_ACTION);
+ offset += add_fixed_field(lcl_fixed_tree, tvb, pinfo, 0, FIELD_ACTION);
proto_item_set_len(lcl_fixed_hdr, offset);
if (ieee80211_tvb_invalid)
hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- /*offset +=*/ add_fixed_field(hdr_tree, tvb, offset,
+ /*offset +=*/ add_fixed_field(hdr_tree, tvb, pinfo, offset,
FIELD_BLOCK_ACK_SSC);
break;
}
hf_ieee80211_block_ack_control_compressed_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- /*offset +=*/ add_fixed_field(hdr_tree, tvb, offset,
+ /*offset +=*/ add_fixed_field(hdr_tree, tvb, pinfo, offset,
FIELD_BLOCK_ACK_SSC);
break;
}
proto_tree_add_item(bar_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- offset += add_fixed_field(bar_mtid_sub_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_fixed_field(bar_mtid_sub_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
}
break;
}
hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- offset += add_fixed_field(hdr_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 128, ENC_NA);
/*offset += 128;*/
break;
ssn = tvb_get_letohs(tvb, offset);
ssn >>= 4;
- offset += add_fixed_field(hdr_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
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);
proto_tree_add_item(ba_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- offset += add_fixed_field(ba_mtid_sub_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_fixed_field(ba_mtid_sub_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
proto_tree_add_item(ba_mtid_sub_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, ENC_NA);
offset += 8;
}
guint16 qos_eosp;
guint16 qos_field_content;
- qos_fields = proto_tree_add_item(hdr_tree, hf_ieee80211_qos, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ qos_fields = proto_tree_add_item(hdr_tree, hf_ieee80211_qos, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
qos_tree = proto_item_add_subtree (qos_fields, ett_qos_parameters);
qos_eosp = QOS_EOSP(qos_control);
qos_field_content = QOS_FIELD_CONTENT(qos_control);
- proto_tree_add_item(qos_tree, hf_ieee80211_qos_tid, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(qos_tree, hf_ieee80211_qos_tid, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
- qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_priority, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_priority, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
PROTO_ITEM_SET_GENERATED(qos_ti);
if (flags & FLAG_FROM_DS) {
- proto_tree_add_item(qos_tree, hf_ieee80211_qos_eosp, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(qos_tree, hf_ieee80211_qos_eosp, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
} else {
- proto_tree_add_item(qos_tree, hf_ieee80211_qos_bit4, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(qos_tree, hf_ieee80211_qos_bit4, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
}
- proto_tree_add_item(qos_tree, hf_ieee80211_qos_ack_policy, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(qos_tree, hf_ieee80211_qos_ack_policy, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
if (flags & FLAG_FROM_DS) {
if (!DATA_FRAME_IS_NULL(frame_type_subtype)) {
- proto_tree_add_item(qos_tree, hf_ieee80211_qos_amsdu_present, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(qos_tree, hf_ieee80211_qos_amsdu_present, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
is_amsdu = QOS_AMSDU_PRESENT(qos_control);
}
if (DATA_FRAME_IS_CF_POLL(frame_type_subtype)) {
/* txop limit */
- qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_txop_limit, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_txop_limit, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
if (qos_field_content == 0) {
proto_item_append_text(qos_ti, " (transmit one frame immediately)");
}
proto_item *qos_ps_buf_state_fields;
proto_tree *qos_ps_buf_state_tree;
- qos_ps_buf_state_fields = proto_tree_add_item(qos_tree, hf_ieee80211_qos_ps_buf_state, tvb, qosoff, 2, ENC_NA);
+ qos_ps_buf_state_fields = proto_tree_add_item(qos_tree, hf_ieee80211_qos_ps_buf_state, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
qos_ps_buf_state_tree = proto_item_add_subtree (qos_ps_buf_state_fields, ett_qos_ps_buf_state);
- proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_buf_state_indicated, tvb, qosoff + 1, 1, ENC_NA);
+ proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_buf_state_indicated, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
if (QOS_PS_BUF_STATE_INDICATED(qos_field_content)) {
- proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_highest_pri_buf_ac, tvb, qosoff + 1, 1, ENC_NA);
- qos_ti = proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_qap_buf_load, tvb, qosoff + 1, 1, ENC_NA);
+ proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_highest_pri_buf_ac, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
+ qos_ti = proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_qap_buf_load, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
switch (QOS_PS_QAP_BUF_LOAD(qos_field_content)) {
case 0:
}
} else {
if (!DATA_FRAME_IS_NULL(frame_type_subtype)) {
- proto_tree_add_item(qos_tree, hf_ieee80211_qos_amsdu_present, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(qos_tree, hf_ieee80211_qos_amsdu_present, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
is_amsdu = QOS_AMSDU_PRESENT(qos_control);
}
if (qos_eosp) {
/* queue size */
- qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_queue_size, tvb, qosoff, 2, ENC_BIG_ENDIAN);
+ qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_queue_size, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
switch (qos_field_content) {
case 0:
proto_item_append_text(qos_ti, " (no buffered traffic in the queue)");
} else {
/* txop duration requested */
qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_txop_dur_req,
- tvb, qosoff + 1, 2, ENC_BIG_ENDIAN);
+ tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
if (qos_field_content == 0) {
proto_item_append_text(qos_ti, " (no TXOP requested)");
}
msh_fields = proto_tree_add_item(hdr_tree, hf_ieee80211_mesh_control_field, tvb, meshoff, meshctl_len, ENC_NA);
msh_tree = proto_item_add_subtree (msh_fields, ett_msh_control);
- add_fixed_field(msh_tree, tvb, meshoff, FIELD_MESH_CONTROL);
+ add_fixed_field(msh_tree, tvb, pinfo, meshoff, FIELD_MESH_CONTROL);
}
} /* end of qos control field */
proto_tree_add_item(subframe_tree, hf_ieee80211_addr_da, next_tvb, msdu_offset, 6, ENC_NA);
proto_tree_add_item(subframe_tree, hf_ieee80211_addr_sa, next_tvb, msdu_offset+6, 6, ENC_NA);
- proto_tree_add_item(subframe_tree, hf_ieee80211_amsdu_length, next_tvb, msdu_offset+12, 2, ENC_NA);
+ proto_tree_add_item(subframe_tree, hf_ieee80211_amsdu_length, next_tvb, msdu_offset+12, 2, ENC_BIG_ENDIAN);
msdu_offset += 14;
msdu_tvb = tvb_new_subset(next_tvb, msdu_offset, msdu_length, -1);
int tagged_parameter_tree_len;
proto_tree *tagged_tree;
- g_pinfo = pinfo;
-
type = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_ieee80211_data_encap_payload_type, tvb, offset,
1, ENC_BIG_ENDIAN);
case 2:
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDLS");
col_clear(pinfo->cinfo, COL_INFO);
- offset += add_fixed_field(tree, tvb, offset, FIELD_ACTION);
+ offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ACTION);
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
if (tagged_parameter_tree_len > 0) {
tagged_tree = get_tagged_parameter_tree(tree, tvb, offset,
{&hf_ieee80211_qos_ps_buf_state,
{"QAP PS Buffer State", "wlan.qos.ps_buf_state",
- FT_UINT16, BASE_HEX, NULL, 0xFF000,
+ FT_UINT16, BASE_HEX, NULL, 0xFF00,
NULL, HFILL }},
{&hf_ieee80211_qos_buf_state_indicated,
{"Buffer State Indicated", "wlan.qos.buf_state_indicated",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
+ FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0200,
NULL, HFILL }},
{&hf_ieee80211_qos_highest_pri_buf_ac,
{"Highest-Priority Buffered AC", "wlan.qos.highest_pri_buf_ac",
- FT_UINT8, BASE_DEC, VALS(wme_acs), 0x0C,
+ FT_UINT16, BASE_DEC, VALS(wme_acs), 0x0C00,
NULL, HFILL }},
{&hf_ieee80211_qos_qap_buf_load,
{"QAP Buffered Load", "wlan.qos.qap_buf_load",
- FT_UINT8, BASE_DEC, NULL, 0xF0,
+ FT_UINT16, BASE_DEC, NULL, 0xF000,
NULL, HFILL }},
{&hf_ieee80211_qos_txop_dur_req,
FT_UINT8, BASE_DEC|BASE_EXT_STRING, &wnm_action_codes_ext, 0,
"Management action code", HFILL }},
+ {&hf_ieee80211_ff_key_data,
+ {"Key Data", "wlan_mgt.fixed.key_data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
+
+ {&hf_ieee80211_ff_key_data_length,
+ {"Key Data Length", "wlan_mgt.fixed.key_data_length",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ {&hf_ieee80211_ff_wnm_notification_type,
+ {"WNM-Notification type", "wlan_mgt.fixed.wnm_notification_type",
+ FT_UINT8, BASE_DEC|BASE_EXT_STRING, &wnm_notification_types_ext, 0,
+ NULL, HFILL }},
+
{&hf_ieee80211_ff_request_mode_pref_cand,
{"Preferred Candidate List Included","wlan_mgt.fixed.request_mode.pref_cand",
FT_UINT8, BASE_DEC, NULL, 0x01,
FT_UINT16, BASE_HEX, NULL, 0,
NULL, HFILL }},
+ {&hf_ieee80211_anqp_wfa_subtype,
+ {"ANQP WFA Subtype", "wlan_mgt.anqp.wfa.subtype",
+ FT_UINT8, BASE_DEC, VALS(wfa_subtype_vals), 0, NULL, HFILL }},
+
+ {&hf_hs20_indication_dgaf_disabled,
+ {"DGAF Disabled", "wlan_mgt.hs20.indication.dgaf_disabled",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
+
+ {&hf_hs20_anqp_subtype,
+ {"Subtype", "wlan_mgt.hs20.anqp.subtype",
+ FT_UINT8, BASE_DEC, VALS(hs20_anqp_subtype_vals), 0,
+ "Hotspot 2.0 ANQP Subtype", HFILL }},
+
+ {&hf_hs20_anqp_reserved,
+ {"Reserved", "wlan_mgt.hs20.anqp.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_payload,
+ {"Payload", "wlan_mgt.hs20.anqp.payload",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ "Hotspot 2.0 ANQP Payload", HFILL }},
+
+ {&hf_hs20_anqp_hs_query_list,
+ {"Queried Subtype", "wlan_mgt.hs20.anqp.hs_query_list",
+ FT_UINT8, BASE_DEC, VALS(hs20_anqp_subtype_vals), 0,
+ "Queried HS 2.0 Element Subtype", HFILL }},
+
+ {&hf_hs20_anqp_hs_capability_list,
+ {"Capability", "wlan_mgt.hs20.anqp.hs_capability_list",
+ FT_UINT8, BASE_DEC, VALS(hs20_anqp_subtype_vals), 0,
+ "Hotspot 2.0 ANQP Subtype Capability", HFILL }},
+
+ {&hf_hs20_anqp_ofn_length,
+ {"Length", "wlan_mgt.hs20.anqp.ofn.length",
+ FT_UINT8, BASE_DEC, NULL, 0,
+ "Operator Friendly Name Length", HFILL }},
+
+ {&hf_hs20_anqp_ofn_language,
+ {"Language Code", "wlan_mgt.hs20.anqp.ofn.language",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "Operator Friendly Name Language Code", HFILL }},
+
+ {&hf_hs20_anqp_ofn_name,
+ {"Operator Friendly Name", "wlan_mgt.hs20.anqp.ofn.name",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_link_status,
+ {"Link Status", "wlan_mgt.hs20.anqp.wan_metrics.link_status",
+ FT_UINT8, BASE_DEC, VALS(hs20_wm_link_status_vals), 0x03, NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_symmetric_link,
+ {"Symmetric Link", "wlan_mgt.hs20.anqp.wan_metrics.symmetric_link",
+ FT_UINT8, BASE_DEC, NULL, 0x04, NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_at_capacity,
+ {"At Capacity", "wlan_mgt.hs20.anqp.wan_metrics.at_capacity",
+ FT_UINT8, BASE_DEC, NULL, 0x08, NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_reserved,
+ {"Reserved", "wlan_mgt.hs20.anqp.wan_metrics.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xf0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_downlink_speed,
+ {"Downlink Speed", "wlan_mgt.hs20.anqp.wan_metrics.downlink_speed",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_uplink_speed,
+ {"Uplink Speed", "wlan_mgt.hs20.anqp.wan_metrics.uplink_speed",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_downlink_load,
+ {"Downlink Load", "wlan_mgt.hs20.anqp.wan_metrics.downlink_load",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_uplink_load,
+ {"Uplink Load", "wlan_mgt.hs20.anqp.wan_metrics.uplink_load",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_wan_metrics_lmd,
+ {"LMD", "wlan_mgt.hs20.anqp.wan_metrics.lmd",
+ FT_UINT16, BASE_DEC, NULL, 0, "Load Measurement Duration", HFILL }},
+
+ {&hf_hs20_anqp_cc_proto_ip_proto,
+ {"IP Protocol", "wlan_mgt.hs20.anqp.cc.ip_proto",
+ FT_UINT8, BASE_DEC, NULL, 0,
+ "ProtoPort Tuple - IP Protocol", HFILL }},
+
+ {&hf_hs20_anqp_cc_proto_port_num,
+ {"Port Number", "wlan_mgt.hs20.anqp.cc.port_num",
+ FT_UINT16, BASE_DEC, NULL, 0,
+ "ProtoPort Tuple - Port Number", HFILL }},
+
+ {&hf_hs20_anqp_cc_proto_status,
+ {"Status", "wlan_mgt.hs20.anqp.cc.status",
+ FT_UINT8, BASE_DEC, VALS(hs20_cc_status_vals), 0,
+ "ProtoPort Tuple - Status", HFILL }},
+
+ {&hf_hs20_anqp_nai_hrq_count,
+ {"NAI Home Realm Count", "wlan_mgt.hs20.anqp.nai_hrq.count",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_nai_hrq_encoding_type,
+ {"NAI Home Realm Encoding Type",
+ "wlan_mgt.hs20.anqp.nai_hrq.encoding_type",
+ FT_UINT8, BASE_DEC, VALS(nai_realm_encoding_vals),
+ 0x01, NULL, HFILL }},
+
+ {&hf_hs20_anqp_nai_hrq_length,
+ {"NAI Home Realm Name Length", "wlan_mgt.hs20.anqp.nai_hrq.length",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_nai_hrq_realm_name,
+ {"NAI Home Realm Name", "wlan_mgt.hs20.anqp.nai_hrq.name",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
+
+ {&hf_hs20_anqp_oper_class_indic,
+ {"Operating Class", "wlan_mgt.hs20.anqp.oper_class_indic.oper_class",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+
{&hf_ieee80211_tag,
{"Tag", "wlan_mgt.tag",
FT_NONE, BASE_NONE, 0x0, 0,
"Indicates the maximum time (in TU) remaining in the present CFP", HFILL }},
{&hf_ieee80211_tag_vendor_oui_type,
- {"Vendor Specific OUI Type", "wlan_mgt.tag.oui.type",
+ {"Vendor Specific OUI Type", "wlan_mgt.tag.vendor.oui.type",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL }},
+ {&hf_ieee80211_tag_vendor_data,
+ {"Vendor Specific Data", "wlan_mgt.tag.vendor.data",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ "Unknown/undecoded Vendor Specific Data", HFILL }},
+
{&hf_ieee80211_tim_dtim_count,
{"DTIM count", "wlan_mgt.tim.dtim_count",
FT_UINT8, BASE_DEC, NULL, 0,
{"Classifier Mask", "wlan_mgt.tclas.class_mask",
FT_UINT8, BASE_HEX, NULL, 0,
"Specifies a bitmap where bits that are set to 1 identify a subset of the classifier parameters", HFILL }},
+ {&hf_ieee80211_tclas_class_mask0_src_addr,
+ {"Source Address", "wlan_mgt.tclas.class_mask.src_addr",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask0_dst_addr,
+ {"Destination Address", "wlan_mgt.tclas.class_mask.dst_addr",
+ FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask0_type,
+ {"Type", "wlan_mgt.tclas.class_mask.type",
+ FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask1_ver,
+ {"Version", "wlan_mgt.tclas.class_mask.version",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask1_src_ip,
+ {"Source IP Address", "wlan_mgt.tclas.class_mask.src_ip",
+ FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask1_dst_ip,
+ {"Destination IP Address", "wlan_mgt.tclas.class_mask.dst_ip",
+ FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask1_src_port,
+ {"Source Port", "wlan_mgt.tclas.class_mask.src_port",
+ FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask1_dst_port,
+ {"Destination Port", "wlan_mgt.tclas.class_mask.dst_port",
+ FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask1_ipv4_dscp,
+ {"DSCP", "wlan_mgt.tclas.class_mask.dscp",
+ FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask1_ipv4_proto,
+ {"Protocol", "wlan_mgt.tclas.class_mask.proto",
+ FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask1_ipv6_flow,
+ {"Flow Label", "wlan_mgt.tclas.class_mask.flow_label",
+ FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL }},
+ {&hf_ieee80211_tclas_class_mask2_tci,
+ {"802.1Q CLAN TCI", "wlan_mgt.tclas.class_mask.tci",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }},
{&hf_ieee80211_tclas_src_mac_addr,
{"Source address", "wlan_mgt.tclas.type",
FT_UINT8, BASE_DEC, VALS(ieee80211_rsn_cipher_vals), 0,
NULL, HFILL }},
+ {&hf_ieee80211_ht_pren_type,
+ {"802.11n (Pre) Type", "wlan_mgt.vs.pren.type",
+ FT_UINT8, BASE_DEC, VALS(ieee80211_ht_pren_type_vals), 0,
+ "Vendor Specific HT Type", HFILL }},
+ {&hf_ieee80211_ht_pren_unknown,
+ {"802.11n (Pre) Unknown Data", "wlan_mgt.vs.pren.unknown_data",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
{&hf_ieee80211_ht_cap,
{"HT Capabilities Info", "wlan_mgt.ht.capabilities",
FT_UINT16, BASE_HEX, NULL, 0,
{&hf_ieee80211_tag_dfs_channel_map,
{"Channel Map", "wlan_mgt.dfs.channel_map",
- FT_UINT16, BASE_HEX, NULL, 0,
+ FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }},
{&hf_ieee80211_tag_dfs_channel_number,
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL }},
+ {&hf_ieee80211_tag_cisco_ccx1_unknown2,
+ {"Unknown2", "wlan_mgt.cisco.ccx1.unknown2",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
{&hf_ieee80211_tag_neighbor_report_bssid,
{"BSSID", "wlan_mgt.nreport.bssid",
FT_ETHER, BASE_NONE, NULL, 0,
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL }},
- {&hf_ieee80211_aironet_ie_qos_unk1,
- {"Aironet IE QoS unknown 1", "wlan_mgt.aironet.qos.unk1",
+ {&hf_ieee80211_aironet_ie_qos_reserved,
+ {"Aironet IE QoS reserved", "wlan_mgt.aironet.qos.reserved",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }},
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL }},
+ /* Vendor Specific : Aruba Networks */
+ {&hf_ieee80211_vs_aruba_subtype,
+ {"Subtype", "wlan_mgt.vs.aruba.subtype",
+ FT_UINT8, BASE_DEC, VALS(ieee80211_vs_aruba_subtype_vals), 0,
+ NULL, HFILL }},
+
+ {&hf_ieee80211_vs_aruba_apname,
+ {"AP Name", "wlan_mgt.vs.aruba.ap_name",
+ FT_STRINGZ, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ {&hf_ieee80211_vs_aruba_data,
+ {"Data", "wlan_mgt.vs.aruba.data",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
{&hf_ieee80211_tsinfo,
{"Traffic Stream (TS) Info", "wlan_mgt.ts_info",
FT_UINT24, BASE_HEX, NULL, 0,
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL }},
+ /* BSS Max Idle Period */
+ {&hf_ieee80211_tag_bss_max_idle_period,
+ {"BSS Max Idle Period (1000 TUs)", "wlan_mgt.bss_max_idle.period",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
+ {&hf_ieee80211_tag_bss_max_idle_options_protected,
+ {"BSS Max Idle Period Options: Protected Keep-Alive Required",
+ "wlan_mgt.bss_max_idle.options.protected",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
+
+ /* TFS Request */
+ {&hf_ieee80211_tag_tfs_request_id,
+ {"TFS ID", "wlan_mgt.tfs_request.id",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ {&hf_ieee80211_tag_tfs_request_ac_delete_after_match,
+ {"TFS Action Code - Delete after match",
+ "wlan_mgt.tfs_request.action_code.delete_after_match",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
+ {&hf_ieee80211_tag_tfs_request_ac_notify,
+ {"TFS Action Code - Notify",
+ "wlan_mgt.tfs_request.action_code.notify",
+ FT_UINT8, BASE_DEC, NULL, 0x02, NULL, HFILL }},
+ {&hf_ieee80211_tag_tfs_request_subelem_id,
+ {"Subelement ID", "wlan_mgt.tfs_request.subelem.id",
+ FT_UINT8, BASE_DEC, VALS(tfs_request_subelem_ids), 0,
+ "TFS Request Subelement ID", HFILL }},
+ {&hf_ieee80211_tag_tfs_request_subelem_len,
+ {"Length", "wlan_mgt.tfs_request.subelem.len",
+ FT_UINT8, BASE_DEC, NULL, 0,
+ "TFS Request Subelement Length", HFILL }},
+ {&hf_ieee80211_tag_tfs_request_subelem,
+ {"Subelement Data", "wlan_mgt.tfs_request.subelem",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ "TFS Request Subelement Data", HFILL }},
+
+ /* TFS Response */
+ {&hf_ieee80211_tag_tfs_response_subelem_id,
+ {"Subelement ID", "wlan_mgt.tfs_response.subelem.id",
+ FT_UINT8, BASE_DEC, VALS(tfs_response_subelem_ids), 0,
+ "TFS Response Subelement ID", HFILL }},
+ {&hf_ieee80211_tag_tfs_response_subelem_len,
+ {"Length", "wlan_mgt.tfs_response.subelem.len",
+ FT_UINT8, BASE_DEC, NULL, 0,
+ "TFS Response Subelement Length", HFILL }},
+ {&hf_ieee80211_tag_tfs_response_subelem,
+ {"Subelement Data", "wlan_mgt.tfs_response.subelem",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ "TFS Response Subelement Data", HFILL }},
+ {&hf_ieee80211_tag_tfs_response_status,
+ {"TFS Response Status", "wlan_mgt.tfs_response.status",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ {&hf_ieee80211_tag_tfs_response_id,
+ {"TFS ID", "wlan_mgt.tfs_response.tfs_id",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+
+ /* WNM-Sleep Mode */
+ {&hf_ieee80211_tag_wnm_sleep_mode_action_type,
+ {"Action Type", "wlan_mgt.wnm_sleep_mode.action_type",
+ FT_UINT8, BASE_DEC, VALS(wnm_sleep_mode_action_types), 0,
+ "WNM-Sleep Mode Action Type", HFILL }},
+ {&hf_ieee80211_tag_wnm_sleep_mode_response_status,
+ {"WNM-Sleep Mode Response Status",
+ "wlan_mgt.wnm_sleep_mode.response_status",
+ FT_UINT8, BASE_DEC, VALS(wnm_sleep_mode_response_status_vals), 0, NULL,
+ HFILL }},
+ {&hf_ieee80211_tag_wnm_sleep_mode_interval,
+ {"WNM-Sleep Interval", "wlan_mgt.wnm_sleep_mode.interval",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
+
/* Time Advertisement */
{&hf_ieee80211_tag_time_adv_timing_capab,
{"Timing capabilities", "wlan_mgt.time_adv.timing_capab",
&ett_tag_rm_cap3,
&ett_tag_rm_cap4,
&ett_tag_rm_cap5,
+ &ett_tag_tclas_mask_tree,
&ett_tag_supported_channels,
&ett_tag_neighbor_report_bssid_info_tree,
&ett_tag_neighbor_report_bssid_info_capability_tree,
&ett_nai_realm,
&ett_nai_realm_eap,
&ett_tag_ric_data_desc_ie,
- &ett_anqp_vendor_capab
+ &ett_anqp_vendor_capab,
+ &ett_hs20_cc_proto_port_tuple,
+ &ett_ssid_list
};
module_t *wlan_module;