Raw socket implementation in windows?
Posted
by krishnakumar
on Stack Overflow
See other posts from Stack Overflow
or by krishnakumar
Published on 2009-02-17T12:07:14Z
Indexed on
2010/05/16
16:40 UTC
Read the original article
Hit count: 206
I need to create TCP/IP headers manually for my application. For that i used Raw socket. My system os is win xp (SP3).
My code compiles fine :) but it throws a run time error:
Initialising Winsock...Initialised successfully. Creating Raw TCP Socket...Raw TCP Socket Created successfully. Setting the socket in RAW mode...Successful. Enter hostname : 192.168.1.152
Resolving Hostname...Resolved. Enter Source IP : 192.168.1.151
Sending packet... Error sending Packet : 10022
I have set IP_HDRINCL to 1. What am i doing wrong? I switched off the firewall too but still get the same result.
© Stack Overflow or respective owner