Make tshark and rawshark behave similar to wireshark when "frame.time_delta_displayed" is

used within a display filter.

(the usefullness of "frame.time_delta_displayed" in a display filter is very limited
 since it bites it's own tail. Still, wireshark and tshark should at least show the
 same behaviour)


svn path=/trunk/; revision=24708
This commit is contained in:
Sake Blok 2008-03-21 06:11:45 +00:00
parent e4f89044bd
commit f17067c174
2 changed files with 16 additions and 8 deletions

View File

@ -1039,12 +1039,16 @@ fill_in_fdata(frame_data *fdata, capture_file *cf,
cf->elapsed_time = fdata->rel_ts;
}
/* If we don't have the time stamp of the previous displayed packet,
it's because this is the first packet that's being displayed. Save the time
stamp of this packet as the time stamp of the previous displayed
packet. */
if (nstime_is_unset(&prev_dis_ts))
prev_dis_ts = fdata->abs_ts;
/* Get the time elapsed between the previous displayed packet and
this packet. */
if (nstime_is_unset(&prev_dis_ts))
nstime_set_zero(&fdata->del_dis_ts);
else
nstime_delta(&fdata->del_dis_ts, &fdata->abs_ts, &prev_dis_ts);
nstime_delta(&fdata->del_dis_ts, &fdata->abs_ts, &prev_dis_ts);
/* Get the time elapsed between the previous captured packet and
this packet. */

View File

@ -2379,12 +2379,16 @@ fill_in_fdata(frame_data *fdata, capture_file *cf,
cf->elapsed_time = fdata->rel_ts;
}
/* If we don't have the time stamp of the previous displayed packet,
it's because this is the first packet that's being displayed. Save the time
stamp of this packet as the time stamp of the previous displayed
packet. */
if (nstime_is_unset(&prev_dis_ts))
prev_dis_ts = fdata->abs_ts;
/* Get the time elapsed between the previous displayed packet and
this packet. */
if (nstime_is_unset(&prev_dis_ts))
nstime_set_zero(&fdata->del_dis_ts);
else
nstime_delta(&fdata->del_dis_ts, &fdata->abs_ts, &prev_dis_ts);
nstime_delta(&fdata->del_dis_ts, &fdata->abs_ts, &prev_dis_ts);
/* Get the time elapsed between the previous captured packet and
this packet. */