summaryrefslogtreecommitdiffstats
path: root/src/dht.c
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-11-21 22:13:04 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-11-21 22:13:04 +0100
commita36d9a1b09a6632fd66ad67c7ba0c9692b058608 (patch)
treef8c4bb98ed1dfa04d983035a4299166eba774342 /src/dht.c
parentcreated utils/bencoding.c, fixed bencoding (for now decode only). TODO: fuzz (diff)
downloadtravnik-a36d9a1b09a6632fd66ad67c7ba0c9692b058608.tar
travnik-a36d9a1b09a6632fd66ad67c7ba0c9692b058608.tar.gz
travnik-a36d9a1b09a6632fd66ad67c7ba0c9692b058608.tar.bz2
travnik-a36d9a1b09a6632fd66ad67c7ba0c9692b058608.tar.lz
travnik-a36d9a1b09a6632fd66ad67c7ba0c9692b058608.tar.xz
travnik-a36d9a1b09a6632fd66ad67c7ba0c9692b058608.tar.zst
travnik-a36d9a1b09a6632fd66ad67c7ba0c9692b058608.zip
Diffstat (limited to 'src/dht.c')
-rw-r--r--src/dht.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dht.c b/src/dht.c
new file mode 100644
index 0000000..629bf26
--- /dev/null
+++ b/src/dht.c
@@ -0,0 +1,14 @@
+struct dht {
+ char id[20];
+ int socket;
+};
+struct node {
+ char id[20];
+ int lost;
+ int sent;
+ int answers;
+ int malformed;
+ int received;
+ time_t last;
+ struct sockaddr addr;
+};