mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
parent
6daf449e31
commit
39d76d233d
7 changed files with 53 additions and 43 deletions
|
|
@ -2277,6 +2277,7 @@ function get_mac_classification(m, extended_name)
|
|||
end
|
||||
|
||||
local magic_macs = {
|
||||
["00:00:00:00:00:00"] = "",
|
||||
["FF:FF:FF:FF:FF:FF"] = "Broadcast",
|
||||
["01:00:0C:CC:CC:CC"] = "CDP",
|
||||
["01:00:0C:CC:CC:CD"] = "CiscoSTP",
|
||||
|
|
@ -2328,6 +2329,18 @@ function get_symbolic_mac(mac_address, only_symbolic)
|
|||
end
|
||||
end
|
||||
|
||||
function get_mac_url(mac)
|
||||
local m = get_symbolic_mac(mac, true)
|
||||
|
||||
if isEmptyString(m) then
|
||||
return ""
|
||||
end
|
||||
|
||||
local url = ntop.getHttpPrefix() .."/lua/mac_details.lua?host="..mac
|
||||
|
||||
return string.format('[ <a href=\"%s\">%s</a> ]', url, m)
|
||||
end
|
||||
|
||||
function get_manufacturer_mac(mac_address)
|
||||
local m = string.sub(mac_address, 1, 8)
|
||||
local ret = get_mac_classification(m, true --[[ extended name --]])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue