diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_mesh_service.h | 1 | ||||
-rw-r--r-- | src/mesh/mesh.h | 19 | ||||
-rw-r--r-- | src/mesh/mesh_api_new.c | 3 |
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; | |||
131 | * note that the mesh is allowed to drop notifications about inbound | 131 | * note that the mesh is allowed to drop notifications about inbound |
132 | * messages if the client does not process them fast enough (for this | 132 | * messages if the client does not process them fast enough (for this |
133 | * notification type, a bounded queue is used) | 133 | * notification type, a bounded queue is used) |
134 | * @param stypes Application Types the client claims to offer | ||
134 | * @return handle to the mesh service | 135 | * @return handle to the mesh service |
135 | * NULL on error (in this case, init is never called) | 136 | * NULL on error (in this case, init is never called) |
136 | */ | 137 | */ |
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 | */ | ||
70 | struct 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 * | |||
79 | GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 80 | GNUNET_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; |