aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
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/mesh
parent27ef03e590f6a5729eb6cf7a93829876b562cbcd (diff)
downloadgnunet-76dcc3351564146f788e8a354cb3c42025db21cc.tar.gz
gnunet-76dcc3351564146f788e8a354cb3c42025db21cc.zip
WiP
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/mesh.h19
-rw-r--r--src/mesh/mesh_api_new.c3
2 files changed, 20 insertions, 2 deletions
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 @@
39 * 39 *
40 * API CALL (GNUNET_MESH_*) MESSAGE USED 40 * API CALL (GNUNET_MESH_*) MESSAGE USED
41 * ------------------------ ------------ 41 * ------------------------ ------------
42 * connect None (Header + [types]) 42 * connect GNUNET_MESH_ClientConnect
43 * disconnect None (network level disconnect) 43 * disconnect None (network level disconnect)
44 * 44 *
45 * tunnel_create GNUNET_MESH_TunnelMessage 45 * tunnel_create GNUNET_MESH_TunnelMessage
@@ -65,6 +65,23 @@
65 */ 65 */
66 66
67/** 67/**
68 * Message for a client to register to the service
69 */
70struct GNUNET_MESH_ClientConnect {
71 /**
72 * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT
73 *
74 * Size: sizeof(struct GNUNET_MESH_ClientConnect) +
75 * sizeof(uint16_t) * types +
76 * sizeof(MESH_ApplicationType) * applications
77 */
78 struct GNUNET_MessageHeader header;
79 uint16_t types;
80 uint16_t applications;
81};
82
83
84/**
68 * Type for tunnel numbering. 85 * Type for tunnel numbering.
69 * - Local tunnel numbers are >= 0x80000000 86 * - Local tunnel numbers are >= 0x80000000
70 * - Global tunnel numbers are < 0x80000000 87 * - 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 {
72 * note that the mesh is allowed to drop notifications about 72 * note that the mesh is allowed to drop notifications about
73 * inbound messages if the client does not process them fast 73 * inbound messages if the client does not process them fast
74 * enough (for this notification type, a bounded queue is used) 74 * enough (for this notification type, a bounded queue is used)
75 * @param stypes Application Types the client claims to offer
75 * @return handle to the mesh service 76 * @return handle to the mesh service
76 * NULL on error (in this case, init is never called) 77 * NULL on error (in this case, init is never called)
77 */ 78 */
@@ -79,7 +80,7 @@ struct GNUNET_MESH_Handle *
79GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, 80GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
80 void *cls, 81 void *cls,
81 GNUNET_MESH_TunnelEndHandler cleaner, 82 GNUNET_MESH_TunnelEndHandler cleaner,
82 const struct GNUNET_MESH_MessageHandler *handlers, 83 const struct GNUNET_MESH_MessageHandler *handlers,
83 const GNUNET_MESH_ApplicationType *stypes) { 84 const GNUNET_MESH_ApplicationType *stypes) {
84 GNUNET_MESH_Handle *h; 85 GNUNET_MESH_Handle *h;
85 struct GNUNET_MESH_MessageHandler *aux; 86 struct GNUNET_MESH_MessageHandler *aux;