On Wed, 1 Oct 2003, Brooks Davis wrote: BD>On Wed, Oct 01, 2003 at 09:34:22AM +0200, Harti Brandt wrote: BD>> On Tue, 30 Sep 2003, Brooks Davis wrote: BD>> BD>> BD>All are within other code. One example is in dev/mii/brgphy.c which a BD>> BD>phy feature is not enabled when it is attached to some MACs. A messier BD>> BD>example is in the new ATM code where interfaces are looked up by name. BD>> BD>> Where is this? BD> BD>One example would be in sys/netatm/atm_if.c around line 1081.
Well, that's the old ATM code (HARP). An this place is not a problem, because HARP physical interfaces live in their own name space - they don't have a struct ifnet. A worse example is around line 1125. But, I suppose we could just use the usual way to lookup an interface via it's name and after that check that it is an HARP nif. A more serious problem is how HARP allocates NIFs: the user specifies a prefix and a number N. HARP then generates interfaces with names from prefix0 to prefixN. This is the only place, where HARP really needs a name and a unit number, but this is only to create a name for new interfaces - the names are not parsed after that, so it should be no problem to keep this stuff, except that we stuff the complete name into if_xname. All the other uses of if_name seem to be (...."%s%d", if_name, if_unit)... harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED], [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"