diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-21 22:03:26 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-11-22 08:38:50 +0000 |
commit | bcabd8df0f3d527d81ed7bc2ee4717ae225733bd (patch) | |
tree | c845dfe3c3ad2186910971f3fe27bda627ba10be /asn1/pcap | |
parent | f9f88ff226835367972a1ceaf97b3c6d8844e330 (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/pcap')
-rw-r--r-- | asn1/pcap/packet-pcap-template.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/asn1/pcap/packet-pcap-template.c b/asn1/pcap/packet-pcap-template.c index 8807b99d37..86f77cc13f 100644 --- a/asn1/pcap/packet-pcap-template.c +++ b/asn1/pcap/packet-pcap-template.c @@ -124,8 +124,8 @@ static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t return (dissector_try_uint(pcap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0; } -static void -dissect_pcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_pcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *pcap_item = NULL; proto_tree *pcap_tree = NULL; @@ -138,6 +138,7 @@ dissect_pcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pcap_tree = proto_item_add_subtree(pcap_item, ett_pcap); dissect_PCAP_PDU_PDU(tvb, pinfo, pcap_tree, NULL); + return tvb_captured_length(tvb); } /*--- proto_reg_handoff_pcap ---------------------------------------*/ @@ -187,7 +188,7 @@ void proto_register_pcap(void) { pcap_module = prefs_register_protocol(proto_pcap, proto_reg_handoff_pcap); /* Register dissector */ - register_dissector("pcap", dissect_pcap, proto_pcap); + new_register_dissector("pcap", dissect_pcap, proto_pcap); /* Register dissector tables */ pcap_ies_dissector_table = register_dissector_table("pcap.ies", "PCAP-PROTOCOL-IES", FT_UINT32, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE); |