From ce6bcff318c96712a86a07b7689f2409ade845b9 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 26 Oct 2009 19:20:50 +0000 Subject: [PATCH] Note in comments that the dct2000_file_externals_t structure is used for more than just dumping, indicate what stuff is used for dumping, and note that it probably shouldn't be used for that (one should not have to have a Catapult 2000 input file in order to write a Catapult 2000 output file). svn path=/trunk/; revision=30719 --- wiretap/catapult_dct2000.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c index d77b1dbb00..cb7fef5785 100644 --- a/wiretap/catapult_dct2000.c +++ b/wiretap/catapult_dct2000.c @@ -73,9 +73,21 @@ typedef struct /*******************************************************************/ -/* Information stored external to a file (wtap) needed for dumping */ +/* Information stored external to a file (wtap) needed for reading and dumping */ typedef struct dct2000_file_externals { + /* Remember the time at the start of capture */ + time_t start_secs; + guint32 start_usecs; + + /* + * The following information is needed only for dumping. + * + * XXX - Wiretap is not *supposed* to require that a packet being + * dumped come from a file of the same type that you currently have + * open; this should be fixed. + */ + /* Buffer to hold first line, including magic and format number */ gchar firstline[MAX_FIRST_LINE_LENGTH]; gint firstline_length; @@ -84,13 +96,8 @@ typedef struct dct2000_file_externals gchar secondline[MAX_TIMESTAMP_LINE_LENGTH]; gint secondline_length; - /* Remember the time at the start of capture */ - time_t start_secs; - guint32 start_usecs; - /* Hash table to store text prefix data part of displayed packets. Records (file offset -> line_prefix_info_t) - N.B. This is only needed for dumping */ GHashTable *packet_prefix_table; } dct2000_file_externals_t;