Module: wine Branch: master Commit: ca1aa1cfa21e71c20ecf91cfe2d981752886b654 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ca1aa1cfa21e71c20ecf91cfe2...
Author: André Hentschel nerv@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