By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,407 Members | 920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,407 IT Pros & Developers. It's quick & easy.

sendto() failed (10040)

P: n/a
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.
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Intaek Lim wrote:
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.


Is there a C++ _language_ question I am not seeing? So far all it is
about is "windows socket library". Please go to the relevant newsgroup
for that, 'comp.os.ms-windows.programmer.win32'.

V
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.