Skip to content

Commit

Permalink
ETHER: Enhance version info and location of Npcap
Browse files Browse the repository at this point in the history
  • Loading branch information
markpizz committed Apr 26, 2023
1 parent 8e5368a commit ed5e47a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
5 changes: 3 additions & 2 deletions 3B2/3b2_ni.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,10 @@ t_stat ni_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr)
"+sim> ATTACH %D en0\n"
"1 Dependencies\n"
#if defined(_WIN32)
" The WinPcap package must be installed in order to enable\n"
" communication with other computers on the local LAN.\n"
" The NPcap or WinPcap package must be installed in order to enable\n"
" communication with the host system or other computers on the local LAN.\n"
"\n"
" The NPcap package is available from https://github.com/nmap/npcap\n"
" The WinPcap package is available from http://www.winpcap.org/\n"
#else
" To build simulators with the ability to communicate to other computers\n"
Expand Down
2 changes: 1 addition & 1 deletion PDP11/pdp11_xq.c
Original file line number Diff line number Diff line change
Expand Up @@ -3379,7 +3379,7 @@ const char helpString[] =
"1 Dependencies\n"
#if defined(_WIN32)
" The NPcap or WinPcap package must be installed in order to enable\n"
" communication with other computers on the local LAN.\n"
" communication with the host system or other computers on the local LAN.\n"
"\n"
" The NPcap package is available from https://github.com/nmap/npcap\n"
" The WinPcap package is available from http://www.winpcap.org/\n"
Expand Down
2 changes: 1 addition & 1 deletion PDP11/pdp11_xu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,7 @@ const char helpString[] =
"1 Dependencies\n"
#if defined(_WIN32)
" The NPcap or WinPcap package must be installed in order to enable\n"
" communication with other computers on the local LAN.\n"
" communication with the host system or other computers on the local LAN.\n"
"\n"
" The NPcap package is available from https://github.com/nmap/npcap\n"
" The WinPcap package is available from http://www.winpcap.org/\n"
Expand Down
8 changes: 6 additions & 2 deletions VAX/vax_nar.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@ return SCPE_OK;
t_stat nar_setmac (UNIT* uptr, int32 val, CONST char* cptr, void* desc)
{
t_stat status;
DEVICE *dptr = find_dev ("XS");

if (!cptr)
return SCPE_IERR;
status = eth_mac_scan (&nar_mac, cptr);
if (uptr->flags & UNIT_ATT)
return sim_messagef (SCPE_ALATT, "Can't change MAC address after %s is attached\n", dptr->name);
status = eth_mac_scan_ex (&nar_mac, cptr, uptr);
if (status != SCPE_OK)
return status;
nar_reset (&nar_dev);
Expand Down Expand Up @@ -136,7 +139,8 @@ t_stat r;

if (!nar_init) { /* set initial MAC */
nar_init = TRUE;
r = eth_mac_scan (&nar_mac, "08:00:2B:00:00:00/24");
/* Set an initial MAC address in the DEC range */
r = nar_setmac (dptr->units, 0, "08:00:2B:00:00:00/24", NULL);
if (r != SCPE_OK)
return r;
}
Expand Down
5 changes: 3 additions & 2 deletions sim_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
Compaq Tru64 Unix ??
VMS Alpha/Itanium VMS only, needs VMS libpcap
WinPcap is no longer developed or supported by was available from:
WinPcap is no longer developed or supported but was available from:
http://winpcap.polito.it/
Npcap is a complete replacement for systems running Windows7 and later
and is available from:
Expand Down Expand Up @@ -903,6 +903,7 @@ t_stat eth_show (FILE* st, UNIT* uptr, int32 val, CONST void* desc)
ETH_LIST list[ETH_MAX_DEVICE];
int number;

fprintf(st, "Ethernet Packet Info: %s\n", eth_version());
number = eth_devices(ETH_MAX_DEVICE, list, FALSE);
fprintf(st, "ETH devices:\n");
if (number == -1)
Expand Down Expand Up @@ -2746,7 +2747,7 @@ t_stat eth_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const cha
{
fprintf (st, "%s attach help\n\n", dptr->name);
fprintf (st, " sim> SHOW ETHERNET\n");
fprintf (st, " libpcap version 1.0.0\n");
fprintf (st, " Ethernet Packet Info: NAT, TAP, VDE, UDP, PCAP: libpcap version 1.10.1 (with TPACKET_V3)\n");
fprintf (st, " ETH devices:\n");
fprintf (st, " eth0 en0 (No description available)\n");
#if defined(HAVE_TAP_NETWORK)
Expand Down

0 comments on commit ed5e47a

Please sign in to comment.