Commit 0e93f4c1 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[1431] defined the interface of findNSEC3 and provided minimal implementation

to make it compile.
parent 079133e3
......@@ -216,6 +216,11 @@ public:
std::vector<ConstRRsetPtr>& target,
const FindOptions options = FIND_DEFAULT);
virtual pair<bool, ConstRRsetPtr>
findNSEC3(const Name& /*name*/, bool /*recursive*/) {
throw 42; // temporary
}
// If false is passed, it makes the zone broken as if it didn't have the
// SOA.
void setSOAFlag(bool on) { has_SOA_ = on; }
......
......@@ -892,6 +892,12 @@ DatabaseClient::Finder::findInternal(const isc::dns::Name& name,
}
}
pair<bool, isc::dns::ConstRRsetPtr>
DatabaseClient::Finder::findNSEC3(const isc::dns::Name&, bool) {
isc_throw(NotImplemented, "findNSEC3 is not yet implemented for database "
"data source");
}
Name
DatabaseClient::Finder::findPreviousName(const Name& name) const {
const string str(accessor_->findPreviousName(zone_id_,
......
......@@ -754,6 +754,10 @@ public:
virtual isc::dns::Name findPreviousName(const isc::dns::Name& query)
const;
/// TBD
virtual std::pair<bool, isc::dns::ConstRRsetPtr>
findNSEC3(const isc::dns::Name& name, bool recursive);
/// \brief The zone ID
///
/// This function provides the stored zone ID as passed to the
......
......@@ -641,6 +641,12 @@ InMemoryZoneFinder::findAll(const Name& name,
return (impl_->find(name, RRType::ANY(), &target, options));
}
pair<bool, isc::dns::ConstRRsetPtr>
InMemoryZoneFinder::findNSEC3(const isc::dns::Name&, bool) {
isc_throw(NotImplemented, "findNSEC3 is not yet implemented for in memory "
"data source");
}
result::Result
InMemoryZoneFinder::add(const ConstRRsetPtr& rrset) {
return (impl_->add(rrset, &impl_->domains_));
......
......@@ -83,6 +83,10 @@ public:
std::vector<isc::dns::ConstRRsetPtr>& target,
const FindOptions options = FIND_DEFAULT);
/// TBD
virtual std::pair<bool, isc::dns::ConstRRsetPtr>
findNSEC3(const isc::dns::Name& name, bool recursive);
/// \brief Imelementation of the ZoneFinder::findPreviousName method
///
/// This one throws NotImplemented exception, as InMemory doesn't
......
......@@ -15,6 +15,9 @@
#ifndef __ZONE_H
#define __ZONE_H 1
#include <utility>
#include <vector>
#include <dns/rrset.h>
#include <dns/rrsetlist.h>
......@@ -306,6 +309,10 @@ public:
std::vector<isc::dns::ConstRRsetPtr> &target,
const FindOptions options = FIND_DEFAULT) = 0;
/// TBD
virtual std::pair<bool, isc::dns::ConstRRsetPtr>
findNSEC3(const isc::dns::Name& name, bool recursive) = 0;
/// \brief Get previous name in the zone
///
/// Gets the previous name in the DNSSEC order. This can be used
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment