This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

raw sockets (Re: Bug in Cygwin - networking api ??)

OK, I tried the April 4 snapshot of cygwin1.dll now.

I compiled the traceroute code to call socket() like:


this seems to work for sending as long as you call
sendto() with the icmp packet and data. I'm not sure
how standard this is, as the only other #ifdef in traceroute
that uses this is hpux. Perhaps cygwin sendto() should skip
the ip header to be more compatible? Is IP_HDRINCL supported in Cygwin?

If I call socket() with IPPROTO_UDP instead, UDP packets
are actually sent out, but with the destination port = 0.
This might just be a Windows thing, because the Winsock
faq says that RAW sockets only work for ICMP or IGMP. 

Anyway, that's the sending side. The recvfrom() that is
listening for the ICMP response never returns data. 


To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com> 
Subject: Re: Bug in Cygwin - networking api ?? 
From: Corinna Vinschen <cygwin at cygwin dot com> 
Date: Thu, 5 Apr 2001 09:53:26 +0200 
References: <> 


On Wed, Apr 04, 2001 at 06:53:40PM -0700, John Paul Morrison wrote:
> Yes. Since we were talking about the same code (The Van Jacobson
> source code), I thought I'd see if any progress has been made. 
> It looks like the socket() call doesn't work as expected for SOCK_RAW.
> A tcpdump shows that the packet is sent out with IP protocol 0,

Try a current developers snapshot, please. AFAICS, it should work


Want to unsubscribe from this list?
Check out:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]