Files
iftop/addrs_ioctl.c
pdw 44206c8a75 Patch to get hardware address on FreeBSD and OpenBSD from Nicolas Bernard
<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.
2005-05-03 20:14:53 +00:00

3.4 KiB