1 -- Copyright 2008 Steven Barth <steven@midlink.org>
2 -- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org>
3 -- Licensed to the public under the Apache License 2.0.
7 m = Map("dhcp", translate("Hostnames"))
9 s = m:section(TypedSection, "domain", translate("Host entries"))
12 s.template = "cbi/tblsection"
14 hn = s:option(Value, "name", translate("Hostname"))
15 hn.datatype = "hostname"
18 ip = s:option(Value, "ip", translate("IP address"))
19 ip.datatype = "ipaddr"
22 local arptable = luci.sys.net.arptable() or {}
23 for i, dataset in ipairs(arptable) do
25 dataset["IP address"],
26 "%s (%s)" %{ dataset["IP address"], dataset["HW address"] }