Get Local Ip Address?

okibi okibi at ratedo.com
Tue Jun 5 07:23:02 PDT 2007


Assuming the computer is connected directly to the internet (via a cable modem or such), then it's IP should be the public IP. I guess, however, I'm asking how to get the machine's IP.

Thanks.

Unknown W. Brackets Wrote:

> Are you wanting the public IP address, or just the machine's IP address?
> 
> Example: my computer is in a network, so it's IP starts with 172.16. 
> But, my public IP address starts with 72 or something (for my entire 
> network.)
> 
> To get the machine IP, it's going to be more system-specific, and I 
> don't know off hand how.  To get the public IP, you have to check an 
> external source - e.g. http://www.whatismyip.org/.
> 
> -[Unknown]
> 
> 
> okibi wrote:
> > Hey,
> > 
> > I was wondering if there is a simply way to get the public IP address of the machine. I need it to work on Windows and Linux.
> > 
> > Is there a simply way that will work on both?
> > 
> > Thanks!



More information about the Digitalmars-d-learn mailing list