Listener for Network Connection
Is there any possibility to trigger an event when a network interface goes down or up either by removing the network cable or entering the command "ifconfig ethX down"?
I am looking for a solution where I can register a C function somewhere which is invoked when that event occurs.
Currently I am solving the problem by polling which is too inefficient. Using Arch Linux 2.6.25