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

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

?? icmp.cpp

?? VC通信程序源代碼.TCP/UDP高級編程,TCP,IP終端程序源代碼等.
?? 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一区二区三区免费野_久草精品视频
欧美日韩中文字幕精品| 中文字幕一区二区三中文字幕| 国产精品免费看片| 亚洲欧美日韩一区二区| 老色鬼精品视频在线观看播放| www.日韩在线| 精品免费视频.| 夜夜嗨av一区二区三区网页| 美国欧美日韩国产在线播放| 色天使久久综合网天天| 日本一区二区三区国色天香| 午夜在线电影亚洲一区| a美女胸又www黄视频久久| 欧美videofree性高清杂交| 亚洲影视在线播放| aaa欧美色吧激情视频| 久久亚洲精华国产精华液| 日韩国产在线观看一区| 欧美视频一区二| 亚洲视频网在线直播| 高清成人免费视频| 国产亚洲欧美日韩在线一区| 日韩高清一区二区| 欧美日韩亚洲综合一区| 亚洲男同1069视频| av一区二区久久| 国产精品久久久久一区| 国产·精品毛片| 亚洲国产精品精华液2区45| 麻豆精品在线看| 欧美videos中文字幕| 日本sm残虐另类| 91精品国产综合久久福利| 亚洲国产一区在线观看| 欧美亚洲国产一区二区三区va | 欧美日韩成人综合天天影院| 1区2区3区欧美| 91首页免费视频| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 亚洲三级小视频| 97久久精品人人做人人爽| 亚洲男女毛片无遮挡| 色综合咪咪久久| 一区二区三区精品视频| 欧美视频一区二区在线观看| 肉肉av福利一精品导航| 欧美一区二区二区| 国产乱码精品一区二区三区忘忧草 | 欧美电视剧免费观看| 久久99精品久久久久久国产越南| 欧美成人bangbros| 国产传媒一区在线| 日韩毛片视频在线看| 欧美性xxxxx极品少妇| 亚洲电影你懂得| 日韩欧美资源站| 成人免费观看视频| 亚洲美女视频一区| 91精品在线免费观看| 狠狠v欧美v日韩v亚洲ⅴ| 国产精品久久毛片av大全日韩| 在线欧美日韩精品| 蜜臂av日日欢夜夜爽一区| 欧美极品另类videosde| 色先锋aa成人| 麻豆精品久久久| 亚洲人xxxx| 欧美草草影院在线视频| 成人涩涩免费视频| 亚洲成人激情综合网| 久久久不卡网国产精品二区| 色94色欧美sute亚洲线路一ni | 亚洲欧美日韩一区二区三区在线观看| 欧美天堂一区二区三区| 国产在线看一区| 亚洲一级二级在线| 国产婷婷色一区二区三区四区| 一本大道久久精品懂色aⅴ | 日韩一区二区三区免费观看| 国产成人精品影视| 日韩电影免费在线| 一区二区三区精品| 国产日韩欧美综合在线| 欧美精品日日鲁夜夜添| jizzjizzjizz欧美| 久久99久久99| 亚洲444eee在线观看| 国产精品久久久久国产精品日日| 91精品一区二区三区久久久久久| 北条麻妃国产九九精品视频| 久久av老司机精品网站导航| 亚洲一区二区三区四区在线免费观看 | 日韩一区精品视频| 中文av一区特黄| 精品久久久网站| 欧美日韩国产免费一区二区| jlzzjlzz亚洲日本少妇| 国产不卡在线播放| 久久精品噜噜噜成人av农村| 亚洲综合色在线| 亚洲激情第一区| 一区在线观看视频| 欧美国产一区二区| 国产亚洲精品bt天堂精选| 精品国产一二三区| 日韩一级高清毛片| 91麻豆精品国产91久久久资源速度 | 韩国女主播一区二区三区| 亚洲丰满少妇videoshd| 一区二区三区日韩| 亚洲影院理伦片| 亚洲曰韩产成在线| 亚洲午夜av在线| 亚洲成人免费在线| 天天免费综合色| 无吗不卡中文字幕| 日韩av成人高清| 免费成人在线观看视频| 男人的j进女人的j一区| 喷水一区二区三区| 91浏览器在线视频| 91同城在线观看| 91福利社在线观看| 欧美色成人综合| 欧美一区二区三区成人| 欧美成人一区二区三区在线观看| 欧美一区二区三级| 久久久久久久国产精品影院| 国产性色一区二区| 综合色天天鬼久久鬼色| 亚洲精品免费视频| 亚洲福利视频三区| 久久精品99久久久| 国产成人午夜高潮毛片| 91在线观看视频| 精品视频免费在线| 精品国产乱码久久久久久闺蜜| 久久久久久久久久久久久久久99| 久久精品水蜜桃av综合天堂| 中文字幕av不卡| 亚洲二区在线视频| 国产成人av一区二区三区在线观看| 成人在线视频一区| 欧美色窝79yyyycom| 日韩一区二区视频| 欧美激情综合网| 亚洲国产va精品久久久不卡综合| 麻豆成人综合网| 97精品视频在线观看自产线路二| 欧美亚洲动漫精品| 久久亚洲精品小早川怜子| 亚洲精品中文字幕乱码三区| 日韩二区三区四区| 成人免费毛片app| 777午夜精品免费视频| 国产欧美一区二区精品忘忧草 | 男女视频一区二区| 成人性视频免费网站| 欧美久久久影院| 中文字幕的久久| 久久91精品国产91久久小草| 99国产精品一区| 精品国产网站在线观看| 一区二区三区精品在线| 国产成人啪免费观看软件| 欧美日韩五月天| 国产精品福利影院| 伦理电影国产精品| 欧美日韩久久一区| 国产精品国产三级国产a| 激情丁香综合五月| 欧美日韩性生活| 日本一区二区成人| 极品美女销魂一区二区三区| 欧美午夜在线一二页| 中文字幕av资源一区| 久久精品国产99| 在线成人av影院| 一区二区视频在线| 成人免费va视频| 久久伊人蜜桃av一区二区| 日韩精品高清不卡| 欧美视频在线一区| 亚洲精品日韩综合观看成人91| 国产成a人亚洲| 国产夜色精品一区二区av| 日本午夜一区二区| 欧美日本视频在线| 亚洲一区二区五区| 欧美性生活影院| 亚洲成人在线免费| 欧美影院午夜播放| 一区二区日韩av| 欧美主播一区二区三区美女| 中文字幕中文乱码欧美一区二区| 国产激情一区二区三区桃花岛亚洲| 精品国产亚洲一区二区三区在线观看| 午夜视频在线观看一区二区| 欧美性感一类影片在线播放| 一卡二卡欧美日韩|