diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-04-04 07:03:07 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-04-04 07:03:07 +0000 |
commit | c2b1feea055c65f002bd86d4f4dba6b48453e942 (patch) | |
tree | 182de17caf9f6b68d2197d3aaa68ce1e8c8fc20e /packet.c | |
parent | 5f0fc518c79f381ea86ee3746ef32e96eb606985 (diff) | |
download | wireshark-c2b1feea055c65f002bd86d4f4dba6b48453e942.tar.gz |
Turn "ethereal_proto_init()" and "ethereal_proto_cleanup()" into
"dissect_init()" and "dissect_cleanup()", in "packet.c", so that we
don't duplicate those routines in Ethereal and Tethereal (and so on),
and don't have to remember to update N different versions of them if we
have to change the way we do one-time initialization and cleanup.
svn path=/trunk/; revision=1790
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* packet.c * Routines for packet disassembly * - * $Id: packet.c,v 1.72 2000/04/04 05:37:36 guy Exp $ + * $Id: packet.c,v 1.73 2000/04/04 07:02:56 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -1037,6 +1037,24 @@ void blank_packetinfo(void) pi.destport = 0; } +/* Do all one-time initialization. */ +void +dissect_init(void) +{ + proto_init(); + dfilter_init(); +#ifdef HAVE_PLUGINS + init_plugins(); +#endif +} + +void +dissect_cleanup(void) +{ + proto_cleanup(); + dfilter_cleanup(); +} + /* Allow protocols to register "init" routines, which are called before we make a pass through a capture file and dissect all its packets (e.g., when we read in a new capture file, or run a "filter packets" |