Initil work towards symbolic application port mapping

This commit is contained in:
Luca 2015-07-31 18:39:48 +02:00
parent 34d4d966f5
commit 3b93709556
5 changed files with 61 additions and 6 deletions

View file

@ -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