aboutsummaryrefslogtreecommitdiff
path: root/src/or/eventdns.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/eventdns.h')
-rw-r--r--src/or/eventdns.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/or/eventdns.h b/src/or/eventdns.h
index 17cf76215..4810e90ba 100644
--- a/src/or/eventdns.h
+++ b/src/or/eventdns.h
@@ -75,4 +75,25 @@ void evdns_set_log_fn(evdns_debug_log_fn_type fn);
#define DNS_NO_SEARCH 1
+struct evdns_request {
+ int flags;
+ int nquestions;
+ struct evdns_question **questions;
+};
+struct evdns_question {
+ int type;
+ int class;
+ char name[1];
+};
+typedef void (*evdns_request_callback_type)(struct evdns_request *, void *);
+#define EVDNS_ANSWER_SECTION 0
+#define EVDNS_AUTHORITY_SECTION 1
+#define EVDNS_ADDITIONAL_SECTION 2
+int evdns_request_add_reply(struct evdns_request *req, int section, const char *name, int type, int class, int ttl, int datalen, const char *data);
+int evdns_request_add_a_reply(struct evdns_request *req, const char *name, int n, void *addrs, int ttl);
+int evdns_request_add_ptr_reply(struct evdns_request *req, struct in_addr *in, const char *name, int ttl);
+int evdns_request_add_cname_reply(struct evdns_request *req, const char *name, const char *cname, int ttl);
+int evdns_request_respond(struct evdns_request *req, int err, int flags);
+int evdns_request_drop(struct evdns_request *req);
+
#endif // !EVENTDNS_H