171 #define DNS_ERR_NONE 0
173 #define DNS_ERR_FORMAT 1
176 #define DNS_ERR_SERVERFAILED 2
178 #define DNS_ERR_NOTEXIST 3
180 #define DNS_ERR_NOTIMPL 4
183 #define DNS_ERR_REFUSED 5
185 #define DNS_ERR_TRUNCATED 65
187 #define DNS_ERR_UNKNOWN 66
189 #define DNS_ERR_TIMEOUT 67
191 #define DNS_ERR_SHUTDOWN 68
195 #define DNS_IPv6_AAAA 3
197 #define DNS_QUERY_NO_SEARCH 1
199 #define DNS_OPTION_SEARCH 1
200 #define DNS_OPTION_NAMESERVERS 2
201 #define DNS_OPTION_MISC 4
202 #define DNS_OPTIONS_ALL 7
223 int evdns_init(
void);
237 void evdns_shutdown(
int fail_requests);
246 const char *evdns_err_to_string(
int err);
259 int evdns_nameserver_add(
unsigned long int address);
273 int evdns_count_nameservers(
void);
284 int evdns_clear_nameservers_and_suspend(
void);
296 int evdns_resume(
void);
308 int evdns_nameserver_ip_add(
const char *ip_as_string);
377 int evdns_set_option(
const char *
option,
const char *val,
int flags);
401 int evdns_resolv_conf_parse(
int flags,
const char *
const filename);
415 int evdns_config_windows_nameservers(
void);
422 void evdns_search_clear(
void);
430 void evdns_search_add(
const char *domain);
441 void evdns_search_ndots_set(
const int ndots);
465 void evdns_set_transaction_id_fn(ev_uint16_t (*fn)(
void));
467 #define DNS_NO_SEARCH 1
481 int dns_question_class;
487 #define dns_question_class class
492 #define EVDNS_ANSWER_SECTION 0
493 #define EVDNS_AUTHORITY_SECTION 1
494 #define EVDNS_ADDITIONAL_SECTION 2
496 #define EVDNS_TYPE_A 1
497 #define EVDNS_TYPE_NS 2
498 #define EVDNS_TYPE_CNAME 5
499 #define EVDNS_TYPE_SOA 6
500 #define EVDNS_TYPE_PTR 12
501 #define EVDNS_TYPE_MX 15
502 #define EVDNS_TYPE_TXT 16
503 #define EVDNS_TYPE_AAAA 28
505 #define EVDNS_QTYPE_AXFR 252
506 #define EVDNS_QTYPE_ALL 255
508 #define EVDNS_CLASS_INET 1
510 struct evdns_server_port *evdns_add_server_port(
int socket,
int is_tcp, evdns_request_callback_fn_type callback,
void *user_data);
513 int evdns_server_request_add_reply(
struct evdns_server_request *req,
int section,
const char *
name,
int type,
int dns_class,
int ttl,
int datalen,
int is_name,
const char *data);
515 int evdns_server_request_add_aaaa_reply(
struct evdns_server_request *req,
const char *
name,
int n,
void *addrs,
int ttl);
516 int evdns_server_request_add_ptr_reply(
struct evdns_server_request *req,
struct in_addr *in,
const char *inaddr_name,
const char *hostname,
int ttl);
517 int evdns_server_request_add_cname_reply(
struct evdns_server_request *req,
const char *
name,
const char *cname,
int ttl);
522 int evdns_server_request_get_requesting_addr(
struct evdns_server_request *_req,
struct sockaddr *sa,
int addr_len);