Commit Graph

15 Commits

Author SHA1 Message Date
Toni Uhlig
dfd0449306 Fix issues detected by SonarCloud.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2023-10-05 17:26:06 +02:00
Toni Uhlig
6f04807236 Build JSMN with support for parent links.
* nDPIsrvd.h: iterate over subtokens
 * nDPIsrvd-captured: select/ unselect risky flows to capture

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-07-13 03:35:35 +02:00
Toni Uhlig
c68c1750ba Switched to CMake build system.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-03-17 17:41:19 +01:00
Toni Uhlig
257cce1dcc Fixed braindead failure - Increase of NETWORK_BUFFER_MAX_SIZE > 9999 means to also increase NETWORK_BUFFER_LENGTH_DIGITS to 5.
* Fixed ARM32 xcompile warnings; Other GCC versions, other uint64_t's..
 * Replaced ridiculous nDPIsrvd_JSON_BYTES with NETWORK_BUFFER_LENGTH_DIGITS.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-01-27 18:05:13 +01:00
Toni Uhlig
613e60ca2a Declared nDPI id and flow structs in nDPId flow info struct.
Two reasons:
 * reduce heap memory allocations
 * nDPId flow info struct may be inflated in the future (more bytes to compress)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-12-30 13:28:32 +01:00
Toni Uhlig
f8692c6be1 Let travis use pcap files from nDPI to produce some JSON output. (disabled, needs further testing..)
* Added pcap diff script
 * Added \n to JSON string end (useful for debugging and readability)
 * Use first host/server name character for hash calculation as well
 * Removed error'ing EPOLLHUP handling in nDPIsrvd (connection closing will be detected via read())

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-12-01 10:22:47 +01:00
Toni Uhlig
7853c79cd6 Renamed misleading "contrib" subfolder to "dependencies".
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-11-13 14:26:51 +01:00
Toni Uhlig
adce2272dc Removed DISABLE_JSMN define for c-json-stdout (built-in per default).
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-09-26 00:49:34 +02:00
Toni Uhlig
84448d5e4e error handling enhancements
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-15 13:05:49 +02:00
Toni Uhlig
be4366b0e1 several fixes and improvments
- set errno to 0 if it is checked right after a libc call
  - ignore SIGPIPE as we want to avoid signal handling where possible
  - fixed another issue in nDPIsrvd/c-json-stdout which caused buffering errors

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-14 17:40:02 +02:00
Toni Uhlig
a5f8783bda minor improvments
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-14 16:10:21 +02:00
Toni Uhlig
37e46a506a c-json-stdout: fixed broken buffering
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-14 15:24:40 +02:00
Toni Uhlig
d828ef1bf0 json buffering and parsing
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-04 22:38:08 +02:00
Toni Uhlig
8a6021268e introduced NETWORK_BUFFER_MAX_SIZE to replace BUFSIZ as this might change depending on the arch/libc used
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-04 17:29:31 +02:00
Toni Uhlig
0004753eb1 added basic "consumer" example
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-04 16:15:21 +02:00