diff --git a/mswin32/winfix.cc b/mswin32/winfix.cc index 9aad993f5..966170fce 100644 --- a/mswin32/winfix.cc +++ b/mswin32/winfix.cc @@ -81,7 +81,6 @@ extern NmapOps o; /* internal functions */ static void win_cleanup(void); -static char pcaplist[4096]; /* The code that has no preconditions to being called, so it can be executed before even Nmap options parsing (so o.debugging and the @@ -217,7 +216,7 @@ void win_init() __try #endif { - ULONG len = sizeof(pcaplist); + char *pcap_ver = NULL; o.have_pcap = true; if(o.debugging > 2) printf("Trying to initialize Windows pcap engine\n"); @@ -236,7 +235,9 @@ void win_init() init_npcap_dll_path(); - PacketGetAdapterNames(pcaplist, &len); + pcap_ver = PacketGetLibraryVersion(); + if (o.debugging) + printf("Packet.dll present, library version %s\n", pcap_ver); #ifdef _MSC_VER if(FAILED(__HrLoadAllImportsForDll("wpcap.dll"))) diff --git a/nping/winfix.cc b/nping/winfix.cc index d57b2ab18..eacfde02a 100644 --- a/nping/winfix.cc +++ b/nping/winfix.cc @@ -79,7 +79,6 @@ extern NpingOps o; /* internal functions */ static void win_cleanup(void); -static char pcaplist[4096]; /* The code that has no preconditions to being called, so it can be executed before even Nping options parsing (so o.getDebugging() and the @@ -215,7 +214,7 @@ void win_init() __try #endif { - ULONG len = sizeof(pcaplist); + char *pcap_ver = NULL; if(o.getDebugging() >= DBG_2) printf("Trying to initialize Windows pcap engine\n"); @@ -233,7 +232,9 @@ void win_init() init_npcap_dll_path(); - PacketGetAdapterNames(pcaplist, &len); + pcap_ver = PacketGetLibraryVersion(); + if (o.getDebugging() >= DBG_1) + printf("Packet.dll present, library version %s\n", pcap_ver); #ifdef _MSC_VER if(FAILED(__HrLoadAllImportsForDll("wpcap.dll")))