=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: wpcap: Implement pcap_findalldevs.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 11 17:03:46 CDT 2014
Module: wine
Branch: master
Commit: ca1aa1cfa21e71c20ecf91cfe2d981752886b654
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ca1aa1cfa21e71c20ecf91cfe2d981752886b654
Author: André Hentschel <nerv at dawncrow.de>
Date: Sun Aug 10 23:08:40 2014 +0200
wpcap: Implement pcap_findalldevs.
---
dlls/wpcap/wpcap.c | 13 +++++++++++++
dlls/wpcap/wpcap.spec | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c
index a317e5f..c08bbf8 100644
--- a/dlls/wpcap/wpcap.c
+++ b/dlls/wpcap/wpcap.c
@@ -22,6 +22,19 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wpcap);
+WINE_DECLARE_DEBUG_CHANNEL(winediag);
+
+int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+{
+ int ret;
+
+ TRACE("(%p %p)\n", alldevsp, errbuf);
+ ret = pcap_findalldevs(alldevsp, errbuf);
+ if(alldevsp && !*alldevsp)
+ ERR_(winediag)("Failed to access raw network (pcap), this requires special permissions.\n");
+
+ return ret;
+}
const char* CDECL wine_pcap_lib_version(void)
{
diff --git a/dlls/wpcap/wpcap.spec b/dlls/wpcap/wpcap.spec
index bcf8ea4..6e4606e 100644
--- a/dlls/wpcap/wpcap.spec
+++ b/dlls/wpcap/wpcap.spec
@@ -24,7 +24,7 @@
@ stub pcap_dump_open
@ stub pcap_file
@ stub pcap_fileno
-@ stub pcap_findalldevs
+@ cdecl pcap_findalldevs(ptr str) wine_pcap_findalldevs
@ stub pcap_findalldevs_ex
@ stub pcap_freealldevs
@ stub pcap_freecode
More information about the wine-cvs
mailing list