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 15:19:16 +0300
commit8e91194cfd617af017f72e3e785cc71490482d38 (patch)
tree6f825c046174999caf6469fecfba1e1e1d7afbe7 /accel-pppd/ctrl/ipoe/lua.c
parent6b43ed40a167e2a5ac074b82a196f205129ac0cf (diff)
downloadaccel-ppp-8e91194cfd617af017f72e3e785cc71490482d38.tar.gz
accel-ppp-8e91194cfd617af017f72e3e785cc71490482d38.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))