From 69528489cddd27b4d4b9411d00b60cccc175b0e8 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Fri, 18 Jul 2025 09:32:16 +0200 Subject: Add a simple API for lookups --- src/proto.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/proto.h') diff --git a/src/proto.h b/src/proto.h index 95c7d7e..aaa3b3b 100644 --- a/src/proto.h +++ b/src/proto.h @@ -4,6 +4,7 @@ #include "sha256.h" #include #include +#include #define TOKEN_ITMO 20 #define TOKEN_VTMO 60 @@ -26,6 +27,8 @@ enum Operation { OP_PENDING, OP_ACTIVE, OP_COMPLETED, + + OP_LEN, }; struct lookup { @@ -74,6 +77,8 @@ typedef PROCESS_REPONSE(resp); typedef PROCESS_TIMEOUT(tmout); struct dht { + pthread_mutex_t mutex; + struct nodeid self; int sfd; -- cgit v1.2.3