Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

302 lines
9.9 KiB

  1. // Copyright (c) 2000-2004 Microsoft Corporation
  2. // WMI Class Definitions for Network Security Provider of SCE
  3. // Version 1.0
  4. #pragma autorecover
  5. #pragma classflags("forceupdate")
  6. #pragma namespace("\\\\.\\root")
  7. instance of __Namespace
  8. {
  9. Name = "Security";
  10. };
  11. #pragma namespace("\\\\.\\root\\Security")
  12. instance of __Namespace
  13. {
  14. Name = "NetSecProv";
  15. };
  16. #pragma namespace("\\\\.\\root\\Security\\NetSecProv")
  17. //**************************************************************************
  18. //* Declare an instance of the __Win32Provider so as to "register" the
  19. //* PodTest provider.
  20. //**************************************************************************
  21. instance of __Win32Provider as $P
  22. {
  23. Name = "Network Security Provider of SCE" ;
  24. ClsId = "{da63cc36-ade4-456c-893c-3006074fa73c}" ;
  25. ImpersonationLevel = 1;
  26. PerUserInitialization = TRUE;
  27. HostingModel = "NetworkServiceHost";
  28. };
  29. instance of __InstanceProviderRegistration
  30. {
  31. Provider = $P;
  32. SupportsPut = TRUE;
  33. SupportsGet = TRUE;
  34. SupportsDelete = TRUE;
  35. SupportsEnumeration = TRUE;
  36. QuerySupportLevels = {"WQL:UnarySelect"};
  37. };
  38. instance of __MethodProviderRegistration
  39. {
  40. Provider = $P;
  41. };
  42. //
  43. // Provider registration is complete by here.
  44. // The following sections are registering individual classes.
  45. //
  46. [dynamic, singleton, provider("Network Security Provider of SCE")]
  47. class Nsp_TcpSettings
  48. {
  49. uint32 dwUnbindNetBIOS;
  50. uint32 dwUnbindServices;
  51. };
  52. [dynamic, provider("Network Security Provider of SCE")]
  53. class Nsp_IPConfigSettings
  54. {
  55. [key] string Addr; // subnet address
  56. uint32 AddrType;
  57. string Mask; // subnet mask
  58. uint32 Classfication;
  59. };
  60. [abstract, provider("Network Security Provider of SCE")]
  61. class Nsp_FilterSettings
  62. {
  63. string FilterName;
  64. uint32 FilterType; // tunnel = 1, transport = 2, Mainmode = 3
  65. uint32 Direction = 8; // FILTER_DIRECTION_INBOUND=0x00000004, FILTER_DIRECTION_OUTBOUND=0x00000008
  66. uint32 InterfaceType = 1; // INTERFACE_TYPE_ALL = 1, INTERFACE_TYPE_LAN = 2, INTERFACE_TYPE_DIALUP = 3,
  67. boolean CreateMirror;
  68. uint32 SrcAddrClassification; // lookup in IPConfigSettings class
  69. uint32 SrcAddrType = 1; // 1 for unique, 2 for subnet, 3 for interface
  70. string SrcAddr = "IP_ADDRESS_ME";
  71. string SrcSubnetMask = "IP_ADDRESS_MASK_NONE";
  72. uint32 DestAddrType = 2; // ??
  73. string DestAddr = "SUBNET_ADDRESS_ANY";
  74. string DestSubnetMask = "SUBNET_MASK_ANY";
  75. };
  76. [dynamic, provider("Network Security Provider of SCE")]
  77. class Nsp_TransportFilterSettings : Nsp_FilterSettings
  78. {
  79. [key] string FilterName;
  80. uint32 Direction;
  81. boolean GenericFilter;
  82. uint32 FilterType = 2;
  83. uint32 InboundFilterFlag; //PASS_THRU = 1, BLOCKING = 2, NEGOTIATE_SECURITY = 3,
  84. uint32 OutboundFilterFlag;
  85. uint32 Protocol;
  86. uint32 SrcPort;
  87. uint32 DestPort;
  88. string QMPolicyName;
  89. };
  90. [dynamic, provider("Network Security Provider of SCE")]
  91. class Nsp_TunnelFilterSettings : Nsp_FilterSettings
  92. {
  93. [key] string FilterName;
  94. boolean GenericFilter;
  95. uint32 Direction;
  96. uint32 FilterType = 1;
  97. uint32 InboundFilterFlag;
  98. uint32 OutboundFilterFlag;
  99. uint32 Protocol;
  100. uint32 SrcPort;
  101. uint32 DestPort;
  102. string QMPolicyName;
  103. string TunnelSrcAddr;
  104. string TunnelSrcSubnetMask;
  105. uint32 TunnelSrcAddrType;
  106. string TunnelDestAddr;
  107. string TunnelDestSubnetMask;
  108. uint32 TunnelDestAddrType;
  109. };
  110. [dynamic, provider("Network Security Provider of SCE")]
  111. class Nsp_MMFilterSettings : Nsp_FilterSettings
  112. {
  113. [key] string FilterName;
  114. uint32 Direction;
  115. boolean GenericFilter;
  116. uint32 FilterType = 3;
  117. string MMPolicyName;
  118. string MMAuthName;
  119. };
  120. [abstract, provider("Network Security Provider of SCE")]
  121. class Nsp_PolicySettings
  122. {
  123. string PolicyName;
  124. uint32 Flag = 0; // dwFlag
  125. uint32 OfferCount; // dwOfferCount
  126. // both arrays are of size OfferCount
  127. uint32 KeyLifeTime[]; // LifeTime.uKeyExpirationTime
  128. uint32 KeyLifeTimeKBytes[]; // LifeTime.uKeyExpirationKBytes
  129. };
  130. [dynamic, provider("Network Security Provider of SCE")]
  131. class Nsp_QMPolicySettings : Nsp_PolicySettings
  132. {
  133. [key] string PolicyName;
  134. boolean PFSRequired[]; // array of size OfferCount
  135. uint32 PFSGroup[]; // array of size OfferCount
  136. uint32 NumAlgos[]; // array of size OfferCount
  137. // all the rest of arrays are of size QM_MAX_ALGOS * OfferCount
  138. uint32 AlgoOp[]; // NONE = 0,AUTHENTICATION=1,ENCRYPTION=2,COMPRESSION=3,SA_DELETE=4
  139. uint32 AlgoID[]; //
  140. uint32 AlgoSecID[]; // HMAC_AH_NONE = 0,HMAC_AH_MD5=1,HMAC_AH_SHA1=2
  141. //uint32 AlgoKeyLen[]; //
  142. //uint32 AlgoSecKeyLen[]; //
  143. //uint32 AlgoRounds[]; //
  144. //uint32 AlgoMySpi[]; //
  145. //uint32 AlgoPeerSpi[]; //
  146. //
  147. // Encryption: 0 for none, 1 for request, 2 for maximum, and 3 for require
  148. //
  149. [static, Implemented] uint32 CreateDefaultPolicy([in] uint32 Encryption);
  150. [static, Implemented] uint32 GetDefaultPolicyName([in] uint32 Encryption, [out] string Name);
  151. };
  152. [dynamic, provider("Network Security Provider of SCE")]
  153. class Nsp_MMPolicySettings : Nsp_PolicySettings
  154. {
  155. // IPSEC_MM_POLICY corresponding member name
  156. [key] string PolicyName; // pszPolicyName
  157. uint32 SoftSAExpTime; // uSoftSAExpirationTime
  158. // all the following arrays are of size OfferCount
  159. uint32 QMLimit[]; // dwQuickModeLimit
  160. uint32 DHGroup[]; // dwDHGroup
  161. uint32 EncryptID[]; // EncryptionAlgorithm.uAlgoIdentifier
  162. uint32 HashID[]; // HashingAlgorithm.uAlgoIdentifier
  163. //uint32 EncryptKeyLen[]; // EncryptionAlgorithm.uAlgoKeyLen
  164. //uint32 EncryptRounds[]; // EncryptionAlgorithm.uAlgoRounds
  165. //uint32 HashKeyLen[]; // HashingAlgorithm.uAlgoKeyLen
  166. //uint32 HashRounds[]; // HashingAlgorithm.uAlgoRounds
  167. };
  168. [dynamic, provider("Network Security Provider of SCE")]
  169. class Nsp_MMAuthSettings
  170. {
  171. [key] string AuthMethodID;
  172. uint32 NumAuthInfos; // count of IPSEC_MM_AUTH_INFO, sizes of the rest of the members are equal to this
  173. uint32 AuthMethod[]; // MM_AUTH_ENUM: IKE_PRESHARED_KEY = 1, IKE_DSS_SIGNATURE=2, IKE_RSA_SIGNATURE=3,
  174. // IKE_RSA_ENCRYPTION=4, IKE_SSPI=5. Currently, IPSec only supports 1, 3, 5
  175. string AuthInfo[]; // should really be array of uint8 (LPBYTE).
  176. // But that is much more complicated to manage. Must convert this BSTR
  177. // into an array of wchars (IKE_PRESHARED_KEY) w/o 0 terminator,
  178. // or ansi chars (IKE_RSA_SIGNATURE) w/o 0 terminator,
  179. // or NULL for IKE_SSPI.
  180. };
  181. //---------------------------------------------------------------------------
  182. // classes to support rollback
  183. [abstract]
  184. class Nsp_ActionToken
  185. {
  186. string TokenGuid;
  187. uint32 Action; // 0 for PutInstance, 1 for DeleteInstance
  188. string PreviousData;
  189. };
  190. // filter rollback class
  191. class Nsp_RollbackFilter : Nsp_ActionToken
  192. {
  193. [key] string TokenGuid;
  194. [key] string FilterName;
  195. uint32 FilterType; // Same as that of SceNsp_FilterSettings
  196. };
  197. // policy rollback class
  198. class Nsp_RollbackPolicy : Nsp_ActionToken
  199. {
  200. [key] string TokenGuid;
  201. [key] string PolicyName;
  202. uint32 PolicyType; // 1 for MM Policy, 2 for QM policy
  203. };
  204. // main mode authentication rollback class
  205. class Nsp_RollbackMMAuth : Nsp_ActionToken
  206. {
  207. [key] string TokenGuid;
  208. [key] string AuthMethodID;
  209. };
  210. // class for rollback
  211. [dynamic, provider("Network Security Provider of SCE")]
  212. class Nsp_TranxManager
  213. {
  214. [static, Implemented] uint32 Rollback([in] string TokenGuid, [in] boolean ClearAll);
  215. //
  216. // ****************************************************************
  217. // **************** Warning: don't checkin ************************
  218. // ****************************************************************
  219. // for testing XML parser
  220. //
  221. // [static, Implemented] uint32 ParseXMLFile([in] string InputFile, [in] string OutputFile, [in] string Area, [in] string Element, [in] boolean SingleArea);
  222. };
  223. //----------------------------------------------------------------------------
  224. // classes for Security Configuration Wizard (SCW)
  225. /*
  226. [dynamic, readonly, provider("Network Security Provider of SCE")]
  227. class SCW_ActiveSocket
  228. {
  229. [key] uint32 Port;
  230. [key] uint32 Protocol; // TCP, UDP, ?
  231. string Address;
  232. string ForeignAddress;
  233. string ForeignPort;
  234. uint32 State; // Listening, Established, TIME_WAIT
  235. uint32 ProcessID;
  236. string ImageName;
  237. string ImageTitleBar;
  238. string NTService[];
  239. };
  240. */