Skip to content

Commit

Permalink
Update tcpflow.cpp
Browse files Browse the repository at this point in the history
packet_buffer_timeout is now a variable, although there is no way to set it.
  • Loading branch information
simsong authored Sep 16, 2018
1 parent 4b5d406 commit 99f5a90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tcpflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 99f5a90

Please sign in to comment.