From cef0009520797f29eefb74e68a0020e4cdb3d5a8 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 2 Oct 2015 03:37:50 +0000 Subject: - added hexdump-like function to write binary data to log --- src/cadet/cadet.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/cadet/cadet.h') diff --git a/src/cadet/cadet.h b/src/cadet/cadet.h index 83b91ab5a..3c729e22c 100644 --- a/src/cadet/cadet.h +++ b/src/cadet/cadet.h @@ -328,6 +328,19 @@ GC_h2hc (const struct GNUNET_CADET_Hash *id); const char * GC_h2s (const struct GNUNET_CADET_Hash *id); + +/** + * Allocate a string with a hexdump of any binary data. + * + * @param bin Arbitrary binary data. + * @param len Length of @a bin in bytes. + * @param output Where to write the output (if *output be NULL it's allocated). + * + * @return The size of the output. + */ +size_t +GC_bin2s (void *bin, unsigned int len, char **output); + /** * Convert a message type into a string to help debug * Generated with: -- cgit v1.2.3