summaryrefslogtreecommitdiffstats
path: root/src/input/fpcap.lua
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-17 07:11:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-17 07:11:12 +0000
commitb72837827d9290c7ec50b9e4b9e1a0f194ddccca (patch)
tree8df663325413d0f92086d740638555de6b779df7 /src/input/fpcap.lua
parentAdding upstream version 1.1.0+debian. (diff)
downloaddnsjit-be78963741e5f69dc1ef588ab7370152b98ef8bc.tar.xz
dnsjit-be78963741e5f69dc1ef588ab7370152b98ef8bc.zip
Adding upstream version 1.2.1.upstream/1.2.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/input/fpcap.lua')
-rw-r--r--src/input/fpcap.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/input/fpcap.lua b/src/input/fpcap.lua
index 2fc2906..b50fc11 100644
--- a/src/input/fpcap.lua
+++ b/src/input/fpcap.lua
@@ -100,6 +100,15 @@ function Fpcap:produce()
return C.input_fpcap_producer(self.obj), self.obj
end
+-- Use
+-- .B posix_fadvise()
+-- to indicate sequential reading (if supported), may increase performance.
+-- MUST be called before
+-- .BR open() .
+function Fpcap:fadvise_sequential()
+ self.obj.use_fadvise = 1
+end
+
-- Open a PCAP file for processing and read the PCAP header.
-- Returns 0 on success.
function Fpcap:open(file)