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-rx.c | |
parent | 8d0ea8bc932de5cf57183a593be160515af064d9 (diff) |
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-rx.c')
-rw-r--r-- | packet-rx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packet-rx.c b/packet-rx.c index cdb332de15..9ea2e5aa94 100644 --- a/packet-rx.c +++ b/packet-rx.c @@ -4,7 +4,7 @@ * Based on routines from tcpdump patches by * Ken Hornstein <kenh@cmf.nrl.navy.mil> * - * $Id: packet-rx.c,v 1.27 2001/11/03 00:58:49 guy Exp $ + * $Id: packet-rx.c,v 1.28 2001/12/03 03:59:39 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -729,6 +729,8 @@ proto_register_rx(void) void proto_reg_handoff_rx(void) { + dissector_handle_t rx_handle; + int port; /* @@ -738,8 +740,8 @@ proto_reg_handoff_rx(void) /* Ports in the range UDP_PORT_RX_LOW to UDP_PORT_RX_HIGH are all used for various AFS services. */ + rx_handle = create_dissector_handle(dissect_rx, proto_rx); for (port = UDP_PORT_RX_LOW; port <= UDP_PORT_RX_HIGH; port++) - dissector_add("udp.port", port, dissect_rx, proto_rx); - dissector_add("udp.port", UDP_PORT_RX_AFS_BACKUPS, dissect_rx, - proto_rx); + dissector_add("udp.port", port, rx_handle); + dissector_add("udp.port", UDP_PORT_RX_AFS_BACKUPS, rx_handle); } |