Olá Pessoal,
A questão pode ser simples para alguns, no entanto, não
consegui achar a resposta.
Seguinte, preciso recuperar o IP da máquina, isto para poder
enviar para um e-mail, no entanto após executar o seguinte código, só consigo o
IP de rede local, e na verdade quero o IP que foi me gerado na conexão ao
BrTurbo.
Código IP rede local: InetAddress ip = null;
System.out.println("IP rede
local " + ip.getLocalHost());
E na verdade preciso o IP do PPP:
Ethernet adapter Local Area Connection:
Connection-specific DNS
Suffix . : @
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
PPP adapter Conexao TurboADSL:
Connection-specific DNS
Suffix . :
IP Address. . . . . . . . . . . . : 200.102.138.168
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 200.102.138.168
IP Address. . . . . . . . . . . . : 200.102.138.168
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 200.102.138.168
Desde já agradeço pela atenção.
Um abraço.
Alexandre
