I know that I can poll the link state via the SIOCETHTOOL/ETHTOOL_GLINK ioctl but this would require to endlessly request the state. The same goes for parsing /var/log/messages. So my questin is, is there any way under Linux to wait on a state change of the ethernet cable from userspace?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
How about
(There is also |
|||||||||
|
|
The solution of sr_ is better than mine, but you could use those ioctls with |
|||
|
|
