3 #include "../include/firedns.h"
5 int main(int argc
, char **argv
) {
6 firedns_state dns
, *d
= &dns
;
7 struct firedns_mxlist
*iter
;
10 fprintf(stderr
,"usage: %s <hostname>\n",argv
[0]);
15 firedns_add_servers_from_resolv_conf(d
);
17 iter
= firedns_resolvemxlist(d
, argv
[1]);
22 while (iter
!= NULL
) {
23 printf("%7s (%05d) %s:%d\n",firedns_mx_name
[iter
->protocol
],iter
->priority
,iter
->name
,firedns_mx_port
[iter
->protocol
]);