1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 04:09:01 +00:00

Factor out a function that reports the failure to open an Ethernet

device and exits. On Windows, print a hint about "net start npf" to
start the NPF service.
This commit is contained in:
david
2010-01-15 00:37:39 +00:00
parent f52b57212b
commit c73b250615
8 changed files with 33 additions and 8 deletions

View File

@@ -1616,7 +1616,7 @@ void UltraScanInfo::Init(vector<Target *> &Targets, struct scan_lists *pts, styp
/* We'll send ethernet packets with dnet */
ethsd = eth_open_cached(Targets[0]->deviceName());
if (ethsd == NULL)
fatal("dnet: Failed to open device %s", Targets[0]->deviceName());
fatal_eth_open_failure(__func__, Targets[0]->deviceName());
rawsd = -1;
} else {
/* Initialize a raw socket */