summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--summary.c8
-rw-r--r--summary.h17
-rw-r--r--wiretap/pcapng.c9
3 files changed, 23 insertions, 11 deletions
diff --git a/summary.c b/summary.c
index cd8abefc4e..b50cfb63c1 100644
--- a/summary.c
+++ b/summary.c
@@ -185,6 +185,7 @@ summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_
guint i;
wtapng_iface_descriptions_t* idb_info;
wtapng_if_descr_t wtapng_if_descr;
+ wtapng_if_stats_t *if_stats;
while (st->ifaces->len > 0) {
iface = g_array_index(st->ifaces, iface_options, 0);
@@ -221,6 +222,13 @@ summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_
iface.snap = wtapng_if_descr.snap_len;
iface.has_snap = (iface.snap != 65535);
iface.linktype = wtapng_if_descr.link_type;
+ if(wtapng_if_descr.num_stat_entries == 1){
+ /* dumpcap only writes one ISB, only handle that for now */
+ if_stats = &g_array_index(wtapng_if_descr.interface_statistics, wtapng_if_stats_t, 0);
+ iface.drops_known = TRUE;
+ iface.drops = if_stats->isb_ifdrop;
+ iface.isb_comment = if_stats->opt_comment;
+ }
g_array_append_val(st->ifaces, iface);
}
g_free(idb_info);
diff --git a/summary.h b/summary.h
index a1d062e6a1..f359990345 100644
--- a/summary.h
+++ b/summary.h
@@ -33,17 +33,18 @@ typedef struct iface_options_tag {
char *name;
char *descr;
char *cfilter;
- guint64 drops; /* number of packet drops */
- gboolean drops_known; /* TRUE if number of packet drops is known */
- gboolean has_snap; /* TRUE if maximum capture packet length is known */
- int snap; /* Maximum captured packet length */
- int linktype; /* wiretap encapsulation type */
+ char *isb_comment;
+ guint64 drops; /**< number of packet drops */
+ gboolean drops_known; /**< TRUE if number of packet drops is known */
+ gboolean has_snap; /**< TRUE if maximum capture packet length is known */
+ int snap; /**< Maximum captured packet length */
+ int linktype; /**< wiretap encapsulation type */
} iface_options;
typedef struct _summary_tally {
- guint64 bytes; /**< total bytes */
- double start_time; /**< seconds, with msec resolution */
- double stop_time; /**< seconds, with msec resolution */
+ guint64 bytes; /**< total bytes */
+ double start_time; /**< seconds, with msec resolution */
+ double stop_time; /**< seconds, with msec resolution */
double elapsed_time; /**< seconds, with msec resolution,
includes time before first packet
and after last packet */
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c
index 4ea33239cf..cccb12f05b 100644
--- a/wiretap/pcapng.c
+++ b/wiretap/pcapng.c
@@ -1674,9 +1674,12 @@ pcapng_read_interface_statistics_block(FILE_T fh, pcapng_block_header_t *bh, pca
pcapng_debug1("pcapng_read_interface_statistics_block: interface_id %u", wblock->data.if_stats.interface_id);
/* Option defaults */
- wblock->data.if_stats.opt_comment = NULL;
- wblock->data.if_stats.isb_ifrecv = -1;
- wblock->data.if_stats.isb_ifdrop = -1;
+ wblock->data.if_stats.opt_comment = NULL;
+ wblock->data.if_stats.isb_ifrecv = -1;
+ wblock->data.if_stats.isb_ifdrop = -1;
+ wblock->data.if_stats.isb_filteraccept = -1;
+ wblock->data.if_stats.isb_osdrop = -1;
+ wblock->data.if_stats.isb_usrdeliv = -1;
/* Options */
errno = WTAP_ERR_CANT_READ;