0

I know that UDP has no real error control facilties outside of silent discard of packets failing checksums.

Am I correct in thinking that a UDP packet with a TTL=1 reaching a router will generate an ICMP Time Exceeded message, and a UDP packet arriving with an unused port # (54823 or something) at an end host will be rejected, causing an ICMP Port Unreachable message - and that both of those ICMP messages would be sent back to the originator of the message?

I'm pretty sure that's how it works, but I wanted to make sure I wasn't confusing myself somehow

migrated from stackoverflow.com Aug 3 '11 at 23:37

This question came from our site for professional and enthusiast programmers.

1

Yes, you're right. That is also how traceroute does it.

1

That's right, but if you want to receive those messages in your app you have to use connect for the socket.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.