aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-07-03 02:59:31 +0000
committerMichael Mann <mmann78@netscape.net>2013-07-03 02:59:31 +0000
commit98492c561948b8d08c8c39e61a6f2c8b31cb344f (patch)
treec87f8e4302c3e9172a21a320e9e9e56baa301b21
parentfdead4df94f6cd253c6768369805732f35a7d9e2 (diff)
expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicable
svn path=/trunk/; revision=50337
-rw-r--r--asn1/acse/packet-acse-template.c4
-rw-r--r--asn1/cdt/cdt.cnf11
-rw-r--r--asn1/goose/goose.cnf7
-rw-r--r--asn1/gsm_map/packet-gsm_map-template.c10
-rw-r--r--asn1/mms/mms.cnf14
-rw-r--r--asn1/p1/p1.cnf4
-rw-r--r--asn1/p1/packet-p1-template.c2
-rw-r--r--asn1/pres/pres.cnf8
-rw-r--r--asn1/sv/sv.cnf8
-rw-r--r--epan/dissectors/packet-acse.c4
-rw-r--r--epan/dissectors/packet-amr.c12
-rw-r--r--epan/dissectors/packet-ansi_a.c6
-rw-r--r--epan/dissectors/packet-beep.c12
-rw-r--r--epan/dissectors/packet-cdt.c11
-rw-r--r--epan/dissectors/packet-frame.c12
-rw-r--r--epan/dissectors/packet-goose.c7
-rw-r--r--epan/dissectors/packet-gsm_map.c16
-rw-r--r--epan/dissectors/packet-gtpv2.c84
-rw-r--r--epan/dissectors/packet-isakmp.c4
-rw-r--r--epan/dissectors/packet-k12.c9
-rw-r--r--epan/dissectors/packet-mms.c16
-rw-r--r--epan/dissectors/packet-mux27010.c8
-rw-r--r--epan/dissectors/packet-p1.c2
-rw-r--r--epan/dissectors/packet-per.c5
-rw-r--r--epan/dissectors/packet-pres.c8
-rw-r--r--epan/dissectors/packet-sccp.c12
-rw-r--r--epan/dissectors/packet-sflow.c5
-rw-r--r--epan/dissectors/packet-sip.c8
-rw-r--r--epan/dissectors/packet-sv.c12
29 files changed, 101 insertions, 220 deletions
diff --git a/asn1/acse/packet-acse-template.c b/asn1/acse/packet-acse-template.c
index 5e1f8c6b56..f693799e9e 100644
--- a/asn1/acse/packet-acse-template.c
+++ b/asn1/acse/packet-acse-template.c
@@ -216,8 +216,8 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
call_ber_oid_callback(oid, tvb, offset, pinfo, parent_tree);
} else {
- proto_item *ti = proto_tree_add_text(parent_tree, tvb, offset, -1, "dissector is not available");
- expert_add_info(pinfo, ti, &ei_acse_dissector_not_available);
+ proto_tree_add_expert(parent_tree, pinfo, &ei_acse_dissector_not_available,
+ tvb, offset, -1);
}
top_tree = NULL;
return;
diff --git a/asn1/cdt/cdt.cnf b/asn1/cdt/cdt.cnf
index bb4523afdc..ce4ebcf8bb 100644
--- a/asn1/cdt/cdt.cnf
+++ b/asn1/cdt/cdt.cnf
@@ -67,14 +67,12 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
#.FN_BODY CompressedContent
tvbuff_t *next_tvb = NULL, *compr_tvb = NULL;
- proto_item *tf = NULL;
int save_offset = offset;
%(DEFAULT_BODY)s
if (compr_tvb == NULL) {
- tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
- "[Error: Unable to get compressed content]");
- expert_add_info(actx->pinfo, tf, &ei_cdt_unable_compress_content);
+ proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_compress_content,
+ tvb, save_offset, -1);
col_append_str (actx->pinfo->cinfo, COL_INFO,
"[Error: Unable to get compressed content]");
return offset;
@@ -83,9 +81,8 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_length (compr_tvb));
if (next_tvb == NULL) {
- tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
- "[Error: Unable to uncompress content]");
- expert_add_info(actx->pinfo, tf, &ei_cdt_unable_uncompress_content);
+ proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_uncompress_content,
+ tvb, save_offset, -1);
col_append_str (actx->pinfo->cinfo, COL_INFO,
"[Error: Unable to uncompress content]");
return offset;
diff --git a/asn1/goose/goose.cnf b/asn1/goose/goose.cnf
index dc90f4827f..a855a7fec7 100644
--- a/asn1/goose/goose.cnf
+++ b/asn1/goose/goose.cnf
@@ -17,7 +17,6 @@
#.FN_BODY UtcTime
guint32 len;
- proto_item *cause;
guint32 seconds;
guint32 fraction;
guint32 nanoseconds;
@@ -28,11 +27,7 @@
if(len != 8)
{
- cause = proto_tree_add_text(tree, tvb, offset, len,
- "BER Error: malformed UTCTime encoding, "
- "length must be 8 bytes");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info(actx->pinfo, cause, &ei_goose_mal_utctime);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_goose_mal_utctime, tvb, offset, len);
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
diff --git a/asn1/gsm_map/packet-gsm_map-template.c b/asn1/gsm_map/packet-gsm_map-template.c
index b2e7ac8348..849b2b4d34 100644
--- a/asn1/gsm_map/packet-gsm_map-template.c
+++ b/asn1/gsm_map/packet-gsm_map-template.c
@@ -974,7 +974,6 @@ static int dissect_mc_message(tvbuff_t *tvb,
gboolean bug_pc, bug_ind_field;
gint32 bug_tag;
guint32 bug_len;
- proto_item *cause;
octet = tvb_get_guint8(tvb,0);
if ( (octet & 0xf) == 3) {
@@ -986,22 +985,19 @@ static int dissect_mc_message(tvbuff_t *tvb,
if (sequence3 != NULL) {
offset= (sequence3) (implicit_seq3, tvb, offset, actx, tree, hf_index_seq3);
} else {
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented [3] sequence, cannot decode");
- expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_sequence3);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_gsm_map_unknown_sequence3, tvb, offset, -1);
}
} else if (octet == 0x30) {
if (sequence != NULL) {
offset= (sequence) (implicit_seq, tvb, 0, actx, tree, hf_index_seq);
} else {
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented sequence");
- expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_sequence);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_gsm_map_unknown_sequence, tvb, offset, -1);
}
} else {
if (parameter != NULL) {
offset= (parameter) (implicit_param, tvb, offset, actx, tree, hf_index_param);
} else {
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented parameter");
- expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_parameter);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_gsm_map_unknown_parameter, tvb, offset, -1);
}
}
return offset;
diff --git a/asn1/mms/mms.cnf b/asn1/mms/mms.cnf
index 610dac564b..d99fd50f58 100644
--- a/asn1/mms/mms.cnf
+++ b/asn1/mms/mms.cnf
@@ -49,7 +49,6 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
#.FN_BODY TimeOfDay
guint32 len;
- proto_item *cause;
guint32 milliseconds;
guint16 days;
gchar * ptime;
@@ -89,10 +88,8 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
return offset;
}
- cause = proto_tree_add_text(tree, tvb, offset, len,
- "BER Error: malformed TimeOfDay encoding, "
- "length must be 4 or 6 bytes");
- expert_add_info(actx->pinfo, cause, &ei_mms_mal_timeofday_encoding);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_mms_mal_timeofday_encoding,
+ tvb, offset, len, "BER Error: malformed TimeOfDay encoding, length must be 4 or 6 bytes");
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -103,7 +100,6 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
#.FN_BODY UtcTime
guint32 len;
- proto_item *cause;
guint32 seconds;
guint32 fraction;
guint32 nanoseconds;
@@ -114,10 +110,8 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
if(len != 8)
{
- cause = proto_tree_add_text(tree, tvb, offset, len,
- "BER Error: malformed IEC61850 UTCTime encoding, "
- "length must be 8 bytes");
- expert_add_info(actx->pinfo, cause, &ei_mms_mal_utctime_encoding);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_mms_mal_utctime_encoding,
+ tvb, offset, len, "BER Error: malformed IEC61850 UTCTime encoding, length must be 8 bytes");
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
diff --git a/asn1/p1/p1.cnf b/asn1/p1/p1.cnf
index af7346a5c7..62afd61223 100644
--- a/asn1/p1/p1.cnf
+++ b/asn1/p1/p1.cnf
@@ -678,8 +678,8 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
proto_item *item = NULL;
proto_tree *next_tree = NULL;
- item = proto_tree_add_text(actx->subtree.top_tree ? actx->subtree.top_tree : tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "P1 Unknown Content (unknown built-in content-type)");
- expert_add_info(actx->pinfo, item, &ei_p1_unknown_built_in_content_type);
+ proto_tree_add_expert(actx->subtree.top_tree ? actx->subtree.top_tree : tree, actx->pinfo, &ei_p1_unknown_built_in_content_type,
+ next_tvb, 0, tvb_length_remaining(tvb, offset));
if (item) {
next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);
}
diff --git a/asn1/p1/packet-p1-template.c b/asn1/p1/packet-p1-template.c
index 87c4f336e0..79030fd283 100644
--- a/asn1/p1/packet-p1-template.c
+++ b/asn1/p1/packet-p1-template.c
@@ -339,7 +339,7 @@ void proto_register_p1(void) {
static ei_register_info ei[] = {
{ &ei_p1_unknown_extension_attribute_type, { "p1.unknown.extension_attribute_type", PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type", EXPFILL }},
{ &ei_p1_unknown_standard_extension, { "p1.unknown.standard_extension", PI_UNDECODED, PI_WARN, "Unknown standard-extension", EXPFILL }},
- { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "Unknown built-in content-type", EXPFILL }},
+ { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "P1 Unknown Content (unknown built-in content-type)", EXPFILL }},
{ &ei_p1_unknown_tokendata_type, { "p1.unknown.tokendata_type", PI_UNDECODED, PI_WARN, "Unknown tokendata-type", EXPFILL }},
};
diff --git a/asn1/pres/pres.cnf b/asn1/pres/pres.cnf
index 1f9699b790..22ce8a66fe 100644
--- a/asn1/pres/pres.cnf
+++ b/asn1/pres/pres.cnf
@@ -43,8 +43,8 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
} else {
- proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
- expert_add_info(actx->pinfo, ti, &ei_pres_dissector_not_available);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_pres_dissector_not_available,
+ tvb, offset, -1);
}
#.FN_BODY PDV-list/presentation-data-values/octet-aligned
@@ -57,8 +57,8 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
} else {
- proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
- expert_add_info(actx->pinfo, ti, &ei_pres_dissector_not_available);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_pres_dissector_not_available,
+ tvb, offset, -1);
%(DEFAULT_BODY)s
}
diff --git a/asn1/sv/sv.cnf b/asn1/sv/sv.cnf
index fe9a4ee72a..e448da20b0 100644
--- a/asn1/sv/sv.cnf
+++ b/asn1/sv/sv.cnf
@@ -23,7 +23,6 @@
#.FN_BODY UtcTime
guint32 len;
- proto_item *cause;
guint32 seconds;
guint32 fraction;
guint32 nanoseconds;
@@ -34,11 +33,8 @@
if(len != 8)
{
- cause = proto_tree_add_text(tree, tvb, offset, len,
- "BER Error: malformed UTCTime encoding, "
- "length must be 8 bytes");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info(actx->pinfo, cause, &ei_sv_mal_utctime);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_sv_mal_utctime, tvb, offset, len,
+ "BER Error: malformed UTCTime encoding, length must be 8 bytes");
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
diff --git a/epan/dissectors/packet-acse.c b/epan/dissectors/packet-acse.c
index 031dda81f7..820a6d7ef8 100644
--- a/epan/dissectors/packet-acse.c
+++ b/epan/dissectors/packet-acse.c
@@ -1756,8 +1756,8 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
call_ber_oid_callback(oid, tvb, offset, pinfo, parent_tree);
} else {
- proto_item *ti = proto_tree_add_text(parent_tree, tvb, offset, -1, "dissector is not available");
- expert_add_info(pinfo, ti, &ei_acse_dissector_not_available);
+ proto_tree_add_expert(parent_tree, pinfo, &ei_acse_dissector_not_available,
+ tvb, offset, -1);
}
top_tree = NULL;
return;
diff --git a/epan/dissectors/packet-amr.c b/epan/dissectors/packet-amr.c
index 9b284b062d..e1f702b702 100644
--- a/epan/dissectors/packet-amr.c
+++ b/epan/dissectors/packet-amr.c
@@ -395,8 +395,8 @@ dissect_amr_be(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint amr
/* Check if we have enough data available for our frames */
if (tvb_reported_length_remaining(tvb, bitcount/8) < bytes_needed_for_frames) {
- item = proto_tree_add_text(tree, tvb, bitcount/8, bytes_needed_for_frames, "Error:");
- proto_item_append_text(item, " %d Bytes available, %d would be needed!",
+ item = proto_tree_add_text(tree, tvb, bitcount/8, bytes_needed_for_frames,
+ "Error: %d Bytes available, %d would be needed!",
tvb_reported_length_remaining(tvb, bitcount/8),
bytes_needed_for_frames);
expert_add_info(pinfo, item, &ei_amr_not_enough_data_for_frames);
@@ -409,8 +409,8 @@ dissect_amr_be(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint amr
bitcount += bits_used_for_frames;
if (tvb_reported_length_remaining(tvb, (bitcount+8)/8) > 0) {
- item = proto_tree_add_text(tree, tvb, bitcount/8, tvb_reported_length_remaining(tvb, bitcount/8), "Error:");
- proto_item_append_text(item, " %d Bytes remaining - should be 0!",tvb_reported_length_remaining(tvb, (bitcount+8)/8));
+ item = proto_tree_add_text(tree, tvb, bitcount/8, tvb_reported_length_remaining(tvb, bitcount/8),
+ "Error: %d Bytes remaining - should be 0!",tvb_reported_length_remaining(tvb, (bitcount+8)/8));
expert_add_info(pinfo, item, &ei_amr_superfluous_data);
/* Now check the paddings */
@@ -418,8 +418,8 @@ dissect_amr_be(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint amr
if ( (1 << (8 -(bitcount%8)-1)) & tvb_get_guint8(tvb,bitcount/8) )
proto_tree_add_text(tree, tvb, bitcount/8, 1, "Padding bits correct");
else {
- item = proto_tree_add_text(tree, tvb, bitcount/8, 1, "Padding bits error");
- expert_add_info(pinfo, item, &ei_amr_padding_bits_not0);
+ proto_tree_add_expert(tree, pinfo, &ei_amr_padding_bits_not0, tvb,
+ bitcount/8, 1);
}
}
}
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index fefd6581c3..67da23a323 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -927,10 +927,8 @@ ansi_a_so_int_to_str(
#define EXTRANEOUS_DATA_CHECK_EXPERT(edc_len, edc_max_len) \
if ((edc_len) > (edc_max_len)) \
{ \
- proto_item *expert_item; \
- expert_item = proto_tree_add_text(tree, tvb, \
- curr_offset, (edc_len) - (edc_max_len), "Extraneous Data, dissector bug or later version spec(report to wireshark.org)"); \
- expert_add_info(pinfo, expert_item, &ei_ansi_a_extraneous_data); \
+ proto_tree_add_expert(tree, pinfo, &ei_ansi_a_extraneous_data, \
+ tvb, curr_offset, (edc_len) - (edc_max_len)); \
curr_offset += ((edc_len) - (edc_max_len)); \
}
diff --git a/epan/dissectors/packet-beep.c b/epan/dissectors/packet-beep.c
index 71a25616ff..43fd7f6be7 100644
--- a/epan/dissectors/packet-beep.c
+++ b/epan/dissectors/packet-beep.c
@@ -273,8 +273,6 @@ static int num_len(tvbuff_t *tvb, int offset)
static int
check_term(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree)
{
- proto_item *ti;
-
/* First, check for CRLF, or, if global_beep_strict_term is false,
* one of CR or LF ... If neither of these hold, we add an element
* that complains of a protocol violation, and return -1, else
@@ -293,21 +291,19 @@ check_term(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree)
if ((tvb_get_guint8(tvb, offset) == 0x0d) && !global_beep_strict_term) {
- ti = proto_tree_add_text(tree, tvb, offset, 1, "Terminator: CR");
- expert_add_info(pinfo, ti, &ei_beep_cr_terminator);
+ proto_tree_add_expert(tree, pinfo, &ei_beep_cr_terminator, tvb, offset, 1);
return 1;
}
if ((tvb_get_guint8(tvb, offset) == 0x0a) && !global_beep_strict_term) {
- ti = proto_tree_add_text(tree, tvb, offset, 1, "Terminator: LF");
- expert_add_info(pinfo, ti, &ei_beep_lf_terminator);
+ proto_tree_add_expert(tree, pinfo, &ei_beep_lf_terminator, tvb, offset, 1);
return 1;
}
- ti = proto_tree_add_text(tree, tvb, offset, 1, "Terminator: %s", tvb_format_text(tvb, offset, 2));
- expert_add_info_format_text(pinfo, ti, &ei_beep_invalid_terminator, "Invalid Terminator: %s", tvb_format_text(tvb, offset, 2));
+ proto_tree_add_expert_format(tree, pinfo, &ei_beep_invalid_terminator, tvb,
+ offset, 1, "Terminator: %s", tvb_format_text(tvb, offset, 2));
return -1;
}
diff --git a/epan/dissectors/packet-cdt.c b/epan/dissectors/packet-cdt.c
index afc6856b1b..46fbc961df 100644
--- a/epan/dissectors/packet-cdt.c
+++ b/epan/dissectors/packet-cdt.c
@@ -244,16 +244,14 @@ static int
dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 69 "../../asn1/cdt/cdt.cnf"
tvbuff_t *next_tvb = NULL, *compr_tvb = NULL;
- proto_item *tf = NULL;
int save_offset = offset;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
&compr_tvb);
if (compr_tvb == NULL) {
- tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
- "[Error: Unable to get compressed content]");
- expert_add_info(actx->pinfo, tf, &ei_cdt_unable_compress_content);
+ proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_compress_content,
+ tvb, save_offset, -1);
col_append_str (actx->pinfo->cinfo, COL_INFO,
"[Error: Unable to get compressed content]");
return offset;
@@ -262,9 +260,8 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_length (compr_tvb));
if (next_tvb == NULL) {
- tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
- "[Error: Unable to uncompress content]");
- expert_add_info(actx->pinfo, tf, &ei_cdt_unable_uncompress_content);
+ proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_uncompress_content,
+ tvb, save_offset, -1);
col_append_str (actx->pinfo->cinfo, COL_INFO,
"[Error: Unable to uncompress content]");
return offset;
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index e5f47fb420..8064e12109 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -48,7 +48,6 @@ int proto_pkt_comment = -1;
int hf_frame_arrival_time = -1;
int hf_frame_shift_offset = -1;
int hf_frame_arrival_time_epoch = -1;
-static int hf_frame_time_invalid = -1;
static int hf_frame_time_delta = -1;
static int hf_frame_time_delta_displayed = -1;
static int hf_frame_time_relative = -1;
@@ -318,12 +317,10 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
proto_tree_add_time(fh_tree, hf_frame_arrival_time, tvb,
0, 0, &(pinfo->fd->abs_ts));
if(pinfo->fd->abs_ts.nsecs < 0 || pinfo->fd->abs_ts.nsecs >= 1000000000) {
- item = proto_tree_add_none_format(fh_tree, hf_frame_time_invalid, tvb, 0, 0,
+ expert_add_info_format_text(pinfo, ti, &ei_arrive_time_out_of_range,
"Arrival Time: Fractional second %09ld is invalid,"
" the valid range is 0-1000000000",
(long) pinfo->fd->abs_ts.nsecs);
- PROTO_ITEM_SET_GENERATED(item);
- expert_add_info(pinfo, item, &ei_arrive_time_out_of_range);
}
item = proto_tree_add_time(fh_tree, hf_frame_shift_offset, tvb,
0, 0, &(pinfo->fd->shift_offset));
@@ -602,11 +599,6 @@ proto_register_frame(void)
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
"Epoch time when this frame was captured", HFILL }},
- { &hf_frame_time_invalid,
- { "Arrival Timestamp invalid", "frame.time_invalid",
- FT_NONE, BASE_NONE, NULL, 0x0,
- "The timestamp from the capture is out of the valid range", HFILL }},
-
{ &hf_frame_time_delta,
{ "Time delta from previous captured frame", "frame.time_delta",
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
@@ -782,7 +774,7 @@ proto_register_frame(void)
static ei_register_info ei[] = {
{ &ei_comments_text, { "frame.comment.expert", PI_COMMENTS_GROUP, PI_COMMENT, "Formatted comment", EXPFILL }},
- { &ei_arrive_time_out_of_range, { "frame.time_invalid.expert", PI_SEQUENCE, PI_NOTE, "Arrival Time: Fractional second out of range (0-1000000000)", EXPFILL }},
+ { &ei_arrive_time_out_of_range, { "frame.time_invalid", PI_SEQUENCE, PI_NOTE, "Arrival Time: Fractional second out of range (0-1000000000)", EXPFILL }},
};
module_t *frame_module;
diff --git a/epan/dissectors/packet-goose.c b/epan/dissectors/packet-goose.c
index 7cd1c67eda..618704e868 100644
--- a/epan/dissectors/packet-goose.c
+++ b/epan/dissectors/packet-goose.c
@@ -476,7 +476,6 @@ dissect_goose_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
#line 18 "../../asn1/goose/goose.cnf"
guint32 len;
- proto_item *cause;
guint32 seconds;
guint32 fraction;
guint32 nanoseconds;
@@ -487,11 +486,7 @@ dissect_goose_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
if(len != 8)
{
- cause = proto_tree_add_text(tree, tvb, offset, len,
- "BER Error: malformed UTCTime encoding, "
- "length must be 8 bytes");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info(actx->pinfo, cause, &ei_goose_mal_utctime);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_goose_mal_utctime, tvb, offset, len);
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index 2fe926ee9a..9581d2978f 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -18820,7 +18820,6 @@ static int dissect_mc_message(tvbuff_t *tvb,
gboolean bug_pc, bug_ind_field;
gint32 bug_tag;
guint32 bug_len;
- proto_item *cause;
octet = tvb_get_guint8(tvb,0);
if ( (octet & 0xf) == 3) {
@@ -18832,22 +18831,19 @@ static int dissect_mc_message(tvbuff_t *tvb,
if (sequence3 != NULL) {
offset= (sequence3) (implicit_seq3, tvb, offset, actx, tree, hf_index_seq3);
} else {
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented [3] sequence, cannot decode");
- expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_sequence3);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_gsm_map_unknown_sequence3, tvb, offset, -1);
}
} else if (octet == 0x30) {
if (sequence != NULL) {
offset= (sequence) (implicit_seq, tvb, 0, actx, tree, hf_index_seq);
} else {
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented sequence");
- expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_sequence);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_gsm_map_unknown_sequence, tvb, offset, -1);
}
} else {
if (parameter != NULL) {
offset= (parameter) (implicit_param, tvb, offset, actx, tree, hf_index_param);
} else {
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented parameter");
- expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_parameter);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_gsm_map_unknown_parameter, tvb, offset, -1);
}
}
return offset;
@@ -26593,7 +26589,7 @@ void proto_register_gsm_map(void) {
NULL, HFILL }},
/*--- End of included file: packet-gsm_map-hfarr.c ---*/
-#line 2616 "../../asn1/gsm_map/packet-gsm_map-template.c"
+#line 2612 "../../asn1/gsm_map/packet-gsm_map-template.c"
};
/* List of subtrees */
@@ -27237,7 +27233,7 @@ void proto_register_gsm_map(void) {
&ett_gsm_map_ericsson_EnhancedCheckIMEI_Arg,
/*--- End of included file: packet-gsm_map-ettarr.c ---*/
-#line 2647 "../../asn1/gsm_map/packet-gsm_map-template.c"
+#line 2643 "../../asn1/gsm_map/packet-gsm_map-template.c"
};
static ei_register_info ei[] = {
@@ -27339,7 +27335,7 @@ void proto_register_gsm_map(void) {
/*--- End of included file: packet-gsm_map-dis-tab.c ---*/
-#line 2687 "../../asn1/gsm_map/packet-gsm_map-template.c"
+#line 2683 "../../asn1/gsm_map/packet-gsm_map-template.c"
oid_add_from_string("ericsson-gsm-Map-Ext","1.2.826.0.1249.58.1.0" );
oid_add_from_string("accessTypeNotAllowed-id","1.3.12.2.1107.3.66.1.2");
/*oid_add_from_string("map-ac networkLocUp(1) version3(3)","0.4.0.0.1.0.1.3" );
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index a501488b35..534465c571 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -843,12 +843,7 @@ static value_string_ext gtpv2_element_type_vals_ext = VALUE_STRING_EXT_INIT(gtpv
static void
dissect_gtpv2_unknown(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
-
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/*
@@ -4193,7 +4188,6 @@ static const value_string gtpv2_source_ident_types[] = {
static void
dissect_gtpv2_source_ident(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
int offset = 0;
guint8 source_type;
@@ -4222,9 +4216,7 @@ dissect_gtpv2_source_ident(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case 2:
break;
default:
- expert_item = proto_tree_add_text(tree, tvb, offset-1, 1, "Unknown source type");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_source_type_unknown);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_source_type_unknown, tvb, offset-1, 1);
break;
}
@@ -4665,24 +4657,16 @@ dissect_gtpv2_mbms_dist_ack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
* 8.75 User CSG Information (UCI)
*/
static void
-dissect_gtpv2_uci(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_uci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.76 CSG Information Reporting Action */
static void
-dissect_gtpv2_csg_info_rep_action(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_csg_info_rep_action(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.77 RFSP Index */
@@ -4697,57 +4681,37 @@ dissect_gtpv2_rfsp_index(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
/* 8.78 CSG ID */
static void
-dissect_gtpv2_csg_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_csg_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.79 CSG Membership Indication (CMI) */
static void
-dissect_gtpv2_cmi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_cmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.80 Service indicator */
static void
-dissect_gtpv2_service_indicator(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_service_indicator(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.81 Detach Type */
static void
-dissect_gtpv2_detach_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_detach_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.82 Local Distinguished Name (LDN) */
static void
-dissect_gtpv2_ldn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_ldn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.83 Node Features */
@@ -4785,13 +4749,9 @@ dissect_gtpv2_mbms_time_to_data_xfer(tvbuff_t *tvb, packet_info *pinfo _U_, prot
/* 8.85 Throttling */
static void
-dissect_gtpv2_throttling(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_throttling(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.86 Allocation/Retention Priority (ARP) */
@@ -4941,13 +4901,9 @@ dissect_gtpv2_mmbr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot
/* 8.93 MDT Configuration */
static void
-dissect_gtpv2_mdt_config(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+dissect_gtpv2_mdt_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
{
- proto_item *expert_item;
-
- expert_item = proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
- expert_add_info(pinfo, expert_item, &ei_gtpv2_ie_data_not_dissected);
- PROTO_ITEM_SET_GENERATED(expert_item);
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, 0, length);
}
/* 8.94 Additional Protocol Configuration Options (APCO) */
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c
index 0457c66b17..7363cdd625 100644
--- a/epan/dissectors/packet-isakmp.c
+++ b/epan/dissectors/packet-isakmp.c
@@ -4605,9 +4605,7 @@ dissect_enc(tvbuff_t *tvb,
* wrong encryption algorithm and/or authentication algorithm.
*/
if (encr_data_len <= 0) {
- item = proto_tree_add_text(tree, tvb, offset, length, "Not enough data for IV, Encrypted data and ICD.");
- expert_add_info(pinfo, item, &ei_isakmp_enc_iv);
- PROTO_ITEM_SET_GENERATED(item);
+ proto_tree_add_expert(tree, pinfo, &ei_isakmp_enc_iv, tvb, offset, length);
return;
}
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c
index 5948e5fcd4..26c5287835 100644
--- a/epan/dissectors/packet-k12.c
+++ b/epan/dissectors/packet-k12.c
@@ -258,13 +258,10 @@ dissect_k12(tvbuff_t* tvb,packet_info* pinfo,proto_tree* tree)
}
if (handles == data_handles) {
- proto_tree* stack_tree = proto_item_add_subtree(stack_item,ett_stack_item);
+ proto_tree* stack_tree = proto_item_add_subtree(stack_item, ett_stack_item);
proto_item* item;
- item = proto_tree_add_text(stack_tree,tvb,0,0,
- "Warning: stk file not matched in the 'K12 Protocols' table");
- PROTO_ITEM_SET_GENERATED(item);
- expert_add_info(pinfo, item, &ei_k12_unmatched_stk_file);
+ expert_add_info(pinfo, stack_item, &ei_k12_unmatched_stk_file);
item = proto_tree_add_text(stack_tree,tvb,0,0,
"Info: You can edit the 'K12 Protocols' table from Preferences->Protocols->k12xx");
@@ -435,7 +432,7 @@ proto_register_k12(void)
};
static ei_register_info ei[] = {
- { &ei_k12_unmatched_stk_file, { "k12.unmatched_stk_file", PI_UNDECODED, PI_WARN, "unmatched stk file", EXPFILL }},
+ { &ei_k12_unmatched_stk_file, { "k12.unmatched_stk_file", PI_UNDECODED, PI_WARN, "Warning: stk file not matched in the 'K12 Protocols' table", EXPFILL }},
};
static uat_field_t uat_k12_flds[] = {
diff --git a/epan/dissectors/packet-mms.c b/epan/dissectors/packet-mms.c
index df18a337be..a2054c20c0 100644
--- a/epan/dissectors/packet-mms.c
+++ b/epan/dissectors/packet-mms.c
@@ -1834,7 +1834,6 @@ dissect_mms_TimeOfDay(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
#line 50 "../../asn1/mms/mms.cnf"
guint32 len;
- proto_item *cause;
guint32 milliseconds;
guint16 days;
gchar * ptime;
@@ -1874,10 +1873,8 @@ dissect_mms_TimeOfDay(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
return offset;
}
- cause = proto_tree_add_text(tree, tvb, offset, len,
- "BER Error: malformed TimeOfDay encoding, "
- "length must be 4 or 6 bytes");
- expert_add_info(actx->pinfo, cause, &ei_mms_mal_timeofday_encoding);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_mms_mal_timeofday_encoding,
+ tvb, offset, len, "BER Error: malformed TimeOfDay encoding, length must be 4 or 6 bytes");
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -1914,10 +1911,9 @@ dissect_mms_MMSString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
static int
dissect_mms_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 104 "../../asn1/mms/mms.cnf"
+#line 101 "../../asn1/mms/mms.cnf"
guint32 len;
- proto_item *cause;
guint32 seconds;
guint32 fraction;
guint32 nanoseconds;
@@ -1928,10 +1924,8 @@ dissect_mms_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
if(len != 8)
{
- cause = proto_tree_add_text(tree, tvb, offset, len,
- "BER Error: malformed IEC61850 UTCTime encoding, "
- "length must be 8 bytes");
- expert_add_info(actx->pinfo, cause, &ei_mms_mal_utctime_encoding);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_mms_mal_utctime_encoding,
+ tvb, offset, len, "BER Error: malformed IEC61850 UTCTime encoding, length must be 8 bytes");
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
diff --git a/epan/dissectors/packet-mux27010.c b/epan/dissectors/packet-mux27010.c
index 3b37e672d1..ba89506c4e 100644
--- a/epan/dissectors/packet-mux27010.c
+++ b/epan/dissectors/packet-mux27010.c
@@ -919,10 +919,8 @@ dissect_mux27010(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
msg_flag = tvb_get_guint8(tvb, tmpOffset); tmpOffset += 1;
if (msg_end <= msg_start) {
- proto_item *pi;
- pi = proto_tree_add_text(field_tree, tvb, tmpOffset-3, 2,
- "Message start and end are illogical, aborting dissection");
- expert_add_info(pinfo, pi, &ei_mux27010_message_illogical);
+ proto_tree_add_expert(field_tree, pinfo, &ei_mux27010_message_illogical,
+ tvb, tmpOffset-3, 2);
continue;
}
@@ -1395,7 +1393,7 @@ proto_register_mux27010 (void)
};
static ei_register_info ei[] = {
- { &ei_mux27010_message_illogical, { "mux27010.message_illogical", PI_MALFORMED, PI_ERROR, "Message start and end are illogical", EXPFILL }},
+ { &ei_mux27010_message_illogical, { "mux27010.message_illogical", PI_MALFORMED, PI_ERROR, "Message start and end are illogical, aborting dissection", EXPFILL }},
{ &ei_mux27010_checksum_incorrect, { "mux27010.checksum_incorrect", PI_CHECKSUM, PI_WARN, "Checksum: incorrect", EXPFILL }},
};
diff --git a/epan/dissectors/packet-p1.c b/epan/dissectors/packet-p1.c
index fbb952bacb..4ea3750eb1 100644
--- a/epan/dissectors/packet-p1.c
+++ b/epan/dissectors/packet-p1.c
@@ -10907,7 +10907,7 @@ void proto_register_p1(void) {
static ei_register_info ei[] = {
{ &ei_p1_unknown_extension_attribute_type, { "p1.unknown.extension_attribute_type", PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type", EXPFILL }},
{ &ei_p1_unknown_standard_extension, { "p1.unknown.standard_extension", PI_UNDECODED, PI_WARN, "Unknown standard-extension", EXPFILL }},
- { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "Unknown built-in content-type", EXPFILL }},
+ { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "P1 Unknown Content (unknown built-in content-type)", EXPFILL }},
{ &ei_p1_unknown_tokendata_type, { "p1.unknown.tokendata_type", PI_UNDECODED, PI_WARN, "Unknown tokendata-type", EXPFILL }},
};
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c
index 3594228fbd..aad3341def 100644
--- a/epan/dissectors/packet-per.c
+++ b/epan/dissectors/packet-per.c
@@ -1660,8 +1660,9 @@ DEBUG_ENTRY("dissect_per_choice");
PER_NOT_DECODED_YET("unknown extension root index in choice");
} else {
offset += ext_length * 8;
- proto_tree_add_text(tree, tvb, old_offset>>3, BLEN(old_offset, offset), "Choice no. %d in extension", choice_index);
- expert_add_info(actx->pinfo, choice_item, &ei_per_choice_extension_unknown);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_per_choice_extension_unknown,
+ tvb, old_offset>>3, BLEN(old_offset, offset),
+ "Choice no. %d in extension", choice_index);
}
}
diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c
index 75f6ce611b..db961279f8 100644
--- a/epan/dissectors/packet-pres.c
+++ b/epan/dissectors/packet-pres.c
@@ -644,8 +644,8 @@ dissect_pres_T_single_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
} else {
- proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
- expert_add_info(actx->pinfo, ti, &ei_pres_dissector_not_available);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_pres_dissector_not_available,
+ tvb, offset, -1);
}
@@ -667,8 +667,8 @@ dissect_pres_T_octet_aligned(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
} else {
- proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
- expert_add_info(actx->pinfo, ti, &ei_pres_dissector_not_available);
+ proto_tree_add_expert(tree, actx->pinfo, &ei_pres_dissector_not_available,
+ tvb, offset, -1);
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
NULL);
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c
index ce8f49eba3..1df2fa7f59 100644
--- a/epan/dissectors/packet-sccp.c
+++ b/epan/dissectors/packet-sccp.c
@@ -1822,11 +1822,9 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, packet_info *
if (pci) {
if (decode_mtp3_standard == ITU_STANDARD || national == 0) {
if (length < offset + ITU_PC_LENGTH) {
- expert_item = proto_tree_add_text(call_tree, tvb, 0, -1,
+ proto_tree_add_expert_format(call_tree, pinfo, &ei_sccp_wrong_length, tvb, 0, -1,
"Wrong length indicated (%u) should be at least %u, PC is %u octets",
length, offset + ITU_PC_LENGTH, ITU_PC_LENGTH);
- expert_add_info(pinfo, expert_item, &ei_sccp_wrong_length);
- PROTO_ITEM_SET_GENERATED(expert_item);
return;
}
proto_tree_add_item(call_tree, called ? hf_sccp_called_itu_pc : hf_sccp_calling_itu_pc,
@@ -1836,11 +1834,9 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, packet_info *
} else if (decode_mtp3_standard == JAPAN_STANDARD) {
if (length < offset + JAPAN_PC_LENGTH) {
- expert_item = proto_tree_add_text(call_tree, tvb, 0, -1,
+ proto_tree_add_expert_format(call_tree, pinfo, &ei_sccp_wrong_length, tvb, 0, -1,
"Wrong length indicated (%u) should be at least %u, PC is %u octets",
length, offset + JAPAN_PC_LENGTH, JAPAN_PC_LENGTH);
- expert_add_info(pinfo, expert_item, &ei_sccp_wrong_length);
- PROTO_ITEM_SET_GENERATED(expert_item);
return;
}
proto_tree_add_item(call_tree, called ? hf_sccp_called_japan_pc : hf_sccp_calling_japan_pc,
@@ -1851,11 +1847,9 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, packet_info *
} else /* CHINESE_ITU_STANDARD */ {
if (length < offset + ANSI_PC_LENGTH) {
- expert_item = proto_tree_add_text(call_tree, tvb, 0, -1,
+ proto_tree_add_expert_format(call_tree, pinfo, &ei_sccp_wrong_length, tvb, 0, -1,
"Wrong length indicated (%u) should be at least %u, PC is %u octets",
length, offset + ANSI_PC_LENGTH, ANSI_PC_LENGTH);
- expert_add_info(pinfo, expert_item, &ei_sccp_wrong_length);
- PROTO_ITEM_SET_GENERATED(expert_item);
return;
}
offset = dissect_sccp_3byte_pc(tvb, call_tree, offset, called);
diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c
index 398cf44d41..30759ba115 100644
--- a/epan/dissectors/packet-sflow.c
+++ b/epan/dissectors/packet-sflow.c
@@ -872,7 +872,6 @@ dissect_sflow_245_address_type(tvbuff_t *tvb, packet_info *pinfo,
struct sflow_address_details *addr_detail) {
guint32 addr_type;
int len;
- proto_item *pi;
addr_type = tvb_get_ntohl(tvb, offset);
offset += 4;
@@ -896,8 +895,8 @@ dissect_sflow_245_address_type(tvbuff_t *tvb, packet_info *pinfo,
the address type and thus at least advance the offset by 4.
Note that we have a problem, though. */
len = 0;
- pi = proto_tree_add_text(tree, tvb, offset - 4, 4, "Unknown address type (%u)", addr_type);
- expert_add_info(pinfo, pi, &ei_sflow_invalid_address_type);
+ proto_tree_add_expert_format(tree, pinfo, &ei_sflow_invalid_address_type, tvb,
+ offset - 4, 4, "Unknown address type (%u)", addr_type);
}
if (addr_detail) {
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index 7f1135c534..83daa3dff9 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -2310,7 +2310,6 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
gint value_len;
char *value;
gboolean is_no_header_termination = FALSE;
- proto_item *cause;
proto_tree *tc_uri_item_tree = NULL;
uri_offset_info uri_offsets;
@@ -3095,11 +3094,8 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
}/* if colon_offset */
if (is_no_header_termination == TRUE){
/* Header not terminated by empty line CRLF */
- cause=proto_tree_add_text(hdr_tree, tvb, line_end_offset, -1,
- "[Header not terminated by empty line (CRLF)]");
-
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info(pinfo, sip_element_item, &ei_sip_header_not_terminated);
+ proto_tree_add_expert(hdr_tree, pinfo, &ei_sip_header_not_terminated,
+ tvb, line_end_offset, -1);
}
offset = next_offset;
}/* End while */
diff --git a/epan/dissectors/packet-sv.c b/epan/dissectors/packet-sv.c
index 41428bbcee..6c74711b0e 100644
--- a/epan/dissectors/packet-sv.c
+++ b/epan/dissectors/packet-sv.c
@@ -280,7 +280,6 @@ static int
dissect_sv_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 25 "../../asn1/sv/sv.cnf"
guint32 len;
- proto_item *cause;
guint32 seconds;
guint32 fraction;
guint32 nanoseconds;
@@ -291,11 +290,8 @@ dissect_sv_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
if(len != 8)
{
- cause = proto_tree_add_text(tree, tvb, offset, len,
- "BER Error: malformed UTCTime encoding, "
- "length must be 8 bytes");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info(actx->pinfo, cause, &ei_sv_mal_utctime);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_sv_mal_utctime, tvb, offset, len,
+ "BER Error: malformed UTCTime encoding, length must be 8 bytes");
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -334,7 +330,7 @@ static const value_string sv_T_smpSynch_vals[] = {
static int
dissect_sv_T_smpSynch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 70 "../../asn1/sv/sv.cnf"
+#line 66 "../../asn1/sv/sv.cnf"
guint32 value;
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
&value);
@@ -366,7 +362,7 @@ static const value_string sv_T_smpMod_vals[] = {
static int
dissect_sv_T_smpMod(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 76 "../../asn1/sv/sv.cnf"
+#line 72 "../../asn1/sv/sv.cnf"
guint32 value;
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
&value);