/*
This file is part of GNUnet.
- (C) 2001 - 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2001 - 2011 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
* @return String representing FWD or BCK.
*/
char *
-GM_f2s (int fwd);
+GC_f2s (int fwd);
/**
* @return True if bigger (arg1) has a higher value than smaller (arg 2).
*/
int
-GM_is_pid_bigger (uint32_t bigger, uint32_t smaller);
+GC_is_pid_bigger (uint32_t bigger, uint32_t smaller);
/**
* @return Highest ACK value from the two.
*/
uint32_t
-GM_max_pid (uint32_t a, uint32_t b);
+GC_max_pid (uint32_t a, uint32_t b);
/**
* @return Lowest ACK value from the two.
*/
uint32_t
-GM_min_pid (uint32_t a, uint32_t b);
+GC_min_pid (uint32_t a, uint32_t b);
/**
* @return A HashCode containing the original 256 bit hash right-padded with 0.
*/
const struct GNUNET_HashCode *
-GM_h2hc (const struct GNUNET_CADET_Hash *id);
+GC_h2hc (const struct GNUNET_CADET_Hash *id);
/**
* Get a string from a Cadet Hash (256 bits).
* WARNING: Not reentrant (based on GNUNET_h2s).
*/
const char *
-GM_h2s (const struct GNUNET_CADET_Hash *id);
+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
* @return Human readable string description.
*/
const char *
-GM_m2s (uint16_t m);
+GC_m2s (uint16_t m);
#if 0 /* keep Emacsens' auto-indent happy */
{