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:
parent
e4f89044bd
commit
f17067c174
12
rawshark.c
12
rawshark.c
|
@ -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. */
|
||||
|
|
12
tshark.c
12
tshark.c
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue