WinSock2 RAW socket : what's wrong with my code ?

Everything else that doesn't fall into one of the other PB categories.
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

Post by newbie »

I done it in C++ (simple win32 console application) and i have the same error at the same API call "sendto".

What does this mean ? 2 languages, same error ?

A friend has suggested to me that it could mean that i badly build the packet, what do you think about it ?
- Registered PB user -

Using PB 4.00
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

Post by newbie »

answer :

http://tangentsoft.net/wskfaq/advanced.html#pktheader
4.3 - How can I change the IP or TCP header of a packet?

Windows 2000 can do this with raw sockets; no other Microsoft stack can do this
you can do a raw ICMP packet, but you can't modify the IP or TCP header other than a few field like TTL for instance.

End of story :cry:
- Registered PB user -

Using PB 4.00
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

euh, there's more to it than that...

actually, win98, nt, 2k and xp all offer different levels of raw socket support

for all practical purposes: nothing :-) under win98 and nt
2k does some limited stuff

it is, however, possible to do it under xp, HOWEVER 1. not completely, and 2. not all XP's are created equal

go for linux, there it'll work (thanks heaven, imagine that raw sockets would be easy under xp, even more script kiddies would flood the world with reflected dos attacks... brrr...)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply