Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosnetteam] || [Date Prev] [07-2003 Date Index] [Date Next] || [Thread Prev] [07-2003 Thread Index] [Thread Next]

[openbeosnetteam] Re: KPPPFSM.cpp,1.1,1.2

  • From: "Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Fri, 11 Jul 2003 12:07:45 +0200 CEST
Axel Dörfler <"Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>> wrote:> 
"Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx> wrote:
> > As the DiskDeviceAPI, too, has some long names I will rename it 
> > into
> > KPPPFiniteStateMachine.h/cpp and PPPFiniteStateMachine.
> > Does anyone vote against this decision?
> 
> That's fine with me, but what exactly does it do anyway? Wouldn't 
> something like KPPPState be enough? Is it a public class?

It is related to LCP (Link Control Protocol). The LCP protocol module 
just receives the packets and decodes them.
FSM handles the packet and knows which state changes need to happen 
after some control packet has been received.
FSM also manages all events that happen. E.g., if authentication is 
required AuthenticationRequested() will be called.
When the connection is dropped the device object notifies FSM that it 
went down. FSM might then initiate a redial (if desired).
Additionally, FSM can create LCP packets to be sent (like a terminate-
request) and it manages timeouts.

I think PPPFiniteStateMachine helps understanding what it does. 
PPPState is not clear enough about what it does.

What exactly do you not like? I thought it was the upper-case letters. 
:)
As you have not complained about PPPLCP the problem must be somewhere 
else.
Is it that FSM is too short to understand what it does?
fsm.c was used in our old netstack. It is also used in pppd, etc..

IMHO, KPPPFiniteStateMachine.h/cpp is the best compromise.
What do the others say?

> If not you could do something like this:
> namespace PPP {
>       class FinalStateMachine()
> };
> 
> Just a suggestion; since you are doing the work, it's up to you to 
> decide :-)

There is no way to have a clean interface without making this class 
publicly accessible. Otherwise the FSM events (mentioned in the RFC) 
will be spread over two or more classes which makes it harder to read.

Waldemar





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.