Improved error message for failure to get h/ware address.

Put helpmsg on inverse bg.
This commit is contained in:
pdw
2002-10-25 10:18:50 +00:00
parent 36700cef92
commit 5b47e5be26
3 changed files with 4 additions and 0 deletions

View File

@@ -353,6 +353,7 @@ void packet_init() {
strncpy(ifr.ifr_name, options.interface, IFNAMSIZ);
ifr.ifr_hwaddr.sa_family = AF_UNSPEC;
if (ioctl(s, SIOCGIFHWADDR, &ifr) == -1) {
fprintf(stderr, "Error getting hardware address for interface: %s\n", options.interface);
perror("ioctl(SIOCGIFHWADDR)");
exit(1);
}