Merge pull request #798 from thoto/feature_lstat
[project/luci.git] / protocols / luci-proto-ipip / luasrc / model / cbi / admin_network / proto_ipip.lua
1 -- Copyright 2016 Roger Pueyo Centelles <roger.pueyo@guifi.net>
2 -- Licensed to the public under the Apache License 2.0.
3
4 local map, section, net = ...
5
6 local peeraddr, ipaddr, ttl, tos, df, mtu, tunlink
7
8 peeraddr = section:taboption("general", Value, "peeraddr", translate("Remote IPv4 address or FQDN"), translate("The IPv4 address or the fully-qualified domain name of the remote tunnel end."))
9 peeraddr.optional = false
10 peeraddr.datatype = "or(hostname,ip4addr)"
11
12 ipaddr = section:taboption("general", Value, "ipaddr", translate("Local IPv4 address"), translate("The local IPv4 address over which the tunnel is created (optional)."))
13 ipaddr.optional = true
14 ipaddr.datatype = "ip4addr"
15
16 tunlink = section:taboption("general", Value, "tunlink", translate("Bind interface"), translate("Bind the tunnel to this interface (optional)."))
17 ipaddr.optional = true
18
19
20 mtu = section:taboption("advanced", Value, "mtu", translate("Override MTU"), translate("Specify an MTU (Maximum Transmission Unit) other than the default (1280 bytes)."))
21 mtu.optional = true
22 mtu.placeholder = 1280
23 mtu.datatype = "range(68, 9200)"
24
25 ttl = section:taboption("advanced", Value, "ttl", translate("Override TTL"), translate("Specify a TTL (Time to Live) for the encapsulating packet other than the default (64)."))
26 ttl.optional = true
27 ttl.placeholder = 64
28 ttl.datatype = "min(1)"
29
30 tos = section:taboption("advanced", Value, "tos", translate("Override TOS"), translate("Specify a TOS (Type of Service)."))
31 tos.optional = true
32 tos.datatype = "range(0, 255)"
33
34 df = section:taboption("advanced", Flag, "df", translate("Don't Fragment"), translate("Enable the DF (Don't Fragment) flag of the encapsulating packets."))