2 LuCI - Lua Configuration Interface
4 Copyright 2011 Jo-Philipp Wich <xm@subsignal.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
13 local map, section, net = ...
16 local forward_bcast, forward_dhcp, gateway, expiry, retry, table
19 ipaddr = section:taboption("general", Value, "ipaddr",
20 translate("Local IPv4 address"),
21 translate("Address to access local relay bridge"))
23 ipaddr.datatype = "ip4addr"
26 network = s:taboption("general", DynamicList, "network", translate("Relay between networks"))
27 network.widget = "checkbox"
28 network.exclude = arg[1]
29 network.template = "cbi/network_netlist"
30 network.nocreate = true
31 network.nobridges = true
32 network.novirtual = true
33 network:depends("proto", "relay")
36 forward_bcast = section:taboption("advanced", Flag, "forward_bcast",
37 translate("Forward broadcast traffic"))
39 forward_bcast.default = forward_bcast.enabled
42 forward_dhcp = section:taboption("advanced", Flag, "forward_dhcp",
43 translate("Forward DHCP traffic"))
45 forward_dhcp.default = forward_dhcp.enabled
48 gateway = section:taboption("advanced", Value, "gateway",
49 translate("Use DHCP gateway"),
50 translate("Override the gateway in DHCP responses"))
52 gateway.datatype = "ip4addr"
53 gateway:depends("forward_dhcp", forward_dhcp.enabled)
56 expiry = section:taboption("advanced", Value, "expiry",
57 translate("Host expiry timeout"),
58 translate("Specifies the maximum amount of seconds after which hosts are presumed to be dead"))
60 expiry.placeholder = "30"
61 expiry.datatype = "min(1)"
64 retry = section:taboption("advanced", Value, "retry",
65 translate("ARP retry threshold"),
66 translate("Specifies the maximum amount of failed ARP requests until hosts are presumed to be dead"))
68 retry.placeholder = "5"
69 retry.datatype = "min(1)"
72 table = section:taboption("advanced", Value, "table",
73 translate("Use routing table"),
74 translate("Override the table used for internal routes"))
76 table.placeholder = "16800"
77 table.datatype = "range(0,65535)"