source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/fwptypes.idl

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 13.4 KB
Line 
1cpp_quote("/**")
2cpp_quote(" * This file is part of the mingw-w64 runtime package.")
3cpp_quote(" * No warranty is given; refer to the file DISCLAIMER within this package.")
4cpp_quote(" */")
5cpp_quote("")
6cpp_quote("#include <winapifamily.h>")
7cpp_quote("")
8cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
9cpp_quote("")
10
11import "wtypes.idl";
12
13#define FWP_BYTE_ARRAY6_SIZE 6
14#define FWP_V6_ADDR_SIZE (16)
15
16cpp_quote("#define FWP_BYTE_ARRAY6_SIZE 6")
17cpp_quote("#define FWP_V6_ADDR_SIZE (16)")
18cpp_quote("#define FWP_ACTRL_MATCH_FILTER (1)")
19
20cpp_quote("")
21
22cpp_quote("#define FWP_OPTION_VALUE_ALLOW_MULTICAST_STATE (0)")
23cpp_quote("#define FWP_OPTION_VALUE_DENY_MULTICAST_STATE (1)")
24cpp_quote("#define FWP_OPTION_VALUE_ALLOW_GLOBAL_MULTICAST_STATE (2)")
25
26cpp_quote("")
27
28cpp_quote("#define FWP_OPTION_VALUE_DISABLE_LOOSE_SOURCE (0)")
29cpp_quote("#define FWP_OPTION_VALUE_ENABLE_LOOSE_SOURCE (1)")
30
31cpp_quote("")
32
33cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN8)")
34cpp_quote("#define FWP_OPTION_VALUE_DISABLE_LOCAL_ONLY_MAPPING (0)")
35cpp_quote("#define FWP_OPTION_VALUE_ENABLE_LOCAL_ONLY_MAPPING (1)")
36cpp_quote("#endif")
37
38cpp_quote("")
39
40cpp_quote("#define FWP_ACTION_FLAG_TERMINATING (0x00001000)")
41cpp_quote("#define FWP_ACTION_FLAG_NON_TERMINATING (0x00002000)")
42cpp_quote("#define FWP_ACTION_FLAG_CALLOUT (0x00004000)")
43cpp_quote("")
44cpp_quote("#define FWP_ACTION_BLOCK (0x1 | FWP_ACTION_FLAG_TERMINATING)")
45cpp_quote("#define FWP_ACTION_PERMIT (0x2 | FWP_ACTION_FLAG_TERMINATING)")
46cpp_quote("#define FWP_ACTION_CALLOUT_TERMINATING (0x3 | FWP_ACTION_FLAG_CALLOUT | FWP_ACTION_FLAG_TERMINATING)")
47cpp_quote("#define FWP_ACTION_CALLOUT_INSPECTION (0x4 | FWP_ACTION_FLAG_CALLOUT | FWP_ACTION_FLAG_NON_TERMINATING)")
48cpp_quote("#define FWP_ACTION_CALLOUT_UNKNOWN (0x5 | FWP_ACTION_FLAG_CALLOUT)")
49cpp_quote("#define FWP_ACTION_CONTINUE (0x6 | FWP_ACTION_FLAG_NON_TERMINATING)")
50cpp_quote("#define FWP_ACTION_NONE (0x7)")
51cpp_quote("#define FWP_ACTION_NONE_NO_MATCH (0x8)")
52
53cpp_quote("")
54
55cpp_quote("#define FWP_CONDITION_FLAG_IS_LOOPBACK (0x00000001)")
56cpp_quote("#define FWP_CONDITION_FLAG_IS_IPSEC_SECURED (0x00000002)")
57cpp_quote("#define FWP_CONDITION_FLAG_IS_REAUTHORIZE (0x00000004)")
58cpp_quote("#define FWP_CONDITION_FLAG_IS_WILDCARD_BIND (0x00000008)")
59cpp_quote("#define FWP_CONDITION_FLAG_IS_RAW_ENDPOINT (0x00000010)")
60cpp_quote("#define FWP_CONDITION_FLAG_IS_FRAGMENT (0x00000020)")
61cpp_quote("#define FWP_CONDITION_FLAG_IS_FRAGMENT_GROUP (0x00000040)")
62cpp_quote("#define FWP_CONDITION_FLAG_IS_IPSEC_NATT_RECLASSIFY (0x00000080)")
63cpp_quote("#define FWP_CONDITION_FLAG_REQUIRES_ALE_CLASSIFY (0x00000100)")
64cpp_quote("#define FWP_CONDITION_FLAG_IS_IMPLICIT_BIND (0x00000200)")
65cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN6SP1)")
66cpp_quote("#define FWP_CONDITION_FLAG_IS_REASSEMBLED (0x00000400)")
67cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN7)")
68cpp_quote("#define FWP_CONDITION_FLAG_IS_NAME_APP_SPECIFIED (0x00004000)")
69cpp_quote("#define FWP_CONDITION_FLAG_IS_PROMISCUOUS (0x00008000)")
70cpp_quote("#define FWP_CONDITION_FLAG_IS_AUTH_FW (0x00010000)")
71cpp_quote("#define FWP_CONDITION_FLAG_IS_RECLASSIFY (0x00020000)")
72cpp_quote("#define FWP_CONDITION_FLAG_IS_OUTBOUND_PASS_THRU (0x00040000)")
73cpp_quote("#define FWP_CONDITION_FLAG_IS_INBOUND_PASS_THRU (0x00080000)")
74cpp_quote("#define FWP_CONDITION_FLAG_IS_CONNECTION_REDIRECTED (0x00100000)")
75cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN8)")
76cpp_quote("#define FWP_CONDITION_FLAG_IS_PROXY_CONNECTION (0x00200000)")
77cpp_quote("#define FWP_CONDITION_FLAG_IS_APPCONTAINER_LOOPBACK (0x00400000)")
78cpp_quote("#define FWP_CONDITION_FLAG_IS_NON_APPCONTAINER_LOOPBACK (0x00800000)")
79cpp_quote("#define FWP_CONDITION_FLAG_IS_RESERVED (0x01000000)")
80cpp_quote("#define FWP_CONDITION_FLAG_IS_HONORING_POLICY_AUTHORIZE (0x02000000)")
81cpp_quote("#endif")
82
83cpp_quote("")
84
85cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_POLICY_CHANGE (0x00000001)")
86cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_NEW_ARRIVAL_INTERFACE (0x00000002)")
87cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_NEW_NEXTHOP_INTERFACE (0x00000004)")
88cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_PROFILE_CROSSING (0x00000008)")
89cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_CLASSIFY_COMPLETION (0x00000010)")
90cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_IPSEC_PROPERTIES_CHANGED (0x00000020)")
91cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_MID_STREAM_INSPECTION (0x00000040)")
92cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_SOCKET_PROPERTY_CHANGED (0x00000080)")
93cpp_quote("#define FWP_CONDITION_REAUTHORIZE_REASON_NEW_INBOUND_MCAST_BCAST_PACKET (0x00000100)")
94cpp_quote("")
95cpp_quote("#define FWP_CONDITION_SOCKET_PROPERTY_FLAG_IS_SYSTEM_PORT_RPC (0x00000001)")
96cpp_quote("#define FWP_CONDITION_SOCKET_PROPERTY_FLAG_ALLOW_EDGE_TRAFFIC (0x00000002)")
97cpp_quote("#define FWP_CONDITION_SOCKET_PROPERTY_FLAG_DENY_EDGE_TRAFFIC (0x00000004)")
98cpp_quote("")
99cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN8)")
100cpp_quote("#define FWP_CONDITION_L2_IS_NATIVE_ETHERNET (0x00000001)")
101cpp_quote("#define FWP_CONDITION_L2_IS_WIFI (0x00000002)")
102cpp_quote("#define FWP_CONDITION_L2_IS_MOBILE_BROADBAND (0x00000004)")
103cpp_quote("#define FWP_CONDITION_L2_IS_WIFI_DIRECT_DATA (0x00000008)")
104cpp_quote("#define FWP_CONDITION_L2_IS_VM2VM (0x00000010)")
105cpp_quote("#define FWP_CONDITION_L2_IS_MALFORMED_PACKET (0x00000020)")
106cpp_quote("#define FWP_CONDITION_L2_IS_IP_FRAGMENT_GROUP (0x00000040)")
107cpp_quote("#define FWP_CONDITION_L2_IF_CONNECTOR_PRESENT (0x00000080)")
108cpp_quote("#endif")
109cpp_quote("#endif")
110cpp_quote("#endif")
111
112cpp_quote("")
113
114cpp_quote("#define FWP_FILTER_ENUM_FLAG_BEST_TERMINATING_MATCH (0x00000001)")
115cpp_quote("#define FWP_FILTER_ENUM_FLAG_SORTED (0x00000002)")
116cpp_quote("#define FWP_FILTER_ENUM_FLAG_BOOTTIME_ONLY (0x00000004)")
117cpp_quote("#define FWP_FILTER_ENUM_FLAG_INCLUDE_BOOTTIME (0x00000008)")
118cpp_quote("#define FWP_FILTER_ENUM_FLAG_INCLUDE_DISABLED (0x00000010)")
119
120cpp_quote("")
121
122cpp_quote("#define FWP_FILTER_ENUM_VALID_FLAGS (FWP_FILTER_ENUM_FLAG_BEST_TERMINATING_MATCH | FWP_FILTER_ENUM_FLAG_SORTED)")
123cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN8)")
124cpp_quote("#define FWP_FILTER_ENUM_FLAG_RESERVED1 (0x00000020)")
125cpp_quote("#endif")
126
127cpp_quote("")
128
129cpp_quote("#define FWP_CALLOUT_FLAG_CONDITIONAL_ON_FLOW (0x00000001)")
130cpp_quote("#define FWP_CALLOUT_FLAG_ALLOW_OFFLOAD (0x00000002)")
131cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN7)")
132cpp_quote("#define FWP_CALLOUT_FLAG_ENABLE_COMMIT_ADD_NOTIFY (0x00000004)")
133cpp_quote("#define FWP_CALLOUT_FLAG_ALLOW_MID_STREAM_INSPECTION (0x00000008)")
134cpp_quote("#define FWP_CALLOUT_FLAG_ALLOW_RECLASSIFY (0x00000010)")
135cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN8)")
136cpp_quote("#define FWP_CALLOUT_FLAG_RESERVED1 (0x00000020)")
137cpp_quote("#define FWP_CALLOUT_FLAG_ALLOW_RSC (0x00000040)")
138cpp_quote("#define FWP_CALLOUT_FLAG_ALLOW_L2_BATCH_CLASSIFY (0x00000080)")
139cpp_quote("#endif")
140cpp_quote("#endif")
141
142cpp_quote("#ifdef __midl")
143typedef struct _LUID {
144 DWORD LowPart;
145 LONG HighPart;
146} LUID, *PLUID;
147cpp_quote("#endif")
148
149cpp_quote("")
150
151typedef UINT32 FWP_ACTION_TYPE;
152
153cpp_quote("")
154
155cpp_quote("")
156typedef [v1_enum] enum FWP_DIRECTION_ {
157 FWP_DIRECTION_OUTBOUND, FWP_DIRECTION_INBOUND, FWP_DIRECTION_MAX
158} FWP_DIRECTION;
159
160cpp_quote("")
161
162typedef [v1_enum] enum FWP_IP_VERSION_ {
163 FWP_IP_VERSION_V4, FWP_IP_VERSION_V6, FWP_IP_VERSION_NONE, FWP_IP_VERSION_MAX
164} FWP_IP_VERSION;
165
166cpp_quote("")
167
168typedef [v1_enum] enum FWP_NE_FAMILY_ {
169 FWP_AF_INET = FWP_IP_VERSION_V4, FWP_AF_INET6 = FWP_IP_VERSION_V6,
170 FWP_AF_ETHER = FWP_IP_VERSION_NONE, FWP_AF_NONE
171} FWP_AF;
172
173cpp_quote("")
174
175typedef [v1_enum] enum FWP_ETHER_ENCAP_METHOD_ {
176 FWP_ETHER_ENCAP_METHOD_ETHER_V2 = 0, FWP_ETHER_ENCAP_METHOD_SNAP = 1,
177 FWP_ETHER_ENCAP_METHOD_SNAP_W_OUI_ZERO = 3
178} FWP_ETHER_ENCAP_METHOD;
179
180cpp_quote("")
181
182typedef [v1_enum] enum FWP_DATA_TYPE_ {
183 FWP_EMPTY, FWP_UINT8, FWP_UINT16, FWP_UINT32, FWP_UINT64,
184 FWP_INT8, FWP_INT16, FWP_INT32, FWP_INT64,
185 FWP_FLOAT, FWP_DOUBLE,
186 FWP_BYTE_ARRAY16_TYPE, FWP_BYTE_BLOB_TYPE, FWP_SID,
187 FWP_SECURITY_DESCRIPTOR_TYPE, FWP_TOKEN_INFORMATION_TYPE,
188 FWP_TOKEN_ACCESS_INFORMATION_TYPE, FWP_UNICODE_STRING_TYPE,
189 FWP_BYTE_ARRAY6_TYPE, FWP_SINGLE_DATA_TYPE_MAX = 0xff,
190 FWP_V4_ADDR_MASK, FWP_V6_ADDR_MASK, FWP_RANGE_TYPE, FWP_DATA_TYPE_MAX
191} FWP_DATA_TYPE;
192
193cpp_quote("")
194
195typedef [v1_enum] enum FWP_MATCH_TYPE_ {
196 FWP_MATCH_EQUAL, FWP_MATCH_GREATER,
197 FWP_MATCH_LESS, FWP_MATCH_GREATER_OR_EQUAL,
198 FWP_MATCH_LESS_OR_EQUAL, FWP_MATCH_RANGE,
199 FWP_MATCH_FLAGS_ALL_SET, FWP_MATCH_FLAGS_ANY_SET,
200 FWP_MATCH_FLAGS_NONE_SET, FWP_MATCH_EQUAL_CASE_INSENSITIVE,
201 FWP_MATCH_NOT_EQUAL, FWP_MATCH_TYPE_MAX
202} FWP_MATCH_TYPE;
203
204cpp_quote("")
205
206cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN8)")
207typedef [v1_enum] enum FWP_VSWITCH_NETWORK_TYPE_ {
208 FWP_VSWITCH_NETWORK_TYPE_UNKNOWN, FWP_VSWITCH_NETWORK_TYPE_PRIVATE,
209 FWP_VSWITCH_NETWORK_TYPE_INTERNAL, FWP_VSWITCH_NETWORK_TYPE_EXTERNAL
210} FWP_VSWITCH_NETWORK_TYPE;
211cpp_quote("#endif")
212
213cpp_quote("")
214
215typedef [v1_enum] enum FWP_CLASSIFY_OPTION_TYPE_ {
216 FWP_CLASSIFY_OPTION_MULTICAST_STATE, FWP_CLASSIFY_OPTION_LOOSE_SOURCE_MAPPING,
217 FWP_CLASSIFY_OPTION_UNICAST_LIFETIME, FWP_CLASSIFY_OPTION_MCAST_BCAST_LIFETIME,
218 FWP_CLASSIFY_OPTION_SECURE_SOCKET_SECURITY_FLAGS, FWP_CLASSIFY_OPTION_SECURE_SOCKET_AUTHIP_MM_POLICY_KEY,
219 FWP_CLASSIFY_OPTION_SECURE_SOCKET_AUTHIP_QM_POLICY_KEY, FWP_CLASSIFY_OPTION_LOCAL_ONLY_MAPPING,
220 FWP_CLASSIFY_OPTION_MAX
221} FWP_CLASSIFY_OPTION_TYPE;
222
223cpp_quote("")
224
225typedef [v1_enum] enum FWP_FILTER_ENUM_TYPE_ {
226 FWP_FILTER_ENUM_FULLY_CONTAINED, FWP_FILTER_ENUM_OVERLAPPING, FWP_FILTER_ENUM_TYPE_MAX
227} FWP_FILTER_ENUM_TYPE;
228
229cpp_quote("")
230
231typedef struct FWP_BYTE_ARRAY6_ {
232 UINT8 byteArray6[6];
233} FWP_BYTE_ARRAY6;
234cpp_quote("")
235typedef struct FWP_BYTE_ARRAY16_ {
236 UINT8 byteArray16[16];
237} FWP_BYTE_ARRAY16;
238
239cpp_quote("")
240
241typedef struct FWP_BYTE_BLOB_ {
242 UINT32 size;
243 [size_is(size), unique] UINT8 *data;
244} FWP_BYTE_BLOB;
245
246cpp_quote("")
247
248typedef struct FWP_TOKEN_INFORMATION_ {
249 ULONG sidCount;
250 [size_is(sidCount)] PSID_AND_ATTRIBUTES sids;
251 ULONG restrictedSidCount;
252 [size_is(restrictedSidCount)] PSID_AND_ATTRIBUTES restrictedSids;
253} FWP_TOKEN_INFORMATION;
254
255cpp_quote("")
256
257typedef struct FWP_VALUE0_ {
258 FWP_DATA_TYPE type;
259 [switch_type(FWP_DATA_TYPE), switch_is(type)]
260 union {
261 [case(FWP_EMPTY)]
262 ;
263 [case(FWP_UINT8)]
264 UINT8 uint8;
265 [case(FWP_UINT16)]
266 UINT16 uint16;
267 [case(FWP_UINT32)]
268 UINT32 uint32;
269 [case(FWP_UINT64)]
270 [unique] UINT64 *uint64;
271 [case(FWP_INT8)]
272 INT8 int8;
273 [case(FWP_INT16)]
274 INT16 int16;
275 [case(FWP_INT32)]
276 INT32 int32;
277 [case(FWP_INT64)]
278 [unique] INT64 *int64;
279 [case(FWP_FLOAT)]
280 float float32;
281 [case(FWP_DOUBLE)]
282 [unique] double *double64;
283 [case(FWP_BYTE_ARRAY16_TYPE)]
284 [unique] FWP_BYTE_ARRAY16 *byteArray16;
285 [case(FWP_BYTE_BLOB_TYPE)]
286 [unique] FWP_BYTE_BLOB *byteBlob;
287 [case(FWP_SID)]
288 [unique] SID *sid;
289 [case(FWP_SECURITY_DESCRIPTOR_TYPE)]
290 [unique] FWP_BYTE_BLOB *sd;
291 [case(FWP_TOKEN_INFORMATION_TYPE)]
292 [unique] FWP_TOKEN_INFORMATION *tokenInformation;
293 [case(FWP_TOKEN_ACCESS_INFORMATION_TYPE)]
294 [unique] FWP_BYTE_BLOB *tokenAccessInformation;
295 [case(FWP_UNICODE_STRING_TYPE)]
296 [string] LPWSTR unicodeString;
297 [case(FWP_BYTE_ARRAY6_TYPE)]
298 [unique] FWP_BYTE_ARRAY6 *byteArray6;
299 };
300} FWP_VALUE0;
301
302cpp_quote("")
303
304typedef struct FWP_V4_ADDR_AND_MASK_ {
305 UINT32 addr;
306 UINT32 mask;
307} FWP_V4_ADDR_AND_MASK;
308
309cpp_quote("")
310
311typedef struct FWP_V6_ADDR_AND_MASK_ {
312 UINT8 addr[FWP_V6_ADDR_SIZE];
313 UINT8 prefixLength;
314} FWP_V6_ADDR_AND_MASK;
315
316cpp_quote("")
317
318typedef struct FWP_RANGE0_ {
319 FWP_VALUE0 valueLow;
320 FWP_VALUE0 valueHigh;
321} FWP_RANGE0;
322
323cpp_quote("")
324
325typedef struct FWP_CONDITION_VALUE0_ {
326 FWP_DATA_TYPE type;
327 [switch_type(FWP_DATA_TYPE), switch_is(type)]
328 union {
329 [case(FWP_EMPTY)]
330 ;
331 [case(FWP_UINT8)]
332 UINT8 uint8;
333 [case(FWP_UINT16)]
334 UINT16 uint16;
335 [case(FWP_UINT32)]
336 UINT32 uint32;
337 [case(FWP_UINT64)]
338 [unique] UINT64 *uint64;
339 [case(FWP_INT8)]
340 INT8 int8;
341 [case(FWP_INT16)]
342 INT16 int16;
343 [case(FWP_INT32)]
344 INT32 int32;
345 [case(FWP_INT64)]
346 [unique] INT64 *int64;
347 [case(FWP_FLOAT)]
348 float float32;
349 [case(FWP_DOUBLE)]
350 [unique] double *double64;
351 [case(FWP_BYTE_ARRAY16_TYPE)]
352 [unique] FWP_BYTE_ARRAY16 *byteArray16;
353 [case(FWP_BYTE_BLOB_TYPE)]
354 [unique] FWP_BYTE_BLOB *byteBlob;
355 [case(FWP_SID)]
356 [unique] SID *sid;
357 [case(FWP_SECURITY_DESCRIPTOR_TYPE)]
358 [unique] FWP_BYTE_BLOB *sd;
359 [case(FWP_TOKEN_INFORMATION_TYPE)]
360 [unique] FWP_TOKEN_INFORMATION *tokenInformation;
361 [case(FWP_TOKEN_ACCESS_INFORMATION_TYPE)]
362 [unique] FWP_BYTE_BLOB *tokenAccessInformation;
363 [case(FWP_UNICODE_STRING_TYPE)]
364 [string] LPWSTR unicodeString;
365 [case(FWP_BYTE_ARRAY6_TYPE)]
366 [unique] FWP_BYTE_ARRAY6 *byteArray6;
367 [case(FWP_V4_ADDR_MASK)]
368 [unique] FWP_V4_ADDR_AND_MASK *v4AddrMask;
369 [case(FWP_V6_ADDR_MASK)]
370 [unique] FWP_V6_ADDR_AND_MASK *v6AddrMask;
371 [case(FWP_RANGE_TYPE)]
372 [unique] FWP_RANGE0 *rangeValue;
373 };
374} FWP_CONDITION_VALUE0;
375
376cpp_quote("")
377
378cpp_quote("#endif /* WINAPI_PARTITION_DESKTOP. */")
Note: See TracBrowser for help on using the repository browser.