summaryrefslogtreecommitdiff
path: root/tshark.c
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-09-22 14:23:20 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-09-22 14:23:20 +0000
commit14d2f617c2da878c5b12d39f16d72b0f34672526 (patch)
tree9ca04bc77fb8303f514207249e2eafb2c5616d59 /tshark.c
parent08525e79d7cd7fee1c5936e9d9630d9d57ee4cdb (diff)
downloadwireshark-14d2f617c2da878c5b12d39f16d72b0f34672526.tar.gz
Refactor frame_data_init() into frame_data_set_before_dissect() and frame_data_set_after_dissect().
svn path=/trunk/; revision=30066
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tshark.c b/tshark.c
index d22d77bf9d..820b31c4a5 100644
--- a/tshark.c
+++ b/tshark.c
@@ -2347,8 +2347,7 @@ process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
run a read filter, or we're going to process taps, set up to
do a dissection and do so. */
if (do_dissection) {
- frame_data_init(&fdata, cf->count, &cf->elapsed_time, whdr, offset,
- &cum_bytes, &first_ts, &prev_dis_ts, &prev_cap_ts);
+ frame_data_init(&fdata, cf->count, whdr, offset, cum_bytes);
if (print_packet_info) {
/* Grab any resolved addresses */
@@ -2391,6 +2390,10 @@ process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
cinfo = &cf->cinfo;
else
cinfo = NULL;
+
+ frame_data_set_before_dissect(&fdata, &cf->elapsed_time,
+ &first_ts, &prev_dis_ts, &prev_cap_ts);
+
epan_dissect_run(&edt, pseudo_header, pd, &fdata, cinfo);
tap_push_tapped_queue(&edt);
@@ -2407,11 +2410,10 @@ process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr,
passed = TRUE;
}
+ fdata.flags.passed_dfilter = passed;
+
if (passed) {
- /* Keep the time of the current packet if the packet passed
- the read filter so that the delta time since last displayed
- packet can be calculated */
- prev_dis_ts = fdata.abs_ts;
+ frame_data_set_after_dissect(&fdata, &cum_bytes, &prev_dis_ts);
/* Process this packet. */
if (print_packet_info) {