mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Add filterize on wlan info
This commit is contained in:
parent
6e92102ae5
commit
4455dabee8
2 changed files with 30 additions and 3 deletions
|
|
@ -349,12 +349,37 @@ end
|
|||
local function dt_format_mac(mac)
|
||||
if mac == nil then return "" end
|
||||
mac = tonumber(mac)
|
||||
if mac == 0 then return "" end
|
||||
if not mac or mac == 0 then return "" end
|
||||
return ntop.decodeMac64(mac)
|
||||
end
|
||||
|
||||
-- #####################################
|
||||
|
||||
local function dt_format_mac_obj(mac)
|
||||
local mac_str = dt_format_mac(mac)
|
||||
local formatted_mac = {
|
||||
title = mac_str,
|
||||
label = mac_str,
|
||||
value = mac_str,
|
||||
}
|
||||
|
||||
return formatted_mac
|
||||
end
|
||||
|
||||
-- #####################################
|
||||
|
||||
local function dt_format_ssid_obj(ssid)
|
||||
local formatted_ssid = {
|
||||
title = ssid,
|
||||
label = ssid,
|
||||
value = ssid,
|
||||
}
|
||||
|
||||
return formatted_ssid
|
||||
end
|
||||
|
||||
-- #####################################
|
||||
|
||||
local function dt_format_dscp(dscp_id)
|
||||
dscp_id = tonumber(dscp_id)
|
||||
local title = dscp_consts.dscp_class_descr(dscp_id)
|
||||
|
|
@ -1119,8 +1144,8 @@ local flow_columns = {
|
|||
['POST_NAT_SRC_PORT'] = { tag = "post_nat_src_port", dt_func = dt_format_port, db_type = "Number", db_raw_type = "Uint16" },
|
||||
['POST_NAT_IPV4_DST_ADDR'] = { tag = "post_nat_ipv4_dst_addr", dt_func = dt_format_nat_ip, select_func = "IPv4NumToString", db_type = "Number", db_raw_type = "Uint32" },
|
||||
['POST_NAT_DST_PORT'] = { tag = "post_nat_dst_port", dt_func = dt_format_port, db_type = "Number", db_raw_type = "Uint16" },
|
||||
['WLAN_SSID'] = { tag = "wlan_ssid", db_type = "String", db_raw_type = "String" },
|
||||
['WTP_MAC_ADDRESS'] = { tag = "apn_mac", dt_func = dt_format_mac, db_type = "Number", db_raw_type = "Uint64" },
|
||||
['WLAN_SSID'] = { tag = "wlan_ssid", dt_func = dt_format_ssid_obj, db_type = "String", db_raw_type = "String" },
|
||||
['WTP_MAC_ADDRESS'] = { tag = "apn_mac", dt_func = dt_format_mac_obj, db_type = "Number", db_raw_type = "Uint64" },
|
||||
|
||||
--[[ TODO: this column is for the aggregated_flow_columns but the parsing Function
|
||||
only parses these columns, so a new logic to parse only the aggregated_flow_columns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue