Skip to content
Snippets Groups Projects
Commit ae4c130c authored by Nils Schneider's avatar Nils Schneider
Browse files

gluon-mesh-batman-adv: announce MAC of mesh ifaces

This will make a node announce all MACs of its interfaces participating
in the batman-adv mesh. This enables other nodes to associate the
announced object with both the data reported by batadv-vis as well as a
simple list of neighbours as output by `iw dev $IFACE station dump`.
parent eae6c25d
No related branches found
No related tags found
No related merge requests found
require 'ubus'
local conn = ubus.connect()
local list = util.exec('batctl if')
local interfaces = {}
for _, line in ipairs(util.split(list)) do
local ifname = line:match('^(.-):')
if ifname ~= nil then
local status = conn:call("network.device", "status", { name = ifname })
table.insert(interfaces, status['macaddr'])
end
end
return interfaces
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment