|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #ifndef __LEGACY_LOOPBACK_VAR_H__ |
|
18 #define __LEGACY_LOOPBACK_VAR_H__ |
|
19 |
|
20 #include <in_sock.h> |
|
21 /** |
|
22 some port number not likely to be used by anyone else |
|
23 @internalTechnology |
|
24 */ |
|
25 const TUint KLegacyLoopbackCmdPort = 0xAB; |
|
26 |
|
27 /** |
|
28 @internalTechnology |
|
29 */ |
|
30 enum TLegacyLoopbackCommands |
|
31 { |
|
32 KForceReconnect = 0xFE, |
|
33 KSendNotification = 0xFD, |
|
34 KForceDisconnect = 0xFC, |
|
35 KForceFinishedSelection = 0xFB, |
|
36 KForceBinderError = 0xFA, |
|
37 KColourDataByLinkTierAccessPointId = 0xF9 |
|
38 }; |
|
39 |
|
40 |
|
41 /** Range of ports reflected through the loopback driver with the addresses swapped, ports intact [suitable for TCP to talk to self] |
|
42 */ |
|
43 const TUint KDriverReflectionRangeStartPort = 5000; |
|
44 const TUint KDriverReflectionRangeEndPort = 5099; |
|
45 |
|
46 /** Range of ports reflected through the DummyNif bearer protocol with the addresses swapped, ports intact [suitable for TCP to talk to self] |
|
47 */ |
|
48 const TUint KBearerReflectionRangeStartPort = 5100; |
|
49 const TUint KBearerReflectionRangeEndPort = 5199; |
|
50 |
|
51 |
|
52 /** |
|
53 @internalTechnology |
|
54 */ |
|
55 // address ranges for different nifs (all variants of dummy) |
|
56 const TUint32 KLegacyLoopbackLocalAddressBase = INET_ADDR(10,1,1,0); |
|
57 |
|
58 |
|
59 /** |
|
60 @internalTechnology |
|
61 */ |
|
62 // Class C host id that the Dummy/Hungry Nifs will never allocate as a local address |
|
63 // (10.1.1.4 and 10.2.1.4). These addresses are guaranteed not to match the (randomly |
|
64 // allocated) local address of the Dummy/Hungry Nifs and hence will avoid the situation |
|
65 // where the TCP/IP stack does a "short-cut" loopback of packets that avoid the Nifs. |
|
66 const TUint32 KLegacyLoopbackReservedHostId = 4; |
|
67 |
|
68 // return value from CNifIfLink::Send() |
|
69 const TInt KLegacyLoopbackSendOkay = 1; |
|
70 |
|
71 |
|
72 // |
|
73 // DummyNif specific Control options (Level KCOLInterface) |
|
74 // |
|
75 |
|
76 /** Base constant for options that set Nifman Idle Timeouts. Used only to define other options. |
|
77 @internalTechnology */ |
|
78 const TInt KTestSoLegacyLoopbackSetNifmanTimeout(125); |
|
79 |
|
80 /** Set Short (LastSessionClosed) Nifman Idle timeout. Level KCOLInterface. |
|
81 @internalTechnology */ |
|
82 const TInt KTestSoLegacyLoopbackNifSetLastSessionClosedTimeout( (KTestSoLegacyLoopbackSetNifmanTimeout + 1) | KConnReadUserDataBit); |
|
83 |
|
84 /** Set Medium (LastSocketClosed) Nifman Idle Timeout. Level KCOLInterface. |
|
85 @internalTechnology */ |
|
86 const TInt KTestSoLegacyLoopbackSetLastSocketClosedTimeout( (KTestSoLegacyLoopbackSetNifmanTimeout + 2) | KConnReadUserDataBit); |
|
87 |
|
88 /** Set Long (LastSocketActivity) Nifman Idle Timeout. Level KCOLInterface. |
|
89 @internalTechnology */ |
|
90 const TInt KTestSoLegacyLoopbackSetLastSocketActivityTimeout((KTestSoLegacyLoopbackSetNifmanTimeout + 3) | KConnReadUserDataBit); |
|
91 |
|
92 #endif // __LEGACY_LOOPBACK_VAR_H__ |