[quagga-dev 1491] Re: link detection on NetBSD

Andre Oppermann opi at nrg4u.com
Mon Sep 13 21:12:44 BST 2004


Paul Jakma wrote:
> 
> On Mon, 13 Sep 2004, Andre Oppermann wrote:
> 
> > On BSD IFF_RUNNING is used inside the kernel as Greg Troxel already
> > said in another email.
> 
> Ok.
> 
> Then the question is which way to abstract things.
> 
> > All BSDs have agreed that
> > ifm_data.ifi_link_state is they way to do it there.
> 
> Which header file is it defined in? (even better, got a cvsweb link?)

net/if.h


http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/if.h?rev=1.92&content-type=text/x-cvsweb-markup

> Neither Linux (which often does it's own thing), nor Solaris (which
> is very BSD influenced) have this ifi_link_state member. So, it's not
> quite a standard. Linux has an MII abstraction, which, while not a
> Unix API standard, is a standard of sorts.

At least in FreeBSD I implemented this at the MII level.  For every
change in link state as seen on the PHY we generate a rtmessage.

Note that at the moment this is only implemented for ethernet type
interfaces.  All others (p2p links, etc.) will report LINK_STATE_UNKNOWN
and never any link state changes.

-- 
Andre



More information about the Quagga-dev mailing list