aboutsummaryrefslogtreecommitdiffstats
path: root/file.h
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2001-02-01 20:21:25 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2001-02-01 20:21:25 +0000
commit8f1fff2e6a5c114c6beafd2983afb55acd3d66ae (patch)
treee33c08662c708dcfe71591897fe6ffab53bce135 /file.h
parent07a925ef8b0568a2c5b8098d5734364a40eeb2f6 (diff)
Create a more modular type system for the FT_* types. Put them
into epan/ftypes. Re-write display filter routines using Lemon parser instead of yacc. Besides using a different tool, the new grammar is much simpler, while the display filter engine itself is more powerful and more easily extended. Add dftest executable, to test display filter "bytecode" generation. Add option to "configure" to build dftest or randpkt, both of which are not built by default. Implement Ed Warnicke's ideas about dranges in the new display filter and ftype code. Remove type FT_TEXT_ONLY in favor of FT_NONE, and have protocols registered as FT_PROTOCOL. Thus, FT_NONE is used only for simple labels in the proto tree, while FT_PROTOCOL is used for protocols. This was necessary for being able to make byte slices (ranges) out of protocols, like "frame[0:3]" Win32 Makefile.nmake's will be added tonight. svn path=/trunk/; revision=2967
Diffstat (limited to 'file.h')
-rw-r--r--file.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/file.h b/file.h
index 196a18debb..b42cd582df 100644
--- a/file.h
+++ b/file.h
@@ -1,7 +1,7 @@
/* file.h
* Definitions for file structures and routines
*
- * $Id: file.h,v 1.79 2001/01/28 23:56:27 guy Exp $
+ * $Id: file.h,v 1.80 2001/02/01 20:21:13 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -31,12 +31,9 @@
#endif
#include "wiretap/wtap.h"
-
-#include "dfilter.h"
+#include "dfilter/dfilter.h"
#include "print.h"
-
#include <errno.h>
-
#include <epan.h>
#ifdef HAVE_LIBZ
@@ -81,10 +78,10 @@ typedef struct _capture_file {
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 */
struct _colfilter *colors; /* Colors for colorizing packet window */
- dfilter *dfcode; /* Compiled display filter program */
+ dfilter_t *dfcode; /* Compiled display filter program */
#ifdef HAVE_LIBPCAP
gchar *cfilter; /* Capture filter string */
#endif
@@ -126,7 +123,7 @@ void colorize_packets(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 */