aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/packet_win.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/packet_win.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/packet_win.c')
-rw-r--r--gtk/packet_win.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/packet_win.c b/gtk/packet_win.c
index e6a8433a33..29ebccbcad 100644
--- a/gtk/packet_win.c
+++ b/gtk/packet_win.c
@@ -3,7 +3,7 @@
*
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet_win.c,v 1.29 2001/12/16 22:16:14 guy Exp $
+ * $Id: packet_win.c,v 1.30 2001/12/18 19:09:08 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -63,6 +63,7 @@
#include "keys.h"
#include "gtkglobals.h"
#include "plugins.h"
+#include "epan_dissect.h"
/* Data structure holding information about a packet-detail window. */
struct PacketWinData {
@@ -166,8 +167,9 @@ create_new_window(char *Title, gint tv_size, gint bv_size)
memcpy(&DataPtr->pseudo_header, &cfile.pseudo_header, sizeof DataPtr->pseudo_header);
DataPtr->pd = g_malloc(DataPtr->frame->cap_len);
memcpy(DataPtr->pd, cfile.pd, DataPtr->frame->cap_len);
- DataPtr->edt = epan_dissect_new(&DataPtr->pseudo_header, DataPtr->pd, DataPtr->frame,
- TRUE, TRUE, &cfile.cinfo);
+ DataPtr->edt = epan_dissect_new(TRUE, TRUE);
+ epan_dissect_run(DataPtr->edt, &DataPtr->pseudo_header, DataPtr->pd,
+ DataPtr->frame, &cfile.cinfo);
DataPtr->main = main_w;
DataPtr->tv_scrollw = tv_scrollw;
DataPtr->tree_view = tree_view;