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.

parent b050ecf8
......@@ -1275,8 +1275,8 @@ launch_resolve(edge_connection_t *exitconn)
log_info(LD_EXIT, "Launching eventdns request for %s",
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 ???? */
......@@ -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 *);
int eventdns_config_windows_nameservers(void);
......@@ -3,4 +3,7 @@
typedef unsigned int uint;
typedef unsigned char u_char;
#define inline __inline
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