equal
deleted
inserted
replaced
25 #include <e32base.h> |
25 #include <e32base.h> |
26 #include <e32std.h> |
26 #include <e32std.h> |
27 #include <f32file.h> |
27 #include <f32file.h> |
28 #include <es_sock.h> |
28 #include <es_sock.h> |
29 #include <in_sock.h> |
29 #include <in_sock.h> |
30 #include <featdiscovery.h> |
|
31 |
30 |
32 #include "ipsecpolapi.h" |
31 #include "ipsecpolapi.h" |
33 #include "ipsecpol.h" |
32 #include "ipsecpol.h" |
34 #include "autoloadlistitem.h" |
33 #include "autoloadlistitem.h" |
35 #include "log_ipsecpol.H" |
|
36 #ifdef SYMBIAN_IPSEC_VOIP_SUPPORT |
34 #ifdef SYMBIAN_IPSEC_VOIP_SUPPORT |
37 #include "spdb.h" |
35 #include "spdb.h" |
38 #endif // SYMBIAN_IPSEC_VOIP_SUPPORT |
36 #endif // SYMBIAN_IPSEC_VOIP_SUPPORT |
39 |
37 |
40 // |
38 // |
52 // |
50 // |
53 // |
51 // |
54 const TInt KDropMode = 0; // Drop mode |
52 const TInt KDropMode = 0; // Drop mode |
55 const TInt KInboundBypass = (1 << 0); // Inbound bypass mode |
53 const TInt KInboundBypass = (1 << 0); // Inbound bypass mode |
56 const TInt KOutboundBypass = (1 << 1); // Outbound bypass mode |
54 const TInt KOutboundBypass = (1 << 1); // Outbound bypass mode |
57 const TInt KSymmetricBypass = (KInboundBypass | KOutboundBypass ); // To allow UMA traffic |
|
58 |
55 |
59 // |
56 // |
60 // Forward declarations |
57 // Forward declarations |
61 // |
58 // |
62 // |
59 // |
80 TPolicyHandle iPolicyHandle; |
77 TPolicyHandle iPolicyHandle; |
81 HBufC8* iPolicyBuf; |
78 HBufC8* iPolicyBuf; |
82 TBool iActiveState; // EFalse = loaded, not active; ETrue = active |
79 TBool iActiveState; // EFalse = loaded, not active; ETrue = active |
83 TInt iBypassOrDropMode; // See flags below |
80 TInt iBypassOrDropMode; // See flags below |
84 TPolicyType iPolicyType; |
81 TPolicyType iPolicyType; |
85 TBool iException; // UMA exception |
|
86 |
|
87 }; |
82 }; |
88 typedef CArrayFixFlat<TActivePolicyListEntry*> CActivePolicyList; |
83 typedef CArrayFixFlat<TActivePolicyListEntry*> CActivePolicyList; |
89 |
84 |
90 // |
85 // |
91 // |
86 // |
187 void ApiCallCompleted(); |
182 void ApiCallCompleted(); |
188 |
183 |
189 TInt DeletePolicyFromList(); |
184 TInt DeletePolicyFromList(); |
190 |
185 |
191 TInt SearchPolicyFromListAndActivate(); |
186 TInt SearchPolicyFromListAndActivate(); |
192 |
187 |
193 TInt GetAvailableSelectors(const RMessage2& aMsg); |
188 TInt GetAvailableSelectors(const RMessage2& aMsg); |
194 TInt GetSelectorsCount(const RMessage2& aMsg); |
189 TInt GetSelectorsCount(const RMessage2& aMsg); |
195 |
190 |
196 // |
191 // |
197 // Miscallenious utilities related to building policy data |
192 // Miscallenious utilities related to building policy data |
343 void CalculateBypassOrDropMode(TBool aForLoadPolicy); |
338 void CalculateBypassOrDropMode(TBool aForLoadPolicy); |
344 |
339 |
345 //determines whether the last manual autoload policy has been unloaded |
340 //determines whether the last manual autoload policy has been unloaded |
346 TBool IsLastManualLoadPolicy(TUint32 aPolicyHandle); |
341 TBool IsLastManualLoadPolicy(TUint32 aPolicyHandle); |
347 |
342 |
348 //Exception Selectors to be loaded. |
|
349 TInt AddExceptionSelectors(); |
|
350 |
|
351 //Check for Exception policy loading. Work around done for UMA. Need to check more. |
|
352 TBool CheckException(); |
|
353 |
|
354 //Method to set the SID of the application that load policy |
|
355 void SetOptL(const RMessage2& aMsg); |
|
356 |
|
357 |
|
358 private: |
343 private: |
359 // Read the algorithms.conf file |
344 // Read the algorithms.conf file |
360 void ReadAlgorithmsFileL(); |
345 void ReadAlgorithmsFileL(); |
361 |
346 |
362 void ReadNextAutoloadPolicyL( |
347 void ReadNextAutoloadPolicyL( |
370 TInt aScopeId, |
355 TInt aScopeId, |
371 TInt aGwScopeId, |
356 TInt aGwScopeId, |
372 TBool& aIsTunnelMode); |
357 TBool& aIsTunnelMode); |
373 |
358 |
374 TInt CalculatePolicyBypassDropMode(CSecurityPolicy& aSp) const; |
359 TInt CalculatePolicyBypassDropMode(CSecurityPolicy& aSp) const; |
375 |
|
376 //UMA support |
|
377 void SearchIAPIdL( const TUint32& aNetId, TUint32& aIapId ); |
|
378 TBool CheckUMAL(TUint32 aIapId); |
|
379 void CheckFeatureSupportL(TUid aFeature);////To check a Feature flag is enabled or not |
|
380 |
|
381 /** |
|
382 *This method to check the exception. |
|
383 **/ |
|
384 void CheckUMAEXception(TUint32 aVpnNetId); |
|
385 |
|
386 |
360 |
387 public: |
361 public: |
388 |
362 |
389 // List containing all loaded policies |
363 // List containing all loaded policies |
390 CActivePolicyList* iActivePolicyList; |
364 CActivePolicyList* iActivePolicyList; |
467 |
441 |
468 // Used to retrieve the gateway address passed by client in RIpsecPolicyServ::AvailableSelectors API |
442 // Used to retrieve the gateway address passed by client in RIpsecPolicyServ::AvailableSelectors API |
469 TInetAddr iTunnel; |
443 TInetAddr iTunnel; |
470 |
444 |
471 CArrayFixFlat<TIpsecSelectorInfo>* iSelectorInfoArray; |
445 CArrayFixFlat<TIpsecSelectorInfo>* iSelectorInfoArray; |
472 |
446 }; |
473 //UMA support |
|
474 TBool iCurrentException; |
|
475 //This variable holds sid of the application that loads |
|
476 //exception policies |
|
477 TUint32 iAppSid; |
|
478 TBool iIPSecGANSupported; //To check whether FF_IPSEC_UMA_SUPPORT_ENABLE is defined and UMA supported |
|
479 }; |
|
480 |
447 |
481 #endif |
448 #endif |