mirror of
https://github.com/simh/simh.git
synced 2026-02-26 16:54:22 +00:00
ETHER: Report Windows Npcap as unsupported in the Ethernet version string
Current versions of Npcap can talk directly to the host system's network stack. This defect was just discovered. Fortunately, WinPcap 4.1.3 works as needed and is still functional on Windows 10. As discussed in nmap/nmap#1929 and nmap/nmap#1343
This commit is contained in:
12
sim_ether.c
12
sim_ether.c
@@ -1077,7 +1077,7 @@ static const char* lib_name =
|
||||
|
||||
static char no_pcap[PCAP_ERRBUF_SIZE] =
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
"wpcap.dll failed to load, install Npcap or WinPcap 4.x to use pcap networking";
|
||||
"wpcap.dll failed to load, install Npcap or WinPcap 4.1.3 to use pcap networking";
|
||||
#elif defined(__APPLE__)
|
||||
"/usr/lib/libpcap.A.dylib failed to load, install libpcap to use pcap networking";
|
||||
#else
|
||||
@@ -2474,7 +2474,15 @@ return SCPE_OK;
|
||||
const char *eth_version (void)
|
||||
{
|
||||
#if defined(HAVE_PCAP_NETWORK)
|
||||
return pcap_lib_version();
|
||||
static char version[256];
|
||||
|
||||
if (!version[0]) {
|
||||
if (memcmp(pcap_lib_version(), "Npcap", 5))
|
||||
strlcpy(version, pcap_lib_version(), sizeof(version));
|
||||
else
|
||||
snprintf(version, sizeof(version), "Unsupported - %s", pcap_lib_version());
|
||||
}
|
||||
return version;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user