LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Listener for Network Connection (https://www.linuxquestions.org/questions/linux-networking-3/listener-for-network-connection-688266/)

quotenschwarze 12-04-2008 06:22 AM

Listener for Network Connection
 
Hi there.

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

Any suggestions?

thanks

unSpawn 12-07-2008 06:40 AM

Something like (or build something based on) http://freshmeat.net/projects/ifplugd/?


All times are GMT -5. The time now is 05:11 PM.