diff options
author | Michael Mann <mmann78@netscape.net> | 2014-09-05 08:48:37 -0400 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-09-06 07:44:46 +0000 |
commit | ceef7eba755cbecf670653360f72d864949dac49 (patch) | |
tree | 2cc48ebd17a4e7dc714f1b00af21f4f92546c948 /epan/dissectors/packet-pw-atm.c | |
parent | f1ad9eb212a6f4c5e1b6b1963bccf5f3a4900293 (diff) |
Eliminate proto_tree_add_text from some of the dissectors.
Other minor cleanups while in the area.
Change-Id: I8ea59205cfe6fab643d8fe01b75ce91532004fd9
Reviewed-on: https://code.wireshark.org/review/4004
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-pw-atm.c')
-rw-r--r-- | epan/dissectors/packet-pw-atm.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c index 951b2c0e2c..0046e6b90c 100644 --- a/epan/dissectors/packet-pw-atm.c +++ b/epan/dissectors/packet-pw-atm.c @@ -114,6 +114,8 @@ static expert_field ei_cell_h_m = EI_INIT; static expert_field ei_cw_bits03 = EI_INIT; static expert_field ei_pw_packet_size_too_small = EI_INIT; static expert_field ei_pref_cw_len = EI_INIT; +static expert_field ei_gen_cw_atmbyte = EI_INIT; + static dissector_handle_t dh_cell; static dissector_handle_t dh_cell_header; @@ -1303,16 +1305,11 @@ dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, voi /* atm-specific byte */ if (MODE_11(pd->mode)) { - proto_tree_add_item(tree2, hf_gen_cw_atmbyte, tvb, 3, 1, ENC_BIG_ENDIAN); - /* - * no need to highlight item in the tree, therefore - * expert_add_info_format() is not used here. - */ - item = proto_tree_add_text(tree2, tvb, 3, 1 - ,"ATM-specific byte of CW is fully dissected below as %s%s" + item = proto_tree_add_item(tree2, hf_gen_cw_atmbyte, tvb, 3, 1, ENC_BIG_ENDIAN); + expert_add_info_format(pinfo, item, &ei_gen_cw_atmbyte, + "ATM-specific byte of CW is fully dissected below as %s%s" ,(PWATM_MODE_11_VPC == pd->mode) ? "a part of " : "" ,"PW ATM Cell Header [000]"); - PROTO_ITEM_SET_GENERATED(item); /* * Note: if atm-specific byte contains something wrong * (e.g. non-zero RSV or inadequate V), CW is not @@ -1863,7 +1860,9 @@ proto_register_pw_atm_ata(void) { &ei_cell_h_v_not_zero, { "atm.pw_control_byte.v.not_one", PI_MALFORMED, PI_ERROR, "1:1 VPC mode: V bit must be 1 to indicate that VCI is present", EXPFILL }}, { &ei_cell_h_v_not_one, { "atm.pw_control_byte.v.not_zero", PI_MALFORMED, PI_ERROR, "1:1 VCC mode: V bit must be 0 to indicate that VCI is absent", EXPFILL }}, { &ei_cell_h_rsv, { "atm.pw_control_byte.rsv.not_zero", PI_MALFORMED, PI_ERROR, "Reserved bits in the 3rd byte of CW must be 0", EXPFILL }}, + { &ei_gen_cw_atmbyte, { "pw.cw.atmbyte", PI_PROTOCOL, PI_NOTE, "ATM-specific byte of CW is fully dissected below", EXPFILL }}, }; + expert_module_t* expert_cell; proto_n1_cw = |