]> The Tcpdump Group git mirrors - libpcap/commitdiff
Revert "pcap-npf.c: handle NdisMediumIP."
authorGuy Harris <[email protected]>
Sat, 26 Jun 2021 02:25:52 +0000 (19:25 -0700)
committerGuy Harris <[email protected]>
Sat, 26 Jun 2021 02:25:52 +0000 (19:25 -0700)
This reverts commit ef0e7b15fe871d79e678a3482b0c5a02171dacfe.

We'll set _WIN32_WINNT to "Windows 7" when building for MinGW, to force
it to give us NdisMediumIP, and then we'll apply the original pull
request to add NdisMediumIP support.

(cherry picked, in effect, from commit
460c2f545b1d269da3d069bed2975ecde9a0b804)

CMakeLists.txt
cmakeconfig.h.in
pcap-npf.c

index c134e6e7b3e2ef8252ae42fc05ce8eb27848fee4..b83fbbd76627c3c5c9a2624de5e50feba1a69f6d 100644 (file)
@@ -1130,32 +1130,6 @@ if(WIN32)
             # Set the capture type to NPF.
             #
             set(PCAP_TYPE npf)
-
-            #
-            # Check whether ntddndis.h defines NdisMediumIP.
-            # SDKs for older versions of Windows (Windows 7,
-            # Windows 8?) don't define it.
-            # It's an enum value, so this is the only way
-            # to test whether it's defined.
-            #
-            check_c_source_compiles(
-"/* Old-school MinGW have these headers in a different place.
- */
-#include <winsock2.h>
-#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
-  #include <ddk/ntddndis.h>
-  #include <ddk/ndis.h>
-#else
-  #include <ntddndis.h>  /* MSVC/TDM-MinGW/MinGW64 */
-#endif
-
-int
-main(void)
-{
-    return NdisMediumIP;
-}
-"
-                HAVE_NDIS_MEDIUM_IP)
         else()
             #
             # We don't have any capture type we know about, so just use
index 9f1d9647fa7fd8790f8ef8f5bafdb699f4ec99ad..ee51ac635aff67247a1eb64f7957d23682b56990 100644 (file)
@@ -99,9 +99,6 @@
 /* Define to 1 if you have the <memory.h> header file. */
 #cmakedefine HAVE_MEMORY_H 1
 
-/* Define to 1 if you have the `NdisMediumIP` enum value. */
-#cmakedefine HAVE_NDIS_MEDIUM_IP 1
-
 /* Define to 1 if you have the <netpacket/packet.h> header file. */
 #cmakedefine HAVE_NETPACKET_PACKET_H 1
 
index b46a3c5efba2e6c72416b72de2cd74b63701d3db..52aee78a98ae2973903e2f4c99414b46dd3b0c5d 100644 (file)
@@ -1127,12 +1127,6 @@ pcap_activate_npf(pcap_t *p)
                p->linktype = DLT_RAW;
                break;
 
-#ifdef HAVE_NDIS_MEDIUM_IP
-       case NdisMediumIP:
-               p->linktype = DLT_RAW;
-               break;
-#endif
-
        default:
                /*
                 * An unknown medium type is assumed to supply Ethernet