From 99d9ecf74cab43ca6ae24ab5dd62a3b758b3e666 Mon Sep 17 00:00:00 2001 From: plutooo Date: Mon, 5 Aug 2013 15:04:38 -0700 Subject: core: Move send ping packets functions to ping.c --- core/util.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/util.c') diff --git a/core/util.c b/core/util.c index 6b40dad7..5b560171 100644 --- a/core/util.c +++ b/core/util.c @@ -9,7 +9,8 @@ #include #include -#include "network.h" +#include "DHT.h" +#include "packets.h" uint64_t now() { return time(NULL); @@ -29,3 +30,11 @@ uint64_t random_64b() { bool ipp_eq(IP_Port a, IP_Port b) { return (a.ip.i == b.ip.i) && (a.port == b.port); } + +bool id_eq(clientid_t* dest, clientid_t* src) { + return memcmp(dest, src, sizeof(clientid_t)) == 0; +} + +void id_cpy(clientid_t* dest, clientid_t* src) { + memcpy(dest, src, sizeof(clientid_t)); +} -- cgit v1.2.3