pdns  4.2.0-rc1
About: PowerDNS daemon - a high performance authoritative nameserver. Release candidate.
  Fossies Dox: pdns-4.2.0-rc1.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

DNSBackend Class Referenceabstract

This virtual base class defines the interface for backends for PowerDNS. More...

#include <dnsbackend.hh>

Inheritance diagram for DNSBackend:
Collaboration diagram for DNSBackend:

Classes

struct  KeyData
 

Public Member Functions

virtual void lookup (const QType &qtype, const DNSName &qdomain, DNSPacket *pkt_p=0, int zoneId=-1)=0
 lookup() initiates a lookup. A lookup without results should not throw! More...
 
virtual bool get (DNSResourceRecord &)=0
 retrieves one DNSResource record, returns false if no more were available More...
 
virtual bool get (DNSZoneRecord &r)
 
virtual bool list (const DNSName &target, int domain_id, bool include_disabled=false)=0
 Initiates a list of the specified domain. More...
 
virtual ~DNSBackend ()
 
virtual bool getSOA (const DNSName &name, SOAData &soadata)
 fills the soadata struct with the SOA details. Returns false if there is no SOA. More...
 
virtual bool replaceRRSet (uint32_t domain_id, const DNSName &qname, const QType &qt, const vector< DNSResourceRecord > &rrset)
 
virtual bool listSubZone (const DNSName &zone, int domain_id)
 
bool isDnssecDomainMetadata (const string &name)
 
virtual bool getAllDomainMetadata (const DNSName &name, std::map< std::string, std::vector< std::string > > &meta)
 
virtual bool getDomainMetadata (const DNSName &name, const std::string &kind, std::vector< std::string > &meta)
 
virtual bool getDomainMetadataOne (const DNSName &name, const std::string &kind, std::string &value)
 
virtual bool setDomainMetadata (const DNSName &name, const std::string &kind, const std::vector< std::string > &meta)
 
virtual bool setDomainMetadataOne (const DNSName &name, const std::string &kind, const std::string &value)
 
virtual void getAllDomains (vector< DomainInfo > *domains, bool include_disabled=false)
 
virtual bool getAuth (const DNSName &target, SOAData *sd)
 
virtual bool getDomainKeys (const DNSName &name, std::vector< KeyData > &keys)
 
virtual bool removeDomainKey (const DNSName &name, unsigned int id)
 
virtual bool addDomainKey (const DNSName &name, const KeyData &key, int64_t &id)
 
virtual bool activateDomainKey (const DNSName &name, unsigned int id)
 
virtual bool deactivateDomainKey (const DNSName &name, unsigned int id)
 
virtual bool getTSIGKey (const DNSName &name, DNSName *algorithm, string *content)
 
virtual bool setTSIGKey (const DNSName &name, const DNSName &algorithm, const string &content)
 
virtual bool deleteTSIGKey (const DNSName &name)
 
virtual bool getTSIGKeys (std::vector< struct TSIGKey > &keys)
 
virtual bool getBeforeAndAfterNamesAbsolute (uint32_t id, const DNSName &qname, DNSName &unhashed, DNSName &before, DNSName &after)
 
virtual bool getBeforeAndAfterNames (uint32_t id, const DNSName &zonename, const DNSName &qname, DNSName &before, DNSName &after)
 
virtual bool updateDNSSECOrderNameAndAuth (uint32_t domain_id, const DNSName &qname, const DNSName &ordername, bool auth, const uint16_t qtype=QType::ANY)
 
virtual bool updateEmptyNonTerminals (uint32_t domain_id, set< DNSName > &insert, set< DNSName > &erase, bool remove)
 
virtual bool doesDNSSEC ()
 
virtual bool listComments (uint32_t domain_id)
 
virtual bool getComment (Comment &comment)
 
virtual void feedComment (const Comment &comment)
 
virtual bool replaceComments (const uint32_t domain_id, const DNSName &qname, const QType &qt, const vector< Comment > &comments)
 
virtual bool startTransaction (const DNSName &qname, int id=-1)
 
virtual bool commitTransaction ()
 commits the transaction started by startTransaction More...
 
virtual bool abortTransaction ()
 aborts the transaction started by strartTransaction, should leave state unaltered More...
 
virtual void reload ()
 
virtual void rediscover (string *status=0)
 
virtual bool feedRecord (const DNSResourceRecord &rr, const DNSName &ordername, bool ordernameIsNSEC3=false)
 feeds a record to a zone, needs a call to startTransaction first More...
 
virtual bool feedEnts (int domain_id, map< DNSName, bool > &nonterm)
 
virtual bool feedEnts3 (int domain_id, const DNSName &domain, map< DNSName, bool > &nonterm, const NSEC3PARAMRecordContent &ns3prc, bool narrow)
 
virtual bool getDomainInfo (const DNSName &domain, DomainInfo &di, bool getSerial=true)
 if this returns true, DomainInfo di contains information about the domain More...
 
virtual void getUnfreshSlaveInfos (vector< DomainInfo > *domains)
 slave capable backends should return a list of slaves that should be rechecked for staleness More...
 
virtual void alsoNotifies (const DNSName &domain, set< string > *ips)
 get a list of IP addresses that should also be notified for a domain More...
 
virtual void getUpdatedMasters (vector< DomainInfo > *domains)
 get list of domains that have been changed since their last notification to slaves More...
 
virtual void setFresh (uint32_t domain_id)
 Called by PowerDNS to inform a backend that a domain has been checked for freshness. More...
 
virtual void setNotified (uint32_t id, uint32_t serial)
 Called by PowerDNS to inform a backend that the changes in the domain have been reported to slaves. More...
 
virtual bool setMaster (const DNSName &domain, const string &ip)
 Called when the Master of a domain should be changed. More...
 
virtual bool setKind (const DNSName &domain, const DomainInfo::DomainKind kind)
 Called when the Kind of a domain should be changed (master -> native and similar) More...
 
virtual bool setAccount (const DNSName &domain, const string &account)
 Called when the Account of a domain should be changed. More...
 
void setArgPrefix (const string &prefix)
 Can be called to seed the getArg() function with a prefix. More...
 
virtual bool superMasterBackend (const string &ip, const DNSName &domain, const vector< DNSResourceRecord > &nsset, string *nameserver, string *account, DNSBackend **db)
 determine if ip is a supermaster or a domain More...
 
virtual bool createDomain (const DNSName &domain)
 called by PowerDNS to create a new domain More...
 
virtual bool createSlaveDomain (const string &ip, const DNSName &domain, const string &nameserver, const string &account)
 called by PowerDNS to create a slave record for a superMaster More...
 
virtual bool deleteDomain (const DNSName &domain)
 called to delete a domain, incl. all metadata, zone contents, etc. More...
 
virtual string directBackendCmd (const string &query)
 
virtual bool searchRecords (const string &pattern, int maxResults, vector< DNSResourceRecord > &result)
 Search for records, returns true if search was done successfully. More...
 
virtual bool searchComments (const string &pattern, int maxResults, vector< Comment > &result)
 Search for comments, returns true if search was done successfully. More...
 
const string & getPrefix ()
 

Protected Member Functions

bool mustDo (const string &key)
 
const string & getArg (const string &key)
 
int getArgAsNum (const string &key)
 

Private Attributes

string d_prefix
 

Detailed Description

This virtual base class defines the interface for backends for PowerDNS.

To create a backend, inherit from this class and implement functions for all virtual methods. Methods should not throw an exception if they are sure they did not find the requested data. However, if an error occurred which prevented them temporarily from performing a lockup, they should throw a DBException, which will cause the nameserver to send out a ServFail or take other evasive action. Probably only locking issues should lead to DBExceptions.

More serious errors, which may indicate that the database connection is hosed, or a configuration error occurred, should lead to the throwing of an PDNSException. This exception will fall straight through the UeberBackend and the PacketHandler and be caught by the Distributor, which will delete your DNSBackend instance and spawn a new one.

Definition at line 120 of file dnsbackend.hh.

Constructor & Destructor Documentation

◆ ~DNSBackend()

virtual DNSBackend::~DNSBackend ( )
inlinevirtual

Definition at line 135 of file dnsbackend.hh.

Member Function Documentation

◆ abortTransaction()

virtual bool DNSBackend::abortTransaction ( )
inlinevirtual

aborts the transaction started by strartTransaction, should leave state unaltered

Reimplemented in Bind2Backend, GSQLBackend, RemoteBackend, OracleBackend, OdbxBackend, LUABackend, and LMDBBackend.

Definition at line 259 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE(), increaseSerial(), patchZone(), PacketHandler::processUpdate(), storeChangedPTRs(), and CommunicatorClass::suck().

◆ activateDomainKey()

virtual bool DNSBackend::activateDomainKey ( const DNSName name,
unsigned int  id 
)
inlinevirtual

Reimplemented in GSQLBackend, Bind2Backend, RemoteBackend, OracleBackend, LUABackend, LMDBBackend, and GeoIPBackend.

Definition at line 191 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ addDomainKey()

virtual bool DNSBackend::addDomainKey ( const DNSName name,
const KeyData key,
int64_t &  id 
)
inlinevirtual

Reimplemented in Bind2Backend, GSQLBackend, RemoteBackend, OracleBackend, LUABackend, LMDBBackend, and GeoIPBackend.

Definition at line 190 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ alsoNotifies()

virtual void DNSBackend::alsoNotifies ( const DNSName domain,
set< string > *  ips 
)
inlinevirtual

get a list of IP addresses that should also be notified for a domain

Reimplemented in Bind2Backend, GSQLBackend, LUABackend, and OracleBackend.

Definition at line 297 of file dnsbackend.hh.

◆ commitTransaction()

◆ createDomain()

virtual bool DNSBackend::createDomain ( const DNSName domain)
inlinevirtual

called by PowerDNS to create a new domain

Reimplemented in GSQLBackend, and LMDBBackend.

Definition at line 344 of file dnsbackend.hh.

◆ createSlaveDomain()

virtual bool DNSBackend::createSlaveDomain ( const string &  ip,
const DNSName domain,
const string &  nameserver,
const string &  account 
)
inlinevirtual

called by PowerDNS to create a slave record for a superMaster

Reimplemented in Bind2Backend, GSQLBackend, RemoteBackend, OracleBackend, OdbxBackend, and LUABackend.

Definition at line 350 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE(), testSchema(), and PacketHandler::trySuperMasterSynchronous().

◆ deactivateDomainKey()

virtual bool DNSBackend::deactivateDomainKey ( const DNSName name,
unsigned int  id 
)
inlinevirtual

Reimplemented in GSQLBackend, Bind2Backend, RemoteBackend, OracleBackend, LUABackend, LMDBBackend, and GeoIPBackend.

Definition at line 192 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ deleteDomain()

virtual bool DNSBackend::deleteDomain ( const DNSName domain)
inlinevirtual

called to delete a domain, incl. all metadata, zone contents, etc.

Reimplemented in GSQLBackend, and LMDBBackend.

Definition at line 356 of file dnsbackend.hh.

Referenced by apiServerZoneDetail(), and deleteZone().

◆ deleteTSIGKey()

virtual bool DNSBackend::deleteTSIGKey ( const DNSName name)
inlinevirtual

Reimplemented in GSQLBackend, Bind2Backend, RemoteBackend, and LMDBBackend.

Definition at line 196 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ directBackendCmd()

virtual string DNSBackend::directBackendCmd ( const string &  query)
inlinevirtual

Reimplemented in Lua2BackendAPIv2, RemoteBackend, GSQLBackend, and PipeBackend.

Definition at line 361 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ doesDNSSEC()

virtual bool DNSBackend::doesDNSSEC ( )
inlinevirtual

Reimplemented in Bind2Backend, GSQLBackend, RemoteBackend, Lua2BackendAPIv2, LMDBBackend, and GeoIPBackend.

Definition at line 218 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE(), and increaseSerial().

◆ feedComment()

virtual void DNSBackend::feedComment ( const Comment comment)
inlinevirtual

Reimplemented in GSQLBackend.

Definition at line 236 of file dnsbackend.hh.

Referenced by apiServerZones().

◆ feedEnts()

virtual bool DNSBackend::feedEnts ( int  domain_id,
map< DNSName, bool > &  nonterm 
)
inlinevirtual

Reimplemented in GSQLBackend, RemoteBackend, and LMDBBackend.

Definition at line 277 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE(), and CommunicatorClass::suck().

◆ feedEnts3()

virtual bool DNSBackend::feedEnts3 ( int  domain_id,
const DNSName domain,
map< DNSName, bool > &  nonterm,
const NSEC3PARAMRecordContent ns3prc,
bool  narrow 
)
inlinevirtual

Reimplemented in GSQLBackend, RemoteBackend, and LMDBBackend.

Definition at line 281 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE(), and CommunicatorClass::suck().

◆ feedRecord()

virtual bool DNSBackend::feedRecord ( const DNSResourceRecord rr,
const DNSName ordername,
bool  ordernameIsNSEC3 = false 
)
inlinevirtual

feeds a record to a zone, needs a call to startTransaction first

Reimplemented in Bind2Backend, OdbxBackend, LUABackend, GSQLBackend, RemoteBackend, and LMDBBackend.

Definition at line 273 of file dnsbackend.hh.

Referenced by apiServerZones(), BOOST_AUTO_TEST_CASE(), createZone(), loadZone(), PacketHandler::performUpdate(), CommunicatorClass::suck(), and testSchema().

◆ get() [1/2]

◆ get() [2/2]

◆ getAllDomainMetadata()

virtual bool DNSBackend::getAllDomainMetadata ( const DNSName name,
std::map< std::string, std::vector< std::string > > &  meta 
)
inlinevirtual

◆ getAllDomains()

virtual void DNSBackend::getAllDomains ( vector< DomainInfo > *  domains,
bool  include_disabled = false 
)
inlinevirtual

◆ getArg()

const string & DNSBackend::getArg ( const string &  key)
protected

Definition at line 55 of file dnsbackend.cc.

References arg(), and d_prefix.

Referenced by OdbxBackend::abortTransaction(), GeoIPBackend::activateDomainKey(), GeoIPBackend::addDomainKey(), OdbxBackend::commitTransaction(), OdbxBackend::connectTo(), OdbxBackend::createSlaveDomain(), Bind2Backend::createSlaveDomain(), GeoIPBackend::deactivateDomainKey(), OdbxBackend::feedRecord(), GeoIPBackend::GeoIPBackend(), TinyDNSBackend::getAllDomains(), OdbxBackend::getDomainInfo(), LdapBackend::getDomainInfo(), GeoIPBackend::getDomainKeys(), TinyDNSBackend::getLocations(), LMDBBackend::getRecordsROTransaction(), LMDBBackend::getRecordsRWTransaction(), OdbxBackend::getSOA(), OdbxBackend::getUnfreshSlaveInfos(), OdbxBackend::getUpdatedMasters(), LdapBackend::getUpdatedMasters(), gMySQLBackend::gMySQLBackend(), gODBCBackend::gODBCBackend(), gOracleBackend::gOracleBackend(), gPgSQLBackend::gPgSQLBackend(), GSQLBackend::GSQLBackend(), gSQLite3Backend::gSQLite3Backend(), GeoIPBackend::hasDNSSECkey(), GeoIPBackend::initialize(), PipeBackend::launch(), LdapBackend::LdapBackend(), TinyDNSBackend::list(), OdbxBackend::list(), LdapBackend::list_simple(), LMDBBackend::LMDBBackend(), Bind2Backend::loadConfig(), TinyDNSBackend::lookup(), OdbxBackend::lookup(), LdapBackend::lookup_simple(), LdapBackend::lookup_strict(), LdapBackend::lookup_tree(), Lua2BackendAPIv2::Lua2BackendAPIv2(), LUABackend::my_getArg(), MyDNSBackend::MyDNSBackend(), OdbxBackend::OdbxBackend(), OracleBackend::openMasterConnection(), OracleBackend::OracleBackend(), RandomBackend::RandomBackend(), gMySQLBackend::reconnect(), RemoteBackend::RemoteBackend(), GeoIPBackend::removeDomainKey(), OdbxBackend::setFresh(), OdbxBackend::setNotified(), LdapBackend::setNotified(), Bind2Backend::setupDNSSEC(), OdbxBackend::startTransaction(), OdbxBackend::superMasterBackend(), and Bind2Backend::superMasterBackend().

◆ getArgAsNum()

◆ getAuth()

bool DNSBackend::getAuth ( const DNSName target,
SOAData sd 
)
virtual

Determines if we are authoritative for a zone, and at what level

Definition at line 40 of file dnsbackend.cc.

References getSOA().

Referenced by Lua2BackendAPIv2::getDomainInfo().

◆ getBeforeAndAfterNames()

bool DNSBackend::getBeforeAndAfterNames ( uint32_t  id,
const DNSName zonename,
const DNSName qname,
DNSName before,
DNSName after 
)
virtual

◆ getBeforeAndAfterNamesAbsolute()

virtual bool DNSBackend::getBeforeAndAfterNamesAbsolute ( uint32_t  id,
const DNSName qname,
DNSName unhashed,
DNSName before,
DNSName after 
)
inlinevirtual

◆ getComment()

virtual bool DNSBackend::getComment ( Comment comment)
inlinevirtual

Reimplemented in GSQLBackend.

Definition at line 231 of file dnsbackend.hh.

Referenced by fillZone().

◆ getDomainInfo()

virtual bool DNSBackend::getDomainInfo ( const DNSName domain,
DomainInfo di,
bool  getSerial = true 
)
inlinevirtual

if this returns true, DomainInfo di contains information about the domain

Reimplemented in Lua2BackendAPIv2, GSQLBackend, Bind2Backend, LdapBackend, RemoteBackend, OdbxBackend, LUABackend, GeoIPBackend, and LMDBBackend.

Definition at line 287 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ getDomainKeys()

virtual bool DNSBackend::getDomainKeys ( const DNSName name,
std::vector< KeyData > &  keys 
)
inlinevirtual

Reimplemented in Bind2Backend, GSQLBackend, LUABackend, and LMDBBackend.

Definition at line 188 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ getDomainMetadata()

virtual bool DNSBackend::getDomainMetadata ( const DNSName name,
const std::string &  kind,
std::vector< std::string > &  meta 
)
inlinevirtual

◆ getDomainMetadataOne()

virtual bool DNSBackend::getDomainMetadataOne ( const DNSName name,
const std::string &  kind,
std::string &  value 
)
inlinevirtual

◆ getPrefix()

const string& DNSBackend::getPrefix ( )
inline

◆ getSOA()

bool DNSBackend::getSOA ( const DNSName domain,
SOAData sd 
)
virtual

fills the soadata struct with the SOA details. Returns false if there is no SOA.

getSOA() is a function that is called to get the SOA of a domain. Callers should ONLY use getSOA() and not perform a lookup() themselves as backends may decide to special case the SOA record.

Returns false if there is definitely no SOA for the domain. May throw a DBException to indicate that the backend is currently unable to supply an answer.

WARNING: This function may fill out the db attribute of the SOAData, but then again, it may not! If you find a zero in there, you may have been handed a non-live and cached answer, in which case you need to perform a getDomainInfo call!

Parameters
domainDomain we want to get the SOA details of
sdSOAData which is filled with the SOA details
unmodifiedSerialbool if set, serial will be returned as stored in the backend (maybe 0)

Reimplemented in LUABackend, MyDNSBackend, OdbxBackend, and LMDBBackend.

Definition at line 222 of file dnsbackend.cc.

References arg(), DNSResourceRecord::auth, DNSResourceRecord::content, DNSName::countLabels(), SOAData::db, SOAData::domain_id, DNSResourceRecord::domain_id, fillSOAData(), get(), SOAData::hostmaster, ArgvMap::isEmpty(), lookup(), SOAData::nameserver, SOAData::qname, DNSResourceRecord::qtype, QType::SOA, SOAData::ttl, and DNSResourceRecord::ttl.

Referenced by Bind2Backend::getAllDomains(), getAuth(), GeoIPBackend::getDomainInfo(), Bind2Backend::getDomainInfo(), GSQLBackend::getDomainInfo(), Bind2Backend::getUnfreshSlaveInfos(), GSQLBackend::getUnfreshSlaveInfos(), Bind2Backend::getUpdatedMasters(), GSQLBackend::getUpdatedMasters(), and PacketHandler::increaseSerial().

◆ getTSIGKey()

virtual bool DNSBackend::getTSIGKey ( const DNSName name,
DNSName algorithm,
string *  content 
)
inlinevirtual

Reimplemented in GSQLBackend, Bind2Backend, OracleBackend, LUABackend, and LMDBBackend.

Definition at line 194 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ getTSIGKeys()

virtual bool DNSBackend::getTSIGKeys ( std::vector< struct TSIGKey > &  keys)
inlinevirtual

Reimplemented in GSQLBackend, Bind2Backend, RemoteBackend, OracleBackend, and LMDBBackend.

Definition at line 197 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ getUnfreshSlaveInfos()

virtual void DNSBackend::getUnfreshSlaveInfos ( vector< DomainInfo > *  domains)
inlinevirtual

slave capable backends should return a list of slaves that should be rechecked for staleness

Reimplemented in Bind2Backend, OdbxBackend, GSQLBackend, OracleBackend, LUABackend, and LMDBBackend.

Definition at line 292 of file dnsbackend.hh.

◆ getUpdatedMasters()

virtual void DNSBackend::getUpdatedMasters ( vector< DomainInfo > *  domains)
inlinevirtual

get list of domains that have been changed since their last notification to slaves

Reimplemented in GSQLBackend, OdbxBackend, RemoteBackend, LdapBackend, OracleBackend, TinyDNSBackend, LUABackend, and Bind2Backend.

Definition at line 302 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ isDnssecDomainMetadata()

◆ list()

virtual bool DNSBackend::list ( const DNSName target,
int  domain_id,
bool  include_disabled = false 
)
pure virtual

Initiates a list of the specified domain.

Once initiated, DNSResourceRecord objects can be retrieved using get(). Should return false if the backend does not consider itself responsible for the id passed.

Parameters
domain_idID of which a list is requested

Implemented in Bind2Backend, RandomBackend, LMDBBackend, GSQLBackend, LdapBackend, Lua2BackendAPIv2, RemoteBackend, OdbxBackend, TinyDNSBackend, PipeBackend, LUABackend, GeoIPBackend, MyDNSBackend, and OracleBackend.

Referenced by apiServerZoneExport(), BOOST_AUTO_TEST_CASE(), checkZone(), TCPNameserver::doAXFR(), editZone(), fillZone(), listZone(), PacketHandler::performUpdate(), and DNSSECKeeper::rectifyZone().

◆ listComments()

virtual bool DNSBackend::listComments ( uint32_t  domain_id)
inlinevirtual

Reimplemented in GSQLBackend.

Definition at line 226 of file dnsbackend.hh.

Referenced by fillZone().

◆ listSubZone()

virtual bool DNSBackend::listSubZone ( const DNSName zone,
int  domain_id 
)
inlinevirtual

Reimplemented in GSQLBackend.

Definition at line 145 of file dnsbackend.hh.

Referenced by PacketHandler::performUpdate().

◆ lookup()

◆ mustDo()

◆ rediscover()

virtual void DNSBackend::rediscover ( string *  status = 0)
inlinevirtual

Reimplemented in Bind2Backend, LUABackend, and GeoIPBackend.

Definition at line 268 of file dnsbackend.hh.

◆ reload()

virtual void DNSBackend::reload ( )
inlinevirtual

Reimplemented in Bind2Backend, LUABackend, and GeoIPBackend.

Definition at line 264 of file dnsbackend.hh.

◆ removeDomainKey()

virtual bool DNSBackend::removeDomainKey ( const DNSName name,
unsigned int  id 
)
inlinevirtual

Reimplemented in GSQLBackend, Bind2Backend, RemoteBackend, OracleBackend, LUABackend, LMDBBackend, and GeoIPBackend.

Definition at line 189 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ replaceComments()

virtual bool DNSBackend::replaceComments ( const uint32_t  domain_id,
const DNSName qname,
const QType qt,
const vector< Comment > &  comments 
)
inlinevirtual

Reimplemented in GSQLBackend.

Definition at line 240 of file dnsbackend.hh.

Referenced by patchZone().

◆ replaceRRSet()

virtual bool DNSBackend::replaceRRSet ( uint32_t  domain_id,
const DNSName qname,
const QType qt,
const vector< DNSResourceRecord > &  rrset 
)
inlinevirtual

◆ searchComments()

virtual bool DNSBackend::searchComments ( const string &  pattern,
int  maxResults,
vector< Comment > &  result 
)
inlinevirtual

Search for comments, returns true if search was done successfully.

Reimplemented in GSQLBackend, and RemoteBackend.

Definition at line 373 of file dnsbackend.hh.

◆ searchRecords()

virtual bool DNSBackend::searchRecords ( const string &  pattern,
int  maxResults,
vector< DNSResourceRecord > &  result 
)
inlinevirtual

Search for records, returns true if search was done successfully.

Reimplemented in GSQLBackend, Bind2Backend, and RemoteBackend.

Definition at line 367 of file dnsbackend.hh.

◆ setAccount()

virtual bool DNSBackend::setAccount ( const DNSName domain,
const string &  account 
)
inlinevirtual

Called when the Account of a domain should be changed.

Reimplemented in GSQLBackend.

Definition at line 329 of file dnsbackend.hh.

Referenced by setZoneAccount(), and updateDomainSettingsFromDocument().

◆ setArgPrefix()

◆ setDomainMetadata()

virtual bool DNSBackend::setDomainMetadata ( const DNSName name,
const std::string &  kind,
const std::vector< std::string > &  meta 
)
inlinevirtual

◆ setDomainMetadataOne()

virtual bool DNSBackend::setDomainMetadataOne ( const DNSName name,
const std::string &  kind,
const std::string &  value 
)
inlinevirtual

Definition at line 169 of file dnsbackend.hh.

References setDomainMetadata().

Referenced by apiServerZones(), and updateDomainSettingsFromDocument().

◆ setFresh()

virtual void DNSBackend::setFresh ( uint32_t  domain_id)
inlinevirtual

Called by PowerDNS to inform a backend that a domain has been checked for freshness.

Reimplemented in OracleBackend, LUABackend, Bind2Backend, GSQLBackend, OdbxBackend, and LMDBBackend.

Definition at line 307 of file dnsbackend.hh.

Referenced by CommunicatorClass::slaveRefresh(), and CommunicatorClass::suck().

◆ setKind()

virtual bool DNSBackend::setKind ( const DNSName domain,
const DomainInfo::DomainKind  kind 
)
inlinevirtual

Called when the Kind of a domain should be changed (master -> native and similar)

Reimplemented in GSQLBackend, and LMDBBackend.

Definition at line 323 of file dnsbackend.hh.

Referenced by createSlaveZone(), setZoneKind(), and updateDomainSettingsFromDocument().

◆ setMaster()

virtual bool DNSBackend::setMaster ( const DNSName domain,
const string &  ip 
)
inlinevirtual

Called when the Master of a domain should be changed.

Reimplemented in GSQLBackend, and LMDBBackend.

Definition at line 317 of file dnsbackend.hh.

Referenced by changeSlaveZoneMaster(), createSlaveZone(), and updateDomainSettingsFromDocument().

◆ setNotified()

virtual void DNSBackend::setNotified ( uint32_t  id,
uint32_t  serial 
)
inlinevirtual

Called by PowerDNS to inform a backend that the changes in the domain have been reported to slaves.

Reimplemented in OracleBackend, Lua2BackendAPIv2, Bind2Backend, LdapBackend, RemoteBackend, LMDBBackend, TinyDNSBackend, LUABackend, GSQLBackend, and OdbxBackend.

Definition at line 312 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE(), and CommunicatorClass::notifyDomain().

◆ setTSIGKey()

virtual bool DNSBackend::setTSIGKey ( const DNSName name,
const DNSName algorithm,
const string &  content 
)
inlinevirtual

Reimplemented in GSQLBackend, Bind2Backend, RemoteBackend, OracleBackend, and LMDBBackend.

Definition at line 195 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ startTransaction()

virtual bool DNSBackend::startTransaction ( const DNSName qname,
int  id = -1 
)
inlinevirtual

returns true if master ip is master for domain name. starts the transaction for updating domain qname (FIXME: what is id?)

Reimplemented in Bind2Backend, LUABackend, OracleBackend, GSQLBackend, LMDBBackend, RemoteBackend, and OdbxBackend.

Definition at line 247 of file dnsbackend.hh.

Referenced by apiServerZones(), BOOST_AUTO_TEST_CASE(), clearZone(), createZone(), increaseSerial(), CommunicatorClass::ixfrSuck(), loadZone(), patchZone(), PacketHandler::processUpdate(), DNSSECKeeper::rectifyZone(), storeChangedPTRs(), CommunicatorClass::suck(), and testSchema().

◆ superMasterBackend()

virtual bool DNSBackend::superMasterBackend ( const string &  ip,
const DNSName domain,
const vector< DNSResourceRecord > &  nsset,
string *  nameserver,
string *  account,
DNSBackend **  db 
)
inlinevirtual

determine if ip is a supermaster or a domain

Reimplemented in RemoteBackend, OdbxBackend, Bind2Backend, GSQLBackend, LUABackend, and OracleBackend.

Definition at line 338 of file dnsbackend.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ updateDNSSECOrderNameAndAuth()

virtual bool DNSBackend::updateDNSSECOrderNameAndAuth ( uint32_t  domain_id,
const DNSName qname,
const DNSName ordername,
bool  auth,
const uint16_t  qtype = QType::ANY 
)
inlinevirtual

◆ updateEmptyNonTerminals()

virtual bool DNSBackend::updateEmptyNonTerminals ( uint32_t  domain_id,
set< DNSName > &  insert,
set< DNSName > &  erase,
bool  remove 
)
inlinevirtual

Reimplemented in GSQLBackend, and LMDBBackend.

Definition at line 213 of file dnsbackend.hh.

Referenced by PacketHandler::performUpdate(), and DNSSECKeeper::rectifyZone().

Member Data Documentation

◆ d_prefix

string DNSBackend::d_prefix
private

Definition at line 385 of file dnsbackend.hh.

Referenced by getArg(), getArgAsNum(), getPrefix(), mustDo(), and setArgPrefix().


The documentation for this class was generated from the following files: