Click here to Skip to main content
Sign Up to vote bad
good
Hey code-project,
I am wanting to ask this question, for quite sometime anyway the question: How can i create an Raw socket which sends an lot of UDP packets in c++ under Windows? If so please show me an code of how to do it or an tutorial.
Thanks
In advance,
Cyberwarfare
Posted 29 Sep '12 - 8:01


2 solutions

  Permalink  
Comments
Sergey Alexandrovich Kryukov - 5 Nov '12 - 16:30
Maybe good enough to get an idea, a 5. --SA
As far as I know right we had full raw socket support in windows beginning with win2000 and ending with WinXP SP1. From WinXP SP2 only raw UDP sockets are available and even raw UDP sockets have some extra restrictions. More about these limitations here: http://msdn.microsoft.com/en-us/library/ms740548%28v=vs.85%29.aspx[^].
 
You can use the winpcap driver to have better raw socket support, even with TCP: http://www.winpcap.org/default.htm[^].
I'm not going to write a novel about winpcap here, check out its documentation. If you need total freedom on windows use this. Another benefit of winpcap is that its compatible with libpcap (its unix sibling) on source level so you can write platform independent network tools using it. Winpcap is utilized by my favorite packet sniffer: WireShark.
 
Now you have the essential info and the keywords to search for code examples using google. For example using the "winpcap raw udp packet tutorial" keywords with google I found this: How to craft UDP packets and send them with WinPCap[^]
  Permalink  
Comments
Espen Harlinn - 1 Oct '12 - 18:23
5'ed!
pasztorpisti - 1 Oct '12 - 18:24
Thank you!
Sergey Alexandrovich Kryukov - 5 Nov '12 - 16:30
My 5. However, I usually answer "I don't known". How do we know what OP can do? Except some things which nobody can. :-) --SA
pasztorpisti - 5 Nov '12 - 17:26
Thanks! He might be a genius just testing our knowledge, who knows... :-)
Sergey Alexandrovich Kryukov - 5 Nov '12 - 17:40
Exactly. Even a genius deserves some chance... :-) --SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 315
1 Aarti Meswania 250
2 Slacker007 240
3 Sergey Alexandrovich Kryukov 219
4 Ron Beyer 190
0 Sergey Alexandrovich Kryukov 8,743
1 OriginalGriff 7,124
2 CPallini 3,678
3 Rohan Leuva 3,011
4 Maciej Los 2,403


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 29 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid