Re: Detecting link up

Coywolf Qi Hunt
2005-05-18T15:10:55Z

On 5/18/05, Max Kellermann <max@duempel.org> wrote:
> 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)

An NIC driver doesn't know if there's other links or not. One NIC
driver is for one type of NIC. And there's also interface lo.
--
Coywolf Qi Hunt