i’m developing a java application using the jstun library (hxxp://jstun.javawi.de/), and i need to compare my public ip with the one chosen by the kernel (wildcard address – hxxp://java.sun.com/j2se/1.5.0/docs/api/java/net/DatagramSocket.html#DatagramSocket() ) when i create a udp socket.
what i don’t understand is, if my local ip on my natted network is in the form of 192.168.1.x, why do i get an ip such as 10.x.x.x ?
is there a particular reason why the two are totally unrelated?
if i wasn’t behind a nat, would the kernel bind the socket to my public address?
thanks a lot!
asymmetric
i failed to mention a rather important thing: i’m developing for android, and running my code on the android emulator, which explains the 10.x.x.x address thing..
i should dig deeper into that.. thanks for the help!
for those that are interested: hxxp://developer.android.com/guide/developing/tools/emulator.html#networkaddresses