Re: Detecting link up

Max Kellermann
2005-05-18T14:39:09Z

On 2005/05/18 13:40, Martin Zwickel <martin.zwickel@technotrend.de> wrote:
> On Wed, 18 May 2005 11:35:12 +0100
> Filipe Abrantes <fla@inescporto.pt> bubbled:
> > 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?

A thought on a related topic:

When a NIC driver knows that there is no link, why does it even try to
transmit a packet? It could return immediately with an error code,
without applications having to wait for a timeout.

(I had a quick peek at two drivers, and they don't check the link
status)

Max