I was wondering if linux has some sort of interface to detect ethernet port state changes via /sys
or some other way that is event driven.
What I mean by state changes is DISCONNECTED / 10mbit / 100mbit / etc.
We could just pool the status of the port every X ms, but I was hoping on using inotify to watch for something that changes on the filesystem and trigger our action based on that.
We are actually most interested in changes from 10mbit to 1gbit. So having something that only triggers on connected / disconnected would not be sufficient.
Any ideas?