#include <boost/functional/hash.hpp>
const DNSName g_rootdnsname("."), g_wildcarddnsname("*");
+const ZoneName g_rootzonename(".");
/* raw storage
in DNS label format, with trailing 0. W/o trailing 0, we are 'empty'
using CanonZoneNameCompare = CanonDNSNameCompare;
#endif // ]
+extern const ZoneName g_rootzonename;
+
template<typename T>
struct SuffixMatchTree
{
std::string tmp(reinterpret_cast<const char*>(data), size);
boost::split(lines, tmp, boost::is_any_of("\n"));
- ZoneParserTNG zpt(lines, ZoneName(g_rootdnsname));
+ ZoneParserTNG zpt(lines, g_rootzonename);
/* limit the number of steps for '$GENERATE' entries */
zpt.setMaxGenerateSteps(10000);
zpt.setMaxIncludes(20);
unixDie("Editing file with: '"+cmdline+"', perhaps set EDITOR variable");
}
cmdline.clear();
- ZoneParserTNG zpt(static_cast<const char *>(tmpnam), ZoneName(g_rootdnsname));
+ ZoneParserTNG zpt(static_cast<const char *>(tmpnam), g_rootzonename);
zpt.setMaxGenerateSteps(::arg().asNum("max-generate-steps"));
zpt.setMaxIncludes(::arg().asNum("max-include-depth"));
DNSResourceRecord zrr;
}
try
{
- if( i.name != ZoneName(g_rootdnsname) && i.name != ZoneName("localhost") && i.name != ZoneName("0.0.127.in-addr.arpa") )
+ if( i.name != g_rootzonename && i.name != ZoneName("localhost") && i.name != ZoneName("0.0.127.in-addr.arpa") )
{
cerr << "Parsing file: " << i.filename << ", domain: " << i.name << endl;
g_zonename = i.name;
class ZoneParserTNG
{
public:
- ZoneParserTNG(const string& fname, ZoneName zname=ZoneName(g_rootdnsname), string reldir="", bool upgradeContent=false);
+ ZoneParserTNG(const string& fname, ZoneName zname=g_rootzonename, string reldir="", bool upgradeContent=false);
ZoneParserTNG(const vector<string>& zonedata, ZoneName zname, bool upgradeContent=false);
~ZoneParserTNG();