From bbc7bad1320d9f9f79685a94e22e668289c31882 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 12 Aug 2022 13:39:03 -1000 Subject: [PATCH] ETHER: Give platform appropriate advice when no pcap devices are available Windows needs Npcap/Winpcap, *nix systems usually need to run as root. --- sim_ether.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sim_ether.c b/sim_ether.c index 0e136b4b..121c1e6f 100644 --- a/sim_ether.c +++ b/sim_ether.c @@ -792,7 +792,11 @@ static const char* _eth_getname(int number, char* name, char *desc) if ((number < 0) || (count <= number)) return NULL; if (list[number].eth_api != ETH_API_PCAP) { +#if defined(_WIN32) + sim_printf ("Eth: Pcap capable device not found. Install Npcap or WinPcap 4.1.3 to use pcap networking\n"); +#else sim_printf ("Eth: Pcap capable device not found. You may need to run as root\n"); +#endif return NULL; }