summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-25 02:56:11 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-25 02:56:11 +0100
commit64dfa126348e8b5db8742d5f112f2122c25d69fb (patch)
tree84d732f0f94b031b5490ec3f316228f15c0c038d
parente6c55cf1f8b15d48d87174846669a1a1464668cb (diff)
make all headers self containing
-rw-r--r--ot_clean.h2
-rw-r--r--ot_http.h8
-rw-r--r--ot_udp.h2
-rw-r--r--ot_vector.h5
4 files changed, 17 insertions, 0 deletions
diff --git a/ot_clean.h b/ot_clean.h
index e8bcdc1..1484d82 100644
--- a/ot_clean.h
+++ b/ot_clean.h
@@ -6,6 +6,8 @@
6#ifndef OT_CLEAN_H__ 6#ifndef OT_CLEAN_H__
7#define OT_CLEAN_H__ 7#define OT_CLEAN_H__
8 8
9#include "trackerlogic.h"
10
9/* The amount of time a clean cycle should take */ 11/* The amount of time a clean cycle should take */
10#define OT_CLEAN_INTERVAL_MINUTES 2 12#define OT_CLEAN_INTERVAL_MINUTES 2
11 13
diff --git a/ot_http.h b/ot_http.h
index 004d710..965820f 100644
--- a/ot_http.h
+++ b/ot_http.h
@@ -6,7 +6,15 @@
6#ifndef OT_HTTP_H__ 6#ifndef OT_HTTP_H__
7#define OT_HTTP_H__ 7#define OT_HTTP_H__
8 8
9#include <stdint.h>
10#include <sys/types.h>
11#include <sys/uio.h>
12
13/* Libowfat */
14#include "iob.h"
15
9#include "ot_buf.h" 16#include "ot_buf.h"
17#include "trackerlogic.h"
10 18
11typedef enum { 19typedef enum {
12 STRUCT_HTTP_FLAG_WAITINGFORTASK = 1, 20 STRUCT_HTTP_FLAG_WAITINGFORTASK = 1,
diff --git a/ot_udp.h b/ot_udp.h
index c670175..87d99a9 100644
--- a/ot_udp.h
+++ b/ot_udp.h
@@ -8,6 +8,8 @@
8 8
9#include <stdint.h> 9#include <stdint.h>
10 10
11#include "trackerlogic.h"
12
11void udp_init(int64_t sock, unsigned int worker_count); 13void udp_init(int64_t sock, unsigned int worker_count);
12void udp_kickoff(void); 14void udp_kickoff(void);
13int handle_udp6(int64_t serversocket, struct ot_workstruct *ws); 15int handle_udp6(int64_t serversocket, struct ot_workstruct *ws);
diff --git a/ot_vector.h b/ot_vector.h
index 2618363..fbc75f4 100644
--- a/ot_vector.h
+++ b/ot_vector.h
@@ -6,6 +6,8 @@
6#ifndef OT_VECTOR_H__ 6#ifndef OT_VECTOR_H__
7#define OT_VECTOR_H__ 7#define OT_VECTOR_H__
8 8
9#include <stddef.h>
10
9/* These defines control vectors behaviour */ 11/* These defines control vectors behaviour */
10#define OT_VECTOR_MIN_MEMBERS 2 12#define OT_VECTOR_MIN_MEMBERS 2
11#define OT_VECTOR_GROW_RATIO 2 13#define OT_VECTOR_GROW_RATIO 2
@@ -21,6 +23,9 @@ typedef struct {
21 size_t space; 23 size_t space;
22} ot_vector; 24} ot_vector;
23 25
26/* trackerlogic.h needs ot_vector, break circular dependency here */
27#include "trackerlogic.h"
28
24void *binary_search(const void *const key, const void *base, const size_t member_count, const size_t member_size, size_t compare_size, int *exactmatch); 29void *binary_search(const void *const key, const void *base, const size_t member_count, const size_t member_size, size_t compare_size, int *exactmatch);
25void *vector_find_or_insert(ot_vector *vector, void *key, size_t member_size, size_t compare_size, int *exactmatch); 30void *vector_find_or_insert(ot_vector *vector, void *key, size_t member_size, size_t compare_size, int *exactmatch);
26ot_peer *vector_find_or_insert_peer(ot_vector *vector, ot_peer const *peer, size_t peer_size, int *exactmatch); 31ot_peer *vector_find_or_insert_peer(ot_vector *vector, ot_peer const *peer, size_t peer_size, int *exactmatch);