AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

udp client: destination port unreachable question

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language Programming
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sun May 13, 2007 6:59 am    Post subject: udp client: destination port unreachable question Reply with quote



Hello,
My question is concerned with java.net package. I used trivial
UDPClient example to send datagrams from local interface eth1 on Linux
to the ip host not included into local route table and I tried to
capture outgoing udp traffic on interface eth1. I've got IOException
"ICMP: destination unreachable" and I only could capture outgoing
packets on loopback interface ( with Ethereal). Can someone help to
resolve my confusion: I thought UDP is "connectionless", e.g. will be
sent regardless. What does ICMP have to do with it and why does this
traffic appear on loopback interface?
Thank you,
Back to top
Esmond Pitt
Guest





PostPosted: Sun May 13, 2007 7:11 am    Post subject: Re: udp client: destination port unreachable question Reply with quote



vlyamtsev (AT) gmail (DOT) com wrote:
Quote:
Hello,
My question is concerned with java.net package. I used trivial
UDPClient example to send datagrams from local interface eth1 on Linux
to the ip host not included into local route table and I tried to
capture outgoing udp traffic on interface eth1. I've got IOException
"ICMP: destination unreachable" and I only could capture outgoing
packets on loopback interface ( with Ethereal). Can someone help to
resolve my confusion: I thought UDP is "connectionless", e.g. will be
sent regardless. What does ICMP have to do with it and why does this
traffic appear on loopback interface?

err, because the destination host is unreachable? Where would you expect
UDP to send the packet *to* if there is no unicast route to the target?

You get the ICMP response if you have used DatagramSocket.connect(). If
you avoid that and put the destination address into the DatagramPacket,
you won't get the exception, but the packet still won't go out as there
is no unicast route. If that's what you want.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.