aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ncp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-11-17 21:58:33 +0000
committerGuy Harris <guy@alum.mit.edu>1999-11-17 21:58:33 +0000
commit4fddc1f3284d735e439f1b30b5c351994a8b0e6d (patch)
treebf2778e6e4a39d17911244ab0e2e5a1e10db2c1c /packet-ncp.c
parentcd478752a11caccf21882feb1bf5b00e96095922 (diff)
Provide a general mechanism by which dissectors can register "init"
routines, which are called before a dissection pass is made over all the packets in a capture - the "init" routine would clear out any state information that needs to be initialized before such a dissection pass. Make the NCP, SMB, AFS, and ONC RPC dissectors register their "init" routines with that mechanism, have the code that reads in a capture file call the routine that calls all registered "init" routines rather than calling a wired-in set of "init" routines, and also have the code that runs a filtering or colorizing pass over all the packets call that routine, as a filtering or colorizing pass is a dissection pass. Have the ONC RPC "init" routine zero out the table of RPC calls, so that it completely erases any state from the previous dissection pass (so that, for example, if you run a filtering pass, it doesn't mark any non-duplicate packets as duplicates because it remembers them from the previous pass). svn path=/trunk/; revision=1050
Diffstat (limited to 'packet-ncp.c')
-rw-r--r--packet-ncp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/packet-ncp.c b/packet-ncp.c
index 6d6b62591f..d45bc70d31 100644
--- a/packet-ncp.c
+++ b/packet-ncp.c
@@ -2,7 +2,7 @@
* Routines for NetWare Core Protocol
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-ncp.c,v 1.21 1999/11/16 11:42:40 guy Exp $
+ * $Id: packet-ncp.c,v 1.22 1999/11/17 21:58:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -388,7 +388,7 @@ guint ncp_hash (gconstpointer v)
/* Initializes the hash table and the mem_chunk area each time a new
* file is loaded or re-loaded in ethereal */
-void
+static void
ncp_init_protocol(void)
{
#if defined(DEBUG_NCP_HASH)
@@ -891,4 +891,5 @@ proto_register_ncp(void)
proto_ncp = proto_register_protocol("NetWare Core Protocol", "ncp");
proto_register_field_array(proto_ncp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ register_init_routine(&ncp_init_protocol);
}