aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r--src/include/gnunet_common.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 0fca53b7f..66d0b8ac3 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
@@ -495,7 +507,6 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
495#define GNUNET_log_from(kind, comp, ...) \ 507#define GNUNET_log_from(kind, comp, ...) \
496 do \ 508 do \
497 { \ 509 { \
498 int log_line = __LINE__; \
499 static int log_call_enabled = GNUNET_LOG_CALL_STATUS; \ 510 static int log_call_enabled = GNUNET_LOG_CALL_STATUS; \
500 if ((GNUNET_EXTRA_LOGGING > 0) || \ 511 if ((GNUNET_EXTRA_LOGGING > 0) || \
501 ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ 512 ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \
@@ -506,7 +517,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
506 (comp), \ 517 (comp), \
507 __FILE__, \ 518 __FILE__, \
508 __FUNCTION__, \ 519 __FUNCTION__, \
509 log_line); \ 520 __LINE__); \
510 if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ 521 if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \
511 { \ 522 { \
512 GNUNET_log_skip (-1, GNUNET_NO); \ 523 GNUNET_log_skip (-1, GNUNET_NO); \
@@ -522,7 +533,6 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
522#define GNUNET_log(kind, ...) \ 533#define GNUNET_log(kind, ...) \
523 do \ 534 do \
524 { \ 535 { \
525 int log_line = __LINE__; \
526 static int log_call_enabled = GNUNET_LOG_CALL_STATUS; \ 536 static int log_call_enabled = GNUNET_LOG_CALL_STATUS; \
527 if ((GNUNET_EXTRA_LOGGING > 0) || \ 537 if ((GNUNET_EXTRA_LOGGING > 0) || \
528 ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \ 538 ((GNUNET_ERROR_TYPE_DEBUG & (kind)) == 0)) \
@@ -533,7 +543,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind,
533 NULL, \ 543 NULL, \
534 __FILE__, \ 544 __FILE__, \
535 __FUNCTION__, \ 545 __FUNCTION__, \
536 log_line); \ 546 __LINE__); \
537 if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \ 547 if (GN_UNLIKELY (GNUNET_get_log_skip () > 0)) \
538 { \ 548 { \
539 GNUNET_log_skip (-1, GNUNET_NO); \ 549 GNUNET_log_skip (-1, GNUNET_NO); \
@@ -655,6 +665,19 @@ GNUNET_sh2s (const struct GNUNET_ShortHashCode *shc);
655 665
656/** 666/**
657 * @ingroup logging 667 * @ingroup logging
668 * Convert a UUID to a string (for printing debug messages).
669 * This is one of the very few calls in the entire API that is
670 * NOT reentrant!
671 *
672 * @param uuid the UUID
673 * @return string
674 */
675const char *
676GNUNET_uuid2s (const struct GNUNET_Uuid *uuid);
677
678
679/**
680 * @ingroup logging
658 * Convert a hash value to a string (for printing debug messages). 681 * 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 682 * This is one of the very few calls in the entire API that is
660 * NOT reentrant! 683 * NOT reentrant!