|
1 // Copyright (c) 2001-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 // header file for the CLanIp4Bearer implementation |
|
15 // class, a derived from CLanxBearer. |
|
16 // History |
|
17 // 15/11/01 Started by Julian Skidmore. |
|
18 // |
|
19 // |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalComponent |
|
24 */ |
|
25 |
|
26 #if !defined( CLanIp4Bearer_H ) |
|
27 #define CLanIp4Bearer_H |
|
28 |
|
29 #include "CLanxBearer.h" |
|
30 #include "EthProvision.h" |
|
31 |
|
32 /** |
|
33 @internalComponent |
|
34 */ |
|
35 const TUint32 KDefaultArpTimeoutSetting = 1800; // 30 minutes, default ARP timeout |
|
36 |
|
37 /** |
|
38 @internalComponent |
|
39 */ |
|
40 NONSHARABLE_CLASS(CLanIp4Bearer) : public CLanxBearer |
|
41 { |
|
42 public: |
|
43 CLanIp4Bearer(CLANLinkCommon* aLink); |
|
44 virtual void ConstructL(); |
|
45 //NifIfBase support. |
|
46 //virtual TInt State(); Rely on inherited. |
|
47 virtual TInt Control(TUint aLevel,TUint aName,TDes8& aOption); |
|
48 virtual ESock::MLowerDataSender::TSendResult Send(RMBufChain& aPdu); |
|
49 |
|
50 // we need to override StartSending in CLanIp4Bearer, because of Dhcp. |
|
51 virtual void StartSending(CProtocolBase* aProtocol); |
|
52 |
|
53 // CLanxBearer |
|
54 virtual TInt GetConfig(TBinderConfig& aConfig); |
|
55 |
|
56 //Additional methods. |
|
57 // Perhaps need different version of this |
|
58 virtual TBool WantsProtocol(TUint16 aProtocolCode,const TUint8* aPayload); |
|
59 virtual void Process(RMBufChain& aPdu,TAny* aLLC); |
|
60 |
|
61 // Utilities |
|
62 virtual const TDesC8& ProtocolName() const; |
|
63 |
|
64 // Support for provisioning |
|
65 virtual void SetProvisionL(const Meta::SMetaData* aProvision); |
|
66 |
|
67 private: |
|
68 void ReadCommDbLanSettingsL(); |
|
69 |
|
70 enum {KIPProtocol=0x800, KIP4Protocol=4}; |
|
71 // 32-bit addresses in IPv4. |
|
72 TUint32 iLocalAddr; |
|
73 TUint32 iNetMask; |
|
74 TUint32 iBroadcastAddr; |
|
75 TUint32 iDefGateway; |
|
76 TUint32 iPrimaryDns; |
|
77 TUint32 iSecondaryDns; |
|
78 |
|
79 const TLanIp4Provision* iProvision; |
|
80 }; |
|
81 |
|
82 inline CLanIp4Bearer::CLanIp4Bearer(CLANLinkCommon* aLink) : |
|
83 CLanxBearer(aLink) |
|
84 { |
|
85 } |
|
86 |
|
87 #endif |