IP ADDRESS OF MACHINE

Florian Weimer fw@deneb.enyo.de
Thu Feb 28 14:02:00 GMT 2002


snodx@hotmail.com writes:

> So I wish to obtain my standalone computer's IP Address through a
> C/C++ program. What function should I use for this?

The assumption that a machine has got a single IP address is wrong,
generally speaking.  Quite a few hosts with IP stacks do not even know
the IP address with which they are visible on the Internet.

You should examine your application and determine what "IP address"
really means in this context.



More information about the Gcc-help mailing list