Re: adding if_dev member to struct ifnet

From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 09/30/03

  • Next message: Harti Brandt: "Re: adding if_dev member to struct ifnet"
    To: Brooks Davis <brooks@one-eyed-alien.net>
    Date: Tue, 30 Sep 2003 19:56:41 +0200
    
    

    In message <20030930171535.GA31908@Odin.AC.HMC.Edu>, Brooks Davis writes:

    >> Somebody please explain how this would work for non-hardware
    >> interfaces like if_loop, if_tun, if_tap etc ?
    >
    >if_dev would be NULL when a device_t was not available. Code which used
    >this feature would be required to either check that if_dev was non-NULL
    >before trying to use it or have special knowldege that it only gets
    >called with struct ifnet instances which have a non-NULL if_dev member.
    >For instance, driver routines which take a struct ifnet would know that
    >they are only called on their own ifnet so they could assume they had
    >filled it in.

    So you'd still have to keep the if_name + if_unit around for the
    drivers which do not have a device_t ?

    -- 
    Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
    phk@FreeBSD.ORG         | TCP/IP since RFC 956
    FreeBSD committer       | BSD since 4.3-tahoe    
    Never attribute to malice what can adequately be explained by incompetence.
    _______________________________________________
    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"
    _______________________________________________
    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"
    

  • Next message: Harti Brandt: "Re: adding if_dev member to struct ifnet"

    Relevant Pages

    • Re: adding if_dev member to struct ifnet
      ... In message, Brooks Davis writes: ... >before trying to use it or have special knowldege that it only gets ... driver routines which take a struct ifnet would know that ...
      (freebsd-net)
    • Re: adding if_dev member to struct ifnet
      ... In message, Brooks Davis writes: ... >before trying to use it or have special knowldege that it only gets ... driver routines which take a struct ifnet would know that ...
      (freebsd-arch)