]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Explain why we're defining HAVE_REMOTE before including pcap.h.
authorGuy Harris <[email protected]>
Wed, 3 Apr 2019 18:10:14 +0000 (11:10 -0700)
committerGuy Harris <[email protected]>
Wed, 3 Apr 2019 18:10:26 +0000 (11:10 -0700)
tcpdump.c

index 9790a4e3f7c057c2f6bcca927662c79c38a2349b..7e2bc36d1f21805e12ac0ecab5f10abcf81e019c 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -92,6 +92,19 @@ The Regents of the University of California.  All rights reserved.\n";
 #endif /* HAVE_CASPER */
 #endif /* HAVE_CAPSICUM */
 #ifdef HAVE_PCAP_OPEN
+/*
+ * We found pcap_open() in the capture library, so we'll be using
+ * the remote capture APIs; define PCAP_REMOTE before we include pcap.h,
+ * so we get those APIs declared, and the types and #defines that they
+ * use defined.
+ *
+ * WinPcap's headers require that PCAP_REMOTE be defined in order to get
+ * remote-capture APIs declared and types and #defines that they use
+ * defined.
+ *
+ * (Versions of libpcap with those APIs, and thus Npcap, which is based on
+ * those versions of libpcap, don't require it.)
+ */
 #define HAVE_REMOTE
 #endif
 #include <pcap.h>