summaryrefslogtreecommitdiffstats
path: root/src/input/fpcap.lua
diff options
context:
space:
mode:
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)