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 |
|
162 /* |
159 /* |
163 * A flag uset in GetDebugInfo call. |
160 * A flag uset in GetDebugInfo call. |
164 * |
161 * |
165 */ |
162 */ |
166 const TInt KConflictingPolicyInfo = (1 << 0); //< Return information about a conflicting policy |
163 const TInt KConflictingPolicyInfo = (1 << 0); //< Return information about a conflicting policy |
167 const TInt KParsingErrorInfo = (1 << 1); //< Return information about a policy parsing error |
164 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; |
|
181 |
165 |
182 /** |
166 /** |
183 * IPSec Policy API methods return the following error codes |
167 * IPSec Policy API methods return the following error codes |
184 * in the TRequestStatus parameter. |
168 * in the TRequestStatus parameter. |
185 * NOTE! The error code values below MUST be kept in sync with |
169 * NOTE! The error code values below MUST be kept in sync with |
203 ENoConflictInfoFound = -5147, |
187 ENoConflictInfoFound = -5147, |
204 ENoGatewayFound = -5148 |
188 ENoGatewayFound = -5148 |
205 }; |
189 }; |
206 |
190 |
207 typedef TPckg<TInetAddr> TInetAddrPckg; |
191 typedef TPckg<TInetAddr> TInetAddrPckg; |
208 |
|
209 |
|
210 |
192 |
211 /** |
193 /** |
212 * RIpsecPolicyServ API is used by clients to: |
194 * RIpsecPolicyServ API is used by clients to: |
213 * Users who load and unload policies |
195 * Users who load and unload policies |
214 * KMD, that needs to find out if SA proposal can be accepted |
196 * KMD, that needs to find out if SA proposal can be accepted |
416 * @param aStatus |
398 * @param aStatus |
417 * On completion, will contain an error code, see the Ipsec policy and |
399 * On completion, will contain an error code, see the Ipsec policy and |
418 * system wide error codes. |
400 * system wide error codes. |
419 */ |
401 */ |
420 IMPORT_C void AvailableSelectors(const TDesC8& aGateway, CArrayFixFlat<TIpsecSelectorInfo>* aSelectors, TRequestStatus& aStatus); |
402 IMPORT_C void AvailableSelectors(const TDesC8& aGateway, CArrayFixFlat<TIpsecSelectorInfo>* aSelectors, TRequestStatus& aStatus); |
421 |
403 private: |
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: |
|
437 void EnumerateSelectors(const TDesC8& aGateway, TInt& aCount); |
404 void EnumerateSelectors(const TDesC8& aGateway, TInt& aCount); |
438 |
405 |
439 private: |
406 private: |
440 TAny* iReserverd[4]; |
407 TAny* iReserverd[4]; |
441 }; |
408 }; |