sendto() failed (10040)
From: Intaek Lim (intaeknews_at_gmail.com)
Date: 03/30/05
- Next message: Victor Bazarov: "Re: sendto() failed (10040)"
- Previous message: Victor Bazarov: "Re: is it undefined behaviour?"
- Next in thread: Victor Bazarov: "Re: sendto() failed (10040)"
- Reply: Victor Bazarov: "Re: sendto() failed (10040)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Mar 2005 17:54:44 -0800
I'm writing a simple path MTU discovery utility by modifying
'traceroute' source code in Win32 with MSVC7.
I set DF bit in IP header and send packets filled with N bytes of
data. When MTU size of some intermediate router is less than the size
of packet I sent, then that router returns 'Packet needs to be
fragmented but DF set' error. So I try again with packets those are
smaller than previous packets, again and again.
Okay, I can find path MTU in this way, but there is a problem.
After I receive DF error from router, in next try, sendto() don't
work. WSAGetLastError() returns 10040(message too long).
Does windows socket library remember information like 'Host - Path MTU
to the HOST'? If not, why sendto fails? I cleaned up socket resources
right before exit point of my program.
- Next message: Victor Bazarov: "Re: sendto() failed (10040)"
- Previous message: Victor Bazarov: "Re: is it undefined behaviour?"
- Next in thread: Victor Bazarov: "Re: sendto() failed (10040)"
- Reply: Victor Bazarov: "Re: sendto() failed (10040)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|