#include <vector>
#include <inttypes.h>
#include <sys/un.h>
+#include <signal.h>
#include <pthread.h>
#include "iputils.hh"
#include "dnsname.hh"
+#include "sholder.hh"
#include <atomic>
+extern GlobalStateHolder<SuffixMatchNode> g_dontThrottleNames;
+extern GlobalStateHolder<NetmaskGroup> g_dontThrottleNetmasks;
+
/** this class is used both to send and answer channel commands to the PowerDNS Recursor */
class RecursorControlChannel
{
std::string recv(std::string* remote=0, unsigned int timeout=5);
int d_fd;
+ static volatile sig_atomic_t stop;
private:
struct sockaddr_un d_local;
};
enum class StatComponent { API, Carbon, RecControl, SNMP };
std::map<std::string, std::string> getAllStatsMap(StatComponent component);
-extern pthread_mutex_t g_carbon_config_lock;
+extern std::mutex g_carbon_config_lock;
std::vector<std::pair<DNSName, uint16_t> >* pleaseGetQueryRing();
std::vector<std::pair<DNSName, uint16_t> >* pleaseGetServfailQueryRing();
std::vector<std::pair<DNSName, uint16_t> >* pleaseGetBogusQueryRing();
void registerAllStats();
+void doExitGeneric(bool nicely);
+void doExit();
+void doExitNicely();