Paul Warren(pdw@ex-parrot.com)@2005.05.02 10:40:53 +0100 wrote:
we need to figure out how to get the hardware address on FreeBSD,
Hi,
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.
Best Regards, Nicolas