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:
@@ -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 */
|
||||||
|
|
||||||
|
|||||||
@@ -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 */
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
6
tcpip.h
6
tcpip.h
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user