2008-06-08 08:14:31 +00:00
|
|
|
--[[
|
|
|
|
LuCI - Lua Configuration Interface
|
|
|
|
|
|
|
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
]]--
|
2008-06-08 17:12:47 +00:00
|
|
|
m = Map("qos")
|
2008-04-14 17:15:49 +00:00
|
|
|
|
2008-06-09 10:10:29 +00:00
|
|
|
s = m:section(TypedSection, "interface", translate("interfaces"))
|
2008-04-14 17:15:49 +00:00
|
|
|
s.addremove = true
|
|
|
|
|
2008-06-09 10:10:29 +00:00
|
|
|
s:option(Flag, "enabled", translate("enable"))
|
2008-04-14 17:15:49 +00:00
|
|
|
|
2008-06-08 17:12:47 +00:00
|
|
|
c = s:option(ListValue, "classgroup")
|
2008-04-14 17:15:49 +00:00
|
|
|
c:value("Default", "standard")
|
|
|
|
c.default = "Default"
|
|
|
|
|
2008-06-08 17:12:47 +00:00
|
|
|
s:option(Flag, "overhead")
|
2008-04-14 17:15:49 +00:00
|
|
|
|
2008-06-08 17:12:47 +00:00
|
|
|
s:option(Value, "download", nil, "kb/s")
|
2008-04-14 17:15:49 +00:00
|
|
|
|
2008-06-08 17:12:47 +00:00
|
|
|
s:option(Value, "upload", nil, "kb/s")
|
2008-04-14 17:15:49 +00:00
|
|
|
|
2008-06-08 17:12:47 +00:00
|
|
|
s = m:section(TypedSection, "classify")
|
2008-04-14 17:15:49 +00:00
|
|
|
|
|
|
|
s.anonymous = true
|
|
|
|
s.addremove = true
|
|
|
|
|
2008-06-08 17:12:47 +00:00
|
|
|
t = s:option(ListValue, "target")
|
2008-04-14 17:15:49 +00:00
|
|
|
t:value("Priority")
|
|
|
|
t:value("Express")
|
|
|
|
t:value("Normal")
|
|
|
|
t:value("Bulk")
|
|
|
|
t.default = "Normal"
|
|
|
|
|
2008-06-08 17:12:47 +00:00
|
|
|
s:option(Value, "srchost").optional = true
|
|
|
|
s:option(Value, "dsthost").optional = true
|
2008-04-14 17:15:49 +00:00
|
|
|
s:option(Value, "layer7", "Layer 7").optional = true
|
|
|
|
|
|
|
|
p2p = s:option(ListValue, "ipp2p", "P2P")
|
|
|
|
p2p:value("")
|
2008-06-09 10:10:29 +00:00
|
|
|
p2p:value("all", translate("all"))
|
2008-06-08 17:12:47 +00:00
|
|
|
p2p:value("bit", "BitTorrent")
|
2008-04-14 17:15:49 +00:00
|
|
|
p2p:value("dc", "DirectConnect")
|
|
|
|
p2p:value("edk", "eDonkey")
|
|
|
|
p2p:value("gnu", "Gnutella")
|
|
|
|
p2p:value("kazaa", "Kazaa")
|
|
|
|
p2p.optional = true
|
|
|
|
|
2008-06-09 10:10:29 +00:00
|
|
|
p = s:option(ListValue, "proto", translate("protocol"))
|
2008-04-14 17:15:49 +00:00
|
|
|
p:value("")
|
|
|
|
p:value("tcp", "TCP")
|
|
|
|
p:value("udp", "UDP")
|
|
|
|
p:value("icmp", "ICMP")
|
|
|
|
p.optional = true
|
|
|
|
|
2008-06-09 10:10:29 +00:00
|
|
|
s:option(Value, "ports", translate("port")).optional = true
|
2008-06-08 17:12:47 +00:00
|
|
|
s:option(Value, "portrange").optional = true
|
2008-04-14 17:15:49 +00:00
|
|
|
|
|
|
|
return m
|