diff options
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-ieee80211.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-wifi-dpp.c | 24 |
3 files changed, 27 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 0c932f3126..5a8a997a20 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -6866,7 +6866,7 @@ dissect_gas_initial_request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, if (subtype == ((DPP_CONFIGURATION_PROTOCOL << 8) | WFA_SUBTYPE_DPP)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", DPP - %s", val_to_str(subtype >> 8, dpp_subtype_vals, "Unknown (%u)")); - dissect_wifi_dpp_attributes(pinfo, query, tvb, offset); + dissect_wifi_dpp_config_proto(pinfo, query, tvb, offset); } break; default: @@ -6910,7 +6910,7 @@ dissect_gas_initial_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo if (subtype == ((DPP_CONFIGURATION_PROTOCOL << 8) | WFA_SUBTYPE_DPP)) { col_append_fstr(pinfo->cinfo, COL_INFO, ", DPP - %s", val_to_str(subtype >> 8, dpp_subtype_vals, "Unknown (%u)")); - dissect_wifi_dpp_attributes(pinfo, query, tvb, offset); + dissect_wifi_dpp_config_proto(pinfo, query, tvb, offset); } break; default: diff --git a/epan/dissectors/packet-ieee80211.h b/epan/dissectors/packet-ieee80211.h index fa8a5f691f..9eae85442c 100644 --- a/epan/dissectors/packet-ieee80211.h +++ b/epan/dissectors/packet-ieee80211.h @@ -55,8 +55,8 @@ int add_tagged_field(packet_info *pinfo, proto_tree *tree, guint valid_element_ids_count, association_sanity_check_t *association_sanity_check); -int dissect_wifi_dpp_attributes(packet_info *pinfo, proto_tree *query, - tvbuff_t *tvb, int offset); +int dissect_wifi_dpp_config_proto(packet_info *pinfo, proto_tree *query, + tvbuff_t *tvb, int offset); #define MAX_SSID_LEN 32 #define MAX_PROTECT_LEN 10 diff --git a/epan/dissectors/packet-wifi-dpp.c b/epan/dissectors/packet-wifi-dpp.c index e276078ed6..33b27b3993 100644 --- a/epan/dissectors/packet-wifi-dpp.c +++ b/epan/dissectors/packet-wifi-dpp.c @@ -189,7 +189,7 @@ dissect_wifi_dpp_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, voi return tvb_captured_length(tvb); } -int +static int dissect_wifi_dpp_attributes(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int offset _U_) { @@ -297,6 +297,28 @@ dissect_wifi_dpp_attributes(packet_info *pinfo _U_, proto_tree *tree, return attributes_len; // We return the attribute length plus hdr! } +int +dissect_wifi_dpp_config_proto(packet_info *pinfo _U_, proto_tree *tree, + tvbuff_t *tvb, int offset _U_) +{ + proto_item *dpp_item; + proto_tree *dpp_tree, *attr_tree; + guint remaining_len = tvb_reported_length_remaining(tvb, offset); + + dpp_item = proto_tree_add_item(tree, proto_wifi_dpp, tvb, offset, -1, ENC_NA); + dpp_tree = proto_item_add_subtree(dpp_item, ett_wifi_dpp_pa); + proto_item_append_text(dpp_item, " Configuration"); + + attr_tree = proto_tree_add_subtree_format(dpp_tree, tvb, offset, + remaining_len, + ett_wifi_dpp_attributes, NULL, + "DPP Attributes"); + + offset = dissect_wifi_dpp_attributes(pinfo, attr_tree, tvb, offset); + + return offset; +} + static int dissect_wifi_dpp_public_action(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { |