winpcap和airpcap

winpcap只能抓取Ethernet包,不能抓取无线的包。请看: http://www.winpcap.org/misc/faq.htm#Q-16

Q16Which network adapters are supported by WinPcap?

A: The WinPcap device driver was developed to work primarily with Ethernet (10/100/1000) adapters. Support for other MACs was added during the development, but Ethernet remains the most tested one. 
The overall situation is:

  • Windows 95/98/ME: the packet driver works ok on Ethernet networks. It works also on PPP WAN links, but with some limitations (for example it is not able to capture the LCP and NCP packets). FDDI, ARCNET, ATM and Token Ring should be supported, however we did not test them because we do not have the hardware.
  • Windows NT4/2000/XP/2003/Vista/2008/Win7/2008R2: the packet driver works ok on Ethernet networks. As for dial-up adapters and VPN connections, read Q5 and Q6.  As in Win9x,  FDDI, ARCNET, ATM and Token Ring are supported, but not tested by us.
  • Wireless adapters: these adapters may present problems, because they are not properly supported by the Windows Kernel. Some of them are not detected, other don't support promiscuous mode. In the best case, WinPcap is able to see an Ethernet emulation and not the real transiting packets: this means that the 802.11 frames are transformed into fake Ethernet frames before being captured, and that control frames are not received. 

    For real wireless capture, CACE Technologies offers the AirPcap adapter, specifically designed to sniff 802.11 traffic, including control frames, management frames and power information. AirPcap at this time is the only solution for capturing raw 802.11 traffic with WinPcap. More details can be found on the AirPcap product page.
AirpCap可以抓取无线的数据包,请看: http://baike.baidu.com/view/2830482.htm
AirPcap系列产品是由美国CACE公司设计一种专门用于无线网络分析的工具,主要应用于windows平台。它以硬件形式发布(分USB,Cardbus1,Minicard几种),和开放源码的WireShark(以前叫Ethereal,是和Sniffer齐名的嗅探器,但现在sniffer已转为商用。WireShark具备优异的底层协议分析能力,超过了Sniffer)配合,提供广泛的802.11WLAN解决方案。


还是用wireShark来分析数据包吧!最强大,且免费!

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Winpcap 是一个开源的 Windows 网络抓包库,它可以在 Windows 操作系统中进行数据包的捕获和分析。在 Winpcap 中,数据包的发送和解析是两个核心的功能。 数据分组发送: Winpcap 提供了一组用于发送网络数据包的接口,可以通过这些接口发送从应用程序收集的数据包。数据包可以通过以下步骤进行发送: 1. 打开一个网络适配器: 使用 Winpcappcap_open_live() 函数打开一个网络适配器,该函数将返回一个 pcap_t 结构体指针,用于后续的数据包捕获和发送。 2. 构造数据包: 使用 C 语言的结构体定义数据包的格式,将数据包的各个字段填充进去,例如目的 MAC 地址、源 MAC 地址、协议类型等。 3. 发送数据包: 使用 Winpcappcap_sendpacket() 函数将构造好的数据包发送到网络。 数据包解析: Winpcap 还提供了一组用于解析网络数据包的接口,可以通过这些接口解析从网络中捕获的数据包。数据包可以通过以下步骤进行解析: 1. 打开一个网络适配器: 使用 Winpcappcap_open_live() 函数打开一个网络适配器,该函数将返回一个 pcap_t 结构体指针,用于后续的数据包捕获和解析。 2. 捕获数据包: 使用 Winpcappcap_next_ex() 函数捕获网络数据包,该函数将返回一个 pcap_pkthdr 结构体指针和一个指向数据包内容的指针。 3. 解析数据包: 使用 C 语言的结构体解析数据包,将数据包的各个字段解析出来,例如目的 MAC 地址、源 MAC 地址、协议类型等。 通过以上步骤,可以实现对网络数据包的发送和解析。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值