www.pudn.com > SnifferPro.rar > ICMPGram.h


// ICMPGram.h: interface for the ICMPGram class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_ICMPGRAM_H__C90039E9_91B3_44D8_BF03_3CFA973890B9__INCLUDED_) 
#define AFX_ICMPGRAM_H__C90039E9_91B3_44D8_BF03_3CFA973890B9__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
class ICMPGram   
{ 
public: 
	ICMPGram(); 
	ICMPGram(const unsigned char *buf,int buflen); 
	virtual ~ICMPGram(); 
	void GetType(CString &str1,CString &str2); 
	CString GetGateWay(); 
	CString GetAddrMask(); 
 
	int type;//类型 
	int code;//代号 
	int checksum;//校验和 
	int datalen;//数据长度 
	unsigned char *data;//数据 
	//Not for All ICMP 
	unsigned int gatewayaddr;//网关地址 
	unsigned int identification;//标识 
	unsigned int sequence;//顺序号 
	unsigned int inittime;//初始时间戳 
	unsigned int receivetime;//接收时间戳 
	unsigned int sendtime;//发送时间戳 
	unsigned int addrmask;//地址掩码 
}; 
 
#endif // !defined(AFX_ICMPGRAM_H__C90039E9_91B3_44D8_BF03_3CFA973890B9__INCLUDED_)