FireWall1View.h
上传用户:heseme
上传日期:2009-12-23
资源大小:228k
文件大小:4k
开发平台:

Visual C++

  1. // FireWall1View.h : interface of the CFireWall1View class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_FIREWALL1VIEW_H__9D269EED_A406_11D4_8595_00D00912B25C__INCLUDED_)
  5. #define AFX_FIREWALL1VIEW_H__9D269EED_A406_11D4_8595_00D00912B25C__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include"OptionDlg.h"
  10. #define MAX_PACKET_SIZE  8192
  11. #define        MAX_LINK_NAME_LENGTH   500
  12. typedef struct _ADAPTER {
  13.     HANDLE     hFile;
  14.     TCHAR      SymbolicLink[MAX_LINK_NAME_LENGTH];
  15. } ADAPTER, *LPADAPTER;
  16. class CFireWall1View : public CScrollView
  17. {
  18. protected: // create from serialization only
  19. CFireWall1View();
  20. DECLARE_DYNCREATE(CFireWall1View)
  21. // Attributes
  22. public:
  23. CFireWall1Doc* GetDocument();
  24.     COptionDlg m_OptionDlg;
  25. BOOL bCfgOpen;
  26. // Operations
  27. public:
  28. CImageList m_smallImageList;
  29. CImageList m_largeImageList;
  30. CListCtrl m_listView;
  31.     CListCtrl m_listView1;
  32. void CreateListView();
  33.     CONTROL_BLOCK adapter;
  34. HICON m_hIcon;
  35. void OnOpensys();
  36. void OnReadsys();
  37.     void OnClosethread();
  38.     void OnClosesys();
  39. BOOL PacketWriteBuffer(LPADAPTER AdapterObject, LPPACKET lpPacket, BOOLEAN Sync, PULONG BytesWrited);
  40. BOOL PacketReceiveBuffer(LPADAPTER AdapterObject, LPPACKET lpPacket, BOOLEAN Sync, PULONG BytesReceived);
  41. VOID FreeReadBuffer(PVOID buffer);
  42. LPPACKET AollocateReadBuffer();
  43. LPPACKET pReadBuffer;
  44. void CloseSys(LPADAPTER lpAdapter);
  45. HANDLE OpenAdapter(LPTSTR name);
  46. void GetAdpaterName(LPTSTR name);
  47. void OnCfgnat();
  48.   
  49. // Overrides
  50. // ClassWizard generated virtual function overrides
  51. //{{AFX_VIRTUAL(CFireWall1View)
  52. public:
  53. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  54. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  55. virtual void OnInitialUpdate();
  56. //}}AFX_VIRTUAL
  57. // Implementation
  58. public:
  59. WORD GetDataFromPage3();
  60. WORD GetDataFromPage6();
  61. WORD GetDataFromPage5();
  62. WORD GetDataFromPage4();
  63. DWORD GetCommand(char *pbuf,int i);
  64. void ReadCommand(FILE *pf, char *pbuf);
  65. WORD GetDataFromPage1();
  66. WORD GetInitDataFromFile();
  67. void UserToKernel();
  68. void OptMyConfig();
  69. void CommandCon();
  70. void SetNetData();
  71. BOOL m_bStartFilter;
  72. BOOL m_bStartFirewall;
  73. void Startfilter();
  74. virtual ~CFireWall1View();
  75. #ifdef _DEBUG
  76. virtual void AssertValid() const;
  77. virtual void Dump(CDumpContext& dc) const;
  78. #endif
  79. protected:
  80. // Generated message map functions
  81. protected:
  82. //{{AFX_MSG(CFireWall1View)
  83. afx_msg void OnOption();
  84. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  85. afx_msg void OnDestroy();
  86. afx_msg void OnStartfilter();
  87. afx_msg void OnSearch();
  88. afx_msg void OnClosefilter();
  89. afx_msg void OnSetdata();
  90. afx_msg void OnStartfirewall();
  91. afx_msg void OnUpdateStartfirewall(CCmdUI* pCmdUI);
  92. afx_msg void OnUpdateStartfilter(CCmdUI* pCmdUI);
  93. afx_msg void OnShutdownfirewall();
  94. afx_msg void OnUpdateShutdownfirewall(CCmdUI* pCmdUI);
  95. afx_msg void OnToolLog();
  96. afx_msg void OnUpdateToolLog(CCmdUI* pCmdUI);
  97. afx_msg void OnProtlog();
  98. afx_msg void OnUpdateProtlog(CCmdUI* pCmdUI);
  99. afx_msg void OnUpdateOption(CCmdUI* pCmdUI);
  100. afx_msg void OnFilterlog();
  101. afx_msg void OnUpdateFilterlog(CCmdUI* pCmdUI);
  102. afx_msg void OnUpdateExit(CCmdUI* pCmdUI);
  103. afx_msg void OnUpdateClosefilter(CCmdUI* pCmdUI);
  104. afx_msg void OnMenuitem32816();
  105. afx_msg void OnUpdateAppExit(CCmdUI* pCmdUI);
  106. afx_msg void OnStopLog();
  107. //}}AFX_MSG
  108. afx_msg LRESULT OnLogView(WPARAM wParam,LPARAM lParam);
  109. DECLARE_MESSAGE_MAP()
  110. };
  111. #ifndef _DEBUG  // debug version in FireWall1View.cpp
  112. inline CFireWall1Doc* CFireWall1View::GetDocument()
  113.    { return (CFireWall1Doc*)m_pDocument; }
  114. #endif
  115. /////////////////////////////////////////////////////////////////////////////
  116. //{{AFX_INSERT_LOCATION}}
  117. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  118. #endif // !defined(AFX_FIREWALL1VIEW_H__9D269EED_A406_11D4_8595_00D00912B25C__INCLUDED_)