o conversion from ldns_key to key rr's
o init function? random - load_ssl_errors()
- SSL_load_error_str()?
-o implement getaddrinfo() variant for ldns
+o SERVER stuff; open connection and such
To ponder and discuss:
----------------------
fclose(fp);
return names;
}
+
+ldns_rr_list *
+ldns_getaddrinfo(ldns_resolver *res, ldns_rdf *node, ldns_rr_class c)
+{
+ ldns_rdf_type t;
+
+ t = ldns_rdf_get_type(node);
+
+ if (t == LDNS_RDF_TYPE_DNAME) {
+ /* we're asked to query for a name */
+ return ldns_get_rr_list_addr_by_name(
+ res, node, c, 0);
+ }
+
+ if (t == LDNS_RDF_TYPE_A || t == LDNS_RDF_TYPE_AAAA) {
+ /* an address */
+ return ldns_get_rr_list_name_by_addr(
+ res, node, c, 0);
+ }
+
+ return NULL;
+}
+
+ldns_rr_list *
+ldns_getaddrinfo_secure(void)
+{
+ return NULL;
+}
* \return ldns_rr_list * with the names
*/
ldns_rr_list *ldns_get_rr_list_hosts_frm_file(char *filename);
+
+/**
+ * This function is a wrapper function for ldns_get_rr_list_name_by_addr
+ * and ldns_get_rr_list_addr_by_name. It's name is from the getaddrinfo()
+ * library call. It tries to mimic that call, but without the lowlevel
+ * stuff.
+ * \param[in] res The resolver to use
+ * \param[in] node the name or ip address to look up
+ * \param[in] c the class to look in
+ */
+ldns_rr_list *ldns_getaddrinfo(ldns_resolver *res, ldns_rdf *node, ldns_rr_class c);
+
+/**
+ *
+ */
+ldns_rr_list *ldns_getaddrinfo_secure();
#endif /* _LDNS_HIGHER_H */
+