Top posting corrected...
Daniel Pitts wrote:
stephane.chouinard.ptelebel@gmail.com wrote:
hi !
is there a java command or a property that I can check ?
probably i can use traceroute, but it will be difficult because i use a
pocket pc ?
nikosft@gmail.com wrote:
The nearest router is the default gateway. There are some commands that
shows that, may be you can invoke the in your java programme.
stephane.chouinard.ptelebel@gmail.com wrote:
hi !
I would like to know if there is a way to retrieve the ip or the name
of the nearest router when we send a socket ?
thanks
Maybe knowing why you need this, we'd be able to give more help.
Generally with network programming, you're not supposed to care/know
about the route. Information is generally sent in the form of
"packets" into a black box (the internet) and comes out the other side
in the same packet form.
If you really must know the first IP in the route, then you need to
find a system specific way (try a networking newsgroup maybe?) and
implement it using JNI or an external process call.
Hi,
I will try with a network newsgroup, but I sent my question here
because i'am doing an homework in java. The reason I would like to know
the first router (nearest one) is because i want to be able to know
where is the person with the pocket pc. I was supposed to do something
with infrared access point but the project aborded. So i was thinking
that maybe it was possible to do something with the ip data from the
network. Like, my pocket pc can send a packet in a specified interval
of time to a server and the server or the pocket pc could determine the
position with the info. from the nearest router. In the university we
are using wireless network...
thanks anyway
Please don't top post, makes it harder to follow conversations...
Sounds like an interesting project. If the pocket pc was configured
with GPS, it might be easier :-).