#include #include #include #include #include #include #include #include int main(int argc, char **argv) { res_init(); (&_res)->options |= RES_USE_DNSSEC | RES_USE_EDNS0; // enable DNSSEC ala exim struct hostent *hp = gethostbyname(argv[1]); if (hp) { printf("%s = ", hp->h_name); for( unsigned int i=0; hp->h_addr_list[i] != NULL; i++) { printf( "%s ", inet_ntoa( *( struct in_addr*)( hp -> h_addr_list[i]))); } printf("\n"); } }