winpcap/libpcap 是否允许我发送原始无线数据包? [英] Does winpcap/libpcap allow me to send raw wireless packets?

查看:49
本文介绍了winpcap/libpcap 是否允许我发送原始无线数据包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,我一直在使用 winpcap 通过有线连接发送原始数据包.我正在构建自己的协议(没什么特别的,只是掌握了它的窍门)但现在我也想将其扩展到无线连接.winpcap 是否允许我通过无线适配器发送原始数据包?

I've been using winpcap to send raw packets over a wired connection for a while now. I'm building my own protocol (nothing special, just getting the hang of it) but now I want to extend it to wireless connections too. Does winpcap allow me to send raw packets over a wireless adapter?

我在 windows xp 和 windows 7 上使用 VC++.在我的 windows 7 机器上它似乎可以工作,但在我的 xp 机器上 winpcap 甚至无法打开我的适配器来发送/接收数据包.我试图在我的 xp 机器上启动 Wireshark 以查看从我的另一台机器发送的数据包是否到达,但我的 Wireshark 也无法打开我的无线适配器.然后重新启动到ubuntu并再次尝试.这次wireshark确实工作了,但数据包没有出现.

I'm using VC++ on windows xp and windows 7. On my windows 7 machine it seems to work, but on my xp machine winpcap can't even open my adapter to send/receive packets. I tried to launch wireshark on my xp machine to see if the packets sent from my other machine arrived, but I wireshark couldn't open my wireless adapter either. Then rebooted into ubuntu and tried again. This time the wireshark did work, but the packets didn't show up.

关于 winpcap 在无线传输方面的限制,我有什么需要了解的吗?如果有限制,是否有替代方法可以让我在 Windows 上通过无线网络发送原始数据包?

Is there anything I should know about winpcap's limitations regarding wireless transmission? And if there are limitations is there an alternative that can let me send raw packets over wireless network on windows?

推荐答案

如果raw"意味着原始 802.11 数据包",那么 libpcap 可能允许它,但是 WinPcap, 没那么多.请参阅我对另一个问题的回答.如果您可以在 Linux、*BSD 或 OS X 上将适配器置于监控模式,则您可能能够发送原始 802.11 数据包.然而,在 Windows 上,不仅将其置于监控模式需要大量工作(可能包括新的内核模式代码!),一旦将其置于监控模式,它可能无法发送任何数据包.

If "raw" means "raw 802.11 packets", then libpcap might allow it, but WinPcap, not so much. See my answer to another question. If you can put the adapter into monitor mode on Linux, *BSD, or OS X, you might be able to send raw 802.11 packets. On Windows, however, not only is putting it into monitor mode going to take a significant amount of work (probably including new kernel-mode code!), once you've put it into monitor mode, it might be impossible to send any packets.

如果raw"只是意味着raw IP包",那么raw IP sockets应该像在以太网上一样工作——或者说不太好.

If "raw" just means "raw IP packets", then raw IP sockets should work as well - or not well - as on Ethernet.

这篇关于winpcap/libpcap 是否允许我发送原始无线数据包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆