1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 08:51:36 +00:00

Avoid macro redefinition and WinPcap incompatibility now that Npcap defines PCAP_NETMASK_UNKNOWN

This commit is contained in:
dmiller
2016-08-18 23:53:46 +00:00
parent 265e32dbd6
commit ed59a3d370
4 changed files with 12 additions and 5 deletions

View File

@@ -142,8 +142,5 @@
#define DNET_INCLUDED 1 #define DNET_INCLUDED 1
#define PCRE_INCLUDED 1 #define PCRE_INCLUDED 1
/* WinPCAP doesn't have this */
#define PCAP_NETMASK_UNKNOWN 0
#endif /* NMAP_WINCONFIG_H */ #endif /* NMAP_WINCONFIG_H */

View File

@@ -95,8 +95,6 @@
#ifndef DISABLE_NSOCK_PCAP #ifndef DISABLE_NSOCK_PCAP
#define HAVE_PCAP 1 #define HAVE_PCAP 1
/* WinPCAP doesn't have this */
#define PCAP_NETMASK_UNKNOWN 0
#endif #endif
/* Need this for _WIN32_WINNT below */ /* Need this for _WIN32_WINNT below */

View File

@@ -66,6 +66,12 @@
#include <string.h> #include <string.h>
#include <stdarg.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: * There are three possible ways to read packets from pcap descriptor:

View File

@@ -131,6 +131,12 @@
#include "nbase.h" #include "nbase.h"
#include <pcap.h> #include <pcap.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
class Target; class Target;