From 9e07a57566cc45bf92a845d8cee968d72e0f314e Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Wed, 15 Dec 2021 23:25:32 +0100 Subject: Major nDPId extension. Sorry for the huge commit. - nDPId: fixed invalid IP4/IP6 tuple compare - nDPIsrvd: fixed caching issue (finally) - added tiny c example (can be used to check flow manager sanity) - c-captured: use flow_last_seen timestamp from `struct nDPIsrvd_flow` - README.md update: added example JSON sequence - nDPId: added new flow event `update` necessary for correct timeout handling (and other future use-cases) - nDPIsrvd.h and nDPIsrvd.py: switched to an instance (consists of an alias/source tuple) based flow manager - every flow related event **must** now serialize `alias`, `source`, `flow_id`, `flow_last_seen` and `flow_idle_time` to make the timeout handling and verification process work correctly - nDPIsrvd.h: ability to profile any dynamic memory (de-)allocation - nDPIsrvd.py: removed PcapPacket class (unused) - py-flow-dashboard and py-flow-multiprocess: fixed race condition - py-flow-info: print statusbar with probably useful information - nDPId/nDPIsrvd.h: switched from packet-flow only timestamps (`pkt_*sec`) to a generic flow event timestamp `ts_msec` - nDPId-test: added additional checks - nDPId: increased ICMP flow timeout - nDPId: using event based i/o if capturing packets from a device - nDPIsrvd: fixed memory leak on shutdown if remote descriptors were still connected Signed-off-by: Toni Uhlig --- CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 788834ed6..904523705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ set(CPACK_DEBIAN_PACKAGE_NAME "nDPId") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_PACKAGE_VERSION_MAJOR 1) set(CPACK_PACKAGE_VERSION_MINOR 5) +set(CPACK_PACKAGE_VERSION_PATCH 0) include(CPack) include(CheckFunctionExists) @@ -291,7 +292,18 @@ if(BUILD_EXAMPLES) "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/dependencies/jsmn") - install(TARGETS nDPIsrvd-collectd nDPIsrvd-captured nDPIsrvd-json-dump DESTINATION bin) + add_executable(nDPIsrvd-simple examples/c-simple/c-simple.c) + target_compile_definitions(nDPIsrvd-simple PRIVATE ${NDPID_DEFS}) + target_include_directories(nDPIsrvd-simple PRIVATE + "${CMAKE_SOURCE_DIR}" + "${CMAKE_SOURCE_DIR}/dependencies" + "${CMAKE_SOURCE_DIR}/dependencies/jsmn" + "${CMAKE_SOURCE_DIR}/dependencies/uthash/src") + target_link_libraries(nDPIsrvd-simple "${pkgcfg_lib_NDPI_ndpi}" + "${pkgcfg_lib_PCRE_pcre}" "${pkgcfg_lib_MAXMINDDB_maxminddb}" + "${GCRYPT_LIBRARY}" "${GCRYPT_ERROR_LIBRARY}" "${PCAP_LIBRARY}") + + install(TARGETS nDPIsrvd-collectd nDPIsrvd-captured nDPIsrvd-json-dump nDPIsrvd-simple DESTINATION bin) endif() install(TARGETS nDPId DESTINATION sbin) -- cgit v1.2.3