Commit Graph

67 Commits (master)

Author SHA1 Message Date
Lothar Braun 4f8d79f3a2 Introduce a new cmake option that allows graceful shutdown in case of options 2020-04-27 10:21:39 +02:00
Lothar Braun d36ddd6364 Fix DTLS MTU calculation for OpenSSL 1.1.0 2020-04-22 22:35:34 +02:00
Nicholas Brown e59a8a8e71 Better Boost detection in CMAKE 2020-04-12 12:39:30 +02:00
Lothar Braun dc8608d5d0 Support openssl > 1.1.0 (older versions not supported) 2020-04-12 12:24:48 +02:00
Nicholas Brown 6f4df87bc9 Use -Werror to fail the build on compiler warnings
Use make -k so that all warnings are ouput if there are any.
This is the future :-)
2018-01-17 11:57:55 +00:00
Nicholas Brown 5b9a7830cf Install correctly named README.md 2017-12-14 16:34:10 +00:00
Nicholas Brown 6ea5efedd6 More specific cmake version restriction
The latest OLD behaviour of CMP0017 CMP0003 CMP0002 was changed after
2.8.4. No need to be as strict as 3.1
2017-12-13 12:02:39 +00:00
Nicholas Brown c0c8d02ab4 Use recent CMake and avoid old policy warnings 2017-12-11 12:08:34 +00:00
Oliver Gasser e1078c7611
Merge pull request #64 from nickbroon/refactor
ipfixlolib DTLS code in own file
2017-12-08 15:09:00 +01:00
Nicholas Brown e77f883c56 vermont is not compatible with openssl 1.1.0
openssl 1.1.0 is not API backward compatible with 1.0.0, and vermont
will not compile with the newer version.

The cmake find_package macro has no way to specify a maximum version
so check it explicitly.
2017-12-08 11:42:13 +00:00
Luca Boccassi dfc11f5fbd Fix CMake check for linux/if.h
CMake not only checks if the header exists, but tries to include and
compile it, which fails with linux/if.h since it needs another header
which it does not include itself.
Manually include it as a CFLAG in the CHECK_INCLUDE_FILE call to fix
it.
2017-11-27 18:16:55 +00:00
Luca Boccassi ad10bacfe3 Support for exporting over a device (VRF)
The Linux kernel in the past couple of years has gained support for
Virtual Routing and Forwarding:
https://www.kernel.org/doc/Documentation/networking/vrf.txt
The SO_BINDTODEVICE socket option can be used to specify a particular
VRF other than the default.
Add support in ipfixlolib and in the configuration for the exporters.
2017-11-10 15:45:58 +00:00
Nicholas Brown c1918bf9d5 enable and add a cmake test target
can be run with:

'make test' or 'ctest'

'ctest -V' is useful to analyse the failures, and they don't all pass
for the moment.
2017-06-14 14:10:47 +01:00
Luca Boccassi 0c492767bf Syslog and journald support
Add new CLI options to support logging to Syslog and journald.
journald support is also behind a new CMake flag, SUPPORT_JOURNALD,
since it adds a dependency on libsystemd-journal.
Add --quiet, which will disable output to STDOUT/STDERR. Useful
when logging directly to the above mentioned loggers.
Add --log-level, to allow for mix and match log levels, for example
only warning and critical can be enabled together.

New usage output:

VERsatile MONitoring Tool - VERMONT
 MANDATORY OPTIONS:
 -f, --config-file FILE     Use configuration file

 OTHER OPTIONS:
 -h, --help                 Display this help and exit
 -d, --debug                Log verbosity: -d NOTICE, -dd INFO,
                                -ddd DEBUG
 -l, --log-level LEVEL      Log level. Can be specified multiple
                                times and mix-matched.
                                In increasing order:

                                    debug
                                    info
                                    notice
                                    warning
                                    error
                                    critical

                                Default: critical, warning, error
 -q, --quiet                Do not write output to console
 -b, --daemon               Run in daemon mode (implies -q)
 -p, --pid-file FILE        Set process id filename (use with -d)
 -u, --user USER            Change user to USER (use with -d)
 -g, --group GROUP          Change group to GROUP (use with -d)
 -s, --syslog               Log to syslog
 -j, --journald             Log to journald
2017-06-08 18:49:34 +01:00
Luca Boccassi 883990dfe8 Add Cmake option to disable UDP connect
Calling connect on a UDP socket will fail if there are no interfaces
available, and the exporter module will be left in an errored state and
will not recover. Add an option to disable the connect call at build
time, and also change from using writev to sendmsg for UDP sockets
(functionality is equivalent, and resulting system calls are similar
too).
2017-06-06 20:46:20 +01:00
Luca Boccassi 746b5c9a69 Add ZMQ IpfixReceiver subclass
Add support to receive Ipfix/Netflow payloads over a ZMQ connection.
The support is optional and disabled by default. If enabled, adds
a build dependency on libczmq. CZMQ is a high-level API that builds
on libzmq, and exposes easy and nice to use APIs to communicate using
the ZeroMQ protocol.
For more information about ZeroMQ, please see:
http://zeromq.org/
https://github.com/zeromq/czmq
2016-04-17 22:00:22 +01:00
Nicholas Brown e06ab18a0d Add useful 'make cppcheck' target.
Pulled in the needed cmake modules from rpavlik/cmake-modules and added
targets for all libraries.
Should be useful for developers looking for potential problems.
2016-03-09 12:44:56 +00:00
Nicholas Brown b5e5aaaf31 Add strict default compiler flags
A built types now have strict default compiler flags.
The default built type is set to 'Release' that build with -O3
To build an others type use something like 'cmake
-DCMAKE_BUILD_TYPE=Debug'. As such the debug option that abuses
add_definition() is no longer needed.
2016-03-09 12:44:54 +00:00
Nicholas Brown 2cf38a0496 Remove with_tests option
src/tests was already recursively added as a subdir and CMP0013 was
complaining. The test executables are always built, though they are not
executed by any rule. This really should be fixed.
2015-06-02 11:59:41 +01:00
Nicholas Brown 70aa199986 Minimum verion of CMake is now 2.4
As CMake 3.0 is only backwards compatible this far.
2015-06-02 11:59:41 +01:00
sosaavedra 7773d4ce2e Bug in Ubuntu 14.04 does not find PSQL Libs
Description:
    - cmake -DSUPPORT_POSTGRESQL=ON fails on Linux distributions based on Ubuntu 14.04
Solution:
    - Add in CMakeLists.txt:304 the following sentence:
    set(PostgreSQL_ADDITIONAL_SEARCH_PATHS "/usr/include/postgresql/9.3/server")
Reference:
    - https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/1317135 find_package fails on PostgreSQL in 14.04
2015-04-11 01:53:20 +02:00
Lothar Braun acb7a52347 Merge branch 'merge-features' 2013-09-29 16:43:59 +02:00
Lothar Braun 2220176730 Fix make install
Make install referred to an old xsd configuration file that used
to be included into vermont. However, it has been removed some
years ago. This commit fixes the install routine by no longer
referencing the xsd for the install target

fixes #16
2013-04-22 09:58:09 +02:00
Lothar Braun bfb6bc92c0 Merge branch 'ip_header_offset' into merge-features 2013-03-11 15:22:09 +01:00
Lothar Braun cd19757bb4 Removed static IP_HEADER_OFFSET cmake option
Previous versions of VERMONT required a proper compile time option
that tells VERMONT about the size of the layer 2 headers.
This means that VERMONT needed to be recompiled if it was
compiled with the default option and needed to be run on ethernet
traffic with VLAN tags.
The current commit enables dynamic detection of the pcap link type
(Ethernet, BSD loopback, ...) and adopts the IP header offset
accordingly.
Furthermore, the code checks for ethernet VLAN tags for each
packet. This allows to analyze traffic that mixes VLAN-tagged
and untagged traffic.
2013-01-30 17:13:59 +01:00
Lothar Braun c2f170a89a Use system wide FindPostgreSQL.cmake
Fixes the search for Postgres libraries by employing the cmake
shipped FindPostgreSQL.cmake file
2013-01-30 10:08:56 +01:00
Lothar Braun ea39abb38e Use system wide FindPostgreSQL.cmake
Fixes the search for Postgres libraries by employing the cmake
shipped FindPostgreSQL.cmake file
2012-10-23 13:05:16 +02:00
Lothar Braun cfa0f2a9d2 Added cmake tests for hiredis
hiredis is the official c client for the redis db. It is
needed to create an Redis IPFIX exorter that can directly write
to the flow-inspector (https://github.com/constcast/flow-inspector)
input queue.
2012-09-04 11:53:00 +02:00
Luca Bruno 1c0e44a3ee Properly check for mongodb version
In CMake scripts, do not skip the check for mongodb even if
library and include directories are already cached.

Signed-off-by: Luca Bruno <lucab@debian.org>
2012-07-17 14:47:50 +02:00
Lothar Braun 74d5884c96 Intendation cleanup
Code that sanity checks flow times was not properly
intended. Fixed with this commit
2012-03-13 17:44:47 +01:00
Lothar Braun 3e887800ae Fix CMP0017 for cmake versions < 2.8.4 2012-03-12 14:48:38 +01:00
Lothar Braun 67decedc81 Removed old cmake files. Disabled CMP0017 2012-03-12 13:19:29 +01:00
Philipp Fehre 0cdbad66f1 added boost_thread if mongo support is enabled 2011-12-16 05:30:40 -08:00
Lothar Braun bf8f3251e6 Check for mongo before boost 2011-12-16 05:30:39 -08:00
Lothar Braun a962e553ff Add define if mongo v2 is found 2011-12-16 05:30:39 -08:00
Lothar Braun 52c4041b6a Force filesystem version 2 on vermont with mongo 2011-12-16 05:30:39 -08:00
Philipp Fehre 9c34de5ada Setup for Mongo support
Included MongoDB in CMake and create files to hold the implementation
for the Mongo DB Connection and  writing to the DB.
2011-12-16 05:30:37 -08:00
Philipp Fehre ca9d3e0e39 Sanity check export time
Flow export time is check if it is neither more than 1h in the futur
(clock skew tolerant) or 1 day in the past since this is past the active
timeout
2011-12-15 08:37:05 -08:00
Philipp Fehre 0b069d8b4e fixed oracle configurator, and added test script 2011-09-07 06:31:46 -07:00
Philipp Fehre 528eb9a713 fixed cmake to compile with oracle support 2011-08-31 06:09:19 -07:00
Philipp Fehre 793d0aef80 Added Cmake options for oracle 2011-08-31 06:09:19 -07:00
Lothar Braun 3a1c05bf9d build fixes for boost::filesystem v3 2011-04-14 09:35:52 +02:00
Lothar Braun 994b64171f do not try to install non-existant CONFIGURATION file 2011-04-12 17:47:01 +02:00
Lothar Braun d4ae51e744 - forbid values for PCAP_MAX_CAPTURE_LENGTH that can trigger an overflow bug 2011-03-24 16:56:21 +01:00
Lothar Braun 003a98296f - explicitly link against boost-system lib for platforms that do not do that by default 2011-03-07 15:35:01 +01:00
limmer 64b3740e29 merged branch 'new-template' to dtls-merge
git-svn-id: file:///Users/braun/svn/vermont/branches/vermont/dtls-merge@2549 aef3b71b-58ee-0310-9ba9-8811b9f0742f
2010-09-28 16:46:08 +00:00
limmer 9207b4293c added support for PF_RING. Expects PF_RING checkout (svn co https://svn.ntop.org/svn/ntop/trunk/PF_RING/) either at ./PF_RING or ../PF_RING
git-svn-id: file:///Users/braun/svn/vermont/branches/vermont/dtls-merge@2474 aef3b71b-58ee-0310-9ba9-8811b9f0742f
2010-07-14 13:45:41 +00:00
limmer 0cfa560df5 added cmake option to deactivate custom memory manager (good for finding memory leaks with valgrind)
git-svn-id: file:///Users/braun/svn/vermont/branches/vermont/dtls-merge@2470 aef3b71b-58ee-0310-9ba9-8811b9f0742f
2010-07-14 13:45:32 +00:00
danielmentz 8cdea4d968 User friendly error message when OpenSSL is built w/o SCTP support.
git-svn-id: file:///Users/braun/svn/vermont/branches/vermont/dtls-merge@2440 aef3b71b-58ee-0310-9ba9-8811b9f0742f
2010-06-25 13:34:17 +00:00
lothar a9aa651419 bugfix: disable profiling support on FreeBSD in debug mode (FreeBSDs toolchain seems to be broken)
git-svn-id: file:///Users/braun/svn/vermont/branches/vermont/dtls-merge@2434 aef3b71b-58ee-0310-9ba9-8811b9f0742f
2010-06-21 07:02:57 +00:00