www.pudn.com > NetScan.rar > NetScanView.h
// NetScanView.h : interface of the CNetScanView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_NETSCANVIEW_H__67940B70_33E0_4D31_A980_3A598C182CB7__INCLUDED_) #define AFX_NETSCANVIEW_H__67940B70_33E0_4D31_A980_3A598C182CB7__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include#define PING 1 #define PORTSCAN 2 class CNetScanDoc; //端口信息 struct _portInfo { unsigned int ipAddress; BOOL port[6]; }; //每个主机的信息 struct _hostInfo { unsigned int destIP;//目标IP int time; }; class CNetScanView : public CFormView { protected: // create from serialization only CNetScanView(); DECLARE_DYNCREATE(CNetScanView) public: //{{AFX_DATA(CNetScanView) enum{ IDD = 101 }; CListCtrl m_ctrlList; //}}AFX_DATA // Attributes public: CNetScanDoc* GetDocument(); //起始地址 unsigned int m_BEndAddress; //终止地址 unsigned int m_BBeginAddress; CList <_hostInfo, _hostInfo> m_listHost;//能ping通的ip地址链表 // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CNetScanView) public: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual void OnInitialUpdate(); // called first time after construct virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); //}}AFX_VIRTUAL // Implementation public: int m_pingNumber; void SetUI(); unsigned int m_Port[6]; void StartPortScan(); int m_run; //判断运行的是什么程序,1为ping,2为portscan, int m_timeout; //超时时间 void StartPing(); virtual ~CNetScanView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif private: unsigned int m_uThreadNum;//线程数 protected: // Generated message map functions protected: //{{AFX_MSG(CNetScanView) afx_msg void OnClose(); afx_msg void OnBtnStart(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in NetScanView.cpp inline CNetScanDoc* CNetScanView::GetDocument() { return (CNetScanDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_NETSCANVIEW_H__67940B70_33E0_4D31_A980_3A598C182CB7__INCLUDED_)