finished self-implementation of DNS resolver recursion; will now remove all that!
[pingcheck] / src / dns / dnsresolver.h
index 15d2a28..a705f50 100644 (file)
@@ -38,6 +38,7 @@
 
 
 typedef std::pair<std::string, std::string> string_pair;
+typedef std::pair<std::string, Cname> src_cname_pair;
 typedef std::pair<std::string, HostAddress> host_addr_pair;
 
 
@@ -81,19 +82,23 @@ private:
                            const std::size_t bytes_transferred);
     void handle_unavailable();
     void handle_ips(const std::vector<host_addr_pair> &result_ips);
-    void handle_cname(const std::vector<string_pair> &result_cnames);
+    void handle_cname(const std::vector<src_cname_pair> &result_cnames);
     void handle_recurse(const HostAddress &name_server);
+    void handle_recurse_without_ip(const std::string &name_server);
     void cname_resolve_callback(const bool was_success,
                                 const int recursion_count);
     void recursive_resolve_callback(const uint32_t min_ttl,
                                     const bool was_success,
                                     const int recursion_count);
+    void name_server_resolve_callback(const bool was_success,
+                                      const int recursion_count);
+    void schedule_retry();
     void finalize_resolve(const bool success, const int recursion_count=0);
     void stop_trying();
     void wait_timer_timeout_handler(const boost::system::error_code &error);
     void gather_results( const boost::net::dns::rr_list_t *answers,
                          std::vector<host_addr_pair> *result_ips,
-                         std::vector<string_pair> *result_cnames,
+                         std::vector<src_cname_pair> *result_cnames,
                          std::vector<string_pair> *result_nameservers ) const;
 
 // variables