suricata
util-lua-common.h
Go to the documentation of this file.
1 /* Copyright (C) 2014 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Victor Julien <victor@inliniac.net>
22  */
23 
24 #ifndef SURICATA_UTIL_LUA_COMMON_H
25 #define SURICATA_UTIL_LUA_COMMON_H
26 
27 int LuaCallbackError(lua_State *luastate, const char *msg);
28 const char *LuaGetStringArgument(lua_State *luastate, int argc);
29 
30 void LuaPushTableKeyValueInt(lua_State *luastate, const char *key, int value);
31 void LuaPushTableKeyValueString(lua_State *luastate, const char *key, const char *value);
32 void LuaPushTableKeyValueArray(lua_State *luastate, const char *key, const uint8_t *value, size_t len);
33 
34 int LuaRegisterFunctions(lua_State *luastate);
35 
36 int LuaStateNeedProto(lua_State *luastate, AppProto alproto);
37 
38 #endif /* SURICATA_UTIL_LUA_COMMON_H */
len
uint8_t len
Definition: app-layer-dnp3.h:2
AppProto
uint16_t AppProto
Definition: app-layer-protos.h:81
lua_State
struct lua_State lua_State
Definition: suricata-common.h:506
LuaPushTableKeyValueInt
void LuaPushTableKeyValueInt(lua_State *luastate, const char *key, int value)
Definition: util-lua-common.c:79
LuaGetStringArgument
const char * LuaGetStringArgument(lua_State *luastate, int argc)
Definition: util-lua-common.c:66
LuaPushTableKeyValueString
void LuaPushTableKeyValueString(lua_State *luastate, const char *key, const char *value)
Push a key plus string value to the stack.
Definition: util-lua-common.c:90
LuaPushTableKeyValueArray
void LuaPushTableKeyValueArray(lua_State *luastate, const char *key, const uint8_t *value, size_t len)
Definition: util-lua-common.c:97
LuaStateNeedProto
int LuaStateNeedProto(lua_State *luastate, AppProto alproto)
Definition: util-lua-common.c:995
LuaCallbackError
int LuaCallbackError(lua_State *luastate, const char *msg)
Definition: util-lua-common.c:59
LuaRegisterFunctions
int LuaRegisterFunctions(lua_State *luastate)
Definition: util-lua-common.c:931
msg
const char * msg
Definition: app-layer-htp.c:553