LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


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

Rep: Reputation: 15
Exclamation Problems in counting ROUTERS using JAVA


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:52 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
Problems with Java Web Start (java 1.4.2 - 1.5.0) on Slackware Egy Slackware 11 05-10-2005 06:30 AM
Counting Lines ej25 Programming 20 12-06-2004 02:08 PM
JAVA:(jwstric2) Problems in JAVA-LINUX nedian123 Programming 1 06-28-2004 04:12 PM
And counting... MasterC General 18 09-24-2003 05:07 AM
counting dummyagain Programming 3 09-24-2003 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:58 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