proto_hnet: add missing categories
[project/luci.git] / protocols / luci-proto-ipv6 / luasrc / model / cbi / admin_network / proto_hnet.lua
1 -- Copyright 2013 Steven Barth <steven@midlink.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 local map, section, net = ...
5
6 local mode = section:taboption("general", ListValue, "mode", translate("Category"))
7 mode:value("auto", translate("Automatic"))
8 mode:value("external", translate("External"))
9 mode:value("internal", translate("Internal"))
10 mode:value("leaf", translate("Leaf"))
11 mode:value("guest", translate("Guest"))
12 mode:value("adhoc", translate("Ad-Hoc"))
13 mode:value("hybrid", translate("Hybrid"))
14 mode.default = "auto"
15
16
17
18 local plen = section:taboption("advanced", Value, "ip6assign", translate("IPv6 assignment length"),
19         translate("Assign a part of given length of every public IPv6-prefix to this interface"))
20 plen.datatype = "max(128)"
21 plen.default = "64"
22
23 section:taboption("advanced", Value, "link_id", translate("IPv6 assignment hint"),
24         translate("Assign prefix parts using this hexadecimal subprefix ID for this interface."))
25
26 plen = section:taboption("advanced", Value, "ip4assign", translate("IPv4 assignment length"))
27 plen.datatype = "max(32)"
28 plen.default = "24"
29
30 local o = section:taboption("advanced", Value, "dnsname", translate("DNS-Label / FQDN"))
31 o.default = map.name
32
33 luci.tools.proto.opt_macaddr(section, ifc, translate("Override MAC address"))
34
35 o = section:taboption("advanced", Value, "mtu", translate("Override MTU"))
36 o.placeholder = "1500"
37 o.datatype    = "max(9200)"