Including a wrong FFI prototype.
};
extern "C" {
-char* my_generator(const char* text, int state)
+static char* my_generator(const char* text, int state)
{
string t(text);
/* to keep it readable, we try to keep only 4 keywords per line
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "dnsdist.hh"
+#include "dnsdist-lua.hh"
#include "ednsoptions.hh"
#undef BADSIG // signal.h SIG_ERR
would block.
*/
// XXX could probably be implemented as a TCPIOHandler
-IOState tryRead(int fd, std::vector<uint8_t>& buffer, size_t& pos, size_t toRead)
+static IOState tryRead(int fd, std::vector<uint8_t>& buffer, size_t& pos, size_t toRead)
{
if (buffer.size() < (pos + toRead)) {
throw std::out_of_range("Calling tryRead() with a too small buffer (" + std::to_string(buffer.size()) + ") for a read of " + std::to_string(toRead) + " bytes starting at " + std::to_string(pos));
std::atomic<uint16_t> g_cacheCleaningDelay{60};
std::atomic<uint16_t> g_cacheCleaningPercentage{100};
-void maintThread()
+static void maintThread()
{
setThreadName("dnsdist/main");
int interval = 1;
struct dnsheader;
-void controlThread(int fd, ComboAddress local);
vector<std::function<void(void)>> setupLua(bool client, const std::string& config);
struct WebserverConfig
uint64_t dnsdist_ffi_stat_node_get_children_nxdomains_count(const dnsdist_ffi_stat_node_t* node) __attribute__ ((visibility ("default")));
uint64_t dnsdist_ffi_stat_node_get_children_servfails_count(const dnsdist_ffi_stat_node_t* node) __attribute__ ((visibility ("default")));
uint64_t dnsdist_ffi_stat_node_get_children_drops_count(const dnsdist_ffi_stat_node_t* node) __attribute__ ((visibility ("default")));
- uint64_t dnsdist_ffi_stat_node_get_children_bytes(const dnsdist_ffi_stat_node_t* node) __attribute__ ((visibility ("default")));
+ uint64_t dnsdist_ffi_stat_node_get_children_bytes_count(const dnsdist_ffi_stat_node_t* node) __attribute__ ((visibility ("default")));
}
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-void safe_memory_lock(void* data, size_t size)
+static void safe_memory_lock(void* data, size_t size)
{
#ifdef HAVE_LIBSODIUM
sodium_mlock(data, size);
#endif
}
-void safe_memory_release(void* data, size_t size)
+static void safe_memory_release(void* data, size_t size)
{
#ifdef HAVE_LIBSODIUM
sodium_munlock(data, size);
#include <string>
#include "dnsname.hh"
#include "namespaces.hh"
+#include "dnswriter.hh"
namespace {
void appendSplit(vector<string>& ret, string& segment, char c)
#include <inttypes.h>
namespace anonpdns {
-char B64Decode1(char cInChar)
+static char B64Decode1(char cInChar)
{
// The incoming character will be A-Z, a-z, 0-9, +, /, or =.
// The idea is to quickly determine which grouping the
return iIndex;
}
-inline char B64Encode1(unsigned char uc)
+static inline char B64Encode1(unsigned char uc)
{
if (uc < 26)
{