⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipcontrolview.h

📁 入侵检测系统
💻 H
字号:
// IPControlView.h : interface of the CIPControlView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_IPCONTROLVIEW_H__32B6A6A0_DD56_42FE_9EBC_2A6450357717__INCLUDED_)
#define AFX_IPCONTROLVIEW_H__32B6A6A0_DD56_42FE_9EBC_2A6450357717__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MainFrm.h"
#include <WINSOCK2.H>
//////////////////////////////////////////////////////////////////////////
#include "AnayDlg.h"


class CIPControlView : public CView
{
protected: // create from serialization only
	CIPControlView();
	DECLARE_DYNCREATE(CIPControlView)

// Attributes
public:
	CIPControlDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CIPControlView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	int m_nTotalTime;
	int m_nPacketLen;
	void UpdateEdit(int index);
	void UpdateTree(int index);
	void UpdateList();
	CIPControlDoc* m_pDoc;
	virtual ~CIPControlView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	CAnayDlg* m_pViewDlg;
	UINT m_nTimeID;
	int m_nIPNumPerSec; //当前秒的流量
	int m_nTotalPacket;//总数量	
	int m_nTCPPacket;//TCP总量
	int m_nUDPPacket;//UDP总量
	int m_nICMPPacket;//ICMP总量
	int m_nOtherPacket;// 其他包
    
	bool m_bEnableStop;
	bool m_bEnableStart;
	CMainFrame* p_Frame; //保持筐架类的指针
	CEdit* m_pEdit; //保存编辑框类的指针
	CListCtrl* m_pList; //保存列表类的指针
	CTreeCtrl* m_pTree; //保存树型控件的指针
	CComboBox* m_pComboBox; //保存组合筐的指针
//////////////////////////////////////////////////////////////////////////
//以下的成员变量保存了最后一次分析的数据包的各种数据
//	ip_header* m_pih; //ip头 保存最后一次分析的数据包的ip头
//	tcp_header* m_ptcph; //tcp头 保存最后一次分析的数据包的tcp头
//	udp_header* m_pudph;//udp头 保存最后一次分析的数据包的udp头
//
//	char m_strPacketIndex[10]; //序号
//	char m_strTime[16];//包的时间
//	char m_strLen[10];
//	char m_strSourMAC[18];//源MAC地址
//	char m_strDestMAC[18];//目的MAC地址
//	char m_strPacketType[8];//包类型,TCP UDP ICMP ARP ...
//	char m_strSourIP[16];//源IP
//	char m_strDestIP[16];//目的IP
//	char m_strSport[10];//源端口
//	char m_strDport[10];//目的端口
//////////////////////////////////////////////////////////////////////////

	//{{AFX_MSG(CIPControlView)
	afx_msg void OnButtonstart();
	afx_msg void OnUpdateButtonstart(CCmdUI* pCmdUI);
	afx_msg void OnButtonstop();
	afx_msg void OnUpdateButtonstop(CCmdUI* pCmdUI);
	afx_msg void OnFileNew();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	afx_msg void OnFileSave();
	afx_msg void OnButtonview();
	afx_msg void OnIdsrule();
	afx_msg void OnHelp();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in IPControlView.cpp
inline CIPControlDoc* CIPControlView::GetDocument()
   { return (CIPControlDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_IPCONTROLVIEW_H__32B6A6A0_DD56_42FE_9EBC_2A6450357717__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -