#include <sys/socket.h>
#include <limits.h>
-#include <common/compat/getenv.h>
-#include <common/time.h>
-#include <common/defaults.h>
-#include <common/ini-config/ini-config.h>
+#include <common/compat/getenv.hpp>
+#include <common/time.hpp>
+#include <common/defaults.hpp>
+#include <common/ini-config/ini-config.hpp>
-#include "tcp_keep_alive.h"
+#include "tcp_keep_alive.hpp"
#define SOLARIS_IDLE_TIME_MIN_S 10
#define SOLARIS_IDLE_TIME_MAX_S 864000 /* 10 days */
#endif /* ! defined (__linux__) && ! defined (__sun__) */
+namespace {
struct tcp_keep_alive_support {
/* TCP keep-alive is supported by this platform. */
bool supported;
int abort_threshold;
};
-static struct tcp_keep_alive_config the_config = {.enabled = false,
+struct tcp_keep_alive_config the_config = {.enabled = false,
.idle_time = -1,
.probe_interval = -1,
.max_probe_count = -1,
.abort_threshold = -1};
-static struct tcp_keep_alive_support the_support = {.supported = false,
+struct tcp_keep_alive_support the_support = {.supported = false,
.idle_time_supported = false,
.probe_interval_supported = false,
.max_probe_count_supported = false,
.abort_threshold_supported = false};
+} /* namespace */
/*
* Common parser for string to positive int conversion where the value must be