suricata
util-lua-common.c File Reference
#include "suricata-common.h"
#include "detect.h"
#include "pkt-var.h"
#include "conf.h"
#include "threads.h"
#include "threadvars.h"
#include "tm-threads.h"
#include "util-print.h"
#include "util-unittest.h"
#include "util-debug.h"
#include "output.h"
#include "app-layer-htp.h"
#include "app-layer.h"
#include "app-layer-parser.h"
#include "util-privs.h"
#include "util-buffer.h"
#include "util-proto-name.h"
#include "util-logopenfile.h"
#include "util-time.h"
#include "util-conf.h"
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include "util-lua.h"
#include "util-lua-common.h"
#include "action-globals.h"
Include dependency graph for util-lua-common.c:

Go to the source code of this file.

Functions

int LuaCallbackError (lua_State *luastate, const char *msg)
 
const char * LuaGetStringArgument (lua_State *luastate, int argc)
 
void LuaPushTableKeyValueInt (lua_State *luastate, const char *key, int value)
 
void LuaPushTableKeyValueString (lua_State *luastate, const char *key, const char *value)
 Push a key plus string value to the stack. More...
 
void LuaPushTableKeyValueArray (lua_State *luastate, const char *key, const uint8_t *value, size_t len)
 
int LuaRegisterFunctions (lua_State *luastate)
 
int LuaStateNeedProto (lua_State *luastate, AppProto alproto)
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Common function for Lua Output

Definition in file util-lua-common.c.

Function Documentation

◆ LuaCallbackError()

int LuaCallbackError ( lua_State luastate,
const char *  msg 
)

Definition at line 59 of file util-lua-common.c.

References msg.

Referenced by LuaStateNeedProto().

Here is the caller graph for this function:

◆ LuaGetStringArgument()

const char* LuaGetStringArgument ( lua_State luastate,
int  argc 
)

Definition at line 66 of file util-lua-common.c.

References str.

◆ LuaPushTableKeyValueArray()

void LuaPushTableKeyValueArray ( lua_State luastate,
const char *  key,
const uint8_t *  value,
size_t  len 
)

Definition at line 97 of file util-lua-common.c.

References len, and LuaPushStringBuffer().

Here is the call graph for this function:

◆ LuaPushTableKeyValueInt()

void LuaPushTableKeyValueInt ( lua_State luastate,
const char *  key,
int  value 
)

Definition at line 79 of file util-lua-common.c.

◆ LuaPushTableKeyValueString()

void LuaPushTableKeyValueString ( lua_State luastate,
const char *  key,
const char *  value 
)

Push a key plus string value to the stack.

If value is NULL, string "(null")" will be put on the stack.

Definition at line 90 of file util-lua-common.c.

◆ LuaRegisterFunctions()

int LuaRegisterFunctions ( lua_State luastate)

Definition at line 931 of file util-lua-common.c.

◆ LuaStateNeedProto()

int LuaStateNeedProto ( lua_State luastate,
AppProto  alproto 
)

Definition at line 995 of file util-lua-common.c.

References Flow_::alproto, LuaCallbackError(), and LuaStateGetFlow().

Here is the call graph for this function: