diff options
author | Michael Mann <mmann78@netscape.net> | 2014-12-30 16:45:01 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-01-01 04:34:44 +0000 |
commit | 889c566b9a20d9804f654a13b5006c123b5c8301 (patch) | |
tree | 459457acfbe3c3cf7d6cf9775acd90d854936e43 /plugins/wimax/mac_hd_generic_decoder.c | |
parent | 114e7735b961720e63d2145770ed9b82c0200ff8 (diff) | |
download | wireshark-889c566b9a20d9804f654a13b5006c123b5c8301.tar.gz |
Eliminate proto_tree_add_text from WiMax plugin.
Most of this was done with a custom perl script that picked out the field names from the XBIT macro and generated an hf_ and filter (that was humanly tweaked from there).
Change-Id: I563db9f8ea216efe37322b784ab0daf25c038d9e
Reviewed-on: https://code.wireshark.org/review/6149
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins/wimax/mac_hd_generic_decoder.c')
-rw-r--r-- | plugins/wimax/mac_hd_generic_decoder.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c index 7d72b6c22d..88bb0f1850 100644 --- a/plugins/wimax/mac_hd_generic_decoder.c +++ b/plugins/wimax/mac_hd_generic_decoder.c @@ -585,6 +585,7 @@ static gint hf_mac_header_generic_arq_fb_ie_seq_ack_map_2 = -1; static gint hf_mac_header_generic_arq_fb_ie_seq1_length_6 = -1; static gint hf_mac_header_generic_arq_fb_ie_seq2_length_6 = -1; static gint hf_mac_header_generic_arq_fb_ie_rsv = -1; +static gint hf_mac_header_payload_fragment = -1; static expert_field ei_mac_crc_malformed = EI_INIT; static expert_field ei_mac_crc_missing = EI_INIT; @@ -1087,7 +1088,7 @@ static void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo cid_vernier[cid_index]++; } /* Don't show reassembled packet until last fragment. */ - proto_tree_add_text(tree, tvb, offset, frag_len, "Payload Fragment (%d bytes)", frag_len); + proto_tree_add_bytes_format(tree, hf_mac_header_payload_fragment, tvb, offset, frag_len, NULL, "Payload Fragment (%d bytes)", frag_len); if (payload_frag && frag_type == LAST_FRAG) { /* defragmented completely */ @@ -1989,7 +1990,7 @@ void proto_register_mac_header_generic(void) &hf_mac_header_generic_grant_mgmt_ext_pbr_tree, { "Scheduling Service Type (Default)", - "wimax.genericGrantSubhd.Default", + "wmx.genericGrantSubhd.Default", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } @@ -2054,7 +2055,7 @@ void proto_register_mac_header_generic(void) &hf_mac_header_generic_grant_mgmt_ext_rtps_tree, { "Scheduling Service Type (Extended rtPS)", - "wimax.genericGrantSubhd.ExtendedRTPS", + "wmx.genericGrantSubhd.ExtendedRTPS", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } @@ -2213,7 +2214,15 @@ void proto_register_mac_header_generic(void) FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_RSV_MASK, NULL, HFILL } - } + }, + { + &hf_mac_header_payload_fragment, + { + "Payload Fragment", "wmx.payload_fragment", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL + } + }, }; /* Setup protocol subtree array */ |