summaryrefslogtreecommitdiff
path: root/src/routing.c
diff options
context:
space:
mode:
authorJesper Jensen <jesper@jnsn.dev>2025-04-12 12:25:02 +0200
committerJesper Jensen <jesper@jnsn.dev>2025-04-12 15:22:20 +0200
commitf15040b30fd7aea7141aa12b369036a82a69ff72 (patch)
tree7c8f05889cc5092013e5fe10f770750a98c7b680 /src/routing.c
parent6fdabfdf0865f0516eaac469f0febd25daae01ae (diff)
Add a docker container
Diffstat (limited to 'src/routing.c')
-rw-r--r--src/routing.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/routing.c b/src/routing.c
index dc8c2bf..eca84f9 100644
--- a/src/routing.c
+++ b/src/routing.c
@@ -42,9 +42,17 @@ struct table {
struct table* pTable;
+struct nodeid myID;
+struct entry *table;
+int table_size = RT_SIZE;
+
void routing_init(struct nodeid* myid) {
pTable = malloc(sizeof(struct table));
- pTable->myID = *myid;
+ if(myid != NULL) pTable->myID = *myid;
+
+ table = pTable->table;
+ myID = pTable->myID;
+
routing_flush();
}