| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
It's not specified by a libpcap header that might have a different
layout in different pcap releases, it's specified on the list of
link-layer header types and must remain the same forever (except for
getting additional bits defined), so we don't need to pick it up from
libpcap.
This means we get to use tcpdump's nd_ types; do so.
|
|
|
|
|
|
|
|
|
|
| |
It's not specified by a libpcap header that might have a different
layout in different pcap releases, it's specified on the list of
link-layer header types and must remain the same forever (except for
getting additional bits defined), so we don't need to pick it up from
libpcap.
This means we get to use tcpdump's nd_ types; do so.
|
|
|
|
|
| |
Otherwise, you get a complaint about there being too few arguments to
set_target_properties().
|
| |
|
|
|
|
| |
Make C_ADDITIONAL_FLAGS a string as well, and use it appropriately.
|
| |
|
| |
|
|
|
|
|
|
| |
It doesn't work at all prior to CMake 3.1 and, even in newer versions of
CMake, it doesn't support all the vendor compilers out there for various
UNIXes.
|
|
|
|
| |
Use it in the PPP printer.
|
|
|
|
|
|
|
|
|
| |
This assumes you can run tests/TESTrun.sh as a script, which means it
assumes your command interpreter will either recognize it as a shell
script and run it in a Bourne-compatible shell or will just try and
execute it and the #! header will cause it to be run by /bin/sh.
This probably won't work on Windows.
|
|
|
|
|
|
|
| |
Also, fail if we don't have gethostbyaddr(), either on Windows or on
UN*X.
Suppress some UN*X-only tests on Windows while we're at it.
|
|
|
|
|
| |
(Crud left over from using libpcap's CMakeLists.txt as a basis for this
one.)
|
|
|
|
|
|
|
|
| |
Some versions of the MSVC runtime library have a non-C99-compliant
vsnprintf(), which we want to avoid. On Windows, use snprintf() and
vsnprintf() for VS 2015 and later, where they both exist in
C99-compliant forms, and wrap _{v}snprintf_s() otherwise (they're
guaranteed to do the null termination that we want).
|
|
|
|
| |
WinPcap 4.1.3 has only wsockinit(); check for both, on Windows.
|
| |
|
| |
|
|
|
|
|
| |
It's not necessarily in one of the default include directories, so look
in the directory where we're supposed to look for pcap header files.
|
|
|
|
|
|
| |
With MSVC 2015, stdio.h defines snprintf() and vsnprintf() as inline
functions, so you need to include stdio.h when testing for them -
check_function_exists() won't do it, you need check_symbol_exists().
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We don't need it for tcpdump; libpcap will pick it up if necessary if
it's dynamically-linked, we'll link with it ourselves if it's
statically-linked, and libpcap will bind to the libxnet version of
recvmsg() even if we link with libsocket (as it's compiled to refer to
it with a decorated name).
Also, we don't check for it with autotools.
|
|
|
|
| |
It might be in one of those libraries.
|
| |
|
|
|
|
| |
We'll be using it later; might as well include it there.
|
| |
|
|
|
|
|
|
|
| |
Include the directory in which the pcap find module found the main pcap
header file in the list of directories in which to search for other pcap
header files; otherwise, it won't find them unless they're system header
files.
|
|
|
|
|
|
|
|
|
| |
CMake *hates* that. -L considered harmful, I guess (and I don't know
how that's done with tools other than UN*X linkers - do all of them
support an equivalent to -L?).
This should fix the checks for pcap functions to look in the library we
found.
|
|
|
|
|
|
|
| |
Also, use ${PCAP_INCLUDE_DIRS} rather than ${PCAP_INCLUDE_DIR} for the
list of directories with header files (it should be a one-element list,
but do this for consistency), and search for pcap headers *after* we've
found libpcap, so we look in the appropriate directory.
|
| |
|
|
|
|
| |
You are in a twisty little maze of Solaris libraries, all different.
|
|
|
|
|
|
|
|
|
|
|
| |
Do the checks for -lnsl/-lxnet in the same way that we do them for
libpcap, before checking for functions that might require those
libraries. Include the results of those checks when checking for
routines that require them.
For getservent(), check for -lsocket as well.
Clean up ${XXX_LIBRARY} vs. ${XXX_LIBRARIES} usage while we're at it.
|
|
|
|
|
|
| |
Multiple checks for a function, in different libraries, need different
variables, as, if only one variable is used, the first test checks, and
subsequent tests are skipped because the variable is already set.
|
| |
|
| |
|
|
|
|
|
| |
Conditionally add everything to LOCALSRC and include LOCALSRC in
NETDISSECT_SOURCE_LIST_C.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Autotools' check in AC_CHECK_HEADERS() apparently either doesn't
actually try to include it or somehow arranges to define stuff that it
requires on FreeBSD. CMake's check in check_include_file() just tries
to include it, which fails on FreeBSD because __BEGIN_DECLS isn't
defined.
The man page for getrpcbynumber() says we just need to include
<rpc/rpc.h>; perhaps there are platforms on which we require both, and
that's what we do, so test it with rpc/rpc.h if we have rpc/rpc.h.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
No, I have no idea why CMake has option() to create user-settable
documented Boolean parameters but uses a special variant of set() to
create user-settable documented non-Boolean parameters.
|
|
|
|
| |
Fix check_library_exists() calls while we're at it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a library is found:
add the include directories for it as a SYSTEM include
directory;
add the library for it to a list of libraries with which to link
tcpdump;
and link with that list of libraries.
|
|
|
|
| |
Put the optional libraries after libpcap, which is *not* optional.
|
| |
|
| |
|
| |
|