gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32849 - in gnunet/src: include mesh


From: gnunet
Subject: [GNUnet-SVN] r32849 - in gnunet/src: include mesh
Date: Tue, 1 Apr 2014 02:16:13 +0200

Author: bartpolot
Date: 2014-04-01 02:16:13 +0200 (Tue, 01 Apr 2014)
New Revision: 32849

Modified:
   gnunet/src/include/gnunet_mesh_service.h
   gnunet/src/mesh/mesh.h
Log:
- move mesh hash to public api

Modified: gnunet/src/include/gnunet_mesh_service.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service.h    2014-04-01 00:16:10 UTC (rev 
32848)
+++ gnunet/src/include/gnunet_mesh_service.h    2014-04-01 00:16:13 UTC (rev 
32849)
@@ -54,6 +54,15 @@
  */
 struct GNUNET_MESH_Channel;
 
+/**
+ * Hash to be used in Mesh communication. Only 256 bits needed,
+ * instead of the 512 from @c GNUNET_HashCode.
+ *
+ */
+struct GNUNET_MeshHash
+{
+  unsigned char bits[256 / 8];
+};
 
 /**
  * Channel options.
@@ -442,7 +451,7 @@
                                       unsigned int n_channels,
                                       unsigned int n_connections,
                                       uint32_t *channels,
-                                      struct GNUNET_HashCode *connections,
+                                      struct GNUNET_MeshHash *connections,
                                       unsigned int estate,
                                       unsigned int cstate);
 

Modified: gnunet/src/mesh/mesh.h
===================================================================
--- gnunet/src/mesh/mesh.h      2014-04-01 00:16:10 UTC (rev 32848)
+++ gnunet/src/mesh/mesh.h      2014-04-01 00:16:13 UTC (rev 32849)
@@ -90,17 +90,6 @@
 
 
 /**
- * Hash to be used in Mesh communication. Only 256 bits needed,
- * instead of the 512 from @c GNUNET_HashCode.
- *
- */
-struct GNUNET_MeshHash
-{
-  unsigned char bits[256 / 8];
-};
-
-
-/**
  * Message for a client to create and destroy channels.
  */
 struct GNUNET_MESH_ChannelMessage
@@ -333,6 +322,13 @@
 GM_h2hc (const struct GNUNET_MeshHash *id);
 
 /**
+ * Get a string from a Mesh Hash (256 bits).
+ * WARNING: Not reentrant (based on GNUNET_h2s).
+ */
+const char *
+GM_h2s (const struct GNUNET_MeshHash *id);
+
+/**
  * Convert a message type into a string to help debug
  * Generated with:
  * FIND:        "#define ([^ ]+)[ ]*([0-9]+)"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]