aboutsummaryrefslogtreecommitdiffstats
path: root/capture.h
diff options
context:
space:
mode:
Diffstat (limited to 'capture.h')
-rw-r--r--capture.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/capture.h b/capture.h
index 9ced0542a8..25bbb9ab88 100644
--- a/capture.h
+++ b/capture.h
@@ -81,6 +81,7 @@ extern void capture_input_cfilter_error_message(capture_options *capture_opts, c
*/
extern void capture_input_closed(capture_options *capture_opts);
+#ifdef HAVE_LIBPCAP
/**
* Fetch the interface list from a child process.
*/
@@ -92,4 +93,26 @@ extern GList *capture_interface_list(int *err, char **err_str);
extern GList *capture_pcap_linktype_list(char *devname, char **err_str);
+struct if_stat_cache_s;
+typedef struct if_stat_cache_s if_stat_cache_t;
+
+/**
+ * Start gathering capture statistics for the interfaces specified.
+ * @param A GList of if_info_t items
+ * @return A pointer to the statistics state data.
+ */
+extern if_stat_cache_t * capture_stat_start(GList *if_list);
+
+/**
+ * Fetch capture statistics, similar to pcap_stats().
+ */
+struct pcap_stat; /* Stub in case we don't or haven't yet included pcap.h */
+extern gboolean capture_stats(if_stat_cache_t *sc, char *ifname, struct pcap_stat *ps);
+
+/**
+ * Stop gathering capture statistics.
+ */
+void capture_stat_stop(if_stat_cache_t *sc);
+#endif /* HAVE_LIBPCAP */
+
#endif /* capture.h */