summaryrefslogtreecommitdiff
path: root/packet-ncp-int.h
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2002-01-05 04:12:17 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2002-01-05 04:12:17 +0000
commit0b9b02c6ea4bbf4a7792aa1493b507fd68e8a87b (patch)
treeac264635defc42eb14ee180db1b32d9b5032458c /packet-ncp-int.h
parent3ed03cadf65462aa5253098f0df781022cb3a0ed (diff)
downloadwireshark-0b9b02c6ea4bbf4a7792aa1493b507fd68e8a87b.tar.gz
Long NCP traces can easily have many packets whose "uniqueness"
variables wrap-around. Since the request/reply packets are related via a hash based on these uniqueness variables, long NCP traces can have mis-matches reqeust/reply records. Thus, only do the hash-lookup for the reply packet during the first sequential scan of the trace file. Once the pertinent info is found, store it in the packet's private data area. Since the memory allocated for the hash and for the structures that make up the keys are no longer needed after the first sequential run through the trace file, arrange to free that memory after the first sequential run. Similar to the register_init_routine() that allows dissectors to register callbacks for calling *before* a capture file is loaded, set up a register_postseq_cleanup_routine() function that allows dissectors to register callbacks for calling *after* the first sequential run-through of the trace file is made. This is not a *final* cleanup callback, since Ethereal will still have that trace file open for random-access reading. I didn't have tethereal call postseq_cleanup_all_protocols() since tethereal doesn't keep the trace file open for random-access reading. I could easily be swayed to make tethereal call that function, however. svn path=/trunk/; revision=4484
Diffstat (limited to 'packet-ncp-int.h')
-rw-r--r--packet-ncp-int.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/packet-ncp-int.h b/packet-ncp-int.h
index c0fb933272..57262d0734 100644
--- a/packet-ncp-int.h
+++ b/packet-ncp-int.h
@@ -2,7 +2,7 @@
* Structures and functions for NetWare Core Protocol.
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-ncp-int.h,v 1.4 2001/11/13 23:55:30 gram Exp $
+ * $Id: packet-ncp-int.h,v 1.5 2002/01/05 04:12:14 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -59,12 +59,9 @@ void dissect_ncp_reply(tvbuff_t *, packet_info*, guint16,
guint8, proto_tree*, proto_tree*);
void ncp_hash_insert(conversation_t *conversation, guint8 nw_sequence,
- guint16 ncp_type, const ncp_record *ncp_rec);
+ const ncp_record *ncp_rec);
-/* Returns TRUE or FALSE. If TRUE, the record was found and
- * ncp_type and ncp_rec are set. */
-gboolean ncp_hash_lookup(conversation_t*, guint8 nw_sequence,
- guint16 *ncp_type, const ncp_record **ncp_rec);
+const ncp_record* ncp_hash_lookup(conversation_t*, guint8 nw_sequence);
extern int proto_ncp;