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.

64 lines
1.9 KiB

  1. #ifndef WLBSCLUSTER_H
  2. #define WLBSCLUSTER_H
  3. #include "wlbsconfig.h"
  4. class CWlbsControl;
  5. //+----------------------------------------------------------------------------
  6. //
  7. // class CWlbsCluster
  8. //
  9. // Description: This class is exported to perform cluster configuration,
  10. //
  11. //
  12. // History: fengsun Created Header 3/2/00
  13. //
  14. //+----------------------------------------------------------------------------
  15. class __declspec(dllexport) CWlbsCluster
  16. {
  17. public:
  18. CWlbsCluster(DWORD dwConfigIndex);
  19. DWORD GetClusterIp() {return m_this_cl_addr;}
  20. DWORD GetHostID() {return m_this_host_id;}
  21. DWORD GetDedicatedIp() {return m_this_ded_addr;}
  22. bool Initialize(const GUID& AdapterGuid);
  23. bool ReInitialize();
  24. DWORD ReadConfig(PWLBS_REG_PARAMS reg_data); // read the config from registry
  25. DWORD WriteConfig(const PWLBS_REG_PARAMS reg_data);
  26. DWORD CommitChanges(CWlbsControl* pWlbsControl);
  27. bool IsCommitPending() const {return m_reload_required;} // whether changes are commited
  28. const GUID& GetAdapterGuid() { return m_AdapterGuid;}
  29. DWORD GetPassword();
  30. DWORD GetClusterIpOrIndex(CWlbsControl* pControl);
  31. public:
  32. DWORD m_dwConfigIndex; // unique index for the cluster
  33. protected:
  34. // Cluser IP of this adapter. Reflect the value in driver instead of registry.
  35. // The value does not change, if WriteConfig is called but Commint is not called.
  36. // See bug 162812 162854
  37. DWORD m_this_cl_addr;
  38. DWORD m_this_host_id; // Host ID of the cluster. Reflect the value in driver instead of registry
  39. DWORD m_this_ded_addr; // Dedicated IP of this adapter
  40. WLBS_REG_PARAMS m_reg_params; // original settings
  41. GUID m_AdapterGuid;
  42. bool m_mac_addr_change; // whether we need to reload the nic driver
  43. bool m_reload_required; // set if change in registry need to be picked by wlbs driver
  44. };
  45. #endif // WLBSCLUSTER_H