18f26efb6911ff68eb1645348ac3ea4ba0b8f273
[project/luci.git] / applications / luci-qos / luasrc / model / cbi / qos / qos.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5
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
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14 m = Map("qos")
15
16 s = m:section(TypedSection, "interface", translate("interfaces", "Schnittstellen"))
17 s.addremove = true
18
19 s:option(Flag, "enabled", translate("enable", "aktivieren"))
20
21 c = s:option(ListValue, "classgroup")
22 c:value("Default", "standard")
23 c.default = "Default"
24
25 s:option(Flag, "overhead")
26
27 s:option(Value, "download", nil, "kb/s")
28
29 s:option(Value, "upload", nil, "kb/s")
30
31 s = m:section(TypedSection, "classify")
32
33 s.anonymous = true
34 s.addremove = true
35
36 t = s:option(ListValue, "target")
37 t:value("Priority")
38 t:value("Express")
39 t:value("Normal")
40 t:value("Bulk")
41 t.default = "Normal"
42
43 s:option(Value, "srchost").optional = true
44 s:option(Value, "dsthost").optional = true
45 s:option(Value, "layer7", "Layer 7").optional = true
46
47 p2p = s:option(ListValue, "ipp2p", "P2P")
48 p2p:value("")
49 p2p:value("all", translate("all", "alle"))
50 p2p:value("bit", "BitTorrent")
51 p2p:value("dc", "DirectConnect")
52 p2p:value("edk", "eDonkey")
53 p2p:value("gnu", "Gnutella")
54 p2p:value("kazaa", "Kazaa")
55 p2p.optional = true
56
57 p = s:option(ListValue, "proto", translate("protocol", "Protokoll"))
58 p:value("")
59 p:value("tcp", "TCP")
60 p:value("udp", "UDP")
61 p:value("icmp", "ICMP")
62 p.optional = true
63
64 s:option(Value, "ports", translate("port", "Port")).optional = true
65 s:option(Value, "portrange").optional = true
66
67 return m