Re: Detecting link up

From: Michael Tokarev
Date: Wed May 18 2005 - 12:34:27 EST


Martin Zwickel wrote:
On Wed, 18 May 2005 11:35:12 +0100
Filipe Abrantes <fla@xxxxxxxxxxxxx> bubbled:

Hi all,

I need to detect when an interface (wired ethernet) has link up/down.
Is there a system signal which is sent when this happens? What is the
best way to this programatically?

mii-tool?

BTW, it might be a good idea to trigger some hotplug event on
interface up/down... or just send a netlink message. instead of
polling the interface. The same applies to removable media too
(CD or ZIP drive).

/mjt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/