aboutsummaryrefslogtreecommitdiffstats
path: root/summary.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-02-06 21:20:35 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-02-06 21:20:35 +0000
commit3a63719e389bd9fd1f27a1a467501c8d7fe3eb69 (patch)
tree0ed850112dc342fd11812f8dba14fa2cb1a08b33 /summary.c
parenta6694a746ff0ff2402e3989dfb3cf135122cf821 (diff)
another two steps towards privilege seperation:
move another two capture related fields (iface and cfilter) from cfile to capture_opts also move the handling of capture related command line options from main.c to capture.c, that way a future privilege seperated capture program can use the same code to parse it's command line than Ethereal. It might be even possible to share this parser code even with Tethereal, didn't took a closer look at this. svn path=/trunk/; revision=13320
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/summary.c b/summary.c
index 5d13ef2cd0..e9df777805 100644
--- a/summary.c
+++ b/summary.c
@@ -29,6 +29,9 @@
#include <epan/packet.h>
#include "cfile.h"
#include "summary.h"
+#ifdef HAVE_LIBPCAP
+#include "capture_ui_utils.h"
+#endif
static double
@@ -111,12 +114,25 @@ summary_fill_in(capture_file *cf, summary_tally *st)
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 = cf->cfilter;
-#else
+ /* capture related */
st->cfilter = NULL;
-#endif
+ st->iface = NULL;
+ st->iface_descr = NULL;
+}
+
+
+#ifdef HAVE_LIBPCAP
+void
+summary_fill_in_capture(capture_options *capture_opts, summary_tally *st)
+{
+ 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;
+ }
}
+#endif