diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2017-03-27 16:16:48 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-03-28 05:02:31 +0000 |
commit | 2141eafa64fd080b1aeb0aa2259c57de076c8836 (patch) | |
tree | 1bab6287e0462203123fd994964cec81c3f0bbf4 /ui/gtk | |
parent | 3a3d6edb042b71cce70898cd2ad0ce787267dcf3 (diff) | |
download | wireshark-2141eafa64fd080b1aeb0aa2259c57de076c8836.tar.gz |
GTK: the maximum packet size is WTAP_MAX_PACKET_SIZE, not 65535
Change-Id: I4b78a3bff7ed158eef2008e52ec8abc9f7a8d1d3
Reviewed-on: https://code.wireshark.org/review/20748
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk')
-rw-r--r-- | ui/gtk/capture_dlg.c | 6 | ||||
-rw-r--r-- | ui/gtk/file_import_dlg.c | 2 | ||||
-rw-r--r-- | ui/gtk/prefs_capture.c | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c index 5001955949..d5a96480a8 100644 --- a/ui/gtk/capture_dlg.c +++ b/ui/gtk/capture_dlg.c @@ -37,6 +37,8 @@ #include <wsutil/filesystem.h> #include <wsutil/strtoi.h> +#include <wiretap/wtap.h> + #include "ui/capture.h" #include "caputils/capture_ifinfo.h" #include "caputils/capture-pcap-util.h" @@ -2646,7 +2648,7 @@ void options_interface_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColum device.monitor_mode_supported = FALSE; #endif device.has_snaplen = FALSE; - device.snaplen = 65535; + device.snaplen = WTAP_MAX_PACKET_SIZE; device.cfilter = NULL; #ifdef CAN_SET_CAPTURE_BUFFER_SIZE device.buffer = DEFAULT_CAPTURE_BUFFER_SIZE; @@ -2971,7 +2973,7 @@ void options_interface_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColum gtk_box_pack_start (GTK_BOX(buffer_size_hb), buffer_size_lb, FALSE, FALSE, 0); buffer_size_adj = (GtkAdjustment *) gtk_adjustment_new((gfloat) device.buffer, - 1, 65535, 1.0, 10.0, 0.0); + 1, WTAP_MAX_PACKET_SIZE, 1.0, 10.0, 0.0); buffer_size_sb = gtk_spin_button_new (buffer_size_adj, 0, 0); gtk_spin_button_set_value(GTK_SPIN_BUTTON (buffer_size_sb), (gfloat) device.buffer); gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (buffer_size_sb), TRUE); diff --git a/ui/gtk/file_import_dlg.c b/ui/gtk/file_import_dlg.c index 09e319126a..19ae0dbd90 100644 --- a/ui/gtk/file_import_dlg.c +++ b/ui/gtk/file_import_dlg.c @@ -1154,7 +1154,7 @@ file_import_dlg_new(void) framelen_te = gtk_entry_new(); gtk_widget_set_tooltip_text(framelen_te, - "The maximum size of the frames to write to the import capture file (max 65535)"); + "The maximum size of the frames to write to the import capture file (max 262144)"); gtk_box_pack_start(GTK_BOX(framelen_hb), framelen_te, FALSE, FALSE, 0); g_object_set_data(G_OBJECT(import_frm), IMPORT_FRAME_LENGTH_TE_KEY, framelen_te); diff --git a/ui/gtk/prefs_capture.c b/ui/gtk/prefs_capture.c index 5bd5ee4e6c..d12499726c 100644 --- a/ui/gtk/prefs_capture.c +++ b/ui/gtk/prefs_capture.c @@ -677,7 +677,7 @@ ifopts_edit_cb(GtkWidget *w, gpointer data _U_) #ifdef CAN_SET_CAPTURE_BUFFER_SIZE renderer = gtk_cell_renderer_spin_new (); - buffer_size_adj = (GtkAdjustment *) gtk_adjustment_new(DEFAULT_CAPTURE_BUFFER_SIZE, 1, 65535, 1.0, 10.0, 0.0); + buffer_size_adj = (GtkAdjustment *) gtk_adjustment_new(DEFAULT_CAPTURE_BUFFER_SIZE, 1, WTAP_MAX_PACKET_SIZE, 1.0, 10.0, 0.0); g_object_set(G_OBJECT(renderer), "adjustment", buffer_size_adj, NULL); column = gtk_tree_view_column_new_with_attributes ("Default buffer size (MiB)", renderer, "text", BUF_COLUMN, @@ -834,7 +834,7 @@ ifopts_edit_cb(GtkWidget *w, gpointer data _U_) ws_gtk_grid_attach_defaults(GTK_GRID(main_grid), if_buffersize_lb, 0, row, 1, 1); gtk_misc_set_alignment(GTK_MISC(if_buffersize_lb), 1.0f, 0.5f); gtk_widget_show(if_buffersize_lb); - buffer_size_adj = (GtkAdjustment *) gtk_adjustment_new(DEFAULT_CAPTURE_BUFFER_SIZE, 1, 65535, 1.0, 10.0, 0.0); + buffer_size_adj = (GtkAdjustment *) gtk_adjustment_new(DEFAULT_CAPTURE_BUFFER_SIZE, 1, WTAP_MAX_PACKET_SIZE, 1.0, 10.0, 0.0); if_buffersize_cb = gtk_spin_button_new (buffer_size_adj, 0, 0); g_signal_connect(if_buffersize_cb, "value-changed", G_CALLBACK(ifopts_edit_buffersize_changed_cb), cur_list); @@ -852,7 +852,7 @@ ifopts_edit_cb(GtkWidget *w, gpointer data _U_) cur_list); ws_gtk_grid_attach_defaults(GTK_GRID(main_grid), if_snaplen_tg, 2, row, 1, 1); gtk_widget_show(if_snaplen_tg); - snaplen_adj = (GtkAdjustment *) gtk_adjustment_new(65535, 1, 65535, 1.0, 10.0, 0.0); + snaplen_adj = (GtkAdjustment *) gtk_adjustment_new(WTAP_MAX_PACKET_SIZE, 1, WTAP_MAX_PACKET_SIZE, 1.0, 10.0, 0.0); if_snaplen_cb = gtk_spin_button_new (snaplen_adj, 0, 0); g_signal_connect(if_snaplen_cb, "value-changed", G_CALLBACK(ifopts_edit_snaplen_changed_cb), cur_list); |