MPppFsm Class Reference
class MPppFsm : public MPppRecvr |
Protected Member Functions |
---|
TBool
| FsmAckOptionsValid(RPppOptionList &, RPppOptionList &) |
void | FsmApplyConfigRequest(RPppOptionList &) |
void | FsmCheckConfigRequest(RPppOptionList &, RPppOptionList &, RPppOptionList &, RPppOptionList &) |
TBool
| FsmConfigRequestOptionsValid(RPppOptionList &) |
void | FsmFillinConfigRequestL(RPppOptionList &) |
void | FsmLayerDown(TInt) |
void | FsmLayerFinished(TInt) |
TInt
| FsmLayerStarted() |
void | FsmLayerUp() |
void | FsmRecvConfigAck(RPppOptionList &) |
void | FsmRecvConfigNak(RPppOptionList &, RPppOptionList &) |
void | FsmRecvConfigReject(RPppOptionList &, RPppOptionList &) |
TBool
| FsmRecvUnknownCode(TUint8, TUint8, TInt, RMBufChain &) |
TBool
| FsmRejectOptionsValid(RPppOptionList &, RPppOptionList &) |
TPppFsmState
| FsmState() |
void | FsmTerminationPhaseComplete() |
IMPORT_C void | KillProtocol() |
TUint8 * | NewPacket(RMBufPacket &, TUint) |
void | SetState(TPppFsmState) |
Private Member Functions |
---|
void | DecrementMaxFailure() |
IMPORT_C void | FrameError() |
void | InitMaxFailure() |
void | InitRestartCountForConfig() |
void | InitRestartCountForTerminate() |
TInt
| InitialiseConfigRequest() |
IMPORT_C void | LowerLayerDown(TInt) |
IMPORT_C void | LowerLayerUp() |
TBool
| MaxFailureExceeded() |
void | ProcessConfig(TUint8, TUint8, TInt, RMBufChain &) |
TBool
| ProcessEmptyConfigReq() |
void | ProcessReject(TUint8, TUint8, TInt, RMBufChain &) |
void | ProcessTerminate(TUint8, TUint8, TInt, RMBufChain &) |
void | ReadIniFileL() |
IMPORT_C TBool | RecvFrame(RMBufChain &) |
void | SendConfigReply(RPppOptionList &, TUint8, TUint8) |
void | SendConfigRequest() |
void | SendConfigRequestAfterNak(RPppOptionList &) |
void | SendConfigRequestAfterReject(RPppOptionList &) |
void | SendInitialConfigRequest() |
void | SendInitialTerminateRequest() |
void | SendTerminateAck(TUint8) |
void | SendTerminateRequest() |
void | ThisLayerDown() |
void | ThisLayerFinished() |
void | ThisLayerStarted() |
void | ThisLayerUp() |
IMPORT_C void | TimerComplete(TInt) |
void | ZeroRestartCount() |
Constructor & Destructor Documentation
MPppFsm(CPppLcp *, TPppPhase, TUint)
Member Functions Documentation
ChangeTimers(TBool)
void | ChangeTimers | ( | TBool | aLengthen | ) | [inline] |
ConnectionPersist(TBool)
void | ConnectionPersist | ( | TBool | aPersist | ) | [inline] |
DecrementMaxFailure()
void | DecrementMaxFailure | ( | ) | [private, inline] |
FrameError()
IMPORT_C void | FrameError | ( | ) | [private, virtual] |
Called when a bad frame is received. No action is currently taken.
RecvFrame() is called instead when a good frame is received
FsmAbort(TInt)
void | FsmAbort | ( | TInt | aReason | ) | |
Parameters
TInt aReason | Reason for aborting |
FsmAckOptionsValid(RPppOptionList &, RPppOptionList &)
Perform validation checking on the option list of a ConfigAck or ConfigReject.
FsmApplyConfigRequest(RPppOptionList &)
void | FsmApplyConfigRequest | ( | RPppOptionList & | aRequestList | ) | [protected, pure virtual] |
FsmCheckConfigRequest(RPppOptionList &, RPppOptionList &, RPppOptionList &, RPppOptionList &)
FsmClose(TInt)
void | FsmClose | ( | TInt | aReason | ) | |
Close the state machine and protocol. Called by the derived class on closing.
Parameters
TInt aReason | Reason for closing |
FsmConfigRequestOptionsValid(RPppOptionList &)
Perform validation checking on the option list of a ConfigRequest.
FsmConstructL()
Construct the state machine object
FsmFillinConfigRequestL(RPppOptionList &)
void | FsmFillinConfigRequestL | ( | RPppOptionList & | aRequestList | ) | [protected, pure virtual] |
FsmIsThisLayerOpen()
TBool
| FsmIsThisLayerOpen | ( | ) | [inline] |
FsmLayerDown(TInt)
void | FsmLayerDown | ( | TInt | aReason =
KErrNone
| ) | [protected, pure virtual] |
FsmLayerFinished(TInt)
void | FsmLayerFinished | ( | TInt | aReason =
KErrNone
| ) | [protected, pure virtual] |
FsmLayerStarted()
TInt
| FsmLayerStarted | ( | ) | [protected, pure virtual] |
FsmLayerUp()
void | FsmLayerUp | ( | ) | [protected, pure virtual] |
FsmNewId()
Generate a new nonzero packet identifier.
FsmOpen()
Begin the state machine and protocol. Called by the derived class during initialization.
FsmRecvConfigAck(RPppOptionList &)
void | FsmRecvConfigAck | ( | RPppOptionList & | aReplyList | ) | [protected, pure virtual] |
FsmRecvConfigNak(RPppOptionList &, RPppOptionList &)
FsmRecvConfigReject(RPppOptionList &, RPppOptionList &)
FsmRecvUnknownCode(TUint8, TUint8, TInt, RMBufChain &)
Handle a received packet with an unknown code.
Parameters
TUint8 aCode | Packet code (ignored) |
TUint8 aId | Packet identifier (ignored) |
TInt aLength | Length of packet (ignored) |
RMBufChain & aPacket | MBuf chain containing packet (ignored) |
FsmRejectOptionsValid(RPppOptionList &, RPppOptionList &)
Perform validation checking on the option list of a ConfigAck or ConfigReject.
FsmRejectPacket(RMBufChain &, TUint, TUint)
Send a Code Reject or Protocol Reject packet.
Parameters
RMBufChain & aPacket | MBuf chain containing packet; it will be used to send the reject message. |
TUint aReason =
KPppLcpCodeReject
| Reason for rejecting (KPppLcpCodeReject or KPppLcpProtocolReject) |
TUint aPppId =
KPppIdAsIs
| PPP protocol ID |
FsmTerminationPhaseComplete()
void | FsmTerminationPhaseComplete | ( | ) | [protected, pure virtual] |
InitMaxFailure()
void | InitMaxFailure | ( | ) | [private, inline] |
InitRestartCountForConfig()
void | InitRestartCountForConfig | ( | ) | [private] |
Initialize the restart count and wait time with values appropriate for the config phase.
InitRestartCountForTerminate()
void | InitRestartCountForTerminate | ( | ) | [private] |
Initialize the restart count and wait time for with values appropriate for the termination phase.
InitialiseConfigRequest()
TInt
| InitialiseConfigRequest | ( | ) | [private] |
Delete any existing request list, then create a new one. Initialise counters for sending config requests.
- Post-condition
- iRequestList is initialized
KillProtocol()
IMPORT_C void | KillProtocol | ( | ) | [protected, virtual] |
Called when the lower level protocol is killed.
LowerLayerDown(TInt)
IMPORT_C void | LowerLayerDown | ( | TInt | aStatus =
KErrNone
| ) | [private, virtual] |
Signals the Down event. Called when the lower layer protocol has gone down. This means that our layer can no longer receive or transmit anything.
In case of LCP, this means that the physical link is closed (e.g. Peer dropped DTR) If we are LCP, this may mean that PPP is finished, because the link is no longer available.
Parameters
TInt aStatus =
KErrNone
| Error code indicating the reason the layer is going down |
LowerLayerUp()
IMPORT_C void | LowerLayerUp | ( | ) | [private, virtual] |
Called when the lower layer protocol has come up.
MaxFailureExceeded()
TBool
| MaxFailureExceeded | ( | ) | const [private, inline] |
NewPacket(RMBufPacket &, TUint)
Allocate a new packet buffer and info header. The caller must fill in the the packet and call its Pack() method before sending.
RPppOptionList::CreatePacketL
ProcessConfig(TUint8, TUint8, TInt, RMBufChain &)
Handle ConfigRequest, ConfigAck, ConfigNak and ConfigReject
Parameters
TUint8 aCode | Packet code |
TUint8 aId | Packet identifier |
TInt aLength | Length of packet (ignored) |
RMBufChain & aPacket | MBuf chain containing packet. |
ProcessEmptyConfigReq()
TBool
| ProcessEmptyConfigReq | ( | ) | [private] |
Handle Config Request with no options.
ProcessReject(TUint8, TUint8, TInt, RMBufChain &)
Handle a Code Reject or Protocol Reject. If the reject rejects a code (or protocol) that should be known terminate layer. (Note, As the behaviour of protocol reject is the same as code reject, this function handles protocol reject for LCP)
Parameters
TUint8 aCode | Packet code |
TUint8 aId | Packet identifier (ignored) |
TInt aLength | Length of packet (ignored) |
RMBufChain & aPacket | MBuf chain containing packet. |
ProcessTerminate(TUint8, TUint8, TInt, RMBufChain &)
Handle a Terminate Request packet and cleanly terminate the connection.
Parameters
TUint8 aCode | Packet code |
TUint8 aId | Packet identifier |
TInt aLength | Length of packet (ignored) |
RMBufChain & aPacket | MBuf chain containing packet (ignored) |
ReadIniFileL()
void | ReadIniFileL | ( | ) | [private] |
Reads the contents of the ppp.ini file.
-
leave
- Error code if file cannot be read
RecvFrame(RMBufChain &)
Receives and processes a PPP frame. Called by CPppLcp.
FrameError() is called instead when a bad frame is received
SendConfigReply(RPppOptionList &, TUint8, TUint8)
Reply to a config request with a set of options.
SendConfigRequest()
void | SendConfigRequest | ( | ) | [private] |
Send the config request in iRequestList
SendConfigRequestAfterNak(RPppOptionList &)
Update the options list and send a new config request after a Nak.
SendConfigRequestAfterReject(RPppOptionList &)
Update the options list and send a new config request after a Reject.
SendInitialConfigRequest()
void | SendInitialConfigRequest | ( | ) | [private] |
Initialise request list and send a request if successful.
SendInitialTerminateRequest()
void | SendInitialTerminateRequest | ( | ) | [private] |
Send the first Terminate Request packet to begin connection teardown.
SendTerminateAck(TUint8)
void | SendTerminateAck | ( | TUint8 | aId | ) | [private] |
Send a Terminate Ack packet.
SendTerminateRequest()
void | SendTerminateRequest | ( | ) | [private] |
Send a Terminate Request packet.
SetState(TPppFsmState)
Set the next state in the FSM. Cancels the timer when appropriate.
TerminateLink()
Tear down the protocol, regardless of the state of the FSM.
ThisLayerDown()
void | ThisLayerDown | ( | ) | [private] |
ThisLayerFinished()
void | ThisLayerFinished | ( | ) | [private] |
ThisLayerStarted()
void | ThisLayerStarted | ( | ) | [private] |
ThisLayerUp()
void | ThisLayerUp | ( | ) | [private] |
TimerComplete(TInt)
IMPORT_C void | TimerComplete | ( | TInt | aStatus | ) | [private, virtual] |
Called by MTimer on timer expiry.
Parameters
TInt aStatus | Aynchronous request completion status (ignored) |
ZeroRestartCount()
void | ZeroRestartCount | ( | ) | [private] |
Member Data Documentation
TInt
iConsecCfgReq
TInt
| iConsecCfgReq | [private] |
TBool
iFsmTermination
TBool
| iFsmTermination | [private] |
TInt
iFsmTerminationCauseError
TInt
| iFsmTerminationCauseError | [protected] |
TBool
iLengthenTimers
TBool
| iLengthenTimers | [private] |
TInt
iMaxFailureConfig
TInt
| iMaxFailureConfig | [private] |
TInt
iMaxFailureCount
TInt
| iMaxFailureCount | [private] |
TInt
iMaxRestartConfig
TInt
| iMaxRestartConfig | [private] |
TInt
iMaxTerminateRequest
TInt
| iMaxTerminateRequest | [private] |
Maximum TerminateRequest transmissions.
TBool
iNoEvidenceOfPeer
TBool
| iNoEvidenceOfPeer | [private] |
The physical layer may block on its own retries when trying to send an initial config packet which then blocks the LCP from shutting down until attempts to send a disconnect packet have timed out. To allow for a quick shutdown in such cases where there is no evidence that the link layer is working the EPppFsmStarting state also sets this flag. This is driven by INC85191.
TUint
iRequestId
TUint
| iRequestId | [private] |
RPppOptionList
iRequestList
TInt
iRestartCount
TInt
| iRestartCount | [private] |
TBool
iTerminateAckEnabled
TBool
| iTerminateAckEnabled | [protected] |
Is RFC compliant termination phase for incoming TerminateRequest enabled?
TInt
iTerminateAckTimeout
TInt
| iTerminateAckTimeout | [private] |
Terminate Ack timeout period
TUint
iTerminateId
TUint
| iTerminateId | [private] |
TBool
iTerminateRequestEnabled
TBool
| iTerminateRequestEnabled | [protected] |
Is RFC compliant termination phase for Administrative close enabled?
TInt
iTerminateRequestTimeout
TInt
| iTerminateRequestTimeout | [private] |
TerminateRequest retransmission timeout
TInt
iWaitTimeConfig
TInt
| iWaitTimeConfig | [private] |
TBool
iWaitTimeNoIncrease
TBool
| iWaitTimeNoIncrease | [private] |
Whether restart timer period doubles or not
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.