win32 - support for npcap which is a successor to winpcap. winpcap is still supported.

This commit is contained in:
Kelvin Sherlock 2018-12-30 15:49:29 -05:00
parent 0b03aad15d
commit 324c9a191f

View File

@ -138,7 +138,21 @@ static void EthernetPcapFreeLibrary(void)
static BOOL EthernetPcapLoadLibrary(void) static BOOL EthernetPcapLoadLibrary(void)
{ {
/*
* npcap is c:\System32\Npcap\wpcap.dll
* winpcap is c:\System32\wpcap.dll
*
*/
if (!pcap_library) { if (!pcap_library) {
/* This inserts c:\System32\Npcap\ into the search path. */
char buffer[512];
unsigned length;
length = GetSystemDirectory(buffer, sizeof(buffer) - sizeof("\\Npcap"));
if (length) {
strcat(buffer + length, "\\Npcap");
SetDllDirectory(buffer);
}
pcap_library = LoadLibrary(TEXT("wpcap.dll")); pcap_library = LoadLibrary(TEXT("wpcap.dll"));
if (!pcap_library) { if (!pcap_library) {