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-snmp.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-snmp.c')
-rw-r--r-- | packet-snmp.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/packet-snmp.c b/packet-snmp.c index 63082af4a7..d0b5b7ea46 100644 --- a/packet-snmp.c +++ b/packet-snmp.c @@ -8,7 +8,7 @@ * * See RFCs 1905, 1906, 1909, and 1910 for SNMPv2u. * - * $Id: packet-snmp.c,v 1.74 2001/11/27 07:13:26 guy Exp $ + * $Id: packet-snmp.c,v 1.75 2001/12/03 03:59:39 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -2296,13 +2296,14 @@ proto_register_snmp(void) void proto_reg_handoff_snmp(void) { - dissector_add("udp.port", UDP_PORT_SNMP, dissect_snmp, proto_snmp); - dissector_add("udp.port", UDP_PORT_SNMP_TRAP, dissect_snmp, proto_snmp); - dissector_add("tcp.port", TCP_PORT_SMUX, dissect_smux, proto_smux); - dissector_add("ethertype", ETHERTYPE_SNMP, dissect_snmp, proto_snmp); - dissector_add("ipx.socket", IPX_SOCKET_SNMP_AGENT, dissect_snmp, - proto_snmp); - dissector_add("ipx.socket", IPX_SOCKET_SNMP_SINK, dissect_snmp, - proto_snmp); + dissector_handle_t smux_handle; + + dissector_add("udp.port", UDP_PORT_SNMP, snmp_handle); + dissector_add("udp.port", UDP_PORT_SNMP_TRAP, snmp_handle); + smux_handle = create_dissector_handle(dissect_smux, proto_smux); + dissector_add("tcp.port", TCP_PORT_SMUX, smux_handle); + dissector_add("ethertype", ETHERTYPE_SNMP, snmp_handle); + dissector_add("ipx.socket", IPX_SOCKET_SNMP_AGENT, snmp_handle); + dissector_add("ipx.socket", IPX_SOCKET_SNMP_SINK, snmp_handle); data_handle = find_dissector("data"); } |