Source code of Windows XP (NT5)
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.

323 lines
12 KiB

  1. TO DO LIST
  2. ----------
  3. 1. Report NIC Friendly Name
  4. - Add szFriendlyName to CfgUtilGetStaticIpAddresses
  5. Friendly name: "NetConnectionID"
  6. Note: Adapter name is "Name"
  7. Check out other properties of cimv2\Win32_NetworkAdapter
  8. - Make "tprov niclist" report reporting friendly names and first ip addr.
  9. Format:
  10. {B2CD5533-5091-4F49-B80F-A07844B14209} 10.0.0.1/255.0.0.0 "1394 Adapter"
  11. - Add (fIncludeDisabled) flag to NicList.
  12. - Add friendly name and device-state to EXTENDED_CONFIGURATION structure
  13. - Dump this information in display_config (if non-NULL)
  14. - Implement filling out this information in EXTENDED_CONFIGURATION structure
  15. - Add friendly name to MOF
  16. - Implement reporting this in wmiupdate
  17. 2. Impliment CompatibleNicList in WMI
  18. - Add GetCompatibleAdapterGuids method to MOF.
  19. - Add support for wminiclist in tprov
  20. 3. Implement popup if no non-nlb adapters left in nlbmgr.exe
  21. 4. Change ip address to bind string in connect-dialog, first ping for the
  22. address, etc...
  23. 3. Demonstrate fundamental plumbing is working:
  24. x Modify existing test to optionally go through WMI
  25. -- get rid of nlbhost class (nlbhost.cpp)
  26. x Verify we can get partial input and output parameters for GetConfig
  27. x Implement and test GetClusterConfig with partial params
  28. x Re-test local (non-wmi) functionality, including bind/unbind, change IPs
  29. x Implement QueryUpdate and UpdateConfig
  30. x test UpdateConfig with partial params
  31. - Implement and test getting port rules information
  32. - Implement and test settings port rule information
  33. - Implement and test getting full information
  34. - Implement and test setting full information
  35. 4. Hook into nlb manager
  36. 4. Add "partial-update" semantics
  37. New parameter: BOOL PartialUpdate
  38. OPTIONAL parameter Generation -- if specified, we'll verify that the
  39. Generation matches the current generation.
  40. parameter value NULL === don't change
  41. port rules: require the following property on each PR for partial-updates:
  42. action=[ADD|DELETE|UPDATE]
  43. IP addresses: require the ip address to be prefixed by
  44. "add:" "delete:" or "update:" (latter for changing subnet masks)
  45. UI:
  46. add:{10.1.1.3}
  47. delete:{10.1.1.3, 255.0.0}
  48. update:{10.1.1.3, 255.0.0}
  49. EXAMPLE 1:
  50. PartialUpdate=TRUE
  51. PortRules="action=update ip=10.1.1.3 start=80 end=288 weight=20 ...."
  52. EXAMPLE 2:
  53. PartialUpdate=TRUE
  54. IpAddresses="add:10.0.0.1/255.255.0.0", "delete:10.0.0.2"
  55. Generation=8
  56. 5. Switch from events to using two mutexes
  57. 6. Explicitly report the following errors
  58. - other update pending
  59. - netcfg write lock held
  60. 7. Use resource strings
  61. 8. Use internal constants for error codes and literal strings
  62. 9. Follow up on WMI SDK errors -- DaveIce
  63. WBEM_E_SERVER_NOT_FOUND -- where is this defined.
  64. 0x800706bf -- no definition in any header (and I checked in
  65. index2a with interesting results), recoverable error.
  66. 0x80070767 -- no defn
  67. 0x80070005 -- no defn
  68. ------------------------------------
  69. "Persistant" state for a particular NIC is mainained as a (for now)
  70. volatile key under SYSTEM\CurrentControlSet\Services\WLBS\ConfigurationHistory\{GUID}
  71. Under this GUID, there is are a set of reg-binary values (which are lighter weight than keys). They value-name is the generation number, and the value is a struct concatenated with a log. The struct has the format:
  72. typedef struct {
  73. UINT Version;
  74. UINT HeaderSize;
  75. UINT Generation;
  76. UINT CompletionCode;
  77. UINT OffsetToLog; // from start of this structure
  78. UINT LogSize; // 0 == no log
  79. UINT Reserved1;
  80. UINT Reserved2;
  81. };
  82. swprintf (reg_path, L"SYSTEM\\CurrentControlSet\\Services\\WLBS\\Parameters\
  83. \Interface\\%s",
  84. szAdapterGuid);
  85. RegOpenKeyEx (HKEY_LOCAL_MACHINE, reg_path, 0L,
  86. fReadOnly? KEY_READ : KEY_WRITE, & hKey);
  87. return hKey;
  88. status = RegOpenKeyEx (HKEY_LOCAL_MACHINE, reg_path, 0L,
  89. KEY_QUERY_VALUE, & key);
  90. HKEY hKey;
  91. status = RegCreateKeyEx (HKEY_LOCAL_MACHINE, reg_path, 0L, L"",
  92. REG_OPTION_NON_VOLATILE,
  93. KEY_ALL_ACCESS, NULL, & key, & disp);
  94. [HLKM\SYSTEM\CurrentControlSet\Services\WLBS\ConfigurationHistory]
  95. [{EBE09517-07B4-4E88-AAF1-E06F5540608B}]
  96. Generation (DWORD)
  97. [PendingOperation]
  98. Generation (DWORD)
  99. ThreadId (String)
  100. [Completions]
  101. 1 Binary
  102. 2 Binary
  103. Mutex Name
  104. NLB_D6901862{EBE09517-07B4-4E88-AAF1-E06F5540608B}
  105. HANDLE CreateMutex(
  106. LPSECURITY_ATTRIBUTES lpMutexAttributes,
  107. // pointer to security attributes
  108. BOOL bInitialOwner, // flag for initial ownership
  109. LPCTSTR lpName // pointer to mutex-object name
  110. );
  111. 04/10/2001 JosephJ Mutex vs Event vs Registry
  112. Finally settled on a named event because:
  113. 1. Needs to recover from a process crash (so can't use registry)
  114. 2. Needs to be cross process -- so must used named object
  115. 3. Need to "acquire" in one thread and "release" in another -- so can't
  116. use mutex.
  117. The auto-reset event is normally signalled. It is non-signalled whenever
  118. an operation is pending. It is manually set back to signalled whenever
  119. the operation is completed.
  120. bp tprov!NlbConfigurationUpdate__DoUpdate
  121. bp tprov!NlbConfigurationUpdate__s_AsyncUpdateThreadProc
  122. -------
  123. Sean, you can do this semi-automatically by creating a new and temporary tree just for the merging process.
  124. So for example, create a new directory driver2 in the private tree (or your scratch depot) and checkin the latest netvbl2 checked-in sources..
  125. From one enlistment, open the files for edit, and copy over your BDA privates (but dont checkin).
  126. From a second enlistment, open the files for edit, and copy over the latest privates from the private tree (this has virtual cluster support), and check this in.
  127. Go back to the first enlistment and resolve.
  128. -------
  129. 04/15/2001 JosephJ lightweight wmi wrapper.
  130. Connect-to-machine
  131. Get-object
  132. 04/15/2001 JosephJ Consider using IWbemServices::ExecQuery
  133. 04/25/2001 JosephJ Adding/removing IP addresses.
  134. Binding/Re-binding NLB:
  135. we require the explicit list of IP addresses to be specified.
  136. We'll check that
  137. (a) dedicated ip address, if specified, is first.
  138. (b) cluster_vip and subnet mask match are present.
  139. (c) vips for any per-ip port rules are present.
  140. We honor the specified order of ip addresses.
  141. Unbinding NLB:
  142. We set the specified list of ip addresses.
  143. If NULL, we'll switch the adapter to DHCP, which could take a while.
  144. z:\nt\net\wlbs\api\obj\i386;Z:\nt\net\wlbs\nlbmgr\provider\tests\obj\i386;symsrv*symsrv.dll*\\symbols\symbols
  145. 10.1.x.x {A25EF21A-4634-4B15-AE7F-6825DFAD9FA6}
  146. 10.0.x.x {AD4DA14D-CAAE-42DD-97E3-5355E55247C2}
  147. Utility function wrappers for exec method
  148. CfgUtilGetWmiObjectInstance(szRoot, szPropertyName, szPropertyValue)
  149. CfgUtilGetWmiRelPath(szRoot, szPropertyName, szPropertyValue)
  150. CfgUtilGetWmiInputInstance(
  151. IN szRoot,
  152. IN szPropertyName, "NlbsNic"
  153. IN szPropertyValue, "guid"
  154. IN szMethod "EnableStatic"
  155. OUT IInputInstance,
  156. OUT szRelPath,
  157. GetMethodInstanceByProperty
  158. SetupInParams -->
  159. ExecMethod
  160. GetOutParams
  161. bp tprov!CfgUtilGetWmiInputInstanceAndRelPath
  162. WBEMSTATUS
  163. IWbemSvc *pSvc
  164. WBEMSTATUS
  165. ConnectToWMi(
  166. MACHINE-NAME, // NULL == Don't us WMI, "" == local,
  167. szAdminPassword, // OPTIONAL
  168. szAdminDomain, // OPTIONAL
  169. szNicGuid,
  170. info
  171. );
  172. WBEMSTATUS
  173. GetClusterConfig(
  174. MACHINE-NAME, // NULL == Don't us WMI, "" == local,
  175. szAdminPassword, // OPTIONAL
  176. szAdminDomain, // OPTIONAL
  177. szNicGuid,
  178. info
  179. );
  180. 05/12/2001 JosephJ
  181. To do:
  182. 1. Remove NlbState property, add BOOL NlbBound property
  183. 2. Get rid of SubnetMask string array -- Instead place subnet mask
  184. after ip address: "10.1.1.1/255.255.255.255"
  185. 3. Demonstrate fundamental plumbing is working:
  186. x Modify existing test to optionally go through WMI
  187. -- get rid of nlbhost class (nlbhost.cpp)
  188. x Verify we can get partial input and output parameters for GetConfig
  189. x Implement and test GetClusterConfig with partial params
  190. x Re-test local (non-wmi) functionality, including bind/unbind, change IPs
  191. x Implement QueryUpdate and UpdateConfig
  192. x test UpdateConfig with partial params
  193. - Implement and test getting port rules information
  194. - Implement and test settings port rule information
  195. - Implement and test getting full information
  196. - Implement and test setting full information
  197. 4. Hook into nlb manager
  198. 4. Add "partial-update" semantics
  199. New parameter: BOOL PartialUpdate
  200. OPTIONAL parameter Generation -- if specified, we'll verify that the
  201. Generation matches the current generation.
  202. parameter value NULL === don't change
  203. port rules: require the following property on each PR for partial-updates:
  204. action=[ADD|DELETE|UPDATE]
  205. IP addresses: require the ip address to be prefixed by
  206. "add:" "delete:" or "update:" (latter for changing subnet masks)
  207. UI:
  208. add:{10.1.1.3}
  209. delete:{10.1.1.3, 255.0.0}
  210. update:{10.1.1.3, 255.0.0}
  211. EXAMPLE 1:
  212. PartialUpdate=TRUE
  213. PortRules="action=update ip=10.1.1.3 start=80 end=288 weight=20 ...."
  214. EXAMPLE 2:
  215. PartialUpdate=TRUE
  216. IpAddresses="add:10.0.0.1/255.255.0.0", "delete:10.0.0.2"
  217. Generation=8
  218. 5. Switch from events to using two mutexes
  219. 6. Explicitly report the following errors
  220. - other update pending
  221. - netcfg write lock held
  222. 7. Use resource strings
  223. 8. Use internal constants for error codes and literal strings
  224. 9. Follow up on WMI SDK errors -- DaveIce
  225. WBEM_E_SERVER_NOT_FOUND -- where is this defined.
  226. 0x800706bf -- no definition in any header (and I checked in
  227. index2a with interesting results), recoverable error.
  228. 0x80070767 -- no defn
  229. 0x80070005 -- no defn
  230. !sympath .\obj\i386;symsrv*symsrv.dll*\\symbols\symbols
  231. bp tprov!CfgUtilGetWmiInputInstanceAndRelPath
  232. bp tprov!NlbHostGetConfiguration
  233. 05/17/2001 JosephJ more on partial updates
  234. // Determine if this is a partial or full update.
  235. // If partial update, we allow a subset of cluster configuration
  236. // parameters to be specified, but allow only a restricted set
  237. // of update operations.
  238. //
  239. // Disallowed partial update operations:
  240. // - Transitions between bound and !bound
  241. // - Currently bound but nlb parameters are invalid
  242. //
  243. // Some allowed partial updates:
  244. // - Modifying IP address lists
  245. // - Modifying cluster / dedicated addresses/subnets
  246. // - Modifying existing portrules
  247. // - Adding/deleting port rules
  248. //
  249. Successfully connected to NLB on JOSEPHJ4E...
  250. Going call QueryConfigurationUpdateStatus...
  251. QueryConfigurationUpdateStatus returns successfully
  252. Connecting to NLB on JOSEPHJ4E ...
  253. Successfully connected to NLB on JOSEPHJ4E...
  254. Going call QueryConfigurationUpdateStatus...
  255. QueryConfigurationUpdateStatus returns successfully
  256. Connecting to NLB on JOSEPHJ4E ...
  257. Sample framework provier...
  258. C:\Microsoft Platform SDK\Samples\SysMgmt\WMI\VC\FrameworkProv
  259. http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/wmisdk/framework_1h0l.htm
  260. Static methods -- implementation
  261. Declaring static: add "static" in mof ... [Implemented, static, ...]
  262. Them in the ExecMethod class, simply ignore the Instance parameter.
  263. Static methods -- calling
  264. A method may or may not be static. Static methods are designated by the presence of the Static qualifier on their definition. Static methods are executed against a class, not a particular instance of that class. The path specified to a method execution API for a static method must, therefore, be a class name. Non-static methods are executed against a particular instance of a class. The path specified to a method execution for a non-static method must, therefore, be an instance path
  265. Nadir Ahmed
  266. Nadir Ahmed