summaryrefslogtreecommitdiff
path: root/summary.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-02-23 15:40:31 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-02-23 15:40:31 +0000
commit286f3425e7aa27b8e9142ef2a5679a58e6feb518 (patch)
tree177acb43c8804c73b1344202dc545f38d4e4aea1 /summary.c
parent07c039ad17606e631eb18953bb1d11f8809a0256 (diff)
downloadwireshark-286f3425e7aa27b8e9142ef2a5679a58e6feb518.tar.gz
Have the used interfaces show up if number of interfaces > 0.
(pcapng file). svn path=/trunk/; revision=41163
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/summary.c b/summary.c
index 21b91c29f6..0fe058c7e6 100644
--- a/summary.c
+++ b/summary.c
@@ -138,11 +138,13 @@ summary_fill_in(capture_file *cf, summary_tally *st)
#ifdef HAVE_LIBPCAP
void
-summary_fill_in_capture(capture_options *capture_opts, summary_tally *st)
+summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_tally *st)
{
iface_options iface;
interface_options interface_opts;
guint i;
+ wtapng_iface_descriptions_t* idb_info;
+ wtapng_if_descr_t wtapng_if_descr;
while (st->ifaces->len > 0) {
iface = g_array_index(st->ifaces, iface_options, 0);
@@ -164,6 +166,22 @@ summary_fill_in_capture(capture_options *capture_opts, summary_tally *st)
iface.linktype = interface_opts.linktype;
g_array_append_val(st->ifaces, iface);
}
+ }else{
+ idb_info = wtap_file_get_idb_info(cf->wth);
+ for (i = 0; i < idb_info->number_of_interfaces; i++) {
+ wtapng_if_descr = g_array_index(idb_info->interface_data, wtapng_if_descr_t, i);
+ iface.cfilter = g_strdup(wtapng_if_descr.if_filter);
+ iface.name = g_strdup(wtapng_if_descr.if_name);
+ iface.descr = g_strdup(wtapng_if_descr.if_description);
+ iface.drops_known = FALSE;
+ iface.drops = 0;
+ /*iface.has_snap = wtapng_if_descr.has_snaplen;*/
+ iface.snap = wtapng_if_descr.snap_len;
+ iface.linktype = wtapng_if_descr.link_type;
+ g_array_append_val(st->ifaces, iface);
+ }
+
+
}
}
#endif