Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_FWPMTYPES
      7 #define _INC_FWPMTYPES
      8 #include <fwptypes.h>
      9 #include <ipsectypes.h>
     10 #include <iketypes.h>
     11 
     12 #ifdef __cplusplus
     13 extern "C" {
     14 #endif
     15 #if (_WIN32_WINNT >= 0x0600)
     16 
     17 typedef enum FWPM_PROVIDER_CONTEXT_TYPE_ {
     18   FWPM_IPSEC_KEYING_CONTEXT,
     19   FWPM_IPSEC_IKE_QM_TRANSPORT_CONTEXT,
     20   FWPM_IPSEC_IKE_QM_TUNNEL_CONTEXT,
     21   FWPM_IPSEC_AUTHIP_QM_TRANSPORT_CONTEXT,
     22   FWPM_IPSEC_AUTHIP_QM_TUNNEL_CONTEXT,
     23   FWPM_IPSEC_IKE_MM_CONTEXT,
     24   FWPM_IPSEC_AUTHIP_MM_CONTEXT,
     25   FWPM_CLASSIFY_OPTIONS_CONTEXT,
     26   FWPM_GENERAL_CONTEXT,
     27   FWPM_IPSEC_IKEV2_QM_TUNNEL_CONTEXT,
     28   FWPM_IPSEC_IKEV2_MM_CONTEXT,
     29   FWPM_DOSP_CONTEXT,
     30   FWPM_PROVIDER_CONTEXT_TYPE_MAX
     31 } FWPM_PROVIDER_CONTEXT_TYPE;
     32 
     33 typedef enum FWPM_NET_EVENT_TYPE_ {
     34   FWPM_NET_EVENT_TYPE_IKEEXT_MM_FAILURE,
     35   FWPM_NET_EVENT_TYPE_IKEEXT_QM_FAILURE,
     36   FWPM_NET_EVENT_TYPE_IKEEXT_EM_FAILURE,
     37   FWPM_NET_EVENT_TYPE_CLASSIFY_DROP,
     38   FWPM_NET_EVENT_TYPE_IPSEC_KERNEL_DROP,
     39   FWPM_NET_EVENT_TYPE_IPSEC_DOSP_DROP,
     40   FWPM_NET_EVENT_TYPE_MAX
     41 } FWPM_NET_EVENT_TYPE;
     42 
     43 typedef struct FWPM_ACTION0_ {
     44   FWP_ACTION_TYPE type;
     45   __C89_NAMELESS union {
     46     GUID filterType;
     47     GUID calloutKey;
     48   };
     49 } FWPM_ACTION0;
     50 
     51 typedef struct FWPM_DISPLAY_DATA0_ {
     52   wchar_t *name;
     53   wchar_t *description;
     54 } FWPM_DISPLAY_DATA0;
     55 
     56 typedef struct FWPM_SESSION0_ {
     57   GUID               sessionKey;
     58   FWPM_DISPLAY_DATA0 displayData;
     59   UINT32             flags;
     60   UINT32             txnWaitTimeoutInMSec;
     61   DWORD              processId;
     62   SID                *sid;
     63   wchar_t            *username;
     64   WINBOOL            kernelMode;
     65 } FWPM_SESSION0;
     66 
     67 typedef struct FWPM_CALLOUT_ENUM_TEMPLATE0_ {
     68   GUID *providerKey;
     69   GUID layerKey;
     70 } FWPM_CALLOUT_ENUM_TEMPLATE0;
     71 
     72 typedef struct FWPM_CALLOUT_SUBSCRIPTION0_ {
     73   FWPM_CALLOUT_ENUM_TEMPLATE0 *enumTemplate;
     74   UINT32                      flags;
     75   GUID                        sessionKey;
     76 } FWPM_CALLOUT_SUBSCRIPTION0;
     77 
     78 typedef enum FWPM_CHANGE_TYPE_ {
     79   FWPM_CHANGE_ADD        = 1,
     80   FWPM_CHANGE_DELETE,
     81   FWPM_CHANGE_TYPE_MAX
     82 } FWPM_CHANGE_TYPE;
     83 
     84 typedef struct FWPM_CALLOUT_CHANGE0_ {
     85   FWPM_CHANGE_TYPE changeType;
     86   GUID             calloutKey;
     87   UINT32           calloutId;
     88 } FWPM_CALLOUT_CHANGE0;
     89 
     90 typedef struct FWPM_CALLOUT0_ {
     91   GUID               calloutKey;
     92   FWPM_DISPLAY_DATA0 displayData;
     93   UINT32             flags;
     94   GUID               *providerKey;
     95   FWP_BYTE_BLOB      providerData;
     96   GUID               applicableLayer;
     97   UINT32             calloutId;
     98 } FWPM_CALLOUT0;
     99 
    100 typedef struct FWPM_CLASSIFY_OPTION0_ {
    101   FWP_CLASSIFY_OPTION_TYPE type;
    102   FWP_VALUE0               value;
    103 } FWPM_CLASSIFY_OPTION0;
    104 
    105 typedef struct FWPM_CLASSIFY_OPTIONS0_ {
    106   UINT32                numOptions;
    107   FWPM_CLASSIFY_OPTION0 *options;
    108 } FWPM_CLASSIFY_OPTIONS0;
    109 
    110 typedef enum FWPM_ENGINE_OPTION_ {
    111   FWPM_ENGINE_COLLECT_NET_EVENTS,
    112   FWPM_ENGINE_NET_EVENT_MATCH_ANY_KEYWORDS,
    113   FWPM_ENGINE_NAME_CACHE,
    114   FWPM_ENGINE_OPTION_MAX
    115 } FWPM_ENGINE_OPTION;
    116 
    117 typedef enum FWPM_FIELD_TYPE_ {
    118   FWPM_FIELD_RAW_DATA,
    119   FWPM_FIELD_IP_ADDRESS,
    120   FWPM_FIELD_FLAGS,
    121   FWPM_FIELD_TYPE_MAX
    122 } FWPM_FIELD_TYPE;
    123 
    124 typedef struct FWPM_FIELD0_ {
    125   GUID            *fieldKey;
    126   FWPM_FIELD_TYPE type;
    127   FWP_DATA_TYPE   dataType;
    128 } FWPM_FIELD0;
    129 
    130 typedef struct FWPM_FILTER_CHANGE0_ {
    131   FWPM_CHANGE_TYPE changeType;
    132   GUID             filterKey;
    133   UINT64           filterId;
    134 } FWPM_FILTER_CHANGE0;
    135 
    136 typedef struct FWPM_FILTER_CONDITION0_ {
    137   GUID                 fieldKey;
    138   FWP_MATCH_TYPE       matchType;
    139   FWP_CONDITION_VALUE0 conditionValue;
    140 } FWPM_FILTER_CONDITION0;
    141 
    142 typedef struct FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0_ {
    143   GUID                       *providerKey;
    144   FWPM_PROVIDER_CONTEXT_TYPE providerContextType;
    145 } FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0;
    146 
    147 typedef struct FWPM_FILTER_ENUM_TEMPLATE0_ {
    148   GUID                                 *providerKey;
    149   GUID                                 layerKey;
    150   FWP_FILTER_ENUM_TYPE                 enumType;
    151   UINT32                               flags;
    152   FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0 *providerContextTemplate;
    153   UINT32                               numFilterConditions;
    154   FWPM_FILTER_CONDITION0               *filterCondition;
    155   UINT32                               actionMask;
    156   GUID                                 *calloutKey;
    157 } FWPM_FILTER_ENUM_TEMPLATE0;
    158 
    159 typedef struct FWPM_FILTER_SUBSCRIPTION0_ {
    160   FWPM_FILTER_ENUM_TEMPLATE0 *enumTemplate;
    161   UINT32                     flags;
    162   GUID                       sessionKey;
    163 } FWPM_FILTER_SUBSCRIPTION0;
    164 
    165 typedef struct FWPM_FILTER0_ {
    166   GUID                   filterKey;
    167   FWPM_DISPLAY_DATA0     displayData;
    168   UINT32                 flags;
    169   GUID                   *providerKey;
    170   FWP_BYTE_BLOB          providerData;
    171   GUID                   layerKey;
    172   GUID                   subLayerKey;
    173   FWP_VALUE0             weight;
    174   UINT32                 numFilterConditions;
    175   FWPM_FILTER_CONDITION0 *filterCondition;
    176   FWPM_ACTION0           action;
    177   __C89_NAMELESS union {
    178     UINT64 rawContext;
    179     GUID   providerContextKey;
    180   };
    181   GUID                   *reserved;
    182   UINT64                 filterId;
    183   FWP_VALUE0             effectiveWeight;
    184 } FWPM_FILTER0;
    185 
    186 typedef struct FWPM_LAYER_ENUM_TEMPLATE0_ {
    187   UINT64 reserved;
    188 } FWPM_LAYER_ENUM_TEMPLATE0;
    189 
    190 typedef struct FWPM_LAYER0_ {
    191   GUID               layerKey;
    192   FWPM_DISPLAY_DATA0 displayData;
    193   UINT32             flags;
    194   UINT32             numFields;
    195   FWPM_FIELD0        *field;
    196   GUID               defaultSubLayerKey;
    197   UINT16             layerId;
    198 } FWPM_LAYER0;
    199 
    200 typedef struct FWPM_NET_EVENT_CLASSIFY_DROP0_ {
    201   UINT64 filterId;
    202   UINT16 layerId;
    203 } FWPM_NET_EVENT_CLASSIFY_DROP0;
    204 
    205 typedef struct FWPM_NET_EVENT_ENUM_TEMPLATE0_ {
    206   FILETIME               startTime;
    207   FILETIME               endTime;
    208   UINT32                 numFilterConditions;
    209   FWPM_FILTER_CONDITION0 *filterCondition;
    210 } FWPM_NET_EVENT_ENUM_TEMPLATE0;
    211 
    212 typedef struct FWPM_NET_EVENT_HEADER0_ {
    213   FILETIME       timeStamp;
    214   UINT32         flags;
    215   FWP_IP_VERSION ipVersion;
    216   UINT8          ipProtocol;
    217   __C89_NAMELESS union {
    218     UINT32           localAddrV4;
    219     FWP_BYTE_ARRAY16 localAddrV6;
    220   };
    221   __C89_NAMELESS union {
    222     UINT32           remoteAddrV4;
    223     FWP_BYTE_ARRAY16 remoteAddrV6;
    224   };
    225   UINT16         localPort;
    226   UINT16         remotePort;
    227   UINT32         scopeId;
    228   FWP_BYTE_BLOB  appId;
    229   SID            *userId;
    230 } FWPM_NET_EVENT_HEADER0;
    231 
    232 #define IKEEXT_CERT_HASH_LEN 20
    233 
    234 typedef struct FWPM_NET_EVENT_IKEEXT_UM_FAILURE0_ {
    235   UINT32                            failureErrorCode;
    236   IPSEC_FAILURE_POINT               failurePoint;
    237   UINT32                            flags;
    238   IKEEXT_EM_SA_STATE                emState;
    239   IKEEXT_SA_ROLE                    saRole;
    240   IKEEXT_AUTHENTICATION_METHOD_TYPE emAuthMethod;
    241   UINT8                             endCertHash[IKEEXT_CERT_HASH_LEN];
    242   UINT64                            mmId;
    243   UINT64                            qmFilterId;
    244 } FWPM_NET_EVENT_IKEEXT_UM_FAILURE0;
    245 
    246 typedef struct FWPM_NET_EVENT_IKEEXT_MM_FAILURE0_ {
    247   UINT32                            failureErrorCode;
    248   IPSEC_FAILURE_POINT               failurePoint;
    249   UINT32                            flags;
    250   IKEEXT_KEY_MODULE_TYPE            keyingModuleType;
    251   IKEEXT_MM_SA_STATE                mmState;
    252   IKEEXT_SA_ROLE                    saRole;
    253   IKEEXT_AUTHENTICATION_METHOD_TYPE mmAuthMethod;
    254   UINT8                             endCertHash[IKEEXT_CERT_HASH_LEN];
    255   UINT64                            mmId;
    256   UINT64                            mmFilterId;
    257 } FWPM_NET_EVENT_IKEEXT_MM_FAILURE0;
    258 
    259 typedef struct FWPM_NET_EVENT_IKEEXT_QM_FAILURE0 {
    260   UINT32                 failureErrorCode;
    261   IPSEC_FAILURE_POINT    failurePoint;
    262   IKEEXT_KEY_MODULE_TYPE keyingModuleType;
    263   IKEEXT_QM_SA_STATE     qmState;
    264   IKEEXT_SA_ROLE         saRole;
    265   IPSEC_TRAFFIC_TYPE     saTrafficType;
    266   __C89_NAMELESS union {
    267     FWP_CONDITION_VALUE0 localSubNet;
    268   };
    269   __C89_NAMELESS union {
    270     FWP_CONDITION_VALUE0 remoteSubNet;
    271   };
    272   UINT64                 qmFilterId;
    273 } FWPM_NET_EVENT_IKEEXT_QM_FAILURE0;
    274 
    275 typedef UINT32 IPSEC_SA_SPI;
    276 
    277 typedef struct FWPM_NET_EVENT_IPSEC_KERNEL_DROP0_ {
    278   INT32         failureStatus;
    279   FWP_DIRECTION direction;
    280   IPSEC_SA_SPI  spi;
    281   UINT64        filterId;
    282   UINT16        layerId;
    283 } FWPM_NET_EVENT_IPSEC_KERNEL_DROP0;
    284 
    285 #if (_WIN32_WINNT >= 0x0601)
    286 typedef struct FWPM_NET_EVENT_IPSEC_DOSP_DROP0_ {
    287   FWP_IP_VERSION ipVersion;
    288   __C89_NAMELESS union {
    289     UINT32 publicHostV4Addr;
    290     UINT8  publicHostV6Addr[16];
    291   };
    292   __C89_NAMELESS union {
    293     UINT32 internalHostV4Addr;
    294     UINT8  internalHostV6Addr[16];
    295   };
    296   INT32          failureStatus;
    297   FWP_DIRECTION  direction;
    298 } FWPM_NET_EVENT_IPSEC_DOSP_DROP0;
    299 #endif /*(_WIN32_WINNT >= 0x0601)*/
    300 
    301 typedef struct FWPM_NET_EVENT_IKEEXT_EM_FAILURE0_ {
    302   UINT32                            failureErrorCode;
    303   IPSEC_FAILURE_POINT               failurePoint;
    304   UINT32                            flags;
    305   IKEEXT_EM_SA_STATE                emState;
    306   IKEEXT_SA_ROLE                    saRole;
    307   IKEEXT_AUTHENTICATION_METHOD_TYPE emAuthMethod;
    308   UINT8                             endCertHash[IKEEXT_CERT_HASH_LEN];
    309   UINT64                            mmId;
    310   UINT64                            qmFilterId;
    311 } FWPM_NET_EVENT_IKEEXT_EM_FAILURE0;
    312 
    313 typedef struct FWPM_NET_EVENT0_ {
    314   FWPM_NET_EVENT_HEADER0 header;
    315   FWPM_NET_EVENT_TYPE    type;
    316   __C89_NAMELESS union {
    317     FWPM_NET_EVENT_IKEEXT_MM_FAILURE0 *ikeMmFailure;
    318     FWPM_NET_EVENT_IKEEXT_QM_FAILURE0 *ikeQmFailure;
    319     FWPM_NET_EVENT_IKEEXT_EM_FAILURE0 *ikeEmFailure;
    320     FWPM_NET_EVENT_CLASSIFY_DROP0     *classifyDrop;
    321     FWPM_NET_EVENT_IPSEC_KERNEL_DROP0 *ipsecDrop;
    322 #if (_WIN32_WINNT >= 0x0601)
    323     FWPM_NET_EVENT_IPSEC_DOSP_DROP0   *idpDrop;
    324 #endif /*(_WIN32_WINNT >= 0x0601)*/
    325   };
    326 } FWPM_NET_EVENT0;
    327 
    328 typedef struct FWPM_PROVIDER_CHANGE0_ {
    329   FWPM_CHANGE_TYPE changeType;
    330   GUID             providerKey;
    331 } FWPM_PROVIDER_CHANGE0;
    332 
    333 typedef struct FWPM_PROVIDER_CONTEXT_CHANGE0_ {
    334   FWPM_CHANGE_TYPE changeType;
    335   GUID             providerContextKey;
    336   UINT64           providerContextId;
    337 } FWPM_PROVIDER_CONTEXT_CHANGE0;
    338 
    339 typedef struct FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0_ {
    340   FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0 *enumTemplate;
    341   UINT32                               flags;
    342   GUID                                 sessionKey;
    343 } FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0;
    344 
    345 typedef struct FWPM_PROVIDER_CONTEXT0_ {
    346   GUID                       providerContextKey;
    347   FWPM_DISPLAY_DATA0         displayData;
    348   UINT32                     flags;
    349   GUID                       *providerKey;
    350   FWP_BYTE_BLOB              providerData;
    351   FWPM_PROVIDER_CONTEXT_TYPE type;
    352   __C89_NAMELESS union {
    353     IPSEC_KEYING_POLICY0    *keyingPolicy;
    354     IPSEC_TRANSPORT_POLICY0 *ikeQmTransportPolicy;
    355     IPSEC_TUNNEL_POLICY0    *ikeQmTunnelPolicy;
    356     IPSEC_TRANSPORT_POLICY0 *authipQmTransportPolicy;
    357     IPSEC_TUNNEL_POLICY0    *authipQmTunnelPolicy;
    358     IKEEXT_POLICY0          *ikeMmPolicy;
    359     IKEEXT_POLICY0          *authIpMmPolicy;
    360     FWP_BYTE_BLOB           *dataBuffer;
    361     FWPM_CLASSIFY_OPTIONS0  *classifyOptions;
    362   };
    363   UINT64                     providerContextId;
    364 } FWPM_PROVIDER_CONTEXT0;
    365 
    366 typedef struct FWPM_PROVIDER_ENUM_TEMPLATE0_ {
    367   UINT64 reserved;
    368 } FWPM_PROVIDER_ENUM_TEMPLATE0;
    369 
    370 typedef struct FWPM_PROVIDER_SUBSCRIPTION0_ {
    371   FWPM_PROVIDER_ENUM_TEMPLATE0 *enumTemplate;
    372   UINT32                       flags;
    373   GUID                         sessionKey;
    374 } FWPM_PROVIDER_SUBSCRIPTION0;
    375 
    376 typedef struct FWPM_PROVIDER0_ {
    377   GUID               providerKey;
    378   FWPM_DISPLAY_DATA0 displayData;
    379   UINT32             flags;
    380   FWP_BYTE_BLOB      providerData;
    381   wchar_t            *serviceName;
    382 } FWPM_PROVIDER0;
    383 
    384 typedef struct FWPM_SESSION_ENUM_TEMPLATE0_ {
    385   UINT64 reserved;
    386 } FWPM_SESSION_ENUM_TEMPLATE0;
    387 
    388 typedef struct FWPM_SUBLAYER_CHANGE0_ {
    389   FWPM_CHANGE_TYPE changeType;
    390   GUID             subLayerKey;
    391 } FWPM_SUBLAYER_CHANGE0;
    392 
    393 typedef struct FWPM_SUBLAYER_ENUM_TEMPLATE0_ {
    394   GUID *providerKey;
    395 } FWPM_SUBLAYER_ENUM_TEMPLATE0;
    396 
    397 typedef struct FWPM_SUBLAYER_SUBSCRIPTION0_ {
    398   FWPM_SUBLAYER_ENUM_TEMPLATE0 *enumTemplate;
    399   UINT32                       flags;
    400   GUID                         sessionKey;
    401 } FWPM_SUBLAYER_SUBSCRIPTION0;
    402 
    403 typedef struct FWPM_SUBLAYER0_ {
    404   GUID               subLayerKey;
    405   FWPM_DISPLAY_DATA0 displayData;
    406   UINT16             flags;
    407   GUID               *providerKey;
    408   FWP_BYTE_BLOB      providerData;
    409   UINT16             weight;
    410 } FWPM_SUBLAYER0;
    411 
    412 #endif /*(_WIN32_WINNT >= 0x0600)*/
    413 
    414 #if (_WIN32_WINNT >= 0x0601)
    415 
    416 typedef enum FWPM_SYSTEM_PORT_TYPE_ {
    417   FWPM_SYSTEM_PORT_RPC_EPMAP,
    418   FWPM_SYSTEM_PORT_TEREDO,
    419   FWPM_SYSTEM_PORT_IPHTTPS_IN,
    420   FWPM_SYSTEM_PORT_IPHTTPS_OUT,
    421   FWPM_SYSTEM_PORT_TYPE_MAX
    422 } FWPM_SYSTEM_PORT_TYPE;
    423 
    424 typedef enum  {
    425   DlUnicast,
    426   DlMulticast,
    427   DlBroadcast
    428 } DL_ADDRESS_TYPE, *PDL_ADDRESS_TYPE;
    429 
    430 typedef struct FWPM_PROVIDER_CONTEXT1_ {
    431   GUID                       providerContextKey;
    432   FWPM_DISPLAY_DATA0         displayData;
    433   UINT32                     flags;
    434   GUID                       *providerKey;
    435   FWP_BYTE_BLOB              providerData;
    436   FWPM_PROVIDER_CONTEXT_TYPE type;
    437   __C89_NAMELESS union {
    438     IPSEC_KEYING_POLICY0    *keyingPolicy;
    439     IPSEC_TRANSPORT_POLICY1 *ikeQmTransportPolicy;
    440     IPSEC_TUNNEL_POLICY1    *ikeQmTunnelPolicy;
    441     IPSEC_TRANSPORT_POLICY1 *authipQmTransportPolicy;
    442     IPSEC_TUNNEL_POLICY1    *authipQmTunnelPolicy;
    443     IKEEXT_POLICY1          *ikeMmPolicy;
    444     IKEEXT_POLICY1          *authIpMmPolicy;
    445     FWP_BYTE_BLOB           *dataBuffer;
    446     FWPM_CLASSIFY_OPTIONS0  *classifyOptions;
    447     IPSEC_TUNNEL_POLICY1    *ikeV2QmTunnelPolicy;
    448     IKEEXT_POLICY1          *ikeV2MmPolicy;
    449     IPSEC_DOSP_OPTIONS0     *idpOptions;
    450   };
    451   UINT64                     providerContextId;
    452 } FWPM_PROVIDER_CONTEXT1;
    453 
    454 typedef struct FWPM_NET_EVENT_HEADER1_ {
    455   FILETIME       timeStamp;
    456   UINT32         flags;
    457   FWP_IP_VERSION ipVersion;
    458   UINT8          ipProtocol;
    459   __C89_NAMELESS union {
    460     UINT32           localAddrV4;
    461     FWP_BYTE_ARRAY16 localAddrV6;
    462   };
    463   __C89_NAMELESS union {
    464     UINT32           remoteAddrV4;
    465     FWP_BYTE_ARRAY16 remoteAddrV6;
    466   };
    467   UINT16         localPort;
    468   UINT16         remotePort;
    469   UINT32         scopeId;
    470   FWP_BYTE_BLOB  appId;
    471   SID            *userId;
    472   __C89_NAMELESS union {
    473     __C89_NAMELESS struct {
    474       FWP_AF addressFamily;
    475       __C89_NAMELESS union {
    476         __C89_NAMELESS struct {
    477           FWP_BYTE_ARRAY6        dstAddrEth;
    478           FWP_BYTE_ARRAY6        srcAddrEth;
    479           DL_ADDRESS_TYPE        addrType;
    480           FWP_ETHER_ENCAP_METHOD encapMethod;
    481           UINT16                 etherType;
    482           UINT32                 snapControl;
    483           UINT32                 snapOui;
    484           UINT16                 vlanTag;
    485           UINT64                 ifLuid;
    486         };
    487       };
    488     };
    489   };
    490 } FWPM_NET_EVENT_HEADER1;
    491 
    492 #define IKEEXT_CERT_HASH_LEN 20
    493 
    494 typedef struct FWPM_NET_EVENT_IKEEXT_MM_FAILURE1_ {
    495   UINT32                            failureErrorCode;
    496   IPSEC_FAILURE_POINT               failurePoint;
    497   UINT32                            flags;
    498   IKEEXT_KEY_MODULE_TYPE            keyingModuleType;
    499   IKEEXT_MM_SA_STATE                mmState;
    500   IKEEXT_SA_ROLE                    saRole;
    501   IKEEXT_AUTHENTICATION_METHOD_TYPE mmAuthMethod;
    502   UINT8                             endCertHash[IKEEXT_CERT_HASH_LEN];
    503   UINT64                            mmId;
    504   UINT64                            mmFilterId;
    505   wchar_t                           *localPrincipalNameForAuth;
    506   wchar_t                           *remotePrincipalNameForAuth;
    507   UINT32                            numLocalPrincipalGroupSids;
    508   LPWSTR                            *localPrincipalGroupSids;
    509   UINT32                            numRemotePrincipalGroupSids;
    510   LPWSTR                            *remotePrincipalGroupSids;
    511 } FWPM_NET_EVENT_IKEEXT_MM_FAILURE1;
    512 
    513 typedef struct FWPM_NET_EVENT_IKEEXT_EM_FAILURE1_ {
    514   UINT32                            failureErrorCode;
    515   IPSEC_FAILURE_POINT               failurePoint;
    516   UINT32                            flags;
    517   IKEEXT_EM_SA_STATE                emState;
    518   IKEEXT_SA_ROLE                    saRole;
    519   IKEEXT_AUTHENTICATION_METHOD_TYPE emAuthMethod;
    520   UINT8                             endCertHash[IKEEXT_CERT_HASH_LEN];
    521   UINT64                            mmId;
    522   UINT64                            qmFilterId;
    523   wchar_t                           *localPrincipalNameForAuth;
    524   wchar_t                           *remotePrincipalNameForAuth;
    525   UINT32                            numLocalPrincipalGroupSids;
    526   LPWSTR                            *localPrincipalGroupSids;
    527   UINT32                            numRemotePrincipalGroupSids;
    528   LPWSTR                            *remotePrincipalGroupSids;
    529   IPSEC_TRAFFIC_TYPE                saTrafficType;
    530 } FWPM_NET_EVENT_IKEEXT_EM_FAILURE1;
    531 
    532 typedef struct FWPM_NET_EVENT_CLASSIFY_DROP1_ {
    533   UINT64 filterId;
    534   UINT16 layerId;
    535   UINT32 reauthReason;
    536   UINT32 originalProfile;
    537   UINT32 currentProfile;
    538   UINT32 msFwpDirection;
    539   BOOL   isLoopback;
    540 } FWPM_NET_EVENT_CLASSIFY_DROP1;
    541 
    542 typedef struct FWPM_NET_EVENT1_ {
    543   FWPM_NET_EVENT_HEADER1 header;
    544   FWPM_NET_EVENT_TYPE    type;
    545   __C89_NAMELESS union {
    546     FWPM_NET_EVENT_IKEEXT_MM_FAILURE1 *ikeMmFailure;
    547     FWPM_NET_EVENT_IKEEXT_QM_FAILURE0 *ikeQmFailure;
    548     FWPM_NET_EVENT_IKEEXT_EM_FAILURE1 *ikeEmFailure;
    549     FWPM_NET_EVENT_CLASSIFY_DROP1     *classifyDrop;
    550     FWPM_NET_EVENT_IPSEC_KERNEL_DROP0 *ipsecDrop;
    551     FWPM_NET_EVENT_IPSEC_DOSP_DROP0   *idpDrop;
    552   };
    553 } FWPM_NET_EVENT1;
    554 
    555 typedef struct FWPM_NET_EVENT_SUBSCRIPTION0_ {
    556   FWPM_NET_EVENT_ENUM_TEMPLATE0 *enumTemplate;
    557   UINT32                        flags;
    558   GUID                          sessionKey;
    559 } FWPM_NET_EVENT_SUBSCRIPTION0;
    560 
    561 typedef struct FWPM_SYSTEM_PORTS_BY_TYPE0_ {
    562   FWPM_SYSTEM_PORT_TYPE type;
    563   UINT32                numPorts;
    564   UINT16                *ports;
    565 } FWPM_SYSTEM_PORTS_BY_TYPE0;
    566 
    567 typedef struct FWPM_SYSTEM_PORTS0_ {
    568   UINT32                     numTypes;
    569   FWPM_SYSTEM_PORTS_BY_TYPE0 *types;
    570 } FWPM_SYSTEM_PORTS0;
    571 
    572 #endif /*(_WIN32_WINNT >= 0x0601)*/
    573 #ifdef __cplusplus
    574 }
    575 #endif
    576 
    577 #endif /*_INC_FWPMTYPES*/
    578