1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-04-24 19:34:05 +00:00

SCP: Updated to current.

This commit is contained in:
Richard Cornwell
2020-04-13 22:25:15 -04:00
parent 9a63bc521e
commit 188b52454b
7 changed files with 348 additions and 85 deletions

View File

@@ -2478,10 +2478,17 @@ const char *eth_version (void)
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());
strlcpy(version, pcap_lib_version(), sizeof(version));
if (memcmp(pcap_lib_version(), "Npcap", 5) == 0) {
char maj_min[CBUFSIZE];
char *c = version;
while (*c && !isdigit (*c))
++c;
get_glyph (c, maj_min, ',');
if (strcmp ("0.9990", maj_min) < 0)
snprintf(version, sizeof(version), "Unsupported - %s", pcap_lib_version());
}
}
return version;
#else