]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/resolver.hh
rec: ensure correct service user on debian
[thirdparty/pdns.git] / pdns / resolver.hh
index 419aa032eaf3fb94d724a457be4bf4e12af5b808..979c32ce2358d406784336ecaef10256a5bcadc4 100644 (file)
@@ -60,9 +60,9 @@ public:
 
   typedef vector<DNSResourceRecord> res_t;
   //! synchronously resolve domain|type at IP, store result in result, rcode in ret
-  int resolve(const string &ip, const DNSName &domain, int type, res_t* result, const ComboAddress& local);
+  int resolve(const ComboAddress &ip, const DNSName &domain, int type, res_t* result, const ComboAddress& local);
 
-  int resolve(const string &ip, const DNSName &domain, int type, res_t* result);
+  int resolve(const ComboAddress &ip, const DNSName &domain, int type, res_t* result);
 
   //! only send out a resolution request
   uint16_t sendResolve(const ComboAddress& remote, const ComboAddress& local, const DNSName &domain, int type, int *localsock, bool dnssecOk=false,
@@ -72,7 +72,7 @@ public:
   bool tryGetSOASerial(DNSName *theirDomain, ComboAddress* remote, uint32_t* theirSerial, uint32_t* theirInception, uint32_t* theirExpire, uint16_t* id);
   
   //! convenience function that calls resolve above
-  void getSoaSerial(const string &, const DNSName &, uint32_t *);
+  void getSoaSerial(const ComboAddress&, const DNSName &, uint32_t *);
   
 private:
   std::map<std::string, int> locals;
@@ -85,12 +85,13 @@ class AXFRRetriever : public boost::noncopyable
                   const DNSName& zone,
                   const TSIGTriplet& tt = TSIGTriplet(),
                   const ComboAddress* laddr = NULL,
-                  size_t maxReceivedBytes=0);
+                  size_t maxReceivedBytes=0,
+                  uint16_t timeout=10);
     ~AXFRRetriever();
     int getChunk(Resolver::res_t &res, vector<DNSRecord>* records=0, uint16_t timeout=10);
   
   private:
-    void connect();
+    void connect(uint16_t timeout);
     int getLength(uint16_t timeout);
     void timeoutReadn(uint16_t bytes, uint16_t timeoutsec=10);