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.

116 lines
3.3 KiB

  1. /*++
  2. Copyright(c) 1998,99 Microsoft Corporation
  3. Module Name:
  4. ClusterDlg.h
  5. Abstract:
  6. Windows Load Balancing Service (WLBS)
  7. Notifier object UI - cluster config tab
  8. Author:
  9. kyrilf
  10. shouse
  11. --*/
  12. #pragma once
  13. #include <ncxbase.h>
  14. #include <ncatlps.h>
  15. #include "resource.h"
  16. #include "wlbsparm.h"
  17. #include "wlbscfg.h"
  18. /* Limitations for IP address fields. */
  19. #define WLBS_FIELD_EMPTY -1
  20. #define WLBS_FIELD_LOW 0
  21. #define WLBS_FIELD_HIGH 255
  22. #define WLBS_IP_FIELD_ZERO_LOW 1
  23. #define WLBS_IP_FIELD_ZERO_HIGH 223
  24. class CDialogCluster : public CPropSheetPage {
  25. public:
  26. /* Declare the message map. */
  27. BEGIN_MSG_MAP (CDialogCluster)
  28. MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog)
  29. MESSAGE_HANDLER (WM_CONTEXTMENU, OnContextMenu)
  30. MESSAGE_HANDLER (WM_HELP, OnHelp)
  31. NOTIFY_CODE_HANDLER (PSN_APPLY, OnApply)
  32. NOTIFY_CODE_HANDLER (PSN_KILLACTIVE, OnKillActive)
  33. NOTIFY_CODE_HANDLER (PSN_SETACTIVE, OnActive)
  34. NOTIFY_CODE_HANDLER (PSN_RESET, OnCancel)
  35. NOTIFY_CODE_HANDLER (IPN_FIELDCHANGED, OnIpFieldChange)
  36. COMMAND_ID_HANDLER (IDC_EDIT_CL_IP, OnEditClIp)
  37. COMMAND_ID_HANDLER (IDC_EDIT_CL_MASK, OnEditClMask)
  38. COMMAND_ID_HANDLER (IDC_CHECK_RCT, OnCheckRct)
  39. COMMAND_ID_HANDLER (IDC_BUTTON_HELP, OnButtonHelp)
  40. COMMAND_ID_HANDLER (IDC_RADIO_UNICAST, OnCheckMode)
  41. COMMAND_ID_HANDLER (IDC_RADIO_MULTICAST, OnCheckMode)
  42. COMMAND_ID_HANDLER (IDC_CHECK_IGMP, OnCheckIGMP)
  43. END_MSG_MAP ()
  44. /* Constructors/Destructors. */
  45. CDialogCluster (NETCFG_WLBS_CONFIG * paramp, const DWORD * phelpIDs = NULL);
  46. ~CDialogCluster ();
  47. public:
  48. /* Message map functions. */
  49. LRESULT OnInitDialog (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & fHandled);
  50. LRESULT OnContextMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & fHandled);
  51. LRESULT OnHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & fHandled);
  52. LRESULT OnApply (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  53. LRESULT OnKillActive (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  54. LRESULT OnActive (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  55. LRESULT OnCancel (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  56. LRESULT OnIpFieldChange (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  57. LRESULT OnEditClIp (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & fHandled);
  58. LRESULT OnEditClMask (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & fHandled);
  59. LRESULT OnCheckRct (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & fHandled);
  60. LRESULT OnButtonHelp (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & fHandled);
  61. LRESULT OnCheckMode (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & fHandled);
  62. LRESULT OnCheckIGMP (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & fHandled);
  63. friend class CDialogHost;
  64. friend class CDialogPorts;
  65. private:
  66. void SetClusterMACAddress ();
  67. BOOL CheckClusterMACAddress ();
  68. void PrintIPRangeError (unsigned int ids, int value, int low, int high);
  69. void SetInfo ();
  70. void UpdateInfo ();
  71. LRESULT ValidateInfo ();
  72. NETCFG_WLBS_CONFIG * m_paramp;
  73. const DWORD * m_adwHelpIDs;
  74. BOOL m_rct_warned;
  75. BOOL m_igmp_warned;
  76. BOOL m_igmp_mcast_warned;
  77. WCHAR m_passw[CVY_MAX_RCT_CODE + 1];
  78. WCHAR m_passw2[CVY_MAX_RCT_CODE + 1];
  79. struct {
  80. UINT IpControl;
  81. int Field;
  82. int Value;
  83. UINT RejectTimes;
  84. } m_IPFieldChangeState;
  85. };