move dhcpv6 support into luci-proto-6x4, rename luci-proto-6x4 to luci-proto-ipv6
[project/luci.git] / protocols / ipv6 / luasrc / model / cbi / admin_network / proto_dhcpv6.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2013 Steven Barth <steven@midlink.org>
5
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
9
10         http://www.apache.org/licenses/LICENSE-2.0
11 ]]--
12
13 local map, section, net = ...
14
15
16 local o = section:taboption("general", ListValue, "reqaddress",
17         translate("Request IPv6-address"))
18 o:value("try")
19 o:value("force")
20 o:value("none", "disabled")
21 o.default = "try"
22
23
24 o = section:taboption("general", Value, "reqprefix",
25         translate("Request IPv6-prefix of length"))
26 o:value("auto", translate("automatic"))
27 o:value("no", translate("disabled"))
28 o:value("48")
29 o:value("52")
30 o:value("56")
31 o:value("60")
32 o:value("64")
33 o.default = "auto"
34
35
36 o = section:taboption("advanced", Flag, "defaultroute",
37         translate("Use default gateway"),
38         translate("If unchecked, no default route is configured"))
39 o.default = o.enabled
40
41
42 o = section:taboption("advanced", Flag, "peerdns",
43         translate("Use DNS servers advertised by peer"),
44         translate("If unchecked, the advertised DNS server addresses are ignored"))
45 o.default = o.enabled
46
47
48 o = section:taboption("advanced", DynamicList, "dns",
49         translate("Use custom DNS servers"))
50 o:depends("peerdns", "")
51 o.datatype = "list(ip6addr)"
52 o.cast     = "string"
53
54
55 o = section:taboption("advanced", Value, "clientid",
56         translate("Client ID to send when requesting DHCP"))
57
58 luci.tools.proto.opt_macaddr(section, ifc, translate("Override MAC address"))
59
60 o = section:taboption("advanced", Value, "mtu", translate("Override MTU"))
61 o.placeholder = "1500"
62 o.datatype    = "max(1500)"