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
17 s = m:section(NamedSection, "wan", "interface", translate("m_n_inet"))
19 s:option(Flag, "enabled", translate("qos"))
20 s:option(Value, "download", translate("qos_interface_download"), "kb/s")
21 s:option(Value, "upload", translate("qos_interface_upload"), "kb/s")
23 s = m:section(TypedSection, "classify")
28 t = s:option(ListValue, "target")
29 t:value("Priority", translate("qos_priority"))
30 t:value("Express", translate("qos_express"))
31 t:value("Normal", translate("qos_normal"))
32 t:value("Bulk", translate("qos_bulk"))
35 s:option(Value, "srchost").optional = true
36 s:option(Value, "dsthost").optional = true
38 l7 = s:option(ListValue, "layer7", translate("service"))
41 local pats = luci.fs.dir("/etc/l7-protocols")
43 for i,f in ipairs(pats) do
44 if f:sub(-4) == ".pat" then
45 l7:value(f:sub(1, #f-4))
50 p2p = s:option(ListValue, "ipp2p", "P2P")
52 p2p:value("all", translate("all"))
53 p2p:value("bit", "BitTorrent")
54 p2p:value("dc", "DirectConnect")
55 p2p:value("edk", "eDonkey")
56 p2p:value("gnu", "Gnutella")
57 p2p:value("kazaa", "Kazaa")
60 p = s:option(ListValue, "proto", translate("protocol"))
64 p:value("icmp", "ICMP")
67 s:option(Value, "ports", translate("port")).optional = true
68 s:option(Value, "portrange").optional = true