diff options
author | Sake Blok <sake@euronet.nl> | 2008-03-21 06:11:45 +0000 |
---|---|---|
committer | Sake Blok <sake@euronet.nl> | 2008-03-21 06:11:45 +0000 |
commit | f17067c174ac795d9f8b902e659b2edaa287ef79 (patch) | |
tree | bb9a18d1c3137c418a29252193f98824c7d0e67e /tshark.c | |
parent | e4f89044bda90bb778fe40a0d40be467798dcfb5 (diff) |
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
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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. */ |