aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2015-05-17 14:44:13 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2015-05-18 21:09:30 +0000
commitfcb284db972134b38c4965af8ee8d121295d16d7 (patch)
treeb19415760108393cd7b6ef5a0f52862e36b7982c /epan
parentf33aa0c6d4fec670832b53cc6abd6b546205156c (diff)
DVB-CI: remove proto_tree_add_text() calls from the transport layer
Change-Id: I593527fafa38312d5d4e8f778e9af0d6294bb3f8 Reviewed-on: https://code.wireshark.org/review/8528 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-dvbci.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c
index a29c7dbfed..000b6726b4 100644
--- a/epan/dissectors/packet-dvbci.c
+++ b/epan/dissectors/packet-dvbci.c
@@ -899,6 +899,7 @@ static int hf_dvbci_l_reass_len = -1;
static int hf_dvbci_c_tpdu_tag = -1;
static int hf_dvbci_r_tpdu_tag = -1;
static int hf_dvbci_t_c_id = -1;
+static int hf_dvbci_sb_tag = -1;
static int hf_dvbci_sb_value = -1;
static int hf_dvbci_t_frags = -1;
static int hf_dvbci_t_frag = -1;
@@ -4419,8 +4420,9 @@ dissect_dvbci_tpdu_status(tvbuff_t *tvb, gint offset,
proto_tree_add_expert(tree, pinfo, &ei_dvbci_tpdu_status_tag, tvb, offset_new, 1);
return -1;
}
+ proto_tree_add_item(tree, hf_dvbci_sb_tag, tvb,
+ offset_new, 1, ENC_BIG_ENDIAN);
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "T_SB");
- proto_tree_add_text(tree, tvb, offset_new, 1, "Response TPDU status");
offset_new++;
len_start_offset = offset_new;
@@ -4434,17 +4436,15 @@ dissect_dvbci_tpdu_status(tvbuff_t *tvb, gint offset,
}
t_c_id = tvb_get_guint8(tvb, offset_new);
- proto_tree_add_item(tree, hf_dvbci_t_c_id, tvb, offset_new, 1, ENC_BIG_ENDIAN);
+ pi = proto_tree_add_item(tree, hf_dvbci_t_c_id, tvb, offset_new, 1, ENC_BIG_ENDIAN);
/* tcid in transport header and link layer must only match for data
* transmission commands */
if (t_c_id!=lpdu_tcid) {
if (r_tpdu_tag==NO_TAG ||
r_tpdu_tag==T_DATA_MORE || r_tpdu_tag==T_DATA_LAST) {
-
- pi = proto_tree_add_text(tree, tvb, offset_new, 1,
- "Transport Connection ID mismatch");
- expert_add_info_format(pinfo, pi, &ei_dvbci_t_c_id, "Transport Connection ID mismatch, tcid is %d in the transport layer and %d in the link layer", t_c_id, lpdu_tcid);
-
+ expert_add_info_format(pinfo, pi, &ei_dvbci_t_c_id,
+ "Transport Connection ID mismatch, tcid is %d in the transport layer and %d in the link layer",
+ t_c_id, lpdu_tcid);
return -1;
}
}
@@ -4458,8 +4458,6 @@ dissect_dvbci_tpdu_status(tvbuff_t *tvb, gint offset,
col_append_sep_fstr(pinfo->cinfo, COL_INFO, ": ", "%s", sb_str);
}
else {
- proto_tree_add_text(tree, tvb, offset_new, 1,
- "Invalid SB_value");
expert_add_info(pinfo, pi, &ei_dvbci_sb_value);
}
offset_new++;
@@ -5356,6 +5354,10 @@ proto_register_dvbci(void)
{ "Transport Connection ID", "dvb-ci.t_c_id",
FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
},
+ { &hf_dvbci_sb_tag,
+ { "SB tag", "dvb-ci.sb_tag",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sb_value,
{ "SB Value", "dvb-ci.sb_value", FT_UINT8, BASE_HEX,
VALS(dvbci_sb_value), 0, NULL, HFILL } },