|
1 /* |
|
2 * Copyright (c) 2008-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: VPN PFKEY extension data utility |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PFKEYEXTDATAUTIL_H |
|
20 #define PFKEYEXTDATAUTIL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 /** |
|
25 * PFKEY extension data utility class |
|
26 * |
|
27 * PFKEY extension data utility class for building generic PFKEY API extension |
|
28 * data. |
|
29 * |
|
30 * @lib ikeutils.lib |
|
31 */ |
|
32 class PFKeyExtDataUtil |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * This static method builds a generic PFKEY API extension data which is |
|
37 * needed for IPSEC do UDP encapsulation/decapsulation for ESP packet. |
|
38 * @param aExtData Generic extension data (returned) |
|
39 * @param aNAT_D_Flags NAT_D flags |
|
40 * @param aNATDetected Informs if NAT detected (local end behind NAT) |
|
41 * @param aNokiaNATProbeUsed Nokia NAT probe used |
|
42 * @param aUdpEncapsPort UDP encapsulation port |
|
43 * @param aKeepAliveTimeout Keep alive timeout |
|
44 * @param aDestinAddr Destination address |
|
45 * @param aOriginalAddr Peer original address |
|
46 */ |
|
47 EXPORT_C static void BuildUdpEncExtensionData( TDes8& aExtData, |
|
48 TUint32 aNAT_D_Flags, |
|
49 TBool aNATDetected, |
|
50 TBool aNokiaNATProbeUsed, |
|
51 TUint16 aUdpEncapsPort, |
|
52 TUint16 aKeepAliveTimeout, |
|
53 const TInetAddr& aDestinAddr, |
|
54 const TInetAddr& aOriginalAddr ); |
|
55 }; |
|
56 |
|
57 #endif // PFKEYEXTDATAUTIL_H |