1 /* 2 * This file is part of PowerDNS or dnsdist. 3 * Copyright -- PowerDNS.COM B.V. and its contributors 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * In addition, for the avoidance of any doubt, permission is granted to 10 * link this program with OpenSSL and to (re)distribute the binaries 11 * produced as the result of such linking. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 21 */ 22 #pragma once 23 #include "auth-packetcache.hh" 24 #include "auth-querycache.hh" 25 #include "auth-zonecache.hh" 26 #include "utility.hh" 27 #include "arguments.hh" 28 #include "communicator.hh" 29 #include "distributor.hh" 30 #include "dnspacket.hh" 31 #include "dnsproxy.hh" 32 #include "dynlistener.hh" 33 #include "nameserver.hh" 34 #include "statbag.hh" 35 #include "tcpreceiver.hh" 36 #include "dnsseckeeper.hh" 37 38 extern ArgvMap theArg; 39 extern StatBag S; //!< Statistics are gathered across PDNS via the StatBag class S 40 extern AuthPacketCache PC; //!< This is the main PacketCache, shared across all threads 41 extern AuthQueryCache QC; 42 extern std::unique_ptr<DNSProxy> DP; 43 extern std::unique_ptr<DynListener> dl; 44 extern CommunicatorClass Communicator; 45 extern std::shared_ptr<UDPNameserver> N; 46 extern vector<std::shared_ptr<UDPNameserver> > g_udpReceivers; 47 extern double avg_latency; 48 extern std::unique_ptr<TCPNameserver> TN; 49 extern void declareArguments(); 50 extern void declareStats(); 51 extern void mainthread(); 52 extern int isGuarded( char ** ); 53 void carbonDumpThread(); 54 extern bool g_anyToTcp; 55 extern bool g_8bitDNS; 56 #ifdef HAVE_LUA_RECORDS 57 extern bool g_doLuaRecord; 58 extern bool g_LuaRecordSharedState; 59 extern time_t g_luaHealthChecksInterval; 60 extern time_t g_luaHealthChecksExpireDelay; 61 #endif // HAVE_LUA_RECORDS 62