kernel-wfp: Configure ports for SAs using UDP encapsulation
[strongswan.git] / src / libcharon / plugins / kernel_wfp / kernel_wfp_compat.h
1 /*
2 * Copyright (C) 2013 Martin Willi
3 * Copyright (C) 2013 revosec AG
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup kernel_wfp_compat kernel_wfp_compat
18 * @{ @ingroup kernel_wfp
19 */
20
21 #ifndef KERNEL_WFP_COMPAT_H_
22 #define KERNEL_WFP_COMPAT_H_
23
24 #include <winsock2.h>
25 #include <windows.h>
26 #include <ipsectypes.h>
27
28 /* MinGW defines CIPHERs incorrectly starting at 0 */
29 #define IPSEC_CIPHER_TYPE_DES 1
30 #define IPSEC_CIPHER_TYPE_3DES 2
31 #define IPSEC_CIPHER_TYPE_AES_128 3
32 #define IPSEC_CIPHER_TYPE_AES_192 4
33 #define IPSEC_CIPHER_TYPE_AES_256 5
34 #define IPSEC_CIPHER_TYPE_MAX 6
35
36 #include <fwpmtypes.h>
37 #include <fwpmu.h>
38 #undef interface
39
40 /* MinGW defines TRANSFORMs incorrectly starting at 0 */
41 #define IPSEC_TRANSFORM_AH 1
42 #define IPSEC_TRANSFORM_ESP_AUTH 2
43 #define IPSEC_TRANSFORM_ESP_CIPHER 3
44 #define IPSEC_TRANSFORM_ESP_AUTH_AND_CIPHER 4
45 #define IPSEC_TRANSFORM_ESP_AUTH_FW 5
46 #define IPSEC_TRANSFORM_TYPE_MAX 6
47
48 /* missing in MinGW */
49 enum {
50 FWPM_TUNNEL_FLAG_POINT_TO_POINT = (1<<0),
51 FWPM_TUNNEL_FLAG_ENABLE_VIRTUAL_IF_TUNNELING = (1<<1),
52 };
53
54 DWORD WINAPI FwpmIPsecTunnelAdd0(HANDLE, UINT32,
55 const FWPM_PROVIDER_CONTEXT0*, const FWPM_PROVIDER_CONTEXT0*, UINT32,
56 const FWPM_FILTER_CONDITION0*, PSECURITY_DESCRIPTOR);
57
58 #endif /** KERNEL_WFP_COMPAT_H_ @}*/