aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 7a4eeb4466..0822535c82 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -90,6 +90,7 @@
#include "sync_pipe.h"
#include "capture_opts.h"
+#include "capture_ifinfo.h"
#include "capture_sync.h"
#include "conditions.h"
@@ -423,6 +424,25 @@ cmdarg_err_cont(const char *fmt, ...)
}
}
+/*
+ * capture_interface_list() is expected to do the right thing to get
+ * a list of interfaces.
+ *
+ * In most of the programs in the Wireshark suite, "the right thing"
+ * is to run dumpcap and ask it for the list, because dumpcap may
+ * be the only program in the suite with enough privileges to get
+ * the list.
+ *
+ * In dumpcap itself, however, we obviously can't run dumpcap to
+ * ask for the list. Therefore, our capture_interface_list() should
+ * just call get_interface_list().
+ */
+GList *
+capture_interface_list(int *err, char **err_str)
+{
+ return get_interface_list(err, err_str);
+}
+
typedef struct {
char *name;
pcap_t *pch;