Increase the default buffer size to 2MB.

svn path=/trunk/; revision=47920
This commit is contained in:
Anders Broman 2013-02-27 20:38:43 +00:00
parent e1c43d0095
commit 6cbcb0d94d
2 changed files with 3 additions and 2 deletions

View File

@ -70,7 +70,7 @@ capture_opts_init(capture_options *capture_opts, void *cf)
capture_opts->default_options.linktype = -1;
capture_opts->default_options.promisc_mode = TRUE;
#if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
capture_opts->default_options.buffer_size = 1; /* 1 MB */
capture_opts->default_options.buffer_size = 2; /* 2 MB, In pcap-linux.c: by default request 2M for the ring buffer */
#endif
capture_opts->default_options.monitor_mode = FALSE;
#ifdef HAVE_PCAP_REMOTE

View File

@ -461,7 +461,8 @@ sync_pipe_start(capture_options *capture_opts) {
}
#if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
if (interface_opts.buffer_size != 1) {
/* In pcap-linux.c: by default request 2M for the ring buffer */
if (interface_opts.buffer_size != 2) {
argv = sync_pipe_add_arg(argv, &argc, "-B");
g_snprintf(buffer_size, ARGV_NUMBER_LEN, "%d", interface_opts.buffer_size);
argv = sync_pipe_add_arg(argv, &argc, buffer_size);