Link to home
Start Free TrialLog in
Avatar of ramrocket
ramrocket

asked on

Parent Router

Is their a way to programatically find the parent router of an ip address.  I am writing a program that requires a ping or to know the parent router for a given ip address.  I would like to see some code or sample.

Thanks in advance

Avatar of jhance
jhance

Get the source code for TRACEROUTE.  It's in every Linux or FreeBSD distribution out there.  There is no guarantee that a "parent" router is always the same since routing is a dynamic thing and packets can take different paths at different times.  But using the technique in traceroute, you will get _A_ route from A to B.  For any IP in the list, the next one will be a "parent".
Avatar of ramrocket

ASKER

hance, that is the problem, routing is dynamic however that is ok with my requirements.  Where do I get traceroute?  What do you mean the next one will be a parent?
ASKER CERTIFIED SOLUTION
Avatar of jhance
jhance

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
jhance, will these traceroute work with NT?  Can you give a url to download the source?
jhance, this code does not compile using vc6.0 under winnt2000.  

>>>If you have Windows NT or 2000 there is TRACERT that does the same thing.

can you point me where the source to tracert.  I need this to work on an nt machine.  I am not doing development under unix or its flavor.

Sorry.  You expanded the scope of this question well beyond its original parameters.  You asked for an explanation of HOW to do this and for a source code sample and I've provided both!  

Now you want a complete VC++ 6.0 application for Windows 2000.

jhance, I apologize for the misunderstanding.  I am not requiring a complete vc6.0 app for win2k.  Like I said in my original query, I am writing a program that need to incorporate this functionality.  The source code that you point me to is not integratable with my program and therefore is useless to me.  Please work with me on this.  I am willing to increase the points but I need something that is usable.

ramrocket,

You logged in recently.  This appears to have been overlooked, or perhaps due to some of the system problems we had for a brief time with Email notifications, your last comments may not have been received by the participating experts.  PLEASE RETURN here and accept/grade this if it helped you or provide additional information to ensure that the need still exists today and nothing further has changed to get you what you need as quickly as possible.

This remains open today, awaiting your next action.

Thanks,

Moondancer
Community Support Moderator @ Experts Exchange
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "jhance" comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
Accepted recommendation by:

ComTech
CS Admin @ EE