views:

37

answers:

3

Hi! all, I am writing an application for video streaming.In the application server is required to know the distance of the client from it self in terms of hop number.My question is,is there any tool/method other than traceroute available in unix environment to find it? I also need to find out the geographical location of the client.So is their any tool/method for this as well? Any help in this regard will be highly appreciated. Thanks in advance.

Mawia

+2  A: 

This is slightly complex for several reasons. First of all, the number of hops might not be the same in each direction. Disregarding that, you might be able to look at the TTL field of the recieved IP packets. This is a layer lower down than UDP, so I'm not entirely sure how to access it through the normal socket interfaces. But if you can get at that value, you can compare it to what the client/server normally sends (usually 64 or 255) and deduce the number of hops it has traversed.

For geographical information there are a number of geoip databases available online, but usually commerically. The precision of the data might also vary.

calmh
A: 

You might try tracepath as an alternative to traceroute.

Robert S. Barnes
A: 

If you haven't read this yet, you must do so now:

"The case of the 500 mile email."

Ether