diff options
author | Michael Mann <mmann78@netscape.net> | 2014-08-09 13:43:44 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-08-10 21:39:20 +0000 |
commit | 3635d7bed70aaf14e8172654f2b40be318e7dbfe (patch) | |
tree | 4b0fce1dba327df9a24b4ddc267a83375c817683 /epan/dissectors/packet-igmp.c | |
parent | 18346c84778019fe6eee6906758daa120f84d5d0 (diff) |
Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the neighborhood.
Change-Id: Ib76f4a9f89b5933425760af0a980c6a549031b8f
Reviewed-on: https://code.wireshark.org/review/3537
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-igmp.c')
-rw-r--r-- | epan/dissectors/packet-igmp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-igmp.c b/epan/dissectors/packet-igmp.c index fbaff47c3e..2f701a3347 100644 --- a/epan/dissectors/packet-igmp.c +++ b/epan/dissectors/packet-igmp.c @@ -149,6 +149,7 @@ static int hf_record_type = -1; static int hf_aux_data_len = -1; static int hf_maddr = -1; static int hf_aux_data = -1; +static int hf_data = -1; static int hf_mtrace_max_hops = -1; static int hf_mtrace_saddr = -1; static int hf_mtrace_raddr = -1; @@ -383,7 +384,7 @@ dissect_igmp_unknown(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int ty /* Just call the rest of it "data" */ len = tvb_length_remaining(tvb, offset); - proto_tree_add_text(tree, tvb, offset, len, "Data"); + proto_tree_add_item(tree, hf_data, tvb, offset, -1, ENC_NA); offset += len; return offset; @@ -1086,6 +1087,10 @@ proto_register_igmp(void) { "Aux Data", "igmp.aux_data", FT_BYTES, BASE_NONE, NULL, 0, "IGMP V3 Auxiliary Data", HFILL }}, + { &hf_data, + { "Data", "igmp.data", FT_BYTES, BASE_NONE, + NULL, 0, NULL, HFILL }}, + { &hf_max_resp_exp, { "Exponent", "igmp.max_resp.exp", FT_UINT8, BASE_HEX, NULL, IGMP_MAX_RESP_EXP, "Maximum Response Time, Exponent", HFILL }}, |