亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? icmp.cpp

?? Visual+C++網(wǎng)絡通信協(xié)議分析
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
// Icmp.cpp : implementation file
//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//					Implementation of the CIcmp class							//
//																				//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//			1998. EarthWalk Designs Software, by Jay Wheeler.					//
//			All inquiries and/or comments to Jay@EarthWalkDesigns.com			//
//			Latest version can be downloaded from:								//
//																				//
//				http://www.earthwalkdesigns.com									//
//																				//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Designed using Microsoft VisualC++ 4.2 and MFC						//
//			Tested on WindowsNT 4.0 Workstation and Server						//
//																				//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//			This software is released into the public domain as is and			//
//			without warranty.													//
//																				//
//			Use it in good health, and please let me know if it was useful.		//
//			If you make improvements or fixed problems, please drop me an		//
//			e-mail describing your changes.  I will try to incorporate			//
//			them into this package so that others may benefit from your			//
//			improvements.														//
//																				//
//			Enjoy!																//
//																				// 
//////////////////////////////////////////////////////////////////////////////////
//																				//
//			Icmp Class - Derived from CSocket class								//
//																				//
//		Provides the following class methods for WindowsNT 4.0 systems			//
//		utilizing the WindowsNT Winsock 2 interface to the Internet.			//
//																				//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//		OpenNewSocket															//
//			When called with no arguements, opens a SOCKET connection to a		//
//			RAW socket with ICMP protocol.										//
//																				//
//			Requires a handle to a message processor which will process the		//
//			socket events, the message number to process, and a mask giving		//
//			the events to process.												//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns TRUE if successful, else FALSE.				//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		OpenNewSocket															//
//			Opens a SOCKET connection to a socket of specified family, type		//
//			and protocol														//
//																				//
//			Requires a handle to a message processor which will process the		//
//			socket events, the message number to process, and a mask giving		//
//			the events to process.												//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns TRUE if successful, else FALSE.				//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		Connect																	//
//			When called with 2 arguements, connects an Icmp object to a RAW		//
//			socket with ICMP protocol.											//
//																				//
//			Requires 2 integer values specifying the receive and transmit		//
//			timeouts															//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns TRUE if successful, else FALSE.				//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		Connect																	//
//			When called with 5 arguements, connects an Icmp object to a socket	//
//			of specified family, type and protocol.								//
//																				//
//			Requires 2 integer values specifying the receive and transmit		//
//			timeouts															//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns TRUE if successful, else FALSE.				//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		CloseIcmpSocket															//
//			Closes a socket associated with an Icmp object.						//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns the integer result of the operation.			//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		SetAsynchNotification													//
//			Sets the window (process) to notify when a network event on the		//
//			socket associated with the Icmp object occurs.						//
//																				//
//			Requires the message number to send to the window, and the events	//
//			to notify on.														//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns the integer result of the operation.			//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		SetTTL																	//
//			Set the TTL option on the socket associated with an Icmp object.	//
//			TTL specifies the number of hops (gateways) to query in the			//
//			Internet tree before a response is returned.  Should be set to		//
//			icmpMaxHops to get a response from the host.						//
//			By incrementing the TTL from 1 to (number of hops to final			//
//			destination), a TraceRoute function can be performed.				//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns the integer result of the operation.			//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		Ping																	//
//			Sends an ICMP ping message to the host indicated in the Icmp		//
//			variable icmpSockAddr.  The Icmp variables icmpCurSeq and			//
//			icmpCurId are sent in the buffer referenced by pIcmpBuffer.  The	//
//			referenced buffer must be large	enough to hold DataLen bytes plus	//
//			the size of the ICMP message header.								//
//																				//
//			The Icmp variable icmpPingSentAt is set to the time value at the	//
//			time the ping message is sent.										//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns the integer result of the operation.			//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		IcmpChecksum															//
//			Computes the icmp checksum of the Len data in the buffer referenced	//
//			by lpBuf.															//
//																				//
//			Returns an unsigned integer value of the computed checksum.			//
//																				//
//		GetIPAddress															//
//			Returns the value of the IP address of the host pointed by			//
//			iHostName as an unsigned long in network byte order, as described	//
//			in inet_aton														//
//																				//
//			Sets iHostName to the value of the host name returned in			//
//			icmpHostEnt.														//
//																				//
//			Requires the message number to send to the window, and the events	//
//			to notify on.														//
//																				//
//			Sets Icmp variable icmpSockAddr fields appropriately, leaving the	//
//			IP address in icmpSockAddr.sin_addr, and the type of address in		//
//			icmpSockAddr.sin_family.  Also sets icmpHostEnt fields appropriately//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns the integer result of the operation.			//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		Receive																	//
//																				//
//			Reads the socket associated with the Icmp object and returns the	//
//			number of bytes read, or SOCKET_ERROR, if an error occurs.			//
//																				//
//			Requires the address of the buffer to store the incoming message	//
//			and an integer buffer size.  The buffer must be large enough to		//
//			contain the incoming message.  In the case of an ICMP ping echo		//
//			response, the size would be the size of the outgoing message plus	//
//			the size of an ICMP header plus the size of an IP header.			//
//																				//
//			Sets icmpPingReceivedAt to the time the receive command is issued,	//
//			icmpRoundTripTime to the difference between icmpPingSentAt and		//
//			icmpPingReceivedAt, icmpCurSeq to the incoming sequence number		//
//			and icmpCurId to the incoming id field.								//
//																				//
//			Sets rcvSockAddr fields appropriately.								//
//																				//
//			Sets icmpSocketError and icmpSocketErrorMod to indicate the type	//
//			of error, and returns the integer result of the operation.			//
//																				//
//			icmpSocketError and icmpSocketErrorMod are preserved until the next	//
//			operation on this Icmp object is performed.							//
//																				//
//		DisplayError															//
//			Displays the provided ErrorType message prior to the decoded error	//
//			message in icmpSocketError and icmpSocketErrorMod.					//
//																				//
//			Sets the message box title to FunctionName.							//
//																				//
//			The message is displayed in a modal box, requiring an OK response	//
//			before the thread containing this method can progress.				//
//																				//
//////////////////////////////////////////////////////////////////////////////////
//																				//
//		Useage:																	//
//			To use this class, copy the files Icmp.cpp, Icmp.h and Icmp.rc		//
//			to the same directory as your project.	Include Icmp.cpp and		//
//			Icmp.rc in your	project.  This will cause an error notification		//
//			that only one .rc file can be active...ignore it, the next step		//
//			will fix it.  Open the file Icmp.rc, select the string table, and	//
//			highlight all of the messages.  Copy the resource strings to the	//
//			clipboard (copy button).  Open the projects' string table and paste	//
//		    the strings into the next available slot (paste button).  Close		//
//			both string tables and remove (delete) the file Icmp.rc from your	//
//			project.															//
//																				//
//////////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Icmp.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
/////////////////////////////////////////////////////////////////////////////
// CIcmp

CIcmp::CIcmp()
{
	pIcmpHeader = NULL;
	pIpHeader = NULL;

	icmpSocket = INVALID_SOCKET;
	
	icmpSockAddr.sin_family = 0;
	icmpSockAddr.sin_port = 0;
	icmpSockAddr.sin_addr.s_addr = 0;

	rcvSockAddr.sin_family = 0;
	rcvSockAddr.sin_port = 0;
	rcvSockAddr.sin_addr.s_addr = 0;

	icmpRoundTripTime = 0;

	icmpHops = 0;
	icmpMaxHops = MAX_HOPS;
	icmpCurSeq = 0;
	icmpCurId = 0;

	icmpRcvLen = 0;

}

CIcmp::~CIcmp()
{
	
	if (icmpSocket != INVALID_SOCKET)
		closesocket (icmpSocket);

}


// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CIcmp, CSocket)
	//{{AFX_MSG_MAP(CIcmp)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif	// 0

/////////////////////////////////////////////////////////////////////////////
//
//		Copy constructor
//
CIcmp::CIcmp(CIcmp &copy)
{
	pIcmpHeader = copy.pIcmpHeader;
	pIpHeader = copy.pIpHeader;
	icmpSocket = copy.icmpSocket;
	icmpSockAddr = copy.icmpSockAddr;
	icmpRoundTripTime = copy.icmpRoundTripTime;
	icmpHops = copy.icmpHops;
	icmpMaxHops = copy.icmpMaxHops;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
性做久久久久久免费观看欧美| 日本久久一区二区三区| 国产成人精品一区二区三区四区| av一区二区不卡| 欧美一级欧美一级在线播放| 中文字幕亚洲成人| 极品少妇一区二区| 欧美色男人天堂| 中文字幕一区二区三区在线观看| 理论片日本一区| 欧洲一区二区av| 国产精品乱码久久久久久| 久久精品噜噜噜成人88aⅴ| 日本伦理一区二区| 亚洲天堂成人网| 懂色av一区二区夜夜嗨| 久久久综合网站| 久久99精品久久只有精品| 欧美色综合久久| 亚洲免费av观看| 99re这里只有精品首页| 久久久精品2019中文字幕之3| 麻豆精品在线看| 91精品国产91久久久久久一区二区 | 日韩精品免费视频人成| 色综合色综合色综合| 国产精品日韩成人| av中文字幕不卡| 亚洲欧美在线观看| av成人动漫在线观看| 国产精品网站在线| 99国产精品视频免费观看| 国产精品久久久久久久久图文区| 国产又黄又大久久| 久久久久9999亚洲精品| 国产精品一区专区| 国产天堂亚洲国产碰碰| 风流少妇一区二区| 国产精品久久久久婷婷| 成人不卡免费av| 亚洲天堂福利av| 欧美在线视频全部完| 亚洲妇熟xx妇色黄| 日韩一区二区三区免费看 | 99热在这里有精品免费| 亚洲桃色在线一区| 欧美日韩另类国产亚洲欧美一级| 五月天国产精品| 亚洲精品一区二区三区影院| 国产成人亚洲综合a∨婷婷 | 日韩欧美不卡在线观看视频| 精彩视频一区二区| 亚洲国产成人自拍| 色成年激情久久综合| 日本 国产 欧美色综合| 久久久精品国产免费观看同学| 成人久久视频在线观看| 夜夜爽夜夜爽精品视频| 精品日韩成人av| 91同城在线观看| 午夜av电影一区| 国产亚洲综合av| 欧美在线制服丝袜| 精品一区二区三区免费视频| 国产精品美女视频| 欧美一区二区视频在线观看2022| 国产精品影视网| 亚洲国产一区二区在线播放| 欧美xxxxx裸体时装秀| 99视频在线精品| 蜜桃久久久久久| 亚洲狼人国产精品| 久久亚洲捆绑美女| 欧美日韩一区不卡| 成人深夜在线观看| 蜜臀a∨国产成人精品| 亚洲女同一区二区| 久久综合九色综合97_久久久| 91老师片黄在线观看| 久久国产乱子精品免费女| 一区二区三区不卡视频| 亚洲精品一区二区三区影院 | 不卡在线视频中文字幕| 麻豆精品新av中文字幕| 亚洲综合丁香婷婷六月香| www欧美成人18+| 欧美精选一区二区| 色综合久久久久网| 岛国av在线一区| 美女被吸乳得到大胸91| 亚洲成人免费在线观看| 亚洲男女一区二区三区| 国产喂奶挤奶一区二区三区| 日韩一区二区在线看| 欧美在线|欧美| 91亚洲资源网| 成人精品在线视频观看| 国产一区二区久久| 久久99国产精品久久99| 日韩高清一级片| 亚洲va欧美va国产va天堂影院| 亚洲欧美色图小说| 中文字幕一区二区三区不卡 | 亚洲综合一区二区三区| 中文字幕中文字幕一区二区| 国产亚洲精品中文字幕| 精品久久99ma| 精品国产在天天线2019| 欧美一区二区在线免费播放 | 日韩精彩视频在线观看| 亚洲一级片在线观看| 亚洲一区二区三区视频在线播放 | 亚洲国产成人在线| 国产欧美精品一区二区三区四区| wwwwww.欧美系列| 久久天堂av综合合色蜜桃网| 欧美成人a在线| 精品国产区一区| 久久五月婷婷丁香社区| 国产欧美精品在线观看| 中文字幕亚洲在| 亚洲人成网站影音先锋播放| 亚洲欧美日韩成人高清在线一区| 亚洲精品乱码久久久久久黑人| 亚洲视频免费在线| 亚洲与欧洲av电影| 视频一区免费在线观看| 九色porny丨国产精品| 国产精品一品视频| 成人aa视频在线观看| 91国产丝袜在线播放| 欧美电影在哪看比较好| 欧美一区二区三区四区视频 | 国产乱淫av一区二区三区| 国产精品自产自拍| 91丨porny丨在线| 欧美日韩国产系列| 精品国产一区二区三区忘忧草| 久久精品一区蜜桃臀影院| 亚洲色图清纯唯美| 日日摸夜夜添夜夜添国产精品| 极品少妇一区二区| 91亚洲国产成人精品一区二三| 欧美三级日韩三级国产三级| 这里只有精品免费| 国产午夜精品一区二区三区四区| 亚洲女同ⅹxx女同tv| 日本免费新一区视频| 国产精品 日产精品 欧美精品| 91看片淫黄大片一级在线观看| 欧美日韩国产片| 亚洲国产精品99久久久久久久久| 亚洲一区二区三区四区的| 激情五月婷婷综合| 欧美在线视频不卡| 欧美国产乱子伦| 日韩高清一区二区| 91亚洲国产成人精品一区二三| 日韩久久久精品| 亚洲自拍都市欧美小说| 国产精品一区二区三区四区| 91久久精品一区二区| 久久午夜电影网| 亚洲成av人片在线观看无码| 成人av网址在线观看| 欧美一级淫片007| 中文字幕在线视频一区| 日本aⅴ免费视频一区二区三区| av在线一区二区| 久久精品综合网| 久久精品国产久精国产爱| 色噜噜久久综合| 中文字幕精品综合| 久久99精品视频| 4438x亚洲最大成人网| 亚洲私人影院在线观看| 国产suv精品一区二区883| 欧美一区二区三区啪啪| 亚洲午夜免费视频| 91一区一区三区| 亚洲婷婷在线视频| 国产91精品欧美| 久久毛片高清国产| 久久91精品国产91久久小草 | 欧美96一区二区免费视频| 欧美综合色免费| 一级女性全黄久久生活片免费| kk眼镜猥琐国模调教系列一区二区 | 欧美日韩精品欧美日韩精品| 亚洲嫩草精品久久| 色婷婷久久久久swag精品| 中文天堂在线一区| 风间由美一区二区av101| 久久精品一二三| 国产馆精品极品| 久久九九久久九九| 成人亚洲一区二区一| 久久精品人人做| 成人午夜av在线| 国产精品美女久久久久久久久 |