Re: Detecting link up

From: Max Kellermann
Date: Wed May 18 2005 - 09:47:09 EST


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

-
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/