aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-16 19:23:15 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-16 19:23:15 +0000
commit7da26c0ae83f65a44e487d30ed06eff09fa32a75 (patch)
tree3f80d99a261326884cb63855c79d0fb6ce3c7415 /gtk
parentddd289ee5736ddcd18c7521633b7d978a2784867 (diff)
Check for TCP Chimney offloading as described at
http://support.microsoft.com/kb/912222. Print a warning on the welcome page if it's present and enabled. This hasn't yet been tested on a chimney-enabled machine, but it should work. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29948 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk')
-rw-r--r--gtk/help_dlg.c3
-rw-r--r--gtk/help_dlg.h1
-rw-r--r--gtk/main_welcome.c25
3 files changed, 28 insertions, 1 deletions
diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c
index eb99385270..2400e41b8d 100644
--- a/gtk/help_dlg.c
+++ b/gtk/help_dlg.c
@@ -170,6 +170,9 @@ topic_online_url(topic_action_e action)
case(ONLINEPAGE_SECURITY):
return "http://wiki.wireshark.org/Security";
break;
+ case(ONLINEPAGE_CHIMNEY):
+ return "http://wiki.wireshark.org/CaptureSetup/Offloading#chimney";
+ break;
default:
return NULL;
}
diff --git a/gtk/help_dlg.h b/gtk/help_dlg.h
index d6d2f9f6b7..bcb7d8238a 100644
--- a/gtk/help_dlg.h
+++ b/gtk/help_dlg.h
@@ -44,6 +44,7 @@ typedef enum {
ONLINEPAGE_NETWORK_MEDIA,
ONLINEPAGE_SAMPLE_CAPTURES,
ONLINEPAGE_SECURITY,
+ ONLINEPAGE_CHIMNEY,
/* local manual pages */
LOCALPAGE_MAN_WIRESHARK = 100,
diff --git a/gtk/main_welcome.c b/gtk/main_welcome.c
index 4a8523141c..2a9663c771 100644
--- a/gtk/main_welcome.c
+++ b/gtk/main_welcome.c
@@ -58,6 +58,11 @@
#include "../image/wssplash-dev.xpm"
#include "../version_info.h"
+#ifdef _WIN32
+#include <tchar.h>
+#include <windows.h>
+#endif
+
#ifdef HAVE_AIRPCAP
#include "airpcap.h"
#include "airpcap_loader.h"
@@ -708,7 +713,10 @@ welcome_new(void)
#endif /* HAVE_LIBPCAP */
GtkWidget *file_child_box;
gchar *label_text;
-
+#ifdef _WIN32
+ LONG reg_ret;
+ DWORD chimney_enabled = 0;
+#endif
/* prepare colors */
/* header bar background color */
@@ -812,6 +820,21 @@ welcome_new(void)
G_CALLBACK(capture_prep_cb), NULL);
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
+#ifdef _WIN32
+ /* Check for chimney offloading */
+ reg_ret = RegQueryValueEx(HKEY_LOCAL_MACHINE,
+ _T("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\EnableTCPChimney"),
+ NULL, NULL, (LPBYTE) &chimney_enabled, NULL);
+ if (reg_ret == ERROR_SUCCESS && chimney_enabled) {
+ item_hb = welcome_button(WIRESHARK_STOCK_WIKI,
+ "Offloading Detected",
+ "TCP Chimney offloading is enabled. You \nmight not capture much data.",
+ topic_online_url(ONLINEPAGE_CHIMNEY),
+ G_CALLBACK(topic_menu_cb), GINT_TO_POINTER(ONLINEPAGE_CHIMNEY));
+ gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
+ }
+#endif /* _WIN32 */
+
/* capture help topic */
topic_vb = welcome_topic_new("Capture Help", &topic_to_fill);
gtk_box_pack_start(GTK_BOX(column_vb), topic_vb, TRUE, TRUE, 0);