From bced8711f67b5dba76e9d6cdfd1a0246b235df27 Mon Sep 17 00:00:00 2001 From: Guy Harris 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. svn path=/trunk/; revision=4308 --- packet-chdlc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'packet-chdlc.c') diff --git a/packet-chdlc.c b/packet-chdlc.c index 8017145559..5c66ee6b46 100644 --- a/packet-chdlc.c +++ b/packet-chdlc.c @@ -1,7 +1,7 @@ /* packet-chdlc.c * Routines for Cisco HDLC packet disassembly * - * $Id: packet-chdlc.c,v 1.6 2001/11/26 04:52:49 hagbard Exp $ + * $Id: packet-chdlc.c,v 1.7 2001/12/03 03:59:33 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -197,8 +197,11 @@ proto_register_chdlc(void) void proto_reg_handoff_chdlc(void) { + dissector_handle_t chdlc_handle; + data_handle = find_dissector("data"); - dissector_add("wtap_encap", WTAP_ENCAP_CHDLC, dissect_chdlc, proto_chdlc); + chdlc_handle = find_dissector("chdlc"); + dissector_add("wtap_encap", WTAP_ENCAP_CHDLC, chdlc_handle); } #define SLARP_REQUEST 0 @@ -311,5 +314,8 @@ proto_register_slarp(void) void proto_reg_handoff_slarp(void) { - dissector_add("chdlctype", CISCO_SLARP, dissect_slarp, proto_slarp); + dissector_handle_t slarp_handle; + + slarp_handle = create_dissector_handle(dissect_slarp, proto_slarp); + dissector_add("chdlctype", CISCO_SLARP, slarp_handle); } -- cgit v1.2.3