Hi,
how can i get the non-local IP address with the following functions?
hostent* pHostEntity = NULL;
pHostEntity = gethostbyname(m_szHostName);
pIPAddress = inet_ntoa(*((in_addr *)pHostEntity->h_addr_list[0]));
On the windows box it returns a local address of 192.168.1.1 but the linux box returns 127.0.0.1??
I know they are both local, but the linux box should be 192.168.1.2
Also, is there a way of telling if the IP address is a local or external address (ie, for those connected via network + broadband or something).
thanks
how can i get the non-local IP address with the following functions?
hostent* pHostEntity = NULL;
pHostEntity = gethostbyname(m_szHostName);
pIPAddress = inet_ntoa(*((in_addr *)pHostEntity->h_addr_list[0]));
On the windows box it returns a local address of 192.168.1.1 but the linux box returns 127.0.0.1??
I know they are both local, but the linux box should be 192.168.1.2
Also, is there a way of telling if the IP address is a local or external address (ie, for those connected via network + broadband or something).
thanks