r = MALLOC(ldns_resolver);
+ /* XXX TODO */
r->_searchlist = XMALLOC(ldns_dname, 3);
r->_nameservers = XMALLOC(ldns_rdf, 3);
-
r->_configured = 0; /* no config has happened yet */
r->_searchlist_count = 0; /* no searchlist */
assert(name != NULL);
/* do all the preprocessing here, then fire of an query to
- * the network
- */
-
+ * the network */
+
+ if (type == 0) {
+ type = LDNS_RR_TYPE_A;
+ }
+ if (class == 0) {
+ class = LDNS_RR_CLASS_IN;
+ }
return NULL;
}
/* fire it off. "miek.nl." will be added */
pkt = ldns_resolver_send(res, qname, LDNS_RR_TYPE_MX, 0);
+
+ if (!pkt)
+ return 1;
+
/* print the resulting pkt to stdout */
/* DISABLE FOR NOW ldns_pkt_print(stdout, pkt); */