2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
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
10 http://www.apache.org/licenses/LICENSE-2.0
15 require("luci.tools.webadmin")
16 m = Map("network", translate("Routes"), translate("a_n_routes1"))
18 local routes6 = luci.sys.net.routes6()
19 local bit = require "bit"
21 s = m:section(TypedSection, "route", translate("Static IPv4 Routes"))
25 s.template = "cbi/tblsection"
27 iface = s:option(ListValue, "interface", translate("Interface"))
28 luci.tools.webadmin.cbi_add_networks(iface)
30 s:option(Value, "target", translate("Target"), translate("Host-<abbr title=\"Internet Protocol Address\">IP</abbr> or Network"))
31 s:option(Value, "netmask", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Netmask"), translate("if target is a network")).rmemepty = true
32 s:option(Value, "gateway", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Gateway"))
35 s = m:section(TypedSection, "route6", translate("Static IPv6 Routes"))
39 s.template = "cbi/tblsection"
41 iface = s:option(ListValue, "interface", translate("Interface"))
42 luci.tools.webadmin.cbi_add_networks(iface)
44 s:option(Value, "target", translate("Target"), translate("<abbr title=\"Internet Protocol Version 6\">IPv6</abbr>-Address or Network (CIDR)"))
45 s:option(Value, "gateway", translate("<abbr title=\"Internet Protocol Version 6\">IPv6</abbr>-Gateway")).rmempty = true