summaryrefslogtreecommitdiff
path: root/iftop.c
diff options
context:
space:
mode:
authorpdw <>2002-10-25 10:18:50 +0000
committerpdw <>2002-10-25 10:18:50 +0000
commit5b47e5be26305a0428c2a655209a8b2339e8fa59 (patch)
tree83f4330ca177cbe937e380090782d7a405edc8d2 /iftop.c
parent36700cef9252382d139a96bfda9a9e0f8e1b5ef1 (diff)
downloadiftop-5b47e5be26305a0428c2a655209a8b2339e8fa59.zip
Improved error message for failure to get h/ware address.
Put helpmsg on inverse bg.
Diffstat (limited to 'iftop.c')
-rw-r--r--iftop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/iftop.c b/iftop.c
index 232eaf9..19d24c4 100644
--- a/iftop.c
+++ b/iftop.c
@@ -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);
}