This is the mail archive of the
mailing list for the Cygwin project.
Re: Wierdness of WSASendTo()??
- From: "Mark Paulus" <mpaulus78 at earthlink dot net>
- To: "cygwin" <cygwin at cygwin dot com>
- Date: Thu, 11 Apr 2002 10:33:53 -0600
- Subject: Re: Wierdness of WSASendTo()??
- Reply-to: "Mark Paulus" <mpaulus78 at earthlink dot net>
Ok, I have done some browsing, and now I'm totally
According to Microsoft, there are 2 headers and libraries:
Since I can seem to use the IP_HDRINCL macro, I am picking
However, I can't seem to figure out how to set the option.
When I invoke the following code fragment:
/* FreeBSD wants this to avoid sending out packets with protocol type RAW
to the network. */
if(setsockopt(sendsock, SOL_IP, IP_HDRINCL, &trueopt, sizeof(trueopt)))
I get the following from strace, which indicates that maybe cygwin doesn't
202 280647 [main] mtr 2576 cygwin_socket: socket (2, 3, 255)
4034 284681 [main] mtr 2576 wsock_init: res 0
210 284891 [main] mtr 2576 wsock_init: wVersion 514
281 285172 [main] mtr 2576 wsock_init: wHighVersion 514
177 285349 [main] mtr 2576 wsock_init: szDescription WinSock 2.0
174 285523 [main] mtr 2576 wsock_init: szSystemStatus Running
171 285694 [main] mtr 2576 wsock_init: iMaxSockets 0
170 285864 [main] mtr 2576 wsock_init: iMaxUdpDg 0
372 286236 [main] mtr 2576 wsock_init: lpVendorInfo 0
64252 350488 [main] mtr 2576 fdsock: not setting socket inheritance since winsock2_active 1
272 350760 [main] mtr 2576 dtable::build_fhandler: fd 3, fh 0x615607C0
169 350929 [main] mtr 2576 fdsock: fd 3, name '/dev/udp', soc 0x27C
168 351097 [main] mtr 2576 cygwin_socket: 3 = socket (2, 3, 255)
5043 356140 [main] mtr 2576 cygwin_setsockopt: setsockopt optval=1
352 356492 [main] mtr 2576 cygwin_setsockopt: 0 = setsockopt (3, 0, 1 (SO_DEBUG), 22FE40, 4)
Do I need to maybe restructure my code so that I do not create a header???
On Thu, 11 Apr 2002 17:07:40 +0200, Corinna Vinschen wrote:
>On Thu, Apr 11, 2002 at 08:20:59AM -0600, Mark Paulus wrote:
>> MTR believes it's sending out a good ICMP packet of 64 bytes (0x40).
>> cygwin_sendto() also thinks it's sending out 64 bytes (as reported by strace).
>> However, tcpdump on my linux box is receiving 84 bytes.
>> What it looks like to me is that somehow WSASendTo is re-formatting
>> the packet that is going out. But, this
>> turns it into an invalid packet, and causes a "network unreachable" error
>> on the linux box, and the response never comes back.
>> Has anyone seen this behaviour before??
>Look for IP_HDRINCL.
>Corinna Vinschen Please, send mails regarding Cygwin to
>Cygwin Developer mailto:email@example.com
>Red Hat, Inc.
>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting: http://cygwin.com/bugs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html