From b6afcc102f8ba453034eda35648ff746ed329f4a Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 3 Dec 2001 04:00:26 +0000 Subject: Make "dissector_add()", "dissector_delete()", and "dissector_change()" take a dissector handle as an argument, rather than a pointer to a dissector function and a protocol ID. Associate dissector handles with dissector table entries. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4308 f5534014-38df-0310-8fa8-9805f1628bb7 --- packet-nbns.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'packet-nbns.c') diff --git a/packet-nbns.c b/packet-nbns.c index 1c7647b74a..b64d3bc3cc 100644 --- a/packet-nbns.c +++ b/packet-nbns.c @@ -3,7 +3,7 @@ * to when it had only NBNS) * Guy Harris * - * $Id: packet-nbns.c,v 1.65 2001/11/21 02:01:05 guy Exp $ + * $Id: packet-nbns.c,v 1.66 2001/12/03 03:59:37 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -1807,8 +1807,13 @@ proto_register_nbt(void) void proto_reg_handoff_nbt(void) { - dissector_add("udp.port", UDP_PORT_NBNS, dissect_nbns, proto_nbns); - dissector_add("udp.port", UDP_PORT_NBDGM, dissect_nbdgm, proto_nbdgm); - dissector_add("tcp.port", TCP_PORT_NBSS, dissect_nbss, proto_nbss); - dissector_add("tcp.port", TCP_PORT_CIFS, dissect_nbss, proto_nbss); + dissector_handle_t nbns_handle, nbdgm_handle, nbss_handle; + + nbns_handle = create_dissector_handle(dissect_nbns, proto_nbns); + dissector_add("udp.port", UDP_PORT_NBNS, nbns_handle); + nbdgm_handle = create_dissector_handle(dissect_nbdgm, proto_nbdgm); + dissector_add("udp.port", UDP_PORT_NBDGM, nbdgm_handle); + nbss_handle = create_dissector_handle(dissect_nbss, proto_nbss); + dissector_add("tcp.port", TCP_PORT_NBSS, nbss_handle); + dissector_add("tcp.port", TCP_PORT_CIFS, nbss_handle); } -- cgit v1.2.3