src/types.c: Use the new `checklabel' machinery for PTR queries.
[adns] / src / internal.h
index b602c92..3e85a58 100644 (file)
@@ -130,7 +130,11 @@ union gen_addr {
 };
 
 union checklabel_state {
-  int dummy;
+  struct {
+#define PTR_NDOMAIN 2
+    unsigned domainmap;                        /* which domains are still live */
+    byte ipv[PTR_NDOMAIN][32];         /* address components so far */
+  } ptr;
 };
 
 typedef struct {
@@ -159,12 +163,14 @@ typedef struct {
   void (*callback)(adns_query parent, adns_query child);
 
   union {
-    struct afinfo_addr ptr_parent_addr;
     adns_rr_hostaddr *hostaddr;
   } pinfo; /* state for use by parent's callback function */
 
   union {
     struct {
+      struct afinfo_addr addr;
+    } ptr;
+    struct {
       unsigned want, have;
     } addr;
   } tinfo; /* type-specific state for the query itself: zero-init if you