aboutsummaryrefslogtreecommitdiff
path: root/cmakeconfig.h.in
Commit message (Collapse)AuthorAgeFilesLines
* Add the Solaris "any" device in pcap_findalldevs() if we have it.Guy Harris2023-06-131-0/+3
| | | | | | | | There's no good run-time test, so we test at configure time, by checking whether /usr/include/inet/ipnet.h exists and contains IPNET_ANY_LINK. See https://github.com/the-tcpdump-group/tcpdump/issues/1057#issuecomment-1584088911 We make a common routine to use to add that device.
* Lose some SINIX-specific build props. [skip appveyor]Denis Ovsienko2023-02-251-5/+0
| | | | | SINIX went extinct 15-20 years ago. Eliminate an AC_TRY_COMPILE warning from Autoconf 2.71.
* pcap-usb-linux: fix scan for usbmon devices.Guy Harris2022-03-131-3/+0
| | | | | | | | | | | | | | The directory to scan is just /dev, which is wired into the udev source, at least in the systemd source tree. Just scan that directory, rather than using using udevinfo to find out the directory. (If there is ever a reason to look anywhere there than /dev for the usbmon devices - and, if so, there had better be a good reason, as stuffing special files anywhere other than /dev on any UN*X, including Linux, will break programs that use /dev/null or /dev/tty, among other well-known devices - then provide a mechanism that works at *run time*, so that it works even for cross-builds libpcap, and that works regardless of whether the machine on which the built version of libpcap has udev and whether it has udevinfo or udevadm or whatever.)
* Get rid of no-longer-defined HAVE_ macros.Guy Harris2022-01-291-6/+0
|
* Revert "pcap-npf.c: handle NdisMediumIP."Guy Harris2021-06-251-3/+0
| | | | | | | | This reverts commit 74be794fe7b3540999149f976e4a829289ad43ef. 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.
* pcap-npf.c: handle NdisMediumIP.Guy Harris2021-06-231-0/+3
| | | | | | | | Packets from an NdisMediumIP being with an IP header, with no link-layer header preceding it, so say it's DLT_RAW. It's not defined in SDKs for older versions of Windows, so we have to check for it with a compile test in CMake.
* On Linux, don't assume the compiler supports __atomic builtins.Guy Harris2021-05-111-0/+6
| | | | | | | | Not all compilers that are used to compile code to run on Linux have these builtins. For example, older versions of GCC don't, and at least some people are doing cross-builds for MIPS with older versions of GCC. This should fix GitHub issue #1003.
* Add support for getting and setting packet time stamps with Npcap.Guy Harris2020-12-151-0/+3
| | | | | | If, when building for WinPcap/Npcap on Windows, we have PacketGetTimestampModes(), add support for getting the available time stamp modes and setting the time stamp mode.
* dpdk: check for rte_ether_addr and RTE_ETHER_MAX_JUMBO_FRAME_LEN.Guy Harris2020-05-191-0/+3
| | | | | | | | This lets us build with older versions of DPDK that define struct ether_addr and ETHER_MAX_JUMBO_FRAME_LEN and newer versions that define struct rte_ether_addr and RTE_ETHER_MAX_JUMBO_FRAME_LEN. That addresses the issue in GitHub pull request #921.
* linux: drop support for libnl 1 and 2.Guy Harris2020-05-191-12/+0
| | | | | | | Version 2 was, apparently, short-lived, and version 1 is source and binary incompatible with version 3, and it appears that, these days, everybody's using version 3. We're not supporting older versions of the Linux kernel; let's drop support for older versions of libnl, too.
* Support AirPcap devices with a pcap module.Guy Harris2020-05-071-0/+3
| | | | | | | | This allows us to update the support for newer APIs in the future - and in the present, with pcap_set_datalink() - and would allow Npcap to remove its AirPcap support. Add another test program, while we're at it.
* Add support for UTF-8 strings on Windows.Guy Harris2020-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a routine pcap_init() that initializes pcap, specifying whether strings should be treated as being in UTF-8 or a local character encoding. On UN*Xes, we don't change our behavior based on that setting; if there is ever an issue with local character encodings *other* than UTF-8, we can use it. On Windows, the local character encoding is the local ANSI code page; if pcap_init() isn't called, or is called with PCAP_CHAR_ENC_LOCAL, strings are treated as being in the current ANSI code page, as before, otherwise they're treated as being in UTF-8. This includes file path names and error messages. In addition, if pcap_init() is called, regardless of the options, we disable pcap_lookupdev(), making it always return NULL, as it retunred *UTF-16LE* strings (plural!) on Windows NT, and pcap_create() had to check for UTF-16LE strings to work around that. That workaround is unsafe (it will read past the end of the input string if the string is one ASCII character), and is also disabled if pcap_init() is called. We also make rpcapd send UTF-8 error message strings over the wire; sending local code page strings is a Bad Idea, as the client has no idea what the server's code page is. (Do not assume the client and server are necessarily in the same location.) Fix the capitalization of "Winsock" while we're at it; Microsoft appears to spell it "Winsock", rather than "WinSock".
* Remove duplicate wordsFrancois-Xavier Le Bail2020-03-281-1/+1
| | | | [skip ci]
* Always assume we have SIOCBONDINFOQUERY on Linux.Guy Harris2020-02-181-3/+0
| | | | | It was introduced long before 2.6.27, and we require 2.6.27 or newer, so we can just assume we have it.
* Don't check for ethtool.h.Guy Harris2020-02-181-3/+0
| | | | We require Linux 2.6.27 or later, and that has ethtool.h.
* Don't check for linux/sockios.h.Guy Harris2020-02-181-3/+0
| | | | | We unconditionally include it in pcap-linux.c; don't check for it, and don't subsequently conditionally include it again.
* Don't check for struct tpacket_stats.Guy Harris2020-02-181-3/+0
| | | | | We fail to compile if we don't at least have TPACKET_V2 support; if we have that, we have struct tpacket_stats.
* Regenerate autoconf files, update cmakeconfig.h.in.Guy Harris2020-02-181-3/+0
|
* Regenerate configure script and update cmakeconfig.h.in.Guy Harris2020-02-091-3/+0
|
* Don't speak of Linux usbmon as generic USB sniffing support.Guy Harris2019-10-311-3/+3
| | | | | | | | | It's a Linux-specific mechanism; on at least two other platforms, FreeBSD and macOS, USB sniffing takes place through BPF, so it's not something that we allow to be disabled. Clean up the checks for Linux-specific mechanisms, putting them inside a general "Is this Linux?" test.
* Detect Npcap's version.h in build tree and set HAVE_VERSION_HDaniel Miller2019-04-191-1/+4
|
* Make sure asprintf() is declared if it's present.Guy Harris2019-03-191-3/+6
| | | | | | | | | | | | | | | | | GNU libc is a pain. If you don't define _GNU_SOURCE, it doesn't declare asprintf(). If you *do* define _GNU_SOURCE, the strerror_r() it declares isn't POSIX-compliant. We use asprintf() if present, so we need it to be declared; define _GNU_SOURCE in ftmacros.h. At configuration time, if we have strerror_r(), check whether it's GNU-style or POSIX-style, and define different #defines for those two cases. Handle GNU-style strerror_r() and POSIX-style strerror_r() differently in pcap_fmt_errmsg_for_errno(). Make sure everything that uses asprintf() includes ftmacros.h before including stdio.h.
* Fix entry for HAVE_VSYSLOG.Guy Harris2019-03-121-1/+1
| | | | In cmakeconfig.h.in, you use #cmakedefine, with a value, you don't use
* Make cmakeconfig.h.in a bit more like config.h.in.Guy Harris2019-03-121-3/+6
| | | | | | | | | | | Add a #cmakedefine for HAVE_CONFIG_HAIKUCONFIG_H and move PCAP_SUPPORT_DPDK. This makes it a bit easier to compare the autotools-generated config.h and the CMake-generated config.h, to make sure the latter is OK (config.h.in is generated by autoconf, so we don't have to maintain it ourselves; cmakeconfig.h.in isn't, so we have to maintain it ourselves, and may make errors).
* Use asprintf(), and provide a version for systems that lack it.Guy Harris2019-02-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | This lets us get rid of places where we calculate the length that a formatted string will require, attempt to allocate a buffer for the string, and then format the string into that buffer; this way, we don't have to hope we got the calculation correct, we rely on the same code that formats strings to do the calculation. Provide versions of asprintf() for: 1) Windows and the MSVC runtime, where we use _vscprintf() to determine the length; 2) systems that have (what is presumed to be) an snprintf() that, when handed a too-short buffer, returns the number of characters that would have been written had the buffer been long enough (as C99 specifies), where we format to a one-character buffer to determine the length; 3) systems that don't have snprintf(), where we use the asprintf() provided by the missing/snprintf.c file that also provides snprintf(). While we're at it, include "portability.h" in missing/win_snprintf.c, to get declaration/definition checking done.
* Handle systems that lack vsyslog(), such as AIX.Guy Harris2019-01-111-0/+3
| | | | Add a copyright notice to rpcapd/log.{c,h} while we're at it.
* Add CMake support for building with TLS support.Guy Harris2019-01-061-0/+3
|
* update cmakeconfig.h.in to support DPDKjingleyang2018-12-171-0/+3
|
* Merge branch 'master' into breakloop_pollGuy Harris2018-09-141-3/+0
|\
| * Assume we have limits.h.Guy Harris2018-09-091-3/+0
| | | | | | | | | | | | It's in C90 (and I think it was in C89); if you don't have it, you have an environment that's too old, especially given that we require a C99-capable compiler on UN*X.
* | Proper breakloop for linux on pcap_dispatchAdrian Budau2018-08-061-0/+3
|/ | | | On platforms that support it use an eventfd to exit any polling.
* Check for required alignment by testing CPU types.Guy Harris2018-08-041-3/+0
| | | | | | | | | Use the same test that extract.h does for processors whose load (and, for CISC processors, memory-to-register arithmetic) instructions support unaligned operands. This gets rid of the last place where we used LBL_ALIGN, so get rid of it. (We weren't setting it with CMake in any case.)
* Remove (unused) SITA support here.Guy Harris2018-08-021-3/+0
|
* Clarify what --enable-packet-ring does.Guy Harris2018-01-281-1/+1
| | | | | | It doesn't enable Linux packet ring support on any platform on which it's used, it enables packet ring support *on Linux*, and doesn't do anything on non-Linux platforms.
* Try to make pcap_compile() thread-safer.Guy Harris2018-01-271-0/+18
| | | | | | | | | | | | | | | | Always use getaddrinfo() for name-to-address lookups; it's the only portable API that lets you do those lookups in a thread-safe fashion. This means we require getaddrinfo(); yes, this leaves older OSes out in the cold - you'd have to provide your own getaddrinfo() on older OSes that lack it, just as you now will need to provide versions of Flex and bison/Berkeley YACC that can support reentrant scanners/parsers on older OSes that lack it, and compilers capable of supporting some C99 features on older platforms that lack it. Try to find reentrant versions of getnetbyname() and getprotobyname(); that's a pain, and, if none are found, we'll just have to hope that the native versions are thread-safe, which they aren't on NetBSD and OpenBSD.
* Change comment to match autotools config.h.Guy Harris2018-01-211-1/+1
|
* Don't test for __attribute__ in the configure script.Guy Harris2018-01-211-3/+0
| | | | | | Instead, use compiler test macros for the one remaining case where we tested for __attribute__ to check whether that *particular* attribute is supported.
* Use AC_CHECK_TYPES and AC_CHECK_MEMBERS.Guy Harris2018-01-201-29/+30
| | | | | | | | | Rather than rolling our own autoconf macros to test for the existence of data types and structure members, use AC_CHECK_TYPES and AC_CHECK_MEMBERS. That cleans the configure script code up a bit, and makes it a bit more like the CMakeLists.txt file.
* Fix checks for thread-safe strerror variants.Guy Harris2017-12-011-0/+6
| | | | | | | With autotools, check for strerror_s(), just in case it's used on Windows. With CMake, add HAVE_STRERROR_R and HAVE_STRERROR_S to cmakeconfig.h.in.
* Check for msg_control or msg_flags in struct msghdr.Guy Harris2017-11-111-0/+6
| | | | Solaris doesn't have either of them, so don't assume all UN*Xes do.
* Base the shadow-password decision on whether we have getspnam().Guy Harris2017-10-051-0/+3
| | | | | | | | | | | It appears to have the same signature and documented behavior in Linux and Solaris, so I suspect that, if it exists on a given UN*X, it works the same way. We still need to handle password verification on other platforms that don't store the encrypted password in the publicly-readable(!) /etc/passwd or another publicly-readable form (i.e., probably just about every UN*X on the planet, these days) but don't offer getspnam().
* Move ENABLE_REMOTE to where it is in config.h.in.Guy Harris2017-10-031-3/+3
| | | | | That makes it easier to compare the autotools and cmake config.h when testing.
* Call the flag to enable remote capture ENABLE_REMOTE.Guy Harris2017-10-031-1/+1
| | | | | | HAVE_REMOTE implies that there's some feature in our build environment that we have, but this is a flag that controls what the user specified at configuration time.
* Wrap @string@s in quotes, so they expand to a string.Guy Harris2017-10-031-3/+3
|
* And here's how you put it in quotes.Guy Harris2017-09-271-1/+1
|
* This is how you do string values in cmakeconfig.h.in.Guy Harris2017-09-271-1/+1
|
* LINUX_USB_MON_DEV is a string, not a number.Guy Harris2017-09-271-1/+1
|
* We need STRINGS_H_DECLARES_FFS in config.h with CMake.Guy Harris2017-09-271-0/+3
| | | | It's used, and it's put into config.h with autotools.
* Added version information to libraries build with cmakeAli Abdulkadir2017-09-261-3/+6
|
* Clean up the ether_hostton() stuff.Guy Harris2017-09-191-8/+10
| | | | | | | | | | | | On platforms where the OS's ether_hostton man page says "include this", include that. However, that doesn't always declare it, so still check whether it really declares ether_hostton(). Just use AC_CHECK_DECL() to do the checks - that fails either if the headers in question don't exists or if they exist buf don't end up declaring ether_hostton(). Check these in CMake as well.