hnet: update protocol configuration
[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 section:taboption("general", Flag, "guest", translate("Guest mode"))
16 section:taboption("advanced", Flag, "adhoc", translate("Ad-hoc mode"))
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)"