Re: adding if_dev member to struct ifnet

From: Harti Brandt (brandt_at_fokus.fraunhofer.de)
Date: 10/02/03

  • Next message: Poul-Henning Kamp: "Re: adding if_dev member to struct ifnet"
    Date: Thu, 2 Oct 2003 09:45:17 +0200 (CEST)
    To: Brooks Davis <brooks@one-eyed-alien.net>
    
    

    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"
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Poul-Henning Kamp: "Re: adding if_dev member to struct ifnet"

    Relevant Pages

    • Re: adding if_dev member to struct ifnet
      ... BD>> On Tue, 30 Sep 2003, Brooks Davis wrote: ... BD>> BD>example is in the new ATM code where interfaces are looked up by name. ... that's the old ATM code (HARP). ... a prefix and a number N. HARP then generates interfaces with names from ...
      (freebsd-arch)
    • Re: adding if_dev member to struct ifnet
      ... BD>> On Tue, 30 Sep 2003, Brooks Davis wrote: ... BD>> BD>example is in the new ATM code where interfaces are looked up by name. ... that's the old ATM code (HARP). ... a prefix and a number N. HARP then generates interfaces with names from ...
      (freebsd-net)
    • Re: adding if_dev member to struct ifnet
      ... BD>> On Tue, 30 Sep 2003, Brooks Davis wrote: ... BD>> BD>example is in the new ATM code where interfaces are looked up by name. ... that's the old ATM code (HARP). ... a prefix and a number N. HARP then generates interfaces with names from ...
      (freebsd-arch)