} else
cf->has_snap = TRUE;
+ /* Allocate a frame_data_sequence for the frames in this file */
+ cf->frames = new_frame_data_sequence();
+
nstime_set_zero(&cf->elapsed_time);
nstime_set_unset(&first_ts);
nstime_set_unset(&prev_dis_ts);
dfilter_free(cf->rfcode);
cf->rfcode = NULL;
- cap_file_free_frames(cf);
+ free_frame_data_sequence(cf->frames);
+ cf->frames = NULL;
cf_unselect_packet(cf); /* nothing to select */
cf->first_displayed = 0;
cf->last_displayed = 0;
WTAP_ENCAP_PER_PACKET). */
cf->lnk_t = wtap_file_encap(cf->wth);
- cf->current_frame = cap_file_find_fdata(cf, cf->first_displayed);
+ cf->current_frame = frame_data_sequence_find(cf->frames, cf->first_displayed);
cf->current_row = 0;
new_packet_list_thaw();
if (passed) {
/* This does a shallow copy of fdlocal, which is good enough. */
- fdata = cap_file_add_fdata(cf, &fdlocal);
+ fdata = frame_data_sequence_add(cf->frames, &fdlocal);
+ cf->count++;
cf->f_datalen = offset + fdlocal.cap_len;
if (!cf->redissecting) {
selected_frame_seen = FALSE;
for (framenum = 1; framenum <= cf->count; framenum++) {
- fdata = cap_file_find_fdata(cf, framenum);
+ fdata = frame_data_sequence_find(cf->frames, framenum);
/* Create the progress bar if necessary.
We check on every iteration of the loop, so that it takes no
would leave the user stuck with an Wireshark grinding on
until it finishes. Should we just stick them with that? */
for (; framenum <= cf->count; framenum++) {
- fdata = cap_file_find_fdata(cf, framenum);
+ fdata = frame_data_sequence_find(cf->frames, framenum);
fdata->flags.visited = 0;
frame_data_cleanup(fdata);
}
cum_bytes = 0;
for (framenum = 1; framenum <= cf->count; framenum++) {
- fdata = cap_file_find_fdata(cf, framenum);
+ fdata = frame_data_sequence_find(cf->frames, framenum);
/* just add some value here until we know if it is being displayed or not */
fdata->cum_bytes = cum_bytes + fdata->pkt_len;
/* Iterate through all the packets, printing the packets that
were selected by the current display filter. */
for (framenum = 1; framenum <= cf->count; framenum++) {
- fdata = cap_file_find_fdata(cf, framenum);
+ fdata = frame_data_sequence_find(cf->frames, framenum);
/* Create the progress bar if necessary.
We check on every iteration of the loop, so that it takes no
} else
framenum++;
}
- fdata = cap_file_find_fdata(cf, framenum);
+ fdata = frame_data_sequence_find(cf->frames, framenum);
count++;
{
frame_data *fdata;
- fdata = cap_file_find_fdata(cf, fnumber);
+ fdata = frame_data_sequence_find(cf->frames, fnumber);
if (fdata == NULL) {
/* we didn't find a packet with that packet number */
GtkCList; see the comment in "add_packet_to_packet_list()". */
if (row == 0 && cf->first_displayed == cf->last_displayed)
- fdata = cap_file_find_fdata(cf, cf->first_displayed);
+ fdata = frame_data_sequence_find(cf->frames, cf->first_displayed);
}
/* If fdata _still_ isn't set simply give up. */