aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'asn1')
-rw-r--r--asn1/acse/packet-acse-template.c18
-rw-r--r--asn1/ansi_map/packet-ansi_map-template.c76
-rw-r--r--asn1/ansi_tcap/packet-ansi_tcap-template.c18
-rw-r--r--asn1/atn-ulcs/packet-atn-ulcs-template.c15
-rw-r--r--asn1/charging_ase/charging_ase.cnf2
-rw-r--r--asn1/charging_ase/packet-charging_ase-template.c11
-rw-r--r--asn1/cmip/packet-cmip-template.c16
-rw-r--r--asn1/dap/dap.cnf2
-rw-r--r--asn1/dap/packet-dap-template.c11
-rw-r--r--asn1/disp/packet-disp-template.c33
-rw-r--r--asn1/dop/packet-dop-template.c24
-rw-r--r--asn1/dsp/packet-dsp-template.c28
-rw-r--r--asn1/ftam/packet-ftam-template.c12
-rw-r--r--asn1/goose/packet-goose-template.c4
-rw-r--r--asn1/gprscdr/gprscdr.cnf2
-rw-r--r--asn1/gprscdr/packet-gprscdr-template.c11
-rw-r--r--asn1/gsm_map/gsm_map.cnf17
-rw-r--r--asn1/gsm_map/packet-gsm_map-template.c24
-rw-r--r--asn1/h225/h225.cnf9
-rw-r--r--asn1/h225/packet-h225-template.c4
-rw-r--r--asn1/h245/h245.cnf40
-rw-r--r--asn1/h245/packet-h245-template.c5
-rw-r--r--asn1/h248/packet-h248-template.c11
-rw-r--r--asn1/h450/packet-h450-template.c20
-rw-r--r--asn1/h460/packet-h460-template.c2
-rw-r--r--asn1/idmp/packet-idmp-template.c13
-rw-r--r--asn1/inap/inap.cnf7
-rw-r--r--asn1/inap/packet-inap-template.c2
-rw-r--r--asn1/isdn-sup/packet-isdn-sup-template.c26
-rw-r--r--asn1/kerberos/kerberos.cnf2
-rw-r--r--asn1/kerberos/packet-kerberos-template.c22
-rw-r--r--asn1/ldap/ldap.cnf10
-rw-r--r--asn1/ldap/packet-ldap-template.c92
-rw-r--r--asn1/lte-rrc/lte-rrc.cnf19
-rw-r--r--asn1/lte-rrc/packet-lte-rrc-template.c20
-rw-r--r--asn1/mms/packet-mms-template.c4
-rw-r--r--asn1/p1/packet-p1-template.c8
-rw-r--r--asn1/pkcs12/packet-pkcs12-template.c15
-rw-r--r--asn1/pres/packet-pres-template.c22
-rw-r--r--asn1/q932/packet-q932-template.c36
-rw-r--r--asn1/qsig/packet-qsig-template.c21
-rw-r--r--asn1/ros/packet-ros-template.c19
-rw-r--r--asn1/ros/ros.cnf27
-rw-r--r--asn1/snmp/packet-snmp-template.c82
-rw-r--r--asn1/snmp/packet-snmp-template.h2
-rw-r--r--asn1/snmp/snmp.cnf9
-rw-r--r--asn1/spnego/packet-spnego-template.c22
-rw-r--r--asn1/sv/packet-sv-template.c4
-rw-r--r--asn1/t38/packet-t38-template.c17
-rw-r--r--asn1/t38/t38.cnf4
-rw-r--r--asn1/tcap/packet-tcap-template.c9
51 files changed, 624 insertions, 305 deletions
diff --git a/asn1/acse/packet-acse-template.c b/asn1/acse/packet-acse-template.c
index 2f700fa2eb..37bc5e6f06 100644
--- a/asn1/acse/packet-acse-template.c
+++ b/asn1/acse/packet-acse-template.c
@@ -69,12 +69,15 @@ int proto_clacse = -1;
#include "packet-acse-hf.c"
+static gint hf_acse_user_data = -1;
/* Initialize the subtree pointers */
static gint ett_acse = -1;
#include "packet-acse-ett.c"
static expert_field ei_acse_dissector_not_available = EI_INIT;
+static expert_field ei_acse_malformed = EI_INIT;
+static expert_field ei_acse_invalid_oid = EI_INIT;
static const char *object_identifier_id;
/* indirect_reference, used to pick up the signalling so we know what
@@ -173,9 +176,8 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
/* first, try to check length */
/* do we have at least 2 bytes */
if (!tvb_bytes_exist(tvb, 0, 2)){
- proto_tree_add_text(parent_tree, tvb, offset,
- tvb_reported_length_remaining(tvb,offset),
- "User data");
+ proto_tree_add_item(parent_tree, hf_acse_user_data, tvb, offset,
+ tvb_reported_length_remaining(tvb,offset), ENC_NA);
return 0; /* no, it isn't a ACSE PDU */
}
@@ -208,7 +210,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
oid=find_oid_by_pres_ctx_id(pinfo, indir_ref);
if(oid){
if(strcmp(oid, ACSE_APDU_OID) == 0){
- proto_tree_add_text(parent_tree, tvb, offset, -1,
+ proto_tree_add_expert_format(parent_tree, pinfo, &ei_acse_invalid_oid, tvb, offset, -1,
"Invalid OID: %s", ACSE_APDU_OID);
THROW(ReportedBoundsError);
}
@@ -249,7 +251,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
int old_offset=offset;
offset = dissect_acse_ACSE_apdu(FALSE, tvb, offset, &asn1_ctx, tree, -1);
if(offset == old_offset ){
- proto_tree_add_text(tree, tvb, offset, -1,"Malformed packet");
+ proto_tree_add_expert(tree, pinfo, &ei_acse_malformed, tvb, offset, -1);
break;
}
}
@@ -263,6 +265,10 @@ void proto_register_acse(void) {
/* List of fields */
static hf_register_info hf[] = {
+ { &hf_acse_user_data,
+ { "User data", "acse.user_data",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
#include "packet-acse-hfarr.c"
};
@@ -274,6 +280,8 @@ void proto_register_acse(void) {
static ei_register_info ei[] = {
{ &ei_acse_dissector_not_available, { "acse.dissector_not_available", PI_UNDECODED, PI_WARN, "Dissector is not available", EXPFILL }},
+ { &ei_acse_malformed, { "acse._malformed", PI_MALFORMED, PI_ERROR, "Malformed packet", EXPFILL }},
+ { &ei_acse_invalid_oid, { "acse.invalid_oid", PI_UNDECODED, PI_WARN, "Invalid OID", EXPFILL }},
};
expert_module_t* expert_acse;
diff --git a/asn1/ansi_map/packet-ansi_map-template.c b/asn1/ansi_map/packet-ansi_map-template.c
index fd6f548636..709e154e11 100644
--- a/asn1/ansi_map/packet-ansi_map-template.c
+++ b/asn1/ansi_map/packet-ansi_map-template.c
@@ -87,6 +87,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
+#include <epan/expert.h>
#include <epan/tap.h>
#include <epan/asn1.h>
#include <epan/wmem/wmem.h>
@@ -320,6 +321,10 @@ static int hf_ansi_map_winoperationscapability_pos = -1;
static int hf_ansi_map_PACA_Level = -1;
static int hf_ansi_map_pacaindicator_pa = -1;
+static int hf_ansi_map_point_code = -1;
+static int hf_ansi_map_SSN = -1;
+static int hf_ansi_map_win_trigger_list = -1;
+
#include "packet-ansi_map-hf.c"
/* Initialize the subtree pointers */
@@ -354,6 +359,10 @@ static gint ett_sms_originationrestrictions = -1;
#include "packet-ansi_map-ett.c"
+static expert_field ei_ansi_map_nr_not_used = EI_INIT;
+static expert_field ei_ansi_map_unknown_invokeData_blob = EI_INIT;
+static expert_field ei_ansi_map_no_data = EI_INIT;
+
/* Global variables */
static dissector_table_t is637_tele_id_dissector_table; /* IS-637 Teleservice ID */
static dissector_table_t is683_dissector_table; /* IS-683-A (OTA) */
@@ -649,7 +658,7 @@ dissect_ansi_map_min_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
}
static void
-dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
+dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
guint8 octet , octet_len;
guint8 b1,b2,b3,b4;
@@ -713,7 +722,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
case 3:/* Data Numbering (ITU-T Rec. X.121) (not used in this Standard). */
case 4:/* Telex Numbering (ITU-T Rec. F.69) (not used in this Standard). */
case 5:/* Maritime Mobile Numbering (not used in this Standard). */
- proto_tree_add_text(subtree, tvb, offset, -1, "This Number plan should not have been used");
+ proto_tree_add_expert(subtree, pinfo, &ei_ansi_map_nr_not_used, tvb, offset, -1);
break;
case 2:/* Telephony Numbering (ITU-T Rec. E.164,E.163). */
case 6:/* Land Mobile Numbering (ITU-T Rec. E.212) */
@@ -755,10 +764,10 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
/* Point Code Network Number octet 4 */
b3 = tvb_get_guint8(tvb,offset);
offset++;
+ proto_tree_add_bytes_format_value(subtree, hf_ansi_map_point_code, tvb, offset-3, 3, NULL, "%u-%u-%u", b3, b2, b1);
/* Subsystem Number (SSN) octet 5 */
b4 = tvb_get_guint8(tvb,offset);
- proto_tree_add_text(subtree, tvb, offset-3, 4 , "Point Code %u-%u-%u SSN %u",
- b3, b2, b1, b4);
+ proto_tree_add_item(subtree, hf_ansi_map_SSN, tvb, offset, 1, ENC_NA);
proto_item_append_text(actx->created_item, " - Point Code %u-%u-%u SSN %u", b3, b2, b1, b4);
break;
default:
@@ -768,7 +777,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
case 14:/* Internet Protocol (IP) Address. */
break;
default:
- proto_tree_add_text(subtree, tvb, offset, -1, "This Number plan should not have been used");
+ proto_tree_add_expert(subtree, pinfo, &ei_ansi_map_nr_not_used, tvb, offset, -1);
break;
}
@@ -2243,7 +2252,7 @@ dissect_ansi_map_pc_ssn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
int offset = 0;
proto_tree *subtree;
- guint8 b1,b2,b3,b4;
+ guint8 b1,b2,b3;
subtree = proto_item_add_subtree(actx->created_item, ett_billingid);
@@ -2259,11 +2268,8 @@ dissect_ansi_map_pc_ssn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
/* Point Code Network Number octet 4 */
b3 = tvb_get_guint8(tvb,offset);
offset++;
- /* Subsystem Number (SSN) octet 5 */
- b4 = tvb_get_guint8(tvb,offset);
- proto_tree_add_text(subtree, tvb, offset-3, 4 , "Point Code %u-%u-%u SSN %u",
- b3, b2, b1, b4);
-
+ proto_tree_add_bytes_format_value(subtree, hf_ansi_map_point_code, tvb, offset-3, 3, NULL, "%u-%u-%u", b3, b2, b1);
+ proto_tree_add_item(subtree, hf_ansi_map_SSN, tvb, offset, 1, ENC_NA);
}
/* 6.5.2.94 PilotBillingID */
static void
@@ -3647,23 +3653,23 @@ dissect_ansi_map_win_trigger_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t
octet = tvb_get_guint8(tvb,offset);
switch (octet){
case 0xdc:
- proto_tree_add_text(subtree, tvb, offset, 1, "TDP-R's armed");
+ proto_tree_add_uint_format(subtree, hf_ansi_map_win_trigger_list, tvb, offset, 1, octet, "TDP-R's armed");
j=0;
break;
case 0xdd:
- proto_tree_add_text(subtree, tvb, offset, 1, "TDP-N's armed");
+ proto_tree_add_uint_format(subtree, hf_ansi_map_win_trigger_list, tvb, offset, 1, octet, "TDP-N's armed");
j=0;
break;
case 0xde:
- proto_tree_add_text(subtree, tvb, offset, 1, "EDP-R's armed");
+ proto_tree_add_uint_format(subtree, hf_ansi_map_win_trigger_list, tvb, offset, 1, octet, "EDP-R's armed");
j=0;
break;
case 0xdf:
- proto_tree_add_text(subtree, tvb, offset, 1, "EDP-N's armed");
+ proto_tree_add_uint_format(subtree, hf_ansi_map_win_trigger_list, tvb, offset, 1, octet, "EDP-N's armed");
j=0;
break;
default:
- proto_tree_add_text(subtree, tvb, offset, 1, "[%u] (%u) %s",j,octet,val_to_str_ext(octet, &ansi_map_TriggerType_vals_ext, "Unknown TriggerType (%u)"));
+ proto_tree_add_uint_format(subtree, hf_ansi_map_win_trigger_list, tvb, offset, 1, octet, "[%u] (%u) %s",j,octet,val_to_str_ext(octet, &ansi_map_TriggerType_vals_ext, "Unknown TriggerType (%u)"));
j++;
break;
}
@@ -3696,7 +3702,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
offset = dissect_ansi_map_FacilitiesDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirective);
break;
case 3: /*Mobile On Channel*/
- proto_tree_add_text(tree, tvb, offset, -1, "[Carries no data]");
+ proto_tree_add_expert(tree, actx->pinfo, &ei_ansi_map_no_data, tvb, offset, -1);
break;
case 4: /*Handoff Back*/
offset = dissect_ansi_map_HandoffBack(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBack);
@@ -3741,16 +3747,16 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
offset = dissect_ansi_map_FeatureRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_featureRequest);
break;
case 18: /*Reserved 18 (Service Profile Request, IS-41-C)*/
- proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(18 (Service Profile Request, IS-41-C)");
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_ansi_map_unknown_invokeData_blob, tvb, offset, -1, "Unknown invokeData blob(18 (Service Profile Request, IS-41-C)");
break;
case 19: /*Reserved 19 (Service Profile Directive, IS-41-C)*/
- proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(19 Service Profile Directive, IS-41-C)");
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_ansi_map_unknown_invokeData_blob, tvb, offset, -1, "Unknown invokeData blob(19 Service Profile Directive, IS-41-C)");
break;
case 20: /*Unreliable Roamer Data Directive*/
offset = dissect_ansi_map_UnreliableRoamerDataDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_unreliableRoamerDataDirective);
break;
case 21: /*Reserved 21 (Call Data Request, IS-41-C)*/
- proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(Reserved 21 (Call Data Request, IS-41-C)");
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_ansi_map_unknown_invokeData_blob, tvb, offset, -1, "Unknown invokeData blob(Reserved 21 (Call Data Request, IS-41-C)");
break;
case 22: /*MS Inactive*/
offset = dissect_ansi_map_MSInactive(TRUE, tvb, offset, actx, tree, hf_ansi_map_mSInactive);
@@ -3810,7 +3816,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
offset = dissect_ansi_map_AuthenticationStatusReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationStatusReport);
break;
case 41: /*Reserved 41*/
- proto_tree_add_text(tree, tvb, offset, -1, "Reserved 41, Unknown invokeData blob");
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_ansi_map_unknown_invokeData_blob, tvb, offset, -1, "Reserved 41, Unknown invokeData blob");
break;
case 42: /*Information Directive*/
offset = dissect_ansi_map_InformationDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_informationDirective);
@@ -4035,7 +4041,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
offset = dissect_ansi_map_QualificationRequest2(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationRequest2);
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
+ proto_tree_add_expert(tree, actx->pinfo, &ei_ansi_map_unknown_invokeData_blob, tvb, offset, -1);
opCodeKnown = FALSE;
break;
}
@@ -4112,7 +4118,7 @@ static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
break;
case 26: /*Flash Request*/
/* No data */
- proto_tree_add_text(tree, tvb, offset, -1, "No Data");
+ proto_tree_add_expert(tree, actx->pinfo, &ei_ansi_map_no_data, tvb, offset, -1);
break;
case 27: /*Authentication Directive*/
offset = dissect_ansi_map_AuthenticationDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirectiveRes);
@@ -4306,7 +4312,7 @@ static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
offset = dissect_ansi_map_QualificationRequest2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationRequest2Res);
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
+ proto_tree_add_expert(tree, actx->pinfo, &ei_ansi_map_unknown_invokeData_blob, tvb, offset, -1);
opCodeKnown = FALSE;
break;
}
@@ -5270,6 +5276,18 @@ void proto_register_ansi_map(void) {
{ "PACA Level", "ansi_map.PACA_Level",
FT_UINT8, BASE_DEC, VALS(ansi_map_PACA_Level_vals), 0x1e,
NULL, HFILL }},
+ { &hf_ansi_map_point_code,
+ { "Point Code", "ansi_map.point_code",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_ansi_map_SSN,
+ { "SSN", "ansi_map.SSN",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_ansi_map_win_trigger_list,
+ { "WIN trigger list", "ansi_map.win_trigger_list",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
#include "packet-ansi_map-hfarr.c"
};
@@ -5307,6 +5325,14 @@ void proto_register_ansi_map(void) {
#include "packet-ansi_map-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_ansi_map_nr_not_used, { "ansi_map.nr_not_used", PI_PROTOCOL, PI_WARN, "This Number plan should not have been used", EXPFILL }},
+ { &ei_ansi_map_unknown_invokeData_blob, { "ansi_map.unknown_invokeData_blob", PI_PROTOCOL, PI_WARN, "Unknown invokeData blob", EXPFILL }},
+ { &ei_ansi_map_no_data, { "ansi_map.no_data", PI_PROTOCOL, PI_NOTE, "Carries no data", EXPFILL }},
+ };
+
+ expert_module_t* expert_ansi_map;
+
static const enum_val_t ansi_map_response_matching_type_values[] = {
{"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0},
{"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1},
@@ -5319,6 +5345,8 @@ void proto_register_ansi_map(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_ansi_map, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_ansi_map = expert_register_protocol(proto_ansi_map);
+ expert_register_field_array(expert_ansi_map, ei, array_length(ei));
new_register_dissector("ansi_map", dissect_ansi_map, proto_ansi_map);
diff --git a/asn1/ansi_tcap/packet-ansi_tcap-template.c b/asn1/ansi_tcap/packet-ansi_tcap-template.c
index 439a64cafa..c13df91e61 100644
--- a/asn1/ansi_tcap/packet-ansi_tcap-template.c
+++ b/asn1/ansi_tcap/packet-ansi_tcap-template.c
@@ -28,6 +28,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
+#include <epan/expert.h>
#include <epan/oids.h>
#include <epan/wmem/wmem.h>
#include <epan/asn1.h>
@@ -71,6 +72,8 @@ static gint ett_otid = -1;
static gint ett_dtid = -1;
static gint ett_ansi_tcap_stat = -1;
+static expert_field ei_ansi_tcap_dissector_not_implemented = EI_INIT;
+
static struct tcapsrt_info_t * gp_tcapsrt_info;
static gboolean tcap_subdissector_used=FALSE;
@@ -321,22 +324,20 @@ find_tcap_subdissector(tvbuff_t *tvb, asn1_ctx_t *actx, proto_tree *tree){
guint8 family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8;
guint8 specifier = (guint8)(ansi_tcap_private.d.OperationCode_national & 0xff);
if(!dissector_try_uint(ansi_tcap_national_opcode_table, ansi_tcap_private.d.OperationCode_national, tvb, actx->pinfo, tcap_top_tree)){
- item = proto_tree_add_text(tree, tvb, 0, -1,
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_ansi_tcap_dissector_not_implemented, tvb, 0, -1,
"Dissector for ANSI TCAP NATIONAL code:0x%x(Family %u, Specifier %u) \n"
"not implemented. Contact Wireshark developers if you want this supported(Spec required)",
ansi_tcap_private.d.OperationCode_national, family, specifier);
- PROTO_ITEM_SET_GENERATED(item);
return FALSE;
}
return TRUE;
}else if(ansi_tcap_private.d.OperationCode == 1){
/* private */
if((ansi_tcap_private.d.OperationCode_private & 0x0900) != 0x0900){
- item = proto_tree_add_text(tree, tvb, 0, -1,
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_ansi_tcap_dissector_not_implemented, tvb, 0, -1,
"Dissector for ANSI TCAP PRIVATE code:%u not implemented.\n"
"Contact Wireshark developers if you want this supported(Spec required)",
ansi_tcap_private.d.OperationCode_private);
- PROTO_ITEM_SET_GENERATED(item);
return FALSE;
}
}
@@ -503,6 +504,12 @@ proto_register_ansi_tcap(void)
#include "packet-ansi_tcap-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_ansi_tcap_dissector_not_implemented, { "ansi_tcap.dissector_not_implemented", PI_UNDECODED, PI_WARN, "Dissector not implemented", EXPFILL }},
+ };
+
+ expert_module_t* expert_ansi_tcap;
+
static const enum_val_t ansi_tcap_response_matching_type_values[] = {
{"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0},
{"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1},
@@ -510,7 +517,6 @@ proto_register_ansi_tcap(void)
{NULL, NULL, -1}
};
-
/* Register the protocol name and description */
proto_ansi_tcap = proto_register_protocol(PNAME, PSNAME, PFNAME);
register_dissector("ansi_tcap", dissect_ansi_tcap, proto_ansi_tcap);
@@ -520,6 +526,8 @@ proto_register_ansi_tcap(void)
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_ansi_tcap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_ansi_tcap = expert_register_protocol(proto_ansi_tcap);
+ expert_register_field_array(expert_ansi_tcap, ei, array_length(ei));
ansi_tcap_module = prefs_register_protocol(proto_ansi_tcap, proto_reg_handoff_ansi_tcap);
diff --git a/asn1/atn-ulcs/packet-atn-ulcs-template.c b/asn1/atn-ulcs/packet-atn-ulcs-template.c
index 37322a3a0c..51e51d545c 100644
--- a/asn1/atn-ulcs/packet-atn-ulcs-template.c
+++ b/asn1/atn-ulcs/packet-atn-ulcs-template.c
@@ -293,6 +293,7 @@ const value_string atn_ses_type[] =
#define ATN_PRES_PROTO "ICAO Doc9705 ULCS Presentation (ISO 8822/8823-1:1994)"
static int hf_atn_pres_err = -1;
+static int hf_atn_pres_pdu_type = -1;
static gint ett_atn_pres = -1;
#define ATN_SES_PRES_MASK 0xf803
@@ -676,13 +677,11 @@ dissect_atn_ulcs(
/* need session context to identify PPDU type */
/* note: */
- /* it is *unfeasible* to use proto_tree_add_item here: */
- /* presentation type is always the same constant but its type */
- /* is implicitly determined by preceding session context */
- proto_tree_add_text(atn_ulcs_tree,
+ proto_tree_add_uint_format(atn_ulcs_tree, hf_atn_pres_pdu_type,
tvb,
offset,
1,
+ value_ses_pres,
"%s (0x%02x)",
val_to_str( value_ses_pres & ATN_SES_PRES_MASK , atn_pres_vals, "?"),
value_pres);
@@ -839,6 +838,14 @@ void proto_register_atn_ulcs (void)
PRES_CPR_ER_MASK,
NULL,
HFILL}},
+ { &hf_atn_pres_pdu_type,
+ { "PDU type", "atn-ulcs.pres.pdu_type",
+ FT_UINT8,
+ BASE_HEX,
+ NULL,
+ ATN_SES_PRES_MASK,
+ NULL,
+ HFILL}},
};
static gint *ett[] = {
diff --git a/asn1/charging_ase/charging_ase.cnf b/asn1/charging_ase/charging_ase.cnf
index 0e41bcee4c..6a520e4b53 100644
--- a/asn1/charging_ase/charging_ase.cnf
+++ b/asn1/charging_ase/charging_ase.cnf
@@ -11,6 +11,6 @@ ChargingMessageType
#.FN_BODY ExtensionField/value
- proto_tree_add_text(tree, tvb, offset, -1, "Extensions not dissected");
+ proto_tree_add_expert(tree, actx->pinfo, &ei_charging_ase_extensions_not_dissected, tvb, offset, -1);
return tvb_length(tvb);
#.END
diff --git a/asn1/charging_ase/packet-charging_ase-template.c b/asn1/charging_ase/packet-charging_ase-template.c
index 7b378801d7..23a2dd24ba 100644
--- a/asn1/charging_ase/packet-charging_ase-template.c
+++ b/asn1/charging_ase/packet-charging_ase-template.c
@@ -25,6 +25,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/asn1.h>
#include "packet-ber.h"
@@ -45,6 +46,8 @@ static int proto_charging_ase = -1;
static int ett_charging_ase = -1;
#include "packet-charging_ase-ett.c"
+static expert_field ei_charging_ase_extensions_not_dissected = EI_INIT;
+
static dissector_handle_t charging_ase_handle;
#include "packet-charging_ase-fn.c"
@@ -79,10 +82,18 @@ proto_register_charging_ase(void)
#include "packet-charging_ase-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_charging_ase_extensions_not_dissected, { "charging_ase.extensions_not_dissected", PI_UNDECODED, PI_WARN, "Extensions not dissected", EXPFILL }},
+ };
+
+ expert_module_t* expert_charging_ase;
+
proto_charging_ase = proto_register_protocol(PNAME, PSNAME, PFNAME);
proto_register_field_array(proto_charging_ase, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_charging_ase = expert_register_protocol(proto_charging_ase);
+ expert_register_field_array(expert_charging_ase, ei, array_length(ei));
}
/* The registration hand-off routine */
diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c
index 12b2d057e2..0c6a105a97 100644
--- a/asn1/cmip/packet-cmip-template.c
+++ b/asn1/cmip/packet-cmip-template.c
@@ -25,6 +25,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/oids.h>
#include <epan/asn1.h>
@@ -60,6 +61,8 @@ static int hf_ObjectClass = -1;
static gint ett_cmip = -1;
#include "packet-cmip-ett.c"
+static expert_field ei_wrong_spdu_type = EI_INIT;
+
static guint32 opcode;
/* Dissector table */
@@ -110,8 +113,8 @@ dissect_cmip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
session = (struct SESSION_DATA_STRUCTURE*)data;
if(session->spdu_type == 0 ) {
- proto_tree_add_text(parent_tree, tvb, 0, -1,
- "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
+ proto_tree_add_expert_format(parent_tree, pinfo, &ei_wrong_spdu_type, tvb, 0, -1,
+ "Internal error: wrong spdu type %x from session dissector.", session->spdu_type);
return 0;
}
@@ -190,6 +193,12 @@ void proto_register_cmip(void) {
#include "packet-cmip-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_wrong_spdu_type, { "cmip.wrong_spdu_type", PI_PROTOCOL, PI_ERROR, "Internal error: wrong spdu type", EXPFILL }},
+ };
+
+ expert_module_t* expert_cmip;
+
/* Register protocol */
proto_cmip = proto_register_protocol(PNAME, PSNAME, PFNAME);
new_register_dissector("cmip", dissect_cmip, proto_cmip);
@@ -197,6 +206,9 @@ void proto_register_cmip(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_cmip, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_cmip = expert_register_protocol(proto_cmip);
+ expert_register_field_array(expert_cmip, ei, array_length(ei));
+
#include "packet-cmip-dis-tab.c"
oid_add_from_string("discriminatorId(1)","2.9.3.2.7.1");
diff --git a/asn1/dap/dap.cnf b/asn1/dap/dap.cnf
index beb03f0dac..d3a386359e 100644
--- a/asn1/dap/dap.cnf
+++ b/asn1/dap/dap.cnf
@@ -264,7 +264,7 @@ OPERATION.&ResultType
if(len == 0) {
/* its an empty set - i.e anonymous (assuming version is DEFAULTed) */
- proto_tree_add_text(tree, tvb, offset, -1,"Anonymous");
+ proto_tree_add_expert(tree, actx->pinfo, &ei_dap_anonymous, tvb, offset, -1);
col_append_str(actx->pinfo->cinfo, COL_INFO, " anonymous");
diff --git a/asn1/dap/packet-dap-template.c b/asn1/dap/packet-dap-template.c
index 32a008216e..d2888c7edb 100644
--- a/asn1/dap/packet-dap-template.c
+++ b/asn1/dap/packet-dap-template.c
@@ -26,6 +26,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
+#include <epan/expert.h>
#include <epan/oids.h>
#include <epan/asn1.h>
@@ -68,6 +69,8 @@ static int proto_dap = -1;
static gint ett_dap = -1;
#include "packet-dap-ett.c"
+static expert_field ei_dap_anonymous = EI_INIT;
+
#include "packet-dap-val.h"
#include "packet-dap-table.c" /* operation and error codes */
@@ -102,7 +105,13 @@ void proto_register_dap(void) {
&ett_dap,
#include "packet-dap-ettarr.c"
};
+
+ static ei_register_info ei[] = {
+ { &ei_dap_anonymous, { "dap.anonymous", PI_PROTOCOL, PI_NOTE, "Anonymous", EXPFILL }},
+ };
+
module_t *dap_module;
+ expert_module_t* expert_dap;
/* Register protocol */
proto_dap = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -110,6 +119,8 @@ void proto_register_dap(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_dap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_dap = expert_register_protocol(proto_dap);
+ expert_register_field_array(expert_dap, ei, array_length(ei));
/* Register our configuration options for DAP, particularly our port */
diff --git a/asn1/disp/packet-disp-template.c b/asn1/disp/packet-disp-template.c
index 20201b69ce..13c2245772 100644
--- a/asn1/disp/packet-disp-template.c
+++ b/asn1/disp/packet-disp-template.c
@@ -25,6 +25,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/prefs.h>
#include <epan/oids.h>
#include <epan/asn1.h>
@@ -68,6 +69,11 @@ static int proto_disp = -1;
static gint ett_disp = -1;
#include "packet-disp-ett.c"
+static expert_field ei_disp_unsupported_opcode = EI_INIT;
+static expert_field ei_disp_unsupported_errcode = EI_INIT;
+static expert_field ei_disp_unsupported_pdu = EI_INIT;
+static expert_field ei_disp_zero_pdu = EI_INIT;
+
#include "packet-disp-fn.c"
/*
@@ -128,8 +134,8 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
disp_op_name = "Coordinate-Shadow-Update-Argument";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DISP opcode (%d)",
- session->ros_op & ROS_OP_OPCODE_MASK);
+ proto_tree_add_expert_format(tree, pinfo, &ei_disp_unsupported_opcode, tvb, offset, -1,
+ "Unsupported DISP opcode (%d)", session->ros_op & ROS_OP_OPCODE_MASK);
break;
}
break;
@@ -148,8 +154,8 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
disp_op_name = "Coordinate-Shadow-Update-Result";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DISP opcode (%d)",
- session->ros_op & ROS_OP_OPCODE_MASK);
+ proto_tree_add_expert_format(tree, pinfo, &ei_disp_unsupported_opcode, tvb, offset, -1,
+ "Unsupported DISP opcode (%d)", session->ros_op & ROS_OP_OPCODE_MASK);
break;
}
break;
@@ -160,13 +166,13 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
disp_op_name = "Shadow-Error";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DISP errcode (%d)",
- session->ros_op & ROS_OP_OPCODE_MASK);
+ proto_tree_add_expert_format(tree, pinfo, &ei_disp_unsupported_errcode, tvb, offset, -1,
+ "Unsupported DISP errcode (%d)", session->ros_op & ROS_OP_OPCODE_MASK);
break;
}
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DISP PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_disp_unsupported_pdu, tvb, offset, -1);
return tvb_captured_length(tvb);
}
@@ -177,7 +183,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
old_offset=offset;
offset=(*disp_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1);
if(offset == old_offset){
- proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DISP PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_disp_zero_pdu, tvb, offset, -1);
break;
}
}
@@ -201,7 +207,16 @@ void proto_register_disp(void) {
&ett_disp,
#include "packet-disp-ettarr.c"
};
+
+ static ei_register_info ei[] = {
+ { &ei_disp_unsupported_opcode, { "disp.unsupported_opcode", PI_UNDECODED, PI_WARN, "Unsupported DISP opcode", EXPFILL }},
+ { &ei_disp_unsupported_errcode, { "disp.unsupported_errcode", PI_UNDECODED, PI_WARN, "Unsupported DISP errcode", EXPFILL }},
+ { &ei_disp_unsupported_pdu, { "disp.unsupported_pdu", PI_UNDECODED, PI_WARN, "Unsupported DISP PDU", EXPFILL }},
+ { &ei_disp_zero_pdu, { "disp.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte DISP PDU", EXPFILL }},
+ };
+
module_t *disp_module;
+ expert_module_t* expert_disp;
/* Register protocol */
proto_disp = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -210,6 +225,8 @@ void proto_register_disp(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_disp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_disp = expert_register_protocol(proto_disp);
+ expert_register_field_array(expert_disp, ei, array_length(ei));
/* Register our configuration options for DISP, particularly our port */
diff --git a/asn1/dop/packet-dop-template.c b/asn1/dop/packet-dop-template.c
index f26c14ea18..6d13570e87 100644
--- a/asn1/dop/packet-dop-template.c
+++ b/asn1/dop/packet-dop-template.c
@@ -71,6 +71,10 @@ static gint ett_dop_unknown = -1;
#include "packet-dop-ett.c"
static expert_field ei_dop_unknown_binding_parameter = EI_INIT;
+static expert_field ei_dop_unsupported_opcode = EI_INIT;
+static expert_field ei_dop_unsupported_errcode = EI_INIT;
+static expert_field ei_dop_unsupported_pdu = EI_INIT;
+static expert_field ei_dop_zero_pdu = EI_INIT;
/* Dissector table */
static dissector_table_t dop_dissector_table;
@@ -169,8 +173,8 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
dop_op_name = "Modify-Operational-Binding-Argument";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DOP Argument opcode (%d)",
- session->ros_op & ROS_OP_OPCODE_MASK);
+ proto_tree_add_expert_format(tree, pinfo, &ei_dop_unsupported_opcode, tvb, offset, -1,
+ "Unsupported DOP Argument opcode (%d)", session->ros_op & ROS_OP_OPCODE_MASK);
break;
}
break;
@@ -189,8 +193,8 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
dop_op_name = "Modify-Operational-Binding-Result";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DOP Result opcode (%d)",
- session->ros_op & ROS_OP_OPCODE_MASK);
+ proto_tree_add_expert_format(tree, pinfo, &ei_dop_unsupported_opcode, tvb, offset, -1,
+ "Unsupported DOP Result opcode (%d)", session->ros_op & ROS_OP_OPCODE_MASK);
break;
}
break;
@@ -201,13 +205,13 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
dop_op_name = "Operational-Binding-Error";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DOP Error opcode (%d)",
- session->ros_op & ROS_OP_OPCODE_MASK);
+ proto_tree_add_expert_format(tree, pinfo, &ei_dop_unsupported_errcode, tvb, offset, -1,
+ "Unsupported DOP Error opcode (%d)", session->ros_op & ROS_OP_OPCODE_MASK);
break;
}
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DOP PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_dop_unsupported_pdu, tvb, offset, -1);
return tvb_captured_length(tvb);
}
@@ -218,7 +222,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
old_offset=offset;
offset=(*dop_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1);
if(offset == old_offset){
- proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DOP PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_dop_zero_pdu, tvb, offset, -1);
break;
}
}
@@ -247,6 +251,10 @@ void proto_register_dop(void) {
static ei_register_info ei[] = {
{ &ei_dop_unknown_binding_parameter, { "dop.unknown_binding_parameter", PI_UNDECODED, PI_WARN, "Unknown binding-parameter", EXPFILL }},
+ { &ei_dop_unsupported_opcode, { "dop.unsupported_opcode", PI_UNDECODED, PI_WARN, "Unsupported DOP opcode", EXPFILL }},
+ { &ei_dop_unsupported_errcode, { "dop.unsupported_errcode", PI_UNDECODED, PI_WARN, "Unsupported DOP errcode", EXPFILL }},
+ { &ei_dop_unsupported_pdu, { "dop.unsupported_pdu", PI_UNDECODED, PI_WARN, "Unsupported DOP PDU", EXPFILL }},
+ { &ei_dop_zero_pdu, { "dop.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte DOP PDU", EXPFILL }},
};
expert_module_t* expert_dop;
diff --git a/asn1/dsp/packet-dsp-template.c b/asn1/dsp/packet-dsp-template.c
index b0ebba4412..f6adf54b08 100644
--- a/asn1/dsp/packet-dsp-template.c
+++ b/asn1/dsp/packet-dsp-template.c
@@ -25,6 +25,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/prefs.h>
#include <epan/oids.h>
#include <epan/asn1.h>
@@ -62,6 +63,11 @@ static int proto_dsp = -1;
static gint ett_dsp = -1;
#include "packet-dsp-ett.c"
+static expert_field ei_dsp_unsupported_opcode = EI_INIT;
+static expert_field ei_dsp_unsupported_errcode = EI_INIT;
+static expert_field ei_dsp_unsupported_pdu = EI_INIT;
+static expert_field ei_dsp_zero_pdu = EI_INIT;
+
#include "packet-dsp-fn.c"
/*
@@ -146,8 +152,8 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
dsp_op_name = "ChainedModify-DN-Argument";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DSP opcode (%d)",
- session->ros_op & ROS_OP_OPCODE_MASK);
+ proto_tree_add_expert_format(tree, pinfo, &ei_dsp_unsupported_opcode, tvb, offset, -1,
+ "Unsupported DSP opcode (%d)", session->ros_op & ROS_OP_OPCODE_MASK);
break;
}
break;
@@ -190,7 +196,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
dsp_op_name = "ChainedModify-DN-Result";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DSP opcode");
+ proto_tree_add_expert(tree, pinfo, &ei_dsp_unsupported_opcode, tvb, offset, -1);
break;
}
break;
@@ -233,12 +239,12 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
dsp_op_name = "DSA-Referral";
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DSP errcode");
+ proto_tree_add_expert(tree, pinfo, &ei_dsp_unsupported_errcode, tvb, offset, -1);
break;
}
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DSP PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_dsp_unsupported_pdu, tvb, offset, -1);
return tvb_captured_length(tvb);
}
@@ -249,7 +255,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
old_offset=offset;
offset=(*dsp_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1);
if(offset == old_offset){
- proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DSP PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_dsp_zero_pdu, tvb, offset, -1);
break;
}
}
@@ -273,7 +279,15 @@ void proto_register_dsp(void) {
&ett_dsp,
#include "packet-dsp-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_dsp_unsupported_opcode, { "dsp.unsupported_opcode", PI_UNDECODED, PI_WARN, "Unsupported DSP opcode", EXPFILL }},
+ { &ei_dsp_unsupported_errcode, { "dsp.unsupported_errcode", PI_UNDECODED, PI_WARN, "Unsupported DSP errcode", EXPFILL }},
+ { &ei_dsp_unsupported_pdu, { "dsp.unsupported_pdu", PI_UNDECODED, PI_WARN, "Unsupported DSP PDU", EXPFILL }},
+ { &ei_dsp_zero_pdu, { "dsp.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte DSP PDU", EXPFILL }},
+ };
+
module_t *dsp_module;
+ expert_module_t* expert_dsp;
/* Register protocol */
proto_dsp = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -283,6 +297,8 @@ void proto_register_dsp(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_dsp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_dsp = expert_register_protocol(proto_dsp);
+ expert_register_field_array(expert_dsp, ei, array_length(ei));
/* Register our configuration options for DSP, particularly our port */
diff --git a/asn1/ftam/packet-ftam-template.c b/asn1/ftam/packet-ftam-template.c
index 3c34b69f2b..7e72f40dff 100644
--- a/asn1/ftam/packet-ftam-template.c
+++ b/asn1/ftam/packet-ftam-template.c
@@ -30,6 +30,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/oids.h>
#include <epan/asn1.h>
@@ -59,6 +60,8 @@ static int hf_ftam_unstructured_binary = -1; /* ISO FTAM unstructured
static gint ett_ftam = -1;
#include "packet-ftam-ett.c"
+static expert_field ei_ftam_zero_pdu = EI_INIT;
+
#include "packet-ftam-fn.c"
/*
@@ -104,7 +107,7 @@ dissect_ftam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
old_offset=offset;
offset=dissect_ftam_PDU(FALSE, tvb, offset, &asn1_ctx, tree, -1);
if(offset == old_offset){
- proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte FTAM PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_ftam_zero_pdu, tvb, offset, -1);
break;
}
}
@@ -131,6 +134,11 @@ void proto_register_ftam(void) {
&ett_ftam,
#include "packet-ftam-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_ftam_zero_pdu, { "ftam.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte FTAM PDU", EXPFILL }},
+ };
+
+ expert_module_t* expert_ftam;
/* Register protocol */
proto_ftam = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -138,6 +146,8 @@ void proto_register_ftam(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_ftam, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_ftam = expert_register_protocol(proto_ftam);
+ expert_register_field_array(expert_ftam, ei, array_length(ei));
}
diff --git a/asn1/goose/packet-goose-template.c b/asn1/goose/packet-goose-template.c
index 6f550225ef..7a80be3a92 100644
--- a/asn1/goose/packet-goose-template.c
+++ b/asn1/goose/packet-goose-template.c
@@ -47,6 +47,7 @@ static int hf_goose_reserve1 = -1;
static int hf_goose_reserve2 = -1;
static expert_field ei_goose_mal_utctime = EI_INIT;
+static expert_field ei_goose_zero_pdu = EI_INIT;
#include "packet-goose-hf.c"
@@ -97,7 +98,7 @@ dissect_goose(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
old_offset = offset;
offset = dissect_goose_GOOSEpdu(FALSE, tvb, offset, &asn1_ctx , tree, -1);
if (offset == old_offset) {
- proto_tree_add_text(tree, tvb, offset, -1, "Internal error, zero-byte GOOSE PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_goose_zero_pdu, tvb, offset, -1);
return;
}
}
@@ -134,6 +135,7 @@ void proto_register_goose(void) {
static ei_register_info ei[] = {
{ &ei_goose_mal_utctime, { "goose.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding", EXPFILL }},
+ { &ei_goose_zero_pdu, { "goose.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte GOOSE PDU", EXPFILL }},
};
expert_module_t* expert_goose;
diff --git a/asn1/gprscdr/gprscdr.cnf b/asn1/gprscdr/gprscdr.cnf
index 4166d69882..d060f16635 100644
--- a/asn1/gprscdr/gprscdr.cnf
+++ b/asn1/gprscdr/gprscdr.cnf
@@ -51,7 +51,7 @@ GPRSRecord
#.FN_BODY ManagementExtension/information
- proto_tree_add_text(tree, tvb, offset, -1, "Not dissected");
+ proto_tree_add_expert(tree, actx->pinfo, &ei_gprscdr_not_dissected, tvb, offset, -1);
#.FN_BODY TimeStamp VAL_PTR = &parameter_tvb
/*
diff --git a/asn1/gprscdr/packet-gprscdr-template.c b/asn1/gprscdr/packet-gprscdr-template.c
index b68433ca8d..ab90fe9602 100644
--- a/asn1/gprscdr/packet-gprscdr-template.c
+++ b/asn1/gprscdr/packet-gprscdr-template.c
@@ -25,6 +25,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/asn1.h>
#include "packet-ber.h"
@@ -48,6 +49,8 @@ static int ett_gprscdr_timestamp = -1;
static int ett_gprscdr_plmn_id = -1;
#include "packet-gprscdr-ett.c"
+static expert_field ei_gprscdr_not_dissected = EI_INIT;
+
static const value_string gprscdr_daylight_saving_time_vals[] = {
{0, "No adjustment"},
{1, "+1 hour adjustment for Daylight Saving Time"},
@@ -77,10 +80,18 @@ proto_register_gprscdr(void)
#include "packet-gprscdr-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_gprscdr_not_dissected, { "gprscdr.not_dissected", PI_UNDECODED, PI_WARN, "Not dissected", EXPFILL }},
+ };
+
+ expert_module_t* expert_gprscdr;
+
proto_gprscdr = proto_register_protocol(PNAME, PSNAME, PFNAME);
proto_register_field_array(proto_gprscdr, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_gprscdr = expert_register_protocol(proto_gprscdr);
+ expert_register_field_array(expert_gprscdr, ei, array_length(ei));
}
/* The registration hand-off routine */
diff --git a/asn1/gsm_map/gsm_map.cnf b/asn1/gsm_map/gsm_map.cnf
index a187e7a70f..5824c7bb48 100644
--- a/asn1/gsm_map/gsm_map.cnf
+++ b/asn1/gsm_map/gsm_map.cnf
@@ -228,11 +228,12 @@ MAP-DialoguePDU B "0.4.0.0.1.1.1.1" "map-DialogueAS"
#.FN_PARS PrivateExtension/extId FN_VARIANT = _str VAL_PTR = &obj_id
#.FN_BODY PrivateExtension/extType
- proto_tree_add_text(tree, tvb, offset, -1, "Extension Data");
+ proto_tree *ext_tree;
+ ext_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_gsm_map_extention_data, NULL, "Extension Data");
if (obj_id){
- offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree, NULL);
+ offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
- call_dissector(data_handle, tvb, actx->pinfo, tree);
+ call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
offset = tvb_length_remaining(tvb,offset);
}
@@ -535,15 +536,15 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
switch(sms_encoding){
case SMS_ENCODING_7BIT:
case SMS_ENCODING_7BIT_LANG:
- proto_tree_add_text(tree, parameter_tvb , 0, length, "USSD String: %%s", tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, length, ENC_3GPP_TS_23_038_7BITS|ENC_NA));
+ proto_tree_add_string(tree, hf_gsm_map_ussd_string, parameter_tvb, 0, length, tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, length, ENC_3GPP_TS_23_038_7BITS|ENC_NA));
break;
case SMS_ENCODING_8BIT:
/* XXX - ASCII, or some extended ASCII? */
- proto_tree_add_text(tree, parameter_tvb , 0, length, "USSD String: %%s", tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, length, ENC_ASCII|ENC_NA));
+ proto_tree_add_string(tree, hf_gsm_map_ussd_string, parameter_tvb, 0, length, tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, length, ENC_ASCII|ENC_NA));
break;
case SMS_ENCODING_UCS2:
case SMS_ENCODING_UCS2_LANG:
- proto_tree_add_text(tree, parameter_tvb , 0, length, "USSD String: %%s", tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, length, ENC_UCS_2|ENC_BIG_ENDIAN));
+ proto_tree_add_string(tree, hf_gsm_map_ussd_string, parameter_tvb, 0, length, tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, length, ENC_UCS_2|ENC_BIG_ENDIAN));
break;
default:
break;
@@ -741,7 +742,7 @@ if (!actx->value_ptr)
/* TODO: There may be more than one IE */
break;
default:
- proto_tree_add_text(subtree, (tvbuff_t*)actx->value_ptr, 0, length, "If you want this decoded send the packet to Wireshark-dev");
+ proto_tree_add_expert(subtree, actx->pinfo, &ei_gsm_map_undecoded, (tvbuff_t*)actx->value_ptr, 0, length);
break;
}/* switch(octet) */
break;
@@ -821,7 +822,7 @@ if (!actx->value_ptr)
/* TODO: There may be more than one IE */
break;
default:
- proto_tree_add_text(subtree, (tvbuff_t*)actx->value_ptr, 0, length, "If you want this decoded send the packet to Wireshark-dev");
+ proto_tree_add_expert(subtree, actx->pinfo, &ei_gsm_map_undecoded, (tvbuff_t*)actx->value_ptr, 0, length);
break;
}/* switch(octet) */
break;
diff --git a/asn1/gsm_map/packet-gsm_map-template.c b/asn1/gsm_map/packet-gsm_map-template.c
index f507161db0..601e20691e 100644
--- a/asn1/gsm_map/packet-gsm_map-template.c
+++ b/asn1/gsm_map/packet-gsm_map-template.c
@@ -150,6 +150,7 @@ static int hf_gsm_map_ericsson_locationInformation_rat = -1;
static int hf_gsm_map_ericsson_locationInformation_lac = -1;
static int hf_gsm_map_ericsson_locationInformation_ci = -1;
static int hf_gsm_map_ericsson_locationInformation_sac = -1;
+static int hf_gsm_map_ussd_string = -1;
#include "packet-gsm_map-hf.c"
@@ -179,6 +180,7 @@ static gint ett_gsm_map_GeographicalInformation = -1;
static gint ett_gsm_map_apn_str = -1;
static gint ett_gsm_map_LocationNumber = -1;
static gint ett_gsm_map_ericsson_locationInformation = -1;
+static gint ett_gsm_map_extention_data = -1;
#include "packet-gsm_map-ett.c"
@@ -186,6 +188,7 @@ static expert_field ei_gsm_map_unknown_sequence3 = EI_INIT;
static expert_field ei_gsm_map_unknown_sequence = EI_INIT;
static expert_field ei_gsm_map_unknown_parameter = EI_INIT;
static expert_field ei_gsm_map_unknown_invokeData = EI_INIT;
+static expert_field ei_gsm_map_undecoded = EI_INIT;
static dissector_handle_t gsm_sms_handle; /* SMS TPDU */
static dissector_handle_t data_handle;
@@ -411,7 +414,7 @@ dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
octet = tvb_get_guint8(tvb,offset);
switch (octet){
case 0:
- proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Maximum SDU size/Reserved");
+ proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, octet, "Reserved");
break;
case 0x93:
value = 1502;
@@ -430,7 +433,7 @@ dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
value = octet * 10;
proto_tree_add_uint(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, value);
}else{
- proto_tree_add_text(subtree, tvb, offset, 1, "Maximum SDU size value 0x%x not defined in TS 24.008",octet);
+ proto_tree_add_uint_format_value(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, octet, "0x%x not defined in TS 24.008", octet);
}
}
offset++;
@@ -438,7 +441,7 @@ dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
/* Maximum bit rate for uplink, octet 8 */
octet = tvb_get_guint8(tvb,offset);
if (octet == 0 ){
- proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Maximum bit rate for uplink/Reserved" );
+ proto_tree_add_uint_format_value(subtree, hf_gsm_map_max_brate_ulink, tvb, offset, 1, octet, "Reserved" );
}else{
proto_tree_add_uint(subtree, hf_gsm_map_max_brate_ulink, tvb, offset, 1, gsm_map_calc_bitrate(octet));
}
@@ -446,7 +449,7 @@ dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
/* Maximum bit rate for downlink, octet 9 (see 3GPP TS 23.107) */
octet = tvb_get_guint8(tvb,offset);
if (octet == 0 ){
- proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Maximum bit rate for downlink/Reserved" );
+ proto_tree_add_uint_format_value(subtree, hf_gsm_map_max_brate_dlink, tvb, offset, 1, octet, "Reserved" );
}else{
proto_tree_add_uint(subtree, hf_gsm_map_max_brate_dlink, tvb, offset, 1, gsm_map_calc_bitrate(octet));
}
@@ -468,7 +471,7 @@ dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
*/
octet = tvb_get_guint8(tvb,offset);
if (octet == 0 ){
- proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Guaranteed bit rate for uplink/Reserved" );
+ proto_tree_add_uint_format_value(subtree, hf_gsm_map_guaranteed_max_brate_ulink, tvb, offset, 1, octet, "Reserved" );
}else{
proto_tree_add_uint(subtree, hf_gsm_map_guaranteed_max_brate_ulink, tvb, offset, 1, gsm_map_calc_bitrate(octet));
}
@@ -479,7 +482,7 @@ dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
*/
octet = tvb_get_guint8(tvb,offset);
if (octet == 0 ){
- proto_tree_add_text(subtree, tvb, offset, 1, "Subscribed Guaranteed bit rate for downlink/Reserved" );
+ proto_tree_add_uint_format_value(subtree, hf_gsm_map_guaranteed_max_brate_dlink, tvb, offset, 1, octet, "Reserved" );
}else{
proto_tree_add_uint(subtree, hf_gsm_map_guaranteed_max_brate_dlink, tvb, offset, 1, gsm_map_calc_bitrate(octet));
}
@@ -1550,7 +1553,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
break;
case 61: /*unstructuredSS-Notify*/
/* TRUE ? */
- proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_gsm_map_unknown_invokeData, tvb, offset, -1, "Unknown returnResultData blob");
break;
case 62: /*AnyTimeSubscriptionInterrogation*/
offset=dissect_gsm_map_ms_AnyTimeSubscriptionInterrogationRes(FALSE, tvb, offset, actx, tree, -1);
@@ -2888,6 +2891,11 @@ void proto_register_gsm_map(void) {
{ "SAC", "gsm_map.ericsson.locationInformation.sac",
FT_UINT16, BASE_DEC_HEX, NULL, 0,
"Service Area Code", HFILL }},
+ { &hf_gsm_map_ussd_string,
+ { "USSD String", "gsm_map.ussd_string",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
#include "packet-gsm_map-hfarr.c"
};
@@ -2919,6 +2927,7 @@ void proto_register_gsm_map(void) {
&ett_gsm_map_apn_str,
&ett_gsm_map_LocationNumber,
&ett_gsm_map_ericsson_locationInformation,
+ &ett_gsm_map_extention_data,
#include "packet-gsm_map-ettarr.c"
};
@@ -2928,6 +2937,7 @@ void proto_register_gsm_map(void) {
{ &ei_gsm_map_unknown_sequence, { "gsm_map.unknown.sequence", PI_UNDECODED, PI_ERROR, "Unknown or not implemented sequence", EXPFILL }},
{ &ei_gsm_map_unknown_parameter, { "gsm_map.unknown.parameter", PI_UNDECODED, PI_ERROR, "Unknown or not implemented parameter", EXPFILL }},
{ &ei_gsm_map_unknown_invokeData, { "gsm_map.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }},
+ { &ei_gsm_map_undecoded, { "gsm_map.undecoded", PI_UNDECODED, PI_WARN, "If you want this decoded send the packet to Wireshark-dev", EXPFILL }},
};
static const enum_val_t application_context_modes[] = {
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index 2bece14afe..b34a6dee49 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -666,12 +666,13 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode
#.FN_HDR GenericIdentifier
gef_ctx_t *gefx;
+ proto_item* ti;
#.FN_FTR
gef_ctx_update_key(gef_ctx_get(actx->private_data));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG GenericIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h225_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, actx);
}
actx->private_data = gefx; /* subdissector could overwrite it */
@@ -699,11 +700,13 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode
#.FN_BODY Content/raw VAL_PTR = &value_tvb
tvbuff_t *value_tvb;
gef_ctx_t *gefx;
+ proto_item* ti;
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h225_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s);
}
#.END
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c
index 74b01aa89e..c2aa870d64 100644
--- a/asn1/h225/packet-h225-template.c
+++ b/asn1/h225/packet-h225-template.c
@@ -101,6 +101,7 @@ static int hf_h225_ras_req_frame = -1;
static int hf_h225_ras_rsp_frame = -1;
static int hf_h225_ras_dup = -1;
static int hf_h225_ras_deltatime = -1;
+static int hf_h225_debug_dissector_try_string = -1;
#include "packet-h225-hf.c"
@@ -226,6 +227,9 @@ void proto_register_h225(void) {
{ &hf_h225_ras_deltatime,
{ "RAS Service Response Time", "h225.ras.timedelta", FT_RELATIVE_TIME, BASE_NONE,
NULL, 0, "Timedelta between RAS-Request and RAS-Response", HFILL }},
+ { &hf_h225_debug_dissector_try_string,
+ { "*** DEBUG dissector_try_string", "h225.debug.dissector_try_string", FT_STRING, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
#include "packet-h225-hfarr.c"
};
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index 4368d27621..77ccec4a1a 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -633,7 +633,6 @@ if (h245_pi != NULL)
if (gefx) {
gefx->subid = wmem_strdup_printf(wmem_packet_scope(), "%%u", subMessageIdentifer);
gef_ctx_update_key(gef_ctx_get(actx->private_data));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG CapabilityIdentifier: %%s", gef_ctx_get(actx->private_data)->key);*/
}
if (hf_index == hf_h245_subMessageIdentifier_standard)
{
@@ -689,13 +688,15 @@ if (h245_pi != NULL)
tvbuff_t *value_tvb;
gef_ctx_t *parent_gefx;
gef_ctx_t *gefx;
+ proto_item* ti;
parent_gefx = gef_ctx_get(actx->private_data);
actx->private_data = gef_ctx_alloc(parent_gefx, "nonCollapsingRaw");
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s);
}
actx->private_data = parent_gefx;
@@ -712,12 +713,14 @@ if (h245_pi != NULL)
#.FN_HDR CapabilityIdentifier
gef_ctx_t *gefx;
+ proto_item* ti;
+
#.FN_FTR
gef_ctx_update_key(gef_ctx_get(actx->private_data));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG CapabilityIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, actx);
}
actx->private_data = gefx; /* subdissector could overwrite it */
@@ -742,12 +745,13 @@ if (h245_pi != NULL)
#----------------------------------------------------------------------------------------
#.FN_HDR ParameterIdentifier
gef_ctx_t *gefx;
+ proto_item* ti;
#.FN_FTR
gef_ctx_update_key(gef_ctx_get(actx->private_data));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG ParameterIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, actx);
}
actx->private_data = gefx; /* subdissector could overwrite it */
@@ -767,6 +771,7 @@ if (h245_pi != NULL)
guint8 *buf;
tvbuff_t *value_tvb;
gef_ctx_t *gefx;
+ proto_item* ti;
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
@@ -774,7 +779,8 @@ if (h245_pi != NULL)
buf = wmem_new(actx->pinfo->pool, guint8);
buf[0] = value;
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint8), sizeof(guint8));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
add_new_data_source(%(ACTX)s->pinfo, value_tvb, "booleanArray");
dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s);
}
@@ -784,6 +790,7 @@ if (h245_pi != NULL)
guint8 *buf;
tvbuff_t *value_tvb;
gef_ctx_t *gefx;
+ proto_item* ti;
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
@@ -791,7 +798,8 @@ if (h245_pi != NULL)
buf = (guint8 *)wmem_new(actx->pinfo->pool, guint16);
phton16(buf, value);
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
add_new_data_source(%(ACTX)s->pinfo, value_tvb, "unsignedMin");
dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s);
}
@@ -801,6 +809,7 @@ if (h245_pi != NULL)
guint8 *buf;
tvbuff_t *value_tvb;
gef_ctx_t *gefx;
+ proto_item* ti;
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
@@ -808,7 +817,8 @@ if (h245_pi != NULL)
buf = (guint8 *)wmem_new(actx->pinfo->pool, guint16);
phton16(buf, value);
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
add_new_data_source(%(ACTX)s->pinfo, value_tvb, "unsignedMax");
dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s);
}
@@ -818,6 +828,7 @@ if (h245_pi != NULL)
guint8 *buf;
tvbuff_t *value_tvb;
gef_ctx_t *gefx;
+ proto_item* ti;
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
@@ -825,7 +836,8 @@ if (h245_pi != NULL)
buf = (guint8 *)wmem_new(actx->pinfo->pool, guint32);
phton32(buf, value);
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
add_new_data_source(%(ACTX)s->pinfo, value_tvb, "unsigned32Min");
dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s);
}
@@ -835,6 +847,7 @@ if (h245_pi != NULL)
guint8 *buf;
tvbuff_t *value_tvb;
gef_ctx_t *gefx;
+ proto_item* ti;
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
@@ -842,7 +855,8 @@ if (h245_pi != NULL)
buf = (guint8 *)wmem_new(actx->pinfo->pool, guint32);
phton32(buf, value);
value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32));
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
add_new_data_source(%(ACTX)s->pinfo, value_tvb, "unsigned32Max");
dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s);
}
@@ -850,11 +864,13 @@ if (h245_pi != NULL)
#.FN_BODY ParameterValue/octetString VAL_PTR = &value_tvb
tvbuff_t *value_tvb;
gef_ctx_t *gefx;
+ proto_item* ti;
%(DEFAULT_BODY)s
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key);
+ PROTO_ITEM_SET_HIDDEN(ti);
dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, %(ACTX)s);
}
#.END
diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c
index 5fd7a7ae60..96035d73f9 100644
--- a/asn1/h245/packet-h245-template.c
+++ b/asn1/h245/packet-h245-template.c
@@ -79,6 +79,8 @@ static int hf_h245Manufacturer = -1;
static int hf_h245_subMessageIdentifier_standard = -1;
static int h245_tap = -1;
static int h245dg_tap = -1;
+static int hf_h245_debug_dissector_try_string = -1;
+
h245_packet_info *h245_pi=NULL;
static gboolean h245_reassembly = TRUE;
@@ -476,6 +478,9 @@ void proto_register_h245(void) {
{ "subMessageIdentifier", "h245.subMessageIdentifier.standard",
FT_UINT32, BASE_DEC, VALS(h245_h239subMessageIdentifier_vals), 0,
NULL, HFILL }},
+ { &hf_h245_debug_dissector_try_string,
+ { "*** DEBUG dissector_try_string", "h245.debug.dissector_try_string", FT_STRING, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
#include "packet-h245-hfarr.c"
};
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c
index a6a5127032..2d8fb1a664 100644
--- a/asn1/h248/packet-h248-template.c
+++ b/asn1/h248/packet-h248-template.c
@@ -93,6 +93,7 @@ static gcp_hf_ett_t h248_arrel = {{-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1}};
static expert_field ei_h248_errored_command = EI_INIT;
static expert_field ei_h248_transactionId64 = EI_INIT;
static expert_field ei_h248_context_id64 = EI_INIT;
+static expert_field ei_h248_octet_string_expected = EI_INIT;
static dissector_table_t subdissector_table;
@@ -1199,7 +1200,8 @@ static int dissect_h248_PropertyID(gboolean implicit_tag _U_, tvbuff_t *tvb, int
if( (ber_class!=BER_CLASS_UNI)
||(tag!=BER_UNI_TAG_OCTETSTRING) ){
- proto_tree_add_text(tree, tvb, offset-2, 2, "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", ber_class, pc, tag);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_h248_octet_string_expected, tvb, offset-2, 2,
+ "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", ber_class, pc, tag);
return end_offset;
}
@@ -1281,7 +1283,8 @@ static int dissect_h248_SigParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb,
if( (ber_class!=BER_CLASS_UNI)
||(tag!=BER_UNI_TAG_OCTETSTRING) ){
- proto_tree_add_text(tree, tvb, offset-2, 2, "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", ber_class, pc, tag);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_h248_octet_string_expected, tvb, offset-2, 2,
+ "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", ber_class, pc, tag);
return end_offset;
}
@@ -1359,7 +1362,8 @@ static int dissect_h248_EventParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb
if( (ber_class!=BER_CLASS_UNI)
||(tag!=BER_UNI_TAG_OCTETSTRING) ){
- proto_tree_add_text(tree, tvb, offset-2, 2, "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", ber_class, pc, tag);
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_h248_octet_string_expected, tvb, offset-2, 2,
+ "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", ber_class, pc, tag);
return end_offset;
}
@@ -1598,6 +1602,7 @@ void proto_register_h248(void) {
{ &ei_h248_errored_command, { "h248.errored_command", PI_RESPONSE_CODE, PI_WARN, "Errored Command", EXPFILL }},
{ &ei_h248_transactionId64, { "h248.transactionId.error", PI_MALFORMED, PI_WARN, "Transaction ID invalid", EXPFILL }},
{ &ei_h248_context_id64, { "h248.contextId.error", PI_MALFORMED, PI_WARN, "Context ID invalid", EXPFILL }},
+ { &ei_h248_octet_string_expected, { "h248.octet_string_expected", PI_PROTOCOL, PI_WARN, "H.248 BER Error: OctetString expected", EXPFILL }},
};
expert_module_t* expert_h248;
diff --git a/asn1/h450/packet-h450-template.c b/asn1/h450/packet-h450-template.c
index 89a9313c1c..4516578eff 100644
--- a/asn1/h450/packet-h450-template.c
+++ b/asn1/h450/packet-h450-template.c
@@ -30,6 +30,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/asn1.h>
@@ -55,6 +56,10 @@ static int hf_h450_error = -1;
/* Initialize the subtree pointers */
#include "packet-h450-ett.c"
+static expert_field ei_h450_unsupported_arg_type = EI_INIT;
+static expert_field ei_h450_unsupported_result_type = EI_INIT;
+static expert_field ei_h450_unsupported_error_type = EI_INIT;
+
static const value_string h450_str_operation[] = {
#include "packet-h450-table10.c"
{ 0, NULL}
@@ -149,7 +154,7 @@ dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset = op_ptr->arg_pdu(tvb, pinfo, tree, NULL);
else
if (tvb_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(tree, tvb, offset, -1, "UNSUPPORTED ARGUMENT TYPE (H.450)");
+ proto_tree_add_expert(tree, pinfo, &ei_h450_unsupported_arg_type, tvb, offset, -1);
offset += tvb_length_remaining(tvb, offset);
}
@@ -194,7 +199,7 @@ dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset = op_ptr->res_pdu(tvb, pinfo, tree, NULL);
else
if (tvb_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(tree, tvb, offset, -1, "UNSUPPORTED RESULT TYPE (H.450)");
+ proto_tree_add_expert(tree, pinfo, &ei_h450_unsupported_result_type, tvb, offset, -1);
offset += tvb_length_remaining(tvb, offset);
}
@@ -239,7 +244,7 @@ dissect_h450_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset = err_ptr->err_pdu(tvb, pinfo, tree, NULL);
else
if (tvb_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(tree, tvb, offset, -1, "UNSUPPORTED ERROR TYPE (H.450)");
+ proto_tree_add_expert(tree, pinfo, &ei_h450_unsupported_error_type, tvb, offset, -1);
offset += tvb_length_remaining(tvb, offset);
}
@@ -265,6 +270,13 @@ void proto_register_h450(void) {
#include "packet-h450-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_h450_unsupported_arg_type, { "h450.unsupported.arg_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ARGUMENT TYPE (H.450)", EXPFILL }},
+ { &ei_h450_unsupported_result_type, { "h450.unsupported.result_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED RESULT TYPE (H.450)", EXPFILL }},
+ { &ei_h450_unsupported_error_type, { "h450.unsupported.error_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ERROR TYPE (H.450)", EXPFILL }},
+ };
+
+ expert_module_t* expert_h450;
/* Register protocol */
proto_h450 = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -272,6 +284,8 @@ void proto_register_h450(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_h450, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_h450 = expert_register_protocol(proto_h450);
+ expert_register_field_array(expert_h450, ei, array_length(ei));
rose_ctx_init(&h450_rose_ctx);
diff --git a/asn1/h460/packet-h460-template.c b/asn1/h460/packet-h460-template.c
index de77b1b747..29e472af4e 100644
--- a/asn1/h460/packet-h460-template.c
+++ b/asn1/h460/packet-h460-template.c
@@ -229,9 +229,7 @@ dissect_h460_name(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree, void
DISSECTOR_ASSERT(actx);
if (tree) {
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, 0, 0, "*** DEBUG dissect_h460_name: %s", pinfo->match_string);*/
ftr = find_ftr(pinfo->match_string);
- /* DEBUG */ /*proto_tree_add_text(tree, tvb, 0, 0, "*** DEBUG dissect_h460_name: ftr %s", (ftr)?ftr->name:"-none-");*/
if (ftr) {
proto_item_append_text(actx->created_item, " - %s", ftr->name);
proto_item_append_text(proto_item_get_parent(proto_tree_get_parent(tree)), ": %s", ftr->name);
diff --git a/asn1/idmp/packet-idmp-template.c b/asn1/idmp/packet-idmp-template.c
index a908b4b7ce..4a04124506 100644
--- a/asn1/idmp/packet-idmp-template.c
+++ b/asn1/idmp/packet-idmp-template.c
@@ -81,6 +81,7 @@ static int hf_idmp_fragment_error = -1;
static int hf_idmp_fragment_count = -1;
static int hf_idmp_reassembled_in = -1;
static int hf_idmp_reassembled_length = -1;
+static int hf_idmp_segment_data = -1;
static gint ett_idmp_fragment = -1;
static gint ett_idmp_fragments = -1;
@@ -197,9 +198,7 @@ static int dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
idmp_length, !idmp_final);
if(fd_head && fd_head->next) {
- proto_tree_add_text(tree, tvb, offset, (idmp_length) ? -1 : 0,
- "IDMP segment data (%u byte%s)", idmp_length,
- plurality(idmp_length, "", "s"));
+ proto_tree_add_item(tree, hf_idmp_segment_data, tvb, offset, (idmp_length) ? -1 : 0, ENC_NA);
if (idmp_final) {
/* This is the last segment */
@@ -219,9 +218,8 @@ static int dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
col_append_fstr(pinfo->cinfo, COL_INFO, " [IDMP fragment, %u byte%s, IDMP reassembly not enabled]",
idmp_length, plurality(idmp_length, "", "s"));
- proto_tree_add_text(tree, tvb, offset, (idmp_length) ? -1 : 0,
- "IDMP segment data (%u byte%s) (IDMP reassembly not enabled)", idmp_length,
- plurality(idmp_length, "", "s"));
+ proto_tree_add_bytes_format_value(tree, hf_idmp_segment_data, tvb, offset, (idmp_length) ? -1 : 0,
+ NULL, "(IDMP reassembly not enabled)");
}
}
/* not reassembling - just dissect */
@@ -310,6 +308,9 @@ void proto_register_idmp(void)
{ &hf_idmp_reassembled_length,
{ "Reassembled IDMP length", "idmp.reassembled.length", FT_UINT32, BASE_DEC,
NULL, 0x00, "The total length of the reassembled payload", HFILL } },
+ { &hf_idmp_segment_data,
+ { "IDMP segment data", "idmp.segment_data", FT_BYTES, BASE_NONE,
+ NULL, 0x00, NULL, HFILL } },
#include "packet-idmp-hfarr.c"
};
diff --git a/asn1/inap/inap.cnf b/asn1/inap/inap.cnf
index 6cb607ff5a..cee51492f6 100644
--- a/asn1/inap/inap.cnf
+++ b/asn1/inap/inap.cnf
@@ -212,11 +212,12 @@ static const inap_err_t inap_err_tab[] = {
#.FN_PARS Code/global FN_VARIANT = _str VAL_PTR = &obj_id
#.FN_BODY ExtensionField/value
- proto_tree_add_text(tree, tvb, offset, -1, "Extension Data");
+ proto_tree *ext_tree;
+ ext_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_inap_extention_data, NULL, "Extension Data");
if (obj_id){
- offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree, NULL);
+ offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
- call_dissector(data_handle, tvb, actx->pinfo, tree);
+ call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
offset = tvb_length_remaining(tvb,offset);
}
diff --git a/asn1/inap/packet-inap-template.c b/asn1/inap/packet-inap-template.c
index 43b9184ec1..b1651f4bb9 100644
--- a/asn1/inap/packet-inap-template.c
+++ b/asn1/inap/packet-inap-template.c
@@ -79,6 +79,7 @@ static int inap_opcode_type;
static gint ett_inap = -1;
static gint ett_inapisup_parameter = -1;
static gint ett_inap_HighLayerCompatibility = -1;
+static gint ett_inap_extention_data = -1;
#include "packet-inap-ett.c"
static expert_field ei_inap_unknown_invokeData = EI_INIT;
@@ -214,6 +215,7 @@ void proto_register_inap(void) {
&ett_inap,
&ett_inapisup_parameter,
&ett_inap_HighLayerCompatibility,
+ &ett_inap_extention_data,
#include "packet-inap-ettarr.c"
};
diff --git a/asn1/isdn-sup/packet-isdn-sup-template.c b/asn1/isdn-sup/packet-isdn-sup-template.c
index 235b3595f0..68333e5792 100644
--- a/asn1/isdn-sup/packet-isdn-sup-template.c
+++ b/asn1/isdn-sup/packet-isdn-sup-template.c
@@ -27,7 +27,7 @@
#include <glib.h>
#include <epan/packet.h>
-
+#include <epan/expert.h>
#include "packet-ber.h"
@@ -91,6 +91,9 @@ static gint ett_isdn_sup = -1;
#include "packet-isdn-sup-ett.c"
+static expert_field ei_isdn_sup_unsupported_arg_type = EI_INIT;
+static expert_field ei_isdn_sup_unsupported_result_type = EI_INIT;
+static expert_field ei_isdn_sup_unsupported_error_type = EI_INIT;
/* Preference settings default */
@@ -177,7 +180,7 @@ dissect_isdn_sup_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
offset = op_ptr->arg_pdu(tvb, pinfo, isdn_sup_tree, NULL);
else
if (tvb_reported_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(isdn_sup_tree, tvb, offset, -1, "UNSUPPORTED ARGUMENT TYPE (ETSI Sup)");
+ proto_tree_add_expert(tree, pinfo, &ei_isdn_sup_unsupported_error_type, tvb, offset, -1);
offset += tvb_reported_length_remaining(tvb, offset);
}
@@ -226,7 +229,7 @@ dissect_isdn_sup_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
offset = op_ptr->res_pdu(tvb, pinfo, isdn_sup_tree, NULL);
else
if (tvb_reported_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(isdn_sup_tree, tvb, offset, -1, "UNSUPPORTED RESULT TYPE (ETSI sup)");
+ proto_tree_add_expert(tree, pinfo, &ei_isdn_sup_unsupported_result_type, tvb, offset, -1);
offset += tvb_reported_length_remaining(tvb, offset);
}
@@ -276,7 +279,7 @@ dissect_isdn_sup_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
offset = err_ptr->err_pdu(tvb, pinfo, isdn_sup_tree, NULL);
else
if (tvb_reported_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(isdn_sup_tree, tvb, offset, -1, "UNSUPPORTED ERROR TYPE (ETSI sup)");
+ proto_tree_add_expert(tree, pinfo, &ei_isdn_sup_unsupported_error_type, tvb, offset, -1);
offset += tvb_reported_length_remaining(tvb, offset);
}
@@ -352,11 +355,20 @@ void proto_register_isdn_sup(void) {
#include "packet-isdn-sup-ettarr.c"
};
- /* Register fields and subtrees */
- proto_register_field_array(proto_isdn_sup, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ static ei_register_info ei[] = {
+ { &ei_isdn_sup_unsupported_arg_type, { "isdn_sup.unsupported.arg_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ARGUMENT TYPE (ETSI sup)", EXPFILL }},
+ { &ei_isdn_sup_unsupported_result_type, { "isdn_sup.unsupported.result_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED RESULT TYPE (ETSI sup)", EXPFILL }},
+ { &ei_isdn_sup_unsupported_error_type, { "isdn_sup.unsupported.error_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ERROR TYPE (ETSI sup)", EXPFILL }},
+ };
+
+ expert_module_t* expert_isdn_sup;
/* Register protocol */
proto_isdn_sup = proto_register_protocol(PNAME, PSNAME, PFNAME);
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_isdn_sup, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ expert_isdn_sup = expert_register_protocol(proto_isdn_sup);
+ expert_register_field_array(expert_isdn_sup, ei, array_length(ei));
}
diff --git a/asn1/kerberos/kerberos.cnf b/asn1/kerberos/kerberos.cnf
index e142d6ca8b..4059cb9b89 100644
--- a/asn1/kerberos/kerberos.cnf
+++ b/asn1/kerberos/kerberos.cnf
@@ -202,7 +202,7 @@ guint32 msgtype;
address_str = tvb_ip6_to_str(tvb, offset);
break;
default:
- proto_tree_add_text(tree, tvb, offset, len, "KRB Address: I dont know how to parse this type of address yet");
+ proto_tree_add_expert(tree, actx->pinfo, &ei_kerberos_address, tvb, offset, len);
address_str = NULL;
}
diff --git a/asn1/kerberos/packet-kerberos-template.c b/asn1/kerberos/packet-kerberos-template.c
index fda91937d8..e1a21854c6 100644
--- a/asn1/kerberos/packet-kerberos-template.c
+++ b/asn1/kerberos/packet-kerberos-template.c
@@ -147,6 +147,8 @@ static gint ett_krb_recordmark = -1;
#include "packet-kerberos-ett.c"
static expert_field ei_kerberos_decrypted_keytype = EI_INIT;
+static expert_field ei_kerberos_address = EI_INIT;
+static expert_field ei_krb_gssapi_dlglen = EI_INIT;
static dissector_handle_t krb4_handle=NULL;
@@ -348,7 +350,7 @@ read_keytab_file(const char *filename)
guint8 *
-decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
+decrypt_krb5_data(proto_tree *tree _U_, packet_info *pinfo,
int usage,
tvbuff_t *cryptotvb,
int keytype,
@@ -398,7 +400,6 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
"Decrypted keytype %d in frame %u using %s",
ek->keytype, pinfo->fd->num, ek->key_origin);
- proto_tree_add_text(tree, NULL, 0, 0, "[Decrypted using: %s]", ek->key_origin);
/* return a private g_malloced blob to the caller */
user_data=data.data;
if (datalen) {
@@ -544,8 +545,10 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
if((ret == 0) && (length>0)){
char *user_data;
-printf("woohoo decrypted keytype:%d in frame:%u\n", ek->keytype, pinfo->fd->num);
- proto_tree_add_text(tree, NULL, 0, 0, "[Decrypted using: %s]", ek->key_origin);
+ expert_add_info_format(pinfo, NULL, &ei_kerberos_decrypted_keytype,
+ "Decrypted keytype %d in frame %u using %s",
+ ek->keytype, pinfo->fd->num, ek->key_origin);
+
krb5_crypto_destroy(krb5_ctx, crypto);
/* return a private g_malloced blob to the caller */
user_data=g_memdup(data.data, data.length);
@@ -1591,7 +1594,8 @@ dissect_krb5_rfc1964_checksum(asn1_ctx_t *actx _U_, proto_tree *tree, tvbuff_t *
offset += 2;
if(dlglen!=tvb_reported_length_remaining(tvb, offset)){
- proto_tree_add_text(tree, tvb, 0, 0, "Error: DlgLen:%d is not the same as number of bytes remaining:%d", dlglen, tvb_captured_length_remaining(tvb, offset));
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_krb_gssapi_dlglen, tvb, 0, 0,
+ "Error: DlgLen:%d is not the same as number of bytes remaining:%d", dlglen, tvb_captured_length_remaining(tvb, offset));
return offset;
}
@@ -1778,16 +1782,14 @@ void
show_krb_recordmark(proto_tree *tree, tvbuff_t *tvb, gint start, guint32 krb_rm)
{
gint rec_len;
- proto_item *rm_item;
proto_tree *rm_tree;
if (tree == NULL)
return;
rec_len = kerberos_rm_to_reclen(krb_rm);
- rm_item = proto_tree_add_text(tree, tvb, start, 4,
- "Record Mark: %u %s", rec_len, plurality(rec_len, "byte", "bytes"));
- rm_tree = proto_item_add_subtree(rm_item, ett_krb_recordmark);
+ rm_tree = proto_tree_add_subtree_format(tree, tvb, start, 4, ett_krb_recordmark, NULL,
+ "Record Mark: %u %s", rec_len, plurality(rec_len, "byte", "bytes"));
proto_tree_add_boolean(rm_tree, hf_krb_rm_reserved, tvb, start, 4, krb_rm);
proto_tree_add_uint(rm_tree, hf_krb_rm_reclen, tvb, start, 4, krb_rm);
}
@@ -1955,6 +1957,8 @@ void proto_register_kerberos(void) {
static ei_register_info ei[] = {
{ &ei_kerberos_decrypted_keytype, { "kerberos.decrypted_keytype", PI_SECURITY, PI_CHAT, "Decryted keytype", EXPFILL }},
+ { &ei_kerberos_address, { "kerberos.address.unknown", PI_UNDECODED, PI_WARN, "KRB Address: I dont know how to parse this type of address yet", EXPFILL }},
+ { &ei_krb_gssapi_dlglen, { "kerberos.gssapi.dlglen.error", PI_MALFORMED, PI_ERROR, "DlgLen is not the same as number of bytes remaining", EXPFILL }},
};
expert_module_t* expert_krb;
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf
index f4938c5622..4e4623badf 100644
--- a/asn1/ldap/ldap.cnf
+++ b/asn1/ldap/ldap.cnf
@@ -794,19 +794,19 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
ett_ldap_DirSyncFlagsSubEntry, NULL, "%s: 0x%08x", hfinfo->name, val);
if (val & 0x1) {
- proto_tree_add_text(subtree, tvb, otheroffset+1, len, "Flag Object_Security");
+ proto_tree_add_boolean(subtree, hf_ldap_object_security_flag, tvb, otheroffset+1, len, TRUE);
}
if (val & 0x800) {
- proto_tree_add_text(subtree, tvb, otheroffset+1, len, "Flag Ancestor_First");
+ proto_tree_add_boolean(subtree, hf_ldap_ancestor_first_flag, tvb, otheroffset+1, len, TRUE);
}
if (val & 0x2000) {
- proto_tree_add_text(subtree, tvb, otheroffset+1, len, "Flag Public_Data_Only");
+ proto_tree_add_boolean(subtree, hf_ldap_public_data_only_flag, tvb, otheroffset+1, len, TRUE);
}
if (val & 0x80000000) {
- proto_tree_add_text(subtree, tvb, otheroffset+1, len, "Flag Incremental_Value");
+ proto_tree_add_boolean(subtree, hf_ldap_incremental_value_flag, tvb, otheroffset+1, len, TRUE);
}
} else {
- proto_tree_add_text(tree, tvb, otheroffset+len, len, "%s: 0", hfinfo->name);
+ proto_tree_add_uint(tree, hf_index, tvb, otheroffset+len, len, 0);
}
#.FN_BODY SearchResultReference
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c
index 597d66d6d0..06b13dcfd8 100644
--- a/asn1/ldap/packet-ldap-template.c
+++ b/asn1/ldap/packet-ldap-template.c
@@ -186,6 +186,12 @@ static int hf_ldap_AccessMask_ADS_DELETE_TREE = -1;
static int hf_ldap_AccessMask_ADS_LIST_OBJECT = -1;
static int hf_ldap_AccessMask_ADS_CONTROL_ACCESS = -1;
static int hf_ldap_LDAPMessage_PDU = -1;
+static int hf_ldap_object_security_flag = -1;
+static int hf_ldap_ancestor_first_flag = -1;
+static int hf_ldap_public_data_only_flag = -1;
+static int hf_ldap_incremental_value_flag = -1;
+static int hf_ldap_oid = -1;
+static int hf_ldap_gssapi_encrypted_payload = -1;
#include "packet-ldap-hf.c"
@@ -1269,12 +1275,7 @@ static void
sasl_len - ver_len,
plurality(sasl_len - ver_len, "", "s"));
- if (sasl_tree) {
- proto_tree_add_text(sasl_tree, gssapi_tvb, ver_len, -1,
- "GSS-API Encrypted payload (%d byte%s)",
- sasl_len - ver_len,
- plurality(sasl_len - ver_len, "", "s"));
- }
+ proto_tree_add_item(sasl_tree, hf_ldap_gssapi_encrypted_payload, gssapi_tvb, ver_len, -1, ENC_NA);
}
}
} else {
@@ -1676,58 +1677,21 @@ dissect_ldap_oid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
oidname=oid_resolved_from_string(oid);
if(oidname){
- proto_tree_add_text(tree, tvb, 0, tvb_captured_length(tvb), "OID: %s (%s)",oid,oidname);
+ proto_tree_add_string_format_value(tree, hf_ldap_oid, tvb, 0, tvb_captured_length(tvb), oid, "%s (%s)",oid,oidname);
} else {
- proto_tree_add_text(tree, tvb, 0, tvb_captured_length(tvb), "OID: %s",oid);
+ proto_tree_add_string(tree, hf_ldap_oid, tvb, 0, tvb_captured_length(tvb), oid);
}
}
#define LDAP_ACCESSMASK_ADS_CREATE_CHILD 0x00000001
-static const true_false_string ldap_AccessMask_ADS_CREATE_CHILD_tfs = {
- "ADS CREATE CHILD is SET",
- "Ads create child is NOT set",
-};
-
#define LDAP_ACCESSMASK_ADS_DELETE_CHILD 0x00000002
-static const true_false_string ldap_AccessMask_ADS_DELETE_CHILD_tfs = {
- "ADS DELETE CHILD is SET",
- "Ads delete child is NOT set",
-};
#define LDAP_ACCESSMASK_ADS_LIST 0x00000004
-static const true_false_string ldap_AccessMask_ADS_LIST_tfs = {
- "ADS LIST is SET",
- "Ads list is NOT set",
-};
#define LDAP_ACCESSMASK_ADS_SELF_WRITE 0x00000008
-static const true_false_string ldap_AccessMask_ADS_SELF_WRITE_tfs = {
- "ADS SELF WRITE is SET",
- "Ads self write is NOT set",
-};
#define LDAP_ACCESSMASK_ADS_READ_PROP 0x00000010
-static const true_false_string ldap_AccessMask_ADS_READ_PROP_tfs = {
- "ADS READ PROP is SET",
- "Ads read prop is NOT set",
-};
#define LDAP_ACCESSMASK_ADS_WRITE_PROP 0x00000020
-static const true_false_string ldap_AccessMask_ADS_WRITE_PROP_tfs = {
- "ADS WRITE PROP is SET",
- "Ads write prop is NOT set",
-};
#define LDAP_ACCESSMASK_ADS_DELETE_TREE 0x00000040
-static const true_false_string ldap_AccessMask_ADS_DELETE_TREE_tfs = {
- "ADS DELETE TREE is SET",
- "Ads delete tree is NOT set",
-};
#define LDAP_ACCESSMASK_ADS_LIST_OBJECT 0x00000080
-static const true_false_string ldap_AccessMask_ADS_LIST_OBJECT_tfs = {
- "ADS LIST OBJECT is SET",
- "Ads list object is NOT set",
-};
#define LDAP_ACCESSMASK_ADS_CONTROL_ACCESS 0x00000100
-static const true_false_string ldap_AccessMask_ADS_CONTROL_ACCESS_tfs = {
- "ADS CONTROL ACCESS is SET",
- "Ads control access is NOT set",
-};
static void
ldap_specific_rights(tvbuff_t *tvb, gint offset, proto_tree *tree, guint32 access)
@@ -2208,35 +2172,55 @@ void proto_register_ldap(void) {
NULL, 0, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_CREATE_CHILD,
- { "Create Child", "ldap.AccessMask.ADS_CREATE_CHILD", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_CREATE_CHILD_tfs), LDAP_ACCESSMASK_ADS_CREATE_CHILD, NULL, HFILL }},
+ { "Ads Create Child", "ldap.AccessMask.ADS_CREATE_CHILD", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_CREATE_CHILD, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_DELETE_CHILD,
- { "Delete Child", "ldap.AccessMask.ADS_DELETE_CHILD", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_DELETE_CHILD_tfs), LDAP_ACCESSMASK_ADS_DELETE_CHILD, NULL, HFILL }},
+ { "Ads Delete Child", "ldap.AccessMask.ADS_DELETE_CHILD", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_DELETE_CHILD, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_LIST,
- { "List", "ldap.AccessMask.ADS_LIST", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_LIST_tfs), LDAP_ACCESSMASK_ADS_LIST, NULL, HFILL }},
+ { "Ads List", "ldap.AccessMask.ADS_LIST", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_LIST, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_SELF_WRITE,
- { "Self Write", "ldap.AccessMask.ADS_SELF_WRITE", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_SELF_WRITE_tfs), LDAP_ACCESSMASK_ADS_SELF_WRITE, NULL, HFILL }},
+ { "Ads Self Write", "ldap.AccessMask.ADS_SELF_WRITE", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_SELF_WRITE, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_READ_PROP,
- { "Read Prop", "ldap.AccessMask.ADS_READ_PROP", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_READ_PROP_tfs), LDAP_ACCESSMASK_ADS_READ_PROP, NULL, HFILL }},
+ { "Ads Read Prop", "ldap.AccessMask.ADS_READ_PROP", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_READ_PROP, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_WRITE_PROP,
- { "Write Prop", "ldap.AccessMask.ADS_WRITE_PROP", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_WRITE_PROP_tfs), LDAP_ACCESSMASK_ADS_WRITE_PROP, NULL, HFILL }},
+ { "Ads Write Prop", "ldap.AccessMask.ADS_WRITE_PROP", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_WRITE_PROP, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_DELETE_TREE,
- { "Delete Tree", "ldap.AccessMask.ADS_DELETE_TREE", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_DELETE_TREE_tfs), LDAP_ACCESSMASK_ADS_DELETE_TREE, NULL, HFILL }},
+ { "Ads Delete Tree", "ldap.AccessMask.ADS_DELETE_TREE", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_DELETE_TREE, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_LIST_OBJECT,
- { "List Object", "ldap.AccessMask.ADS_LIST_OBJECT", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_LIST_OBJECT_tfs), LDAP_ACCESSMASK_ADS_LIST_OBJECT, NULL, HFILL }},
+ { "Ads List Object", "ldap.AccessMask.ADS_LIST_OBJECT", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_LIST_OBJECT, NULL, HFILL }},
{ &hf_ldap_AccessMask_ADS_CONTROL_ACCESS,
- { "Control Access", "ldap.AccessMask.ADS_CONTROL_ACCESS", FT_BOOLEAN, 32, TFS(&ldap_AccessMask_ADS_CONTROL_ACCESS_tfs), LDAP_ACCESSMASK_ADS_CONTROL_ACCESS, NULL, HFILL }},
+ { "Ads Control Access", "ldap.AccessMask.ADS_CONTROL_ACCESS", FT_BOOLEAN, 32, TFS(&tfs_set_notset), LDAP_ACCESSMASK_ADS_CONTROL_ACCESS, NULL, HFILL }},
{ &hf_ldap_LDAPMessage_PDU,
{ "LDAPMessage", "ldap.LDAPMessage_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
+ { &hf_ldap_object_security_flag,
+ { "Flag Object_Security", "ldap.object_security_flag", FT_BOOLEAN, 32, NULL, 0x00000001, NULL, HFILL }},
+
+ { &hf_ldap_ancestor_first_flag,
+ { "Flag Ancestor_First", "ldap.ancestor_first_flag", FT_BOOLEAN, 32, NULL, 0x00000800, NULL, HFILL }},
+
+ { &hf_ldap_public_data_only_flag,
+ { "Flag Public_Data_Only", "ldap.public_data_only_flag", FT_BOOLEAN, 32, NULL, 0x00002000, NULL, HFILL }},
+
+ { &hf_ldap_incremental_value_flag,
+ { "Flag Incremental_Value", "ldap.incremental_value_flag", FT_BOOLEAN, 32, NULL, 0x80000000, NULL, HFILL }},
+
+ { &hf_ldap_oid,
+ { "OID", "ldap.oid", FT_STRING, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
+
+ { &hf_ldap_gssapi_encrypted_payload,
+ { "GSS-API Encrypted payload", "ldap.gssapi_encrypted_payload", FT_BYTES, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
+
#include "packet-ldap-hfarr.c"
};
diff --git a/asn1/lte-rrc/lte-rrc.cnf b/asn1/lte-rrc/lte-rrc.cnf
index f8e11dfa30..bf3d57f5d6 100644
--- a/asn1/lte-rrc/lte-rrc.cnf
+++ b/asn1/lte-rrc/lte-rrc.cnf
@@ -359,8 +359,8 @@ if(ue_cap_tvb){
bits = tvb_get_bits64(async_system_time_tvb, 0, 49, ENC_BIG_ENDIAN);
ts.secs = (time_t)((bits*8)/1228800) + 315964800; /* CDMA2000 epoch is 00:00:00 (midnight) UTC on 1980-01-06 */
ts.nsecs = (int)(((bits%153600)*8*1000000000)/1228800);
- proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, FALSE));
- proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_LOCAL, TRUE));
+ proto_tree_add_time(subtree, hf_lte_rrc_cdma_time, async_system_time_tvb, 0, -1, &ts);
+ proto_tree_add_time(subtree, hf_lte_rrc_local_time, async_system_time_tvb, 0, -1,&ts);
}
#.FN_BODY SystemTimeInfoCDMA2000/cdma-SystemTime/synchronousSystemTime VAL_PTR=&sync_system_time_tvb
@@ -376,8 +376,8 @@ if(ue_cap_tvb){
bits = tvb_get_bits64(sync_system_time_tvb, 0, 39, ENC_BIG_ENDIAN);
ts.secs = (time_t)(bits/100) + 315964800; /* CDMA2000 epoch is 00:00:00 (midnight) UTC on 1980-01-06 */
ts.nsecs = (int)(bits%100)*10000000;
- proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, FALSE));
- proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_LOCAL, TRUE));
+ proto_tree_add_time(subtree, hf_lte_rrc_cdma_time, sync_system_time_tvb, 0, -1, &ts);
+ proto_tree_add_time(subtree, hf_lte_rrc_local_time, sync_system_time_tvb, 0, -1, &ts);
}
#.FN_BODY CellInfoUTRA-FDD-r9/utra-BCCH-Container-r9 VAL_PTR = &utra_bcch_cont_tvb
@@ -489,12 +489,13 @@ NeighCellConfig TYPE=FT_UINT8 DISPLAY=BASE_DEC STRINGS=VALS(lte_rrc_neighCellCon
%(DEFAULT_BODY)s
#.FN_FTR AbsoluteTimeInfo-r10
if (abs_time_info_tvb) {
- const gchar *str;
+ const gchar *str, *hf_str;
proto_tree *subtree;
subtree = proto_item_add_subtree(actx->created_item, ett_lte_rrc_absTimeInfo);
str = tvb_bcd_dig_to_wmem_packet_str(abs_time_info_tvb, 0, 6, NULL, FALSE);
- proto_tree_add_text(subtree, abs_time_info_tvb, 0, 6, "%c%c-%c%c-%c%c %c%c:%c%c:%c%c", str[0], str[1],
+ hf_str = wmem_strdup_printf(wmem_packet_scope(), "%c%c-%c%c-%c%c %c%c:%c%c:%c%c", str[0], str[1],
str[2], str[3], str[4], str[5], str[6], str[7], str[8], str[9], str[10], str[11]);
+ proto_tree_add_string(subtree, hf_lte_rrc_absolute_time, abs_time_info_tvb, 0, 6, hf_str);
}
#.TYPE_ATTR
@@ -687,10 +688,8 @@ SystemInformationBlockType16-r11/timeInfo-r11/timeInfoUTC-r11 TYPE = FT_UINT64
subtree = proto_item_add_subtree(actx->created_item, ett_lte_rrc_timeInfo);
ts.secs = (time_t)(timeInfo/100)-2208988800U; /* epoch is 00:00:00 (midnight) UTC on 1900-01-01 */
ts.nsecs = (int)(timeInfo%100)*10000000;
- proto_tree_add_text(subtree, tvb, old_offset>>3, (old_offset&0x07) ? 6 : 5,
- "UTC time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, FALSE));
- proto_tree_add_text(subtree, tvb, old_offset>>3, (old_offset&0x07) ? 6 : 5,
- "Local time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_LOCAL, TRUE));
+ proto_tree_add_time(subtree, hf_lte_rrc_utc_time, tvb, old_offset>>3, (old_offset&0x07) ? 6 : 5, &ts);
+ proto_tree_add_time(subtree, hf_lte_rrc_local_time, tvb, old_offset>>3, (old_offset&0x07) ? 6 : 5, &ts);
#.FN_BODY RRCConnectionReject-r8-IEs/waitTime
%(DEFAULT_BODY)s
diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c
index 2b2bd33da3..7f2916939b 100644
--- a/asn1/lte-rrc/packet-lte-rrc-template.c
+++ b/asn1/lte-rrc/packet-lte-rrc-template.c
@@ -189,6 +189,10 @@ static int hf_lte_rrc_interBandTDD_CA_WithDifferentConfig_bit1 = -1;
static int hf_lte_rrc_interBandTDD_CA_WithDifferentConfig_bit2 = -1;
static int hf_lte_rrc_sr_config_periodicity = -1;
static int hf_lte_rrc_sr_config_subframe_offset = -1;
+static int hf_lte_rrc_cdma_time = -1;
+static int hf_lte_rrc_utc_time = -1;
+static int hf_lte_rrc_local_time = -1;
+static int hf_lte_rrc_absolute_time = -1;
/* Initialize the subtree pointers */
static int ett_lte_rrc = -1;
@@ -2832,6 +2836,22 @@ void proto_register_lte_rrc(void) {
{ "Subframe Offset", "lte-rrc.sr_SubframeOffset",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
+ { &hf_lte_rrc_cdma_time,
+ { "CDMA time", "lte-rrc.cdma_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_lte_rrc_utc_time,
+ { "UTC time", "lte-rrc.utc_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_lte_rrc_local_time,
+ { "Local time", "lte-rrc.local_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_lte_rrc_absolute_time,
+ { "Absolute time", "lte-rrc.absolute_time",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
};
/* List of subtrees */
diff --git a/asn1/mms/packet-mms-template.c b/asn1/mms/packet-mms-template.c
index 338d16ad2c..22fd240fd4 100644
--- a/asn1/mms/packet-mms-template.c
+++ b/asn1/mms/packet-mms-template.c
@@ -51,6 +51,7 @@ static gint ett_mms = -1;
static expert_field ei_mms_mal_timeofday_encoding = EI_INIT;
static expert_field ei_mms_mal_utctime_encoding = EI_INIT;
+static expert_field ei_mms_zero_pdu = EI_INIT;
#include "packet-mms-fn.c"
@@ -78,7 +79,7 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
old_offset=offset;
offset=dissect_mms_MMSpdu(FALSE, tvb, offset, &asn1_ctx , tree, -1);
if(offset == old_offset){
- proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte MMS PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_mms_zero_pdu, tvb, offset, -1);
break;
}
}
@@ -103,6 +104,7 @@ void proto_register_mms(void) {
static ei_register_info ei[] = {
{ &ei_mms_mal_timeofday_encoding, { "mms.malformed.timeofday_encoding", PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding", EXPFILL }},
{ &ei_mms_mal_utctime_encoding, { "mms.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding", EXPFILL }},
+ { &ei_mms_zero_pdu, { "mms.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte MMS PDU", EXPFILL }},
};
expert_module_t* expert_mms;
diff --git a/asn1/p1/packet-p1-template.c b/asn1/p1/packet-p1-template.c
index 63a5b8462d..4c5825adf8 100644
--- a/asn1/p1/packet-p1-template.c
+++ b/asn1/p1/packet-p1-template.c
@@ -78,6 +78,8 @@ static expert_field ei_p1_unknown_extension_attribute_type = EI_INIT;
static expert_field ei_p1_unknown_standard_extension = EI_INIT;
static expert_field ei_p1_unknown_built_in_content_type = EI_INIT;
static expert_field ei_p1_unknown_tokendata_type = EI_INIT;
+static expert_field ei_p1_unsupported_pdu = EI_INIT;
+static expert_field ei_p1_zero_pdu = EI_INIT;
/* Dissector tables */
static dissector_table_t p1_extension_dissector_table;
@@ -271,7 +273,7 @@ dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* dat
hf_p1_index = hf_p1_MTS_APDU_PDU;
break;
default:
- proto_tree_add_text(tree, tvb, offset, -1,"Unsupported P1 PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_p1_unsupported_pdu, tvb, offset, -1);
return tvb_captured_length(tvb);
}
@@ -281,7 +283,7 @@ dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* dat
old_offset=offset;
offset=(*p1_dissector)(FALSE, tvb, offset, &asn1_ctx , tree, hf_p1_index);
if(offset == old_offset){
- proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte P1 PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_p1_zero_pdu, tvb, offset, -1);
break;
}
}
@@ -335,6 +337,8 @@ void proto_register_p1(void) {
{ &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, "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 }},
+ { &ei_p1_unsupported_pdu, { "p1.unsupported_pdu", PI_UNDECODED, PI_WARN, "Unsupported P1 PDU", EXPFILL }},
+ { &ei_p1_zero_pdu, { "p1.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte P1 PDU", EXPFILL }},
};
expert_module_t* expert_p1;
diff --git a/asn1/pkcs12/packet-pkcs12-template.c b/asn1/pkcs12/packet-pkcs12-template.c
index 113b4fb046..bdfe126978 100644
--- a/asn1/pkcs12/packet-pkcs12-template.c
+++ b/asn1/pkcs12/packet-pkcs12-template.c
@@ -29,6 +29,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/oids.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
@@ -65,6 +66,9 @@ static int proto_pkcs12 = -1;
static int hf_pkcs12_X509Certificate_PDU = -1;
static gint ett_decrypted_pbe = -1;
+static expert_field ei_pkcs12_octet_string_expected = EI_INIT;
+
+
static const char *object_identifier_id = NULL;
static int iteration_count = 0;
static tvbuff_t *salt = NULL;
@@ -418,7 +422,7 @@ static void dissect_AuthenticatedSafe_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info
if((offset = strip_octet_string(tvb)) > 0)
dissect_pkcs12_AuthenticatedSafe(FALSE, tvb, offset, &asn1_ctx, tree, hf_pkcs12_AuthenticatedSafe_PDU);
else
- proto_tree_add_text(tree, tvb, 0, 1, "BER Error: OCTET STRING expected");
+ proto_tree_add_expert(tree, pinfo, &ei_pkcs12_octet_string_expected, tvb, 0, 1);
}
static void dissect_SafeContents_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -441,7 +445,7 @@ static void dissect_X509Certificate_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *
if((offset = strip_octet_string(tvb)) > 0)
dissect_x509af_Certificate(FALSE, tvb, offset, &asn1_ctx, tree, hf_pkcs12_X509Certificate_PDU);
else
- proto_tree_add_text(tree, tvb, 0, 1, "BER Error: OCTET STRING expected");
+ proto_tree_add_expert(tree, pinfo, &ei_pkcs12_octet_string_expected, tvb, 0, 1);
}
/*--- proto_register_pkcs12 ----------------------------------------------*/
@@ -461,7 +465,12 @@ void proto_register_pkcs12(void) {
&ett_decrypted_pbe,
#include "packet-pkcs12-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_pkcs12_octet_string_expected, { "pkcs12.octet_string_expected", PI_PROTOCOL, PI_WARN, "BER Error: OCTET STRING expected", EXPFILL }},
+ };
+
module_t *pkcs12_module;
+ expert_module_t* expert_pkcs12;
/* Register protocol */
proto_pkcs12 = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -469,6 +478,8 @@ void proto_register_pkcs12(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_pkcs12, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_pkcs12 = expert_register_protocol(proto_pkcs12);
+ expert_register_field_array(expert_pkcs12, ei, array_length(ei));
/* Register preferences */
pkcs12_module = prefs_register_protocol(proto_pkcs12, NULL);
diff --git a/asn1/pres/packet-pres-template.c b/asn1/pres/packet-pres-template.c
index 07dda48452..3b9a86a344 100644
--- a/asn1/pres/packet-pres-template.c
+++ b/asn1/pres/packet-pres-template.c
@@ -97,6 +97,8 @@ static gint ett_pres = -1;
#include "packet-pres-ett.c"
static expert_field ei_pres_dissector_not_available = EI_INIT;
+static expert_field ei_pres_wrong_spdu_type = EI_INIT;
+static expert_field ei_pres_invalid_offset = EI_INIT;
UAT_DEC_CB_DEF(pres_users, ctx_id, pres_user_t)
UAT_CSTRING_CB_DEF(pres_users, oid, pres_user_t)
@@ -238,14 +240,13 @@ dissect_ppdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, st
/* do we have spdu type from the session dissector? */
if( local_session == NULL ){
- proto_tree_add_text(tree, tvb, offset, -1,
- "Internal error:can't get spdu type from session dissector.");
+ proto_tree_add_expert(tree, pinfo, &ei_pres_wrong_spdu_type, tvb, offset, -1);
return 0;
}
session = local_session;
if(session->spdu_type == 0 ){
- proto_tree_add_text(tree, tvb, offset, -1,
+ proto_tree_add_expert_format(tree, pinfo, &ei_pres_wrong_spdu_type, tvb, offset, -1,
"Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
return 0;
}
@@ -305,8 +306,8 @@ dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
/* do we have at least 4 bytes */
if (!tvb_bytes_exist(tvb, 0, 4)){
if (session && session->spdu_type != SES_MAJOR_SYNC_POINT) {
- proto_tree_add_text(parent_tree, tvb, offset,
- tvb_reported_length_remaining(tvb,offset),"User data");
+ proto_tree_add_item(parent_tree, hf_pres_user_data, tvb, offset,
+ tvb_reported_length_remaining(tvb,offset), ENC_NA);
return 0; /* no, it isn't a presentation PDU */
}
}
@@ -348,8 +349,8 @@ dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
if (oid) {
call_ber_oid_callback (oid, tvb, offset, pinfo, parent_tree, session);
} else {
- proto_tree_add_text(parent_tree, tvb, offset,
- tvb_reported_length_remaining(tvb,offset),"User data");
+ proto_tree_add_item(parent_tree, hf_pres_user_data, tvb, offset,
+ tvb_reported_length_remaining(tvb,offset), ENC_NA);
}
return tvb_captured_length(tvb);
}
@@ -358,8 +359,8 @@ dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
old_offset = offset;
offset = dissect_ppdu(tvb, offset, pinfo, parent_tree, session);
if(offset <= old_offset){
- proto_tree_add_text(parent_tree, tvb, offset, -1,"Invalid offset");
- THROW(ReportedBoundsError);
+ proto_tree_add_expert(parent_tree, pinfo, &ei_pres_invalid_offset, tvb, offset, -1);
+ break;
}
}
@@ -393,7 +394,6 @@ void proto_register_pres(void) {
FT_UINT32, BASE_DEC, VALS(pres_Typed_data_type_vals), 0,
NULL, HFILL }},
-
#include "packet-pres-hfarr.c"
};
@@ -405,6 +405,8 @@ void proto_register_pres(void) {
static ei_register_info ei[] = {
{ &ei_pres_dissector_not_available, { "pres.dissector_not_available", PI_UNDECODED, PI_WARN, "Dissector is not available", EXPFILL }},
+ { &ei_pres_wrong_spdu_type, { "pres.wrong_spdu_type", PI_PROTOCOL, PI_WARN, "Internal error:can't get spdu type from session dissector", EXPFILL }},
+ { &ei_pres_invalid_offset, { "pres.invalid_offset", PI_MALFORMED, PI_ERROR, "Internal error:can't get spdu type from session dissector", EXPFILL }},
};
static uat_field_t users_flds[] = {
diff --git a/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c
index 8fe66eac00..e1cf733d6d 100644
--- a/asn1/q932/packet-q932-template.c
+++ b/asn1/q932/packet-q932-template.c
@@ -24,6 +24,7 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/strutil.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
@@ -51,6 +52,12 @@ static gint ett_q932 = -1;
static gint ett_q932_ie = -1;
#include "packet-q932-ett.c"
+static expert_field ei_q932_dse_not_supported = EI_INIT;
+static expert_field ei_q932_acse_not_supported = EI_INIT;
+static expert_field ei_q932_unknown_component = EI_INIT;
+static expert_field ei_q932_asn1_encoded = EI_INIT;
+
+
/* Preferences */
/* ROSE context */
@@ -179,12 +186,12 @@ dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
case 17 : /* abort */
offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL);
offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL);
- proto_tree_add_text(tree, tvb, offset, len, "DSE APDU (not supported)");
+ proto_tree_add_expert(tree, pinfo, &ei_q932_dse_not_supported, tvb, offset, len);
break;
default:
offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL);
offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL);
- proto_tree_add_text(tree, tvb, offset, len, "Unknown Component");
+ proto_tree_add_expert(tree, pinfo, &ei_q932_unknown_component, tvb, offset, len);
}
break;
case BER_CLASS_APP:
@@ -197,18 +204,18 @@ dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
case 4 : /* abrt */
offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL);
offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL);
- proto_tree_add_text(tree, tvb, offset, len, "ACSE APDU (not supported)");
+ proto_tree_add_expert(tree, pinfo, &ei_q932_acse_not_supported, tvb, offset, len);
break;
default:
offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL);
offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL);
- proto_tree_add_text(tree, tvb, offset, len, "Unknown Component");
+ proto_tree_add_expert(tree, pinfo, &ei_q932_unknown_component, tvb, offset, len);
}
break;
default:
offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL);
offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL);
- proto_tree_add_text(tree, tvb, offset, len, "Unknown Component");
+ proto_tree_add_expert(tree, pinfo, &ei_q932_unknown_component, tvb, offset, len);
}
offset = eoffset;
}
@@ -216,10 +223,11 @@ dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
/*--- dissect_q932_ni_ie -------------------------------------------------------*/
static void
-dissect_q932_ni_ie(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int length) {
+dissect_q932_ni_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) {
int remain = length;
guint8 octet = 0;
guint32 value = 0;
+ proto_item* ti;
while ((remain > 0) && !(octet & 0x80)) {
octet = tvb_get_guint8(tvb, offset++);
@@ -227,10 +235,10 @@ dissect_q932_ni_ie(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
value <<= 7;
value |= octet & 0x7F;
}
- proto_tree_add_uint(tree, hf_q932_nd, tvb, offset - (length - remain), length - remain, value);
+ ti = proto_tree_add_uint(tree, hf_q932_nd, tvb, offset - (length - remain), length - remain, value);
if (remain > 0) {
- proto_tree_add_text(tree, tvb, offset - remain, remain, "ASN.1 Encoded Data Structure(NOT IMPLEMENTED): %s", tvb_bytes_to_ep_str(tvb, offset - remain, remain));
+ expert_add_info(pinfo, ti, &ei_q932_asn1_encoded);
}
}
@@ -308,7 +316,15 @@ void proto_register_q932(void) {
#include "packet-q932-ettarr.c"
};
- module_t *q932_module;
+ static ei_register_info ei[] = {
+ { &ei_q932_dse_not_supported, { "q932.dse_not_supported", PI_UNDECODED, PI_WARN, "DSE APDU (not supported)", EXPFILL }},
+ { &ei_q932_acse_not_supported, { "q932.acse_not_supported", PI_UNDECODED, PI_WARN, "ACSE APDU (not supported)", EXPFILL }},
+ { &ei_q932_unknown_component, { "q932.unknown_component", PI_UNDECODED, PI_WARN, "Unknown Component", EXPFILL }},
+ { &ei_q932_asn1_encoded, { "q932.asn1_encoded", PI_UNDECODED, PI_WARN, "ASN.1 Encoded Data Structure(NOT IMPLEMENTED)", EXPFILL }},
+ };
+
+ module_t *q932_module;
+ expert_module_t* expert_q932;
static const enum_val_t facility_encoding[] = {
{"Facility as QSIG", "Dissect facility as QSIG", 0},
@@ -323,6 +339,8 @@ void proto_register_q932(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_q932, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_q932 = expert_register_protocol(proto_q932);
+ expert_register_field_array(expert_q932, ei, array_length(ei));
rose_ctx_init(&q932_rose_ctx);
diff --git a/asn1/qsig/packet-qsig-template.c b/asn1/qsig/packet-qsig-template.c
index cad737acff..304ab88d02 100644
--- a/asn1/qsig/packet-qsig-template.c
+++ b/asn1/qsig/packet-qsig-template.c
@@ -24,6 +24,7 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/strutil.h>
#include <epan/asn1.h>
@@ -308,6 +309,10 @@ static gint ett_qsig_unknown_extension = -1;
#include "packet-qsig-ett.c"
static gint ett_cnq_PSS1InformationElement = -1;
+static expert_field ei_qsig_unsupported_arg_type = EI_INIT;
+static expert_field ei_qsig_unsupported_result_type = EI_INIT;
+static expert_field ei_qsig_unsupported_error_type = EI_INIT;
+
/* Preferences */
/* Subdissectors */
@@ -420,7 +425,7 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset = op_ptr->arg_pdu(tvb, pinfo, qsig_tree, NULL);
else
if (tvb_reported_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(qsig_tree, tvb, offset, -1, "UNSUPPORTED ARGUMENT TYPE (QSIG)");
+ proto_tree_add_expert(tree, pinfo, &ei_qsig_unsupported_error_type, tvb, offset, -1);
offset += tvb_captured_length_remaining(tvb, offset);
}
@@ -474,7 +479,7 @@ dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset = op_ptr->res_pdu(tvb, pinfo, qsig_tree, NULL);
else
if (tvb_reported_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(qsig_tree, tvb, offset, -1, "UNSUPPORTED RESULT TYPE (QSIG)");
+ proto_tree_add_expert(tree, pinfo, &ei_qsig_unsupported_result_type, tvb, offset, -1);
offset += tvb_captured_length_remaining(tvb, offset);
}
@@ -523,7 +528,7 @@ dissect_qsig_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset = err_ptr->err_pdu(tvb, pinfo, qsig_tree, NULL);
else
if (tvb_reported_length_remaining(tvb, offset) > 0) {
- proto_tree_add_text(qsig_tree, tvb, offset, -1, "UNSUPPORTED ERROR TYPE (QSIG)");
+ proto_tree_add_expert(tree, pinfo, &ei_qsig_unsupported_error_type, tvb, offset, -1);
offset += tvb_captured_length_remaining(tvb, offset);
}
@@ -668,12 +673,22 @@ void proto_register_qsig(void) {
&ett_cnq_PSS1InformationElement,
};
+ static ei_register_info ei[] = {
+ { &ei_qsig_unsupported_arg_type, { "qsig.unsupported.arg_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ARGUMENT TYPE (QSIG)", EXPFILL }},
+ { &ei_qsig_unsupported_result_type, { "qsig.unsupported.result_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED RESULT TYPE (QSIG)", EXPFILL }},
+ { &ei_qsig_unsupported_error_type, { "qsig.unsupported.error_type", PI_UNDECODED, PI_WARN, "UNSUPPORTED ERROR TYPE (QSIG)", EXPFILL }},
+ };
+
+ expert_module_t* expert_qsig;
+
/* Register protocol and dissector */
proto_qsig = proto_register_protocol(PNAME, PSNAME, PFNAME);
/* Register fields and subtrees */
proto_register_field_array(proto_qsig, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_qsig = expert_register_protocol(proto_qsig);
+ expert_register_field_array(expert_qsig, ei, array_length(ei));
/* Register dissector tables */
extension_dissector_table = register_dissector_table("qsig.ext", "QSIG Extension", FT_STRING, BASE_NONE);
diff --git a/asn1/ros/packet-ros-template.c b/asn1/ros/packet-ros-template.c
index 849b4346f9..cdfa73e3cb 100644
--- a/asn1/ros/packet-ros-template.c
+++ b/asn1/ros/packet-ros-template.c
@@ -75,6 +75,15 @@ static int hf_ros_time = -1;
/* Initialize the subtree pointers */
static gint ett_ros = -1;
+static gint ett_ros_unknown = -1;
+static gint ett_ros_invoke_argument = -1;
+static gint ett_ros_return_result = -1;
+static gint ett_ros_bind_invoke = -1;
+static gint ett_ros_bind_result = -1;
+static gint ett_ros_bind_error = -1;
+static gint ett_ros_unbind_invoke = -1;
+static gint ett_ros_unbind_result = -1;
+static gint ett_ros_unbind_error = -1;
#include "packet-ros-ett.c"
static expert_field ei_ros_dissector_oid_not_implemented = EI_INIT;
@@ -84,7 +93,6 @@ static dissector_table_t ros_oid_dissector_table=NULL;
static GHashTable *oid_table=NULL;
static GHashTable *protocol_table=NULL;
-static gint ett_ros_unknown = -1;
void
register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, gboolean uses_rtse)
@@ -483,6 +491,15 @@ void proto_register_ros(void) {
static gint *ett[] = {
&ett_ros,
&ett_ros_unknown,
+ &ett_ros_invoke_argument,
+ &ett_ros_return_result,
+ &ett_ros_bind_invoke,
+ &ett_ros_bind_result,
+ &ett_ros_bind_error,
+ &ett_ros_unbind_invoke,
+ &ett_ros_unbind_result,
+ &ett_ros_unbind_error,
+
#include "packet-ros-ettarr.c"
};
diff --git a/asn1/ros/ros.cnf b/asn1/ros/ros.cnf
index e6ca8bd1e3..8511a8e20b 100644
--- a/asn1/ros/ros.cnf
+++ b/asn1/ros/ros.cnf
@@ -28,12 +28,13 @@ Reject/problem/returnResult rejectResult
#.FN_BODY Invoke/argument
char *oid;
+ proto_tree* subtree;
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "invoke argument");
+ subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_ros_invoke_argument, NULL, "invoke argument");
- ros_match_call_response(tvb, actx->pinfo, tree, invokeid, TRUE);
+ ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, TRUE);
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
@@ -45,12 +46,13 @@ Reject/problem/returnResult rejectResult
#.FN_BODY ReturnResult/result/result
char *oid;
+ proto_tree* subtree;
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "return result");
+ subtree = proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_return_result, NULL, "return result");
- ros_match_call_response(tvb, actx->pinfo, tree, invokeid, FALSE);
+ ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, FALSE);
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
@@ -62,12 +64,13 @@ Reject/problem/returnResult rejectResult
#.FN_BODY ReturnError/parameter
char *oid;
+ proto_tree* subtree;
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "return result");
+ subtree = proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_return_result, NULL, "return result");
- ros_match_call_response(tvb, actx->pinfo, tree, invokeid, FALSE);
+ ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, FALSE);
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
@@ -82,7 +85,7 @@ Reject/problem/returnResult rejectResult
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "bind-invoke");
+ proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_result, NULL, "bind-invoke");
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
@@ -95,7 +98,7 @@ Reject/problem/returnResult rejectResult
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "bind-result");
+ proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_result, NULL, "bind-result");
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
@@ -108,7 +111,7 @@ Reject/problem/returnResult rejectResult
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "bind-error");
+ proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_error, NULL, "bind-error");
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
@@ -122,7 +125,7 @@ Reject/problem/returnResult rejectResult
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "unbind-invoke");
+ proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_invoke, NULL, "unbind-invoke");
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
@@ -136,7 +139,7 @@ Reject/problem/returnResult rejectResult
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "unbind-result");
+ proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_result, NULL, "unbind-result");
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
@@ -149,7 +152,7 @@ Reject/problem/returnResult rejectResult
struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;
/* not sure what the length should be - -1 for now */
- proto_tree_add_text(tree, tvb, offset,-1, "unbind-error");
+ proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_error, NULL, "unbind-error");
if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
/* this should be ROS! */
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 971c90bb7b..838e1fac70 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -229,6 +229,7 @@ static int hf_snmp_objectname = -1;
static int hf_snmp_scalar_instance_index = -1;
static int hf_snmp_var_bind_str = -1;
+static int hf_snmp_agentid_trailer = -1;
#include "packet-snmp-hf.c"
@@ -278,6 +279,9 @@ static expert_field ei_snmp_integral_value0 = EI_INIT;
static expert_field ei_snmp_missing_mib = EI_INIT;
static expert_field ei_snmp_varbind_wrong_length_value = EI_INIT;
static expert_field ei_snmp_varbind_wrong_class_tag = EI_INIT;
+static expert_field ei_snmp_rfc1910_non_conformant = EI_INIT;
+static expert_field ei_snmp_rfc3411_non_conformant = EI_INIT;
+static expert_field ei_snmp_version_unknown = EI_INIT;
static const true_false_string auth_flags = {
"OK",
@@ -681,14 +685,12 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,ENC_NA);
goto set_label;
} else {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"A scalar should have one instance sub-id this one has none");
- expert_add_info(actx->pinfo, pi, &ei_snmp_no_instance_subid);
+ proto_tree_add_expert(pt_name,actx->pinfo,&ei_snmp_no_instance_subid,tvb,0,0);
oid_info_is_ok = FALSE;
goto indexing_done;
}
} else {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"A scalar should have only one instance sub-id this has: %d",oid_left);
- expert_add_info(actx->pinfo, pi, &ei_snmp_wrong_num_of_subids);
+ proto_tree_add_expert_format(pt_name,actx->pinfo,&ei_snmp_wrong_num_of_subids,tvb,0,0,"A scalar should have only one instance sub-id this has: %d",oid_left);
oid_info_is_ok = FALSE;
goto indexing_done;
}
@@ -711,16 +713,14 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
guint suboid_len;
if (key_start >= oid_matched+oid_left) {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index sub-oid shorter than expected");
- expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_too_short);
+ proto_tree_add_expert(pt_name,actx->pinfo,&ei_snmp_index_suboid_too_short,tvb,0,0);
oid_info_is_ok = FALSE;
goto indexing_done;
}
switch(k->key_type) {
case OID_KEY_TYPE_WRONG: {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"OID instaces not handled, if you want this implemented please contact the wireshark developers");
- expert_add_info(actx->pinfo, pi, &ei_snmp_unimplemented_instance_index);
+ proto_tree_add_expert(pt_name,actx->pinfo,&ei_snmp_unimplemented_instance_index,tvb,0,0);
oid_info_is_ok = FALSE;
goto indexing_done;
}
@@ -751,15 +751,13 @@ show_oid_index:
suboid = &(subids[key_start]);
if( suboid_len == 0 ) {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"an index sub-oid OID cannot be 0 bytes long!");
- expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_len0);
+ proto_tree_add_expert(pt_name,actx->pinfo,&ei_snmp_index_suboid_len0,tvb,0,0);
oid_info_is_ok = FALSE;
goto indexing_done;
}
if( key_len < suboid_len ) {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index sub-oid should not be longer than remaining oid size");
- expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_too_long);
+ proto_tree_add_expert(pt_name,actx->pinfo,&ei_snmp_index_suboid_too_long,tvb,0,0);
oid_info_is_ok = FALSE;
goto indexing_done;
}
@@ -805,8 +803,7 @@ show_oid_index:
}
if( key_len < buf_len ) {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index string should not be longer than remaining oid size");
- expert_add_info(actx->pinfo, pi, &ei_snmp_index_string_too_long);
+ proto_tree_add_expert(pt_name,actx->pinfo,&ei_snmp_index_string_too_long,tvb,0,0);
oid_info_is_ok = FALSE;
goto indexing_done;
}
@@ -847,20 +844,17 @@ show_oid_index:
}
goto indexing_done;
} else {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"We do not know how to handle this OID, if you want this implemented please contact the wireshark developers");
- expert_add_info(actx->pinfo, pi, &ei_snmp_unimplemented_instance_index);
+ proto_tree_add_expert(pt_name,actx->pinfo,&ei_snmp_unimplemented_instance_index,tvb,0,0);
oid_info_is_ok = FALSE;
goto indexing_done;
}
} else {
- proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"The COLUMS's parent is not a ROW. This is a BUG! please contact the wireshark developers.");
- expert_add_info(actx->pinfo, pi, &ei_snmp_column_parent_not_row);
+ proto_tree_add_expert(pt_name,actx->pinfo,&ei_snmp_column_parent_not_row,tvb,0,0);
oid_info_is_ok = FALSE;
goto indexing_done;
}
default: {
-/* proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"This kind OID should have no value");
- expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "This kind OID should have no value"); */
+/* proto_tree_add_expert (pt_name,actx->pinfo,PI_MALFORMED, PI_WARN,tvb,0,0,"This kind OID should have no value"); */
oid_info_is_ok = FALSE;
goto indexing_done;
}
@@ -981,8 +975,7 @@ indexing_done:
*/
if (value_len > 9 || tvb_get_guint8(tvb, value_offset) != 0) {
/* It is. Fail. */
- pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value too large");
- expert_add_info(actx->pinfo, pi_value, &ei_snmp_uint_too_large);
+ proto_tree_add_expert_format(pt_varbind,actx->pinfo,&ei_snmp_uint_too_large,tvb,value_offset,value_len,"Integral value too large");
goto already_added;
}
/* Cheat and skip the leading 0 byte */
@@ -992,8 +985,7 @@ indexing_done:
/*
* For now, just reject these.
*/
- pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value too large or too small");
- expert_add_info(actx->pinfo, pi_value, &ei_snmp_int_too_large);
+ proto_tree_add_expert_format(pt_varbind,actx->pinfo,&ei_snmp_int_too_large,tvb,value_offset,value_len,"Integral value too large or too small");
goto already_added;
}
} else if (value_len == 0) {
@@ -1007,8 +999,7 @@ indexing_done:
*/
header_field_info *hfinfo = proto_registrar_get_nth(hfid);
if (hfinfo->type == FT_UINT64 || hfinfo->type == FT_INT64) {
- pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value is zero-length");
- expert_add_info(actx->pinfo, pi_value, &ei_snmp_integral_value0);
+ proto_tree_add_expert_format(pt_varbind,actx->pinfo,&ei_snmp_integral_value0,tvb,value_offset,value_len,"Integral value is zero-length");
goto already_added;
}
}
@@ -1132,7 +1123,7 @@ static const value_string snmp_engineid_cisco_type_vals[] = {
* or historic RFC 1910 (AgentID)
*/
int
-dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
+dissect_snmp_engineid(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int len)
{
proto_item *item = NULL;
guint8 conformance, format;
@@ -1159,13 +1150,12 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_RFC1910:
/* 12-byte AgentID w/ 8-byte trailer */
if (len_remain==8) {
- proto_tree_add_text(tree, tvb, offset, 8, "AgentID Trailer: 0x%s",
- tvb_bytes_to_ep_str(tvb, offset, 8));
- offset+=8;
- len_remain-=8;
+ proto_tree_add_item(tree, hf_snmp_agentid_trailer, tvb, offset, 8, ENC_NA);
+ offset+=8;
+ len_remain-=8;
} else {
- proto_tree_add_text(tree, tvb, offset, len_remain, "<Data not conforming to RFC1910>");
- return offset;
+ proto_tree_add_expert(tree, pinfo, &ei_snmp_rfc1910_non_conformant, tvb, offset, len_remain);
+ return offset;
}
break;
@@ -1250,7 +1240,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
}
if (len_remain>0) {
- proto_tree_add_text(tree, tvb, offset, len_remain, "<Data not conforming to RFC3411>");
+ proto_tree_add_expert(tree, pinfo, &ei_snmp_rfc3411_non_conformant, tvb, offset, len_remain);
offset+=len_remain;
}
return offset;
@@ -2018,11 +2008,9 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
col_set_str(pinfo->cinfo, COL_PROTOCOL,
proto_get_protocol_short_name(find_protocol_by_id(proto)));
- if (tree) {
- item = proto_tree_add_item(tree, proto, tvb, start_offset,
+ item = proto_tree_add_item(tree, proto, tvb, start_offset,
message_length, ENC_BIG_ENDIAN);
- snmp_tree = proto_item_add_subtree(item, ett);
- }
+ snmp_tree = proto_item_add_subtree(item, ett);
switch (version) {
case 0: /* v1 */
@@ -2042,7 +2030,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
* if this is SNMP-over-TCP, our caller thinks there's
* nothing left to dissect.
*/
- proto_tree_add_text(snmp_tree, tvb, offset, -1,"Unknown version");
+ expert_add_info(pinfo, item, &ei_snmp_version_unknown);
return length_remaining;
break;
}
@@ -2442,6 +2430,9 @@ void proto_register_snmp(void) {
{ &hf_snmp_var_bind_str, {
"Variable-binding-string", "snmp.var-bind_str", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
+ { &hf_snmp_agentid_trailer, {
+ "AgentID Trailer", "snmp.agentid_trailer", FT_BYTES, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
#include "packet-snmp-hfarr.c"
@@ -2464,7 +2455,7 @@ void proto_register_snmp(void) {
};
static ei_register_info ei[] = {
{ &ei_snmp_failed_decrypted_data_pdu, { "snmp.failed_decrypted_data_pdu", PI_MALFORMED, PI_WARN, "Failed to decrypt encryptedPDU", EXPFILL }},
- { &ei_snmp_decrypted_data_bad_formatted, { "snmp.decrypted_data_bad_formatted", PI_MALFORMED, PI_WARN, "Decrypted data not formatted as expected", EXPFILL }},
+ { &ei_snmp_decrypted_data_bad_formatted, { "snmp.decrypted_data_bad_formatted", PI_MALFORMED, PI_WARN, "Decrypted data not formatted as expected, wrong key?", EXPFILL }},
{ &ei_snmp_verify_authentication_error, { "snmp.verify_authentication_error", PI_MALFORMED, PI_ERROR, "Error while verifying Message authenticity", EXPFILL }},
{ &ei_snmp_authentication_ok, { "snmp.authentication_ok", PI_CHECKSUM, PI_CHAT, "SNMP Authentication OK", EXPFILL }},
{ &ei_snmp_authentication_error, { "snmp.authentication_error", PI_CHECKSUM, PI_WARN, "SNMP Authentication Error", EXPFILL }},
@@ -2479,10 +2470,10 @@ void proto_register_snmp(void) {
{ &ei_snmp_no_instance_subid, { "snmp.no_instance_subid", PI_MALFORMED, PI_WARN, "No instance sub-id in scalar value", EXPFILL }},
{ &ei_snmp_wrong_num_of_subids, { "snmp.wrong_num_of_subids", PI_MALFORMED, PI_WARN, "Wrong number of instance sub-ids in scalar value", EXPFILL }},
{ &ei_snmp_index_suboid_too_short, { "snmp.index_suboid_too_short", PI_MALFORMED, PI_WARN, "index sub-oid shorter than expected", EXPFILL }},
- { &ei_snmp_unimplemented_instance_index, { "snmp.unimplemented_instance_index", PI_UNDECODED, PI_WARN, "Unimplemented instance index", EXPFILL }},
- { &ei_snmp_index_suboid_len0, { "snmp.ndex_suboid_len0", PI_MALFORMED, PI_WARN, "index sub-oid OID with len=0", EXPFILL }},
- { &ei_snmp_index_suboid_too_long, { "snmp.index_suboid_too_long", PI_MALFORMED, PI_WARN, "index sub-oid longer than remaining oid size", EXPFILL }},
- { &ei_snmp_index_string_too_long, { "snmp.index_string_too_long", PI_MALFORMED, PI_WARN, "index string longer than remaining oid size", EXPFILL }},
+ { &ei_snmp_unimplemented_instance_index, { "snmp.unimplemented_instance_index", PI_UNDECODED, PI_WARN, "OID instaces not handled, if you want this implemented please contact the wireshark developers", EXPFILL }},
+ { &ei_snmp_index_suboid_len0, { "snmp.ndex_suboid_len0", PI_MALFORMED, PI_WARN, "an index sub-oid OID cannot be 0 bytes long!", EXPFILL }},
+ { &ei_snmp_index_suboid_too_long, { "snmp.index_suboid_too_long", PI_MALFORMED, PI_WARN, "index sub-oid should not be longer than remaining oid size", EXPFILL }},
+ { &ei_snmp_index_string_too_long, { "snmp.index_string_too_long", PI_MALFORMED, PI_WARN, "index string should not be longer than remaining oid size", EXPFILL }},
{ &ei_snmp_column_parent_not_row, { "snmp.column_parent_not_row", PI_MALFORMED, PI_ERROR, "COLUMS's parent is not a ROW", EXPFILL }},
{ &ei_snmp_uint_too_large, { "snmp.uint_too_large", PI_UNDECODED, PI_NOTE, "Unsigned integer value > 2^64 - 1", EXPFILL }},
{ &ei_snmp_int_too_large, { "snmp.int_too_large", PI_UNDECODED, PI_NOTE, "Signed integer value > 2^63 - 1 or <= -2^63", EXPFILL }},
@@ -2490,6 +2481,9 @@ void proto_register_snmp(void) {
{ &ei_snmp_missing_mib, { "snmp.missing_mib", PI_UNDECODED, PI_NOTE, "Unresolved value, Missing MIB", EXPFILL }},
{ &ei_snmp_varbind_wrong_length_value, { "snmp.varbind.wrong_length_value", PI_MALFORMED, PI_WARN, "Wrong length for SNMP VarBind/value", EXPFILL }},
{ &ei_snmp_varbind_wrong_class_tag, { "snmp.varbind.wrong_class_tag", PI_MALFORMED, PI_WARN, "Wrong class/tag for SNMP VarBind/value", EXPFILL }},
+ { &ei_snmp_rfc1910_non_conformant, { "snmp.rfc1910_non_conformant", PI_PROTOCOL, PI_WARN, "Data not conforming to RFC1910", EXPFILL }},
+ { &ei_snmp_rfc3411_non_conformant, { "snmp.rfc3411_non_conformant", PI_PROTOCOL, PI_WARN, "Data not conforming to RFC3411", EXPFILL }},
+ { &ei_snmp_version_unknown, { "snmp.version.unknown", PI_PROTOCOL, PI_WARN, "Unknown version", EXPFILL }},
};
diff --git a/asn1/snmp/packet-snmp-template.h b/asn1/snmp/packet-snmp-template.h
index aeb3824497..3ade802264 100644
--- a/asn1/snmp/packet-snmp-template.h
+++ b/asn1/snmp/packet-snmp-template.h
@@ -91,7 +91,7 @@ struct _snmp_usm_params_t {
*/
extern guint dissect_snmp_pdu(tvbuff_t *, int, packet_info *, proto_tree *tree,
int, gint, gboolean);
-extern int dissect_snmp_engineid(proto_tree *, tvbuff_t *, int, int);
+extern int dissect_snmp_engineid(proto_tree *, packet_info *, tvbuff_t *, int, int);
/*#include "packet-snmp-exp.h"*/
diff --git a/asn1/snmp/snmp.cnf b/asn1/snmp/snmp.cnf
index f30b6c1464..b0c342a69e 100644
--- a/asn1/snmp/snmp.cnf
+++ b/asn1/snmp/snmp.cnf
@@ -90,7 +90,7 @@ gint pdu_type=-1;
&usm_p.engine_tvb);
if (usm_p.engine_tvb) {
proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid);
- dissect_snmp_engineid(engine_tree, usm_p.engine_tvb, 0, tvb_length_remaining(usm_p.engine_tvb,0));
+ dissect_snmp_engineid(engine_tree, actx->pinfo, usm_p.engine_tvb, 0, tvb_length_remaining(usm_p.engine_tvb,0));
}
#.FN_BODY SnmpEngineID
@@ -100,7 +100,7 @@ gint pdu_type=-1;
&param_tvb);
if (param_tvb) {
proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid);
- dissect_snmp_engineid(engine_tree, param_tvb, 0, tvb_length_remaining(param_tvb,0));
+ dissect_snmp_engineid(engine_tree, actx->pinfo, param_tvb, 0, tvb_length_remaining(param_tvb,0));
}
#.FN_PARS UsmSecurityParameters/msgUserName
@@ -139,10 +139,7 @@ gint pdu_type=-1;
proto_tree* decrypted_tree;
if (! check_ScopedPdu(cleartext_tvb)) {
- proto_item* cause = proto_tree_add_text(encryptedpdu_tree, cleartext_tvb, 0, -1,
- "Decrypted data not formatted as expected, wrong key?");
-
- expert_add_info(actx->pinfo, cause, &ei_snmp_decrypted_data_bad_formatted);
+ proto_tree_add_expert(encryptedpdu_tree, actx->pinfo, &ei_snmp_decrypted_data_bad_formatted, cleartext_tvb, 0, -1);
col_set_str(actx->pinfo->cinfo, COL_INFO, "encryptedPDU: Decrypted data not formatted as expected");
diff --git a/asn1/spnego/packet-spnego-template.c b/asn1/spnego/packet-spnego-template.c
index 56d2610c1c..f0f80789ca 100644
--- a/asn1/spnego/packet-spnego-template.c
+++ b/asn1/spnego/packet-spnego-template.c
@@ -36,6 +36,7 @@
#include <wsutil/rc4.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include <epan/asn1.h>
#include "packet-dcerpc.h"
#include "packet-gssapi.h"
@@ -95,6 +96,9 @@ static gint ett_spnego_krb5_cfx_flags = -1;
#include "packet-spnego-ett.c"
+static expert_field ei_spnego_decrypted_keytype = EI_INIT;
+static expert_field ei_spnego_unknown_header = EI_INIT;
+
/*
* Unfortunately, we have to have forward declarations of thess,
* as the code generated by asn2wrs includes a call before the
@@ -262,7 +266,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
default:
- proto_tree_add_text(subtree, tvb, offset, 0,
+ proto_tree_add_expert_format(subtree, pinfo, &ei_spnego_unknown_header, tvb, offset, 0,
"Unknown header (class=%d, pc=%d, tag=%d)",
ber_class, pc, tag);
goto done;
@@ -567,7 +571,7 @@ decrypt_arcfour(packet_info *pinfo,
#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS)
static void
-decrypt_gssapi_krb_arcfour_wrap(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int keytype)
+decrypt_gssapi_krb_arcfour_wrap(proto_tree *tree _U_, packet_info *pinfo, tvbuff_t *tvb, int keytype)
{
int ret;
enc_key_t *ek;
@@ -613,7 +617,10 @@ decrypt_gssapi_krb_arcfour_wrap(proto_tree *tree, packet_info *pinfo, tvbuff_t *
ek->keytype
);
if (ret >= 0) {
- proto_tree_add_text(tree, NULL, 0, 0, "[Decrypted using: %s]", ek->key_origin);
+ expert_add_info_format(pinfo, NULL, &ei_spnego_decrypted_keytype,
+ "Decrypted keytype %d in frame %u using %s",
+ ek->keytype, pinfo->fd->num, ek->key_origin);
+
pinfo->gssapi_decrypted_tvb=tvb_new_child_real_data(tvb,
output_message_buffer,
ret, ret);
@@ -1414,6 +1421,13 @@ void proto_register_spnego(void) {
#include "packet-spnego-ettarr.c"
};
+ static ei_register_info ei[] = {
+ { &ei_spnego_decrypted_keytype, { "spnego.decrypted_keytype", PI_SECURITY, PI_CHAT, "Decryted keytype", EXPFILL }},
+ { &ei_spnego_unknown_header, { "spnego.unknown_header", PI_PROTOCOL, PI_WARN, "Unknown header", EXPFILL }},
+ };
+
+ expert_module_t* expert_spnego;
+
/* Register protocol */
proto_spnego = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -1429,6 +1443,8 @@ void proto_register_spnego(void) {
/* Register fields and subtrees */
proto_register_field_array(proto_spnego, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_spnego = expert_register_protocol(proto_spnego);
+ expert_register_field_array(expert_spnego, ei, array_length(ei));
}
diff --git a/asn1/sv/packet-sv-template.c b/asn1/sv/packet-sv-template.c
index 2af3318772..877034e6ab 100644
--- a/asn1/sv/packet-sv-template.c
+++ b/asn1/sv/packet-sv-template.c
@@ -108,6 +108,7 @@ static int ett_phsmeas_q = -1;
#include "packet-sv-ett.c"
static expert_field ei_sv_mal_utctime = EI_INIT;
+static expert_field ei_sv_zero_pdu = EI_INIT;
#if 0
static const value_string sv_q_validity_vals[] = {
@@ -228,7 +229,7 @@ dissect_sv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
old_offset = offset;
offset = dissect_sv_SampledValues(FALSE, tvb, offset, &asn1_ctx , tree, -1);
if (offset == old_offset) {
- proto_tree_add_text(tree, tvb, offset, -1, "Internal error, zero-byte SV PDU");
+ proto_tree_add_expert(tree, pinfo, &ei_sv_zero_pdu, tvb, offset, -1);
break;
}
}
@@ -314,6 +315,7 @@ void proto_register_sv(void) {
static ei_register_info ei[] = {
{ &ei_sv_mal_utctime, { "sv.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding", EXPFILL }},
+ { &ei_sv_zero_pdu, { "sv.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte SV PDU", EXPFILL }},
};
expert_module_t* expert_sv;
diff --git a/asn1/t38/packet-t38-template.c b/asn1/t38/packet-t38-template.c
index 40363bb83a..0a719463be 100644
--- a/asn1/t38/packet-t38-template.c
+++ b/asn1/t38/packet-t38-template.c
@@ -144,6 +144,8 @@ static gint ett_t38_setup = -1;
static gint ett_data_fragment = -1;
static gint ett_data_fragments = -1;
+static expert_field ei_t38_malformed = EI_INIT;
+
static gboolean primary_part = TRUE;
static guint32 seq_number = 0;
@@ -541,10 +543,8 @@ dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = dissect_UDPTLPacket_PDU(tvb, pinfo, tr, NULL);
if (tvb_length_remaining(tvb,offset)>0){
- if (tr){
- proto_tree_add_text(tr, tvb, offset, tvb_reported_length_remaining(tvb, offset),
+ proto_tree_add_expert_format(tr, pinfo, &ei_t38_malformed, tvb, offset, tvb_reported_length_remaining(tvb, offset),
"[MALFORMED PACKET or wrong preference settings]");
- }
col_append_str(pinfo->cinfo, COL_INFO, " [Malformed?]");
}
}
@@ -587,10 +587,8 @@ dissect_t38_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(tvb_length_remaining(tvb,offset)>0){
if(t38_tpkt_usage == T38_TPKT_ALWAYS){
- if(tr){
- proto_tree_add_text(tr, tvb, offset, tvb_reported_length_remaining(tvb, offset),
+ proto_tree_add_expert_format(tr, pinfo, &ei_t38_malformed, tvb, offset, tvb_reported_length_remaining(tvb, offset),
"[MALFORMED PACKET or wrong preference settings]");
- }
col_append_str(pinfo->cinfo, COL_INFO, " [Malformed?]");
break;
}else {
@@ -722,11 +720,18 @@ proto_register_t38(void)
&ett_data_fragments
};
+ static ei_register_info ei[] = {
+ { &ei_t38_malformed, { "t38.malformed", PI_MALFORMED, PI_ERROR, "Malformed packet", EXPFILL }},
+ };
+
module_t *t38_module;
+ expert_module_t* expert_t38;
proto_t38 = proto_register_protocol("T.38", "T.38", "t38");
proto_register_field_array(proto_t38, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_t38 = expert_register_protocol(proto_t38);
+ expert_register_field_array(expert_t38, ei, array_length(ei));
register_dissector("t38", dissect_t38, proto_t38);
/* Init reassemble tables for HDLC */
diff --git a/asn1/t38/t38.cnf b/asn1/t38/t38.cnf
index 719d1d0d3c..3a0ab1f7f8 100644
--- a/asn1/t38/t38.cnf
+++ b/asn1/t38/t38.cnf
@@ -129,10 +129,8 @@ VAL_PTR=&Data_Field_field_type_value
if (new_tvb) call_dissector_with_data((t30_hdlc_handle) ? t30_hdlc_handle : data_handle, new_tvb, actx->pinfo, tree, t38_info);
}
} else {
- if(tree){
- proto_tree_add_text(tree, tvb, offset, tvb_reported_length_remaining(tvb, offset),
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_t38_malformed, tvb, offset, tvb_reported_length_remaining(tvb, offset),
"[RECEIVED END OF FRAGMENT W/OUT ANY FRAGMENT DATA]");
- }
col_append_str(actx->pinfo->cinfo, COL_INFO, " [Malformed?]");
actx->pinfo->fragmented = save_fragmented;
}
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index 815242f6ac..90bd10724a 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -50,6 +50,7 @@ static int hf_tcap_tag = -1;
static int hf_tcap_length = -1;
static int hf_tcap_data = -1;
static int hf_tcap_tid = -1;
+static int hf_tcap_constructor_eoc=-1;
int hf_tcapsrt_SessionId=-1;
int hf_tcapsrt_Duplicate=-1;
@@ -2091,12 +2092,18 @@ proto_register_tcap(void)
{ "Data", "tcap.data",
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL }
+
},
{ &hf_tcap_tid,
{ "Transaction Id", "tcap.tid",
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL }
},
+ { &hf_tcap_constructor_eoc,
+ { "CONSTRUCTOR EOC", "tcap.constructor_eoc",
+ FT_UINT16, BASE_HEX, NULL, 0,
+ NULL, HFILL }
+ },
/* Tcap Service Response Time */
{ &hf_tcapsrt_SessionId,
{ "Session Id",
@@ -2287,7 +2294,7 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset
}
if (ind_field)
- proto_tree_add_text(subtree, tvb, offset+len-2, 2, "CONSTRUCTOR EOC");
+ proto_tree_add_item(subtree, hf_tcap_constructor_eoc, tvb, offset+len-2, 2, ENC_BIG_ENDIAN);
offset += len;
}