~mdw
/
adns
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reentrancy: Add warning comment to adns__must_gettimeofday
[adns]
/
src
/
internal.h
diff --git
a/src/internal.h
b/src/internal.h
index
552db15
..
5e31f05
100644
(file)
--- a/
src/internal.h
+++ b/
src/internal.h
@@
-42,6
+42,7
@@
typedef unsigned char byte;
#include <sys/time.h>
#include <sys/time.h>
+#define ADNS_FEATURE_MANYAF
#include "adns.h"
#include "dlist.h"
#include "adns.h"
#include "dlist.h"
@@
-109,6
+110,11
@@
typedef enum {
rcode_refused
} dns_rcode;
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 {
/* Shared data structures */
typedef struct {
@@
-151,6
+157,9
@@
typedef struct {
adns_rrtype rev_rrtype;
struct af_addr addr;
} ptr;
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. */
} tinfo; /* type-specific state for the query itself: zero-init if you
* don't know better. */
@@
-217,6
+226,12
@@
typedef struct typeinfo {
/* Return the output resource-record element size; if this is null, then
* the rrsz member can be used.
*/
/* 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,
} typeinfo;
adns_status adns__ckl_hostname(adns_state ads, adns_queryflags flags,
@@
-595,6
+610,7
@@
void adns__query_send(adns_query qu, struct timeval now);
/* From query.c: */
adns_status adns__internal_submit(adns_state ads, adns_query *query_r,
/* From query.c: */
adns_status adns__internal_submit(adns_state ads, adns_query *query_r,
+ adns_query parent,
const typeinfo *typei, adns_rrtype type,
vbuf *qumsg_vb, int id,
adns_queryflags flags, struct timeval now,
const typeinfo *typei, adns_rrtype type,
vbuf *qumsg_vb, int id,
adns_queryflags flags, struct timeval now,
@@
-865,6
+881,7
@@
void adns__autosys(adns_state ads, struct timeval now);
void adns__must_gettimeofday(adns_state ads, const struct timeval **now_io,
struct timeval *tv_buf);
void adns__must_gettimeofday(adns_state ads, const struct timeval **now_io,
struct timeval *tv_buf);
+/* Call with care - might reentrantly cause queries to be completed! */
int adns__pollfds(adns_state ads, struct pollfd pollfds_buf[MAX_POLLFDS]);
void adns__fdevents(adns_state ads,
int adns__pollfds(adns_state ads, struct pollfd pollfds_buf[MAX_POLLFDS]);
void adns__fdevents(adns_state ads,