16.3.19. Util
The suricata.util library provides utility functions for Lua
scripts.
16.3.19.1. Setup
The library must be loaded prior to use:
local util = require("suricata.util")
16.3.19.1.1. Functions
- thread_info()
Get information about the current thread.
- Returns:
Table containing thread information with the following fields:
id(number): Thread IDname(string): Thread namegroup_name(string): Thread group name
Example:
local util = require("suricata.util") local info = util.thread_info() print("Thread ID: " .. info.id) print("Thread Name: " .. info.name) print("Thread Group: " .. info.group_name)