/*
- PowerDNS Versatile Database Driven Nameserver
- Copyright (C) 2002 - 2011 PowerDNS.COM BV
+ * This file is part of PowerDNS or dnsdist.
+ * Copyright -- PowerDNS.COM B.V. and its contributors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * In addition, for the avoidance of any doubt, permission is granted to
+ * link this program with OpenSSL and to (re)distribute the binaries
+ * produced as the result of such linking.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2
- as published by the Free Software Foundation
-
- Additionally, the license of this program contains a special
- exception which allows to distribute the program in binary form when
- it is linked against OpenSSL.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
/* accepts a named.conf or a zone as parameter and outputs heaps of sql */
#ifdef HAVE_CONFIG_H
}
/* 2 modes of operation, either --named or --zone (the latter needs $ORIGIN)
- 2 further modes: --mysql or --oracle
+ 1 further mode: --mysql
*/
ArgvMap &arg()
vector<string> lines;
reportAllTypes();
-#if __GNUC__ >= 3
std::ios_base::sync_with_stdio(false);
-#endif
::arg().setSwitch("verbose","Verbose comments on operation")="no";
::arg().setSwitch("on-error-resume-next","Continue after errors")="no";
::arg().set("soa-refresh-default","Do not change")="0";
::arg().set("soa-retry-default","Do not change")="0";
::arg().set("soa-expire-default","Do not change")="0";
+ ::arg().set("max-generate-steps", "Maximum number of $GENERATE steps when loading a zone from a file")="0";
::arg().setCmd("help","Provide a helpful message");
::arg().setCmd("version","Print the version");
Json::object obj;
Json::array recs;
ZoneParserTNG zpt(i->filename, i->name, BP.getDirectory());
+ zpt.setMaxGenerateSteps(::arg().asNum("max-generate-steps"));
DNSResourceRecord rr;
obj["name"] = i->name.toString();
}
else {
ZoneParserTNG zpt(zonefile, DNSName(::arg()["zone-name"]));
+ zpt.setMaxGenerateSteps(::arg().asNum("max-generate-steps"));
DNSResourceRecord rr;
string zname;
Json::object obj;