wlan_bearer/wlannwif/inc/CLanIp4Bearer.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Defines LanIp4Bearer class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 6 %
       
    20 */
       
    21 
       
    22 #ifndef CLANIP4BEARER_H
       
    23 #define CLANIP4BEARER_H
       
    24 
       
    25 #include "CLanxBearer.h"
       
    26 #include "WlanProvision.h"
       
    27 
       
    28 
       
    29 NONSHARABLE_CLASS(CLanIp4Bearer) : public CLanxBearer
       
    30 {
       
    31 public:
       
    32 	CLanIp4Bearer(CLANLinkCommon* aLink);
       
    33 	virtual void ConstructL();
       
    34 	
       
    35 	virtual TInt Control(TUint aLevel,TUint aName,TDes8& aOption);
       
    36 	virtual ESock::MLowerDataSender::TSendResult Send(RMBufChain& aPdu);
       
    37 	
       
    38 	// we need to override StartSending in CLanIp4Bearer, because of Dhcp.
       
    39 	virtual void StartSending(CProtocolBase* aProtocol);
       
    40 	
       
    41 	// CLanxBearer
       
    42 	virtual TInt GetConfig(TBinderConfig& aConfig);
       
    43 
       
    44 	//Additional methods.
       
    45 	// Perhaps need different version of this
       
    46 	virtual TBool WantsProtocol(TUint16 aProtocolCode,const TUint8* aPayload);	
       
    47 	virtual void Process(RMBufChain& aPdu);
       
    48 
       
    49 	// Utilities
       
    50 	virtual const TDesC8& ProtocolName() const;
       
    51 	
       
    52 	// Support for provisioning
       
    53 	virtual void SetProvisionL(const Meta::SMetaData* aProvision);
       
    54 
       
    55 private:
       
    56 	void ReadCommDbLanSettingsL();
       
    57 	
       
    58 	enum {KIPProtocol=0x800, KIP4Protocol=4};
       
    59 	// 32-bit addresses in IPv4.
       
    60   	TUint32				iLocalAddr;
       
    61   	TUint32				iNetMask;
       
    62   	TUint32				iBroadcastAddr;
       
    63   	TUint32				iDefGateway;
       
    64   	TUint32				iPrimaryDns;
       
    65   	TUint32				iSecondaryDns;
       
    66   	TBool				iBroadcastConfigured;
       
    67   	
       
    68 	TBool				iArpMsgNext;
       
    69 	  	
       
    70   	const TLanIp4Provision* iProvision;
       
    71 };
       
    72 
       
    73 inline CLanIp4Bearer::CLanIp4Bearer(CLANLinkCommon* aLink) : 
       
    74    CLanxBearer(aLink)
       
    75 {
       
    76 }
       
    77 
       
    78 #endif // CLANIP4BEARER_H