From ab8ee0b24335790e49127b1330f9d7bcca7f6bfa Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 16 Aug 2023 18:15:14 +0200 Subject: include: Revise printing hashes The code was a bit convoluted to print hashes as hex strings. Renamed to HASH_FMT32 and HASH_VAL32 to make clear we are printing the first 32 bits only, and added options to print 64 up to 512 bits as well. This doesn't depend on endianness anymore. Adds a small test for the hash (printing) functions. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/dir/dht.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ipcpd/unicast/dir/dht.c') diff --git a/src/ipcpd/unicast/dir/dht.c b/src/ipcpd/unicast/dir/dht.c index e97d5c5f..adc6feb2 100644 --- a/src/ipcpd/unicast/dir/dht.c +++ b/src/ipcpd/unicast/dir/dht.c @@ -31,6 +31,7 @@ #define DHT "dht" #define OUROBOROS_PREFIX DHT +#include #include #include #include -- cgit v1.2.3