#include #include #include int main() { WSADATA WSAData; WSAStartup(MAKEWORD(2,0), &WSAData); struct hostent *host; int i; host = gethostbyname("www.google.com"); if (host != NULL) { printf("Nom officiel : %s\n",host->h_name); for (i = 0; host->h_aliases[i] != NULL; i++) printf("Alias : %s\n",host->h_aliases[i]); for (i = 0; host->h_addr_list[i] != NULL; i++) printf("Adresse : %s\n", inet_ntoa(*(struct in_addr *)host->h_addr_list[i])); } WSACleanup(); return 0; }