Skip to content
Permalink
Browse files

Merge PR #1368 (nDPI2.x snabb compatibility) into max-next

  • Loading branch information...
eugeneia committed Jan 8, 2019
2 parents 5b8a179 + f2bd95d commit 8fe1abedd0c9944e0899299f3c3872fe63a4a5ea
@@ -85,11 +85,11 @@ local lib_version = (function ()
end)()

-- Only nDPI 1.x versions above 1.7 are supported.
if lib_version.major ~= 1 or lib_version.minor < 7 then
if lib_version.major == 1 and lib_version.minor < 7 then
error("Unsupported nDPI version: " .. tostring(lib_version))
end

if lib_version.minor == 7 then
if lib_version.major == 1 and lib_version.minor == 7 then
-- nDPI 1.7
ffi.cdef [[
ndpi_detection_module_t* ndpi_init_detection_module (uint32_t ticks_per_second,
@@ -105,8 +105,8 @@ if lib_version.minor == 7 then
uint32_t src_host, uint16_t src_port,
uint32_t dst_host, uint32_t dst_port);
]]
elseif lib_version.minor == 8 then
-- nDPI 1.8
else
-- nDPI 1.8 and later
ffi.cdef [[
ndpi_detection_module_t* ndpi_init_detection_module (void);

0 comments on commit 8fe1abe

Please sign in to comment.
You can’t perform that action at this time.