diff options
author | Steven Barth <steven@midlink.org> | 2008-04-27 11:04:48 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-04-27 11:04:48 +0000 |
commit | 706da44cf275dc20426a55a4d01ed79026d3eb80 (patch) | |
tree | f0cfced76009f7548a79d211a84fcb171079f028 /core/src | |
parent | f917c0bb6445794cc94ff895f430db84a9e77ea2 (diff) |
* Reworked Luci-Splash
* Created ffluci-system-addons package for Kamikaze addons
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ffluci/sys.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/src/ffluci/sys.lua b/core/src/ffluci/sys.lua index cde1877ded..8aa77cf13b 100644 --- a/core/src/ffluci/sys.lua +++ b/core/src/ffluci/sys.lua @@ -134,6 +134,19 @@ function net.devices() return devices end +-- Returns the MAC-Address belonging to the given IP-Address +function net.ip4mac(ip) + local mac = nil + + for i, l in ipairs(net.arptable()) do + if l["IP address"] == ip then + mac = l["HW address"] + end + end + + return mac +end + -- Returns the prefix to a given netmask function net.mask4prefix(mask) local bin = net.ip4bin(mask) |