diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2001-12-18 19:09:08 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2001-12-18 19:09:08 +0000 |
commit | 791f5774d0fdabdb706bfd7056e534713cc4e4d6 (patch) | |
tree | 35f987f9914fead0fb5fefe79df280b7340831b4 /epan/dfilter/dfilter-int.h | |
parent | 4e013a44de86f8146cfd7d440adb67366e37273a (diff) |
Provide for per-protocol-tree data in the proto_tree code.
Put a hash-table of "interesting" fields in the per-proto-tree data.
The dfilter code records which fields/protocols are "interesting" (by which
I mean, their value or existence is checked). Thus, the proto_tree routines
can create special arrays of field_info*'s that are ready for the dfilter
engine to use during a filter operation.
Also store the "proto_tree_is_visible" boolean, renamed "visible", in
the per-proto-tree data.
Move epan_dissect_t to its own header file to make #include dependencies
easier to handle.
Provide epan_dissect_fill_in_columns(), which accepts just the epan_dissect_t*
as an argument.
epan_dissect_new() needs to be followed by epan_dissect_run() for the
dissection to actually take place. Between those two calls,
epan_dissect_prime_dfilter() can be run 0, 1, or multiple times in order to
prime the empty proto_tree with the "intersesting" fields from the dfilter_t.
svn path=/trunk/; revision=4422
Diffstat (limited to 'epan/dfilter/dfilter-int.h')
-rw-r--r-- | epan/dfilter/dfilter-int.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dfilter/dfilter-int.h b/epan/dfilter/dfilter-int.h index c1e6774438..89e1857f8f 100644 --- a/epan/dfilter/dfilter-int.h +++ b/epan/dfilter/dfilter-int.h @@ -1,5 +1,5 @@ /* - * $Id: dfilter-int.h,v 1.3 2001/02/15 06:22:45 guy Exp $ + * $Id: dfilter-int.h,v 1.4 2001/12/18 19:09:06 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -35,6 +35,8 @@ struct _dfilter_t { int num_registers; GList **registers; gboolean *attempted_load; + int *interesting_fields; + int num_interesting_fields; }; typedef struct { @@ -43,6 +45,7 @@ typedef struct { gboolean syntax_error; GPtrArray *insns; GHashTable *loaded_fields; + GHashTable *interesting_fields; int next_insn_id; int next_register; } dfwork_t; |