linklayerprotocols/pppnif/te_ppp/te_pppcomp/src/dummyPppFsm.cpp
changeset 0 af10295192d8
child 21 abbed5a4b42a
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // dummy PPPFSM.CPP
       
    15 // 
       
    16 //
       
    17 
       
    18 #include "pppCcp.h" // for KPppIdCcp
       
    19 //#include <es_ini.h>
       
    20 
       
    21 //
       
    22 // PPP State machine
       
    23 //
       
    24 
       
    25 MPppFsm::MPppFsm(CPppLcp* aPppLcp, TPppPhase aPhase, TUint aPppId)
       
    26 	: MPppRecvr(aPppLcp, aPhase, aPppId),__iFsmName(NULL),iCurrentId(0),iTerminateId(0),
       
    27 	iRequestId(0),iRequestList(),iMaxRestartConfig(0),iRestartCount(0),iState(EPppFsmStopped),iWaitTimeConfig(0),
       
    28 	iWaitTime(0),iConsecCfgReq(0),iLastCfgReqFcs(0),iMaxFailureConfig(0),iMaxFailureCount(0),iLengthenTimers(EFalse)
       
    29 	{
       
    30 	}
       
    31 
       
    32 MPppFsm::~MPppFsm()
       
    33 	{
       
    34 	}
       
    35 
       
    36 void MPppFsm::FsmConstructL()
       
    37 	{
       
    38 	}
       
    39 
       
    40 void MPppFsm::TerminateLink()
       
    41 	{
       
    42 	}
       
    43 
       
    44 //
       
    45 // Open/Close calls from higher level protocols
       
    46 //
       
    47 
       
    48 TInt MPppFsm::FsmOpen()
       
    49 	{
       
    50 	return ETrue;
       
    51 	}
       
    52 
       
    53 void MPppFsm::FsmClose(TInt )
       
    54 	{
       
    55 	}
       
    56 
       
    57 void MPppFsm::FsmAbort(TInt )
       
    58 //
       
    59 // 29.11.00.  Changed slighty so that this does the same as RXJ- in the PPP RFC for all
       
    60 // states.
       
    61 //
       
    62 	{
       
    63 	}
       
    64 
       
    65 
       
    66 
       
    67 //
       
    68 // Upcall from Timer
       
    69 //
       
    70 
       
    71 void MPppFsm::TimerComplete(TInt /*aStatus*/)
       
    72 	{
       
    73 	}
       
    74 
       
    75 //
       
    76 // Upcalls from Recvr
       
    77 //
       
    78 
       
    79 void MPppFsm::LowerLayerUp()
       
    80 	{
       
    81 	}
       
    82 
       
    83 
       
    84 void MPppFsm::LowerLayerDown(TInt )
       
    85 	{
       
    86 	}
       
    87 
       
    88 void MPppFsm::FrameError()
       
    89 	{
       
    90 	}
       
    91 
       
    92 void MPppFsm::KillProtocol()
       
    93 	{
       
    94 	//
       
    95 	// This came to light as a result of the CCP work
       
    96 	// This happens is a protocol is told to shut down,
       
    97 	// I'm not sure how to handle it?? Do we just Stop it???
       
    98 	//
       
    99 	}
       
   100 
       
   101 TBool MPppFsm::RecvFrame(RMBufChain& )
       
   102 	{
       
   103 	return EFalse;
       
   104 	}
       
   105 	
       
   106 //
       
   107 // Rest of PPP
       
   108 //
       
   109 
       
   110 TBool MPppFsm::FsmRecvUnknownCode(TUint8 /*aCode*/, TUint8 /*aId*/, TInt /*aLength*/, RMBufChain& /*aPacket*/)
       
   111 //
       
   112 // Default implementation
       
   113 //
       
   114 	{
       
   115 	return EFalse;
       
   116 	}
       
   117 
       
   118 void MPppFsm::ProcessReject(TUint8 , TUint8 /*aId*/, TInt /* aLength */, RMBufChain& )
       
   119 //
       
   120 // If the reject rejects a code (or protocol) that should
       
   121 // be known terminate layer.
       
   122 // (Note, As the behaviour of protocol reject is the same
       
   123 // as code reject, this fn handles protocol reject for LCP)
       
   124 //
       
   125 	{
       
   126 	}
       
   127 	
       
   128 void MPppFsm::ProcessTerminate(TUint8 , TUint8 , TInt /*aLength*/, RMBufChain& /*aPacket*/)
       
   129 	{
       
   130 	}
       
   131 
       
   132 TBool MPppFsm::ProcessEmptyConfigReq()
       
   133 //
       
   134 // Handle ConfigRequest with no options
       
   135 //
       
   136 	{
       
   137 	return ETrue;
       
   138 	}
       
   139 
       
   140 void MPppFsm::ProcessConfig(TUint8 , TUint8 /*aId*/, TInt /* aLength */, RMBufChain& )
       
   141 //
       
   142 // Handle ConfigRequest, ConfigAck, ConfigNak and ConfigReject
       
   143 //
       
   144 	{
       
   145 	}
       
   146 
       
   147 void MPppFsm::SendConfigRequest()
       
   148 //
       
   149 // Send the config request in iRequestList
       
   150 //
       
   151 	{
       
   152 	}
       
   153 
       
   154 
       
   155 TInt MPppFsm::InitialiseConfigRequest()
       
   156 //
       
   157 // Delete exist request list, create a new one
       
   158 // Initialise counters for sending configs requests
       
   159 //
       
   160 	{
       
   161 	return 0;
       
   162 	}
       
   163 
       
   164 void MPppFsm::SendInitialConfigRequest()
       
   165 //
       
   166 // Initialise request list and send a request
       
   167 //
       
   168 	{
       
   169 	}
       
   170 
       
   171 TBool MPppFsm::FsmAckOptionsValid(RPppOptionList& /*aList*/, RPppOptionList& /*aRequestList*/)
       
   172 /**
       
   173 Perform validation checking on the option list of a ConfigAck or ConfigReject.
       
   174 
       
   175 @param aList option list of incoming ConfigAck or ConfigReject
       
   176 @return ETrue if options valid, else EFalse.  EFalse return causes packet to be discarded.
       
   177 */
       
   178 	{
       
   179 	return ETrue;
       
   180 	}
       
   181 TBool MPppFsm::FsmRejectOptionsValid(RPppOptionList& /*aList*/, RPppOptionList& /*aRequestList*/)
       
   182 /**
       
   183 Perform validation checking on the option list of a ConfigAck or ConfigReject.
       
   184 
       
   185 @param aList option list of incoming ConfigAck or ConfigReject
       
   186 @return ETrue if options valid, else EFalse.  EFalse return causes packet to be discarded.
       
   187 */
       
   188 	{
       
   189 	return ETrue;
       
   190 	}
       
   191 
       
   192 TBool MPppFsm::FsmConfigRequestOptionsValid(RPppOptionList& /*aList*/)
       
   193 /**
       
   194 Perform validation checking on the option list of a ConfigRequest.
       
   195 
       
   196 @param aList option list of incoming ConfigRequest
       
   197 @return ETrue if options valid, else EFalse.  EFalse return causes packet to be discarded.
       
   198 */
       
   199 	{
       
   200 	return ETrue;
       
   201 	}