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.

67 lines
2.7 KiB

  1. #pragma once
  2. #include "wlbscfg.h"
  3. //+----------------------------------------------------------------------------
  4. //
  5. // class CNetcfgCluster
  6. //
  7. // Description: Provide cluster config functionality for netcfg .
  8. // SetConfig caches the settings without saving to registry
  9. // and can be retrieved by GetConfig.
  10. //
  11. // History: fengsun Created Header 2/11/00
  12. //
  13. //+----------------------------------------------------------------------------
  14. HRESULT GetAdapterFromGuid(INetCfg *pNetCfg, const GUID& NetCardGuid, OUT INetCfgComponent** ppNetCardComponent);
  15. class CNetcfgCluster
  16. {
  17. public:
  18. CNetcfgCluster(CWlbsConfig* pConfig);
  19. ~CNetcfgCluster();
  20. DWORD InitializeFromRegistry(const GUID& guidAdapter, bool fBindingEnabled, bool fUpgradeFromWin2k);
  21. HRESULT InitializeFromAnswerFile(const GUID& AdapterGuid, CSetupInfFile& caf, PCWSTR answer_sections);
  22. void InitializeWithDefault(const GUID& guidAdapter);
  23. void SetConfig(const NETCFG_WLBS_CONFIG* pClusterConfig);
  24. void GetConfig(NETCFG_WLBS_CONFIG* pClusterConfig);
  25. void NotifyBindingChanges(DWORD dwChangeFlag, INetCfgBindingPath* pncbp);
  26. DWORD NotifyAdapter (INetCfgComponent * pAdapter, DWORD newStatus);
  27. DWORD ApplyRegistryChanges(bool fUninstall);
  28. DWORD ApplyPnpChanges(HANDLE hWlbsDevice);
  29. const GUID& GetAdapterGuid() { return m_AdapterGuid;}
  30. bool CheckForDuplicateClusterIPAddress (WCHAR * szOtherIP);
  31. bool CheckForDuplicateBDATeamMaster (NETCFG_WLBS_BDA_TEAMING * pBDATeaming);
  32. bool NLBIsBound();
  33. bool IsReloadRequired () { return m_fReloadRequired; };
  34. static void ResetMSCSLatches();
  35. protected:
  36. GUID m_AdapterGuid;
  37. WLBS_REG_PARAMS m_OriginalConfig; // original config
  38. WLBS_REG_PARAMS m_CurrentConfig; // cached config
  39. bool m_fHasOriginalConfig; // whether the adapter has an original config
  40. bool m_fOriginalBindingEnabled; // whether the binding to the adapter is originally enabled
  41. bool m_fRemoveAdapter; // whether the adapter is to be removed
  42. bool m_fMacAddrChanged; // whether we need to reload the nic driver
  43. bool m_fReloadRequired; // set if changes in registry need to be picked by wlbs driver
  44. bool m_fReenableAdapter; // do we need to re-enable this adapter (did WE disable it?)
  45. static bool m_fMSCSWarningEventLatched; // Throw MSCS warning only once when binding NLB
  46. static bool m_fMSCSWarningPopupLatched; // Popup MSCS warning only once when binding NLB
  47. CWlbsConfig* m_pConfig; // pointer to access m_pWlbsApiFuncs
  48. };