2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
16 f = SimpleForm("conntrack", translate("a_n_conntrack"), translate("a_n_conntrack_desc"))
20 t = f:section(Table, luci.sys.net.conntrack())
21 l3 = t:option(DummyValue, "layer3", translate("network"))
22 function l3.cfgvalue(self, ...)
23 return DummyValue.cfgvalue(self, ...):upper()
27 l4 = t:option(DummyValue, "layer4", translate("protocol"))
28 function l4.cfgvalue(self, ...)
29 return DummyValue.cfgvalue(self, ...):upper()
32 s = t:option(DummyValue, "src", translate("source"))
33 function s.cfgvalue(self, section)
34 return "%s:%s" % { self.map:get(section, "src"),
35 self.map:get(section, "sport") or "*" }
38 d = t:option(DummyValue, "dst", translate("destination"))
39 function d.cfgvalue(self, section)
40 return "%s:%s" % { self.map:get(section, "dst"),
41 self.map:get(section, "dport") or "*" }