Rebase against 7d3c068c3beeac8691cfa96f0dce6b5583072eaa.

This commit is contained in:
Sebastian Lackner
2017-07-22 01:14:10 +02:00
parent 5ec57827af
commit 62ae507b36
5 changed files with 18 additions and 283 deletions

View File

@@ -1,4 +1,4 @@
From 1fee677cce6255628039d2e6b9e9fc12e57b998c Mon Sep 17 00:00:00 2001
From a6a51cbacb0ebe2f387b04824ece1048611becc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= <nerv@dawncrow.de>
Date: Tue, 26 Aug 2014 00:59:37 +0200
Subject: wpcap: Load libpcap dynamically.
@@ -28,7 +28,7 @@ index 1e6bba3..f0a3b55 100644
[enable_wpcap])
diff --git a/dlls/wpcap/Makefile.in b/dlls/wpcap/Makefile.in
index 91b4a95..aeef71a 100644
index 91b4a955911..aeef71a46e5 100644
--- a/dlls/wpcap/Makefile.in
+++ b/dlls/wpcap/Makefile.in
@@ -1,6 +1,5 @@
@@ -39,7 +39,7 @@ index 91b4a95..aeef71a 100644
C_SRCS = \
wpcap.c
diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c
index 697e5fc..51e976b 100644
index d731d8494f2..94d5479305c 100644
--- a/dlls/wpcap/wpcap.c
+++ b/dlls/wpcap/wpcap.c
@@ -18,6 +18,9 @@
@@ -50,9 +50,9 @@ index 697e5fc..51e976b 100644
+#include "wine/port.h"
+#include "wine/library.h"
#include <pcap/pcap.h>
#include "winsock2.h"
#include "windef.h"
@@ -40,47 +43,128 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
/* pcap.h might define those: */
@@ -45,47 +48,128 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#define PCAP_SRC_IFLOCAL 3
#endif
@@ -188,7 +188,7 @@ index 697e5fc..51e976b 100644
}
typedef struct
@@ -109,10 +193,10 @@ int CDECL wine_pcap_dispatch(pcap_t *p, int cnt,
@@ -114,10 +198,10 @@ int CDECL wine_pcap_dispatch(pcap_t *p, int cnt,
PCAP_HANDLER_CALLBACK pcb;
pcb.pfn_cb = callback;
pcb.user_data = user;
@@ -201,7 +201,7 @@ index 697e5fc..51e976b 100644
}
int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
@@ -120,7 +204,7 @@ int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
@@ -125,7 +209,7 @@ int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
int ret;
TRACE("(%p %p)\n", alldevsp, errbuf);
@@ -210,7 +210,7 @@ index 697e5fc..51e976b 100644
if(alldevsp && !*alldevsp)
ERR_(winediag)("Failed to access raw network (pcap), this requires special permissions.\n");
@@ -136,13 +220,13 @@ int CDECL wine_pcap_findalldevs_ex(char *source, void *auth, pcap_if_t **alldevs
@@ -141,13 +225,13 @@ int CDECL wine_pcap_findalldevs_ex(char *source, void *auth, pcap_if_t **alldevs
void CDECL wine_pcap_freealldevs(pcap_if_t *alldevs)
{
TRACE("(%p)\n", alldevs);
@@ -226,7 +226,7 @@ index 697e5fc..51e976b 100644
}
typedef struct _AirpcapHandle *PAirpcapHandle;
@@ -155,18 +239,18 @@ PAirpcapHandle CDECL wine_pcap_get_airpcap_handle(pcap_t *p)
@@ -160,18 +244,18 @@ PAirpcapHandle CDECL wine_pcap_get_airpcap_handle(pcap_t *p)
char* CDECL wine_pcap_geterr(pcap_t *p)
{
TRACE("(%p)\n", p);
@@ -248,7 +248,7 @@ index 697e5fc..51e976b 100644
TRACE("%s\n", debugstr_a(ret));
return ret;
}
@@ -174,20 +258,20 @@ const char* CDECL wine_pcap_lib_version(void)
@@ -179,20 +263,20 @@ const char* CDECL wine_pcap_lib_version(void)
int CDECL wine_pcap_list_datalinks(pcap_t *p, int **dlt_buffer)
{
TRACE("(%p %p)\n", p, dlt_buffer);
@@ -272,7 +272,7 @@ index 697e5fc..51e976b 100644
}
int CDECL wine_pcap_loop(pcap_t *p, int cnt,
@@ -201,34 +285,34 @@ int CDECL wine_pcap_loop(pcap_t *p, int cnt,
@@ -206,34 +290,34 @@ int CDECL wine_pcap_loop(pcap_t *p, int cnt,
PCAP_HANDLER_CALLBACK pcb;
pcb.pfn_cb = callback;
pcb.user_data = user;
@@ -313,7 +313,7 @@ index 697e5fc..51e976b 100644
}
#define PCAP_OPENFLAG_PROMISCUOUS 1
@@ -239,14 +323,14 @@ pcap_t* CDECL wine_pcap_open(const char *source, int snaplen, int flags, int rea
@@ -244,14 +328,14 @@ pcap_t* CDECL wine_pcap_open(const char *source, int snaplen, int flags, int rea
int promisc = flags & PCAP_OPENFLAG_PROMISCUOUS;
FIXME("(%s %i %i %i %p %p): partial stub\n", debugstr_a(source), snaplen, flags, read_timeout,
auth, errbuf);
@@ -330,7 +330,7 @@ index 697e5fc..51e976b 100644
}
int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf)
@@ -290,13 +374,13 @@ int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char
@@ -295,13 +379,13 @@ int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char
int CDECL wine_pcap_sendpacket(pcap_t *p, const unsigned char *buf, int size)
{
TRACE("(%p %p %i)\n", p, buf, size);
@@ -346,7 +346,7 @@ index 697e5fc..51e976b 100644
}
int CDECL wine_pcap_setbuff(pcap_t * p, int dim)
@@ -308,25 +392,25 @@ int CDECL wine_pcap_setbuff(pcap_t * p, int dim)
@@ -313,25 +397,25 @@ int CDECL wine_pcap_setbuff(pcap_t * p, int dim)
int CDECL wine_pcap_setfilter(pcap_t *p, struct bpf_program *fp)
{
TRACE("(%p %p)\n", p, fp);
@@ -376,7 +376,7 @@ index 697e5fc..51e976b 100644
}
int CDECL wine_wsockinit(void)
@@ -339,10 +423,29 @@ int CDECL wine_wsockinit(void)
@@ -344,10 +428,29 @@ int CDECL wine_wsockinit(void)
pcap_dumper_t* CDECL wine_pcap_dump_open(pcap_t *p, const char *fname)
{
@@ -409,5 +409,5 @@ index 697e5fc..51e976b 100644
+ return TRUE;
}
--
2.7.1
2.13.1