proto_hnet.lua 1.4 KB

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