mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Initil work towards symbolic application port mapping
This commit is contained in:
parent
34d4d966f5
commit
3b93709556
5 changed files with 61 additions and 6 deletions
|
|
@ -1617,3 +1617,13 @@ function rrd_exists(host_ip, rrdname)
|
|||
rrdpath = dirs.workingdir .. "/" .. ifId .. "/rrd/" .. getPathFromKey(host_ip) .. "/" .. rrdname
|
||||
return ntop.exists(rrdpath)
|
||||
end
|
||||
|
||||
function getservbyname(port_num, proto)
|
||||
if(proto == nil) then proto = "TCP" end
|
||||
port_num = tonumber(port_num)
|
||||
|
||||
proto = string.lower(proto)
|
||||
|
||||
-- io.write(port_num.."@"..proto.."\n")
|
||||
return(ntop.getservbyname(port_num, proto))
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue