|
suricata
|
#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 "lua.h"#include "lualib.h"#include "lauxlib.h"#include "util-lua.h"#include "util-lua-sandbox.h"
Go to the source code of this file.
Functions | |
| lua_State * | LuaGetState (void) |
| void | LuaReturnState (lua_State *s) |
| ThreadVars * | LuaStateGetThreadVars (lua_State *luastate) |
| get tv pointer from the lua state More... | |
| void | LuaStateSetThreadVars (lua_State *luastate, ThreadVars *tv) |
| Packet * | LuaStateGetPacket (lua_State *luastate) |
| get packet pointer from the lua state More... | |
| void | LuaStateSetPacket (lua_State *luastate, Packet *p) |
| 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... | |
| void | LuaStateSetTX (lua_State *luastate, void *txptr, const uint64_t tx_id) |
| Flow * | LuaStateGetFlow (lua_State *luastate) |
| get flow pointer from lua state More... | |
| void | LuaStateSetFlow (lua_State *luastate, Flow *f) |
| set a flow pointer in the lua state More... | |
| PacketAlert * | LuaStateGetPacketAlert (lua_State *luastate) |
| get packet alert pointer from the lua state More... | |
| void | LuaStateSetPacketAlert (lua_State *luastate, PacketAlert *pa) |
| Signature * | LuaStateGetSignature (lua_State *luastate) |
| get signature pointer from the lua state More... | |
| void | LuaStateSetSignature (lua_State *luastate, const Signature *s) |
| File * | LuaStateGetFile (lua_State *luastate) |
| get file pointer from the lua state More... | |
| void | LuaStateSetFile (lua_State *luastate, File *file) |
| DetectEngineThreadCtx * | LuaStateGetDetCtx (lua_State *luastate) |
| get DetectEngineThreadCtx pointer from the lua state More... | |
| void | LuaStateSetDetCtx (lua_State *luastate, DetectEngineThreadCtx *det_ctx) |
| LuaStreamingBuffer * | LuaStateGetStreamingBuffer (lua_State *luastate) |
| void | LuaStateSetStreamingBuffer (lua_State *luastate, LuaStreamingBuffer *b) |
| int | LuaStateGetDirection (lua_State *luastate) |
| get packet pointer from the lua state 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) |
Variables | |
| const char | lua_ext_key_tv [] = "suricata:lua:tv:ptr" |
| const char | lua_ext_key_tx [] = "suricata:lua:tx:ptr" |
| const char | lua_ext_key_tx_id [] = "suricata:lua:tx_id" |
| const char | lua_ext_key_p [] = "suricata:lua:pkt:ptr" |
| const char | lua_ext_key_flow [] = "suricata:lua:flow:ptr" |
| const char | lua_ext_key_flow_lock_hint [] = "suricata:lua:flow:lock_hint" |
| const char | lua_ext_key_direction [] = "suricata:lua:direction" |
| const char | lua_ext_key_pa [] = "suricata:lua:pkt:alert:ptr" |
| const char | lua_ext_key_s [] = "suricata:lua:signature:ptr" |
| const char | lua_ext_key_file [] = "suricata:lua:file:ptr" |
| const char | lua_ext_key_det_ctx [] = "suricata:lua:det_ctx:ptr" |
| const char | lua_ext_key_streaming_buffer [] = "suricata:lua:streaming_buffer:ptr" |
Common function for Lua
Definition in file util-lua.c.
| lua_State* LuaGetState | ( | void | ) |
Definition at line 57 of file util-lua.c.
| void LuaPrintStack | ( | lua_State * | state | ) |
| int LuaPushInteger | ( | lua_State * | luastate, |
| lua_Integer | n | ||
| ) |
Definition at line 340 of file util-lua.c.
| int LuaPushStringBuffer | ( | lua_State * | luastate, |
| const uint8_t * | input, | ||
| size_t | input_len | ||
| ) |
Definition at line 319 of file util-lua.c.
Referenced by DetectLuaMatchBuffer(), DNP3PushPoint(), and LuaPushTableKeyValueArray().

| void LuaReturnState | ( | lua_State * | s | ) |
Definition at line 64 of file util-lua.c.
| DetectEngineThreadCtx* LuaStateGetDetCtx | ( | lua_State * | luastate | ) |
get DetectEngineThreadCtx pointer from the lua state
get detect engine thread context pointer from the lua state
Definition at line 239 of file util-lua.c.
References lua_ext_key_det_ctx.
| int LuaStateGetDirection | ( | lua_State * | luastate | ) |
get packet pointer from the lua state
Definition at line 270 of file util-lua.c.
References lua_ext_key_direction.
get file pointer from the lua state
Definition at line 223 of file util-lua.c.
References lua_ext_key_file.
get flow pointer from lua state
| f | flow pointer or NULL if it was not set |
Definition at line 161 of file util-lua.c.
References lua_ext_key_flow, and lua_ext_key_flow_lock_hint.
Referenced by LuaStateNeedProto().

get packet pointer from the lua state
Definition at line 118 of file util-lua.c.
References lua_ext_key_p.
| PacketAlert* LuaStateGetPacketAlert | ( | lua_State * | luastate | ) |
get packet alert pointer from the lua state
Definition at line 191 of file util-lua.c.
References lua_ext_key_pa.
get signature pointer from the lua state
Definition at line 207 of file util-lua.c.
References lua_ext_key_s.
| LuaStreamingBuffer* LuaStateGetStreamingBuffer | ( | lua_State * | luastate | ) |
Definition at line 254 of file util-lua.c.
References lua_ext_key_streaming_buffer.
| ThreadVars* LuaStateGetThreadVars | ( | lua_State * | luastate | ) |
get tv pointer from the lua state
Definition at line 102 of file util-lua.c.
References lua_ext_key_tv, and tv.
| void* LuaStateGetTX | ( | lua_State * | luastate | ) |
get tx pointer from the lua state
Definition at line 134 of file util-lua.c.
References lua_ext_key_tx.
| uint64_t LuaStateGetTxId | ( | lua_State * | luastate | ) |
get tx id from the lua state
Definition at line 143 of file util-lua.c.
References lua_ext_key_tx_id.
| void LuaStateSetDetCtx | ( | lua_State * | luastate, |
| DetectEngineThreadCtx * | det_ctx | ||
| ) |
Definition at line 247 of file util-lua.c.
References lua_ext_key_det_ctx.
Referenced by LuaExtensionsMatchSetup().

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

Definition at line 231 of file util-lua.c.
References lua_ext_key_file.
set a flow pointer in the lua state
| f | flow pointer |
Definition at line 176 of file util-lua.c.
References lua_ext_key_flow, and lua_ext_key_flow_lock_hint.
Referenced by LuaExtensionsMatchSetup().

Definition at line 126 of file util-lua.c.
References lua_ext_key_p.
Referenced by LuaExtensionsMatchSetup().

| void LuaStateSetPacketAlert | ( | lua_State * | luastate, |
| PacketAlert * | pa | ||
| ) |
Definition at line 199 of file util-lua.c.
References lua_ext_key_pa.
Definition at line 215 of file util-lua.c.
References lua_ext_key_s.
Referenced by LuaExtensionsMatchSetup().

| void LuaStateSetStreamingBuffer | ( | lua_State * | luastate, |
| LuaStreamingBuffer * | b | ||
| ) |
Definition at line 262 of file util-lua.c.
References lua_ext_key_streaming_buffer.
| void LuaStateSetThreadVars | ( | lua_State * | luastate, |
| ThreadVars * | tv | ||
| ) |
Definition at line 110 of file util-lua.c.
References lua_ext_key_tv, and tv.
| void LuaStateSetTX | ( | lua_State * | luastate, |
| void * | txptr, | ||
| const uint64_t | tx_id | ||
| ) |
Definition at line 150 of file util-lua.c.
References lua_ext_key_tx, and lua_ext_key_tx_id.
Referenced by LuaExtensionsMatchSetup().

| const char lua_ext_key_det_ctx[] = "suricata:lua:det_ctx:ptr" |
Definition at line 97 of file util-lua.c.
Referenced by LuaStateGetDetCtx(), and LuaStateSetDetCtx().
| const char lua_ext_key_direction[] = "suricata:lua:direction" |
Definition at line 88 of file util-lua.c.
Referenced by LuaStateGetDirection(), and LuaStateSetDirection().
| const char lua_ext_key_file[] = "suricata:lua:file:ptr" |
Definition at line 95 of file util-lua.c.
Referenced by LuaStateGetFile(), and LuaStateSetFile().
| const char lua_ext_key_flow[] = "suricata:lua:flow:ptr" |
Definition at line 84 of file util-lua.c.
Referenced by LuaStateGetFlow(), and LuaStateSetFlow().
| const char lua_ext_key_flow_lock_hint[] = "suricata:lua:flow:lock_hint" |
Definition at line 86 of file util-lua.c.
Referenced by LuaStateGetFlow(), and LuaStateSetFlow().
| const char lua_ext_key_p[] = "suricata:lua:pkt:ptr" |
Definition at line 82 of file util-lua.c.
Referenced by LuaStateGetPacket(), and LuaStateSetPacket().
| const char lua_ext_key_pa[] = "suricata:lua:pkt:alert:ptr" |
Definition at line 91 of file util-lua.c.
Referenced by LuaStateGetPacketAlert(), and LuaStateSetPacketAlert().
| const char lua_ext_key_s[] = "suricata:lua:signature:ptr" |
Definition at line 93 of file util-lua.c.
Referenced by LuaStateGetSignature(), and LuaStateSetSignature().
| const char lua_ext_key_streaming_buffer[] = "suricata:lua:streaming_buffer:ptr" |
Definition at line 99 of file util-lua.c.
Referenced by LuaStateGetStreamingBuffer(), and LuaStateSetStreamingBuffer().
| const char lua_ext_key_tv[] = "suricata:lua:tv:ptr" |
Definition at line 76 of file util-lua.c.
Referenced by LuaStateGetThreadVars(), and LuaStateSetThreadVars().
| const char lua_ext_key_tx[] = "suricata:lua:tx:ptr" |
Definition at line 78 of file util-lua.c.
Referenced by LuaStateGetTX(), and LuaStateSetTX().
| const char lua_ext_key_tx_id[] = "suricata:lua:tx_id" |
Definition at line 80 of file util-lua.c.
Referenced by LuaStateGetTxId(), and LuaStateSetTX().