summaryrefslogtreecommitdiff
path: root/core/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/util.c')
-rw-r--r--core/util.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/util.c b/core/util.c
index 4ce9271e..d201bcb4 100644
--- a/core/util.c
+++ b/core/util.c
@@ -9,7 +9,8 @@
9#include <stdint.h> 9#include <stdint.h>
10#include <stdbool.h> 10#include <stdbool.h>
11 11
12#include "network.h" 12#include "DHT.h"
13#include "packets.h"
13 14
14uint64_t now() 15uint64_t now()
15{ 16{
@@ -32,3 +33,13 @@ bool ipp_eq(IP_Port a, IP_Port b)
32{ 33{
33 return (a.ip.i == b.ip.i) && (a.port == b.port); 34 return (a.ip.i == b.ip.i) && (a.port == b.port);
34} 35}
36
37bool id_eq(clientid_t* dest, clientid_t* src)
38{
39 return memcmp(dest, src, sizeof(clientid_t)) == 0;
40}
41
42void id_cpy(clientid_t* dest, clientid_t* src)
43{
44 memcpy(dest, src, sizeof(clientid_t));
45}