Skip to content

Commit

Permalink
Increase the default buffer size to 2MB.
Browse files Browse the repository at this point in the history
svn path=/trunk/; revision=47920
  • Loading branch information
AndersBroman committed Feb 27, 2013
1 parent e1c43d0 commit 6cbcb0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion capture_opts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion capture_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6cbcb0d

Please sign in to comment.