Add pinfo to new_packet_list_append() this should give us the abillity

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?

svn path=/trunk/; revision=29237
This commit is contained in:
Anders Broman 2009-07-29 20:58:47 +00:00
parent ad74edb139
commit 26d1dfcf4c
3 changed files with 4 additions and 3 deletions

2
file.c
View File

@ -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);

View 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;

View File

@ -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);