mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +00:00
Avoid macro redefinition and WinPcap incompatibility now that Npcap defines PCAP_NETMASK_UNKNOWN
This commit is contained in:
parent
265e32dbd6
commit
ed59a3d370
4 changed files with 12 additions and 5 deletions
|
|
@ -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:
|
||||
|
|
|
|||
6
tcpip.h
6
tcpip.h
|
|
@ -131,6 +131,12 @@
|
|||
#include "nbase.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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue