24 #include <in_iface.h> |
24 #include <in_iface.h> |
25 #include "RawIPFlow.h" |
25 #include "RawIPFlow.h" |
26 #include "IPv6Binder.h" |
26 #include "IPv6Binder.h" |
27 #include <comms-infras/linkprovision.h> |
27 #include <comms-infras/linkprovision.h> |
28 #include <e32hal.h> |
28 #include <e32hal.h> |
29 |
29 #include <u32hal.h> |
30 |
30 |
31 using namespace ESock; |
31 using namespace ESock; |
32 #ifdef WCDMA_STUB |
32 #ifdef WCDMA_STUB |
33 #include <networking/umtsnifcontrolif.h> |
33 #include <networking/umtsnifcontrolif.h> |
34 #endif |
34 #endif |
35 |
35 |
36 #define LOG_IP_ADDRESS(desc,addr) _LOG_L2C5(_L8(" " desc " = %d:%d:%d:%d from context"), \ |
36 #define LOG_IP_ADDRESS(desc,addr) _LOG_L2C5(_L8(" " desc " = %d:%d:%d:%d from context"), \ |
37 addr.u.iAddr32[3], addr.u.iAddr32[2], addr.u.iAddr32[1], addr.u.iAddr32[0]); |
37 addr.u.iAddr32[3], addr.u.iAddr32[2], addr.u.iAddr32[1], addr.u.iAddr32[0]); |
|
38 |
|
39 #ifdef __EABI__ |
|
40 // Patch data is used and KMtuIPv6 and KRMtuIPv6 can be modified to a different value in RawIpNif.iby file |
|
41 extern const TInt KMtuIPv6 = KDefaultMtu; |
|
42 extern const TInt KRMtuIPv6 = KDefaultMtu; |
|
43 #endif |
38 |
44 |
39 CIPv6Binder::CIPv6Binder(CRawIPFlow& aFlow, CBttLogger* aTheLogger) |
45 CIPv6Binder::CIPv6Binder(CRawIPFlow& aFlow, CBttLogger* aTheLogger) |
40 /** |
46 /** |
41 * Constructor |
47 * Constructor |
42 */ |
48 */ |
162 } |
168 } |
163 |
169 |
164 config->iFamily = KAfInet6; /* KAfInet6 - selects TBinderConfig6 */ |
170 config->iFamily = KAfInet6; /* KAfInet6 - selects TBinderConfig6 */ |
165 |
171 |
166 config->iInfo.iFeatures = KIfCanBroadcast | KIfCanMulticast; /* Feature flags */ |
172 config->iInfo.iFeatures = KIfCanBroadcast | KIfCanMulticast; /* Feature flags */ |
167 config->iInfo.iMtu = KDefaultMtu; /* Maximum transmission unit. */ |
173 |
168 config->iInfo.iRMtu = KDefaultMtu; /* Maximum transmission unit for receiving. */ |
174 #if defined __EABI__ |
|
175 // Default value for Tx and Rx packet size |
|
176 config->iInfo.iMtu = KMtuIPv6; |
|
177 config->iInfo.iRMtu = KRMtuIPv6; |
|
178 #else // WINS |
|
179 // Set default values in case patch is not present in epoc.ini |
|
180 config->iInfo.iMtu = KDefaultMtu; |
|
181 config->iInfo.iRMtu = KDefaultMtu; |
|
182 |
|
183 // for the emulator process is patched via the epoc.ini file |
|
184 UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"rawip_KMtuIPv6",&(config->iInfo.iMtu)); |
|
185 UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"rawip_KRMtuIPv6",&(config->iInfo.iRMtu)); |
|
186 #endif |
|
187 |
169 config->iInfo.iSpeedMetric = iSpeedMetric; /* approximation of the interface speed in Kbps. */ |
188 config->iInfo.iSpeedMetric = iSpeedMetric; /* approximation of the interface speed in Kbps. */ |
170 |
189 |
171 TEui64Addr& localId = TEui64Addr::Cast(config->iLocalId); |
190 TEui64Addr& localId = TEui64Addr::Cast(config->iLocalId); |
172 localId = iSettings.iLocalIfId; |
191 localId = iSettings.iLocalIfId; |
173 config->iNameSer1.SetAddress(iSettings.iPrimaryDns); /* IP primary name server (if any). */ |
192 config->iNameSer1.SetAddress(iSettings.iPrimaryDns); /* IP primary name server (if any). */ |