tcpiputils/dhcp/include/DHCPPolicy.h
author William Roberts <williamr@symbian.org>
Wed, 10 Nov 2010 13:36:07 +0000
branchRCL_3
changeset 79 4b172931a477
parent 0 af10295192d8
permissions -rw-r--r--
Make configchange.pl run ceddump.exe with -dtextshell - Bug 3932

// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// Definitions header file for DHCP Security Policies
// 
//

/**
 @file 
*/

#ifdef SYMBIAN_NETWORKING_PLATSEC
#include <comms-infras/rconfigdaemonmess.h>
#else
#include <comms-infras\cs_daemonmess.h>
#endif

const TUint CDHCPServer::PolicyRangeCount = 2;

const TInt CDHCPServer::PolicyRanges[PolicyRangeCount] = 
	{
	EConfigDaemonConfigure,			// AlwaysPass (connect policy requires NetworkControl + NetworkServices)
	EConfigDaemonDeregister + 1			// fail (to KMaxTInt)
	};

// Index numbers into DHCPServerElements[]

const TInt policyNetwork = 0;
const TInt policyAlwaysPass = 1;

// Mapping of IPCs to policy elements
//
// NOTE: all IPCs marked to always pass once the calls have past the "connection" policy check
//		 (to improve efficiency).

const TUint8 CDHCPServer::PolicyElementsIndex[PolicyRangeCount] = 
	{
	policyAlwaysPass,				// EConfigDaemonConfigure
									// EConfigDaemonIoctl
									// EConfigDaemonCancel
									// EConfigDaemonDeregister
	CPolicyServer::ENotSupported	// EConfigDaemonDeregister + 1 to KMaxTInt
	};

// Individual policy elements

const CPolicyServer::TPolicyElement CDHCPServer::PolicyElements[] = 
	{
	{ _INIT_SECURITY_POLICY_C2(ECapabilityNetworkControl, ECapabilityNetworkServices), CPolicyServer::EFailClient },
	{ _INIT_SECURITY_POLICY_PASS },
	};

// Main policy
	
const CPolicyServer::TPolicy CDHCPServer::Policy =
	{
	policyNetwork, 	//specifies all connect attempts should use policy 0 from CDHCPServer::PolicyElements
	PolicyRangeCount,					
	PolicyRanges,
	PolicyElementsIndex,
	PolicyElements,
	};