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.

95 lines
2.7 KiB

  1. /*
  2. * Filename: NLB_Cluster.h
  3. * Description:
  4. * Author: shouse, 04.10.01
  5. */
  6. #ifndef __NLB_CLUSTER_H__
  7. #define __NLB_CLUSTER_H__
  8. #include "NLB_Common.h"
  9. #include "NLB_Host.h"
  10. #include "NLB_PortRule.h"
  11. #include <vector>
  12. #include <string>
  13. #include <map>
  14. using namespace std;
  15. class NLB_Cluster {
  16. public:
  17. NLB_Cluster();
  18. ~NLB_Cluster();
  19. bool IsValid ();
  20. void Clear ();
  21. bool SetName (PWCHAR pName);
  22. bool GetName (PWCHAR pName, ULONG length);
  23. bool SetLabel (PWCHAR pLabel);
  24. bool GetLabel (PWCHAR pLabel, ULONG length);
  25. bool SetClusterMode (NLB_ClusterMode::NLB_ClusterModeType eMode);
  26. bool GetClusterMode (NLB_ClusterMode::NLB_ClusterModeType & eMode);
  27. bool SetDomainName (PWCHAR pDomain);
  28. bool GetDomainName (PWCHAR pDomain, ULONG length);
  29. bool SetMACAddress (PWCHAR pMAC);
  30. bool GetMACAddress (PWCHAR pMAC, ULONG length);
  31. bool SetRemoteControlSupport (bool bEnabled);
  32. bool GetRemoteControlSupport (bool & bEnabled);
  33. bool SetRemoteControlPassword (PWCHAR pPassword);
  34. bool GetRemoteControlPassword (PWCHAR pPassword, ULONG length);
  35. bool SetBidirectionalAffinitySupport (NLB_ClusterBDASupport bda);
  36. bool GetBidirectionalAffinitySupport (NLB_ClusterBDASupport & bda);
  37. bool SetPrimaryClusterIPAddress (NLB_IPAddress address);
  38. bool GetPrimaryClusterIPAddress (NLB_IPAddress & address);
  39. bool SetIGMPMulticastIPAddress (NLB_IPAddress address);
  40. bool GetIGMPMulticastIPAddress (NLB_IPAddress & address);
  41. bool AddSecondaryClusterIPAddress (NLB_IPAddress address);
  42. bool RemoveSecondaryClusterIPAddress (PWCHAR pAddress);
  43. ULONG SetSecondaryClusterIPAddressList (vector<NLB_IPAddress> pList);
  44. ULONG GetSecondaryClusterIPAddressList (vector<NLB_IPAddress> * pList);
  45. bool AddHost (NLB_Host host);
  46. bool GetHost (PWCHAR pName, NLB_Host & host);
  47. bool RemoveHost (PWCHAR pName);
  48. ULONG SetHostList (vector<NLB_Host> pList);
  49. ULONG GetHostList (vector<NLB_Host> * pList);
  50. bool AddPortRule (NLB_PortRule rule);
  51. bool GetPortRule (PWCHAR pName, NLB_PortRule & rule);
  52. bool RemovePortRule (PWCHAR pName);
  53. ULONG SetPortRuleList (vector<NLB_PortRule> pList);
  54. ULONG GetPortRuleList (vector<NLB_PortRule> * pList);
  55. private:
  56. NLB_Name Name;
  57. NLB_Label Label;
  58. NLB_ClusterMode Mode;
  59. NLB_ClusterDomainName DomainName;
  60. NLB_ClusterNetworkAddress NetworkAddress;
  61. NLB_ClusterRemoteControl RemoteControl;
  62. NLB_ClusterBDASupport BDASupport;
  63. NLB_IPAddress PrimaryIPAddress;
  64. NLB_IPAddress IGMPMulticastIPAddress;
  65. NLB_IPAddressList SecondaryIPAddressList;
  66. NLB_HostList HostList;
  67. NLB_PortRuleList PortRuleList;
  68. };
  69. #endif