Subject: RE: struct ifnet's if_softc field?
To: Dave McConnell <>
From: Martin Husemann <>
List: tech-kern
Date: 05/17/1999 07:42:35
> Subsequent to that I had looked quite carefully at the SLIP and
> PPP code for NetBSD where indeed the sl_softc and ppp_softc are
> headed by a "struct ifnet".
> However, as you point out and UNLIKE in Wright/Steven's Lance
> ethernet example, the "struct le_softc" in NetBSD begins with a
> "struct device", followed by a struct ifnet(embedded in the struct
> ethercom). I assume it is like this for all "real" network devices?

Yes, PPP and SLIP are pseudo-devices, all devices attaching by autoconfig
are (in the object oriented sense) derived from "struct device" an MUST have
this struct as their first member. This is the case since we changed from
the old 4.3 autoconfig mechanism (which is the state described in
Wright/Steven's) to the new config stuff (see the 4.4 daemon book).

From this I would expect this to be specific to NetBSD and OpenBSD. FreeBSD
is changing  its autoconfig as well (as I understood) but probably will end
up with something completely incompatible to ours ;-) I don't know about
BSDI, but due to the heritage of this code I would expect them to use
something similiar than we do by now.