return evdns_base_nameserver_ip_add(current_base, ip_as_string);
}
+int
+evdns_base_nameserver_sockaddr_add(struct evdns_base *base,
+ const struct sockaddr *sa, ev_socklen_t len, unsigned flags)
+{
+ int res;
+ EVUTIL_ASSERT(base);
+ EVDNS_LOCK(base);
+ res = _evdns_nameserver_add_impl(base, sa, len);
+ EVDNS_UNLOCK(base);
+ return res;
+}
+
/* remove from the queue */
static void
evdns_request_remove(struct request *req, struct request **head)
int evdns_base_resume(struct evdns_base *base);
/**
- Add a nameserver.
+ Add a nameserver by string address.
This function parses a n IPv4 or IPv6 address from a string and adds it as a
nameserver. It supports the following formats:
int evdns_base_nameserver_ip_add(struct evdns_base *base,
const char *ip_as_string);
+/**
+ Add a nameserver by sockaddr.
+ **/
+int
+evdns_base_nameserver_sockaddr_add(struct evdns_base *base,
+ const struct sockaddr *sa, ev_socklen_t len, unsigned flags);
+
struct evdns_request;
/**