Improved error message for failure to get h/ware address.
Put helpmsg on inverse bg.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -8,6 +8,7 @@ On-the-fly filter code changes
|
|||||||
Shell escape
|
Shell escape
|
||||||
Alternative resolver back-ends
|
Alternative resolver back-ends
|
||||||
Improved totals display
|
Improved totals display
|
||||||
|
Added regexp based screen filtering
|
||||||
|
|
||||||
0.9 22/10/02
|
0.9 22/10/02
|
||||||
|
|
||||||
|
|||||||
1
iftop.c
1
iftop.c
@@ -353,6 +353,7 @@ void packet_init() {
|
|||||||
strncpy(ifr.ifr_name, options.interface, IFNAMSIZ);
|
strncpy(ifr.ifr_name, options.interface, IFNAMSIZ);
|
||||||
ifr.ifr_hwaddr.sa_family = AF_UNSPEC;
|
ifr.ifr_hwaddr.sa_family = AF_UNSPEC;
|
||||||
if (ioctl(s, SIOCGIFHWADDR, &ifr) == -1) {
|
if (ioctl(s, SIOCGIFHWADDR, &ifr) == -1) {
|
||||||
|
fprintf(stderr, "Error getting hardware address for interface: %s\n", options.interface);
|
||||||
perror("ioctl(SIOCGIFHWADDR)");
|
perror("ioctl(SIOCGIFHWADDR)");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user