CPppLcp Class Reference
class CPppLcp : public ESock::CSubConnectionFlowBase
|
PPP Link Control Protocol class. This class oversees all the other PPP protocol classes, in addition to implementing the LCP state machine. Objects are instantiated at initialization or as necessary to implement the protocols: CCP, authentication, CBCP, IPCP, IPV6CP
Public Member Functions
|
IMPORT_C void
|
AgentToFlowNotification
(
TInt
)
|
void
|
Authenticate
(CPppAuthentication *)
|
IMPORT_C void
|
AuthenticateResponseMessage
()
|
IMPORT_C void
|
BinderLinkUp
(
TPppProtocol
)
|
TBool
|
CallbackEnabled
()
|
void
|
CallbackGrantedAndAuthenticated
()
|
TCallbackIETFRequestType
|
CallbackRequestType
()
|
void
|
CancelAuthenticate
(CPppAuthentication *)
|
void
|
CancelRead
()
|
CObjectConIx
*
|
ContainerForDlls
()
|
IMPORT_C void
|
Destroy
()
|
TBool
|
DoLcpExts
()
|
TBool
|
DoesDllExist
(const
TDesC
&)
|
IMPORT_C void
|
Error
(
TInt
)
|
IMPORT_C
ESock::CSubConnectionFlowBase
*
|
Flow
()
|
void
|
FlowDown
(
TInt
,
MNifIfNotify::TAction
)
|
void
|
FlowUp
()
|
const
CPppAuthConfig
*
|
GetAuthConfig
()
|
const
CBCAProvision
*
|
GetBCAProvision
()
|
IMPORT_C
ESock::MLowerControl
*
|
GetControlL
(const
TDesC8
&)
|
const
CCredentialsConfig
*
|
GetCredentials
()
|
const
TDesC8
&
|
GetExcessData
()
|
const
CPppLcpConfig
*
|
GetLcpConfig
()
|
const
CIPConfig
*
|
GetNcpConfig
()
|
const
CPppProvisionInfo
*
|
GetPppAgentConfig
()
|
void
|
LinkFlowOn
()
|
void
|
LinkLayerUp
()
|
void
|
LinkRecv
(
RMBufChain
&)
|
TInt
|
MaxReceiveSize
()
|
void
|
NcpUp
()
|
IMPORT_C
CPppLcp
*
|
NewL
(
ESock::CSubConnectionFlowFactoryBase
&, const
Messages::TNodeId
&,
ESock::CProtocolIntfBase
*)
|
TInt
|
Notification
(
TAgentToNifEventType
, void *)
|
void
|
PhaseAdvance
(
TPppPhase
)
|
void
|
PhaseComplete
()
|
void
|
PhaseRetard
(
TPppPhase
,
TInt
)
|
void
|
PppClose
(
TInt
)
|
CPppLinkBase
*
|
PppLink
()
|
CPppLcpConfig::TPppLinkMode
|
PppLinkMode
()
|
TInt
|
PppOpen
()
|
void
|
PppUnloadCompressor
()
|
IMPORT_C void
|
Process
(
RMBufChain
&)
|
void
|
Progress
(
TInt
,
TInt
)
|
IMPORT_C void
|
ProvisionConfig
(const
ESock::RMetaExtensionContainerC
&)
|
TBool
|
QueryExternalIPConfiguration
()
|
void
|
RegisterRecvr
(
MPppRecvr
*)
|
void
|
ReregisterRecvr
(
MPppRecvr
*)
|
ESock::MLowerDataSender::TSendResult
|
Send
(
RMBufChain
&,
TUint
)
|
TUint8
|
SendEchoRequest
()
|
void
|
SendIdentification
()
|
void
|
SetMaxReceiveSize
(
TInt
)
|
void
|
SetMaxTransferSize
(
TInt
)
|
IMPORT_C void
|
StartSending
()
|
void
|
Stop
(
TInt
,
MNifIfNotify::TAction
)
|
IMPORT_C void
|
StopFlow
(
TInt
)
|
void
|
StopProtocol
(
TUint
)
|
IMPORT_C void
|
SubConnectionError
(
TInt
)
|
IMPORT_C void
|
SubConnectionGoingDown
()
|
void
|
TerminateLink
(
MNifIfNotify::TAction
,
TInt
)
|
IMPORT_C void
|
Unbind
(
ESock::MUpperDataReceiver
*,
ESock::MUpperControl
*)
|
Protected Member Functions
|
|
CPppLcp
(
ESock::CSubConnectionFlowFactoryBase
&, const
Messages::TNodeId
&,
ESock::CProtocolIntfBase
*)
|
|
~CPppLcp
()
|
IMPORT_C
ESock::MFlowBinderControl
*
|
DoGetBinderControlL
()
|
TInt
|
DoStartFlow
()
|
void
|
DoStopFlow
(
TInt
,
MNifIfNotify::TAction
)
|
IMPORT_C void
|
FsmCheckConfigRequest
(
RPppOptionList
&,
RPppOptionList
&,
RPppOptionList
&,
RPppOptionList
&)
|
IMPORT_C
TBool
|
FsmConfigRequestOptionsValid
(
RPppOptionList
&)
|
IMPORT_C void
|
FsmFillinConfigRequestL
(
RPppOptionList
&)
|
IMPORT_C void
|
FsmLayerDown
(
TInt
)
|
IMPORT_C
TInt
|
FsmLayerStarted
()
|
IMPORT_C void
|
FsmLayerUp
()
|
IMPORT_C void
|
FsmRecvConfigAck
(
RPppOptionList
&)
|
IMPORT_C void
|
FsmRecvConfigNak
(
RPppOptionList
&,
RPppOptionList
&)
|
IMPORT_C void
|
FsmRecvConfigReject
(
RPppOptionList
&,
RPppOptionList
&)
|
IMPORT_C
TBool
|
FsmRecvUnknownCode
(
TUint8
,
TUint8
,
TInt
,
RMBufChain
&)
|
IMPORT_C
TBool
|
FsmRejectOptionsValid
(
RPppOptionList
&,
RPppOptionList
&)
|
IMPORT_C void
|
FsmTerminationPhaseComplete
()
|
void
|
InitL
()
|
void
|
ProvisionConfigL
(const
ESock::RMetaExtensionContainerC
&)
|
IMPORT_C void
|
ReceivedL
(const
Messages::TRuntimeCtxId
&, const
Messages::TNodeId
&,
Messages::TSignatureBase
&)
|
Constructor & Destructor Documentation
CPppLcp(ESock::CSubConnectionFlowFactoryBase &, const Messages::TNodeId &, ESock::CProtocolIntfBase *)
~CPppLcp()
IMPORT_C
|
~CPppLcp
|
(
|
)
|
[protected, virtual]
|
Member Functions Documentation
AgentToFlowNotification(TInt)
IMPORT_C void
|
AgentToFlowNotification
|
(
|
TInt
|
aNotificationId
|
)
|
[virtual]
|
AllNcpsUp()
TBool
|
AllNcpsUp
|
(
|
)
|
[private]
|
Authenticate(CPppAuthentication *)
void
|
Authenticate
|
(
|
CPppAuthentication *
|
aAp
|
)
|
|
AuthenticateResponseMessage()
IMPORT_C void
|
AuthenticateResponseMessage
|
(
|
)
|
[virtual]
|
BinderLinkUp(TPppProtocol)
IMPORT_C void
|
BinderLinkUp
|
(
|
TPppProtocol
|
aProtocol
|
)
|
[virtual]
|
CallbackEnabled()
TBool
|
CallbackEnabled
|
(
|
)
|
[inline]
|
CallbackGrantedAndAuthenticated()
void
|
CallbackGrantedAndAuthenticated
|
(
|
)
|
|
To be called when the authentication (if any) has been completed successfully. If there's no authentication at all, this should be called at the point where the authentication phase would otherwise be.
If the other end has agreed to our request for callback, then this causes NETDIAL to be notified that it's "all systems go" for callback.
If the other end has not confirmed accepted our request for callback, or if we haven't asked, then this does nothing.
CancelAuthenticate(CPppAuthentication *)
void
|
CancelAuthenticate
|
(
|
CPppAuthentication *
|
aAp
|
)
|
|
Destroy()
IMPORT_C void
|
Destroy
|
(
|
)
|
[virtual]
|
DoLcpExts()
TBool
|
DoLcpExts
|
(
|
)
|
const [inline]
|
DoStartFlow()
TInt
|
DoStartFlow
|
(
|
)
|
[protected]
|
DoStopFlow(TInt, MNifIfNotify::TAction)
Cleanly stop the LCP link and notify the NIF. If aReason == KErrConnectionTerminated signal Authoritative stop: there is no graceful termination: PPP signals CNifAgentRef::LinkLayerDown to Nifman, which results in PPP deletion.
DoesDllExist(const TDesC &)
Error(TInt)
IMPORT_C void
|
Error
|
(
|
TInt
|
aError
|
)
|
[virtual]
|
FlowDown(TInt, MNifIfNotify::TAction)
FsmCheckConfigRequest(RPppOptionList &, RPppOptionList &, RPppOptionList &, RPppOptionList &)
FsmConfigRequestOptionsValid(RPppOptionList &)
FsmFillinConfigRequestL(RPppOptionList &)
IMPORT_C void
|
FsmFillinConfigRequestL
|
(
|
RPppOptionList
&
|
aRequestList
|
)
|
[protected, virtual]
|
FsmLayerDown(TInt)
IMPORT_C void
|
FsmLayerDown
|
(
|
TInt
|
aReason =
KErrNone
|
)
|
[protected, virtual]
|
FsmLayerStarted()
IMPORT_C
TInt
|
FsmLayerStarted
|
(
|
)
|
[protected, virtual]
|
Open the layer below. Upcall from the FSM.
FsmLayerUp()
IMPORT_C void
|
FsmLayerUp
|
(
|
)
|
[protected, virtual]
|
Signal up event to next layer above Upcall from the FSM.
FsmRecvConfigAck(RPppOptionList &)
IMPORT_C void
|
FsmRecvConfigAck
|
(
|
RPppOptionList
&
|
aReplyList
|
)
|
[protected, virtual]
|
Received a Config Ack - apply the options Upcall from the FSM.
FsmRecvConfigNak(RPppOptionList &, RPppOptionList &)
Modify request after receiving a Config Nak Upcall from the FSM.
FsmRecvConfigReject(RPppOptionList &, RPppOptionList &)
Modify request after receiving a Config Reject Upcall from the FSM.
FsmRecvUnknownCode(TUint8, TUint8, TInt, RMBufChain &)
FsmRejectOptionsValid(RPppOptionList &, RPppOptionList &)
Check if the option list specified matches the original Config-Request option list.
Used for conformance to RFC1661 sections 5.2 and 5.4 (the option list in a Config-Ack or Config-Reject must exactly match the option list in the original Config-Request - same option values in the same order with no new options appended).
FsmTerminationPhaseComplete()
IMPORT_C void
|
FsmTerminationPhaseComplete
|
(
|
)
|
[protected, virtual]
|
Called when the FSM has stopped. Upcall from the FSM.
GetControlL(const TDesC8 &)
GetExcessData()
const
TDesC8
&
|
GetExcessData
|
(
|
)
|
const [inline]
|
GetNcpConfig()
const
CIPConfig
*
|
GetNcpConfig
|
(
|
)
|
const [inline]
|
GetPppAgentConfig()
const
CPppProvisionInfo
*
|
GetPppAgentConfig
|
(
|
)
|
const [inline]
|
InitCallbackInfoL()
INLINE void
|
InitCallbackInfoL
|
(
|
)
|
[private]
|
InitL()
void
|
InitL
|
(
|
)
|
[protected]
|
Construct the Link Protocol Object
-
Exceptions
-
leaves
|
if could not allocate memory
|
LinkFlowOn()
Link advisory flow on signal.
LinkLayerUp()
Called from the lower layer when it becomes ready.
LinkRecv(RMBufChain &)
Called by the link layer for each new PPP packet received. Search registered Recvr list and deliver to all recipients.
Parameters
RMBufChain
& aPacket
|
MBuf chain containing received packet
|
MaxReceiveSize()
TInt
|
MaxReceiveSize
|
(
|
)
|
const [inline]
|
MaybePostDataClientIdle()
void
|
MaybePostDataClientIdle
|
(
|
)
|
[private]
|
NewCallbackRequestInfoL(TCallbackIETFRequestType)
Allocates a buffer containing a PPP callback request packet a la draft RFC.
Format is: [ length ] [ type ] [ .. info ... ]
-
Post-condition
-
Sets iCallbackIETFRequestPacket to point to the buffer allocated
NewL(ESock::CSubConnectionFlowFactoryBase &, const Messages::TNodeId &, ESock::CProtocolIntfBase *)
NewMagicNumberL(TUint &)
void
|
NewMagicNumberL
|
(
|
TUint
&
|
aMagicNumber
|
)
|
[private, static]
|
Generate a new magic number, based upon existing number, machine unique ID and tick count.
Parameters
TUint
& aMagicNumber
|
Magic number to update
|
Notification(TAgentToNifEventType, void *)
NotificationMessage(TAgentToNifEventType)
PhaseAdvance(TPppPhase)
Switch to the next PPP operation phase. When the PPP phase is advanced, protocols may have reached their active phase and so have to be bound in to the main data path and signalled active.
PhaseAdvancesBeyondAuthenticate()
INLINE void
|
PhaseAdvancesBeyondAuthenticate
|
(
|
)
|
[private]
|
PhaseComplete()
Advance to the next PPP phase after successfully completing the current phase.
PhaseRetard(TPppPhase, TInt)
Return to a previous PPP operation phase. When the PPP phase is retarded, active protocols may no longer be in their active phase and so have to be unbound from the main data path and signalled inactive.
Parameters
TPppPhase
aNewPhase
|
Phase just entered
|
TInt
aReason
|
Error code indicating the reason we are changing phases
|
PostErrorMessage(TInt)
void
|
PostErrorMessage
|
(
|
TInt
|
aError
|
)
|
[private]
|
PostFlowDownMessage(TInt)
void
|
PostFlowDownMessage
|
(
|
TInt
|
aError
|
)
|
[private]
|
PostProgressMessage(TInt, TInt)
void
|
PostProgressMessage
|
(
|
TInt
|
aStage,
|
|
TInt
|
aError
|
|
)
|
[private]
|
PppClose(TInt)
void
|
PppClose
|
(
|
TInt
|
aReason
|
)
|
|
PppOpen()
Called by an upper layer when it is started.
PppUnloadCompressor()
void
|
PppUnloadCompressor
|
(
|
)
|
|
Unload the compression module after a compressed packet is rejected. Upcall from the FSM.
Process(RMBufChain &)
IMPORT_C void
|
Process
|
(
|
RMBufChain
&
|
aData
|
)
|
[virtual]
|
Progress(TInt, TInt)
void
|
Progress
|
(
|
TInt
|
aStage,
|
|
TInt
|
aError
|
|
)
|
|
Upcall from binders to send progress
ProvisionConfig(const ESock::RMetaExtensionContainerC &)
ProvisionConfigL(const ESock::RMetaExtensionContainerC &)
Handle ProvisionConfig messages from SCPR.
Provisioning requirements:
-
On receipt of a ProvisionConfig message, provisioning information in the SAccessPointConfig array is validated, and the following structures must be present:
-
on receipt of a StartFlow message:
QueryExternalIPConfiguration()
TBool
|
QueryExternalIPConfiguration
|
(
|
)
|
|
Returns the external IP configuration flag.
ReceivedL(const Messages::TRuntimeCtxId &, const Messages::TNodeId &, Messages::TSignatureBase &)
RegisterRecvr(MPppRecvr *)
Register an object that is interested in receiving certain packets. The receiver object knows the protocol number it is interested in.
ReregisterRecvr(MPppRecvr *)
Reregister an object that is receiving certain packets. The receiver object knows the protocol number it is interested in.
Parameters
MPppRecvr
* aRecvr
|
Object registered to receive packets
|
RetrieveDynamicProvisionInfo()
TInt
|
RetrieveDynamicProvisionInfo
|
(
|
)
|
[private]
|
Retrieve Provisioning Information which becomes available at Flow start time.
Send(RMBufChain &, TUint)
SendEchoRequest()
Send an LCP Echo Request frame. Called by CPppLrd::TimerComplete periodically
SendIdentification()
void
|
SendIdentification
|
(
|
)
|
|
Send an LCP Identification frame (RFC 1570).
SetMaxReceiveSize(TInt)
void
|
SetMaxReceiveSize
|
(
|
TInt
|
aSize
|
)
|
[inline]
|
SetMaxTransferSize(TInt)
void
|
SetMaxTransferSize
|
(
|
TInt
|
aLength
|
)
|
[inline]
|
StartSending()
IMPORT_C void
|
StartSending
|
(
|
)
|
[virtual]
|
Stop(TInt, MNifIfNotify::TAction)
StopFlow(TInt)
IMPORT_C void
|
StopFlow
|
(
|
TInt
|
aError
|
)
|
[virtual]
|
StopProtocol(TUint)
void
|
StopProtocol
|
(
|
TUint
|
aProtocol
|
)
|
|
One of the NCP protocols has been shut down, so kill it. Searches for the registered protocol handler based on the protocol ID.
Parameters
TUint
aProtocol
|
PPP protocol number
|
SubConnectionError(TInt)
IMPORT_C void
|
SubConnectionError
|
(
|
TInt
|
aError
|
)
|
[virtual]
|
SubConnectionGoingDown()
IMPORT_C void
|
SubConnectionGoingDown
|
(
|
)
|
[virtual]
|
TerminateLink(MNifIfNotify::TAction, TInt)
Cleanly take down the LCP (and therefore PPP) link.
Unbind(ESock::MUpperDataReceiver *, ESock::MUpperControl *)
Member Enumerations Documentation
Enum TMeshMachineFlowState
Enumerators
EStopped
|
|
EStarting
|
|
EStarted
|
|
EStopping
|
|
Enum TPppProtocol
Enumerators
EPppProtocolBegin = 1
|
|
EPppProtoNone = EPppProtocolBegin
|
|
EPppIp4
|
|
EPppIp6
|
|
EPppAuth
|
|
EPppProtocolEnd
|
|
Member Data Documentation
__FLOG_DECLARATION_MEMBER
|
__FLOG_DECLARATION_MEMBER
|
[private]
|
const CAgentProvisionInfo * iAgentProvision
CPppAuthentication * iAuthenticate
CPppAuthentication *
|
iAuthenticate
|
[private]
|
TBool
iAuthenticateDone
TBool
|
iAuthenticateDone
|
[private]
|
Whether authentication has been completed
const CBCAProvision * iBCAProvision
CPppBinderIp6 * iBinder6
CPppBinderIp6 *
|
iBinder6
|
[private]
|
TCallbackAction
iCallbackAction
TBool
iCallbackEnabled
TBool
|
iCallbackEnabled
|
[private]
|
TUint8 * iCallbackIETFRequestPacket
TUint8
*
|
iCallbackIETFRequestPacket
|
[private]
|
TInt
iCallbackIETFRequestPacketLen
TInt
|
iCallbackIETFRequestPacketLen
|
[private]
|
TCallbackIETFRequestType
iCallbackIETFRequestType
TUint8 * iCallbackInfo
TUint8
*
|
iCallbackInfo
|
[private]
|
TInt
iCallbackInfoLen
TInt
|
iCallbackInfoLen
|
[private]
|
TBool
iCallbackRequestGranted
TBool
|
iCallbackRequestGranted
|
[private]
|
TInt
iConsecMagic
TInt
|
iConsecMagic
|
[private]
|
CObjectConIx * iContainerForDlls
const CCredentialsConfig * iCredentials
TBool
iDoExternalIPConfiguration
TBool
|
iDoExternalIPConfiguration
|
[private]
|
Whether we are configured to do Mobile IP
TBool
iDoLcpExts
TBool
|
iDoLcpExts
|
[private]
|
Whether certain extended PPP options from RFC 1570 are to be handled
TInt
iError
The reason the link is going down
TBool
iGotCallbackInfo
TBool
|
iGotCallbackInfo
|
[private]
|
Authentication protocol object Whether CBCP configuration has been read
TBool
iInitialised
TBool
|
iInitialised
|
[private]
|
Messages::TNodeSignal::TMessageId
iLastRequest
The last request received
TBool
iLastRequestErrored
TBool
|
iLastRequestErrored
|
[private]
|
Elements::TStateChange
iLastStateChange
CPppLcpConfig::TPppLinkMode
iLinkMode
Whether we are configured for client or server mode
TUint
iLocMagicNumber
TUint
|
iLocMagicNumber
|
[private]
|
TMeshMachineFlowState
iMMState
TInt
iMaxRecvSize
TInt
|
iMaxRecvSize
|
[private]
|
TInt
iMaxSendSize
TInt
|
iMaxSendSize
|
[private]
|
TInt
iNcpUpCount
TInt
|
iNcpUpCount
|
[private]
|
TInt
iOpenCount
TInt
|
iOpenCount
|
[private]
|
Number of times PppOpen has been called without a corresponding PppClose
CPppAcp * iPppAcp
CPppAcp *
|
iPppAcp
|
[private]
|
Authentication protocol framework object
const CPppProvisionInfo * iPppAgentProvision
const
CPppProvisionInfo
*
|
iPppAgentProvision
|
[private]
|
const CPppAuthConfig * iPppAuthConfig
CPppCcp * iPppCcp
CPppCcp *
|
iPppCcp
|
[private]
|
IP Protocol The Compression Control Protocol object
const CPppLcpConfig * iPppLcpConfig
CPppLrd * iPppLrd
CPppLrd *
|
iPppLrd
|
[private]
|
Link quality checking object
CPppMsCbcpClient * iPppMsCbcp
CPppMsCbcpClient *
|
iPppMsCbcp
|
[private]
|
const CIPConfig * iPppNcpConfig
TBool
iRecursive
TBool
|
iRecursive
|
[private]
|
HBufC8 * iRecvIdentification
HBufC8
*
|
iRecvIdentification
|
[private]
|
TTime
iRecvTimeNotification
TTime
|
iRecvTimeNotification
|
[private]
|
HBufC8 * iRecvTimeRemMessage
HBufC8
*
|
iRecvTimeRemMessage
|
[private]
|
TTimeIntervalSeconds
iRecvTimeRemaining
TDblQue< MPppRecvr > iRecvrList
List of objects that can receive incoming packets
TUint
iRemMagicNumber
TUint
|
iRemMagicNumber
|
[private]
|
TInt
iSavedError
TInt
|
iSavedError
|
[private]
|
TBool
iSentIdle
TBool
|
iSentIdle
|
[private]
|
MNifIfNotify::TAction
iTerminateAction
The action to take once the link goes down
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.