0
votes

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?

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.

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?

1
1. writing your own low-level protocol is generally a bad idea, you'd better stick at least to ip, at best to tcp or udp, with your own application layer on top of it.Adrien Plisson
2. windows allows to send raw packets without resorting to libpcap.Adrien Plisson
@adrien: access to RAW sockets on Windows is restricted to admin users only, though.Remy Lebeau
On top of that, raw sockets are not supported (or are restricted) in windows xp sp2+ until windows 7. And below only by windows xp sp 1. So I think that using winpcap/lipcap is a more portable approach. @Adrien, the protocol I'm writing is never going to be used for anything serious. It's just for amusement and because I want to see if I can get computers to communicate the ways want them to.user513647
Does anyone have any ideas left? How can I send raw packets over a wireless network?user513647

1 Answers

1
votes

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.

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