* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <cstdint>
#include <dirent.h>
#include <fstream>
+#include <cinttypes>
// for OpenBSD, sys/socket.h needs to come before net/if.h
#include <sys/socket.h>
luaCtx.writeFunction("setTCPInternalPipeBufferSize", [](uint64_t size) { g_tcpInternalPipeBufferSize = size; });
luaCtx.writeFunction("setTCPFastOpenKey", [](const std::string& keyString) {
setLuaSideEffect();
- unsigned int key[4] = {};
- auto ret = sscanf(keyString.c_str(), "%x-%x-%x-%x", &key[0], &key[1], &key[2], &key[3]);
+ uint32_t key[4] = {};
+ auto ret = sscanf(keyString.c_str(), "%" SCNx32 "%" SCNx32 "%" SCNx32 "%" SCNx32, &key[0], &key[1], &key[2], &key[3]);
if (ret != 4) {
g_outputBuffer = "Invalid value passed to setTCPFastOpenKey()!\n";
return;
}
- extern vector<unsigned int> g_TCPFastOpenKey;
+ extern vector<uint32_t> g_TCPFastOpenKey;
for (const auto i : key) {
g_TCPFastOpenKey.push_back(i);
}
#include "config.h"
+#include <cstdint>
#include <fstream>
#include <getopt.h>
#include <grp.h>
std::vector<std::unique_ptr<ClientState>> g_frontends;
GlobalStateHolder<pools_t> g_pools;
size_t g_udpVectorSize{1};
-std::vector<unsigned int> g_TCPFastOpenKey;
+std::vector<uint32_t> g_TCPFastOpenKey;
/* UDP: the grand design. Per socket we listen on for incoming queries there is one thread.
Then we have a bunch of connected sockets for talking to downstream servers.
We send directly to those sockets.