summaryrefslogtreecommitdiff
path: root/gtk/main_welcome.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-09-16 19:23:15 +0000
committerGerald Combs <gerald@wireshark.org>2009-09-16 19:23:15 +0000
commit668723356a963a3454d4d81490804fe760588d59 (patch)
tree3f80d99a261326884cb63855c79d0fb6ce3c7415 /gtk/main_welcome.c
parent7afe46bf861a8c21fe8f7c33ed92cf16cfde483e (diff)
downloadwireshark-668723356a963a3454d4d81490804fe760588d59.tar.gz
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. svn path=/trunk/; revision=29948
Diffstat (limited to 'gtk/main_welcome.c')
-rw-r--r--gtk/main_welcome.c25
1 files changed, 24 insertions, 1 deletions
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);