[openbeosnetteam] Re: Dial-Up

Axel Dörfler wrote:
>> As an alternative we could make a wrapper that can be integrated into
>> the project as an additional source file and a small macro call with the
>> C++ class as the argument:
>> WRAP_CPP_NET_MODULE(mycppmod);
> 
> No, that's definitely not an option. 

Agreed 100%.

> I would rather provide a protocol
> base class which implements the C module API. Then you could just 
> inherit from that one, and doesn't have to care about this too much 
> anymore.

That is exactly what I thought, after our IRC discussion on this topic, would 
be NOT possible in kernelland (BeOS and OpenBeOS).
Don't ask me why I wrongly understand.

A base class "NetProtocol" and "NetInterface" make full sense to me too.
Damn, I'm not a good classes hierarchies designer yet, that's mean I'll need 
help from you all guys when a C-only API don't worry me at all...

However, don't forget that in our duty we have to offer a good POSIX support, 
like ifnet_t enumeration, sysctl() call, these crasy SIOCSIFADDR ioctl() 
opcodes, etc.
These, when present, help greatly to port Unix network tools outhere.
Or should we drop this support, and implement our own stack access & control 
API, non BSD stack compatible? I'm not for this too radical solution myself.
Let's not drop all at the same time ;-)

-Philippe.


Other related posts: