utoni / nDPId

Tiny nDPI based deep packet inspection daemons / toolkit.
GNU General Public License v3.0
67 stars 15 forks source link

Issues on compilation #52

Closed UnveilTech closed 1 week ago

UnveilTech commented 1 week ago

Hi Toni,

warnings on compilation with the very last build of nDPI, have a look:

[ 4%] Building C object CMakeFiles/nDPId.dir/nDPId.c.o /usr/src/nDPId/nDPId.c: In function 'init_workflow': /usr/src/nDPId/nDPId.c:1475:52: warning: passing argument 2 of 'set_ndpi_debug_function' from incompatible pointer type [-Wincompatible-pointer-types] 1475 set_ndpi_debug_function(workflow->ndpi_struct, ndpi_debug_printf); ^~~~~
void ()(unsigned int, struct ndpi_detection_module_struct , ndpi_log_level_t, const char , const char , unsigned int, const char *, ...)
In file included from /usr/src/nDPId/nDPId.c:11: /usr/local/libnDPI/include/ndpi/ndpi_api.h:1111:56: note: expected 'ndpi_debug_function_ptr' {aka 'void ()(short unsigned int, struct ndpi_detection_module_struct , ndpi_log_level_t, const char , const char , unsigned int, const char , ...)'} but argument is of type 'void ()(unsigned int, struct ndpi_detection_module_struct , ndpi_log_level_t, const char , const char , unsigned int, const char , ...)' 1111 ndpi_debug_function_ptr ndpi_debug_printf); ~~~~~~^~~~~~~ [ 8%] Building C object CMakeFiles/nDPId.dir/nio.c.o [ 12%] Building C object CMakeFiles/nDPId.dir/utils.c.o [ 16%] Linking C executable nDPId [ 16%] Built target nDPId [ 20%] Building C object CMakeFiles/nDPIsrvd.dir/nDPIsrvd.c.o [ 25%] Building C object CMakeFiles/nDPIsrvd.dir/nio.c.o [ 29%] Building C object CMakeFiles/nDPIsrvd.dir/utils.c.o [ 33%] Linking C executable nDPIsrvd [ 33%] Built target nDPIsrvd [ 37%] Building C object CMakeFiles/nDPId-test.dir/nDPId-test.c.o In file included from /usr/src/nDPId/nDPId-test.c:15: /usr/src/nDPId/nDPId.c: In function 'init_workflow': /usr/src/nDPId/nDPId.c:1475:52: warning: passing argument 2 of 'set_ndpi_debug_function' from incompatible pointer type [-Wincompatible-pointer-types] 1475 set_ndpi_debug_function(workflow->ndpi_struct, ndpi_debug_printf); ^~~~~
void ()(unsigned int, struct ndpi_detection_module_struct , ndpi_log_level_t, const char , const char , unsigned int, const char *, ...)

In file included from /usr/src/nDPId/nDPId.c:11: /usr/local/libnDPI/include/ndpi/ndpi_api.h:1111:56: note: expected 'ndpi_debug_function_ptr' {aka 'void ()(short unsigned int, struct ndpi_detection_module_struct , ndpi_log_level_t, const char , const char , unsigned int, const char , ...)'} but argument is of type 'void ()(unsigned int, struct ndpi_detection_module_struct , ndpi_log_level_t, const char , const char , unsigned int, const char , ...)' 1111 | ndpi_debug_function_ptr ndpi_debug_printf); | ~~~~~~^~~~~~~ [ 41%] Linking C executable nDPId-test [ 41%] Built target nDPId-test [ 45%] Building C object CMakeFiles/nDPIsrvd-collectd.dir/examples/c-collectd/c-collectd.c.o [ 50%] Building C object CMakeFiles/nDPIsrvd-collectd.dir/utils.c.o [ 54%] Linking C executable nDPIsrvd-collectd [ 54%] Built target nDPIsrvd-collectd [ 58%] Building C object CMakeFiles/nDPIsrvd-captured.dir/examples/c-captured/c-captured.c.o [ 62%] Building C object CMakeFiles/nDPIsrvd-captured.dir/utils.c.o [ 66%] Linking C executable nDPIsrvd-captured [ 66%] Built target nDPIsrvd-captured [ 70%] Building C object CMakeFiles/nDPIsrvd-analysed.dir/examples/c-analysed/c-analysed.c.o [ 75%] Building C object CMakeFiles/nDPIsrvd-analysed.dir/utils.c.o [ 79%] Linking C executable nDPIsrvd-analysed [ 79%] Built target nDPIsrvd-analysed [ 83%] Building C object CMakeFiles/nDPIsrvd-simple.dir/examples/c-simple/c-simple.c.o [ 87%] Linking C executable nDPIsrvd-simple [ 87%] Built target nDPIsrvd-simple [ 91%] Building C object CMakeFiles/nDPIsrvd-influxd.dir/examples/c-influxd/c-influxd.c.o [ 95%] Building C object CMakeFiles/nDPIsrvd-influxd.dir/utils.c.o [100%] Linking C executable nDPIsrvd-influxd [100%] Built target nDPIsrvd-influxd

bye Fred

utoni commented 1 week ago

Hi Fred,

already saw this issue in the CI. A patch from me got merged upstream, so need to adapt nDPId. Will be done today!

P.S.: Making some good progress regarding AES256-GCM UDP encryption

UnveilTech commented 1 week ago

Toni, great !

P.S.: excellent :o)

utoni commented 1 week ago

Fixed with https://github.com/utoni/nDPId/commit/9efdecf4efa352a6046c88a945cf9ff8db1b37b9.

UnveilTech commented 1 week ago

Toni, downloaded, compiled and tested... new fix is working fine !!!

thanks a lot, bye Fred