| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Putting it on the header suppresses AppVeyor builds; putting it in the
body might still not do so.
Back out a no-longer-needed debugging message, so we have something to
commit.
[skip ci]
|
|
|
|
|
| |
AppVeyor Updated Something, and VS 2019 is getting some weird linking
error with the new version of OpenSSL installed on that image.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the stuff to figure out for what architectures to build before we
do anything with rpcapd.
Have that stuff decide both what architectures to build libraries for
and what architectures to build executables for. Call the executables
list OSX_EXECUTABLE_ARCHITECTURES rather than OSX_PROGRAM_ARCHITECTURES,
to match the terminology used in the names of the "add a target"
commands.
Remove the not-updated-for-ARM stuff in rpcapd's CMakeLists.txt, and
just use the architecture list we picked in the main CMakeLists.txt.
Remove some debugging messages.
|
|
|
|
|
|
|
|
|
| |
If libpcap isn't going to support remote capture, there's nothing to for
which to use TLS.
This means we don't do the "make sure we have a universal build of
libssl" check when figuring out whether to do a universal build of
libpcap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* amount
* anymore
* authentication
* availability
* bracket
* captured
* casted
* communications
* compliant
* configurable
* cumulate
* deinitialize
* descriptors
* didn't
* disassembler
* disassociate
* distributions
* divvy
* doing
* entries
* everything
* explicitly
* explosion
* expression
* extracting
* failed
* family
* find
* github
* global
* implementations
* incorrectly
* intel
* interlocked
* justifying
* know
* launched
* libraries
* malloced
* mask
* maximum
* network
* nonexistent
* number
* occurred
* optimizer
* overflow
* overwrite lower
* packet
* packetfilter
* packets
* parse hosts
* payload
* phase
* programmers
* promiscuous
* protocol
* receiving
* redefinition
* sampling
* savefile
* schwartz
* should
* snapshot
* something
* specifies
* straightforward
* stream
* subdir
* support
* surrogate
* suse
* system is
* test with
* than
* those
* unmaintained
* valid
* way
* western
* wireshark
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, tell the user that they need to install Npcap or WinPcap,
and the respective SDK, and tell CMake where the SDK is located. On
UN*X, tell them to check INSTALL.md.
In addition, tell the user to set the capture type to "null" when
configuring if they just want a version of libpcap that can read capture
files but can't do live captures.
That way, the user won't be surprised at run time by a libpcap that
fails with "live packet capture not supported on this system" if they
try to capture traffic.
Fixes #1016 (in the sense that configuration stops if a capture
mechanism can't be found, and tells the user what they need to do).
|
| |
|
|
|
|
|
| |
Put the test for a particular named sanitizer into a macro, so it can be
used in the two loops that check sanitizers.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
As of llvm12_clang-12.0.1-5, Clang defaults to generating PIC, just as
GCC does, and the entire matrix now works.
|
|
|
|
| |
[skip ci]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we set CMAKE_C_FLAGS_INIT to "-fPIC" before setting the project, that
initializes CMAKE_C_FLAGS to "-fPIC" *before* prepending the contents of
the CFLAGS environment variable, and *before* doing any tests that
depend on linking, in the project() command, so it 1) adds -fPIC before
doing those tests, so they don't fail due to the object files being
unfit to link into an executable, and 2) adds the contents of CFLAGS to
CMAKE_C_FLAGS, so the user can set CFLAGS and have it affect the build.
This requires CMake 3.7 or later, so we set 3.7 as the minimum required
on Haiku.
|
|
|
|
|
|
|
|
| |
Haiku bug 18258 makes it too painful to beat the configuration process
into submission.
Update a comment, by copying over the comment from tcpdump's
CMakeLists.txt, while we're at it.
|
| |
|
|
|
|
| |
Improve the explanation of why we're doing all the stuff there.
|
|
|
|
|
|
|
|
|
|
|
| |
The CMAKE_INSTALL_MESSAGE variable may be set to control which messages
like the following are printed:
-- Installing: /some/destination/path
-- Up-to-date: /some/destination/path
value NEVER: Print neither Installing nor Up-to-date messages.
Use it also for the following messages:
-- Symlinking: /some/path to ...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suppresses the CMake CMP0042 OLD deprecation warning.
The new behaviour sets the target property MACOSX_RPATH to TRUE
by default.
However, this behaviour can also be controlled by CMAKE_MACOSX_RPATH,
which MAXOSX_RPATH will default to, if set.
CMAKE_MACOSX_RPATH is only set if undefined, allowing users to
override this.
Essentially, this commit does the exact same thing as CMP0042 OLD
does, except with CMP0042 NEW enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows minimum required is already 3.12.
This change avoids this warning:
CMake Deprecation Warning at CMakeLists.txt:7 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Fixes GH #1138.
|
|
|
|
| |
[skip ci]
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For unknown reasons, check_include_file() doesn't just attempt to
compile a test program that includes the header in question, it also
attempts to link it.
For unknown reasons, at least some of the static inline functions
defined in infiniband/verbs.h are not inlined by the Sun^WOracle Studio
C compiler, so the compiler generates code for them as part of the
object code resulting from compiling the test program. At lest some of
those functions call routines in -libverbs, so, in order to keep the
compile and link from failing, even though the header file exists and is
usable, we need to link with -libverbs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
32-bit vs. 64-bit builds seems to be the issue with a significant
number of annoying problems, and we can extract *that* information from
CMake fairly reliably, unlike, say, the target architecture. (building
with a different bit width from the platform's bit width is not
cross-compiling, so CMake just set CMAKE_SYSTEM_PROCESSOR to the same
value as CMAKE_HOST_SYSTEM_PROCESSOR, which, on UN*Xes, is the output of
"uname -p". On 64-bit Solaris, that may be a name reflecting the
*32-bit version* of the instruction set, which is incorrect if we're
doing 64-bit builds, e.g. with GCC or with "cc -m64" - no, the default
for Sun^WOracle Studio's compiler is *32-bit*, even on 64-bit platforms.
Go figure.)
|
|
|
|
| |
That adds more information that may help when trying to diagnose issues.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For all dependencies found by pkg-config, directly ask pkg-config for
--libs and --libs-static; don't rely on anything from CMake, as CMake
reduces the information content of what *it* gets from --libs and
--libs-static to a level insufficient to reconstruct what pkg-config
gave it.
For dependencies not found by pkg-config, slice the library name up and
use that to construct -L and -l flags.
Make sure we get enough information to fill in LIBS, as that's what now
gets reported by pcap-config --libs --static-pcap-only.
|
|
|
|
|
| |
It's a list of -l flags, not a list of library names, as it's put into a
libpcap.pc file in the Libs.private entry.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In libpcap.pc, don't put libraries into Libs.private if we can just put
the package to which the libraries belong in Requires.private and let
pkg-config do the work.
When configuring with CMake, make sure that we do *NOT* put library full
paths into the lists of libraries required when linking statically
against libpcap.
In the configure script, do a push settings/pop settings
operation before checking various libraries similar to what's done in
CMake files, to make sure that the results of the tests aren't affected
by tests done previously.
Have the macros for autoconf that run pcap-config take arbitrary
arguments rather than a single flag value, to allow testing with --libs
and --static.
This should fix issue #1062.
|
|
|
|
|
| |
"the XXX with that the program was linked" isn't correct; it should be
"the XXX with which the program was linked".
|
| |
|
|
|
|
|
|
|
|
|
| |
On platforms where a program built with a libpcap installed somewhere
other than the default system library directory must be linked with an
rpath option to cause the program to, when run, find the library with
which it was linked, specify that flag in the output from pcap-config
and the output produced by pkg-config when used with our libpcap.pc
file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stick a byte-order magic number, in the host byte order of the server,
into the authentication reply.
If the authentication reply is large enough to contain that magic
number, extract it and, from it, determine whether the server's byte
order is the opposite of the client's byte order; if it's not present,
assume the server has the same byte order.
If the two byte orders are differen, do the same byte-order fixing of
the packet contents that we do when reading a pcap file or pcapng
section with the opposite byte order, so that host-byte-order fields are
converted from the byte order of the host that sent or wrote them to the
byte order of the host that received or read them.
This change will allow a client to work with all servers, regardless of
whether they provide the byte order or not, although if the server
doesn't provide the byte order, and it happens to be the opposite of the
client's byte order, packets with a link-layer header type that contains
host-byte-order fields will not be able to be processed correctly. It
also allows clients that don't handle the byte order magic number in the
authentication reply to work with all servers, as they will just discard
what they consider extra data at the end of the reply.
(Note: fixing the byte order in the server requires that the client send
a byte order indication to the server, so *either* fix works only
between an updated client and an updated server. We already have
optional data in the authentication reply, to allow updated servers and
clients to negotiate a protocol version while still allowing updated
clients to work with older servers and older clients to work with
updated servers, so this just continues that mechanism.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For 32-bit builds, make sure that, if /usr/lib/amd64/pkgconfig is in the
path, we put /usr/lib/pkgconfig before it, so that we find the .pc files
for 32-bit versions of packages.
For 64-bit builds, make sure that, if /usr/lib/pkgconfig is in the path,
we put /usr/lib/amd64/pkgconfig before it and, if it's not in the path,
we have /usr/lib/amd64/pkgconfig at the end of the path, so that we find
the .pc files for 64-bit versions of packages.
The dbus package makes this necessary.
This should fix issue #1112.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
autotools:
Determine the size of a void *; we don't use it now except for the
following test, but we will be using it in the future to determine
whether we're doing a 32-bit or 64-bit build, so that we can bludgeon
pkg-config into finding the right versions of libraries.
Check to make sure that the C and C++ compiler don't generate code for
different data models; if they do, it means we can't build C and C++
code and combine them, and also means that CMAKE_SIZEOF_VOID_P won't
"reflect reality" because there's no single reality to reflect, and we
won't be able to use it to determine whether we're doing a 32-bit or
64-bit build (which we may have to do in the future to make pkg-config
work correctly on some platforms). There's unlikely to be a mismatch in
Haiku, but we do this anyway for future-proofing.
CMake:
Only check for a C++ compiler on Haiku.
Check to make sure that the C and C++ compilers don't generate code for
different data models.
This is a first step for issue #1112.
|
|
|
|
|
|
|
|
|
|
| |
It's NUL:, not /dev/null.
(Flex - or, at least, versions "flex 2.5.35 Apple(flex-32)" of Flex and
"win_flex 2.6.4" of WinFlex, but I suspect it's in vanilla 2.5.35 and
2.6.4 as well - have a truly awful error if the attempt to create the
file specified by --header-file= fails - it reports "flex: fatal
internal error, freopen(headerfilename) failed".)
|
|
|
|
|
|
| |
As we do in autotools, check wheether {F}lex supports -P, --header-file,
and --nounput, and can handle our scanner.l, to make sure it's Flex and
not AT&T Lex.
|
|
|
|
|
| |
As we do in autotools, if we find YACC rather than Bison, check whether
it supports -V, to make sure it's Berkeley YACC not AT&T YACC.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As Francois-Xavier and Guy point it out, it is a C + C++ project on
Haiku. My change prevented pcap-haiku.cpp (which does not currently
compile) from compiling and subsequently the linking failed:
ld: ../../libpcap.a(pcap.c.o): in function `pcap_findalldevs':
pcap.c:(.text+0x54e): undefined reference to `pcap_platform_finddevs'
ld: ../../libpcap.a(pcap.c.o): in function `pcap_create':
pcap.c:(.text+0x1456): undefined reference to `pcap_create_interface'
collect2: error: ld returned 1 exit status
Revert the change and let the build process fail where the problem is
(at pcap-haiku.cpp).
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same as in tcpdump commit 3834579. This does not solve any known
problem, but should reduce the potential for things to go wrong.
-- The CXX compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
|
|
|
|
| |
As discussed on tcpdump-workers.
|
|
|
|
|
|
|
|
| |
Correctly compute the "real" length for isochronous transfers.
When reading memory-mapped Linux capture files, fix up the "real" length
field, in case the file was written by a program doing a capture with
the bug.
|
|
|
|
|
|
|
| |
That way, if it requires some extra flags or libraries, we find out
about them.
Clean up some comment typoes while we're at it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
For autotools, if --with-dpdk={path} was specified, prepend
{PATH}/pkgconfig to PKG_CONFIG_PATH before running pkg-config, and
restore PKG_CONFIG_PATH afterwards.
For CMake, if dpdk_ROOT is defined, prepend ${dpdk_ROOT}/pkgconfig to
PKG_CONFIG_PATH before running pkg-config, and restore PKG_CONFIG_PATH
afterwards.
Fix some typoes in comments while we're at it.
|