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.

83 lines
2.2 KiB

  1. //============================================================================
  2. // Copyright(c) 1996, Microsoft Corporation
  3. //
  4. // File: ipadd.h
  5. //
  6. // History:
  7. // 08/30/96 Ram Cherala Created
  8. //
  9. // Class declarations for IP filter Add/Edit routines
  10. //============================================================================
  11. #include "ipctrl.h"
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CIpFltrAddEdit dialog
  14. class CIpFltrAddEdit : public CBaseDialog
  15. {
  16. // Construction
  17. public:
  18. CIpFltrAddEdit( CWnd* pParent,
  19. FilterListEntry ** ppFilterEntry,
  20. DWORD dwFilterType); // standard constructor
  21. // Dialog Data
  22. //{{AFX_DATA(CIpFltrAddEdit)
  23. enum { IDD = IDD_IPFILTER_ADDEDIT };
  24. CStatic m_stDstPort;
  25. CStatic m_stSrcPort;
  26. CComboBox m_cbFoo;
  27. CEdit m_cbSrcPort;
  28. CEdit m_cbDstPort;
  29. CComboBox m_cbProtocol;
  30. CString m_sProtocol;
  31. CString m_sSrcPort;
  32. CString m_sDstPort;
  33. //}}AFX_DATA
  34. CEdit m_ebFoo;
  35. // Overrides
  36. // ClassWizard generated virtual function overrides
  37. //{{AFX_VIRTUAL(CIpFltrAddEdit)
  38. protected:
  39. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  40. //}}AFX_VIRTUAL
  41. CString GetIcmpTypeString( WORD dwPort );
  42. CString GetIcmpCodeString( WORD dwPort );
  43. CString GetPortString( DWORD dwProtocol, WORD dwPort );
  44. WORD GetPortNumber( DWORD dwProtocol, CString& cStr);
  45. WORD GetIcmpType( CString& cStr);
  46. WORD GetIcmpCode( CString& cStr);
  47. // Implementation
  48. protected:
  49. static DWORD m_dwHelpMap[];
  50. FilterListEntry** m_ppFilterEntry;
  51. IPControl m_ipSrcAddress;
  52. IPControl m_ipSrcMask;
  53. IPControl m_ipDstAddress;
  54. IPControl m_ipDstMask;
  55. BOOL m_bEdit;
  56. BOOL m_bSrc;
  57. BOOL m_bDst;
  58. DWORD m_dwFilterType;
  59. UINT_PTR QueryCurrentProtocol() { return (m_cbProtocol.GetItemData(m_cbProtocol.GetCurSel()));}
  60. void SetProtocolSelection( UINT idProto );
  61. // Generated message map functions
  62. //{{AFX_MSG(CIpFltrAddEdit)
  63. afx_msg void OnSelchangeProtocol();
  64. virtual BOOL OnInitDialog();
  65. virtual void OnOK();
  66. virtual void OnCancel();
  67. afx_msg void OnCbSourceClicked();
  68. afx_msg void OnCbDestClicked();
  69. //}}AFX_MSG
  70. DECLARE_MESSAGE_MAP()
  71. };