2 * Licensed under the Apache License, Version 2.0 (the "License");
3 * you may not use this file except in compliance with the License.
4 * You may obtain a copy of the License at
6 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
14 * Copyright (C) 2008 John Crispin <blogic@openwrt.org>
15 * Copyright (C) 2008 Steven Barth <steven@midlink.org>
16 * Copyright (C) 2009 Jo-Philipp Wich <xm@subsignal.org>
34 int psleep(lua_State
*L
)
37 if(lua_gettop(L
) != 1)
39 lua_pushstring(L
, "invalid arg list");
44 s
= (int)lua_tointeger (L
, 1);
49 static luaL_reg func
[] = {
50 {"ifc_getall", ifc_getall
},
51 {"ifc_setip", ifc_setip
},
52 {"ifc_setnetmask", ifc_setnetmask
},
53 {"ifc_setbroadcast", ifc_setbroadcast
},
54 {"ifc_setmtu", ifc_setmtu
},
56 {"ifc_down", ifc_down
},
57 {"bridge_getall", bridge_getall
},
58 {"bridge_new", bridge_new
},
59 {"bridge_del", bridge_del
},
60 {"bridge_addif", bridge_addif
},
61 {"bridge_delif", bridge_delif
},
62 {"iwc_getall", iwc_getall
},
63 {"iwc_set_essid", iwc_set_essid
},
64 {"iwc_set_mode", iwc_set_mode
},
65 {"iwc_set_channel", iwc_set_channel
},
66 {"iwc_scan", iwc_scan
},
67 {"iwc_frequencies", iwc_frequencies
},
68 {"vlan_getall", vlan_getall
},
69 {"vlan_add", vlan_add
},
70 {"vlan_del", vlan_del
},
72 {"b64_encode", b64_encode
},
73 {"b64_decode", b64_decode
},
78 int luaopen_luanet(lua_State
*L
)
83 luaL_openlib(L
, "luanet", func
, 0);
84 lua_pushstring(L
, "_VERSION");
85 lua_pushstring(L
, "1.0");
90 int luaclose_luanet(lua_State
*L
)
95 lua_pushstring(L
, "Called");