diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-07-24 03:22:50 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-07-24 03:22:50 +0000 |
commit | c6ccba12d12ad20fef47e9e55a5b4d9a1bfab673 (patch) | |
tree | 270e853ce024a9b2228a19ea76c8602bb44cf4b0 /file.h | |
parent | 520e977a5b17a70f44cf96831e4baaf99705a6b9 (diff) | |
download | wireshark-c6ccba12d12ad20fef47e9e55a5b4d9a1bfab673.tar.gz wireshark-c6ccba12d12ad20fef47e9e55a5b4d9a1bfab673.tar.bz2 wireshark-c6ccba12d12ad20fef47e9e55a5b4d9a1bfab673.zip |
Turn "protocol_tree" and "fd" from global variables into members of a
"capture_file" structure, make a "select_packet()" routine to parallel
"unselect_packet()", and have "unselect_packet()" free the protocol tree
that the "protocol_tree" member of the "capture_file" passed to it
points to.
It should now be impossible to do a "Print Packet" operation if no
packet has been selected, so remove the check for that (we'll probably
just blow up if it happens; if it does, that means we probably forgot to
gray out "/File/Print Packet" somewhere, so we should fix that).
svn path=/trunk/; revision=385
Diffstat (limited to 'file.h')
-rw-r--r-- | file.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* file.h * Definitions for file structures and routines * - * $Id: file.h,v 1.22 1999/07/24 02:42:50 guy Exp $ + * $Id: file.h,v 1.23 1999/07/24 03:22:50 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -78,6 +78,8 @@ typedef struct _capture_file { column_info cinfo; /* Column formatting information */ int selected_packet; /* Index in packet list of currently selected packet, if any */ int selected_row; /* Row in packet display of currently selected packet, if any */ + frame_data *fd; /* Frame data for currently selected packet */ + proto_tree *protocol_tree; /* Protocol tree for currently selected packet */ FILE *print_fh; /* File we're printing to */ } capture_file; @@ -103,6 +105,7 @@ int tail_cap_file(char *, capture_file *); int print_packets(capture_file *cf, int to_file, const char *dest); void filter_packets(capture_file *); void change_time_formats(capture_file *); +void select_packet(capture_file *, int); void unselect_packet(capture_file *); /* Moves or copies a file. Returns 0 on failure, 1 on success */ |