diff options
author | Coren[m] <Break@Ocean> | 2013-09-10 20:55:05 +0200 |
---|---|---|
committer | Coren[m] <Break@Ocean> | 2013-09-10 20:55:05 +0200 |
commit | 3ae7460853b6777e18f213b316d43cef6c5a603e (patch) | |
tree | f18cc1d542ded6b073ec5dc8b57bc9953a246ca8 /toxcore/util.h | |
parent | f267266bf611570c6e79dfb800e97396151ff870 (diff) |
util.*:
- added logging functions, default off
tox.h:
- added includes for sockaddr_in/6
network.c:
- added logging functions, default off (#define in util.h)
- IPv6: activating site-local all-nodes multicast address (i.e. IPv6 equivalent of broadcast)
Diffstat (limited to 'toxcore/util.h')
-rw-r--r-- | toxcore/util.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/toxcore/util.h b/toxcore/util.h index 7dea3eac..20731a05 100644 --- a/toxcore/util.h +++ b/toxcore/util.h | |||
@@ -5,7 +5,24 @@ | |||
5 | * Copyright 2013 plutooo | 5 | * Copyright 2013 plutooo |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef __UTIL_H__ | ||
9 | #define __UTIL_H__ | ||
10 | |||
11 | #include <stdbool.h> | ||
12 | #include <stdint.h> | ||
13 | |||
8 | uint64_t now(); | 14 | uint64_t now(); |
9 | uint64_t random_64b(); | 15 | uint64_t random_64b(); |
10 | bool id_eq(uint8_t *dest, uint8_t *src); | 16 | bool id_eq(uint8_t *dest, uint8_t *src); |
11 | void id_cpy(uint8_t *dest, uint8_t *src); | 17 | void id_cpy(uint8_t *dest, uint8_t *src); |
18 | |||
19 | #undef LOGGING | ||
20 | // #define LOGGING | ||
21 | #ifdef LOGGING | ||
22 | extern char logbuffer[512]; | ||
23 | void loginit(uint16_t port); | ||
24 | void loglog(char *text); | ||
25 | void logexit(); | ||
26 | #endif | ||
27 | |||
28 | #endif /* __UTIL_H__ */ | ||