diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-27 02:54:44 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-27 02:54:44 +0000 |
commit | 26a939c040765acb6d13eb1b6914287bb60041ff (patch) | |
tree | 979c246af1b4c25a9281402994c2545eb869eb96 /cfile.h | |
parent | 166e39cbe52bf6d6e9075cfc5d8b348ac0fd0d79 (diff) |
Create a new frame_data_sequence data type; it represents a dense
sequence of frame_data structures, indexed by the frame number. Extract
the relevant bits of the capture_file data structure and move them to
the frame_data_sequence, and move the relevant code from cfile.c and
tweak it to handle frame_data_sequence structures.
Have a possibly-null pointer to a frame_data_sequence structure in the
capture_file structure; if it's null, we aren't keeping a sequence of
frame_data structures (we don't keep that sequence when we're doing
one-pass processing in TShark).
Nothing in libwireshark should care about a capture_file structure; get
rid of some unnecessary includes of cfile.h.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36881 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'cfile.h')
-rw-r--r-- | cfile.h | 18 |
1 files changed, 3 insertions, 15 deletions
@@ -25,6 +25,8 @@ #ifndef __CFILE_H__ #define __CFILE_H__ +#include "frame_data_sequence.h" + /* Current state of file. */ typedef enum { FILE_CLOSED, /* No file open */ @@ -98,7 +100,7 @@ typedef struct _capture_file { union wtap_pseudo_header pseudo_header; /* Packet pseudo_header */ guint8 pd[WTAP_MAX_PACKET_SIZE]; /* Packet data */ /* frames */ - void *ptree_root; /* Pointer to the root node */ + frame_data_sequence *frames; /* Sequence of frames, if we're keeping that information */ guint32 first_displayed; /* Frame number of first frame displayed */ guint32 last_displayed; /* Frame number of last frame displayed */ column_info cinfo; /* Column formatting information */ @@ -110,18 +112,4 @@ typedef struct _capture_file { extern void cap_file_init(capture_file *cf); -extern frame_data *cap_file_add_fdata(capture_file *cf, frame_data *fdata); - -/* - * Find the frame_data for the specified frame number. - * Do some caching to make this work reasonably fast for - * forward and backward sequential passes through the packets. - */ -extern frame_data *cap_file_find_fdata(capture_file *cf, guint32 num); - -/* - * Free up all the frame information for a capture file. - */ -extern void cap_file_free_frames(capture_file *cf); - #endif /* cfile.h */ |