// PPPLOG.H
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

#if !defined(__PPPLOG_H__)
#define __PPPLOG_H__

//#define _LOG

#include "log.h"
#if defined(_LOG)

#include <e32std.h>
#include <e32base.h>
#include "pppbase.h"

class PppLog
	{
public:
	static void DumpPhase(TPppPhase aOldPhase, TPppPhase aNewPhase);
	static void DumpState(const TText* aFsm, TPppFsmState aOldState, TPppFsmState aNewState);
	static void Dump(RMBufChain& aPacket, TUint aChannel);
	static TInt DumpLcp(TPtrC& aDes);
	static TInt DumpPap(TPtrC& aDes);
	static TInt DumpChap(TPtrC& aDes);
	static TInt DumpCbcp(TPtrC& aDes);
	static TInt DumpLcpOption(TPtrC& aDes);
	static TInt DumpIpcp(TPtrC& aDes);
	static TInt DumpIpcpOption(TPtrC& aDes);
	static void DumpChapType(const TUint8* aPtr);

	static TInt DumpCcp(TPtrC& aDes);
	static TInt DumpCcpOption(TPtrC& aDes);
	static void DumpBytes(const TText* aMargin, const TUint8* aPtr, TInt aLen);
	static TInt DumpIp(TPtrC& aDes);
	static TInt DumpVjUncompTcp(TPtrC& aDes);
	static TInt DumpVjCompTcp(TPtrC& aDes);
	static TUint16 DecodeDelta(TUint8 * & aPtr);
	static TInt16 DecodeSignedDelta(TUint8 * & aPtr);
	static TInt DumpTcp(TPtrC& aDes, TUint32 aSrcA, TUint32 aDstA, TInt aLength);
	static TInt DumpIcmp(TPtrC& aDes, TInt aLength);
	static TInt DumpUdp(TPtrC& aDes, TUint32 aSrcA, TUint32 aDstA, TInt aLength);
	static TInt DumpDns(TPtrC& aDes, TInt aLength);
	//
	static const TText* ProtocolToText(TUint aValue);
	static const TText* PhaseToText(TPppPhase aPhase);
	static const TText* StateToText(TPppFsmState aState);
	static const TText* LcpCodeToText(TUint aValue);
	static const TText* LcpOptToText(TUint aValue);
	static const TText* FsmCodeToText(TUint aValue);
	static const TText* CallbackOpToText(TUint aValue);
	static const TText* PapCodeToText(TUint aValue);
	static const TText* ChapCodeToText(TUint aValue);
	static const TText* CbcpCodeToText(TUint aValue);
	static const TText* IpcpCodeToText(TUint aValue);
	static const TText* CcpCodeToText(TUint aValue);
	static const TText* IpProtocolToText(TUint aValue);
	};

#endif

#endif
