]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
doc/userguide: improve SCStreamingBuffer example
authorAlexandre Iooss <erdnaxe@crans.org>
Fri, 28 Jul 2023 07:46:02 +0000 (09:46 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 7 Aug 2023 18:40:57 +0000 (20:40 +0200)
Add direction indication in SCStreamingBuffer usage example.
This adds documentation for the changes introduced by commit
5b1d8c7e94ef613107870d4d9d9cdde76d4c3438.

doc/userguide/lua/lua-functions.rst

index 9eff240f5314ea97fb15669792ac10053609bc77..92473d52c35ed01c604baadbb32b53fab59ffacf 100644 (file)
@@ -960,7 +960,13 @@ SCStreamingBuffer
 ::
 
   function log(args)
-      data = SCStreamingBuffer()
+      -- sb_ts and sb_tc are bools indicating the direction of the data
+      data, sb_open, sb_close, sb_ts, sb_tc = SCStreamingBuffer()
+      if sb_ts then
+        print("->")
+      else
+        print("<-")
+      end
       hex_dump(data)
   end