[openbeosnetteam] Re: Net Stack

"Andrew Galante" <haiku.galante@xxxxxxxxx> wrote:
> I've been thinking about the overall design of the stack for the past 
> few
> days, and not to take away from the net_buffers discussion but I just 
> wanted
> to get this down and see what you think of it.
> 
> Since Axel hinted at the possibility of using C++ internally, I 
> thought why
> not make the whole thing OO?  AFAIK this hasn't been done before, and 
> there
> may be a good reason that I don't know about.

The module based approach is OO, it just doesn't need C++ features to 
do this. You have a base protocol class (the protocol module), and 
various protocol classes (like UDP) that implement this functionality.
All that's missing (and isn't possible in the kernel with C++ 
features), is cross module inheritance (but that's certainly possible 
using standard C, even though it's not really needed for the stack 
case).

> I'm considering Ethernet a Protocol instead of an interface because 
> it has
> to apply the Ethernet frame to the packet before it gets sent out to 
> the
> device.

Indeed, it's more or less the same.

> http://home.rochester.rr.com/sg3web/haiku/doodle.png
> is a drawing I made when brainstorming this idea.  It shows an 
> example
> configuration of various Protocol objects and how they might work 
> together.

You wouldn't need to change a single line for the BONE like 
architecture we're aiming at. The devel is always in the details.

Bye,
   Axel.


Other related posts: