}
}
-static void
-check_capture_privs(void) {
-#ifdef _WIN32
- load_wpcap();
- /* Warn the user if npf.sys isn't loaded. */
- if (!npf_sys_is_running() && get_windows_major_version() >= 6) {
- fprintf(stderr, "The NPF driver isn't running. You may have trouble "
- "capturing or\nlisting interfaces.\n");
- }
-#endif
-}
-
static void
show_version(GString *comp_info_str, GString *runtime_info_str)
{
static const char optstring[] = OPTSTRING;
+#ifdef _WIN32
+ /* Load wpcap if possible. Do this before collecting the run-time version information */
+ load_wpcap();
+
+ /* Warn the user if npf.sys isn't loaded. */
+ if (!npf_sys_is_running() && get_windows_major_version() >= 6) {
+ fprintf(stderr, "The NPF driver isn't running. You may have trouble "
+ "capturing or\nlisting interfaces.\n");
+ }
+#endif
+
/* Assemble the compile-time version information string */
comp_info_str = g_string_new("Compiled ");
get_compiled_version_info(comp_info_str, NULL, epan_get_compiled_version_info);
g_free(dp_path);
}
- check_capture_privs();
-
cap_file_init(&cfile);
/* Print format defaults to this. */