]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/dns_resolve.h
update sources to v12.1.1
[ceph.git] / ceph / src / common / dns_resolve.h
index 3e8f7e46302189804f5f9443815dc37ebf08c89b..e587224d84db7a9fe313c1bfc0a113ad4da25c3d 100644 (file)
@@ -18,8 +18,7 @@
 #include <resolv.h>
 
 #include "common/Mutex.h"
-
-struct entity_addr_t;
+#include "msg/msg_types.h"             // for entity_addr_t
 
 namespace ceph {
 
@@ -78,6 +77,11 @@ class DNSResolver {
     };
 
 
+    struct Record {
+      uint16_t priority;
+      entity_addr_t addr;
+    };
+
     int resolve_cname(CephContext *cct, const std::string& hostname,
         std::string *cname, bool *found);
 
@@ -103,7 +107,7 @@ class DNSResolver {
      * @returns 0 on success, negative error code on failure
      */
     int resolve_srv_hosts(CephContext *cct, const std::string& service_name,
-        const SRV_Protocol trans_protocol, std::map<std::string, entity_addr_t> *srv_hosts);
+        const SRV_Protocol trans_protocol, std::map<std::string, Record> *srv_hosts);
 
     /**
      * Returns the list of hostnames and addresses that provide a given
@@ -119,7 +123,7 @@ class DNSResolver {
      */
     int resolve_srv_hosts(CephContext *cct, const std::string& service_name,
         const SRV_Protocol trans_protocol, const std::string& domain,
-        std::map<std::string, entity_addr_t> *srv_hosts);
+        std::map<std::string, Record> *srv_hosts);
 
   private:
     DNSResolver() : lock("DNSResolver") { resolv_h = new ResolvHWrapper(); }