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-ipsec.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-ipsec.c')
-rw-r--r-- | packet-ipsec.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/packet-ipsec.c b/packet-ipsec.c index cadf394cb8..0a74e0c15a 100644 --- a/packet-ipsec.c +++ b/packet-ipsec.c @@ -1,7 +1,7 @@ /* packet-ipsec.c * Routines for IPsec/IPComp packet disassembly * - * $Id: packet-ipsec.c,v 1.34 2001/11/26 04:52:50 hagbard Exp $ + * $Id: packet-ipsec.c,v 1.35 2001/12/03 03:59:35 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -350,8 +350,13 @@ proto_register_ipsec(void) void proto_reg_handoff_ipsec(void) { + dissector_handle_t esp_handle, ah_handle, ipcomp_handle; + data_handle = find_dissector("data"); - dissector_add("ip.proto", IP_PROTO_AH, dissect_ah, proto_ah); - dissector_add("ip.proto", IP_PROTO_ESP, dissect_esp, proto_esp); - dissector_add("ip.proto", IP_PROTO_IPCOMP, dissect_ipcomp, proto_ipcomp); + ah_handle = find_dissector("ah"); + dissector_add("ip.proto", IP_PROTO_AH, ah_handle); + esp_handle = find_dissector("esp"); + dissector_add("ip.proto", IP_PROTO_ESP, esp_handle); + ipcomp_handle = create_dissector_handle(dissect_ipcomp, proto_ipcomp); + dissector_add("ip.proto", IP_PROTO_IPCOMP, ipcomp_handle); } |