Age | Commit message (Collapse) | Author | Files | Lines |
|
In netsniff-ng, we only use libz in combination with libgeoip, so if
we lack either one of them, do not link against the other either.
This would be a waste otherwise.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Geoip dependency should not be mandatory as it's not a core part of
netsniff-ng. This also facilitates compilation on platforms where
geoip is not available.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
flex and bison are needed for bpfc and trafgen, so check for their
existance. If they are not present, lets remove those two from the
build in case users do not want it.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
This patch is a bundle of multiple fixes.
1) Fix compilation of astraceroute when HAVE_LIBPCAP=1:
astraceroute doesn't need libpcap, so add an additional
guard/define to bpf.h and bpf_comp.c and netsniff-ng.c.
Also since we generate a config.h file, we do not need
to have this additional compile flag anymore.
2) Fix tstamping.{h,c} to use the configure script instead
of the Makefile. For doing this, also fix the object
inclusion in netsniff-ng/Makefile.
Last but not least, rename __WITH_... into HAVE_... as this
is more clean.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
While we're at it, also let configure script generate the config.h
file. The generation of it is currently quite static, but that could
change in future. While at it, we also generate a GITVERSION define,
that we will use for ``--version'' output of the individual tools for
being able to provide better support since we can see what concrete
commit people are using when building from Git repo.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
In case we have all dependencies, tell the user that all tools will be
built instead of listing the tools. Only list them when we do not have
all deps. This should facilitate usability a bit.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
netsniff-ng uses libpcap only for high-level filter compiling.
Thus, let netsniff-ng not "hard-depend" on libpcap, but rather
disable filter compiling in case the user does not want to
install libpcap.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Add a header comment to the configure script with Tobias as the primary
author, and also mention Tobias as an author in the Makefile itself for
his changes.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Also try compile-testing TPACKET_V2/3 flags that are used in some
particular versions, especially in TX_RING.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
1) netsniff-ng is also dependant on libnl (e.g. for raw 802.11 devices)
2) Only netsniff-ng depends on tpacket_v3, trafgen on tpacket_v2. Thus,
add checks for both.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Instead of halting out the entire build build if one dependency is not
available, only exclude the tools that link against it from building.
The configure script will now print a list of all tools that will be
built -- and in case some libaries are not available -- that will not be
built.
Also add checks for libcli and libnet which mausezahn depends on.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
libpcap is used to compile tcpdump-like filters in netsniff-ng, so check
for it in configure.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
In order to cause the linker to get called and thus the check for the
presence of the library (not just the headers) to be performed, call
GeoIP_new(). Also pass the proper linker flag to $CC.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
In order to cause the linker to get called and thus the check for the
presence of the library (not just the headers) to be performed, call
gzopen(). Also pass the proper linker flags to $CC.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Correct the type to struct nf_conntrack and call a function to prevent
the variable from getting optimized away by the compiler and cause a
linker call. Also add the proper linker flag.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add a configure script extension that checks for liburcu as it is
currently needed by flowtop.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Add a configure extension to check for libz that is needed for the
geoip updater.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
The check_libnf_ct function is implemented in configure, but it was
not executed currently. So from now on invoke it and check for
netfilter's conntrack library.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We need to have: GEOIP_CITY_EDITION_REV1, GEOIP_CITY_EDITION_REV1_V6,
GEOIP_COUNTRY_EDITION, GEOIP_COUNTRY_EDITION_V6, GEOIP_ASNUM_EDITION,
GEOIP_ASNUM_EDITION_V6. Not all might be available on older versions.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
This will of course also lead to the flags getting redirected. Silly me.
While at it also remove the pointless warning flags to cc.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Define CONFIG_OK in the Config file generated in the configure script
and check for it being defined in the Makefile before attempting
anything else. This way we can better inform the user that she needs to
run ./configure first.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Redirect the output of pkg-config to /dev/null so it doesn't clutter the
output of the configure script.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Actually call some functions in the check program so they will need to
get linked.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Check whether pkg-config and ccache are in the PATH. A missing
pkg-config will cause the configure script to abort with an error. The
presence of ccache is written to Config and used by the Makefile to
conditionally make use of it.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Newer versions of GCC expect the linker flags after the object code, so
move the ouput of 'pkg-config --libs ncurses' there to not make the test
fail even if ncurses is present on the system.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Check for some more libraries we make use of in the configure step.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
In order to use an installation of NaCl provided by the distro or by
previous manual installation, provide a configure script which checks
for nacl's presence.
Also check of libnl-genl headers. More checks of the other libraries
depended on by netsniff-ng as well as checks for necessary kernel
headers should be added here too.
The configure script is preliminary and has not yet extensively been
tested on multiple systems.
The concept was inspired by the configure script of trinity and
iproute2.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|