pavel-odintsov / fastnetmon

FastNetMon - very fast DDoS sensor with sFlow/Netflow/IPFIX/SPAN support
https://fastnetmon.com
GNU General Public License v2.0
3.42k stars 567 forks source link

Does not build against ndpi 1.8 due to API changes #597

Closed farrokhi closed 5 years ago

farrokhi commented 7 years ago

Trying to build against ndpi 1.8 the build process fails. Please note that ndpi_init_detection_module() no more accept input parameters after https://github.com/ntop/nDPI/commit/22e03ee98a07cce4a58b38b97860f56541ab82d9.

CMake output:

===>  Building for fastnetmon-1.1.3
[  7%] Built target fastnetmon_packet_parser
[ 15%] Built target fastnetmon_client
[ 30%] Built target example_plugin
[ 30%] Built target pcap_plugin
Scanning dependencies of target ipfix_rfc
[ 34%] Building CXX object CMakeFiles/fast_dpi.dir/fast_dpi.cpp.o
[ 38%] Building CXX object CMakeFiles/ipfix_rfc.dir/ipfix_rfc.cpp.o
/usr/ports/net-mgmt/fastnetmon/work/fastnetmon-1.1.3/src/fast_dpi.cpp:38:9: error: no matching function for call to 'ndpi_init_detection_module'
        ndpi_init_detection_module(detection_tick_resolution, malloc, free, debug_printf);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/libndpi-1.8.0/libndpi/ndpi_api.h:125:40: note: candidate function not viable: requires 0 arguments, but 4 were provided
  struct ndpi_detection_module_struct *ndpi_init_detection_module();
                                       ^
1 error generated.
--- CMakeFiles/fast_dpi.dir/fast_dpi.cpp.o ---
*** [CMakeFiles/fast_dpi.dir/fast_dpi.cpp.o] Error code 1

make[4]: stopped in /usr/ports/net-mgmt/fastnetmon/work/fastnetmon-1.1.3
1 error
pavel-odintsov commented 7 years ago

Hello!

Sorry about the delay. I hit the same issue and looking for ways how I could fix it properly. So, I created related ticket https://github.com/ntop/nDPI/issues/376

pavel-odintsov commented 7 years ago

nDPI guys implemented this option!

farrokhi commented 7 years ago

This is great news. I had to remove nDPI support from fastnetmon in FreeBSD ports [1] but it seems we can enable it again.

[1] https://svnweb.freebsd.org/ports?view=revision&revision=441457

pavel-odintsov commented 7 years ago

@farrokhi I think we could wait some time until they make a new tag/release with these changes :)

pavel-odintsov commented 5 years ago

We added fix for it many years ago.