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>
33 int psleep(lua_State *L)
36 if(lua_gettop(L) != 1)
38 lua_pushstring(L, "invalid arg list");
43 s = (int)lua_tointeger (L, 1);
48 static luaL_reg func[] = {
49 {"ifc_getall", ifc_getall},
50 {"ifc_setip", ifc_setip},
51 {"ifc_setnetmask", ifc_setnetmask},
52 {"ifc_setbroadcast", ifc_setbroadcast},
53 {"ifc_setmtu", ifc_setmtu},
55 {"ifc_down", ifc_down},
56 {"bridge_getall", bridge_getall},
57 {"bridge_new", bridge_new},
58 {"bridge_del", bridge_del},
59 {"bridge_addif", bridge_addif},
60 {"bridge_delif", bridge_delif},
61 {"iwc_getall", iwc_getall},
62 {"iwc_set_essid", iwc_set_essid},
63 {"iwc_set_mode", iwc_set_mode},
64 {"iwc_set_channel", iwc_set_channel},
65 {"iwc_scan", iwc_scan},
66 {"vlan_getall", vlan_getall},
67 {"vlan_add", vlan_add},
68 {"vlan_del", vlan_del},
70 {"b64_encode", b64_encode},
71 {"b64_decode", b64_decode},
76 int luaopen_luanet(lua_State *L)
81 luaL_openlib(L, "luanet", func, 0);
82 lua_pushstring(L, "_VERSION");
83 lua_pushstring(L, "1.0");
88 int luaclose_luanet(lua_State *L)
93 lua_pushstring(L, "Called");