Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

Sending Hop Limited UDP packets

Thread view: 
Ashoka! - 10 Apr 2007 09:22 GMT
Is there a way to send a UDP packet with a specific TTL however it
must be a unicast address instead of multicast address. Any ideas?

regards
Usman Ismail
Knute Johnson - 10 Apr 2007 17:15 GMT
> Is there a way to send a UDP packet with a specific TTL however it
> must be a unicast address instead of multicast address. Any ideas?
>
> regards
> Usman Ismail

I think you would have to write your own DatagramSocketImpl.  But I'm
curious as to why you would want a TTL on a unicast UDP packet.  Do you
not want it to get to it's address?

Signature

Knute Johnson
email s/nospam/knute/

Gordon Beaton - 10 Apr 2007 17:22 GMT
> I think you would have to write your own DatagramSocketImpl. But I'm
> curious as to why you would want a TTL on a unicast UDP packet. Do
> you not want it to get to it's address?

It's one way of implementing traceroute, but I can't think of any
other uses.

/gordon

--
Esmond Pitt - 11 Apr 2007 10:09 GMT
> Is there a way to send a UDP packet with a specific TTL however it
> must be a unicast address instead of multicast address. Any ideas?

Use a MulticastSocket so you get the setTimeToLive() API and just send
to a unicast address.
Gordon Beaton - 11 Apr 2007 10:23 GMT
> Use a MulticastSocket so you get the setTimeToLive() API and just
> send to a unicast address.

Does that actually work?

I was going to make the same suggestion earlier, but tested first and
couldn't see (with Wireshark) that the setting had any effect on
unicast packets. The documentation seems to confirm this:

"Set the default time-to-live for *multicast* packets sent [...]"

/gordon

--
Esmond Pitt - 12 Apr 2007 01:21 GMT
>>Use a MulticastSocket so you get the setTimeToLive() API and just
>>send to a unicast address.
>
> Does that actually work?

oops, err, hmm, maybe not ... on investigation it turns out that there
are both IP_TTL and IP_MULTICAST_TTL, and
MulticastSocket.setTimeToLive() sets the latter, and the OP wants the
former ...

so you can't do it in Java.
Ashoka! - 26 Apr 2007 12:41 GMT
I am trying to implement the tailgating algorithm to measure internet
bandwidth.

On Apr 12, 5:21 am, Esmond Pitt <esmond.p...@nospam.bigpond.com>
wrote:

> >>Use a MulticastSocket so you get the setTimeToLive() API and just
> >>send to a unicast address.
[quoted text clipped - 7 lines]
>
> so you can't do it in Java.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.