From b2ccf8dd31d1457ae9f0ae270054117179220370 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 7 Apr 2015 08:29:34 +0000 Subject: Imported from /home/lorry/working-area/delta_ntp/ntp-4.2.8p2.tar.gz. --- sntp/libevent/include/event2/dns.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'sntp/libevent/include/event2/dns.h') diff --git a/sntp/libevent/include/event2/dns.h b/sntp/libevent/include/event2/dns.h index a00c83e..17cd86a 100644 --- a/sntp/libevent/include/event2/dns.h +++ b/sntp/libevent/include/event2/dns.h @@ -453,7 +453,7 @@ int evdns_base_set_option(struct evdns_base *base, const char *option, const cha @param base the evdns_base to which to apply this operation @param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC| - DNS_OPTIONS_HOSTSFILE|DNS_OPTIONS_ALL + DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL @param filename the path to the resolv.conf file @return 0 if successful, or various positive error codes if an error occurred (see above) @@ -694,6 +694,22 @@ struct evdns_getaddrinfo_request *evdns_getaddrinfo( EVENT2_EXPORT_SYMBOL void evdns_getaddrinfo_cancel(struct evdns_getaddrinfo_request *req); +/** + Retrieve the address of the 'idx'th configured nameserver. + + @param base The evdns_base to examine. + @param idx The index of the nameserver to get the address of. + @param sa A location to receive the server's address. + @param len The number of bytes available at sa. + + @return the number of bytes written into sa on success. On failure, returns + -1 if idx is greater than the number of configured nameservers, or a + value greater than 'len' if len was not high enough. + */ +EVENT2_EXPORT_SYMBOL +int evdns_base_get_nameserver_addr(struct evdns_base *base, int idx, + struct sockaddr *sa, ev_socklen_t len); + #ifdef __cplusplus } #endif -- cgit v1.2.1