]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove unused convenience methods DNSBackend::getRemote(...)
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Mon, 26 Jan 2015 23:19:07 +0000 (00:19 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Sun, 1 Feb 2015 13:55:23 +0000 (14:55 +0100)
docs/markdown/appendix/backend-writers-guide.md
pdns/dnsbackend.cc
pdns/dnsbackend.hh

index 63b02a98bdd14ac3277e068d49f8b783f581b72b..c8254ad8bf914840a235422168deb03f476ea032 100644 (file)
@@ -190,7 +190,7 @@ Please note that a RandomBackend is actually in most PDNS releases. By default i
 #### `void lookup(const QType &qtype, const string &qdomain, DNSPacket *pkt=0, int zoneId=-1)`
 This function is used to initiate a straight lookup for a record of name 'qdomain' and type 'qtype'. A QType can be converted into an integer by invoking its `getCode()` method and into a string with the `getCode()`.
 
-The original question may or may not be passed in the pointer p. If it is, you can retrieve (from 1.99.11 onwards) information about who asked the question with the `getRemote(DNSPacket *)` method. Alternatively, `bool getRemote(struct sockaddr *sa, socklen_t *len)` is available.
+The original question may or may not be passed in the pointer pkt. If it is, you can retrieve information about who asked the question with the `pkt->getRemote()` method.
 
 Note that **qdomain** can be of any case and that your backend should make sure it is in effect case insensitive. Furthermore, the case of the original question should be retained in answers returned by `get()`!
 
index 2eb0c67bcda91707642aa0e5b0fa061fe6d01bfc..15123c2e0df3ce1bf948eef9c1f254a06e018409 100644 (file)
 #include "dnspacket.hh"
 #include "dns.hh"
 
-string DNSBackend::getRemote(DNSPacket *p)
-{
-  return p->getRemote();
-}
-
-bool DNSBackend::getRemote(DNSPacket *p, struct sockaddr *sa, Utility::socklen_t *len)
-{
-  if(p->d_remote.getSocklen() < *len)
-    return false;
-  *len=p->d_remote.getSocklen();
-  memcpy(sa,&p->d_remote,*len);
-  return true;
-}
-
 bool DNSBackend::getAuth(DNSPacket *p, SOAData *sd, const string &target, int *zoneId, const int best_match_len)
 {
   bool found=false;
index 9db293a31e82407a5c30d249af1d783b1fd5a462..c02447cb380aee9b6343318c54d8cb4f79209fe5 100644 (file)
@@ -378,8 +378,6 @@ protected:
   bool mustDo(const string &key);
   const string &getArg(const string &key);
   int getArgAsNum(const string &key);
-  string getRemote(DNSPacket *p);
-  bool getRemote(DNSPacket *p, struct sockaddr *in, Utility::socklen_t *len);
 
 private:
   string d_prefix;