doc/luaxform: Remove init function from example

Issue: 8035

The `luaxform` transform doesn't support the `init` function. This
commit removes that from the example and clarifies how functions in the
Lua script are used.

(cherry picked from commit b02d9bb4f1)
pull/14323/head
Jeff Lucovsky 6 months ago committed by Victor Julien
parent 2cfc2f4dc0
commit 9fa7756ba7

@ -295,6 +295,8 @@ to a buffer.
Lua scripts that are used for transformations *must* contain a function
named ``transform``.
Lua scripts can have other functions; Suricata only invokes the ``transform`` function.
Lua transforms can be passed optional arguments -- see the examples below -- but they
are not required to do so. Arguments are comma-separated.
@ -341,11 +343,6 @@ the buffer.
.. code-block:: lua
function init (args)
local needs = {}
return needs
end
local function get_value(item, key)
if string.find(item, key) then
local _, value = string.match(item, "(%a+)%s*(%d*)")

Loading…
Cancel
Save