summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused variable retval in sock_present2networkHEADmasterRose2023-05-161-2/+1
| | | | This quiets the compiler since it is not even returned anyway, and is a misleading variable name.
* Set the date right in pcap-config(1). [skip ci]Denis Ovsienko2023-05-141-1/+1
|
* Merge pull request #1165 from nmap/npcap-1.00-bug-workaroundcoverity_scanGuy Harris2023-05-091-38/+44
|\ | | | | Work around a bug in Npcap 1.00 in case of driver version mismatch
| * Work around a bug in Npcap 1.00 in case of driver version mismatchDaniel Miller2023-03-221-38/+44
| |
* | Merge pull request #1180 from AtariDreams/strGuy Harris2023-05-093-5/+5
|\ \ | | | | | | Use the intended date types for variables passed as or compared to other types
| * | Use the intended date types for variables passed as or compared to other types.Rose2023-05-083-5/+5
| | |
* | | Merge pull request #1182 from guyharris/werror-with-newer-clangGuy Harris2023-05-081-5/+0
|\ \ \ | | | | | | | | build.sh: remove the check for Clang 15 and 16.
| * | | build.sh: remove the check for Clang 15 and 16.Guy Harris2023-05-081-5/+0
|/ / / | | | | | | | | | | | | We're working around the warning they produce for yynerrs in the parser being set but not used.
* | | Merge pull request #1181 from guyharris/squelch-annoyig-warningGuy Harris2023-05-081-0/+8
|\ \ \ | |/ / |/| | compiler: squelch set-but-not-used warning for yynerrs.
| * | compiler: squelch set-but-not-used warning for yynerrs.Guy Harris2023-05-081-0/+8
|/ /
* | Cirrus CI: Don't try Valgrind on Linux. [skip appveyor]Denis Ovsienko2023-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Valgrind does not like binaries produced by Clang 15: $ valgrind --leak-check=full --error-exitcode=1 testprogs/findalldevstest ==23242== Memcheck, a memory error detector ==23242== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==23242== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info ==23242== Command: testprogs/findalldevstest ==23242== ==23242== Valgrind: debuginfo reader: ensure_valid failed: ==23242== Valgrind: during call to ML_(img_get) ==23242== Valgrind: request for range [70669806, +4) exceeds ==23242== Valgrind: valid image size of 1078392 for image: ==23242== Valgrind: "/tmp/cirrus-ci-build/testprogs/findalldevstest" ==23242== ==23242== Valgrind: debuginfo reader: Possibly corrupted debuginfo file. ==23242== Valgrind: I can't recover. Giving up. Sorry.
* | Merge pull request #1179 from guyharris/dont-need-that-any-moreGuy Harris2023-05-081-6/+16
|\ \ | | | | | | compiler: limit some Berkeley YACC workarounds to pre-2017-07-09 releases.
| * | compiler: limit some Berkeley YACC workarounds to pre-2017-07-09 releases.Guy Harris2023-05-081-6/+16
| | | | | | | | | | | | | | | | | | | | | Those later releases only define yydebug if YYDEBUG is defined and only declare yynerrs as global for non-reentrant parsers, so limit the workarounds for those problems to releases before the 1.9 20170709 release.
* | | Cirrus CI: Bump a few versions up. [skip appveyor]Denis Ovsienko2023-05-081-6/+7
| | | | | | | | | | | | | | | | | | | | | Switch to FreeBSD 13.2 and size it down as in tcpdump much earlier. Switch Clang to 15 in FreeBSD and Linux (for some reason there was no pkg error in this project, but it makes sense to upgrade consistently anyway).
* | | Revert "Makefile.in: Build libpcap before the testprogs in releasecheck target"Francois-Xavier Le Bail2023-05-081-4/+2
| | | | | | | | | | | | | | | | | | This reverts commit c7f7036094bf9c48fdfa803085857a35753e938f. This is a follow-up to 5e6aead918140299fd5b12c74dd4c728732ab47d.
* | | Makefile.in: Build libpcap before the testprogsFrancois-Xavier Le Bail2023-05-081-1/+1
| | |
* | | Makefile.in: Build libpcap before the testprogs in releasecheck targetFrancois-Xavier Le Bail2023-05-081-2/+4
| | | | | | | | | | | | | | | | | | This should avoid, with autotools, when doing parallel builds: make[2]: *** No rule to make target '../libpcap.a', needed by 'valgrindtest'. Stop.
* | | Makefile.in: Use the variable MAKE instead of the make commandFrancois-Xavier Le Bail2023-05-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From https://www.gnu.org/software/make/manual/make.html#MAKE-Variable: ``` Recursive make commands should always use the variable MAKE, not the explicit command name 'make', as shown here: subsystem: cd subdir && $(MAKE) ``` This should avoid the following warning when running 'make releasecheck' in some cases: make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
* | | Cirrus CI: Avoid perl warnings about setting locale, Linux taskFrancois-Xavier Le Bail2023-05-081-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | The warnings were like: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
* | Merge pull request #1178 from guyharris/parse-port-ranges-with-stouGuy Harris2023-05-072-45/+404
|\ \ | | | | | | compiler: parse port numbers in ranges using the standard number parser.
| * | compiler: parse port numbers in ranges using the standard number parser.Guy Harris2023-05-072-45/+404
|/ / | | | | | | | | Run them through the same code that's used for numbers in the lexical analyzer, for consistency.
* | CI: Update build.sh for Clang 16. [skip appveyor]Denis Ovsienko2023-05-081-1/+1
| | | | | | | | | | Apparently, the warning that Clang started to generate in release 15 still stands in Clang release 16.
* | compiler: tweak error messages for port or proto with an IP address.Guy Harris2023-05-071-21/+21
| |
* | compiler: do earlier error checking for bogus arguments.Guy Harris2023-05-061-15/+77
| | | | | | | | | | | | Report specific errors for various IP address and IP address+netmask combinations when used as arguments to port, portrange, proto, and protochain.
* | compiler: remove unneeded argument from gen_mcode6().Guy Harris2023-05-063-13/+10
| | | | | | | | | | We don't support "<ipv6net> mask <ipv6mask>", so no need to pass an <ipv6mask> argument.
* | pcap_nametoportrange: don't have a special case with sscanf().Guy Harris2023-05-051-24/+17
| | | | | | | | | | Do the parsing ourselves; that avoids, for example, sscanf() mishandling out-of-range numbers.
* | Merge pull request #1175 from guyharris/thread-localGuy Harris2023-05-056-10/+90
|\ \ | | | | | | Make some static variables thread-local.
| * | Make some static variables thread-local.Guy Harris2023-05-056-10/+90
|/ / | | | | | | | | | | | | | | This should make some functions thread-safe, even if it doesn't make them fully-reentrant; at least some of them would requiree API changes to full reentrancy. This should fix #1174.
* | instrument functions: Reduce the scope of a variableFrancois-Xavier Le Bail2023-05-041-1/+2
| | | | | | | | | | | | | | | | Fix the cppcheck warning: instrument-functions.c:77:15: warning: The scope of the variable 'instrument_type' can be reduced. [variableScope] [skip ci]
* | CI: Copy build_common.sh from tcpslice. [skip ci]Denis Ovsienko2023-05-011-0/+4
| |
* | Address a few compiler warnings on Haiku.Denis Ovsienko2023-04-234-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In gencode.c instead of casting pointer types copy the data to squelch 4 previously known warnings from GCC and Clang. (Oddly enough, Haiku is the only OS that unconditionally puts a 32-bit array into the union inside struct in6_addr, yet the only OS where these warnings appeared.) In pcap.c add a temporary workaround for ioctl() to squelch two other Clang warnings: pcap.c:1619:6: error: missing field 'size' initializer [-Werror,-Wmissing-field-initializers] pcap.c:1638:6: error: missing field 'size' initializer [-Werror,-Wmissing-field-initializers] With these changes GCC builds are now warning-free, so in build.sh set LIBPCAP_TAINTED for Clang only and update the comment to show the current remaining warnings.
* | pcap-config(1): Simplify and add one more detail. [skip ci]Denis Ovsienko2023-04-171-8/+6
| |
* | Document pcap-config(1) backward compatibility. [skip ci]Denis Ovsienko2023-04-101-1/+9
| |
* | cmake: fail if -DENABLE_SANITIZERS=ON and no sanitizers were found.Guy Harris2023-04-091-0/+3
| |
* | cmake: use a macro for testing sanitizers.Guy Harris2023-04-091-80/+45
| | | | | | | | | | Put the test for a particular named sanitizer into a macro, so it can be used in the two loops that check sanitizers.
* | cmake: support -DENABLE_SANITIZERS={OFF,ON}.Guy Harris2023-04-091-37/+147
| | | | | | | | | | | | | | | | This should keep silly tools that pass -DENABLE_SANITIZERS=OFF to CMake if no sanitizers have been specified, rather than just not defining ENABLE_SANITIZERS. This should fix #1171.
* | Merge pull request #1170 from guyharris/clean-up-oid-err-handlingGuy Harris2023-04-071-42/+65
|\ \ | | | | | | npf: clean up handling of errors from setting promiscuous mode.
| * | npf: clean up handling of errors from setting promiscuous mode.Guy Harris2023-04-071-42/+65
|/ / | | | | | | | | | | | | | | | | | | Handle both ERROR_NOT_SUPPORTED and "NDIS_STATUS_NOT_SUPPORTED with the Customer bit set" as indications that an attempt to set promiscuous mode was rejected because the adapter doesn't support it, in case the setting of the Customer bit is dropped from the Npcap NPF driver in the future. While we're at it, shuffle some #defines for status codes to put them together and update comments.
* | CHANGES: Date the 1.10.4 section. [skip ci]Denis Ovsienko2023-04-071-2/+2
| |
* | CHANGES: Add a change backported to 1.10Francois-Xavier Le Bail2023-04-071-0/+1
| |
* | Update config.{guess,sub}, timestamps 2023-01-01,2023-01-21Francois-Xavier Le Bail2023-04-062-11/+34
| | | | | | | | From repository git://git.savannah.gnu.org/config.git
* | CHANGES: Add a change backported to 1.10Francois-Xavier Le Bail2023-04-021-0/+2
| | | | | | | | [skip ci]
* | Correct copy-pasteo on Makefile comment about grammar.y.inEd Maste2023-03-271-1/+1
| |
* | Autoconf: Update a stale comment in aclocal.m4. [skip ci]Denis Ovsienko2023-03-271-1/+1
| |
* | Finalize moving of bpf_filter.c. [skip ci]Denis Ovsienko2023-03-264-6/+6
| | | | | | | | | | | | | | As Blake Easley points it out in GitHub bug report #1166, before commit 08a5870 in 2018 bpf_filter.c was a symlink to bpf/net/bpf_filter.c, but now it is a regular file, so it is wrong to list it in .gitignore. Fix that and reflect the file path change in DOS makefiles.
* | Refine rpcapd-config.manfile. [skip ci]Denis Ovsienko2023-03-261-4/+8
| | | | | | | | Fix letter case and use bold/italics consistently with the other pages.
* | rpcapd(8): Use formatting more consistently. [skip ci]Denis Ovsienko2023-03-261-29/+27
|/ | | | | | When "rpcapd" uses not a plain font, make that italics instead of bold. Use bold for signal and file names, but not for service names. Get newlines right for "-S" and "-X". Reword some prose for clarity.
* CMake: install include files in CMAKE_INSTALL_INCLUDEDIRDavid Karoly2023-03-201-4/+4
|
* Remove prototype header for Digital/Tru64 5.x. [skip ci]Denis Ovsienko2023-03-183-32/+1
| | | | | The first 5.x release was 22 years ago, the vendor stopped supporting this OS 10 years ago.
* instrument functions: Use an environment variable instead of config filesFrancois-Xavier Le Bail2023-03-131-32/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the environment variable INSTRUMENT is - unset or set to an empty string, print nothing, like with no instrumentation - set to "all" or "a", print all the functions names - set to "global" or "g", print only the global functions names The configuration with --enable-instrument-functions remains. Note that before this change, the default was to print all functions. Now it is to print nothing. This allows to run with tcpdump, tcpslice or any program linked to libpcap: $ INSTRUMENT=a ./my_program ... $ INSTRUMENT=g ./my_program ... $ INSTRUMENT= ./my_program ... or $ export INSTRUMENT=global $ ./my_program ... This also allows to run the statically compiled binary on another host after copying it. Moreover: Reduce the scope of a variable. Rename a variable. Remove '\n' in the perror() call. Remove 2 spaces in function calls (style). (Same as in tcpdump and tcpslice.) [skip ci]