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
16 s = m:section(TypedSection, "interface", translate("interfaces"))
19 s:option(Flag, "enabled", translate("enable"))
21 c = s:option(ListValue, "classgroup")
22 c:value("Default", "standard")
25 s:option(Flag, "overhead")
27 s:option(Value, "download", nil, "kb/s")
29 s:option(Value, "upload", nil, "kb/s")
31 s = m:section(TypedSection, "classify")
36 t = s:option(ListValue, "target")
37 t:value("Priority", translate("qos_priority"))
38 t:value("Express", translate("qos_express"))
39 t:value("Normal", translate("qos_normal"))
40 t:value("Bulk", translate("qos_bulk"))
43 s:option(Value, "srchost").optional = true
44 s:option(Value, "dsthost").optional = true
46 l7 = s:option(ListValue, "layer7", translate("service"))
49 local pats = luci.fs.dir("/etc/l7-protocols")
51 for i,f in ipairs(pats) do
52 if f:sub(-4) == ".pat" then
53 l7:value(f:sub(1, #f-4))
58 p2p = s:option(ListValue, "ipp2p", "P2P")
60 p2p:value("all", translate("all"))
61 p2p:value("bit", "BitTorrent")
62 p2p:value("dc", "DirectConnect")
63 p2p:value("edk", "eDonkey")
64 p2p:value("gnu", "Gnutella")
65 p2p:value("kazaa", "Kazaa")
68 p = s:option(ListValue, "proto", translate("protocol"))
72 p:value("icmp", "ICMP")
75 s:option(Value, "ports", translate("port")).optional = true
76 s:option(Value, "portrange").optional = true