www.pudn.com > SnmpToplog.rar > MySubNet.h


// MySubNet.h: interface for the CMySubNet class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_MYSUBNET_H__D3877E15_E022_45E3_BE72_5D45EA0CB022__INCLUDED_) 
#define AFX_MYSUBNET_H__D3877E15_E022_45E3_BE72_5D45EA0CB022__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include "ShowTuoPuDlg.h" 
#include "ActiveHostDlg.h" 
 
//子网类 
class CMySubNet   
{ 
public: 
	CMySubNet(); 
	virtual ~CMySubNet(); 
public: 
	void UpdateList(); 
	void ShowSubNetInfo(CListCtrl *pList); 
	void AddActiveHost(CString strActive); 
	BOOL IsActive(char* ip); 
	static CALLBACK TimerProc(HWND hwnd,UINT uMsg,UINT_PTR idEvent,DWORD dwTime); 
	BOOL SetTimer(); 
	void GetIpAddress(int i,char* IP); 
	BOOL StopSearing(); 
	 
	void SearchActiveHosts(); 
	void ChangeIPToInts(CString strIP, int &nField1, int &nField2, int &nField3, int &nField4); 
	void GetMaxNumber(); 
	CString m_Address;//子网网络号码 
	CString m_Mask;//子网掩码 
	int m_nMaxNumber;//该子网的最大主机树 
	int m_nActiveNumber;//活动主机数 
	int m_nState;//状态 (还没搜索 正在搜索  已经搜索完成) 
	HANDLE m_hThread;//保存线程的句柄 
	CStringArray m_ActiveHosts;//保存该子网的活动主机 
	int m_nCurrentIndex; 
	CListCtrl* m_pList; 
	int m_nListItem; 
 
	CShowTuoPuDlg* m_pDlg; 
	CActiveHostDlg* m_pActiveHostDlg; 
 
}; 
 
#endif // !defined(AFX_MYSUBNET_H__D3877E15_E022_45E3_BE72_5D45EA0CB022__INCLUDED_)