forked from osmocom/wireshark
Do not set buffer size for remote interfaces or when using default value.
Do not get link-layer for remote interfaces. svn path=/trunk/; revision=26683
This commit is contained in:
parent
c0dd6c4ca9
commit
32d411be1d
|
@ -401,6 +401,12 @@ sync_pipe_start(capture_options *capture_opts) {
|
|||
|
||||
#ifdef _WIN32
|
||||
argv = sync_pipe_add_arg(argv, &argc, "-B");
|
||||
#ifdef HAVE_PCAP_REMOTE
|
||||
if (capture_opts->src_type == CAPTURE_IFREMOTE)
|
||||
/* No buffer size when using remote interfaces */
|
||||
g_snprintf(buffer_size, ARGV_NUMBER_LEN, "%d", 1);
|
||||
else
|
||||
#endif
|
||||
g_snprintf(buffer_size, ARGV_NUMBER_LEN, "%d",capture_opts->buffer_size);
|
||||
argv = sync_pipe_add_arg(argv, &argc, buffer_size);
|
||||
#endif
|
||||
|
|
|
@ -1228,7 +1228,8 @@ capture_loop_open_input(capture_options *capture_opts, loop_data *ld,
|
|||
/* we've opened "iface" as a network device */
|
||||
#ifdef _WIN32
|
||||
/* try to set the capture buffer size */
|
||||
if (pcap_setbuff(ld->pcap_h, capture_opts->buffer_size * 1024 * 1024) != 0) {
|
||||
if (capture_opts->buffer_size > 1 &&
|
||||
pcap_setbuff(ld->pcap_h, capture_opts->buffer_size * 1024 * 1024) != 0) {
|
||||
sync_secondary_msg_str = g_strdup_printf(
|
||||
"The capture buffer size of %luMB seems to be too high for your machine,\n"
|
||||
"the default of 1MB will be used.\n"
|
||||
|
|
|
@ -290,12 +290,8 @@ set_link_type_list(GtkWidget *linktype_om, GtkWidget *entry)
|
|||
*/
|
||||
#ifdef HAVE_PCAP_REMOTE
|
||||
if (global_capture_opts.src_type == CAPTURE_IFREMOTE)
|
||||
if_list = get_remote_interface_list(global_capture_opts.remote_host,
|
||||
global_capture_opts.remote_port,
|
||||
global_capture_opts.auth_type,
|
||||
global_capture_opts.auth_username,
|
||||
global_capture_opts.auth_password,
|
||||
&err, NULL);
|
||||
/* Not able to get link-layer for remote interfaces */
|
||||
if_list = NULL;
|
||||
else
|
||||
if_list = capture_interface_list(&err, NULL);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue