Allow libpcap buffer size to be set manually.

This commit is contained in:
Kris Nielander 2015-08-09 22:08:46 +02:00
parent 4c2aa804e1
commit f5429ee794
6 changed files with 62 additions and 2 deletions

View file

@ -122,6 +122,7 @@ vector<string> params;
set<string> requested_plugins;
char* proc_status_file = 0;
int snaplen = 0; // this gets set from the scripting-layer's value
int bufsize = 0;
OpaqueType* md5_type = 0;
OpaqueType* sha1_type = 0;
@ -990,6 +991,7 @@ int main(int argc, char** argv)
}
snaplen = internal_val("snaplen")->AsCount();
bufsize = internal_val("bufsize")->AsCount() * 1024 * 1024; // Size in Mbytes
if ( dns_type != DNS_PRIME )
net_init(interfaces, read_files, writefile, do_watchdog);