diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-24 13:13:18 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-25 19:21:14 +0000 |
commit | 0cd1a8506425fa379c88df941e3039ce9a1164d4 (patch) | |
tree | 9c2cb1edbaf7de9fa028e4b05fcc13f491a4230b /asn1/snmp/packet-snmp-template.c | |
parent | 992a7ee6e7603c2552971dc516ca4e6c45ae2d21 (diff) |
Require BER dissector (OID) registration to be "new style".
Both old and new style API existed, just remove the "old" one.
Change-Id: If725e778a0ecad5a431d634ed5c4856b4a281013
Reviewed-on: https://code.wireshark.org/review/12107
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1/snmp/packet-snmp-template.c')
-rw-r--r-- | asn1/snmp/packet-snmp-template.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index 16b4e0a71c..ca9e3e4135 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -2121,8 +2121,8 @@ dissect_snmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ return dissect_snmp_pdu(tvb, 0, pinfo, tree, proto_snmp, ett_snmp, FALSE); } -static void -dissect_snmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_snmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { int offset = 0; guint message_len; @@ -2139,6 +2139,7 @@ dissect_snmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } offset += message_len; } + return tvb_captured_length(tvb); } static int @@ -2580,7 +2581,7 @@ void proto_register_snmp(void) { register_init_routine(init_ue_cache); register_cleanup_routine(cleanup_ue_cache); - register_ber_syntax_dissector("SNMP", proto_snmp, dissect_snmp_tcp); + new_register_ber_syntax_dissector("SNMP", proto_snmp, dissect_snmp_tcp); } @@ -2598,7 +2599,7 @@ void proto_reg_handoff_snmp(void) { dissector_add_uint("ipx.socket", IPX_SOCKET_SNMP_SINK, snmp_handle); dissector_add_uint("hpext.dxsap", HPEXT_SNMP, snmp_handle); - snmp_tcp_handle = create_dissector_handle(dissect_snmp_tcp, proto_snmp); + snmp_tcp_handle = new_create_dissector_handle(dissect_snmp_tcp, proto_snmp); dissector_add_uint("tcp.port", TCP_PORT_SNMP, snmp_tcp_handle); dissector_add_uint("tcp.port", TCP_PORT_SNMP_TRAP, snmp_tcp_handle); |