aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wifi-p2p.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-07-06 14:21:40 -0400
committerMichael Mann <mmann78@netscape.net>2014-07-06 18:26:48 +0000
commitc71e88e4a9ad00600627b27ec6bd68cd3a929c58 (patch)
tree9a02a0c5a8dffff4d95504eb1f627c817c814400 /epan/dissectors/packet-wifi-p2p.c
parentbe4d42c6ab54169c8c027d3b1871a282fd9d0a9d (diff)
convert to proto_tree_add_subtree[_format]
Change-Id: I3efa2a81ab2685cde6eae0a00b24520478a545ce Reviewed-on: https://code.wireshark.org/review/2900 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-wifi-p2p.c')
-rw-r--r--epan/dissectors/packet-wifi-p2p.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/epan/dissectors/packet-wifi-p2p.c b/epan/dissectors/packet-wifi-p2p.c
index bf541597e0..561c4eb564 100644
--- a/epan/dissectors/packet-wifi-p2p.c
+++ b/epan/dissectors/packet-wifi-p2p.c
@@ -738,9 +738,8 @@ static void dissect_wifi_p2p_group_info(packet_info *pinfo,
}
ci_len = tvb_get_guint8(tvb, s_offset);
- item = proto_tree_add_text(tlv_root, tvb, s_offset, 1 + ci_len,
- "P2P Client Info Descriptor");
- tree = proto_item_add_subtree(item, ett_p2p_client_descr);
+ tree = proto_tree_add_subtree(tlv_root, tvb, s_offset, 1 + ci_len,
+ ett_p2p_client_descr, NULL, "P2P Client Info Descriptor");
item = proto_tree_add_item(tree, hf_p2p_attr_gi_length, tvb, s_offset,
1, ENC_BIG_ENDIAN);
@@ -896,10 +895,9 @@ void dissect_wifi_p2p_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
stype = tvb_get_guint8(tvb, offset);
slen = tvb_get_letohs(tvb, offset + 1);
- tlv_item = proto_tree_add_text(tree, tvb, offset, 3 + slen, "%s",
+ tlv_root = proto_tree_add_subtree(tree, tvb, offset, 3 + slen, ett_p2p_tlv, &tlv_item,
val_to_str(stype, p2p_attr_types,
"Unknown attribute type (%u)"));
- tlv_root = proto_item_add_subtree(tlv_item, ett_p2p_tlv);
proto_tree_add_item(tlv_root, hf_p2p_attr_type, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_uint(tlv_root, hf_p2p_attr_len, tvb, offset + 1, 2,
@@ -1022,11 +1020,10 @@ void dissect_wifi_p2p_anqp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
type = tvb_get_guint8(tvb, offset + 2);
id = tvb_get_guint8(tvb, offset + 3);
- item = proto_tree_add_text(tree, tvb, offset, 2 + len,
- "Service TLV (Transaction ID: %u Type: %s)",
+ tlv = proto_tree_add_subtree_format(tree, tvb, offset, 2 + len,
+ ett_p2p_service_tlv, &item, "Service TLV (Transaction ID: %u Type: %s)",
id, val_to_str(type, p2p_service_protocol_types,
"Unknown (%u)"));
- tlv = proto_item_add_subtree(item, ett_p2p_service_tlv);
proto_tree_add_item(tlv, hf_p2p_anqp_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;