aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcap-new.c2
-rw-r--r--pcap-win32.c4
-rw-r--r--pcap.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/pcap-new.c b/pcap-new.c
index 22964085..8c4b86a6 100644
--- a/pcap-new.c
+++ b/pcap-new.c
@@ -393,7 +393,7 @@ pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout,
*/
/* disable loopback capture if requested */
if (flags & PCAP_OPENFLAG_NOCAPTURE_LOCAL)
- p->opt.nocapture_local = 1;
+ fp->opt.nocapture_local = 1;
#endif /* _WIN32 */
status = pcap_set_timeout(fp, read_timeout);
if (status < 0)
diff --git a/pcap-win32.c b/pcap-win32.c
index c1d24879..c1f8352c 100644
--- a/pcap-win32.c
+++ b/pcap-win32.c
@@ -406,7 +406,7 @@ pcap_sendqueue_transmit_win32(pcap_t *p, pcap_send_queue *queue, int sync)
u_int res;
char errbuf[PCAP_ERRBUF_SIZE+1];
- if (2->adapter==NULL) {
+ if (pw->adapter==NULL) {
pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"Cannot transmit a queue to an offline capture or to a TurboCap port");
return (0);
@@ -1221,7 +1221,7 @@ pcap_activate_win32(pcap_t *p)
* all capture devices are regular OS network
* interfaces.)
*/
- p->handle = adapter->hFile;
+ p->handle = pw->adapter->hFile;
return (0);
bad:
diff --git a/pcap.c b/pcap.c
index fb5b13dc..01869797 100644
--- a/pcap.c
+++ b/pcap.c
@@ -36,7 +36,9 @@
#endif
#include <pcap-types.h>
-#ifndef _WIN32
+#ifdef _WIN32
+#include <Packet32.h> /* for PacketGetVersion() */
+#else
#include <sys/param.h>
#ifndef MSDOS
#include <sys/file.h>