WiP
authorBart Polot <bart@net.in.tum.de>
Thu, 5 May 2011 22:21:31 +0000 (22:21 +0000)
committerBart Polot <bart@net.in.tum.de>
Thu, 5 May 2011 22:21:31 +0000 (22:21 +0000)
src/include/gnunet_mesh_service.h
src/mesh/mesh.h
src/mesh/mesh_api_new.c

index 2835d0abd7a71b40e1a87fa111bd05cff868e016..2a288a3a570e2a6349737a6f9499ffd3fc27d429 100644 (file)
@@ -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)
  */
index c40f08325cded7c5009ac2eaa2c9bb412ec95f97..dc90f781a65f747c70b6a236860df0b3f6929d1a 100644 (file)
@@ -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
  * peer disconnects from a tunnel       GNUNET_MESH_PeerControl
  */
 
+/**
+ * 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
index 5cb50b0d11b04b40ac808b693a16d6b624c2d43e..f63b0a221c90d1f8b74f4911c4ed89de10b874fc 100644 (file)
@@ -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;