Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Oct 2003 09:45:17 +0200 (CEST)
From:      Harti Brandt <brandt@fokus.fraunhofer.de>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        net@freebsd.org
Subject:   Re: adding if_dev member to struct ifnet
Message-ID:  <20031002093437.S11328@beagle.fokus.fraunhofer.de>
In-Reply-To: <20031001164036.GA1263@Odin.AC.HMC.Edu>
References:  <20030930174815.GC31908@Odin.AC.HMC.Edu> <XFMail.20030930142302.jhb@FreeBSD.org> <20031001093334.S113@beagle.fokus.fraunhofer.de> <20031001164036.GA1263@Odin.AC.HMC.Edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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
brandt@fokus.fraunhofer.de, harti@freebsd.org
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031002093437.S11328>