diff options
-rw-r--r-- | gtk/gsm_map_summary.c | 4 | ||||
-rw-r--r-- | gtk/mtp3_summary.c | 4 | ||||
-rw-r--r-- | gtk/summary_dlg.c | 4 | ||||
-rw-r--r-- | summary.c | 36 | ||||
-rw-r--r-- | summary.h | 2 |
5 files changed, 28 insertions, 22 deletions
diff --git a/gtk/gsm_map_summary.c b/gtk/gsm_map_summary.c index b70f5650af..22aa2d99fc 100644 --- a/gtk/gsm_map_summary.c +++ b/gtk/gsm_map_summary.c @@ -39,6 +39,8 @@ #include "epan/epan.h" #include "epan/value_string.h" #include "tap_menu.h" +#include "globals.h" +#include "file.h" #include "summary.h" #include "dlg_utils.h" #include "ui_util.h" @@ -80,7 +82,7 @@ gsm_map_stat_gtk_sum_cb(GtkWidget *w _U_, gpointer d _U_) double tot_invokes_size, tot_rr_size; /* initialize the tally */ - summary_fill_in(&summary); + summary_fill_in(&cfile, &summary); /* initial compututations */ seconds = summary.stop_time - summary.start_time; diff --git a/gtk/mtp3_summary.c b/gtk/mtp3_summary.c index 2db1066477..ee15fd4bef 100644 --- a/gtk/mtp3_summary.c +++ b/gtk/mtp3_summary.c @@ -40,6 +40,8 @@ #include "epan/epan.h" #include "epan/value_string.h" #include "tap_menu.h" +#include "globals.h" +#include "file.h" #include "summary.h" #include "image/clist_ascend.xpm" #include "image/clist_descend.xpm" @@ -251,7 +253,7 @@ mtp3_sum_gtk_sum_cb(GtkWidget *w _U_, gpointer d _U_) int i; /* initialize the tally */ - summary_fill_in(&summary); + summary_fill_in(&cfile, &summary); /* initial compututations */ seconds = summary.stop_time - summary.start_time; diff --git a/gtk/summary_dlg.c b/gtk/summary_dlg.c index 7c88be31cc..c99e034241 100644 --- a/gtk/summary_dlg.c +++ b/gtk/summary_dlg.c @@ -33,6 +33,8 @@ #include <wtap.h> #include <time.h> +#include "globals.h" +#include "file.h" #include "summary.h" #include "summary_dlg.h" #include "dlg_utils.h" @@ -108,7 +110,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) unsigned int elapsed_time; /* initial computations */ - summary_fill_in(&summary); + summary_fill_in(&cfile, &summary); seconds = summary.stop_time - summary.start_time; disp_seconds = summary.filtered_stop - summary.filtered_start; @@ -27,7 +27,7 @@ #endif #include <epan/packet.h> -#include "globals.h" +#include "cfile.h" #include "summary.h" @@ -72,7 +72,7 @@ tally_frame_data(frame_data *cur_frame, summary_tally *sum_tally) } void -summary_fill_in(summary_tally *st) +summary_fill_in(capture_file *cf, summary_tally *st) { frame_data *first_frame, *cur_frame; @@ -89,33 +89,33 @@ summary_fill_in(summary_tally *st) st->marked_count = 0; /* initialize the tally */ - if (cfile.plist != NULL) { - first_frame = cfile.plist; + if (cf->plist != NULL) { + first_frame = cf->plist; st->start_time = secs_usecs(first_frame->abs_secs,first_frame->abs_usecs); st->stop_time = secs_usecs(first_frame->abs_secs,first_frame->abs_usecs); - cur_glist = cfile.plist; + cur_glist = cf->plist; - for (i = 0; i < cfile.count; i++) { + for (i = 0; i < cf->count; i++) { cur_frame = cur_glist; tally_frame_data(cur_frame, st); cur_glist = cur_glist->next; } } - st->filename = cfile.filename; - st->file_length = cfile.f_len; - st->encap_type = cfile.cd_t; - st->has_snap = cfile.has_snap; - st->snap = cfile.snap; - st->elapsed_time = secs_usecs(cfile.esec, cfile.eusec); - st->packet_count = cfile.count; - st->drops_known = cfile.drops_known; - st->drops = cfile.drops; - st->iface = cfile.iface; - st->dfilter = cfile.dfilter; + st->filename = cf->filename; + st->file_length = cf->f_len; + st->encap_type = cf->cd_t; + st->has_snap = cf->has_snap; + st->snap = cf->snap; + st->elapsed_time = secs_usecs(cf->esec, cf->eusec); + st->packet_count = cf->count; + st->drops_known = cf->drops_known; + st->drops = cf->drops; + st->iface = cf->iface; + st->dfilter = cf->dfilter; #ifdef HAVE_LIBPCAP - st->cfilter = cfile.cfilter; + st->cfilter = cf->cfilter; #else st->cfilter = NULL; #endif @@ -50,7 +50,7 @@ typedef struct _summary_tally { const char *cfilter; /* capture filter */ } summary_tally; -void summary_fill_in(summary_tally *st); +void summary_fill_in(capture_file *cf, summary_tally *st); #endif /* summary.h */ |