Add pinfo to new_packet_list_append() this should give us the abillity
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 29 Jul 2009 20:58:47 +0000 (20:58 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 29 Jul 2009 20:58:47 +0000 (20:58 +0000)
to store (most) of the underlying data rather than the strings in the store and render it when we need it, thuss saving storage space and loading time.

Idealy we should not store the complete fdata or pinfo structures
but rather just the data relevant to the currently selected/used columns. I'm not entierly sure how to accomplish that however.

Dynamically allocated array to hold pointers to the actual data?

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29237 f5534014-38df-0310-8fa8-9805f1628bb7

file.c
gtk/new_packet_list.c
ui_util.h

diff --git a/file.c b/file.c
index 24efcaaae0e170a215b25e260349905617071f36..18225cb541736b8500a85d944f959bdd5ed86649 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1132,7 +1132,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
      * in the following function when not using the new packet list. */
     fdata->color_filter = color_filters_colorize_packet(0, edt); 
 
-    row = new_packet_list_append(&cf->cinfo, fdata);
+    row = new_packet_list_append(&cf->cinfo, fdata, &edt->pi);
 #else
     row = packet_list_append(cf->cinfo.col_data, fdata);
 
index bdad8d0495d986b78327f53504b2259c9bf39bfb..2ebcb648b319997a3d8b2d35c58aa9582b1ef928 100644 (file)
@@ -41,6 +41,7 @@
 #include "packet_list_store.h"
 #include "epan/column_info.h"
 #include "epan/prefs.h"
+#include <epan/packet.h>
 #include "../ui_util.h"
 #include "epan/emem.h"
 #include "globals.h"
@@ -98,7 +99,7 @@ new_packet_list_create(void)
 }
 
 guint
-new_packet_list_append(column_info *cinfo, frame_data *fdata)
+new_packet_list_append(column_info *cinfo, frame_data *fdata, packet_info *pinfo _U_)
 {
        gint i;
        row_data_t row_data;
index 92e5bb285ab2e24b5f63a1d9f01f363abe2f8289..6816f1e8873d8db53d7fae90573cd22cb77e5b48 100644 (file)
--- a/ui_util.h
+++ b/ui_util.h
@@ -64,7 +64,7 @@ void new_packet_list_freeze(void);
 void new_packet_list_thaw(void);
 void new_packet_list_next(void);
 void new_packet_list_prev(void);
-guint new_packet_list_append(column_info *cinfo, frame_data *fdata);
+guint new_packet_list_append(column_info *cinfo, frame_data *fdata, packet_info *pinfo);
 frame_data * new_packet_list_get_row_data(gint row);
 void new_packet_list_set_selected_row(gint row);
 void new_packet_list_enable_color(gboolean enable);