<feed xmlns='http://www.w3.org/2005/Atom'>
<title>accel-ppp.git/accel-pppd/radius/lua.c, branch stable</title>
<subtitle>High performance PPTP/L2TP/SSTP/PPPoE/IPoE server for Linux (mirror of https://github.com/accel-ppp/accel-ppp.git)
</subtitle>
<id>https://git.amelek.net/accel-ppp/accel-ppp.git/atom?h=stable</id>
<link rel='self' href='https://git.amelek.net/accel-ppp/accel-ppp.git/atom?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/'/>
<updated>2017-10-17T20:33:44+00:00</updated>
<entry>
<title>radius: implemented lua support</title>
<updated>2017-10-17T20:33:44+00:00</updated>
<author>
<name>Dmitry Kozlov</name>
<email>xeb@mail.ru</email>
</author>
<published>2017-10-17T20:23:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=405a4d8de0048aa77d09380b33a3f06149d16765'/>
<id>urn:sha1:405a4d8de0048aa77d09380b33a3f06149d16765</id>
<content type='text'>
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
</content>
</entry>
</feed>
