44206c8a75c2362e00abd895a4a0c3b861ad6e2c
<n.bernard@worldonline.fr> Here is a patch which uses sysctl to get the hardware address. I tried it on FreeBSD 5.3 and OpenBSD 3.5. Note that I don't know how this code work on an non-ethernet interface (tried on some pseudo-interface and get an all-0 address, but...). I left the code in the get_addrs_ioctl fct despite the fact it uses sysctl because it was simpler. Oh yes, I used gotos, I found them more readable in this case than deeply imbricated ifs.
README for iftop $Id$ Read the INSTALL file, manual page and source code for more information. iftop must be run as root. KNOWN ISSUES RedHat 7.2: There is a bug in the version of ncurses distibuted with RedHat 7.2 that will cause iftop to segfault. The RPM in RedHat's Rawhide distribution fixes this. Slackware 8.1: You may need to upgrade your libpcap (by updating the tcpdump package) in order to compile iftop. FreeBSD 4.7: This version of FreeBSD lacks a proper gethostbyaddr_r function. You should choose an alternative name resolution technique using the --with-resolver=... option to configure. Solaris: On Solaris, iftop has to run in promiscuous mode in order to capture outgoing packets. iftop autoconfigures to run in promiscuous mode on Solaris, but will filter out non-broadcast packets which are not addressed to or from localhost. On Solaris, the -p option merely disables that filter. If you have some other sort of system that behaves like Solaris in needing promiscuous mode, you can pass --enable-default-promiscuous to configure to enable this behavior. Cf. http://www.tcpdump.org/lists/workers/2002/02/msg00010.html The version of curses distributed with Solaris may not be sufficient for iftop's needs. You will probably need ncurses or similar.
Description
Languages
C
75%
Makefile
16.5%
M4
4.5%
Roff
3.9%