diff options
| -rw-r--r-- | ot_clean.h | 2 | ||||
| -rw-r--r-- | ot_http.h | 8 | ||||
| -rw-r--r-- | ot_udp.h | 2 | ||||
| -rw-r--r-- | ot_vector.h | 5 |
4 files changed, 17 insertions, 0 deletions
| @@ -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 | ||
| @@ -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 | ||
| 11 | typedef enum { | 19 | typedef enum { |
| 12 | STRUCT_HTTP_FLAG_WAITINGFORTASK = 1, | 20 | STRUCT_HTTP_FLAG_WAITINGFORTASK = 1, |
| @@ -8,6 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #include <stdint.h> | 9 | #include <stdint.h> |
| 10 | 10 | ||
| 11 | #include "trackerlogic.h" | ||
| 12 | |||
| 11 | void udp_init(int64_t sock, unsigned int worker_count); | 13 | void udp_init(int64_t sock, unsigned int worker_count); |
| 12 | void udp_kickoff(void); | 14 | void udp_kickoff(void); |
| 13 | int handle_udp6(int64_t serversocket, struct ot_workstruct *ws); | 15 | int 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 | |||
| 24 | void *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); | 29 | void *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); |
| 25 | void *vector_find_or_insert(ot_vector *vector, void *key, size_t member_size, size_t compare_size, int *exactmatch); | 30 | void *vector_find_or_insert(ot_vector *vector, void *key, size_t member_size, size_t compare_size, int *exactmatch); |
| 26 | ot_peer *vector_find_or_insert_peer(ot_vector *vector, ot_peer const *peer, size_t peer_size, int *exactmatch); | 31 | ot_peer *vector_find_or_insert_peer(ot_vector *vector, ot_peer const *peer, size_t peer_size, int *exactmatch); |
