networksecurity/ipsec/ipsecpolapi/inc/ipsecpolapi.h
branchRCL_3
changeset 58 8d540f55e491
parent 57 abbed5a4b42a
child 75 c1029e558ef5
equal deleted inserted replaced
57:abbed5a4b42a 58:8d540f55e491
   154  * The flags can be combined with the binary OR operator.
   154  * The flags can be combined with the binary OR operator.
   155  */
   155  */
   156 const TInt KAddIkeBypassSelectors =  (1 << 0);   //< Add IKE bypass selectors to the policy
   156 const TInt KAddIkeBypassSelectors =  (1 << 0);   //< Add IKE bypass selectors to the policy
   157 const TInt KAddIpsecBypassSelectors =  (1 << 1); //< Add an bypass selector for traffic identified with a TIpsecSelectorInfo structure
   157 const TInt KAddIpsecBypassSelectors =  (1 << 1); //< Add an bypass selector for traffic identified with a TIpsecSelectorInfo structure
   158 const TInt KAddDhcpBypassSelectors =  (1 << 2);  //< Add DHCP bypass selectors to the policy
   158 const TInt KAddDhcpBypassSelectors =  (1 << 2);  //< Add DHCP bypass selectors to the policy
       
   159 
       
   160 const TInt KAddUMAExceptionSelectors = (1<<3);   ///< Add UMA information to the policy
       
   161 
   159 /*
   162 /*
   160  * A flag uset in GetDebugInfo call.
   163  * A flag uset in GetDebugInfo call.
   161  *
   164  *
   162  */
   165  */
   163 const TInt KConflictingPolicyInfo =  (1 << 0);   //< Return information about a conflicting policy
   166 const TInt KConflictingPolicyInfo =  (1 << 0);   //< Return information about a conflicting policy
   164 const TInt KParsingErrorInfo =  (1 << 1);        //< Return information about a policy parsing error
   167 const TInt KParsingErrorInfo =  (1 << 1);        //< Return information about a policy parsing error
       
   168 
       
   169 /**
       
   170  * An integer constant which identifies an option.Level
       
   171  *
       
   172  **/
       
   173 const TInt KOptionLevelDefault = 0x1000;
       
   174 
       
   175 
       
   176 /**
       
   177  * An integer constant which identifies an option.
       
   178  *
       
   179  **/
       
   180 const TInt KOptionNameSid = 0x1020;
   165 
   181 
   166 /**
   182 /**
   167  * IPSec Policy API methods return the following error codes
   183  * IPSec Policy API methods return the following error codes
   168  * in the TRequestStatus parameter.
   184  * in the TRequestStatus parameter.
   169  * NOTE! The error code values below MUST be kept in sync with
   185  * NOTE! The error code values below MUST be kept in sync with
   187     ENoConflictInfoFound        = -5147,
   203     ENoConflictInfoFound        = -5147,
   188     ENoGatewayFound				= -5148
   204     ENoGatewayFound				= -5148
   189     };
   205     };
   190 
   206 
   191 typedef TPckg<TInetAddr> TInetAddrPckg;
   207 typedef TPckg<TInetAddr> TInetAddrPckg;
       
   208 
       
   209 
   192 
   210 
   193 /**
   211 /**
   194  * RIpsecPolicyServ API is used by clients to:
   212  * RIpsecPolicyServ API is used by clients to:
   195  *    Users who load and unload policies
   213  *    Users who load and unload policies
   196  *    KMD, that needs to find out if SA proposal can be accepted
   214  *    KMD, that needs to find out if SA proposal can be accepted
   398      *  @param aStatus
   416      *  @param aStatus
   399 	 *		On completion, will contain an error code, see the Ipsec policy and 
   417 	 *		On completion, will contain an error code, see the Ipsec policy and 
   400 	 *		system wide error codes.
   418 	 *		system wide error codes.
   401      */ 
   419      */ 
   402     IMPORT_C void AvailableSelectors(const TDesC8& aGateway, CArrayFixFlat<TIpsecSelectorInfo>* aSelectors, TRequestStatus& aStatus);
   420     IMPORT_C void AvailableSelectors(const TDesC8& aGateway, CArrayFixFlat<TIpsecSelectorInfo>* aSelectors, TRequestStatus& aStatus);
   403 private:
   421 
       
   422 	/**
       
   423 	 *Sets an option.
       
   424 	 *RIpsecPolicyServ implementations may provide options that can be set with this method.
       
   425 	 *Eg:- Seting SID of an appliction that is going to load policy file. Then that application
       
   426 	 *Can call this api with option name 'KOptionLevelDefault' and option level 'KOptionNameSid' and provide the SID value.
       
   427 	 *
       
   428 	 *@param aOptionName : An integer constant which identifies an option
       
   429 	 *@param aOptionLevel  : An integer constant which identifies level of an option 
       
   430 	 *@param aOption  : An option value as descriptor
       
   431 	 *@return TInt:	KErrNone if succsess 
       
   432 	 */
       
   433 	IMPORT_C TInt SetOpt(TUint aOptionName, TUint aOptionLevel, const TDesC8 &aOption);
       
   434 
       
   435 
       
   436 private:	
   404 	void EnumerateSelectors(const TDesC8& aGateway, TInt& aCount);
   437 	void EnumerateSelectors(const TDesC8& aGateway, TInt& aCount);
   405 
   438 
   406 private:
   439 private:
   407 	TAny* iReserverd[4];
   440 	TAny* iReserverd[4];
   408     };
   441     };