summaryrefslogtreecommitdiff
path: root/src/routing.h
diff options
context:
space:
mode:
authorJesper Jensen <DelusionalLogic@users.noreply.github.com>2021-10-27 20:29:41 +0200
committerGitHub <noreply@github.com>2021-10-27 20:29:41 +0200
commit4527a87385c56cb2a5cf0269d4638b604a1f039b (patch)
tree031e8a09ec26229b31f58e2189d0023898881d20 /src/routing.h
parentef39868b6bffa3030c7cbc083df1301849fba0f7 (diff)
parent42a627aab5e47c3f3e05460322b9c1c3f2c69214 (diff)
Merge pull request #1 from DelusionalLogic/mainflush
Mainflush
Diffstat (limited to 'src/routing.h')
-rw-r--r--src/routing.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/routing.h b/src/routing.h
index a7cd8c6..f4164fe 100644
--- a/src/routing.h
+++ b/src/routing.h
@@ -6,6 +6,12 @@
#include <time.h>
#include <stdio.h>
+#define RT_IDBITS 160
+#define RT_BSIZE 8
+// The 3 here is log2(BUCKETSIZE), since the final bucket will contain all those combinations
+#define RT_BBITS 3
+#define RT_SIZE (RT_IDBITS * RT_BSIZE)
+
struct addr {
uint32_t ip;
uint16_t port;