[openbeosnetteam] Re: PPP: dial-on-demand

  • From: "Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx>
  • To: "OpenBeOS Network" <openbeosnetteam@xxxxxxxxxxxxx>
  • Date: Sat, 5 Jul 2003 15:46:57 +0200

> "Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx> wrote:
> > That is clear to me and this is the reason why I want to use a static
> > library that contains all classes.
> > It, of course, makes changes in the core impossible without
> > recompiling all
> > other modules, but as we will be the only ones who develop such
> > modules it
> > is no problem.
> > At least, it will work until we get shared libraries in the kernel.
> > Then, we
> > can change the core module (e.g.: eliminate bugs) and all modules
> > will
> > profit.
>
> Please not - for the small libkernel_ppp.a this might suitable
> (although I wouldn't do it), but not for a whole networking stack.
> I certainly don't want to read 10 MB of net stack modules before going
> online (slight exaggeration).
> C is really not so bad that I would want to live with the bloat
> currently introduced by a C++ solution.

The 10 MB bloat is only there because we use a static library.
For R2 we could introduce a C++ stack without having the bloat.
Currently, it is just a workaround. It will work, but not as efficient as it
could do.
After R1 it will work very good. Or do you think differently?

> And for your C++ object passed in C function: there doesn't have to be
> any case where the other module must access that object, or else the
> whole approach is kinda senseless.
> But before I disapprove your solution, it might be better to actually
> commit it to the repository, so that I can better see what you've done,
> and where you are aiming at.

I have not implemented the module at the moment. I want to implement ppp
first (with a complete set of features: dial-on-demand, autoredial,
notification mechanism (reports), local and peer authentication,
encapsulator support (e.g., multilink, encryption, compression), general
protocol support).

It is clear that nobody should ever want to create an instance of the
manager object, but this is the same as making all methods public and saying
that some methods must not be used because they are internal methods, though
they are defined public.

Probably we have the wrong programming language, but that is another topic.
:)

C implementations of PPP define a FSM_info (finite state machine;
it manages all state transitions) structure for every ppp
connection and pass it as a parameter to all FSM functions.
It does not look nice and it allows to create your own
FSM_info structure even if you should not do that.

Waldemar


Other related posts: