diff options
author | Yang Luo <hsluoyz@qq.com> | 2016-07-25 10:38:58 +0800 |
---|---|---|
committer | Yang Luo <hsluoyz@qq.com> | 2016-07-26 10:38:54 +0800 |
commit | f97afe1afe9603db67de497b0aa5a1f7be32f7da (patch) | |
tree | fd0026d77b283f115dc1bf68d153ed04928996b9 /pcap-win32.c | |
parent | b5f5ae1c650c701a70e4cdc0d88ba7767a564820 (diff) |
Add back WinPcap specific functions to libpcap, the built wpcap.dll already works with Wireshark.
Diffstat (limited to 'pcap-win32.c')
-rw-r--r-- | pcap-win32.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pcap-win32.c b/pcap-win32.c index 40e9f079..77cddcf9 100644 --- a/pcap-win32.c +++ b/pcap-win32.c @@ -53,6 +53,9 @@ int* _errno(); #define errno (*_errno()) #endif /* __MINGW32__ */ +#ifdef HAVE_REMOTE +#include "pcap-remote.h" +#endif /* HAVE_REMOTE */ static int pcap_setfilter_win32_npf(pcap_t *, struct bpf_program *); static int pcap_setfilter_win32_dag(pcap_t *, struct bpf_program *); @@ -1065,8 +1068,11 @@ pcap_t * pcap_create_interface(const char *device _U_, char *ebuf) { pcap_t *p; - - p = pcap_create_common(ebuf, sizeof (struct pcap_win)); +#ifdef HAVE_REMOTE + p = pcap_create_common(ebuf, sizeof(struct pcap_win) + sizeof(struct pcap_md)); +#else + p = pcap_create_common(ebuf, sizeof(struct pcap_win))); +#endif /* HAVE_REMOTE */ if (p == NULL) return (NULL); |