Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2003 19:56:41 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        Vincent Jardin <vjardin@wanadoo.fr>
Subject:   Re: adding if_dev member to struct ifnet 
Message-ID:  <13247.1064944601@critter.freebsd.dk>
In-Reply-To: Your message of "Tue, 30 Sep 2003 10:15:36 PDT." <20030930171535.GA31908@Odin.AC.HMC.Edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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