Packet开发范例.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Packet开发范例

第一个程序:Testapp 这是一个非常简单的捕获程序,用来测试packet.dll。它是一个控制台应用程序,执行时,testapp给用户选择一个在本机器上安装好的适配器,然后它就可以从指定的网络适配器上面捕获包知道某个键按下,同时把每个包的内容打印在屏幕上。 00001 /* 00002 ?* Copyright (c) 1999 - 2002 00003 ?*? Politecnico di Torino.? All rights reserved. 00004 ?* 00005 ?* Redistribution and use in source and binary forms, with or without 00006 ?* modification, are permitted provided that: (1) source code distributions 00007 ?* retain the above copyright notice and this paragraph in its entirety, (2) 00008 ?* distributions including binary code include the above copyright notice and 00009 ?* this paragraph in its entirety in the documentation or other materials 00010 ?* provided with the distribution, and (3) all advertising materials mentioning 00011 ?* features or use of this software display the following acknowledgement: 00012 ?* ``This product includes software developed by the Politecnico 00013 ?* di Torino, and its contributors. Neither the name of 00014 ?* the University nor the names of its contributors may be used to endorse 00015 ?* or promote products derived from this software without specific prior 00016 ?* written permission. 00017 ?* THIS SOFTWARE IS PROVIDED ``AS IS AND WITHOUT ANY EXPRESS OR IMPLIED 00018 ?* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 00019 ?* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00020 ?*/ 00021 00022 #include stdio.h 00023 #include conio.h 00024 00025 00026 #include ..\..\Include\packet32.h 00027 #include ..\..\Include\ntddndis.h 00028 00029 #define Max_Num_Adapter 10 00030 00031 // Prototypes 00032 00033 void PrintPackets(LPPACKET lpPacket); 00034 00035 char??????? AdapterList[Max_Num_Adapter][1024]; 00036 00037 int main() 00038 { 00039 00040???? //define a pointer to an ADAPTER structure 00041 00042???? LPADAPTER? lpAdapter = 0; 00043 00044???? //define a pointer to a PACKET structure 00045 00046???? LPPACKET?? lpPacket; 00047 00048???? int?? ?????i; 00049???? DWORD????? dwErrorCode; 00050 00051??

文档评论(0)

cgtk187 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档