summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe/lua.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2017-04-04 12:44:16 +0300
committerDmitry Kozlov <xeb@mail.ru>2017-04-04 12:44:20 +0300
commit29e80de7214199500b56e4ac3a667a40df1a7f20 (patch)
tree94ae87f10806f0dd1920cc10f6d98d1ba6b554af /accel-pppd/ctrl/ipoe/lua.c
parent974f6a33e3983880051470d1676745fd136f5d61 (diff)
downloadaccel-ppp-29e80de7214199500b56e4ac3a667a40df1a7f20.tar.gz
accel-ppp-29e80de7214199500b56e4ac3a667a40df1a7f20.zip
ipoe: included lua bitop library
Included bitop library http://bitop.luajit.org/index.html It may be used to extract vlan components in username function: function username(ses) vid=ses:vlan() svid=bit.rshift(vid,16) cvid=bit.band(vid,0xffff) ... end
Diffstat (limited to 'accel-pppd/ctrl/ipoe/lua.c')
-rw-r--r--accel-pppd/ctrl/ipoe/lua.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/lua.c b/accel-pppd/ctrl/ipoe/lua.c
index f0785066..d5f9e95d 100644
--- a/accel-pppd/ctrl/ipoe/lua.c
+++ b/accel-pppd/ctrl/ipoe/lua.c
@@ -35,6 +35,7 @@ static int packet4_agent_remote_id(lua_State *L);
static int packet4_vlan(lua_State *L);
int luaopen_lpack(lua_State *L);
+int luaopen_bit(lua_State *L);
static const struct luaL_reg packet4_lib [] = {
{"hdr", packet4_hdr},
@@ -193,6 +194,7 @@ static void init_lua()
luaL_openlibs(L);
luaopen_lpack(L);
+ luaopen_bit(L);
luaopen_packet4(L);
if (luaL_loadfile(L, conf_filename))