aboutsummaryrefslogtreecommitdiff
path: root/src/or/eventdns.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-12-12 02:49:45 +0000
committerNick Mathewson <nickm@torproject.org>2006-12-12 02:49:45 +0000
commite9d67b1162fb7a3840fce5d245f79d882acbcde6 (patch)
tree1ace51d8623ceaa477f54ee716447c8f086dcefc /src/or/eventdns.h
parent8cf8b8087ad25850b314cfbc0eb6afc3db5f8b4a (diff)
downloadtor-e9d67b1162fb7a3840fce5d245f79d882acbcde6.tar.gz
tor-e9d67b1162fb7a3840fce5d245f79d882acbcde6.zip
r9099@Kushana: nickm | 2006-10-05 17:42:55 -0400
start fleshing out some logic to build server support into eventdns. Still needs work and testing. svn:r9068
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 17cf762159..4810e90ba9 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