IP ADDRESS OF MACHINE
snodx@hotmail.com
snodx@hotmail.com
Thu Feb 28 01:38:00 GMT 2002
Thanks Andrea 'Fyre Wyzard' Bocci for your response.
I ran the code that you gave. It DID give me the IP Address of the machine which was: 127.0.0.1
This means that my system has been set to localhost address.
This localhost address will be used by those application servers which will be installed and configured on my system
such as the Apache server.
But 127.0.0.1 is set BY DEFAULT. Using the /bin/netconf application I set my standalone computer's proper TCP/IP
address which was 192.168.0.2.
Using a C/C++ program I wanted to obtain THIS address (192.168.0.2) not 127.0.0.1
I understand that the confusion has arisen because I posted the wrong question.
I am rephrasing the question here:
I have a standalone computer and I dont know whether there is a NetWork Card installed and configured on this computer.
Using /bin/netconf I set the local TCP/IP address of this computer which is 192.168.0.2
Now using a C/C++ program I wish to obtain the TCP/IP address of the machine. How do I go about this.
SNODX
More information about the Gcc-help
mailing list