mirror of
https://github.com/nmap/nmap.git
synced 2026-01-02 21:09:00 +00:00
Update included libpcap to 1.10.1
This commit is contained in:
@@ -146,6 +146,72 @@
|
||||
|
||||
#define PCAP_API PCAP_API_DEF extern
|
||||
|
||||
/*
|
||||
* Definitions to 1) indicate what version of libpcap first had a given
|
||||
* API and 2) allow upstream providers whose build environments allow
|
||||
* APIs to be designated as "first available in this release" to do so
|
||||
* by appropriately defining them.
|
||||
*
|
||||
* Yes, that's you, Apple. :-) Please define PCAP_AVAILABLE_MACOS()
|
||||
* as necessary to make various APIs "weak exports" to make it easier
|
||||
* for software that's distributed in binary form and that uses libpcap
|
||||
* to run on multiple macOS versions and use new APIs when available.
|
||||
* (Yes, such third-party software exists - Wireshark provides binary
|
||||
* packages for macOS, for example. tcpdump doesn't count, as that's
|
||||
* provided by Apple, so each release can come with a version compiled
|
||||
* to use the APIs present in that release.)
|
||||
*
|
||||
* We don't define it ourselves because, if you're building and
|
||||
* installing libpcap on macOS yourself, the APIs will be available
|
||||
* no matter what OS version you're installing it on.
|
||||
*
|
||||
* For other platforms, we don't define them, leaving it up to
|
||||
* others to do so based on their OS versions, if appropriate.
|
||||
*
|
||||
* We start with libpcap 0.4, as that was the last LBL release, and
|
||||
* I've never seen earlier releases.
|
||||
*/
|
||||
#ifdef __APPLE__
|
||||
#define PCAP_AVAILABLE_MACOS(v) /* define to say "first appears in v" */
|
||||
#define PCAP_AVAILABLE_0_4 PCAP_AVAILABLE_MACOS(10.0) /* Did any version of Mac OS X ship with this? */
|
||||
#define PCAP_AVAILABLE_0_5 PCAP_AVAILABLE_MACOS(10.0) /* Did any version of Mac OS X ship with this? */
|
||||
#define PCAP_AVAILABLE_0_6 PCAP_AVAILABLE_MACOS(10.1)
|
||||
#define PCAP_AVAILABLE_0_7 PCAP_AVAILABLE_MACOS(10.4)
|
||||
#define PCAP_AVAILABLE_0_8 PCAP_AVAILABLE_MACOS(10.4)
|
||||
#define PCAP_AVAILABLE_0_9 PCAP_AVAILABLE_MACOS(10.5)
|
||||
#define PCAP_AVAILABLE_1_0 PCAP_AVAILABLE_MACOS(10.6)
|
||||
/* #define PCAP_AVAILABLE_1_1 no routines added to the API */
|
||||
#define PCAP_AVAILABLE_1_2 PCAP_AVAILABLE_MACOS(10.9)
|
||||
/* #define PCAP_AVAILABLE_1_3 no routines added to the API */
|
||||
/* #define PCAP_AVAILABLE_1_4 no routines added to the API */
|
||||
#define PCAP_AVAILABLE_1_5 PCAP_AVAILABLE_MACOS(10.10)
|
||||
/* #define PCAP_AVAILABLE_1_6 no routines added to the API */
|
||||
#define PCAP_AVAILABLE_1_7 PCAP_AVAILABLE_MACOS(10.12)
|
||||
#define PCAP_AVAILABLE_1_8 PCAP_AVAILABLE_MACOS(10.13) /* only Windows adds routines to the API; XXX - what version first had it? */
|
||||
#define PCAP_AVAILABLE_1_9 PCAP_AVAILABLE_MACOS(10.13)
|
||||
#define PCAP_AVAILABLE_1_10 /* not in macOS yet */
|
||||
#define PCAP_AVAILABLE_1_11 /* not released yet, so not in macOS yet */
|
||||
#else /* __APPLE__ */
|
||||
#define PCAP_AVAILABLE_0_4
|
||||
#define PCAP_AVAILABLE_0_5
|
||||
#define PCAP_AVAILABLE_0_6
|
||||
#define PCAP_AVAILABLE_0_7
|
||||
#define PCAP_AVAILABLE_0_8
|
||||
#define PCAP_AVAILABLE_0_9
|
||||
#define PCAP_AVAILABLE_1_0
|
||||
/* #define PCAP_AVAILABLE_1_1 no routines added to the API */
|
||||
#define PCAP_AVAILABLE_1_2
|
||||
/* #define PCAP_AVAILABLE_1_3 no routines added to the API */
|
||||
/* #define PCAP_AVAILABLE_1_4 no routines added to the API */
|
||||
#define PCAP_AVAILABLE_1_5
|
||||
/* #define PCAP_AVAILABLE_1_6 no routines added to the API */
|
||||
#define PCAP_AVAILABLE_1_7
|
||||
#define PCAP_AVAILABLE_1_8
|
||||
#define PCAP_AVAILABLE_1_9
|
||||
#define PCAP_AVAILABLE_1_10
|
||||
#define PCAP_AVAILABLE_1_11
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/*
|
||||
* PCAP_NORETURN, before a function declaration, means "this function
|
||||
* never returns". (It must go before the function declaration, e.g.
|
||||
@@ -233,10 +299,10 @@
|
||||
* __attribute__((deprecated(msg))).
|
||||
*/
|
||||
#define PCAP_DEPRECATED(func, msg) __attribute__((deprecated))
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER >= 1500)) && !defined(BUILDING_PCAP)
|
||||
#elif defined(_MSC_VER) && !defined(BUILDING_PCAP)
|
||||
/*
|
||||
* MSVC from Visual Studio 2008 or later, and we're not building
|
||||
* libpcap itself.
|
||||
* MSVC, and we're not building libpcap itself; it's VS 2015
|
||||
* or later, so we have the deprecated pragma.
|
||||
*
|
||||
* If we *are* building libpcap, we don't want this, as it'll warn
|
||||
* us even if we *define* the function.
|
||||
@@ -251,11 +317,7 @@
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#include <sal.h>
|
||||
#if _MSC_VER > 1400
|
||||
#define PCAP_FORMAT_STRING(p) _Printf_format_string_ p
|
||||
#else
|
||||
#define PCAP_FORMAT_STRING(p) __format_string p
|
||||
#endif
|
||||
#define PCAP_FORMAT_STRING(p) _Printf_format_string_ p
|
||||
#else
|
||||
#define PCAP_FORMAT_STRING(p) p
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user