#include "namespaces.hh"
#include "noinitvector.hh"
+bool DNSRecordContent::d_locked{false};
+
UnknownRecordContent::UnknownRecordContent(const string& zone)
{
// parse the input
static void regist(uint16_t cl, uint16_t ty, makerfunc_t* f, zmakerfunc_t* z, const char* name)
{
+ assert(!d_locked);
if(f)
getTypemap()[pair(cl,ty)]=f;
if(z)
static void unregist(uint16_t cl, uint16_t ty)
{
+ assert(!d_locked);
auto key = pair(cl, ty);
getTypemap().erase(key);
getZmakermap().erase(key);
virtual uint16_t getType() const = 0;
+ static void lock()
+ {
+ d_locked = true;
+ }
+
protected:
typedef std::map<std::pair<uint16_t, uint16_t>, makerfunc_t* > typemap_t;
typedef std::map<std::pair<uint16_t, uint16_t>, zmakerfunc_t* > zmakermap_t;
static t2namemap_t& getT2Namemap();
static n2typemap_t& getN2Typemap();
static zmakermap_t& getZmakermap();
+ static bool d_locked;
};
struct DNSRecord
{
auto log = g_slog->withName("config");
- TXTRecordContent::report();
- OPTRecordContent::report();
-
auto newMap = std::make_shared<SyncRes::domainmap_t>();
auto newSet = std::make_shared<notifyset_t>();