diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-22 14:23:20 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-22 14:23:20 +0000 |
commit | 14d2f617c2da878c5b12d39f16d72b0f34672526 (patch) | |
tree | 9ca04bc77fb8303f514207249e2eafb2c5616d59 /tshark.c | |
parent | 08525e79d7cd7fee1c5936e9d9630d9d57ee4cdb (diff) | |
download | wireshark-14d2f617c2da878c5b12d39f16d72b0f34672526.tar.gz wireshark-14d2f617c2da878c5b12d39f16d72b0f34672526.tar.bz2 wireshark-14d2f617c2da878c5b12d39f16d72b0f34672526.zip |
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.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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) { |