Merge pull request #798 from thoto/feature_lstat
[project/luci.git] / applications / luci-app-rp-pppoe-server / luasrc / model / cbi / rp-pppoe-server.lua
1 -- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com>
2 -- Licensed to the public under the Apache License 2.0.
3
4 local m, s, o
5
6 local nixio = require "nixio"
7
8 m = Map("pppoe", translate("Roaring Penguin PPPoE Server"),
9         translate("PPPoE Server Configuration"))
10
11 s = m:section(TypedSection, "pppoe_server", translate("Server Configuration"))
12 s.addremove = false
13 s.anonymous = true
14
15 o = s:option(Value, "interface", translate("Interface"), translate("Interface on which to listen."))
16 o.template = "cbi/network_ifacelist"
17 o.nocreate = true
18
19 o = s:option(Value, "ac_name", translate("Access Concentrator Name"))
20 o.optional = true
21
22 o = s:option(DynamicList, "service_name", translate("Service Name"))
23 o.optional = true
24
25 o = s:option(Value, "maxsessionsperpeer", translate("Maximum sessions per peer"))
26 o.optional = true
27 o.datatype = "uinteger"
28
29 o = s:option(Value, "localip", translate("IP of listening side"))
30 o.datetype = "ipaddr"
31
32 o = s:option(Value, "firstremoteip", translate("First remote IP"))
33 o.datatype = "ipaddr"
34
35 o = s:option(Value, "maxsessions", translate("Maximum sessions"))
36 o.datatype = "uinteger"
37 o.default = 64
38 o.optional = true
39
40 o = s:option(Value, "optionsfile", translate("Options file"))
41 o.default = "/etc/ppp/pppoe-server-options"
42 o.optional = true
43
44 o = s:option(Flag, "randomsessions", translate("Random session selection"), translate("Instead of starting at beginning and going to end, randomize session number"))
45 o.optional = true
46
47 o = s:option(Value, "unit", translate("Unit"), translate("PPP unit number"))
48 o.optional = true
49 o.datatype = "uinteger"
50 o.default = 0
51
52 o = s:option(Value, "offset", translate("Offset"), translate("PPP offset"))
53 o.optional = true
54 o.datatype = "uinteger"
55 o.default = 0
56
57 o = s:option(Value, "timeout", translate("Timeout"))
58 o.optional = true
59 o.datatype = "uinteger"
60 o.default = 60
61
62 o = s:option(Value, "mss", translate("MSS"))
63 o.optional = true
64 o.datatype = "uinteger"
65 o.default = 1468
66
67
68 o = s:option(Flag, "sync", translate("Sync"))
69 o.optional = true
70 o.default = false
71
72 return m