aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/mms
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-21 22:03:26 -0500
committerAnders Broman <a.broman58@gmail.com>2015-11-22 08:38:50 +0000
commitbcabd8df0f3d527d81ed7bc2ee4717ae225733bd (patch)
treec845dfe3c3ad2186910971f3fe27bda627ba10be /asn1/mms
parentf9f88ff226835367972a1ceaf97b3c6d8844e330 (diff)
register_dissector -> new_register_dissector for ASN.1 dissectors.
Change-Id: I0476519c02ffdd426b4fdfe8a206d61b728c327a Reviewed-on: https://code.wireshark.org/review/12026 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1/mms')
-rw-r--r--asn1/mms/packet-mms-template.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/asn1/mms/packet-mms-template.c b/asn1/mms/packet-mms-template.c
index 53350f50e0..6a9b4f4529 100644
--- a/asn1/mms/packet-mms-template.c
+++ b/asn1/mms/packet-mms-template.c
@@ -57,8 +57,8 @@ static expert_field ei_mms_zero_pdu = EI_INIT;
/*
* Dissect MMS PDUs inside a PPDU.
*/
-static void
-dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
+static int
+dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
{
int offset = 0;
int old_offset;
@@ -72,7 +72,7 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
tree = proto_item_add_subtree(item, ett_mms);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MMS");
- col_clear(pinfo->cinfo, COL_INFO);
+ col_clear(pinfo->cinfo, COL_INFO);
while (tvb_reported_length_remaining(tvb, offset) > 0){
old_offset=offset;
@@ -82,6 +82,7 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
}
}
+ return tvb_captured_length(tvb);
}
@@ -110,7 +111,7 @@ void proto_register_mms(void) {
/* Register protocol */
proto_mms = proto_register_protocol(PNAME, PSNAME, PFNAME);
- register_dissector("mms", dissect_mms, proto_mms);
+ new_register_dissector("mms", dissect_mms, proto_mms);
/* Register fields and subtrees */
proto_register_field_array(proto_mms, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -164,14 +165,14 @@ dissect_mms_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi
if (!tvb_bytes_exist(tvb, offset, length))
return FALSE;
- dissect_mms(tvb, pinfo, parent_tree);
+ dissect_mms(tvb, pinfo, parent_tree, data);
return TRUE;
}
/*--- proto_reg_handoff_mms --- */
void proto_reg_handoff_mms(void) {
- register_ber_oid_dissector("1.0.9506.2.3", dissect_mms, proto_mms,"MMS");
- register_ber_oid_dissector("1.0.9506.2.1", dissect_mms, proto_mms,"mms-abstract-syntax-version1(1)");
+ new_register_ber_oid_dissector("1.0.9506.2.3", dissect_mms, proto_mms,"MMS");
+ new_register_ber_oid_dissector("1.0.9506.2.1", dissect_mms, proto_mms,"mms-abstract-syntax-version1(1)");
heur_dissector_add("cotp", dissect_mms_heur, "MMS over COTP", "mms_cotp", proto_mms, HEURISTIC_ENABLE);
heur_dissector_add("cotp_is", dissect_mms_heur, "MMS over COTP (inactive subset)", "mms_cotp_is", proto_mms, HEURISTIC_ENABLE);
}