Commit ae5ee4c9 authored by Nick Mathewson's avatar Nick Mathewson 🏃
Browse files

r7405@Kushana: nickm | 2006-08-16 14:38:46 -0400

 Implement reverse DNS lookup in eventdns: add new entry point; rename old entry point; revise TODO a little; add facility for parsing dns names.


svn:r7070
parent b050ecf8
......@@ -1275,8 +1275,8 @@ launch_resolve(edge_connection_t *exitconn)
configure_nameservers();
log_info(LD_EXIT, "Launching eventdns request for %s",
escaped_safe_str(exitconn->_base.address));
r = eventdns_resolve(exitconn->_base.address, DNS_QUERY_NO_SEARCH,
eventdns_callback, addr);
r = eventdns_resolve_ipv4(exitconn->_base.address, DNS_QUERY_NO_SEARCH,
eventdns_callback, addr);
if (r) {
log_warn(LD_EXIT, "eventdns rejected address %s: error %d.",
escaped_safe_str(addr), r);
......
This diff is collapsed.
......@@ -38,6 +38,7 @@
#define DNS_ERR_TIMEOUT 67
#define DNS_IPv4_A 1
#define DNS_PTR 2 /* XXXX ???? */
#define DNS_QUERY_NO_SEARCH 1
......@@ -53,7 +54,9 @@ int eventdns_count_nameservers(void);
int eventdns_clear_nameservers_and_suspend(void);
int eventdns_resume(void);
int eventdns_nameserver_ip_add(const char *ip_as_string);
int eventdns_resolve(const char *name, int flags, eventdns_callback_type callback, void *ptr);
int eventdns_resolve_ipv4(const char *name, int flags, eventdns_callback_type callback, void *ptr);
struct in_addr;
int eventdns_resolve_reverse(struct in_addr *addr, int flags, eventdns_callback_type callback, void *ptr);
int eventdns_resolv_conf_parse(int flags, const char *);
#ifdef MS_WINDOWS
int eventdns_config_windows_nameservers(void);
......
......@@ -3,4 +3,7 @@
#define DNS_USE_OPENSSL_FOR_ID
typedef unsigned int uint;
typedef unsigned char u_char;
#ifdef MS_WINDOWS
#define inline __inline
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment