From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 27 10:13:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 056F516A4CE for ; Sat, 27 Mar 2004 10:13:06 -0800 (PST) Received: from venus.vincentjardin.net (lns-vlq-25-82-255-135-145.adsl.proxad.net [82.255.135.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id D69AF43D45 for ; Sat, 27 Mar 2004 10:13:04 -0800 (PST) (envelope-from jardin@venus.vincentjardin.net) Received: from venus.vincentjardin.net (localhost [127.0.0.1]) i2RIIJax010289; Sat, 27 Mar 2004 19:18:20 +0100 (CET) (envelope-from jardin@venus.vincentjardin.net) Received: from localhost (localhost [[UNIX: localhost]]) by venus.vincentjardin.net (8.12.9/8.12.9/Submit) id i2RIIIww010288; Sat, 27 Mar 2004 19:18:18 +0100 (CET) From: Vincent Jardin To: Bruce M Simpson , Dirk-Willem van Gulik Date: Sat, 27 Mar 2004 19:18:16 +0100 User-Agent: KMail/1.5.2 References: <39FE23FA-7F75-11D8-8F99-000A95CDA38A@webweaving.org> <20040327175645.GC90316@empiric.dek.spc.org> In-Reply-To: <20040327175645.GC90316@empiric.dek.spc.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200403271918.18032.vjardin@free.fr> cc: freebsd-hackers@freebsd.org Subject: Re: events when (de)associating or when cable is (un)plugged X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2004 18:13:06 -0000 See NetBSD mii source code too: They announce when a cable is plugged and unplugged on the routing socket. mii_physubr.c ... void mii_phy_update(struct mii_softc *sc, int cmd) { struct mii_data *mii = sc->mii_pdata; int announce, s; if (sc->mii_media_active != mii->mii_media_active || sc->mii_media_status != mii->mii_media_status || cmd == MII_MEDIACHG) { announce = mii_phy_statusmsg(sc); (*mii->mii_statchg)(sc->mii_dev.dv_parent); sc->mii_media_active = mii->mii_media_active; sc->mii_media_status = mii->mii_media_status; if (announce) { s = splnet(); rt_ifmsg(mii->mii_ifp); splx(s); } } } Regards, Vincent On Saturday 27 March 2004 18:56, Bruce M Simpson wrote: > On Sat, Mar 27, 2004 at 03:37:44AM +0100, Dirk-Willem van Gulik wrote: > > Suleiman, > > > > Thanks for all the help - I just hacked up the patch below and took > > http://green.homeunix.org/~green/linkwatcher.c for testing. I also > > had to add the LINKUP/DOWN in some non-mii using ethernet > > cards (as only miibus(4) seems to issue this event). > > Nice! I'll take a more indepth look at this when less pressed. Keep on > hacking. Would be nice to hook up with the WirelessLeiden folks too... > > Good stuff, > BMS > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"