You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
suricata/doc/userguide/lua/libs/util.rst

35 lines
735 B
ReStructuredText

Util
####
The ``suricata.util`` library provides utility functions for Lua
scripts.
Setup
*****
The library must be loaded prior to use::
local util = require("suricata.util")
Functions
=========
.. function:: thread_info()
Get information about the current thread.
:returns: Table containing thread information with the following fields:
- ``id`` (number): Thread ID
- ``name`` (string): Thread name
- ``group_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)