1 #include <stdio.h>
2 #include <string.h>
3 #include "firedns.h"
4 
main(int argc,char ** argv)5 int main(int argc, char **argv) {
6 	struct firedns_ip4list *iter;
7 
8 	if (argc != 2) {
9 		fprintf(stderr,"usage: %s <hostname>\n",argv[0]);
10 		return 2;
11 	}
12 
13 	iter = firedns_resolveip4list(argv[1]);
14 
15 	if (iter == NULL)
16 		return 1;
17 
18 	while (iter != NULL) {
19 		printf("%s\n",firedns_ntoa4(&iter->ip));
20 		iter = iter->next;
21 	}
22 
23 	return 0;
24 }
25