summaryrefslogtreecommitdiff
path: root/toxcore/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/util.h')
-rw-r--r--toxcore/util.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/toxcore/util.h b/toxcore/util.h
index 00482862..6937f7d4 100644
--- a/toxcore/util.h
+++ b/toxcore/util.h
@@ -8,9 +8,11 @@
8#ifndef __UTIL_H__ 8#ifndef __UTIL_H__
9#define __UTIL_H__ 9#define __UTIL_H__
10 10
11#include <stdbool.h>
12#include <stdint.h>
13
11uint64_t now(); 14uint64_t now();
12uint64_t random_64b(); 15uint64_t random_64b();
13bool ipp_eq(IP_Port a, IP_Port b);
14bool id_eq(uint8_t *dest, uint8_t *src); 16bool id_eq(uint8_t *dest, uint8_t *src);
15void id_cpy(uint8_t *dest, uint8_t *src); 17void id_cpy(uint8_t *dest, uint8_t *src);
16 18
@@ -18,4 +20,13 @@ typedef int (*load_state_callback_func)(void *outer, uint8_t *data, uint32_t len
18int load_state(load_state_callback_func load_state_callback, void *outer, 20int load_state(load_state_callback_func load_state_callback, void *outer,
19 uint8_t *data, uint32_t length, uint16_t cookie_inner); 21 uint8_t *data, uint32_t length, uint16_t cookie_inner);
20 22
23#undef LOGGING
24/* #define LOGGING */
25#ifdef LOGGING
26extern char logbuffer[512];
27void loginit(uint16_t port);
28void loglog(char *text);
29void logexit();
30#endif
31
21#endif /* __UTIL_H__ */ 32#endif /* __UTIL_H__ */