Date: Sat, 20 Oct 2001 10:51:01 -0700 (PDT) From: Archie Cobbs <archie@dellroad.org> To: Milon Papezik <Milon.Papezik@oskarmobil.cz> Cc: "'hackers@freebsd.org'" <hackers@FreeBSD.ORG>, "'net@freebsd.org'" <net@FreeBSD.ORG> Subject: Re: netgraph one2many question Message-ID: <200110201751.f9KHp1584570@arch20m.dellroad.org> In-Reply-To: <B57AF59C8ABFD411BBE000508BF300F302344A80@wh01ex01.oskarmobil.cz> "from Milon Papezik at Oct 18, 2001 12:37:56 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110201751.f9KHp1584570>