|
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 // Provides constants common across DHCPIv6 implementation |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file DHCPIP6_Std.h |
|
20 */ |
|
21 |
|
22 #ifndef DHCPIP6_STD_H |
|
23 #define DHCPIP6_STD_H |
|
24 |
|
25 /*The RFC 3315 says |
|
26 Because of the risk of denial of service attacks against DHCP |
|
27 clients, the use of a security mechanism is mandated in Reconfigure |
|
28 messages. The server MUST use DHCP authentication in the Reconfigure |
|
29 message. |
|
30 |
|
31 The following macro enables DHCP client to accept Reconfigure even though |
|
32 we don't support authentication yet |
|
33 The macro should be removed once we have authentication sorted out |
|
34 */ |
|
35 #define DHCP_RECONFIGURE_NO_AUTHENTICATION |
|
36 |
|
37 #include <e32def.h> |
|
38 |
|
39 #include <es_sock.h> |
|
40 #include <es_enum.h> |
|
41 #include <in_sock.h> |
|
42 #include <cflog.h> |
|
43 |
|
44 #ifdef _DEBUG |
|
45 const TUint KDhcpv6WrongSrcPort = 34; |
|
46 const TUint KDhcpv6WrongDestPort = 33; |
|
47 #else |
|
48 const TUint KDhcpv6SrcPort = 546; |
|
49 const TUint KDhcpv6DestPort = 547; |
|
50 #endif |
|
51 const TUint KDhcpInitMsgSizeIP6 = 576; |
|
52 |
|
53 /** |
|
54 * constants used to generated Interface Association IDs (IA_NA IAID & IA_TA IAID) |
|
55 */ |
|
56 const TUint32 KDHCPv6IA_NANumberSpaceMin = 0x0001; |
|
57 const TUint32 KDHCPv6IA_NANumberSpaceMax = 0xFFFF; |
|
58 const TUint32 KDHCPv6IA_TANumberSpaceMin = 0x1FFFF; |
|
59 const TUint32 KDHCPv6IA_TANumberSpaceMax = 0xFFFFFFFF; |
|
60 |
|
61 const TInt KIp6AddressLength = 16; //bytes |
|
62 |
|
63 /** IPv6 address constants |
|
64 All_DHCP_Relay_Agents_and_Servers address: FF02::1:2 |
|
65 All_DHCP_Servers address: FF05::1:3 |
|
66 */ |
|
67 const TIp6Addr KDHCPv6Servers = {{{0xff,0x05,0,0,0,0,0,0,0,0,0,0,0,1,0,3}}}; |
|
68 const TIp6Addr KDHCPv6RelayAgentsNServers = {{{0xff,0x02,0,0,0,0,0,0,0,0,0,0,0,1,0,2}}}; |
|
69 |
|
70 #endif // __DHCPIP6_STD_H__ |
|
71 |