Closed jwbensley closed 7 years ago
I have in-lined this in Beta 0.13 rather than add a new function as it's just two lines of code this way rather than defining a new socket et al. to run the ioctl()
.
// Is this interface even up?
if (ioctl(test_interface->SOCKET_FD, SIOCGIFFLAGS, &ifreq) == -1) break;
if (!(ifreq.ifr_flags & IFF_UP && ifreq.ifr_flags & IFF_RUNNING)) break;
Evalute if this code can be pulled into Etherate, submitted by Christophe via email, to check if an interface is connected: