# include "config.h"
#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
#include <epan/packet.h>
#include "cfile.h"
#include "summary.h"
sum_tally->filtered_stop = cur_time;
} else {
if (cur_time < sum_tally->filtered_start) {
- sum_tally->start_time = cur_time;
+ sum_tally->filtered_start = cur_time;
}
if (cur_time > sum_tally->filtered_stop) {
sum_tally->filtered_stop = cur_time;
sum_tally->filtered_count++;
sum_tally->filtered_bytes += cur_frame->pkt_len ;
}
- if (cur_frame->flags.marked)
+ if (cur_frame->flags.marked){
+ if (sum_tally->marked_count==0){
+ sum_tally->marked_start= cur_time;
+ sum_tally->marked_stop = cur_time;
+ } else {
+ if (cur_time < sum_tally->marked_start) {
+ sum_tally->marked_start = cur_time;
+ }
+ if (cur_time > sum_tally->marked_stop) {
+ sum_tally->marked_stop = cur_time;
+ }
+ }
sum_tally->marked_count++;
-
+ sum_tally->marked_bytes += cur_frame->pkt_len ;
+ }
+ if (cur_frame->flags.ignored){
+ sum_tally->ignored_count++;
+ }
}
void
st->bytes = 0;
st->filtered_count = 0;
st->filtered_start = 0;
- st->filtered_stop = 0;
+ st->filtered_stop = 0;
st->filtered_bytes = 0;
st->marked_count = 0;
+ st->marked_start = 0;
+ st->marked_stop = 0;
+ st->marked_bytes = 0;
+ st->ignored_count = 0;
/* initialize the tally */
- if (cf->plist != NULL) {
- first_frame = cf->plist;
+ if (cf->plist_start != NULL) {
+ first_frame = cf->plist_start;
st->start_time = nstime_to_sec(&first_frame->abs_ts);
st->stop_time = nstime_to_sec(&first_frame->abs_ts);
- cur_glist = cf->plist;
+ cur_glist = cf->plist_start;
for (i = 0; i < cf->count; i++) {
cur_frame = cur_glist;
st->filename = cf->filename;
st->file_length = cf->f_datalen;
- st->encap_type = cf->cd_t;
+ st->file_type = cf->cd_t;
+ st->encap_type = cf->lnk_t;
st->has_snap = cf->has_snap;
st->snap = cf->snap;
st->elapsed_time = nstime_to_sec(&cf->elapsed_time);
{
st->cfilter = capture_opts->cfilter;
st->iface = capture_opts->iface;
- if(st->iface) {
- st->iface_descr = get_interface_descriptive_name(st->iface);
- } else {
- st->iface_descr = NULL;
- }
+ st->iface_descr = get_iface_description(capture_opts);
}
#endif