Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <381874275.975869386209.JavaMail.root@web105-mc>
Date: Sun, 3 Dec 2000 13:49:46 -0500 (EST)
From: KillerBunny <killabunny@seductive.com>
To: Cygwin <cygwin@sources.redhat.com>
Subject: Raw sockets
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: mail.com
X-Originating-IP: 212.17.64.12

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

