This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Raw sockets
- To: Cygwin <cygwin at sources dot redhat dot com>
- Subject: Raw sockets
- From: KillerBunny <killabunny at seductive dot com>
- Date: Sun, 3 Dec 2000 13:49:46 -0500 (EST)
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