White space changes.
[obnox/wireshark/wip.git] / capture-wpcap.c
index f831f225f1d04387d0517d2faefca08c29bbbdb7..876cd980d60d9bdc644282f9484692acf737e2f5 100644 (file)
 #include <glib.h>
 #include <gmodule.h>
 
+#include <epan/strutil.h>
+
 #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>
 
@@ -232,6 +233,34 @@ load_wpcap(void)
        has_wpcap = TRUE;
 }
 
+/*
+ * The official list of WinPcap mirrors is at
+ * http://www.winpcap.org/misc/mirrors.htm
+ */
+char *
+cant_load_winpcap_err(const char *app_name)
+{
+       return g_strdup_printf(
+"Unable to load WinPcap (wpcap.dll); %s will not be able to capture\n"
+"packets.\n"
+"\n"
+"In order to capture packets, WinPcap must be installed; see\n"
+"\n"
+"        http://www.winpcap.org/\n"
+"\n"
+"or the mirror at\n"
+"\n"
+"        http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/\n"
+"\n"
+"or the mirror at\n"
+"\n"
+"        http://winpcap.cs.pu.edu.tw/\n"
+"\n"
+"for a downloadable version of WinPcap and for instructions on how to install\n"
+"WinPcap.",
+           app_name);
+}
+
 char*
 pcap_lookupdev (char *a)
 {
@@ -876,7 +905,7 @@ cant_get_if_list_error_message(const char *err_str)
 void
 get_compiled_pcap_version(GString *str)
 {
-       g_string_append(str, "with WinPcap (version unknown)");
+       g_string_append(str, "with WinPcap (" STRINGIFY(PCAP_VERSION) ")");
 }
 
 /*