|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Class CIkev2NatT implements NAT Traversal functionality specified in IKEv2. |
|
16 * |
|
17 */ |
|
18 #ifndef _IKEV2NATT_H_ |
|
19 #define _IKEV2NATT_H_ |
|
20 |
|
21 class TNotifPayloadIkev2; |
|
22 class TInetAddr; |
|
23 |
|
24 class CIkev2NatT : public CBase |
|
25 { |
|
26 public: |
|
27 CIkev2NatT(){}; |
|
28 static CIkev2NatT* NewL(const TInetAddr& aSourceAddr, const TInetAddr& aDestinationAddr, TUint16 aPort, |
|
29 const TDesC8& aInitiatorSpi, const TDesC8& aResponderSpi); |
|
30 ~CIkev2NatT() {delete iSrcNotify; delete iDstNotify; } |
|
31 |
|
32 static TUint32 CheckPeerNotifysL(const CArrayFixFlat<TNotifPayloadIkev2*>& aNotifys, |
|
33 const TInetAddr& aLocalAddr, const TInetAddr& aRemoteAddr, TUint16 aPort, |
|
34 const TDesC8& aInitiatorSpi, const TDesC8& aResponderSpi, TBool& aSupported); |
|
35 TPtrC8 SourceNofify() const { return *iSrcNotify;} |
|
36 TPtrC8 DestinNofify() const { return *iDstNotify;} |
|
37 |
|
38 private: |
|
39 void ConstructL(const TInetAddr& aSourceAddr, const TInetAddr& aDestinationAddr, TUint16 aPort, |
|
40 const TDesC8& aInitiatorSpi, const TDesC8& aResponderSpi); |
|
41 |
|
42 HBufC8* GenerateNatDetectionHashL(const TDesC8& aInitiatorSpi, const TDesC8& aResponderSpi, |
|
43 TInetAddr aIpAddress, TUint16 aPort) const; |
|
44 |
|
45 HBufC8* iSrcNotify; |
|
46 HBufC8* iDstNotify; |
|
47 }; |
|
48 |
|
49 #endif |