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.

86 lines
2.4 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. };
  23. struct CNodeConfiguration
  24. {
  25. /* obtained from the registry */
  26. DWORD dwNumberOfRules;
  27. DWORD dwCurrentVersion;
  28. DWORD dwHostPriority;
  29. wstring szDedicatedIPAddress;
  30. wstring szDedicatedNetworkMask;
  31. DWORD dwAliveMsgPeriod;
  32. DWORD dwAliveMsgTolerance;
  33. bool bClusterModeOnStart;
  34. //bool bNBTSupportEnable;
  35. bool bMaskSourceMAC;
  36. DWORD dwRemoteControlUDPPort;
  37. DWORD dwDescriptorsPerAlloc;
  38. DWORD dwMaxDescriptorAllocs;
  39. DWORD dwNumActions;
  40. DWORD dwNumPackets;
  41. DWORD dwNumAliveMsgs;
  42. DWORD dwEffectiveVersion;
  43. };
  44. class CWlbsClusterWrapper : public CWlbsCluster
  45. {
  46. public:
  47. DWORD GetHostID();
  48. DWORD GetClusterIP() {return CWlbsCluster::GetClusterIp();}
  49. DWORD GetClusterIpOrIndex(CWlbsControlWrapper* pControl);
  50. void SetPortRuleDefaults();
  51. void GetPortRule( DWORD dwVip, DWORD dwStartPort, PWLBS_PORT_RULE pPortRule );
  52. void PutPortRule(const PWLBS_PORT_RULE a_pPortRule);
  53. void EnumPortRules(PWLBS_PORT_RULE* ppPortRule, DWORD* pdwNumRules, DWORD dwFilteringMode);
  54. void DeletePortRule(DWORD dwVip, DWORD dwStartPort);
  55. bool RuleExists(DWORD dwVip, DWORD dwStartPort);
  56. void GetClusterConfig( CClusterConfiguration& a_WlbsConfig);
  57. void GetNodeConfig( CNodeConfiguration& a_WlbsConfig);
  58. void PutClusterConfig( const CClusterConfiguration &a_WlbsConfig);
  59. void PutNodeConfig( const CNodeConfiguration& a_WlbsConfig );
  60. void SetNodeDefaults();
  61. void SetClusterDefaults();
  62. GUID GetAdapterGuid() {return CWlbsCluster::GetAdapterGuid();}
  63. DWORD Commit(CWlbsControlWrapper* pControl);
  64. void SetPassword( LPWSTR a_szPassword );
  65. private:
  66. CWlbsClusterWrapper() : CWlbsCluster(0){}; // Helper class, no instance
  67. ~CWlbsClusterWrapper() {}; // can not delete
  68. };