Subject: Re: struct ifnet's if_softc field?
To: Dave McConnell <davem@eastcoast.co.za>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 05/14/1999 12:22:10
On Fri, 14 May 1999 12:29:54 +0200
"Dave McConnell" <davem@eastcoast.co.za> wrote:
> Why does "struct ifnet" have a "void *if_softc" as its first field. It
> seems unnecessary...
It's quite necessary, actually...
> Isn't ifnet always the first field in a network drivers softc structure?
No, in fact, it's never the first field in a network driver's softc. A
"struct device" is the first structure _always_ in a real device.
-- Jason R. Thorpe <thorpej@nas.nasa.gov>