I am working on porting some code from Linux / macOS / FreeBSD. It does this: #ifdef FREEBSD if (ioctl(sock, SIOCGIFMAC, &ifr) == 0) #else if (ioctl(sock, SIOCGIFHWADDR, &ifr) == 0) #endif Do we have an equivalent to this ioctl? Thanks, nia