hnet: update mode selection
[project/luci.git] / protocols / ipv6 / luasrc / model / cbi / admin_network / proto_hnet.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 local mode = section:taboption("general", ListValue, "mode", translate("Category"))
16 mode:value("auto", translate("Automatic"))
17 mode:value("external", translate("External"))
18 mode:value("guest", translate("Guest"))
19 mode:value("adhoc", translate("Ad-Hoc"))
20 mode.default = "auto"
21
22
23
24 local plen = section:taboption("advanced", Value, "ip6assign", translate("IPv6 assignment length"),
25         translate("Assign a part of given length of every public IPv6-prefix to this interface"))
26 plen.datatype = "max(128)"
27 plen.default = "64"
28
29 section:taboption("advanced", Value, "link_id", translate("IPv6 assignment hint"),
30         translate("Assign prefix parts using this hexadecimal subprefix ID for this interface."))
31
32 plen = section:taboption("advanced", Value, "ip4assign", translate("IPv4 assignment length"))
33 plen.datatype = "max(32)"
34 plen.default = "24"
35
36 local o = section:taboption("advanced", Value, "dnsname", translate("DNS-Label / FQDN"))
37 o.default = map.name
38
39 luci.tools.proto.opt_macaddr(section, ifc, translate("Override MAC address"))
40
41 o = section:taboption("advanced", Value, "mtu", translate("Override MTU"))
42 o.placeholder = "1500"
43 o.datatype    = "max(9200)"