|
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 // Definitions header file for DHCP Security Policies |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #ifdef SYMBIAN_NETWORKING_PLATSEC |
|
23 #include <comms-infras/rconfigdaemonmess.h> |
|
24 #else |
|
25 #include <comms-infras\cs_daemonmess.h> |
|
26 #endif |
|
27 |
|
28 const TUint CDHCPServer::PolicyRangeCount = 2; |
|
29 |
|
30 const TInt CDHCPServer::PolicyRanges[PolicyRangeCount] = |
|
31 { |
|
32 EConfigDaemonConfigure, // AlwaysPass (connect policy requires NetworkControl + NetworkServices) |
|
33 EConfigDaemonDeregister + 1 // fail (to KMaxTInt) |
|
34 }; |
|
35 |
|
36 // Index numbers into DHCPServerElements[] |
|
37 |
|
38 const TInt policyNetwork = 0; |
|
39 const TInt policyAlwaysPass = 1; |
|
40 |
|
41 // Mapping of IPCs to policy elements |
|
42 // |
|
43 // NOTE: all IPCs marked to always pass once the calls have past the "connection" policy check |
|
44 // (to improve efficiency). |
|
45 |
|
46 const TUint8 CDHCPServer::PolicyElementsIndex[PolicyRangeCount] = |
|
47 { |
|
48 policyAlwaysPass, // EConfigDaemonConfigure |
|
49 // EConfigDaemonIoctl |
|
50 // EConfigDaemonCancel |
|
51 // EConfigDaemonDeregister |
|
52 CPolicyServer::ENotSupported // EConfigDaemonDeregister + 1 to KMaxTInt |
|
53 }; |
|
54 |
|
55 // Individual policy elements |
|
56 |
|
57 const CPolicyServer::TPolicyElement CDHCPServer::PolicyElements[] = |
|
58 { |
|
59 { _INIT_SECURITY_POLICY_C2(ECapabilityNetworkControl, ECapabilityNetworkServices), CPolicyServer::EFailClient }, |
|
60 { _INIT_SECURITY_POLICY_PASS }, |
|
61 }; |
|
62 |
|
63 // Main policy |
|
64 |
|
65 const CPolicyServer::TPolicy CDHCPServer::Policy = |
|
66 { |
|
67 policyNetwork, //specifies all connect attempts should use policy 0 from CDHCPServer::PolicyElements |
|
68 PolicyRangeCount, |
|
69 PolicyRanges, |
|
70 PolicyElementsIndex, |
|
71 PolicyElements, |
|
72 }; |