/* file.h
* Definitions for file structures and routines
*
- * $Id: file.h,v 1.76 2000/08/21 15:45:21 deniel Exp $
+ * $Id: file.h,v 1.81 2001/02/11 09:28:15 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
#endif
#include "wiretap/wtap.h"
-
-#ifdef HAVE_LIBPCAP
-#include <pcap.h>
-#endif
-
-#include "dfilter.h"
-#include "gtk/colors.h" /* XXX */
+#include "dfilter/dfilter.h"
#include "print.h"
-
#include <errno.h>
+#include <epan.h>
#ifdef HAVE_LIBZ
#include "zlib.h"
#define file_close fclose
#endif /* HAVE_LIBZ */
-typedef struct bpf_program bpf_prog;
-
/* Current state of file. */
typedef enum {
FILE_CLOSED, /* No file open */
int lnk_t; /* Link-layer type with which to save capture */
guint32 vers; /* Version. For tcpdump minor is appended to major */
guint32 count; /* Packet count */
+ gboolean drops_known; /* TRUE if we know how many packets were dropped */
guint32 drops; /* Dropped packets */
guint32 esec; /* Elapsed seconds */
guint32 eusec; /* Elapsed microseconds */
gchar *save_file; /* File that user saved capture to */
int save_file_fd; /* File descriptor for saved file */
wtap *wth; /* Wiretap session */
- dfilter *rfcode; /* Compiled read filter program */
+ dfilter_t *rfcode; /* Compiled read filter program */
gchar *dfilter; /* Display filter string */
- colfilter *colors; /* Colors for colorizing packet window */
- dfilter *dfcode; /* Compiled display filter program */
+ struct _colfilter *colors; /* Colors for colorizing packet window */
+ dfilter_t *dfcode; /* Compiled display filter program */
#ifdef HAVE_LIBPCAP
gchar *cfilter; /* Capture filter string */
- bpf_prog fcode; /* Compiled capture filter program */
#endif
gchar *sfilter; /* Search filter string */
gboolean sbackward; /* TRUE if search is backward, FALSE if forward */
column_info cinfo; /* Column formatting information */
frame_data *current_frame; /* Frame data for current frame */
proto_tree *protocol_tree; /* Protocol tree for currently selected packet */
+ epan_dissect_t *edt; /* Protocol dissection fo rcurrently selected packet */
FILE *print_fh; /* File we're printing to */
} capture_file;
void redissect_packets(capture_file *cf);
int print_packets(capture_file *cf, print_args_t *print_args);
void change_time_formats(capture_file *);
-gboolean find_packet(capture_file *cf, dfilter *sfcode);
+gboolean find_packet(capture_file *cf, dfilter_t *sfcode);
typedef enum {
FOUND_FRAME, /* found the frame */