Applies host filter criteria in C

Hosts are filtered directly in C to improve efficiency.
This commit also fixes #498 and partially addresses #486
This commit is contained in:
Simone Mainardi 2016-04-18 21:26:26 +02:00
parent 7b55e1fc8d
commit 466fde46df
7 changed files with 89 additions and 91 deletions

View file

@ -62,14 +62,21 @@ end
interface.select(ifname)
if((group_col == "mac") or (group_col == "antenna_mac")) then
hosts_stats,total = aggregateHostsStats(interface.getLocalHostsInfo())
hosts_stats,total = aggregateHostsStats(interface.getLocalHostsInfo(false))
--PRINT
-- for n in pairs(hosts_stats) do
-- io.write("= "..n..'\n')
-- end
else
-- hosts_stats,total = aggregateHostsStats(interface.getGroupedHosts(vlan_n, as_n, network_n, country_n, os_n))
hosts_stats,total = aggregateHostsStats(interface.getHostsInfo())
--[[
hosts_stats,total = interface.getGroupedHosts(
tonumber(vlan_n) or 0,
tonumber(as_n) or 0,
tonumber(network_n) or -1,
country_n or "", os_n or "")
--]]
hosts_stats,total = aggregateHostsStats(interface.getHostsInfo(false))
-- tprint(hosts_stats)
end
to_skip = (currentPage-1) * perPage