Date: Sun, 16 May 2004 20:32:01 +0200 From: Max Laier <max@love2party.net> To: freebsd-net@freebsd.org Subject: Re: 'struct ifnet' question! Message-ID: <200405162032.03291.max@love2party.net> In-Reply-To: <20040514093817.GA54302@fbsd.lv> References: <opr67qrrcccpfy5d@mail.latnet.lv> <200404291422.56670.max@love2party.net> <20040514093817.GA54302@fbsd.lv>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 14 May 2004 11:38, Artis Caune wrote: <...> > And here is the problem: > If i watch departure events, interface renaming feature will > flush walid rules: > case SIOCSIFNAME: > ... > EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); > ... change if_xname ... > EVENTHANDLER_INVOKE(ifnet_arrival_event, ifp); > > how about another event? ;) > EVENTHANDLER_INVOKE(ifnet_rename_event, ifp->ifx_name, new_name); > strlcpy(ifp->if_xname, new_name, sizeof(ifp->if_xname)); PLEASE NO! I can't say that I have read your implementation sketch in-depth, but if you need such a thing it is broken. > > The other (big) problem in this field is, how to handle yet unknown > > interfaces (e.g. USB/Cardbus/ppp/tun/...). > > What is about usb/cardbus/... interfaces? Don't they also call > ether_ifattach()/if_attach()? Of course they do, but you might want to write rules for those interfaces *before* you plug in your card so you can not use if_nametoindex. -- Best regards, | mlaier@freebsd.org Max Laier | ICQ #67774661 http://pf4freebsd.love2party.net/ | mlaier@EFnet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405162032.03291.max>