aboutsummaryrefslogtreecommitdiff
path: root/src/common/dns_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/dns_utils.h')
-rw-r--r--src/common/dns_utils.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h
index 332bceafe..63bf25445 100644
--- a/src/common/dns_utils.h
+++ b/src/common/dns_utils.h
@@ -131,6 +131,19 @@ public:
private:
/**
+ * @brief gets all records of a given type from a DNS query for the supplied URL;
+ * if no such record is present returns an empty vector.
+ *
+ * @param url A string containing a URL to query for
+ * @param record_type the record type to retrieve (DNS_TYPE_A, etc)
+ * @param reader a function that converts a record data to a string
+ *
+ * @return A vector of strings containing the requested record; or an empty vector
+ */
+ // TODO: modify this to accomodate DNSSEC
+ std::vector<std::string> get_record(const std::string& url, int record_type, std::string (*reader)(const char *,size_t), bool& dnssec_available, bool& dnssec_valid);
+
+ /**
* @brief Checks a string to see if it looks like a URL
*
* @param addr the string to be checked