]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/rec_channel.hh
Merge pull request #9099 from PowerDNS/omoerbeek-patch-1
[thirdparty/pdns.git] / pdns / rec_channel.hh
index 2eb6fb8fd6cd5bf0cbf84dd6aa2ea8521ab236d7..09c8f1def596d48694a704401cc30b64a62a52f8 100644 (file)
 #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
 {
@@ -49,6 +54,7 @@ public:
   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;
 };
@@ -67,7 +73,7 @@ public:
 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();
@@ -85,3 +91,6 @@ void blacklistStats(StatComponent component, const string& stats);
 
 void registerAllStats();
 
+void doExitGeneric(bool nicely);
+void doExit();
+void doExitNicely();