mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Avoid macro redefinition and WinPcap incompatibility now that Npcap defines PCAP_NETMASK_UNKNOWN
This commit is contained in:
@@ -142,8 +142,5 @@
|
||||
#define DNET_INCLUDED 1
|
||||
#define PCRE_INCLUDED 1
|
||||
|
||||
/* WinPCAP doesn't have this */
|
||||
#define PCAP_NETMASK_UNKNOWN 0
|
||||
|
||||
#endif /* NMAP_WINCONFIG_H */
|
||||
|
||||
|
||||
@@ -95,8 +95,6 @@
|
||||
|
||||
#ifndef DISABLE_NSOCK_PCAP
|
||||
#define HAVE_PCAP 1
|
||||
/* WinPCAP doesn't have this */
|
||||
#define PCAP_NETMASK_UNKNOWN 0
|
||||
#endif
|
||||
|
||||
/* Need this for _WIN32_WINNT below */
|
||||
|
||||
@@ -66,6 +66,12 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef WIN32
|
||||
/* WinPCAP doesn't have this, but Npcap does.
|
||||
* Using 0 is safe for both, but change this if we decide to drop WinPcap */
|
||||
#undef PCAP_NETMASK_UNKNOWN
|
||||
#define PCAP_NETMASK_UNKNOWN 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* There are three possible ways to read packets from pcap descriptor:
|
||||
|
||||
Reference in New Issue
Block a user