} dns_rcode;
enum {
- adns__qf_senddirect = 0x00100000 /* don't call the `query_send' type hook */
+ adns__qf_senddirect = 0x00100000,/* don't call the `query_send' type hook */
+ adns__qf_nosend = 0x00200000,/* don't send the query when submitting */
+ adns__qf_addr_answer= 0x01000000,/* addr query received an answer */
+ adns__qf_addr_cname = 0x02000000 /* addr subquery performed on cname */
};
/* Shared data structures */
int nrevcomp;
int revcompwd;
adns_rrtype rrtype;
- void *(*sockaddr_to_inaddr)(struct sockaddr *sa);
+ const void *(*sockaddr_to_inaddr)(const struct sockaddr *sa);
int (*sockaddr_equalp)(const struct sockaddr *sa,
const struct sockaddr *sb);
void (*prefix_mask)(int len, union gen_addr *a);
* the memory for it is _taken over_ by this routine whether it
* succeeds or fails (if it succeeds, the vbuf is reused for qu->vb).
*
+ * If adns__qf_nosend is set in flags, then the query is not sent: doing
+ * whatever is necessary to send the query and link it onto the appropriate
+ * queue is left as the caller's responsibility.
+ *
* *ctx is copied byte-for-byte into the query.
*
* When the child query is done, ctx->callback will be called. The
* answer->cname and answer->owner are _preserved.
*/
-void adns__transfer_interim(adns_query from, adns_query to,
- void *block, size_t sz);
+void adns__transfer_interim(adns_query from, adns_query to, void *block);
/* Transfers an interim allocation from one query to another, so that
* the `to' query will have room for the data when we get to makefinal
* and so that the free will happen when the `to' query is freed