aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_common.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-18 10:30:08 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-18 10:30:08 +0200
commit9ae7f13f17e3d04d3ba88862299c8e42541eab47 (patch)
tree167259c402cd199bcbce49f14d6aae20f41425d8 /src/include/gnunet_common.h
parent93c332be89c4c65f10b7c4c49b6ed15d91b91884 (diff)
downloadgnunet-9ae7f13f17e3d04d3ba88862299c8e42541eab47.tar.gz
gnunet-9ae7f13f17e3d04d3ba88862299c8e42541eab47.zip
Introducing GNUNET_Uuid and matching hash map for 128 bit values.
TNG: reducing size of AcknowledgementUUIDPs from 256 bits to 128 bits.
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r--src/include/gnunet_common.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 0fca53b7f..6b48c81d8 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -273,6 +273,18 @@ struct GNUNET_ShortHashCode
273 273
274 274
275/** 275/**
276 * A UUID, a 128 bit random value.
277 */
278struct GNUNET_Uuid
279{
280 /**
281 * 128 random bits.
282 */
283 uint32_t value[4];
284};
285
286
287/**
276 * Header for all communications. 288 * Header for all communications.
277 */ 289 */
278struct GNUNET_MessageHeader 290struct GNUNET_MessageHeader
@@ -655,6 +667,19 @@ GNUNET_sh2s (const struct GNUNET_ShortHashCode *shc);
655 667
656/** 668/**
657 * @ingroup logging 669 * @ingroup logging
670 * Convert a UUID to a string (for printing debug messages).
671 * This is one of the very few calls in the entire API that is
672 * NOT reentrant!
673 *
674 * @param uuid the UUID
675 * @return string
676 */
677const char *
678GNUNET_uuid2s (const struct GNUNET_Uuid *uuid);
679
680
681/**
682 * @ingroup logging
658 * Convert a hash value to a string (for printing debug messages). 683 * Convert a hash value to a string (for printing debug messages).
659 * This is one of the very few calls in the entire API that is 684 * This is one of the very few calls in the entire API that is
660 * NOT reentrant! 685 * NOT reentrant!