diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2017-10-17 23:23:54 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2017-10-17 23:33:44 +0300 |
commit | 405a4d8de0048aa77d09380b33a3f06149d16765 (patch) | |
tree | d3de19458bb0d17529e6d029f11b4ecefef56fed /accel-pppd/ctrl | |
parent | 0a71249f32169ad04fd6a907989578dced3ba9ec (diff) | |
download | accel-ppp-405a4d8de0048aa77d09380b33a3f06149d16765.tar.gz accel-ppp-405a4d8de0048aa77d09380b33a3f06149d16765.zip |
radius: implemented lua support
to get radius object use session:module("radius") function
radius object provides flollowing functions:
radius:attrs() - returns array of attributes {"name" = NAME, "vendor" = VENDOR|nil}
radius:attr(name[,vendor]) - returns value of attribute (may return multiple results)
Example:
function ip_up(ses)
rad = ses:module("radius")
attrs = rad:attrs()
if attrs then
print("attrs:")
for _,a in pairs(attrs) do
io.write("\t")
if a.vendor then io.write(a.vendor..":") end
io.write(a.name.."=")
print(rad:attr(a.name, a.vendor))
end
end
end
Diffstat (limited to 'accel-pppd/ctrl')
0 files changed, 0 insertions, 0 deletions