summaryrefslogtreecommitdiff
path: root/toxcore/util.h
diff options
context:
space:
mode:
authorCoren[m] <Break@Ocean>2013-09-10 20:55:05 +0200
committerCoren[m] <Break@Ocean>2013-09-10 20:55:05 +0200
commit3ae7460853b6777e18f213b316d43cef6c5a603e (patch)
treef18cc1d542ded6b073ec5dc8b57bc9953a246ca8 /toxcore/util.h
parentf267266bf611570c6e79dfb800e97396151ff870 (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.h17
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
8uint64_t now(); 14uint64_t now();
9uint64_t random_64b(); 15uint64_t random_64b();
10bool id_eq(uint8_t *dest, uint8_t *src); 16bool id_eq(uint8_t *dest, uint8_t *src);
11void id_cpy(uint8_t *dest, uint8_t *src); 17void id_cpy(uint8_t *dest, uint8_t *src);
18
19#undef LOGGING
20// #define LOGGING
21#ifdef LOGGING
22extern char logbuffer[512];
23void loginit(uint16_t port);
24void loglog(char *text);
25void logexit();
26#endif
27
28#endif /* __UTIL_H__ */