Click here to Skip to main content
       

Java

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Questionget ethernet IP addressmemberhari3013 Oct '12 - 19:30 
I've tired to get exact ethernet ip address.
 
InetAddress ip=InetAddress.getLocalHost();
String iaddr = ip.getHostAddress();
 
It return localhost address only. I need ethernet address only..
 
pls help me..
AnswerRe: get ethernet IP addressmemberTorstenH.3 Oct '12 - 19:58 
You don't need no double post to get an answer:
 
How to get ethernet IP address[^]
regards Torsten
When I'm not working

AnswerRe: get ethernet IP addressmemberjschell4 Oct '12 - 11:44 
hari301 wrote:
I need ethernet address only

 
You need to explain your problem more fully.
 
A TCP connection consists for two ends AND of the connections in between.
 
The fact that two ends connect does NOT mean that meaningful (non-private ip) is available on either end.
 
The fact that two ends connect does NOT mean that one end can recover a meaningful ip for the other end in such a way that it uniquely identifies the other end.
 
And of course connections have nothing to do with domain names.
 
Now some of the above might have something to do with your problem. Or not. But it isn't clear what you think you want (neither here nor your other post.)

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 21 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid