#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include "iputils.hh"
-#include "dolog.hh"
-#include "sstuff.hh"
-#include "namespaces.hh"
+#include "dnsdist-carbon.hh"
#include "dnsdist.hh"
+#include "dnsdist-carbon.hh"
+#include "dolog.hh"
+#include "sstuff.hh"
#include "threadname.hh"
GlobalStateHolder<vector<CarbonConfig> > g_carbon;
#include <thread>
#include "dnsdist.hh"
+#include "dnsdist-carbon.hh"
#include "dnsdist-console.hh"
#include "dnsdist-dynblocks.hh"
#include "dnsdist-ecs.hh"
#include "dnsdist.hh"
#include "dnsdist-cache.hh"
+#include "dnsdist-carbon.hh"
#include "dnsdist-console.hh"
#include "dnsdist-dynblocks.hh"
#include "dnsdist-ecs.hh"
bool d_useECS{false};
};
-struct CarbonConfig
-{
- ComboAddress server;
- std::string namespace_name;
- std::string ourname;
- std::string instance_name;
- unsigned int interval;
-};
-
enum ednsHeaderFlags {
EDNS_HEADER_FLAG_NONE = 0,
EDNS_HEADER_FLAG_DO = 32768
extern GlobalStateHolder<SuffixMatchTree<DynBlock>> g_dynblockSMT;
extern DNSAction::Action g_dynBlockAction;
-extern GlobalStateHolder<vector<CarbonConfig> > g_carbon;
extern GlobalStateHolder<ServerPolicy> g_policy;
extern GlobalStateHolder<servers_t> g_dstates;
extern GlobalStateHolder<pools_t> g_pools;
ssize_t udpClientSendRequestToBackend(const std::shared_ptr<DownstreamState>& ss, const int sd, const PacketBuffer& request, bool healthCheck = false);
void handleResponseSent(const IDState& ids, double udiff, const ComboAddress& client, const ComboAddress& backend, unsigned int size, const dnsheader& cleartextDH, dnsdist::Protocol protocol);
-void carbonDumpThread();
dnscrypt.cc dnscrypt.hh \
dnsdist-backend.cc \
dnsdist-cache.cc dnsdist-cache.hh \
- dnsdist-carbon.cc \
+ dnsdist-carbon.cc dnsdist-carbon.hh \
dnsdist-console.cc dnsdist-console.hh \
dnsdist-dnscrypt.cc \
dnsdist-dynblocks.cc dnsdist-dynblocks.hh \
--- /dev/null
+/*
+ * 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.
+ */
+#pragma once
+
+#include "sholder.hh"
+#include "iputils.hh"
+
+struct CarbonConfig
+{
+ ComboAddress server;
+ std::string namespace_name;
+ std::string ourname;
+ std::string instance_name;
+ unsigned int interval;
+};
+
+extern GlobalStateHolder<std::vector<CarbonConfig> > g_carbon;
+void carbonDumpThread();