Update some links.
[obnox/wireshark/wip.git] / capture-wpcap.c
index 09f9ea45ef42811a258cbdd60261aa4d8bbcce7e..2cda3251365e58e83d4c37e9ea0b16244f6b92c7 100644 (file)
 #include <glib.h>
 #include <gmodule.h>
 
+#include "capture_ifinfo.h"
 #include "capture-pcap-util.h"
 #include "capture-pcap-util-int.h"
 
+#include <wsutil/file_util.h>
+
 /* XXX - yes, I know, I should move cppmagic.h to a generic location. */
 #include "tools/lemon/cppmagic.h"
 
@@ -104,7 +107,7 @@ static int  (*p_pcap_list_datalinks)(pcap_t *, int **);
 static int     (*p_pcap_set_datalink)(pcap_t *, int);
 #endif
 
-#ifdef HAVE_FREE_DATALINKS
+#ifdef HAVE_PCAP_FREE_DATALINKS
 static int     (*p_pcap_free_datalinks)(int *);
 #endif
 
@@ -136,9 +139,8 @@ load_wpcap(void)
                SYM(pcap_open, FALSE),
                SYM(pcap_findalldevs_ex, FALSE),
                SYM(pcap_createsrcstr, FALSE),
-#else
-               SYM(pcap_open_live, FALSE),
 #endif
+               SYM(pcap_open_live, FALSE),
 #ifdef HAVE_PCAP_SETSAMPLING
                SYM(pcap_setsampling, TRUE),
 #endif
@@ -183,7 +185,7 @@ load_wpcap(void)
        GModule         *wh; /* wpcap handle */
        const symbol_table_t    *sym;
 
-       wh = g_module_open("wpcap", 0);
+       wh = ws_module_open("wpcap.dll", 0);
 
        if (!wh) {
                return;
@@ -849,7 +851,7 @@ get_runtime_pcap_version(GString *str)
                         */
                        if (packetVer == NULL) {
                                packetVer = "version unknown";
-                               handle = g_module_open("Packet.dll", 0);
+                               handle = ws_module_open("packet.dll", 0);
                                if (handle != NULL) {
                                        if (g_module_symbol(handle,
                                            "PacketLibraryVersion",