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

📄 readip0802dlg.h

📁 IP包分析程序
💻 H
字号:
// ReadIP0802Dlg.h : header file
//

#if !defined(AFX_READIP0802DLG_H__F757D915_E2FA_4FB6_8B5C_DC481B454D2D__INCLUDED_)
#define AFX_READIP0802DLG_H__F757D915_E2FA_4FB6_8B5C_DC481B454D2D__INCLUDED_

#include "TcpDialog.h"	// Added by ClassView
#include "UdpDialog.h"	// Added by ClassView
#include "icmpDlg.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



/////////////////////////////////////////////////////////////////////////////
// CReadIP0802Dlg dialog

class CReadIP0802Dlg : public CDialog
{
// Construction
public:

	CFile file;
	UdpDialog udpdlg;
	TcpDialog tcpdlg;
	icmpDlg idlg;

	void icmp();
	void udp();
	void tcp();
	struct _iphead
	{
		unsigned char verlen;
		unsigned char tof;
		unsigned char totallenh;
		unsigned char totallenl;
		unsigned char identificationh;
		unsigned char identificationl;
		unsigned char flagoffseth;
		unsigned char offsetl;
		unsigned char ttl;
		unsigned char upperprotocol;
		unsigned char checksumh;
		unsigned char checksuml;
		unsigned long sourceIP;
		unsigned long destIP;
	}iphead;

	struct _tcphead
	{
	unsigned int sourceporth:8;
		unsigned int sourceportl:8;
		unsigned int destporth:8;
		unsigned int destportl:8;

		unsigned int sequence1:8;
		unsigned int sequence2:8;
		unsigned int sequence3:8;
		unsigned int sequence4:8;

		unsigned int ack1:8;
		unsigned int ack2:8;
		unsigned int ack3:8;
		unsigned int ack4:8;
	
		unsigned int tcphlen_h4:8;
		unsigned int codebit_l6:8;
		unsigned int windowh:8;
		unsigned int windowl:8;

		unsigned int tcpchecksumh:8;
		unsigned int tcpchecksuml:8;
		unsigned int urgentpointerh:8;
		unsigned int urgentpointerl:8;

	}tcphead;
	struct _udphead
	{
		unsigned int sourceporth:8;
		unsigned int sourceportl:8;
		unsigned int destporth:8;
		unsigned int destportl:8;

		unsigned int datagramlenh:8;
		unsigned int datagramlenl:8;
		unsigned int udpchecksumh:8;
		unsigned int udpchecksuml:8;
	
	}udphead;

	struct _ihdr 
	{
	    BYTE i_type;//ICMP 类型码,回送请求的类型码为8
	    BYTE i_code; /* 子类型码,保存与特定ICMP 报文类型相关的细节信息 */
	    USHORT i_cksum;/* 校验和 */
	    USHORT i_id;/* ICMP数据报的ID号*/
	    USHORT i_seq;/*ICMP 数据报的序列号*/
	}IcmpHead;




	CReadIP0802Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CReadIP0802Dlg)
	enum { IDD = IDD_READIP0802_DIALOG };
	CString	m_directory;
	CString	m_version;
	CString	m_hlen;
	CString	m_upperprotocol;
	CString	m_totallen;
	CString	m_sourceip;
	CString	m_destip;
	CString	m_flag;
	CString	m_offset;
	CString	m_identification;
	CString	m_tof;
	CString	m_ttl;
	CString	m_ipchecksum;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CReadIP0802Dlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CReadIP0802Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBNdirectory();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	bool bUdpopen;
	bool bTcpopen;
	bool bIcmpopen;
};

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

#endif // !defined(AFX_READIP0802DLG_H__F757D915_E2FA_4FB6_8B5C_DC481B454D2D__INCLUDED_)

⌨️ 快捷键说明

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