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 /packet-range.c | |
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 'packet-range.c')
-rw-r--r-- | packet-range.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-range.c b/packet-range.c index aed5d29ad5..ed9955e094 100644 --- a/packet-range.c +++ b/packet-range.c @@ -76,7 +76,7 @@ static void packet_range_calc(packet_range_t *range) { * for example, the case when TShark is doing a one-pass * read of a file or a live capture. */ - if (cfile.ptree_root != NULL) { + if (cfile.frames != NULL) { /* The next for-loop is used to obtain the amount of packets * to be processed and is used to present the information in * the Save/Print As widget. @@ -87,7 +87,7 @@ static void packet_range_calc(packet_range_t *range) { */ for(framenum = 1; framenum <= cfile.count; framenum++) { - packet = cap_file_find_fdata(&cfile, framenum); + packet = frame_data_sequence_find(cfile.frames, framenum); if (cfile.current_frame == packet) { range->selected_packet = framenum; @@ -128,7 +128,7 @@ static void packet_range_calc(packet_range_t *range) { } for(framenum = 1; framenum <= cfile.count; framenum++) { - packet = cap_file_find_fdata(&cfile, framenum); + packet = frame_data_sequence_find(cfile.frames, framenum); if (framenum >= mark_low && framenum <= mark_high) @@ -181,9 +181,9 @@ static void packet_range_calc_user(packet_range_t *range) { * for example, the case when TShark is doing a one-pass * read of a file or a live capture. */ - if (cfile.ptree_root != NULL) { + if (cfile.frames != NULL) { for(framenum = 1; framenum <= cfile.count; framenum++) { - packet = cap_file_find_fdata(&cfile, framenum); + packet = frame_data_sequence_find(cfile.frames, framenum); if (value_is_in_range(range->user_range, framenum)) { range->user_range_cnt++; |