Commit Graph

1312 Commits (master)

Author SHA1 Message Date
Emanuel Vintila b0dbd91da4 removed unused private field globalIterator 2017-12-05 11:09:03 +00:00
Emanuel Vintila a8fb631fc1 removed unused private field ipfixCollector 2017-12-05 11:09:03 +00:00
Emanuel Vintila 3de12cfd73 createInstance: change check of getProtocol, since its return value is enum ipfix_transport_protocol 2017-12-05 11:09:03 +00:00
Emanuel Vintila 47eef21a10 get_filenames: removed pointless comparison of snprintf with the sizeof the char buffer, since the maximum size specified by n cannot be exceeded. replaced it check against negative return values and empty buffer 2017-12-05 11:09:03 +00:00
Emanuel Vintila 2bf88af2e8 removed unused private field HostStatistics::logInt 2017-12-05 11:09:03 +00:00
Emanuel Vintila c27e206242 removed unused private field PacketIDMEFReporter::snapshotOffset 2017-12-05 11:09:03 +00:00
Emanuel Vintila fcfa5fdeff XMLDocument: removed unused private field xmlRootNode 2017-12-05 11:09:03 +00:00
Emanuel Vintila 88f9a91c35 parse_file: fixed appending of ctx->errNo to string by using std::to_string on it 2017-12-05 10:50:18 +00:00
Emanuel Vintila 07ddf03655 getInt: changed the type of the temp variable res from int to long, for it to be able to store the values LONG_MIN and LONG_MAX 2017-12-05 10:50:18 +00:00
Emanuel Vintila 9ca30e10de fixed sac_state check against SCTP_COMM_UP 2017-12-05 10:50:18 +00:00
Emanuel Vintila ba39c208f8 updated check in the removeEdge method: uninitialized matrix element (pointer) is NULL instead of negative integer 2017-12-05 10:36:04 +00:00
Oliver Gasser b7dcf70915
Merge pull request #70 from nickbroon/minor_static_analysis
Minor static analysis warnings
2017-12-04 13:53:51 +01:00
Oliver Gasser 9365427bb4
Merge pull request #67 from nickbroon/travis
add Github Travis CI build
2017-12-04 13:50:53 +01:00
Oliver Gasser 82b108481e Merge branch 'solve_ipfix_parser_seqnr_diff_bug' 2017-12-04 13:45:06 +01:00
Emanuel Vintila 7fe4085db5 processNetflowV9Packet, processIpfixPacket: fixed the computation of the difference between the actual sequence number and the expected sequence number 2017-12-04 13:40:48 +01:00
Oliver Gasser c4936d048c Merge branch 'nickbroon-readme_markdown' 2017-11-28 14:49:40 +01:00
Nicholas Brown a646b4823e Markdown format for README 2017-11-28 13:37:37 +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
Oliver Gasser e24ecee2cc Merge branch 'nickbroon-gitignore' 2017-11-27 14:40:16 +01:00
Oliver Gasser 46b88398e8 Merge branch 'gitignore' of github.com:nickbroon/vermont into nickbroon-gitignore 2017-11-27 14:40:06 +01:00
Oliver Gasser ec3b5746a9 Merge branch 'bluca-vrf' 2017-11-27 14:37:29 +01:00
Nicholas Brown 592f606b58 CS_IPFIX_MAGIC array should be unsigned
This silences the compiler complaining about overflow assigning the
magic characters in the constructor.
2017-11-10 16:01:36 +00:00
Nicholas Brown 346436c1b9 Use correct printf format specifiers
use 'clang-tidy' to automatically fix a bunch of incorrect format
specifiers that don't match the arguments passed that compiler was
complaining about. This get us a lot closer to have silent warning
free output during a build.
One day we might even be able to turn on -Werror in CMakeList.txt
2017-11-10 16:01:36 +00:00
Nicholas Brown c8178432d2 IeInfo constructor implementation in cpp file instead of hpp
The implementation really should be cpp file, not with the declaration
in the header. It also silences a warning value stored to 'length'
never read compiler warning in the header.
2017-11-10 16:01:36 +00:00
Nicholas Brown ce6cedf7b6 More complete gitignore 2017-11-10 15:50:42 +00:00
Nicholas Brown d4538dd097 add Github Travis CI build 2017-11-10 15:48:53 +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
Oliver Gasser 7d8a7e4db1 Merge branch 'MAX_TEMPLATE_FIELDS-not_checked' 2017-11-10 11:41:43 +01:00
Emanuel Vintila 5d63d19e8b reversed non-functional changes 2017-11-10 11:35:16 +01:00
Emanuel Vintila fcb6af11b1 inclusion of msg.h moved back from Template.h to Template.cpp 2017-11-10 11:13:50 +01:00
Emanuel Vintila 615ecb4f62 compacted addFieldWithOffset and addFieldWithoutOffset methods into addTemplateField and moved its definition inside the cpp file 2017-11-10 09:01:43 +01:00
Emanuel Vintila 84eec86311 fixed indentation method: replaced spaces with tabs 2017-11-09 15:21:43 +01:00
Emanuel Vintila 6ec7cfe574 Added checks against MAX_TEMPLATE_FIELDS when adding template fields. Added check against the number of fields when getting a field's info.Throw exceptions in case any of the checks fail 2017-11-09 12:40:53 +01:00
Oliver Gasser b70d4f2e6d Merge remote-tracking branch 'nickbroon/silence_compiler_warnings' 2017-06-15 16:55:47 +02:00
Nicholas Brown e7f6338345 test executable is dependency of the test
Works around for cmake bug:
https://gitlab.kitware.com/cmake/cmake/issues/8774
Work around idea from here:
https://stackoverflow.com/a/10824578/898671

Now something like this just works:

cd  vermont
mkdir build; cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
ctest -V
2017-06-14 14:50:11 +01:00
Nicholas Brown 5b92e0475a Remove duplicate ARRAY_SIZE macro
Already in included common/defs.h
2017-06-14 14:10:47 +01:00
Nicholas Brown e3763f24e6 minor fixes so 'make test' passes
Mostly fixing 'error' category issues found by cppcheck
2017-06-14 14:10:47 +01: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
Nicholas Brown dc947424b9 Fix hiding overloaded virtual functions
'hides overloaded virtual function [-Woverloaded-virtual]' complains
about mismatched definitions.
Make sure they all match.
2017-06-14 14:10:47 +01:00
Nicholas Brown bb24cb0d87 Typo in header guard spotted by compiler 2017-06-14 14:10:47 +01:00
Nicholas Brown dda4061333 Don't use GNU preprocessor extensions
-Wgnu-zero-variadic-macro-arguments complains about
'Token pasting of ',' and __VA_ARGS__ is a GNU extension'

Instead use a helper macro where it's required.
2017-06-14 14:10:47 +01:00
Oliver Gasser 3a91a254b2 Merge remote-tracking branch 'bluca/module_id' 2017-06-14 09:19:59 +02:00
Luca Boccassi e79017bca0 Fix potential security issue in exception msg call
THROWEXCEPTION was not using string format, which is a potential
security issue and will cause a build error with hardening options
enabled.
2017-06-13 17:31:40 +01:00
Luca Boccassi 8fe32fbf73 Use XML ID as Sensors module id in receivers 2017-06-13 17:22:16 +01:00
Nicholas Brown da7c1de9ed IpfixReceiverZmq clarify debug 2017-06-13 17:04:34 +01:00
Nicholas Brown b6b6c05e40 proper format for uint32_t in IpfixReceiver 2017-06-13 17:04:34 +01:00
Nicholas Brown fb668035cf Actually delete the Collector listener
This was an issue when the modules were being reloaded.
2017-06-13 17:04:34 +01:00
Nicholas Brown 91f5823e6b Useful collector creation/deletion debug messages 2017-06-13 17:04:34 +01:00
Nicholas Brown 34f9f0b632 Thread creation is useful debugging
DPRINT should only really be used for data driven performance
effecting debugs, and thread creation is not that.
2017-06-13 17:03:45 +01:00
Nicholas Brown 12b953879e Correct indenation to make else clause readable 2017-06-13 17:03:45 +01:00