summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-isup.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-08-25 20:58:09 -0400
committerAnders Broman <a.broman58@gmail.com>2015-08-27 19:29:31 +0000
commit30c2f23f057407eefbc4f852da71bdbac6fc6e63 (patch)
tree777773bea8bdcc24bb463ce4f7528e8724fc6022 /epan/dissectors/packet-isup.c
parent2ed634dfb9d6479c10ddac01e0a6cf60b604cf94 (diff)
downloadwireshark-30c2f23f057407eefbc4f852da71bdbac6fc6e63.tar.gz
Eliminate proto_tree_add_text from some dissectors.
Change-Id: I066b70cfd58f5fb3ffbcb2e238416747d9e7dd57 Reviewed-on: https://code.wireshark.org/review/10269 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 'epan/dissectors/packet-isup.c')
-rw-r--r--epan/dissectors/packet-isup.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index 563e033bf4..8fbd7d6051 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -2816,6 +2816,7 @@ static int hf_ansi_isup_cause_indicator = -1;
static int hf_isup_suspend_resume_indicator = -1;
static int hf_isup_range_indicator = -1;
+static int hf_isup_bitbucket = -1;
static int hf_isup_cgs_message_type = -1;
static int hf_isup_mtc_blocking_state1 = -1;
@@ -2944,6 +2945,7 @@ static int hf_late_cut_trough_cap_ind = -1;
static int hf_bat_ase_signal = -1;
static int hf_bat_ase_duration = -1;
static int hf_bat_ase_bearer_redir_ind = -1;
+static int hf_bat_ase_default = -1;
static int hf_BAT_ASE_Comp_Report_Reason = -1;
static int hf_BAT_ASE_Comp_Report_ident = -1;
static int hf_BAT_ASE_Comp_Report_diagnostic = -1;
@@ -3930,9 +3932,8 @@ dissect_isup_range_and_status_parameter(tvbuff_t *parameter_tvb, packet_info *pi
if (actual_status_length > 0) {
range_tree = proto_tree_add_subtree(parameter_tree, parameter_tvb, offset, -1, ett_isup_range, NULL, "Status subfield");
if (range<9) {
- proto_tree_add_text(range_tree, parameter_tvb , offset, 1, "Bit %u %s bit 1",
- range,
- decode_bits_in_field(8-range, range, tvb_get_guint8(parameter_tvb, offset)));
+ proto_tree_add_uint_bits_format_value(range_tree, hf_isup_bitbucket, parameter_tvb, (offset*8)+(8-range), range,
+ tvb_get_guint8(parameter_tvb, offset), "%u bit 1", range);
}
} else {
expert_add_info(pinfo, parameter_item, &ei_isup_status_subfield_not_present);
@@ -4669,7 +4670,7 @@ dissect_codec(tvbuff_t *parameter_tvb, proto_tree *bat_ase_element_tree, gint le
static void
dissect_bat_ase_Encapsulated_Application_Information(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, gint offset)
{
- gint length = tvb_reported_length_remaining(parameter_tvb, offset), list_end;
+ gint list_end;
tvbuff_t *next_tvb;
proto_tree *bat_ase_tree, *bat_ase_element_tree, *bat_ase_iwfa_tree;
proto_item *bat_ase_element_item, *bat_ase_iwfa_item;
@@ -4689,7 +4690,6 @@ dissect_bat_ase_Encapsulated_Application_Information(tvbuff_t *parameter_tvb, pa
bat_ase_tree = proto_tree_add_subtree(parameter_tree, parameter_tvb, offset, -1, ett_bat_ase, NULL,
"Bearer Association Transport (BAT) Application Service Element (ASE) Encapsulated Application Information:");
- proto_tree_add_text(bat_ase_tree, parameter_tvb, offset, -1, "BAT ASE Encapsulated Application Information, (%u byte%s length)", length, plurality(length, "", "s"));
while (tvb_reported_length_remaining(parameter_tvb, offset) > 0) {
element_no = element_no + 1;
identifier = tvb_get_guint8(parameter_tvb, offset);
@@ -4936,7 +4936,7 @@ dissect_bat_ase_Encapsulated_Application_Information(tvbuff_t *parameter_tvb, pa
offset = offset + content_len;
break;
default :
- proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, content_len , "Default ?, (%u byte%s length)", (content_len), plurality(content_len, "", "s"));
+ proto_tree_add_item(bat_ase_element_tree, hf_bat_ase_default, parameter_tvb, offset, content_len, ENC_NA);
offset = offset + content_len;
}
}
@@ -11318,6 +11318,11 @@ proto_register_isup(void)
FT_UINT8, BASE_DEC, NULL , 0x0,
NULL, HFILL }},
+ { &hf_isup_bitbucket,
+ { "Bit", "isup.bitbucket",
+ FT_UINT8, BASE_DEC, NULL , 0x0,
+ NULL, HFILL }},
+
{ &hf_isup_cgs_message_type,
{ "Circuit group supervision message type", "isup.cgs_message_type",
FT_UINT8, BASE_DEC, VALS(isup_cgs_message_type_value), BA_8BIT_MASK,
@@ -11843,6 +11848,11 @@ proto_register_isup(void)
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
+ { &hf_bat_ase_default,
+ { "Default", "bat_ase.default",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+
{ &hf_bat_ase_bearer_redir_ind,
{ "Redirection Indicator", "bat_ase.bearer_redir_ind",
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &Bearer_Redirection_Indicator_vals_ext, 0x0,