1 -- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com>
2 -- Licensed to the public under the Apache License 2.0.
6 local nixio = require "nixio"
8 m = Map("pppoe", translate("Roaring Penguin PPPoE Server"),
9 translate("PPPoE Server Configuration"))
11 s = m:section(TypedSection, "pppoe_server", translate("Server Configuration"))
15 o = s:option(Value, "interface", translate("Interface"), translate("Interface on which to listen."))
16 o.template = "cbi/network_ifacelist"
19 o = s:option(Value, "ac_name", translate("Access Concentrator Name"))
22 o = s:option(DynamicList, "service_name", translate("Service Name"))
25 o = s:option(Value, "maxsessionsperpeer", translate("Maximum sessions per peer"))
27 o.datatype = "uinteger"
29 o = s:option(Value, "localip", translate("IP of listening side"))
32 o = s:option(Value, "firstremoteip", translate("First remote IP"))
35 o = s:option(Value, "maxsessions", translate("Maximum sessions"))
36 o.datatype = "uinteger"
40 o = s:option(Value, "optionsfile", translate("Options file"))
41 o.default = "/etc/ppp/pppoe-server-options"
44 o = s:option(Flag, "randomsessions", translate("Random session selection"), translate("Instead of starting at beginning and going to end, randomize session number"))
47 o = s:option(Value, "unit", translate("Unit"), translate("PPP unit number"))
49 o.datatype = "uinteger"
52 o = s:option(Value, "offset", translate("Offset"), translate("PPP offset"))
54 o.datatype = "uinteger"
57 o = s:option(Value, "timeout", translate("Timeout"))
59 o.datatype = "uinteger"
62 o = s:option(Value, "mss", translate("MSS"))
64 o.datatype = "uinteger"
68 o = s:option(Flag, "sync", translate("Sync"))