summaryrefslogtreecommitdiff
path: root/src/routing.h
diff options
context:
space:
mode:
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;