From owner-freebsd-hackers Sat Oct 20 12:18:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id A4F2D37B405; Sat, 20 Oct 2001 12:18:25 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA80757; Sat, 20 Oct 2001 13:23:18 -0700 (PDT) Date: Sat, 20 Oct 2001 13:23:16 -0700 (PDT) From: Julian Elischer To: Archie Cobbs Cc: Milon Papezik , "'hackers@freebsd.org'" , "'net@freebsd.org'" Subject: Re: netgraph one2many question In-Reply-To: <200110201751.f9KHp1584570@arch20m.dellroad.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bill Paul has written a specific NETGRAPH FEC module... he has failover as well.. (it is only PART a netgraph module as it doesn;t use the netgraph hooks to talk to teh ethernet driver.. (strange)) I suggest you look for it in the archives or on http://www.freebsd.org/~wpaul/ On Sat, 20 Oct 2001, Archie Cobbs wrote: > Milon Papezik writes: > > I would like to extend ng_one2many module to include > > automatic link failure datection, failover and FEC functionality. > > > > My question is: > > Are interface nodes able to send upstream notification > > that their state has changed or do I have to poll their status periodically > > as it is done in ng_fec module made kindly available by wpaul ? > > They don't now, but I think you could add this in a reasonably > unoffensive way. > > What you would do is add a new function pointer to struct ifnet, > say "void (*if_report)(struct ifnet *, int status)" or something. > > When a device driver detected link going up/down, it could call > this function (if non-NULL). Then if_ethersubr() would set this > function pointer to point to some function if_ether_report(). > When if_ether_report() is called, if ng_ether was loaded, it > would call into ng_ether() to generate a control message that > would be passed to the node connected to the "lower" hook. > > Then, ng_one2many could be modified to understand this control > message and do the right thing according to its configuration. > > Or, something like that. Polling might be a quicker and easier > though less precise way to do it for starters. > > -Archie > > __________________________________________________________________________ > Archie Cobbs * Packet Design * http://www.packetdesign.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message