diff options
Diffstat (limited to 'capture-wpcap.c')
-rw-r--r-- | capture-wpcap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/capture-wpcap.c b/capture-wpcap.c index 9dd7903ddd..f831f225f1 100644 --- a/capture-wpcap.c +++ b/capture-wpcap.c @@ -35,6 +35,8 @@ #include "capture_ifinfo.h" #include "capture-pcap-util.h" #include "capture-pcap-util-int.h" +#include "capture-wpcap.h" +#include "capture_errs.h" #include <wsutil/file_util.h> @@ -694,6 +696,16 @@ get_interface_list(int *err, char **err_str) int i, j; char errbuf[PCAP_ERRBUF_SIZE]; + if (!has_wpcap) { + /* + * We don't have WinPcap, so we can't get a list of + * interfaces. + */ + *err = DONT_HAVE_PCAP; + *err_str = cant_load_winpcap_err("you"); + return NULL; + } + #ifdef HAVE_PCAP_FINDALLDEVS if (p_pcap_findalldevs != NULL) return get_interface_list_findalldevs(err, err_str); |