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_NAPTYPES
      7 #define _INC_NAPTYPES
      8 
      9 #if (_WIN32_WINNT >= 0x0600)
     10 
     11 #ifdef __cplusplus
     12 extern "C" {
     13 #endif
     14 
     15 #define maxSoHAttributeCount          0x64
     16 #define maxSoHAttributeSize           0xFA0
     17 #define minNetworkSoHSize             0xC
     18 #define maxNetworkSoHSize             0xFA0
     19 #define maxDwordCountPerSoHAttribute  (maxSoHAttributeSize / sizeof(DWORD))
     20 #define maxIpv4CountPerSoHAttribute   (maxSoHAttributeSize / 0x4)
     21 #define maxIpv6CountPerSoHAttribute   (maxSoHAttributeSize / 0x10)
     22 #define maxStringLength               0x400
     23 #define maxStringLengthInBytes        ((maxStringLength + 1) * sizeof(WCHAR))
     24 #define maxSystemHealthEntityCount    0x14
     25 #define maxEnforcerCount              0x14
     26 #define maxPrivateDataSize            0xC8
     27 #define maxConnectionCountPerEnforcer 0x14
     28 #define maxCachedSoHCount             (maxSystemHealthEntityCount * maxEnforcerCount * maxConnectionCountPerEnforcer)
     29 #define freshSoHRequest               0x1
     30 #define shaFixup                      0x1
     31 #define failureCategoryCount          0x5
     32 #define ComponentTypeEnforcementClientSoH 0x1
     33 #define ComponentTypeEnforcementClientRp  0x2
     34 
     35 #ifndef NAPTypes
     36 #define NAPTypes
     37   typedef struct tagCountedString {
     38     UINT16 length;
     39     WCHAR *string;
     40   } CountedString;
     41   typedef FILETIME ProbationTime;
     42   typedef UINT32 ProtocolMaxSize;
     43   typedef UINT32 NapComponentId;
     44   typedef NapComponentId SystemHealthEntityId;
     45   typedef NapComponentId EnforcementEntityId;
     46   typedef UINT16 SystemHealthEntityCount;
     47   typedef UINT16 EnforcementEntityCount;
     48   typedef CountedString StringCorrelationId;
     49   typedef GUID ConnectionId;
     50   typedef UINT8 Percentage;
     51   typedef UINT32 MessageId;
     52 #endif /* NAPTypes */
     53 
     54   typedef enum tagFixupState {
     55     fixupStateSuccess          = 0,
     56     fixupStateInProgress       = 1,
     57     fixupStateCouldNotUpdate   = 2
     58   } FixupState;
     59 
     60 typedef enum tagFailureCategory {
     61   failureCategoryNone                  = 0,
     62   failureCategoryOther                 = 1,
     63   failureCategoryClientComponent       = 2,
     64   failureCategoryClientCommunication   = 3,
     65   failureCategoryServerComponent       = 4,
     66   failureCategoryServerCommunication   = 5
     67 } FailureCategory;
     68 
     69   typedef enum tagIsolationState {
     70     isolationStateNotRestricted      = 1,
     71     isolationStateInProbation        = 2,
     72     isolationStateRestrictedAccess   = 3
     73   } IsolationState;
     74 
     75   typedef enum tagExtendedIsolationState {
     76     extendedIsolationStateNoData       = 0,
     77     extendedIsolationStateTransition   = 1,
     78     extendedIsolationStateInfected     = 2,
     79     extendedIsolationStateUnknown      = 3
     80   } ExtendedIsolationState;
     81 
     82   typedef enum tagRemoteConfigurationType {
     83     remoteConfigTypeMachine      = 1,
     84     remoteConfigTypeConfigBlob   = 2
     85   } RemoteConfigurationType;
     86 
     87   typedef enum tagNapNotifyType {
     88     napNotifyTypeUnknown        = 0,
     89     napNotifyTypeServiceState   = 1,
     90     napNotifyTypeQuarState      = 2
     91   } NapNotifyType;
     92 
     93   typedef struct tagResultCodes {
     94     UINT16  count;
     95     HRESULT *results;
     96   } ResultCodes;
     97 
     98   typedef struct tagCorrelationId {
     99     GUID     connId;
    100     FILETIME timeStamp;
    101   } CorrelationId;
    102 
    103   typedef struct tagSoHAttribute {
    104     UINT16 type;
    105     UINT16 size;
    106     BYTE * value;
    107   } SoHAttribute;
    108 
    109   typedef struct tagIpv4Address {
    110     BYTE addr[4];
    111   } Ipv4Address;
    112 
    113   typedef struct tagIpv6Address {
    114     BYTE addr[16];
    115   } Ipv6Address;
    116 
    117   typedef struct tagSoH {
    118     UINT16       count;
    119     SoHAttribute *attributes;
    120   } SoH, SoHRequest, SoHResponse;
    121 
    122   typedef struct tagFixupInfo {
    123     FixupState  state;
    124     Percentage  percentage;
    125     ResultCodes resultCodes;
    126     MessageId   fixupMsgId;
    127   } FixupInfo;
    128 
    129   typedef struct tagFailureCategoryMapping {
    130     WINBOOL mappingCompliance[failureCategoryCount];
    131   } FailureCategoryMapping;
    132 
    133   typedef struct tagIsolationInfo {
    134     IsolationState isolationState;
    135     ProbationTime  probEndTime;
    136     CountedString  failureUrl;
    137   } IsolationInfo;
    138 
    139   typedef struct tagIsolationInfoEx {
    140     IsolationState         isolationState;
    141     ExtendedIsolationState extendedIsolationState;
    142     ProbationTime          probEndTime;
    143     CountedString          failureUrl;
    144   } IsolationInfoEx;
    145 
    146   typedef struct tagNapComponentRegistrationInfo {
    147     NapComponentId id;
    148     CountedString  friendlyName;
    149     CountedString  description;
    150     CountedString  version;
    151     CountedString  vendorName;
    152     CLSID          infoClsid;
    153     CLSID          configClsid;
    154     FILETIME       registrationDate;
    155     UINT32         componentType;
    156   } NapComponentRegistrationInfo;
    157 
    158   typedef struct tagPrivateData {
    159     UINT16 size;
    160     BYTE * data;
    161   } PrivateData;
    162 
    163   typedef struct tagNetworkSoH {
    164     UINT16 size;
    165     BYTE * data;
    166   } NetworkSoH, NetworkSoHRequest, NetworkSoHResponse;
    167 
    168   typedef struct tagSystemHealthAgentState {
    169     SystemHealthEntityId id;
    170     ResultCodes          shaResultCodes;
    171     FailureCategory      failureCategory;
    172     FixupInfo            fixupInfo;
    173   } SystemHealthAgentState;
    174 
    175 #ifdef __cplusplus
    176 }
    177 #endif
    178 
    179 #endif /*(_WIN32_WINNT >= 0x0600)*/
    180 
    181 #endif /* _INC_NAPTYPES */
    182 
    183