Raw sockets

KillerBunny killabunny@seductive.com
Sun Dec 3 10:49:00 GMT 2000


I just ran into this problem last week; i'm unable to figure out how to use Raw socket processes in Cygwin's GCC. Is this something impossible to do under Windows , has it not been implemented in Cygwin yet or is it quite possible that i'm simply doing something wrong? Eg. 
//(ip->stuff are all declared up here)
sock=socket(AF_INET,SOCK_RAW,IPPROTO_RAW);
sendto(sock,IpPacket,IPhdr->len,0,(struct sockaddr *)&host, sizeof(struct sockaddr_in));
//end
Apparently no errors were generated with lines like this, but the packet which is generated seems to simply append the "IpPacket" data to a pre-made IP packet header. 
I've also tried using "setsockopt()" With the IP_HDRINCL option (which i defined as 3 due to the lack of #define's in /netinet/in.h).
Well the point is i can never get any of these methods to work - either errors are generated or the packet simply isnt' "Raw" enough. Any suggestions?
 *thanQ*
    -Brian

______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list