chiark / gitweb /
src/types.c: Handle inconsistent CNAME records between addr answers.
[adns.git] / src / internal.h
index 552db151b7ff495da637c416324c743fd7dd2c21..748f2031976d7d0c06bd1f2803cedac5048e6ce8 100644 (file)
@@ -109,6 +109,11 @@ typedef enum {
   rcode_refused
 } dns_rcode;
 
+enum {
+  adns__qf_addr_answer= 0x01000000,/* addr query received an answer */
+  adns__qf_addr_cname = 0x02000000 /* addr subquery performed on cname */
+};
+
 /* Shared data structures */
 
 typedef struct {
@@ -151,6 +156,9 @@ typedef struct {
       adns_rrtype rev_rrtype;
       struct af_addr addr;
     } ptr;
+    struct {
+      unsigned want, have;
+    } addr;
   } tinfo; /* type-specific state for the query itself: zero-init if you
            * don't know better. */
 
@@ -217,6 +225,12 @@ typedef struct typeinfo {
   /* Return the output resource-record element size; if this is null, then
    * the rrsz member can be used.
    */
+
+  void (*query_send)(adns_query qu, struct timeval now);
+  /* Send the query to nameservers, and hook it into the appropriate queue.
+   * Normal behaviour is to call adns__query_send, but this can be overridden
+   * for special effects.
+   */
 } typeinfo;
 
 adns_status adns__ckl_hostname(adns_state ads, adns_queryflags flags,