November 18, 2013

C code to detect link connected/disconnected using RTNETLINK

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

1 comment:

  1. includes seem to be gobbled up...

    ReplyDelete