chiark / gitweb /
_Submits_ but does not use the results from internally-generated queries.
[adns.git] / src / internal.h
index 7b12237f3d5bbb066bdb701064c931c6dd984555..f1f4d9650da70328c9b5c515d55c8b9e797b0594 100644 (file)
@@ -77,13 +77,16 @@ typedef struct {
 
 typedef union {
   void *ext;
-  int dmaddr_index;
+  adns_rr_hostaddr *hostaddr;
 } qcontext;
 
 typedef struct {
+  adns_state ads;
   adns_query qu;
+  int serv;
   const byte *dgram;
-  int serv, dglen, max, nsstart;
+  int dglen, nsstart, nscount, arcount;
+  struct timeval now;
 } parseinfo;
 
 typedef struct {
@@ -103,7 +106,7 @@ typedef struct {
    * and will not be null-terminated by convstring.
    */
 
-  adns_status (*parse)(const struct parseinfo *pai, int cbyte, void *store_r);
+  adns_status (*parse)(const parseinfo *pai, int cbyte, int max, void *store_r);
   /* Parse one RR, in dgram of length dglen, starting at cbyte and
    * extending until at most max.
    *
@@ -335,7 +338,7 @@ int adns__internal_submit(adns_state ads, adns_query *query_r,
  * If failstat is nonzero then if we are successful in creating the query
  * it is immediately failed with code failstat (but _submit still succeds).
  *
- * ctx is copied byte-for-byte into the query.
+ * *ctx is copied byte-for-byte into the query.
  */
 
 void *adns__alloc_interim(adns_query qu, size_t sz);
@@ -478,11 +481,11 @@ adns_status adns__findrr(adns_query qu, int serv,
  * If an error is returned then *type_r will be undefined too.
  */
 
-static adns_status findrr_anychk(adns_query qu, int serv,
-                                const byte *dgram, int dglen, int *cbyte_io,
-                                int *type_r, int *class_r, int *rdlen_r, int *rdstart_r,
-                                const byte *eo_dgram, int eo_dglen, int eo_cbyte,
-                                int *eo_matched_r);
+adns_status adns__findrr_anychk(adns_query qu, int serv,
+                               const byte *dgram, int dglen, int *cbyte_io,
+                               int *type_r, int *class_r, int *rdlen_r, int *rdstart_r,
+                               const byte *eo_dgram, int eo_dglen, int eo_cbyte,
+                               int *eo_matched_r);
 /* Like adns__findrr_checked, except that the datagram and
  * owner to compare with can be specified explicitly.
  *
@@ -545,7 +548,7 @@ static inline int ctype_alpha(int c) {
   do { \
     (node)->part next= 0; \
     (node)->part back= (list).tail; \
-    if ((list).tail) (list).tail->part next= (node); else (list).part head= (node); \
+    if ((list).tail) (list).tail->part next= (node); else (list).head= (node); \
     (list).tail= (node); \
   } while(0)