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.

92 lines
2.7 KiB

  1. #include "wlbsiocl.h"
  2. #include "wlbsparm.h"
  3. #include "cluster.h"
  4. class CWlbsControlWrapper; // forward declaration
  5. class CWlbsCluster;
  6. struct CClusterConfiguration
  7. {
  8. wstring szClusterName;
  9. wstring szClusterIPAddress;
  10. wstring szClusterNetworkMask;
  11. wstring szClusterMACAddress;
  12. long nMaxNodes;
  13. bool bMulticastSupportEnable;
  14. bool bRemoteControlEnabled;
  15. bool bIgmpSupport;
  16. bool bClusterIPToMulticastIP;
  17. wstring szMulticastIPAddress;
  18. bool bBDATeamActive;
  19. wstring szBDATeamId;
  20. bool bBDATeamMaster;
  21. bool bBDAReverseHash;
  22. bool bIdentityHeartbeatEnabled;
  23. };
  24. struct CNodeConfiguration
  25. {
  26. /* obtained from the registry */
  27. DWORD dwNumberOfRules;
  28. DWORD dwCurrentVersion;
  29. DWORD dwHostPriority;
  30. wstring szDedicatedIPAddress;
  31. wstring szDedicatedNetworkMask;
  32. DWORD dwAliveMsgPeriod;
  33. DWORD dwAliveMsgTolerance;
  34. bool bClusterModeOnStart;
  35. bool bClusterModeSuspendOnStart;
  36. bool bPersistSuspendOnReboot;
  37. //bool bNBTSupportEnable;
  38. bool bMaskSourceMAC;
  39. DWORD dwRemoteControlUDPPort;
  40. DWORD dwDescriptorsPerAlloc;
  41. DWORD dwMaxDescriptorAllocs;
  42. DWORD dwFilterIcmp;
  43. DWORD dwTcpDescriptorTimeout;
  44. DWORD dwIpSecDescriptorTimeout;
  45. DWORD dwNumActions;
  46. DWORD dwNumPackets;
  47. DWORD dwNumAliveMsgs;
  48. DWORD dwEffectiveVersion;
  49. };
  50. class CWlbsClusterWrapper : public CWlbsCluster
  51. {
  52. public:
  53. DWORD GetHostID();
  54. DWORD GetClusterIP() {return CWlbsCluster::GetClusterIp();}
  55. DWORD GetClusterIpOrIndex(CWlbsControlWrapper* pControl);
  56. void SetPortRuleDefaults();
  57. void GetPortRule( DWORD dwVip, DWORD dwStartPort, PWLBS_PORT_RULE pPortRule );
  58. void PutPortRule(const PWLBS_PORT_RULE a_pPortRule);
  59. void EnumPortRules(PWLBS_PORT_RULE* ppPortRule, DWORD* pdwNumRules, DWORD dwFilteringMode);
  60. void DeletePortRule(DWORD dwVip, DWORD dwStartPort);
  61. bool RuleExists(DWORD dwVip, DWORD dwStartPort);
  62. void GetClusterConfig( CClusterConfiguration& a_WlbsConfig);
  63. void GetNodeConfig( CNodeConfiguration& a_WlbsConfig);
  64. void PutClusterConfig( const CClusterConfiguration &a_WlbsConfig);
  65. void PutNodeConfig( const CNodeConfiguration& a_WlbsConfig );
  66. void SetNodeDefaults();
  67. void SetClusterDefaults();
  68. GUID GetAdapterGuid() {return CWlbsCluster::GetAdapterGuid();}
  69. DWORD Commit(CWlbsControlWrapper* pControl);
  70. void SetPassword( LPWSTR a_szPassword );
  71. private:
  72. CWlbsClusterWrapper() : CWlbsCluster(0){}; // Helper class, no instance
  73. ~CWlbsClusterWrapper() {}; // can not delete
  74. };