Ben Greear wrote:
> Yep, there is a comment in the code, probably from 1.x talking about how it
> should be cleaned up in the 'next' release...seems that comment is still
> valid :)
Oh, a _lot_ got cleaned up in 2.3 ... ;-)
> It would be a perfect place for OO and inheritance,
The "all in one" type of object you're describing would be rather ugly,
IMHO. Better to remove those elements that don't have a 1:1 relationship
and put them elsewhere. E.g. neighbours are already elsewhere. Local
addresses (L3 and maybe also L2) should probably also go elsewhere.
Then qdiscs (think multilink PPP, ATM, or FR SVCs), etc.
Probably the best approach to clean up the design would be to split the
net_device structure into as many substructures as possible, create new
name spaces, where applicable, and then to combine those things that
always or usually occur together.
/ Werner Almesberger, ICA, EPFL, CH werner.almesberger@xxxxxxxxxxx /