LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-08-2004, 06:57 AM   #1
nedian123
Member
 
Registered: Jun 2004
Location: PAKISTAN
Posts: 46

Rep: Reputation: 15
Unhappy JAVA: Problems in using TTL(TimeToLive) option


hi,

Actually i have to count number of routers to reach a specific IP. What i did is i created a packet with the help of DatagramPacket class and used the method "setAddress(InetAddress ip)".NOTE:I m sending the packet to my self...
DatagramPacket obj3= new DatagramPacket(data1,10,obj2.getLocalHost(),25);
Now since this class sends the packet thru a connectionless facility.
therefore i didn't used the DatagramSocket function connect.
Then i used the function of class DatagramSocket the function is
send(obj3);

Now to count number of routers i have to use the abstract class DatagramSocketImpl and its method getTimeToLive() and setTimeToLive()

Since these methods are abstract what would be its implementation.......
Shall i receive that sent packet(which was sent to me by myself) how will i access its new TTL value updated by ROUTER........, with which function i will get the intermediate IP's(i.e. Router IP's)


Kindly solve my problem...............

Last edited by nedian123; 07-08-2004 at 05:39 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IP TTL help SBK_bg Linux - Networking 2 09-29-2005 09:18 AM
Problems with Java Web Start (java 1.4.2 - 1.5.0) on Slackware Egy Slackware 11 05-10-2005 06:30 AM
Dns TTL (?) JJX Linux - Networking 0 11-03-2004 02:52 PM
JAVA:(jwstric2) Problems in JAVA-LINUX nedian123 Programming 1 06-28-2004 04:12 PM
How to change TTL value? etvagonema Linux - Networking 2 04-19-2004 11:55 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration