RTNETLINK documentation is not very good. Here is an example of how to detect interface disconnected/disconnected using it. If you want to detect interface up and down, just check the flag IFF_UP instead of IFF_RUNNING.
https://gist.github.com/tiebingzhang/aafc2953b430d5586bd1135cad85100f
includes seem to be gobbled up...
ReplyDelete