aboutsummaryrefslogtreecommitdiffstats
path: root/version_info.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2007-09-15 00:18:17 +0000
committerGerald Combs <gerald@wireshark.org>2007-09-15 00:18:17 +0000
commitd2d4fcd903f3c675d85a4d32bff280f4a5bc8e6e (patch)
tree88cf3b0551436062acb26b33f60dd27417944d81 /version_info.c
parentd0c2725672061a344852cc3f7473e36826522638 (diff)
Add routines under Windows to check if npf.sys is running, and to
fetch the major OS version. If we're running Windows >= 6 (Vista) _and_ npf.sys isn't running, warn the user in Wireshark and TShark. Add a recent prefs item to disable the warning in Wireshark. svn path=/trunk/; revision=22877
Diffstat (limited to 'version_info.c')
-rw-r--r--version_info.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/version_info.c b/version_info.c
index 4d74730483..4a45965e01 100644
--- a/version_info.c
+++ b/version_info.c
@@ -506,3 +506,33 @@ get_copyright_info(void)
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
}
+
+#if defined(_WIN32)
+/*
+ * Get the major OS version.
+ */
+/* XXX - Should this return the minor version as well, e.g. 0x00050002? */
+guint32
+get_os_major_version()
+{
+ OSVERSIONINFO info;
+ info.dwOSVersionInfoSize = sizeof info;
+ if (GetVersionEx(&info)) {
+ return info.dwMajorVersion;
+ }
+ return 0;
+}
+#endif
+
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: tabs
+ * End:
+ *
+ * ex: set shiftwidth=8 tabstop=8 noexpandtab
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */