26 namespace ph = std::placeholders;
35 void addRR(
const Name& name,
const RRClass& rrclass,
48 if (type1 != rrset->getType()) {
53 return (dynamic_cast<const generic::RRSIG&>(*rdata1).typeCovered()
55 rit->getCurrent()).typeCovered());
66 if (current_rrset_ && (!isSameType(rrtype, rdata, current_rrset_) ||
67 current_rrset_->getClass() != rrclass ||
68 current_rrset_->getName() != name)) {
70 current_rrset_.reset();
73 if (!current_rrset_) {
74 current_rrset_ =
RRsetPtr(
new RRset(name, rrclass, rrtype, rrttl));
75 }
else if (current_rrset_->getTTL() != rrttl) {
77 current_rrset_->setTTL(std::min(current_rrset_->getTTL(), rrttl));
79 current_rrset_->addRdata(rdata);
83 impl_(new
Impl(callback))
93 ph::_1, ph::_2, ph::_3, ph::_4, ph::_5));
The Name class encapsulates DNS names.
rdata::RRSIG class represents the RRSIG RDATA as defined in RFC4034.
std::function< void(const RRsetPtr &rrset)> AddRRsetCallback
Callback functor type for RRCollator.
std::function< void()> callback_
The callback function.
const AddRRsetCallback callback_
boost::shared_ptr< const Rdata > ConstRdataPtr
RRCollator(const AddRRsetCallback &callback)
Constructor.
static const RRType & RRSIG()
The RRClass class encapsulates DNS resource record classes.
void addRR(const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &rrttl, const RdataPtr &rdata)
AddRRCallback getCallback()
Return MasterLoader compatible callback.
The RRTTL class encapsulates TTLs used in DNS resource records.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Impl(const AddRRsetCallback &callback)
The RRset class is a concrete derived class of BasicRRset which contains a pointer to an additional R...
The RRType class encapsulates DNS resource record types.
boost::shared_ptr< RdataIterator > RdataIteratorPtr
A pointer-like type point to an RdataIterator object.
boost::shared_ptr< const AbstractRRset > ConstRRsetPtr
A pointer-like type pointing to an (immutable) RRset object.
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
void flush()
Call the callback on the remaining RRset, if any.
std::function< void(const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &rrttl, const rdata::RdataPtr &rdata)> AddRRCallback
Type of callback to add a RR.
boost::shared_ptr< Rdata > RdataPtr
The RdataPtr type is a pointer-like type, pointing to an object of some concrete derived class of Rda...