diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-12-03 04:00:26 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-12-03 04:00:26 +0000 |
commit | bced8711f67b5dba76e9d6cdfd1a0246b235df27 (patch) | |
tree | 6303e298a7b136a1e1da306950398c99e3e71432 /packet-ncp.c | |
parent | 8d0ea8bc932de5cf57183a593be160515af064d9 (diff) | |
download | wireshark-bced8711f67b5dba76e9d6cdfd1a0246b235df27.tar.gz wireshark-bced8711f67b5dba76e9d6cdfd1a0246b235df27.tar.bz2 wireshark-bced8711f67b5dba76e9d6cdfd1a0246b235df27.zip |
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.
svn path=/trunk/; revision=4308
Diffstat (limited to 'packet-ncp.c')
-rw-r--r-- | packet-ncp.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/packet-ncp.c b/packet-ncp.c index c664215e27..9bae92463b 100644 --- a/packet-ncp.c +++ b/packet-ncp.c @@ -3,12 +3,11 @@ * Gilbert Ramirez <gram@alumni.rice.edu> * Modified to allow NCP over TCP/IP decodes by James Coe <jammer@cin.net> * - * $Id: packet-ncp.c,v 1.50 2001/11/13 23:55:30 gram Exp $ + * $Id: packet-ncp.c,v 1.51 2001/12/03 03:59:37 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 2000 Gerald Combs - * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -399,9 +398,11 @@ proto_register_ncp(void) void proto_reg_handoff_ncp(void) { - dissector_add("tcp.port", TCP_PORT_NCP, dissect_ncp, proto_ncp); - dissector_add("udp.port", UDP_PORT_NCP, dissect_ncp, proto_ncp); - dissector_add("ipx.packet_type", IPX_PACKET_TYPE_NCP, dissect_ncp, - proto_ncp); - dissector_add("ipx.socket", IPX_SOCKET_NCP, dissect_ncp, proto_ncp); + dissector_handle_t ncp_handle; + + ncp_handle = create_dissector_handle(dissect_ncp, proto_ncp); + dissector_add("tcp.port", TCP_PORT_NCP, ncp_handle); + dissector_add("udp.port", UDP_PORT_NCP, ncp_handle); + dissector_add("ipx.packet_type", IPX_PACKET_TYPE_NCP, ncp_handle); + dissector_add("ipx.socket", IPX_SOCKET_NCP, ncp_handle); } |