aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/colors.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2001-12-18 19:09:08 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2001-12-18 19:09:08 +0000
commit791f5774d0fdabdb706bfd7056e534713cc4e4d6 (patch)
tree35f987f9914fead0fb5fefe79df280b7340831b4 /gtk/colors.c
parent4e013a44de86f8146cfd7d440adb67366e37273a (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 'gtk/colors.c')
-rw-r--r--gtk/colors.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/gtk/colors.c b/gtk/colors.c
index 4bb1e5c3ed..1f7bb969e8 100644
--- a/gtk/colors.c
+++ b/gtk/colors.c
@@ -1,7 +1,7 @@
/* colors.c
* Definitions for color structures and routines
*
- * $Id: colors.c,v 1.16 2001/12/02 00:16:02 guy Exp $
+ * $Id: colors.c,v 1.17 2001/12/18 19:09:07 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -127,6 +127,25 @@ delete_color_filter(color_filter_t *colorf)
g_free(colorf);
}
+
+static void
+prime_edt(gpointer data, gpointer user_data)
+{
+ color_filter_t *colorf = data;
+ epan_dissect_t *edt = user_data;
+
+ epan_dissect_prime_dfilter(edt, colorf->c_colorfilter);
+}
+
+/* Prime the epan_dissect_t with all the compiler
+ * color filters in 'filter_list'. */
+void
+filter_list_prime_edt(epan_dissect_t *edt)
+{
+ g_slist_foreach(filter_list, prime_edt, edt);
+}
+
+
/* read filters from the file */
static gboolean
read_filters(colfilter *filter)