2 #include "../include/firedns.h"
4 int main(int argc
, char **argv
) {
9 struct in6_addr
*binip6
;
10 firedns_state dns
, *d
= &dns
;
13 fprintf(stderr
,"usage: %s <ip address>\n",argv
[0]);
18 firedns_add_servers_from_resolv_conf(d
);
20 binip6
= firedns_aton6(argv
[1], &buf6
);
22 binip
= firedns_aton4(argv
[1], &buf4
);
24 fprintf(stderr
,"invalid IP address.\n");
28 result
= firedns_resolvename4(d
, binip
);
30 result
= firedns_resolvename6(d
, binip6
);
33 printf("%s\n",result
);