Skip to content
  • pdw's avatar
    Patch to get hardware address on FreeBSD and OpenBSD from Nicolas Bernard · 44206c8a
    pdw authored
    <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.
    44206c8a