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 /rawshark.c | |
parent | 08525e79d7cd7fee1c5936e9d9630d9d57ee4cdb (diff) |
Refactor frame_data_init() into frame_data_set_before_dissect() and frame_data_set_after_dissect().
svn path=/trunk/; revision=30066
Diffstat (limited to 'rawshark.c')
-rw-r--r-- | rawshark.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/rawshark.c b/rawshark.c index 4e8a1911a5..3f6ea6a365 100644 --- a/rawshark.c +++ b/rawshark.c @@ -1021,8 +1021,7 @@ process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr, /* If we're going to print packet information, or we're going to run a read filter, or we're going to process taps, set up to do a dissection and do so. */ - 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); passed = TRUE; create_proto_tree = TRUE; @@ -1042,7 +1041,10 @@ process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr, tap_queue_init(&edt); - printf("%lu", (unsigned long int)cf->count); + printf("%lu", (unsigned long int) cf->count); + + frame_data_set_before_dissect(&fdata, &cf->elapsed_time, + &first_ts, &prev_dis_ts, &prev_cap_ts); /* We only need the columns if we're printing packet info but we're *not* verbose; in verbose mode, we print the protocol tree, not @@ -1051,6 +1053,10 @@ process_packet(capture_file *cf, gint64 offset, const struct wtap_pkthdr *whdr, tap_push_tapped_queue(&edt); + /* We don't use a display filter */ + fdata.flags.passed_dfilter = 1; + frame_data_set_after_dissect(&fdata, &cum_bytes, &prev_dis_ts); + for(i = 0; i < n_rfilters; i++) { /* Run the read filter if we have one. */ if (rfcodes[i]) |