* 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)
*/
*
* 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
* 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)
*/
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;