From fc85d676b5ca3de92264dfcb41c98d7c9b0d1398 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 25 Jul 2024 00:20:30 +0000 Subject: More shibari-cache stuff Signed-off-by: Laurent Bercot --- src/config/defaults.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/config/defaults.c') diff --git a/src/config/defaults.c b/src/config/defaults.c index 9222aa4..9a30c98 100644 --- a/src/config/defaults.c +++ b/src/config/defaults.c @@ -13,19 +13,20 @@ struct defaults_s #define REC(k, v, n) { .key = (k), .value = (v), .vlen = (n) } #define RECS(k, v) REC(k, (v), sizeof(v)) +#define RECU16(k, u) { .key = (k), .value = (char const [2]){ (u) >> 8 & 0xffu, (u) & 0xffu }, .vlen = 2 } #define RECU32(k, u) { .key = (k), .value = (char const [4]){ (u) >> 24 & 0xffu, (u) >> 16 & 0xffu, (u) >> 8 & 0xffu, (u) & 0xffu }, .vlen = 4 } #define RECU64(k, u) { .key = (k), .value = (char const [8]){ (u) >> 56 & 0xffu, (u) >> 48 & 0xffu, (u) >> 40 & 0xffu, (u) >> 32 & 0xffu, (u) >> 24 & 0xffu, (u) >> 16 & 0xffu, (u) >> 8 & 0xffu, (u) & 0xffu }, .vlen = 8 } static struct defaults_s const defaults[] = { - RECU32("G:logv", 1), - REC("G:listen4", "\177\0\0\1", 4), - REC("G:listen6", "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1", 16), - RECU32("G:maxtcp", 256), - RECU32("G:maxqueries", 1024), + RECU16("G:logv", 1), RECU64("G:cachesize", 1048576), + RECU16("G:maxtcp", 64), + RECU16("G:maxqueries", 256), RECU32("G:rtimeout", 0), RECU32("G:wtimeout", 0), + REC("G:listen4", "\177\0\0\1", 4), + REC("G:listen6", "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1", 16), REC("R4:", "\0\306\51\0\4" -- cgit v1.2.3