summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-05-05 22:21:31 +0000
committerBart Polot <bart@net.in.tum.de>2011-05-05 22:21:31 +0000
commit76dcc3351564146f788e8a354cb3c42025db21cc (patch)
treece4c838359e568ae511a843b7a9d9dae77564f08 /src
parent27ef03e590f6a5729eb6cf7a93829876b562cbcd (diff)
WiP
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_mesh_service.h1
-rw-r--r--src/mesh/mesh.h19
-rw-r--r--src/mesh/mesh_api_new.c3
3 files changed, 21 insertions, 2 deletions
diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h
index 2835d0abd..2a288a3a5 100644
--- a/src/include/gnunet_mesh_service.h
+++ b/src/include/gnunet_mesh_service.h
@@ -131,6 +131,7 @@ typedef uint32_t GNUNET_MESH_ApplicationType;
* note that the mesh is allowed to drop notifications about inbound
* messages if the client does not process them fast enough (for this
* notification type, a bounded queue is used)
+ * @param stypes Application Types the client claims to offer
* @return handle to the mesh service
* NULL on error (in this case, init is never called)
*/
diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h
index c40f08325..dc90f781a 100644
--- a/src/mesh/mesh.h
+++ b/src/mesh/mesh.h
@@ -39,7 +39,7 @@
*
* API CALL (GNUNET_MESH_*) MESSAGE USED
* ------------------------ ------------
- * connect None (Header + [types])
+ * connect GNUNET_MESH_ClientConnect
* disconnect None (network level disconnect)
*
* tunnel_create GNUNET_MESH_TunnelMessage
@@ -65,6 +65,23 @@
*/
/**
+ * Message for a client to register to the service
+ */
+struct GNUNET_MESH_ClientConnect {
+ /**
+ * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT
+ *
+ * Size: sizeof(struct GNUNET_MESH_ClientConnect) +
+ * sizeof(uint16_t) * types +
+ * sizeof(MESH_ApplicationType) * applications
+ */
+ struct GNUNET_MessageHeader header;
+ uint16_t types;
+ uint16_t applications;
+};
+
+
+/**
* Type for tunnel numbering.
* - Local tunnel numbers are >= 0x80000000
* - Global tunnel numbers are < 0x80000000
diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c
index 5cb50b0d1..f63b0a221 100644
--- a/src/mesh/mesh_api_new.c
+++ b/src/mesh/mesh_api_new.c
@@ -72,6 +72,7 @@ struct GNUNET_MESH_Tunnel {
* note that the mesh is allowed to drop notifications about
* inbound messages if the client does not process them fast
* enough (for this notification type, a bounded queue is used)
+ * @param stypes Application Types the client claims to offer
* @return handle to the mesh service
* NULL on error (in this case, init is never called)
*/
@@ -79,7 +80,7 @@ struct GNUNET_MESH_Handle *
GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
void *cls,
GNUNET_MESH_TunnelEndHandler cleaner,
- const struct GNUNET_MESH_MessageHandler *handlers,
+ const struct GNUNET_MESH_MessageHandler *handlers,
const GNUNET_MESH_ApplicationType *stypes) {
GNUNET_MESH_Handle *h;
struct GNUNET_MESH_MessageHandler *aux;