diff options
44 files changed, 93 insertions, 158 deletions
diff --git a/asn1/dop/packet-dop-template.c b/asn1/dop/packet-dop-template.c index 8995f4fede..e8033d785a 100644 --- a/asn1/dop/packet-dop-template.c +++ b/asn1/dop/packet-dop-template.c @@ -94,7 +94,7 @@ call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info); - if (dissector_try_string(dop_dissector_table, binding_param, tvb, pinfo, tree)) { + if (dissector_try_string(dop_dissector_table, binding_param, tvb, pinfo, tree, NULL)) { offset = tvb_reported_length (tvb); } else { proto_item *item=NULL; diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf index 1dbe50e7c7..57bf82d86e 100644 --- a/asn1/h225/h225.cnf +++ b/asn1/h225/h225.cnf @@ -674,7 +674,7 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode if (gefx) { /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ actx->pinfo->private_data = actx; - dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree); + dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, NULL); } actx->private_data = gefx; /* subdissector could overwrite it */ #.END @@ -706,7 +706,7 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode 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);*/ - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, NULL); } #.END diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf index 87461f7a11..23d8cf070d 100644 --- a/asn1/h245/h245.cnf +++ b/asn1/h245/h245.cnf @@ -698,7 +698,7 @@ if (h245_pi != NULL) if (gefx) { /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/ actx->pinfo->private_data = actx; - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, NULL); } actx->private_data = parent_gefx; #.END @@ -721,7 +721,7 @@ if (h245_pi != NULL) if (gefx) { /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ actx->pinfo->private_data = actx; - dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree); + dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, NULL); } actx->private_data = gefx; /* subdissector could overwrite it */ #.END @@ -752,7 +752,7 @@ if (h245_pi != NULL) if (gefx) { /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ actx->pinfo->private_data = actx; - dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree); + dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, NULL); } actx->private_data = gefx; /* subdissector could overwrite it */ #.END @@ -780,7 +780,7 @@ if (h245_pi != NULL) 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);*/ 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); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, NULL); } #.END #.FN_BODY ParameterValue/unsignedMin VAL_PTR = &value @@ -797,7 +797,7 @@ if (h245_pi != NULL) 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);*/ 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); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, NULL); } #.END #.FN_BODY ParameterValue/unsignedMax VAL_PTR = &value @@ -814,7 +814,7 @@ if (h245_pi != NULL) 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);*/ 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); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, NULL); } #.END #.FN_BODY ParameterValue/unsigned32Min VAL_PTR = &value @@ -831,7 +831,7 @@ if (h245_pi != NULL) 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);*/ 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); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, NULL); } #.END #.FN_BODY ParameterValue/unsigned32Max VAL_PTR = &value @@ -848,7 +848,7 @@ if (h245_pi != NULL) 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);*/ 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); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, NULL); } #.END #.FN_BODY ParameterValue/octetString VAL_PTR = &value_tvb @@ -859,7 +859,7 @@ if (h245_pi != NULL) 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);*/ - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, NULL); } #.END diff --git a/asn1/hnbap/packet-hnbap-template.c b/asn1/hnbap/packet-hnbap-template.c index 914720b73e..479f8b82fd 100644 --- a/asn1/hnbap/packet-hnbap-template.c +++ b/asn1/hnbap/packet-hnbap-template.c @@ -94,19 +94,19 @@ static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_in static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureCode) return 0; - return (dissector_try_string(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureCode) return 0; - return (dissector_try_string(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureCode) return 0; - return (dissector_try_string(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } #endif diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index 8760206b8a..5b348c160d 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -472,7 +472,7 @@ ldap_conv_info_t *ldap_info; proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA); /* if we have an attribute type that isn't binary see if there is a better dissector */ - else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree)) { + else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree, NULL)) { offset = old_offset; /* do the default thing */ diff --git a/asn1/nbap/packet-nbap-template.c b/asn1/nbap/packet-nbap-template.c index 5535feb248..28775aa50b 100644 --- a/asn1/nbap/packet-nbap-template.c +++ b/asn1/nbap/packet-nbap-template.c @@ -333,19 +333,19 @@ static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_in static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(nbap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(nbap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(nbap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(nbap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(nbap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(nbap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static void add_hsdsch_bind(packet_info *pinfo){ address null_addr; diff --git a/asn1/qsig/qsig.cnf b/asn1/qsig/qsig.cnf index e181d8a02c..081888ed0f 100644 --- a/asn1/qsig/qsig.cnf +++ b/asn1/qsig/qsig.cnf @@ -146,7 +146,7 @@ NameData TYPE = FT_STRING DISPLAY = BASE_NONE tvbuff_t *next_tvb; next_tvb = tvb_new_subset_remaining(tvb, offset); - if (!dissector_try_string(extension_dissector_table, extension_oid, next_tvb, actx->pinfo, tree)) { + if (!dissector_try_string(extension_dissector_table, extension_oid, next_tvb, actx->pinfo, tree, NULL)) { proto_item *item=NULL; proto_tree *next_tree=NULL; diff --git a/asn1/rnsap/packet-rnsap-template.c b/asn1/rnsap/packet-rnsap-template.c index 3e5680ea12..dca0dffff5 100644 --- a/asn1/rnsap/packet-rnsap-template.c +++ b/asn1/rnsap/packet-rnsap-template.c @@ -106,19 +106,19 @@ static int dissect_PrivateIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_ static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(rnsap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(rnsap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(rnsap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(rnsap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(rnsap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(rnsap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static void diff --git a/asn1/ros/packet-ros-template.c b/asn1/ros/packet-ros-template.c index f2287d820c..4cbf770875 100644 --- a/asn1/ros/packet-ros-template.c +++ b/asn1/ros/packet-ros-template.c @@ -214,7 +214,7 @@ call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *p next_tvb = tvb_new_subset_remaining(tvb, offset); if(!ros_try_string(oid, next_tvb, pinfo, tree) && - !dissector_try_string(ros_oid_dissector_table, oid, next_tvb, pinfo, tree)){ + !dissector_try_string(ros_oid_dissector_table, oid, next_tvb, pinfo, tree, NULL)){ proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "ROS: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); proto_tree *next_tree=proto_item_add_subtree(item, ett_ros_unknown); diff --git a/asn1/rtse/packet-rtse-template.c b/asn1/rtse/packet-rtse-template.c index c7f053453a..10a306ff4a 100644 --- a/asn1/rtse/packet-rtse-template.c +++ b/asn1/rtse/packet-rtse-template.c @@ -147,7 +147,7 @@ call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info * tvbuff_t *next_tvb; next_tvb = tvb_new_subset_remaining(tvb, offset); - if(!dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree)){ + if(!dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, NULL)){ proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); proto_tree *next_tree=proto_item_add_subtree(item, ett_rtse_unknown); diff --git a/asn1/t124/t124.cnf b/asn1/t124/t124.cnf index acd15ef7d6..7062ca7ac8 100644 --- a/asn1/t124/t124.cnf +++ b/asn1/t124/t124.cnf @@ -156,7 +156,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult ns = tvb_get_string(NULL, t124NSIdentifier, 0, tvb_length(t124NSIdentifier)); if(ns != NULL) { - dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree); + dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree, NULL); g_free(ns); } } diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index 811b0817d4..f42959d994 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -1024,9 +1024,9 @@ call_ber_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *p if (oid == NULL || ((((syntax = get_ber_oid_syntax(oid)) == NULL) || /* First see if a syntax has been registered for this oid (user defined) */ - !dissector_try_string_new(ber_syntax_dissector_table, syntax, next_tvb, pinfo, tree, data)) && + !dissector_try_string(ber_syntax_dissector_table, syntax, next_tvb, pinfo, tree, data)) && /* Then try registered oid's */ - (!dissector_try_string_new(ber_oid_dissector_table, oid, next_tvb, pinfo, tree, data)))) { + (!dissector_try_string(ber_oid_dissector_table, oid, next_tvb, pinfo, tree, data)))) { proto_item *item = NULL; proto_tree *next_tree = NULL; gint length_remaining; @@ -1087,7 +1087,7 @@ call_ber_syntax_callback(const char *syntax, tvbuff_t *tvb, int offset, packet_i next_tvb = tvb_new_subset_remaining(tvb, offset); if (syntax == NULL || - !dissector_try_string(ber_syntax_dissector_table, syntax, next_tvb, pinfo, tree)) { + !dissector_try_string(ber_syntax_dissector_table, syntax, next_tvb, pinfo, tree, NULL)) { proto_item *item = NULL; proto_tree *next_tree = NULL; diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c index cec80b49ed..b3ef1df6ce 100644 --- a/epan/dissectors/packet-coap.c +++ b/epan/dissectors/packet-coap.c @@ -891,7 +891,7 @@ dissect_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } dissector_try_string(media_type_dissector_table, coap_ctype_str_dis, - payload_tvb, pinfo, payload_tree); + payload_tvb, pinfo, payload_tree, NULL); } } diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c index dc8e4b176e..0d0283ece6 100644 --- a/epan/dissectors/packet-dcp-etsi.c +++ b/epan/dissectors/packet-dcp-etsi.c @@ -199,7 +199,7 @@ dissect_dcp_etsi (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * } sync = tvb_get_string (wmem_packet_scope(), tvb, 0, 2); - dissector_try_string(dcp_dissector_table, (char*)sync, tvb, pinfo, dcp_tree); + dissector_try_string(dcp_dissector_table, (char*)sync, tvb, pinfo, dcp_tree, NULL); return TRUE; } @@ -623,19 +623,18 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) static void dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { - proto_tree *tpl_tree = NULL; + proto_tree *tpl_tree; guint offset=0; char *prot=NULL; + proto_item *ti; guint16 maj, min; pinfo->current_proto = "DCP-TPL"; col_set_str(pinfo->cinfo, COL_PROTOCOL, "DCP-TPL"); - if(tree) { - proto_item *ti = NULL; - ti = proto_tree_add_item (tree, proto_tpl, tvb, 0, -1, ENC_NA); - tpl_tree = proto_item_add_subtree (ti, ett_tpl); - } + ti = proto_tree_add_item (tree, proto_tpl, tvb, 0, -1, ENC_NA); + tpl_tree = proto_item_add_subtree (ti, ett_tpl); + while(offset<tvb_length(tvb)) { guint32 bits; guint32 bytes; @@ -644,25 +643,24 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) bytes = bits / 8; if(bits % 8) bytes++; - if(tree) { - if(strcmp(tag, "*ptr")==0) { + + if(strcmp(tag, "*ptr")==0) { prot = (char*)tvb_get_string (wmem_packet_scope(), tvb, offset, 4); maj = tvb_get_ntohs(tvb, offset+4); min = tvb_get_ntohs(tvb, offset+6); proto_tree_add_bytes_format(tpl_tree, hf_tpl_tlv, tvb, offset-8, bytes+8, tvb_get_ptr(tvb, offset, bytes), "%s %s rev %d.%d", tag, prot, maj, min); - } else { + } else { proto_tree_add_bytes_format(tpl_tree, hf_tpl_tlv, tvb, offset-8, bytes+8, tvb_get_ptr(tvb, offset, bytes), "%s (%u bits)", tag, bits); - } } + offset += bytes; } - if(prot) { /* prot is non-NULL only if we have our tree. */ - dissector_try_string(tpl_dissector_table, prot, tvb, pinfo, tree->parent); - } + + dissector_try_string(tpl_dissector_table, prot, tvb, pinfo, tree->parent, NULL); } void diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index e5072c996b..ad8a6f2785 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -3337,7 +3337,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, sub_tvb=tvb_new_subset(tvb, cur_offset, tsig_siglen, tsig_siglen); - if (!dissector_try_string(dns_tsig_dissector_table, tsig_algname, sub_tvb, pinfo, mac_tree)) { + if (!dissector_try_string(dns_tsig_dissector_table, tsig_algname, sub_tvb, pinfo, mac_tree, NULL)) { expert_add_info_format(pinfo, mac_item, &ei_dns_tsig_alg, "No dissector for algorithm:%s", tsig_algname); } diff --git a/epan/dissectors/packet-dop.c b/epan/dissectors/packet-dop.c index 1867091fe7..90d11e3470 100644 --- a/epan/dissectors/packet-dop.c +++ b/epan/dissectors/packet-dop.c @@ -2056,7 +2056,7 @@ call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info); - if (dissector_try_string(dop_dissector_table, binding_param, tvb, pinfo, tree)) { + if (dissector_try_string(dop_dissector_table, binding_param, tvb, pinfo, tree, NULL)) { offset = tvb_reported_length (tvb); } else { proto_item *item=NULL; diff --git a/epan/dissectors/packet-eigrp.c b/epan/dissectors/packet-eigrp.c index 965df4bbe8..3958d25bb5 100644 --- a/epan/dissectors/packet-eigrp.c +++ b/epan/dissectors/packet-eigrp.c @@ -1333,11 +1333,11 @@ dissect_eigrp_service (proto_item *ti, proto_tree *tree, tvbuff_t *tvb, if (tok && tok[0] == '<') { /* Looks like XML */ dissector_try_string(media_type_table, "application/xml", - xml_tvb, pinfo, sub_tree); + xml_tvb, pinfo, sub_tree, NULL); } else { /* Try plain text */ dissector_try_string(media_type_table, "text/plain", - xml_tvb, pinfo, sub_tree); + xml_tvb, pinfo, sub_tree, NULL); } } sub_offset += length; diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index bf7a3d1f2e..0a7b7a44e7 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -3740,7 +3740,7 @@ dissect_h225_GenericIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac if (gefx) { /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ actx->pinfo->private_data = actx; - dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree); + dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, NULL); } actx->private_data = gefx; /* subdissector could overwrite it */ @@ -3761,7 +3761,7 @@ dissect_h225_T_raw(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot 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);*/ - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree, NULL); } diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index d0a16f54a5..c91f1d635c 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -3619,7 +3619,7 @@ dissect_h245_CapabilityIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t if (gefx) { /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ actx->pinfo->private_data = actx; - dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree); + dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, NULL); } actx->private_data = gefx; /* subdissector could overwrite it */ @@ -3687,7 +3687,7 @@ dissect_h245_ParameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * if (gefx) { /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ actx->pinfo->private_data = actx; - dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree); + dissector_try_string(gef_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree, NULL); } actx->private_data = gefx; /* subdissector could overwrite it */ @@ -3714,7 +3714,7 @@ dissect_h245_T_booleanArray(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx 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);*/ add_new_data_source(actx->pinfo, value_tvb, "booleanArray"); - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree, NULL); } @@ -3741,7 +3741,7 @@ dissect_h245_T_unsignedMin(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ 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);*/ add_new_data_source(actx->pinfo, value_tvb, "unsignedMin"); - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree, NULL); } @@ -3768,7 +3768,7 @@ dissect_h245_T_unsignedMax(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ 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);*/ add_new_data_source(actx->pinfo, value_tvb, "unsignedMax"); - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree, NULL); } @@ -3795,7 +3795,7 @@ dissect_h245_T_unsigned32Min(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx 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);*/ add_new_data_source(actx->pinfo, value_tvb, "unsigned32Min"); - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree, NULL); } @@ -3822,7 +3822,7 @@ dissect_h245_T_unsigned32Max(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx 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);*/ add_new_data_source(actx->pinfo, value_tvb, "unsigned32Max"); - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree, NULL); } @@ -3843,7 +3843,7 @@ dissect_h245_T_octetString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ 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);*/ - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree, NULL); } @@ -4006,7 +4006,7 @@ dissect_h245_T_nonCollapsingRaw(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a if (gefx) { /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ actx->pinfo->private_data = actx; - dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree, NULL); } actx->private_data = parent_gefx; diff --git a/epan/dissectors/packet-hnbap.c b/epan/dissectors/packet-hnbap.c index 0af509b994..a1a9d91529 100644 --- a/epan/dissectors/packet-hnbap.c +++ b/epan/dissectors/packet-hnbap.c @@ -2603,19 +2603,19 @@ static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_in static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureCode) return 0; - return (dissector_try_string(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureCode) return 0; - return (dissector_try_string(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureCode) return 0; - return (dissector_try_string(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } #endif diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c index 5df000f3c2..b1279f2b1e 100644 --- a/epan/dissectors/packet-imf.c +++ b/epan/dissectors/packet-imf.c @@ -811,7 +811,7 @@ dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset_remaining(tvb, end_offset); - dissector_try_string(media_type_dissector_table, content_type_str, next_tvb, pinfo, tree); + dissector_try_string(media_type_dissector_table, content_type_str, next_tvb, pinfo, tree, NULL); pinfo->private_data = pd_save; } else { diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index c18b975b7b..46851153b3 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -2028,7 +2028,7 @@ static int dissect_media( const gchar* fullmediatype, tvbuff_t * tvb, packet_inf } } } else { - dissected = dissector_try_string(media_type_dissector_table, mediatype, tvb, pinfo, tree) ? tvb_length(tvb) : 0; + dissected = dissector_try_string(media_type_dissector_table, mediatype, tvb, pinfo, tree, NULL) ? tvb_length(tvb) : 0; if( dissected != (int) tvb_length(tvb) ) { /* g_message( "%s : %d expected, %d dissected", mediatype, tvb_length(tvb), dissected ); */ diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index ef4eebff23..edb6c99711 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -2355,7 +2355,7 @@ dissect_ldap_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA); /* if we have an attribute type that isn't binary see if there is a better dissector */ - else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree)) { + else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree, NULL)) { offset = old_offset; /* do the default thing */ diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c index 799f480617..51194ec3e8 100644 --- a/epan/dissectors/packet-mbtcp.c +++ b/epan/dissectors/packet-mbtcp.c @@ -824,7 +824,7 @@ dissect_modbus_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 break; default: - if ( ! dissector_try_string(modbus_data_dissector_table, "data", next_tvb, pinfo, tree) ) + if ( ! dissector_try_string(modbus_data_dissector_table, "data", next_tvb, pinfo, tree, NULL) ) proto_tree_add_item(tree, hf_modbus_data, tvb, payload_start, payload_len, ENC_NA); break; } diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c index e8940d2058..728a809bc3 100644 --- a/epan/dissectors/packet-msrp.c +++ b/epan/dissectors/packet-msrp.c @@ -697,7 +697,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ found_match = dissector_try_string(media_type_dissector_table, media_type_str_lower_case, next_tvb, pinfo, - msrp_data_tree); + msrp_data_tree, NULL); pinfo->private_data = save_private_data; /* If no match dump as text */ } diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c index 5df778e834..b413667e02 100644 --- a/epan/dissectors/packet-multipart.c +++ b/epan/dissectors/packet-multipart.c @@ -743,13 +743,13 @@ process_body_part(proto_tree *tree, tvbuff_t *tvb, const guint8 *boundary, * First try the dedicated multipart dissector table */ dissected = dissector_try_string(multipart_media_subdissector_table, - content_type_str, tmp_tvb, pinfo, subtree); + content_type_str, tmp_tvb, pinfo, subtree, NULL); if (! dissected) { /* * Fall back to the default media dissector table */ dissected = dissector_try_string(media_type_dissector_table, - content_type_str, tmp_tvb, pinfo, subtree); + content_type_str, tmp_tvb, pinfo, subtree, NULL); } if (! dissected) { const char *save_match_string = pinfo->match_string; diff --git a/epan/dissectors/packet-nbap.c b/epan/dissectors/packet-nbap.c index 072bd5fbef..45747201db 100644 --- a/epan/dissectors/packet-nbap.c +++ b/epan/dissectors/packet-nbap.c @@ -55177,19 +55177,19 @@ static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_in static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(nbap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(nbap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(nbap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(nbap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(nbap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(nbap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static void add_hsdsch_bind(packet_info *pinfo){ address null_addr; diff --git a/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c index 8c11bdf9e6..2771b0cfa5 100644 --- a/epan/dissectors/packet-qsig.c +++ b/epan/dissectors/packet-qsig.c @@ -2077,7 +2077,7 @@ dissect_qsig_T_extensionArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i tvbuff_t *next_tvb; next_tvb = tvb_new_subset_remaining(tvb, offset); - if (!dissector_try_string(extension_dissector_table, extension_oid, next_tvb, actx->pinfo, tree)) { + if (!dissector_try_string(extension_dissector_table, extension_oid, next_tvb, actx->pinfo, tree, NULL)) { proto_item *item=NULL; proto_tree *next_tree=NULL; diff --git a/epan/dissectors/packet-rnsap.c b/epan/dissectors/packet-rnsap.c index 6625d70808..5e24b4edbf 100644 --- a/epan/dissectors/packet-rnsap.c +++ b/epan/dissectors/packet-rnsap.c @@ -43166,19 +43166,19 @@ static int dissect_PrivateIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_ static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(rnsap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(rnsap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(rnsap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(rnsap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!ProcedureID) return 0; - return (dissector_try_string(rnsap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0; + return (dissector_try_string(rnsap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0; } static void diff --git a/epan/dissectors/packet-ros.c b/epan/dissectors/packet-ros.c index f9a8c75326..9df79fcc4b 100644 --- a/epan/dissectors/packet-ros.c +++ b/epan/dissectors/packet-ros.c @@ -268,7 +268,7 @@ call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *p next_tvb = tvb_new_subset_remaining(tvb, offset); if(!ros_try_string(oid, next_tvb, pinfo, tree) && - !dissector_try_string(ros_oid_dissector_table, oid, next_tvb, pinfo, tree)){ + !dissector_try_string(ros_oid_dissector_table, oid, next_tvb, pinfo, tree, NULL)){ proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "ROS: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); proto_tree *next_tree=proto_item_add_subtree(item, ett_ros_unknown); diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index d524611896..246f252f0b 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -1576,7 +1576,7 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree */ next_tvb = tvb_new_subset(tvb, offset-8, app_length+4, app_length+4); /* look for registered sub-dissectors */ - if (dissector_try_string(rtcp_dissector_table, ascii_name, next_tvb, pinfo, tree)) { + if (dissector_try_string(rtcp_dissector_table, ascii_name, next_tvb, pinfo, tree, NULL)) { /* found subdissector - return tvb_length */ offset += 4; packet_len -= 4; diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index ca82502280..bb4aa81c5a 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -1028,7 +1028,7 @@ process_rtp_payload(tvbuff_t *newtvb, packet_info *pinfo, proto_tree *tree, } if (payload_type_str){ found_match = dissector_try_string(rtp_dyn_pt_dissector_table, - payload_type_str, newtvb, pinfo, tree); + payload_type_str, newtvb, pinfo, tree, NULL); /* If payload type string set from conversation and * no matching dissector found it's probably because no subdissector * exists. Don't call the dissectors based on payload number diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c index af7a1dd03f..6d18f353bf 100644 --- a/epan/dissectors/packet-rtse.c +++ b/epan/dissectors/packet-rtse.c @@ -197,7 +197,7 @@ call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info * tvbuff_t *next_tvb; next_tvb = tvb_new_subset_remaining(tvb, offset); - if(!dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree)){ + if(!dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, NULL)){ proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid); proto_tree *next_tree=proto_item_add_subtree(item, ett_rtse_unknown); diff --git a/epan/dissectors/packet-rtsp.c b/epan/dissectors/packet-rtsp.c index cf110b820f..6ab497bf25 100644 --- a/epan/dissectors/packet-rtsp.c +++ b/epan/dissectors/packet-rtsp.c @@ -1221,7 +1221,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo, if (media_type_str_lower_case && dissector_try_string(media_type_dissector_table, media_type_str_lower_case, - new_tvb, pinfo, rtsp_tree)){ + new_tvb, pinfo, rtsp_tree, NULL)){ }else { /* diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c index e5e674a806..a5a134388e 100644 --- a/epan/dissectors/packet-sdp.c +++ b/epan/dissectors/packet-sdp.c @@ -609,7 +609,7 @@ static void dissect_key_mgmt(tvbuff_t *tvb, packet_info * pinfo, proto_item * ti found_match = dissector_try_string(key_mgmt_dissector_table, prtcl_id, keymgmt_tvb, pinfo, - key_tree); + key_tree, NULL); } if (found_match) { diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index bb711bb9d0..e6fddb474c 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -2387,7 +2387,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr if (ext_hdr_handle != NULL) { tvbuff_t *next_tvb2; next_tvb2 = tvb_new_subset(tvb, value_offset, value_len, value_len); - dissector_try_string(ext_hdr_subdissector_table, header_name, next_tvb2, pinfo, proto_item_add_subtree(ti_c, ett_sip_ext_hdr)); + dissector_try_string(ext_hdr_subdissector_table, header_name, next_tvb2, pinfo, proto_item_add_subtree(ti_c, ett_sip_ext_hdr), NULL); } else { expert_add_info_format(pinfo, ti_c, &ei_sip_unrecognized_header, "Unrecognised SIP header (%s)", @@ -3229,14 +3229,14 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr found_match = dissector_try_string(media_type_dissector_table, media_type_str_lower_case, next_tvb, pinfo, - message_body_tree); + message_body_tree, NULL); if (!found_match && !strncmp(media_type_str_lower_case, "multipart/", sizeof("multipart/")-1)) { /* Try to decode the unknown multipart subtype anyway */ found_match = dissector_try_string(media_type_dissector_table, "multipart/", next_tvb, pinfo, - message_body_tree); + message_body_tree, NULL); } pinfo->private_data = save_private_data; /* If no match dump as text */ diff --git a/epan/dissectors/packet-t124.c b/epan/dissectors/packet-t124.c index 3acd833698..106e507790 100644 --- a/epan/dissectors/packet-t124.c +++ b/epan/dissectors/packet-t124.c @@ -585,7 +585,7 @@ dissect_t124_T_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr ns = tvb_get_string(NULL, t124NSIdentifier, 0, tvb_length(t124NSIdentifier)); if(ns != NULL) { - dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree); + dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree, NULL); g_free(ns); } } diff --git a/epan/dissectors/packet-tali.c b/epan/dissectors/packet-tali.c index cb8c873db9..6bb04efad7 100644 --- a/epan/dissectors/packet-tali.c +++ b/epan/dissectors/packet-tali.c @@ -129,7 +129,7 @@ dissect_tali_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (length > 0) { payload_tvb = tvb_new_subset_remaining(tvb, TALI_HEADER_LENGTH); - if (payload_tvb != NULL && !dissector_try_string(tali_dissector_table, opcode, payload_tvb, pinfo, tree)) { + if (payload_tvb != NULL && !dissector_try_string(tali_dissector_table, opcode, payload_tvb, pinfo, tree, NULL)) { call_dissector(data_handle, payload_tvb, pinfo, tree); } } diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c index a090283eb6..7bd9e7eda1 100644 --- a/epan/dissectors/packet-wsp.c +++ b/epan/dissectors/packet-wsp.c @@ -5146,7 +5146,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * Content type is a string. */ found_match = dissector_try_string(media_type_table, - contentTypeStr, tmp_tvb, pinfo, tree); + contentTypeStr, tmp_tvb, pinfo, tree, NULL); } if (! found_match) { if (! dissector_try_heuristic(heur_subdissector_list, @@ -5239,7 +5239,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * Content type is a string. */ found_match = dissector_try_string(media_type_table, - contentTypeStr, tmp_tvb, pinfo, tree); + contentTypeStr, tmp_tvb, pinfo, tree, NULL); } if (! found_match) { if (! dissector_try_heuristic(heur_subdissector_list, @@ -5323,7 +5323,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } else */ found_match = dissector_try_string(media_type_table, - contentTypeStr, tmp_tvb, pinfo, tree); + contentTypeStr, tmp_tvb, pinfo, tree, NULL); } if (! found_match) { if (! dissector_try_heuristic(heur_subdissector_list, @@ -5921,7 +5921,7 @@ add_multipart_data (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo) * Content type is a string. */ found_match = dissector_try_string(media_type_table, - contentTypeStr, tmp_tvb, pinfo, mpart_tree); + contentTypeStr, tmp_tvb, pinfo, mpart_tree, NULL); } if (! found_match) { if (! dissector_try_heuristic(heur_subdissector_list, diff --git a/epan/dissectors/packet-xmcp.c b/epan/dissectors/packet-xmcp.c index 82e7e2309c..06b518eeb5 100644 --- a/epan/dissectors/packet-xmcp.c +++ b/epan/dissectors/packet-xmcp.c @@ -776,11 +776,11 @@ decode_xmcp_attr_value (proto_tree *attr_tree, guint16 attr_type, if (tok && tok[0] == '<') { /* Looks like XML */ dissector_try_string(media_type_dissector_table, "application/xml", - next_tvb, pinfo, attr_tree); + next_tvb, pinfo, attr_tree, NULL); } else { /* Try plain text */ dissector_try_string(media_type_dissector_table, "text/plain", - next_tvb, pinfo, attr_tree); + next_tvb, pinfo, attr_tree, NULL); } } break; diff --git a/epan/next_tvb.c b/epan/next_tvb.c index 9297e53b60..8b9eaad1c3 100644 --- a/epan/next_tvb.c +++ b/epan/next_tvb.c @@ -116,7 +116,7 @@ void next_tvb_call(next_tvb_list_t *list, packet_info *pinfo, proto_tree *tree, dissector_try_uint(item->table, item->uint_val, item->tvb, pinfo, (item->tree) ? item->tree : tree); break; case NTVB_STRING: - dissector_try_string(item->table, item->string, item->tvb, pinfo, (item->tree) ? item->tree : tree); + dissector_try_string(item->table, item->string, item->tvb, pinfo, (item->tree) ? item->tree : tree, NULL); break; } } diff --git a/epan/packet.c b/epan/packet.c index 60cfb69613..e84bd1f24c 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -1265,63 +1265,6 @@ dissector_reset_string(const char *name, const gchar *pattern) return FALSE. */ gboolean dissector_try_string(dissector_table_t sub_dissectors, const gchar *string, - tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -{ - dtbl_entry_t *dtbl_entry; - struct dissector_handle *handle; - int ret; - const gchar *saved_match_string; - - /* XXX ASSERT instead ? */ - if (!string) return FALSE; - dtbl_entry = find_string_dtbl_entry(sub_dissectors, string); - if (dtbl_entry != NULL) { - /* - * Is there currently a dissector handle for this entry? - */ - handle = dtbl_entry->current; - if (handle == NULL) { - /* - * No - pretend this dissector didn't exist, - * so that other dissectors might have a chance - * to dissect this packet. - */ - return FALSE; - } - - /* - * Save the current value of "pinfo->match_string", - * set it to the string that matched, call the - * dissector, and restore "pinfo->match_string". - */ - saved_match_string = pinfo->match_string; - pinfo->match_string = string; - ret = call_dissector_work(handle, tvb, pinfo, tree, TRUE, NULL); - pinfo->match_string = saved_match_string; - - /* - * If a new-style dissector returned 0, it means that - * it didn't think this tvbuff represented a packet for - * its protocol, and didn't dissect anything. - * - * Old-style dissectors can't reject the packet. - * - * 0 is also returned if the protocol wasn't enabled. - * - * If the packet was rejected, we return FALSE, so that - * other dissectors might have a chance to dissect this - * packet, otherwise we return TRUE. - */ - return ret != 0; - } - return FALSE; -} - -/* Look for a given string in a given dissector table and, if found, call - the dissector with the arguments supplied, and return TRUE, otherwise - return FALSE. */ -gboolean -dissector_try_string_new(dissector_table_t sub_dissectors, const gchar *string, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { dtbl_entry_t *dtbl_entry; diff --git a/epan/packet.h b/epan/packet.h index 96d7d85eff..addfc14af1 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -237,12 +237,6 @@ WS_DLL_PUBLIC void dissector_reset_string(const char *name, const gchar *pattern the dissector with the arguments supplied, and return TRUE, otherwise return FALSE. */ WS_DLL_PUBLIC gboolean dissector_try_string(dissector_table_t sub_dissectors, - const gchar *string, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - -/* Look for a given string in a given dissector table and, if found, call - the dissector with the arguments supplied, and return TRUE, otherwise - return FALSE. */ -WS_DLL_PUBLIC gboolean dissector_try_string_new(dissector_table_t sub_dissectors, const gchar *string, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data); /* Look for a given value in a given string dissector table and, if found, diff --git a/epan/wslua/wslua_proto.c b/epan/wslua/wslua_proto.c index 146a99e8a5..10dcfb3db2 100644 --- a/epan/wslua/wslua_proto.c +++ b/epan/wslua/wslua_proto.c @@ -2019,7 +2019,7 @@ WSLUA_METHOD DissectorTable_try (lua_State *L) { if (!pattern) handled = TRUE; - else if (dissector_try_string(dt->table,pattern,tvb->ws_tvb,pinfo->ws_pinfo,ti->tree)) + else if (dissector_try_string(dt->table,pattern,tvb->ws_tvb,pinfo->ws_pinfo,ti->tree, NULL)) handled = TRUE; } else if ( type == FT_UINT32 || type == FT_UINT16 || type == FT_UINT8 || type == FT_UINT24 ) { |