微软ping程序源代码完整版

微软ping程序源代码完整版

ID:30892297

大小:141.76 KB

页数:20页

时间:2019-01-04

微软ping程序源代码完整版_第1页
微软ping程序源代码完整版_第2页
微软ping程序源代码完整版_第3页
微软ping程序源代码完整版_第4页
微软ping程序源代码完整版_第5页
资源描述:

《微软ping程序源代码完整版》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、微软Ping程序源代码完整版MicrosoftpingprogramsourcecodecompleteversionAuthor:HouZhijiangWriteaPingprocedures,canbesaidtobethefirststeptowardsmanynetworkprogramming!!thesourcecodeofthepingprogramafterImodifyanddebug,basicallycanreplacethepingprogramwithwindows・EachmoduleIhavedeta

2、ilednotesandmodifythelog,wehopetobeabletohelpinlearning!!Thisprogram/mainsourcecodefromtheMSDNwebsite,theauthorjustmadesomeimprovementsandnotes!AlsoneedtopayattentiontoisbeforeBuild,mustjointhews232.liblibraryfile,otherwiseitwillprompt"errorLNK2001:"error!*//sixsixsix

3、sixsixsix/XJSXJSXJSxpxxpxXTXXTXXTXXTXXTXXTXXTXXTXXTXXTXXTXXTXXTXXTXXTXXTXXTXXTX✓jX彳UsixXJSXJSXJSXJS✓JXxTxVersion1.1revisionhistory:<1>sockettosolvetheblockingproblem,whichcanbehandledcorrectlyrequest!Version1.2:modifyrecords<1>addedbyfunction(i.e.theusercontrolthenu

4、mberofICMPpacketsthecommandofthesecondparameters).<2>increasedthestatisticalfunctionofPingresults>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^>1^^lz^lzsl^>1^>1^>1^>izviz#r^#7%^7^^Tx^Tx^7^^7^^T%#T^#T^^7^^ix^Tx^TxZFxZF^#T^Zjx#Tx✓?%

5、T%✓?%#Tx#T^#T^#T^#T^#T^#T^^TxZjxZj%#T^#T^#T^#T^#T^#T^>r%#T^#ix⑰、"卜/I#pragmapack(4)#inelude#include#include^defineICMP_ECH08^defineICMP_ECHOREPLY0#defineICMP_MIN8byteICMPpacket//minimum8(justheader)TheIPheader/**/Typedefstructiphdr{Unsignedinth_len:4oftheheader;//lengt

6、hUnsignedintversion:4;//VersionofIPUnsignedcharTOS;//TypeofserviceUnsignedshorttotal_lenlengthofthepacket;//totalUnsignedshortident;//uniqueidentifierUnsignedshortfrag_and_flags;//flagsUnsignedcharttl;Unsignedcharproto;//protocol(TCPUDPetc)Unsignedshortchecksum;//IPch

7、ecksumUnsignedintsourcelP;UnsignedintdestIP;}IpHeader;ICMP//headerTypedefstructicmphdr{BYTEi_type;BYTEicodetypesubcode;/**/USHORTi_cksum;USIIORTi_id;USHORTi_seq;ThisisnottheSTD/headerbutwereservespacefortime・ULONGtimestamp;}IcmpHeader;^defineSTATUS_FAILEDOxFFFF^define

8、DEF_PACKET_SIZE32Thenumberof^defineDEF_PACKET_NUMBER4/**/senddatagrams^defineIAX_PACKET1024#definexmalloc(s)HeapAlloc(GetPr

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。