Works for me.
Jeff Foster
>
>
> > I've been thinking about consolidating the following two fields in
> > struct frame_data into a set of bitfields, since they waste a lot of
> > memory when dealing with lare traces:
>
> Definitely (although, from my experiments, the worst offender for
> sucking up memory on large traces appears to be...
>
> ...the GtkClist itself).
Here's my attempt to convert those fields to bit fields and to provide
a "visited" flag, which is 0 during the first time the packet is dissected,
and 1 after that.
struct frame_data now looks like this:
typedef struct _frame_data {
struct _frame_data *next; /* Next element in list */
struct _frame_data *prev; /* Previous element in list */
GSList *pfd; /* Per frame proto data */
guint32 num; /* Frame number */
guint32 pkt_len; /* Packet length */
guint32 cap_len; /* Amount actually captured */
guint32 rel_secs; /* Relative seconds */
guint32 rel_usecs; /* Relative microseconds */
guint32 abs_secs; /* Absolute seconds */
guint32 abs_usecs; /* Absolute microseconds */
guint32 del_secs; /* Delta seconds */
guint32 del_usecs; /* Delta microseconds */
long file_off; /* File offset */
column_info *cinfo; /* Column formatting information */
int lnk_t; /* Per-packet encapsulation/data-link type */
struct {
unsigned int passed_dfilter : 1; /* 1 = display, 0 = no display
*/
unsigned int encoding : 2; /* Character encoding (ASCII,
EBCDIC...) */
unsigned int visited : 1; /* Has this packet been visited
yet? 1=Yes,0=No*/
} flags;
union pseudo_header pseudo_header; /* "pseudo-header" from wiretap */
} frame_data;
For those people that need to know if the dissection of a packet is the
first dissection,
does this meet your needs?
--gilbert