diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-12-12 02:56:20 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-12-12 02:56:20 +0000 |
commit | c58d9494dfff0a404c8b86b89733277915c279ff (patch) | |
tree | 612bd937c0ee1c6c333b392fdd19853874c842fc /src/or/eventdns.h | |
parent | 991308fac934881c6712b7a1422acaf600f81155 (diff) | |
download | tor-c58d9494dfff0a404c8b86b89733277915c279ff.tar.gz tor-c58d9494dfff0a404c8b86b89733277915c279ff.zip |
r11491@Kushana: nickm | 2006-12-11 12:12:57 -0500
More DNS server hacking: everything except testing, and retries, and documentation, and Tor integration.
svn:r9080
Diffstat (limited to 'src/or/eventdns.h')
-rw-r--r-- | src/or/eventdns.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/or/eventdns.h b/src/or/eventdns.h index 4810e90ba9..b304981244 100644 --- a/src/or/eventdns.h +++ b/src/or/eventdns.h @@ -75,25 +75,30 @@ void evdns_set_log_fn(evdns_debug_log_fn_type fn); #define DNS_NO_SEARCH 1 -struct evdns_request { +struct evdns_server_request { int flags; int nquestions; - struct evdns_question **questions; + struct evdns_server_question **questions; }; -struct evdns_question { +struct evdns_server_question { int type; int class; char name[1]; }; -typedef void (*evdns_request_callback_type)(struct evdns_request *, void *); +typedef void (*evdns_request_callback_fn_type)(struct evdns_server_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); +struct evdns_server_port *evdns_add_server_port(int socket, int is_tcp, evdns_request_callback_fn_type callback, void *user_data); +void evdns_close_server_port(struct evdns_server_port *port); + +int evdns_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data); +int evdns_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl); +int evdns_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl); +int evdns_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *name, int ttl); +int evdns_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl); + +int evdns_request_respond(struct evdns_server_request *req, int flags); +int evdns_request_drop(struct evdns_server_request *req); #endif // !EVENTDNS_H |