Possible Duplicate:
Get the IP Address of local computer
Obtaining local IP address using getaddrinfo() C function?
I need to account for IPs other than 127.0.0.1, and implementation should also detect hosts file entries or other methods.
Is there any way/api/function to directly check if a particular host resolves to the local machine?