/*
* adns.h
- * - adns user-visible API (single-threaded, without any locking)
+ * - adns user-visible API
*/
/*
*
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
- * $Id: adns.h,v 1.95 2006/04/08 14:36:57 ian Exp $
+ * $Id: adns.h,v 1.96 2006/08/09 11:16:59 ian Exp $
*/
#ifndef ADNS_H_INCLUDED
adns_r_rp_raw= 17,
adns_r_rp= adns_r_rp_raw|adns__qtf_mail822,
+ adns_r_aaaa= 28,
+
/* For SRV records, query domain without _qf_quoteok_query must look
* as expected from SRV RFC with hostname-like Name. _With_
* _quoteok_query, any query domain is allowed. */
adns_rr_intstr *(*manyistr); /* txt (list strs ends with i=-1, str=0)*/
adns_rr_addr *addr; /* addr */
struct in_addr *inaddr; /* a */
+ struct in6_addr *in6addr; /* aaaa */
adns_rr_hostaddr *hostaddr; /* ns */
adns_rr_intstrpair *intstrpair; /* hinfo */
adns_rr_strpair *strpair; /* rp, rp_raw */
* requested.
*/
+/* Threads:
+ * adns does not use any static modifiable state, so it
+ * is safe to call adns_init several times and then use the
+ * resulting adns_states concurrently.
+ * However, it is NOT safe to make simultaneous calls into
+ * adns using the same adns_state; a single adns_state must be used
+ * only by one thread at a time. You can solve this problem by
+ * having one adns_state per thread, or if that isn't feasible, you
+ * could maintain a pool of adns_states. Unfortunately neither of
+ * these approaches has optimal performance.
+ */
+
int adns_init(adns_state *newstate_r, adns_initflags flags,
FILE *diagfile /*0=>stderr*/);