The ioctl mechanism of getting the ipaddress of an interface doesn't work on FreeBSD. This PR uses netifaces instead.