]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
doc/lua: Lua API name consistency
authorJeff Lucovsky <jeff@lucovsky.org>
Wed, 13 Jan 2021 18:39:21 +0000 (13:39 -0500)
committerShivani Bhardwaj <shivanib134@gmail.com>
Fri, 29 Jan 2021 10:00:40 +0000 (15:30 +0530)
This commit updates the documentation of the SCFlow* function names
available to Lua scripts.

Formerly, they used the prefix "Sc"; now they use "SC".

(cherry picked from commit 25e94831682c6eb641b416afef83d78de6f95729)

doc/userguide/lua/lua-functions.rst

index 60a29ebab526d8cff252a3e0d588a146d8c980a7..45a5d77f14b63bb6aa7214bbce72171b79ce5a5c 100644 (file)
@@ -870,39 +870,39 @@ index so in our case we need to use 0.
 ::
 
  function match(args)
-     a = ScFlowintGet(0);
+     a = SCFlowintGet(0);
      if a then
-         ScFlowintSet(0, a + 1)
+         SCFlowintSet(0, a + 1)
      else
-         ScFlowintSet(0, 1)
+         SCFlowintSet(0, 1)
      end 
 
-ScFlowintGet
+SCFlowintGet
 ~~~~~~~~~~~~
 
 Get the Flowint at index given by the parameter.
 
-ScFlowintSet
+SCFlowintSet
 ~~~~~~~~~~~~
 
 Set the Flowint at index given by the first parameter. The second parameter is the value.
 
-ScFlowintIncr
+SCFlowintIncr
 ~~~~~~~~~~~~~
 
 Increment Flowint at index given by the first parameter.
 
-ScFlowintDecr
+SCFlowintDecr
 ~~~~~~~~~~~~~
 
 Decrement Flowint at index given by the first parameter.
 
-ScFlowvarGet
+SCFlowvarGet
 ~~~~~~~~~~~~
 
 Get the Flowvar at index given by the parameter.
 
-ScFlowvarSet
+SCFlowvarSet
 ~~~~~~~~~~~~
 
 Set a Flowvar. First parameter is the index, second is the data
@@ -920,13 +920,13 @@ You can use it to set string
  end
  
  function match(args)
-     a = ScFlowvarGet(0);
+     a = SCFlowvarGet(0);
      if a then
          a = tostring(tonumber(a)+1)
-         ScFlowvarSet(0, a, #a)
+         SCFlowvarSet(0, a, #a)
      else
          a = tostring(1)
-         ScFlowvarSet(0, a, #a)
+         SCFlowvarSet(0, a, #a)
      end 
 
 Misc