% DATASRC_MEM_SUCCESS query for '%1/%2' successful
Debug information. The requested record was found.
+% DATASRC_MEM_FIND_TYPE_AT_ORIGIN origin query for type %1 in in-memory zone %2/%3 successful
+Debug information. A specific type RRset is requested at a zone origin
+of an in-memory zone and it is found.
+
% DATASRC_MEM_SUPER_STOP stopped as '%1' is superdomain of a zone node, meaning it's empty
Debug information. The search stopped because the requested domain was
detected to be a superdomain of some existing node of zone (while there
boost::shared_ptr<ZoneFinder::Context>
InMemoryZoneFinder::find(const isc::dns::Name& name,
- const isc::dns::RRType& type,
- const FindOptions options)
+ const isc::dns::RRType& type,
+ const FindOptions options)
{
return (ZoneFinderContextPtr(new Context(*this, options, rrclass_,
findInternal(name, type,
boost::shared_ptr<ZoneFinder::Context>
InMemoryZoneFinder::findAll(const isc::dns::Name& name,
- std::vector<isc::dns::ConstRRsetPtr>& target,
- const FindOptions options)
+ std::vector<isc::dns::ConstRRsetPtr>& target,
+ const FindOptions options)
{
return (ZoneFinderContextPtr(new Context(*this, options, rrclass_,
findInternal(name,
options))));
}
+boost::shared_ptr<ZoneFinder::Context>
+InMemoryZoneFinder::findAtOrigin(const isc::dns::RRType& type,
+ bool /*use_minttl*/, // not yet supported
+ const FindOptions options)
+{
+ const ZoneNode* const node = zone_data_.getOriginNode();
+ const RdataSet* const found = RdataSet::find(node->getData(), type);
+
+ if (found != NULL) {
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_FIND_TYPE_AT_ORIGIN).
+ arg(type).arg(getOrigin()).arg(rrclass_);
+ return (ZoneFinderContextPtr(
+ new Context(*this, options, rrclass_,
+ createFindResult(rrclass_, zone_data_, SUCCESS,
+ node, found, options))));
+ }
+ return (ZoneFinderContextPtr(
+ new Context(*this, options, rrclass_,
+ createFindResult(rrclass_, zone_data_, NXRRSET,
+ node,
+ getNSECForNXRRSET(zone_data_,
+ options,
+ node),
+ options))));
+}
+
ZoneFinderResultContext
InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
const isc::dns::RRType& type,
const isc::dns::RRType& type,
const FindOptions options = FIND_DEFAULT);
+ /// \brief Search for an RRset of given RR type at the zone origin
+ /// specialized for in-memory data source.
+ virtual boost::shared_ptr<Context> findAtOrigin(
+ const isc::dns::RRType& type, bool use_minttl,
+ FindOptions options);
+
/// \brief Version of find that returns all types at once
///
/// It acts the same as find, just that when the correct node is found,
} // namespace isc
#endif // DATASRC_MEMORY_ZONE_FINDER_H
+
+// Local Variables:
+// mode: c++
+// End: