|
suricata
|
#include "lua.h"#include "lualib.h"#include "lauxlib.h"#include "threadvars.h"#include "detect.h"

Go to the source code of this file.
Typedefs | |
| typedef struct DetectLuaData | DetectLuaData |
Functions | |
| lua_State * | LuaGetState (void) |
| void | LuaReturnState (lua_State *s) |
| ThreadVars * | LuaStateGetThreadVars (lua_State *luastate) |
| get tv pointer from the lua state More... | |
| Packet * | LuaStateGetPacket (lua_State *luastate) |
| get packet pointer from the lua state More... | |
| void * | LuaStateGetTX (lua_State *luastate) |
| get tx pointer from the lua state More... | |
| uint64_t | LuaStateGetTxId (lua_State *luastate) |
| get tx id from the lua state More... | |
| Flow * | LuaStateGetFlow (lua_State *luastate) |
| get flow pointer from lua state More... | |
| PacketAlert * | LuaStateGetPacketAlert (lua_State *luastate) |
| get packet alert pointer from the lua state More... | |
| Signature * | LuaStateGetSignature (lua_State *luastate) |
| get signature pointer from the lua state More... | |
| File * | LuaStateGetFile (lua_State *luastate) |
| get file pointer from the lua state More... | |
| DetectEngineThreadCtx * | LuaStateGetDetCtx (lua_State *luastate) |
| get detect engine thread context pointer from the lua state More... | |
| DetectLuaData * | LuaStateGetDetectLuaData (lua_State *luastate) |
| get the per-rule DetectLuaData, NULL when the state has none (output/transform states) More... | |
| void | LuaStateSetDetectLuaData (lua_State *luastate, DetectLuaData *ld) |
| int | LuaStateGetDirection (lua_State *luastate) |
| get packet pointer from the lua state More... | |
| const char * | LuaGetStringArgument (lua_State *luastate, int idx) |
| void | LuaStateSetPacket (lua_State *luastate, Packet *p) |
| void | LuaStateSetTX (lua_State *luastate, void *tx, const uint64_t tx_id) |
| void | LuaStateSetFlow (lua_State *luastate, Flow *f) |
| set a flow pointer in the lua state More... | |
| void | LuaStateSetPacketAlert (lua_State *luastate, PacketAlert *pa) |
| void | LuaStateSetSignature (lua_State *luastate, const Signature *s) |
| void | LuaStateSetFile (lua_State *luastate, File *file) |
| void | LuaStateSetDetCtx (lua_State *luastate, DetectEngineThreadCtx *det_ctx) |
| void | LuaStateSetThreadVars (lua_State *luastate, ThreadVars *tv) |
| void | LuaStateSetInvocationGen (lua_State *luastate, uint64_t *gen) |
| publish the state's invocation counter (once, at state init) More... | |
| uint64_t | LuaStateGetInvocationGen (lua_State *luastate) |
| current invocation generation; 0 when the state has none More... | |
| void | LuaStateSetDirection (lua_State *luastate, int direction) |
| void | LuaPrintStack (lua_State *state) |
| dump stack from lua state to screen More... | |
| int | LuaPushStringBuffer (lua_State *luastate, const uint8_t *input, size_t input_len) |
| int | LuaPushInteger (lua_State *luastate, lua_Integer n) |
Definition in file util-lua.h.
| typedef struct DetectLuaData DetectLuaData |
Definition at line 1 of file util-lua.h.
| lua_State* LuaGetState | ( | void | ) |
Definition at line 56 of file util-lua.c.
| const char* LuaGetStringArgument | ( | lua_State * | luastate, |
| int | idx | ||
| ) |
Definition at line 225 of file util-lua-common.c.
References str.
| void LuaPrintStack | ( | lua_State * | state | ) |
| int LuaPushInteger | ( | lua_State * | luastate, |
| lua_Integer | n | ||
| ) |
Definition at line 393 of file util-lua.c.
| int LuaPushStringBuffer | ( | lua_State * | luastate, |
| const uint8_t * | input, | ||
| size_t | input_len | ||
| ) |
Definition at line 380 of file util-lua.c.
Referenced by DetectLuaMatchBuffer(), DNP3PushPoint(), and LuaPushTableKeyValueArray().

| void LuaReturnState | ( | lua_State * | s | ) |
Definition at line 63 of file util-lua.c.
| DetectEngineThreadCtx* LuaStateGetDetCtx | ( | lua_State * | luastate | ) |
get detect engine thread context pointer from the lua state
get detect engine thread context pointer from the lua state
Definition at line 307 of file util-lua.c.
| DetectLuaData* LuaStateGetDetectLuaData | ( | lua_State * | luastate | ) |
get the per-rule DetectLuaData, NULL when the state has none (output/transform states)
get the per-rule DetectLuaData, NULL when the state has none (output/transform states)
Definition at line 319 of file util-lua.c.
| int LuaStateGetDirection | ( | lua_State * | luastate | ) |
get packet pointer from the lua state
Definition at line 330 of file util-lua.c.
References lua_ext_key_direction.
get file pointer from the lua state
Definition at line 296 of file util-lua.c.
get flow pointer from lua state
| f | flow pointer or NULL if it was not set |
Definition at line 260 of file util-lua.c.
References f.
Referenced by LuaStateNeedProto(), SCLuaTxRefInit(), and SCLuaTxRefResolve().

| uint64_t LuaStateGetInvocationGen | ( | lua_State * | luastate | ) |
current invocation generation; 0 when the state has none
current invocation generation; 0 when the state has none
Definition at line 216 of file util-lua.c.
get packet pointer from the lua state
Definition at line 223 of file util-lua.c.
| PacketAlert* LuaStateGetPacketAlert | ( | lua_State * | luastate | ) |
get packet alert pointer from the lua state
Definition at line 274 of file util-lua.c.
get signature pointer from the lua state
Definition at line 285 of file util-lua.c.
| ThreadVars* LuaStateGetThreadVars | ( | lua_State * | luastate | ) |
get tv pointer from the lua state
Definition at line 188 of file util-lua.c.
| void* LuaStateGetTX | ( | lua_State * | luastate | ) |
get tx pointer from the lua state
Definition at line 234 of file util-lua.c.
| uint64_t LuaStateGetTxId | ( | lua_State * | luastate | ) |
get tx id from the lua state
Definition at line 240 of file util-lua.c.
References lua_ext_key_tx_id.
| void LuaStateSetDetCtx | ( | lua_State * | luastate, |
| DetectEngineThreadCtx * | det_ctx | ||
| ) |
Definition at line 313 of file util-lua.c.
Referenced by LuaExtensionsMatchSetup().

| void LuaStateSetDetectLuaData | ( | lua_State * | luastate, |
| DetectLuaData * | ld | ||
| ) |
Definition at line 324 of file util-lua.c.
| void LuaStateSetDirection | ( | lua_State * | luastate, |
| int | direction | ||
| ) |
Definition at line 339 of file util-lua.c.
References lua_ext_key_direction.
Referenced by LuaExtensionsMatchSetup().

Definition at line 301 of file util-lua.c.
set a flow pointer in the lua state
| f | flow pointer |
Definition at line 267 of file util-lua.c.
Referenced by LuaExtensionsMatchSetup().

| void LuaStateSetInvocationGen | ( | lua_State * | luastate, |
| uint64_t * | gen | ||
| ) |
publish the state's invocation counter (once, at state init)
Definition at line 210 of file util-lua.c.
Definition at line 228 of file util-lua.c.
Referenced by LuaExtensionsMatchSetup().

| void LuaStateSetPacketAlert | ( | lua_State * | luastate, |
| PacketAlert * | pa | ||
| ) |
Definition at line 279 of file util-lua.c.
Definition at line 290 of file util-lua.c.
Referenced by LuaExtensionsMatchSetup().

| void LuaStateSetThreadVars | ( | lua_State * | luastate, |
| ThreadVars * | tv | ||
| ) |
Definition at line 193 of file util-lua.c.
Referenced by LuaExtensionsMatchSetup().

| void LuaStateSetTX | ( | lua_State * | luastate, |
| void * | tx, | ||
| const uint64_t | tx_id | ||
| ) |
Definition at line 248 of file util-lua.c.
Referenced by LuaExtensionsMatchSetup().
