2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
14 require("luci.model.uci")
17 m = Map("dhcp", "DHCP", [[Mit Hilfe von DHCP können Netzteilnehmer automatisch
18 ihre Netzwerkkonfiguration (IP-Adresse, Netzmaske, DNS-Server, DHCP, ...) beziehen.]])
20 s = m:section(TypedSection, "dhcp", "")
24 iface = s:option(ListValue, "interface", "Schnittstelle")
25 luci.model.uci.foreach("network", "interface",
27 if section[".name"] ~= "loopback" then
28 iface:value(section[".name"])
29 s:depends("interface", section[".name"])
33 s:option(Value, "start", "Start", "Erste vergebene Adresse (letztes Oktett)").rmempty = true
35 s:option(Value, "limit", "Limit", "Anzahl zu vergebender Adressen -1").rmempty = true
37 s:option(Value, "leasetime", "Laufzeit").rmempty = true
39 s:option(Flag, "dynamicdhcp", "Dynamisches DHCP").rmempty = true
41 s:option(Value, "name", "Name").optional = true
43 s:option(Flag, "ignore", "Schnittstelle ignorieren", "DHCP für dieses Netzwerk deaktivieren").optional = true
45 s:option(Value, "netmask", "Netzmaske").optional = true
47 s:option(Flag, "force", "Start erzwingen").optional = true
49 for i, line in pairs(luci.sys.execl("dnsmasq --help dhcp")) do
50 k, v = line:match("([^ ]+) +([^ ]+)")
51 s:option(Value, "dhcp"..k, v).optional = true