From 99f5a903b94b01ed3eb1858031fd23e7b707f171 Mon Sep 17 00:00:00 2001 From: "Simson L. Garfinkel" Date: Sun, 16 Sep 2018 05:38:26 -0400 Subject: [PATCH] Update tcpflow.cpp packet_buffer_timeout is now a variable, although there is no way to set it. --- src/tcpflow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tcpflow.cpp b/src/tcpflow.cpp index dde6339a..6714fb3d 100644 --- a/src/tcpflow.cpp +++ b/src/tcpflow.cpp @@ -47,6 +47,8 @@ const char *program_name = 0; const char *tcpflow_droproot_username = 0; const char *tcpflow_chroot_dir = 0; +int packet_buffer_timeout = 10; + scanner_info::scanner_config be_config; // system configuration typedef struct { @@ -464,7 +466,7 @@ static int process_infile(tcpdemux &demux,const std::string &expression,const ch } /* make sure we can open the device */ - if ((pd = pcap_open_live(device, SNAPLEN, !opt_no_promisc, 1000, error)) == NULL){ + if ((pd = pcap_open_live(device, SNAPLEN, !opt_no_promisc, packet_buffer_timeout, error)) == NULL){ die("%s", error); } tcpflow_droproot(demux); // drop root if requested