mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Flow dissection code cleanup.
The Flow API is now composed of the following methods:
- Flow::setDetectedProtocol to manually set a protocol on the flow
and terminate the dissection
- Flow::processPacket to run the nDPI dissection on the raw packets
- Flow::endProtocolDissection to terminate or give up the dissection
Also fixes the flow sampling rate preference, which was never used.
This commit is contained in:
parent
14202b7c9b
commit
15898e8dad
10 changed files with 181 additions and 154 deletions
|
|
@ -1918,10 +1918,6 @@ function getRedisPrefix(str)
|
|||
end
|
||||
end
|
||||
|
||||
function getRedisIfacePrefix(ifid)
|
||||
return "ntopng.prefs.ifid_"..tostring(ifid)
|
||||
end
|
||||
|
||||
----- End of Redis Utils ------
|
||||
|
||||
|
||||
|
|
@ -2012,7 +2008,7 @@ function getInterfaceSpeed(ifid)
|
|||
end
|
||||
|
||||
function getInterfaceRefreshRate(ifid)
|
||||
local key = getRedisIfacePrefix(ifid)..".refresh_rate"
|
||||
local key = "ntopng.prefs.ifid_"..tostring(ifid)..".refresh_rate"
|
||||
local refreshrate = ntop.getCache(key)
|
||||
|
||||
if isEmptyString(refreshrate) or tonumber(refreshrate) == nil then
|
||||
|
|
@ -2025,7 +2021,7 @@ function getInterfaceRefreshRate(ifid)
|
|||
end
|
||||
|
||||
function setInterfaceRegreshRate(ifid, refreshrate)
|
||||
local key = getRedisIfacePrefix(ifid)..".refresh_rate"
|
||||
local key = "ntopng.prefs.ifid_"..tostring(ifid)..".refresh_rate"
|
||||
|
||||
if isEmptyString(refreshrate) then
|
||||
ntop.delCache(key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue