networkprotocols/tcpipv4v6prt/inc/loop6.h
changeset 0 af10295192d8
child 5 1422c6cd3f0c
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2004-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 // loop6.h - loopback interface for IPv6
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 /**
       
    20  @internalComponent
       
    21 */
       
    22 #ifndef __LOOP6_H__
       
    23 #define __LOOP6_H__
       
    24 
       
    25 //
       
    26 // In Epoc R6 nifman.h has been split, CNifIfBase definition has been moved
       
    27 // into <comms-infras/nifif.h>. 
       
    28 //
       
    29 #include <nifman.h>
       
    30 #	include <comms-infras/nifif.h>	// ..for CNifIfBase in Epoc R6 and later
       
    31 #include <nifmbuf.h>
       
    32 
       
    33 const TUint KProtocolInet6Loop = 0x1F00;	// Virtual
       
    34 
       
    35 class CIfLoop6 : public CNifIfBase
       
    36 {
       
    37     public:
       
    38 	CIfLoop6();
       
    39 	virtual void ConstructL(const TDesC& aTag);
       
    40 	~CIfLoop6();
       
    41 
       
    42 	static CIfLoop6* NewL(const TDesC& aTag);
       
    43 	
       
    44 	virtual void BindL(TAny *aId);
       
    45 	virtual TInt State();
       
    46 	virtual TInt Control(TUint aLevel,TUint aName,TDes8& aOption, TAny* aSource);
       
    47 	virtual void Info(TNifIfInfo& aInfo) const;
       
    48 	virtual TInt Send(RMBufChain& aPdu, TAny* aSource);
       
    49 	virtual TInt Notification(TAgentToNifEventType /* aEvent */, void * /* aInfo */ )
       
    50 	{
       
    51 		return KErrNone;
       
    52 	};  
       
    53 	
       
    54     protected:
       
    55 	virtual void DoSend();
       
    56 	virtual void DoProcess();
       
    57 	void Loop(RMBufPacket& aTxPkt, RMBufPacket& aRxPkt);
       
    58 
       
    59     private:
       
    60 	static TInt RecvCallBack(TAny* aCProtocol);
       
    61 	static TInt SendCallBack(TAny* aCProtocol);
       
    62 
       
    63     protected:
       
    64 	CProtocolBase* iNetwork;
       
    65 	RMBufPktQ iSendQ;
       
    66 	RMBufPktQ iRecvQ;
       
    67 	CAsyncCallBack* iSendCallBack;
       
    68 	CAsyncCallBack* iRecvCallBack;
       
    69 
       
    70     private:
       
    71 	HBufC* iIfaceName;
       
    72 	TInt iIfaceMTU;
       
    73 };
       
    74 
       
    75 #endif