adding if_dev member to struct ifnet

From: Brooks Davis (brooks_at_one-eyed-alien.net)
Date: 09/30/03

  • Next message: M. Warner Losh: "Re: finishing the if.h/if_var.h split"
    Date: Mon, 29 Sep 2003 18:03:39 -0700
    To: arch@freebsd.org, net@freebsd.org
    
    
    

    [Previously posted to -net in another form.]

    I propose to add an if_dev member to struct ifnet. It would be of type
    device_t and be defined to point to the device for the interface or NULL
    if there is no device (or if there was not an easy way to get access to
    one).

    This change would codify the the relationship between an interface and
    the underlying physical device. It also would get rid of the existing
    abuses of if_name to look up the driver associated with an interface
    and simplify a number of messy cases in the conversion from if_unit and
    if_name to if_xname.

    Does this seem like a reasonable thing to do?

    -- Brooks

    -- 
    Any statement of the form "X is the one, true Y" is FALSE.
    PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
    
    



  • Next message: M. Warner Losh: "Re: finishing the if.h/if_var.h split"

    Relevant Pages

    • Re: Design Problem Aggregation
      ... >Class E has a member of type A. ... As D is the base class of E and F we can add to the container ... >that interface in E and F. A and B have many member functions and I ... This is called the Interface Segregation Principle. ...
      (comp.object)
    • Re: abstract class does not implement interface member ...
      ... saying that a protected member can not expose an internal ... Why can't I return an internal interface from a protected member ... internal interface IInvocableInternals: IInvocable ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Expose members of contained class
      ... you would still need to write some sort of custom binder that uses a custom mechanism in your type to retrieve the implementation interface for the type. ... It's possible you can customize what it generates; I think VS uses the "snippets" feature to do that work, so I suppose you could replace the stock "snippet" " statements with one that calls some default instance member. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: implementing roles in OOP......
      ... > e.g. a person is a member of a network of family members and a member ... > bla bla bla ... the fact that I have two different contexts ... > I can ask the object for a reference to an interface to that role (and ...
      (comp.object)
    • Re: adding if_dev member to struct ifnet
      ... > I propose to add an if_dev member to struct ifnet. ... > device_t and be defined to point to the device for the interface or NULL ... > and simplify a number of messy cases in the conversion from if_unit and ...
      (freebsd-arch)