diff options
Diffstat (limited to 'src/include/gnunet_mesh_service_new.h')
-rw-r--r-- | src/include/gnunet_mesh_service_new.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index f32bf28c5..6db406de3 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h | |||
@@ -116,11 +116,16 @@ struct GNUNET_MESH_MessageHandler | |||
116 | * @return initial tunnel context for the tunnel | 116 | * @return initial tunnel context for the tunnel |
117 | * (can be NULL -- that's not an error) | 117 | * (can be NULL -- that's not an error) |
118 | */ | 118 | */ |
119 | typedef void* (GNUNET_MESH_InboundTunnelNotificationHandler) ( | 119 | typedef void *(GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, |
120 | void *cls, | 120 | struct |
121 | struct GNUNET_MESH_Tunnel * tunnel, | 121 | GNUNET_MESH_Tunnel |
122 | const struct GNUNET_PeerIdentity * initiator, | 122 | * tunnel, |
123 | const struct GNUNET_TRANSPORT_ATS_Information * atsi); | 123 | const struct |
124 | GNUNET_PeerIdentity | ||
125 | * initiator, | ||
126 | const struct | ||
127 | GNUNET_TRANSPORT_ATS_Information | ||
128 | * atsi); | ||
124 | 129 | ||
125 | 130 | ||
126 | /** | 131 | /** |
@@ -164,8 +169,7 @@ typedef uint32_t GNUNET_MESH_ApplicationType; | |||
164 | */ | 169 | */ |
165 | struct GNUNET_MESH_Handle * | 170 | struct GNUNET_MESH_Handle * |
166 | GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 171 | GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
167 | unsigned int queue_size, | 172 | unsigned int queue_size, void *cls, |
168 | void *cls, | ||
169 | GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel, | 173 | GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel, |
170 | GNUNET_MESH_TunnelEndHandler cleaner, | 174 | GNUNET_MESH_TunnelEndHandler cleaner, |
171 | const struct GNUNET_MESH_MessageHandler *handlers, | 175 | const struct GNUNET_MESH_MessageHandler *handlers, |
@@ -187,9 +191,9 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle); | |||
187 | * @param cls closure | 191 | * @param cls closure |
188 | * @param peer peer identity the tunnel stopped working with | 192 | * @param peer peer identity the tunnel stopped working with |
189 | */ | 193 | */ |
190 | typedef void (*GNUNET_MESH_PeerDisconnectHandler) ( | 194 | typedef void (*GNUNET_MESH_PeerDisconnectHandler) (void *cls, |
191 | void *cls, | 195 | const struct |
192 | const struct GNUNET_PeerIdentity * peer); | 196 | GNUNET_PeerIdentity * peer); |
193 | 197 | ||
194 | 198 | ||
195 | /** | 199 | /** |
@@ -200,10 +204,12 @@ typedef void (*GNUNET_MESH_PeerDisconnectHandler) ( | |||
200 | * @param peer peer identity the tunnel was created to, NULL on timeout | 204 | * @param peer peer identity the tunnel was created to, NULL on timeout |
201 | * @param atsi performance data for the connection | 205 | * @param atsi performance data for the connection |
202 | */ | 206 | */ |
203 | typedef void (*GNUNET_MESH_PeerConnectHandler) ( | 207 | typedef void (*GNUNET_MESH_PeerConnectHandler) (void *cls, |
204 | void *cls, | 208 | const struct GNUNET_PeerIdentity |
205 | const struct GNUNET_PeerIdentity * peer, | 209 | * peer, |
206 | const struct GNUNET_TRANSPORT_ATS_Information * atsi); | 210 | const struct |
211 | GNUNET_TRANSPORT_ATS_Information | ||
212 | * atsi); | ||
207 | 213 | ||
208 | 214 | ||
209 | 215 | ||
@@ -218,8 +224,7 @@ typedef void (*GNUNET_MESH_PeerConnectHandler) ( | |||
218 | * @param handler_cls closure for connect/disconnect handlers | 224 | * @param handler_cls closure for connect/disconnect handlers |
219 | */ | 225 | */ |
220 | struct GNUNET_MESH_Tunnel * | 226 | struct GNUNET_MESH_Tunnel * |
221 | GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, | 227 | GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, void *tunnel_ctx, |
222 | void *tunnel_ctx, | ||
223 | GNUNET_MESH_PeerConnectHandler connect_handler, | 228 | GNUNET_MESH_PeerConnectHandler connect_handler, |
224 | GNUNET_MESH_PeerDisconnectHandler disconnect_handler, | 229 | GNUNET_MESH_PeerDisconnectHandler disconnect_handler, |
225 | void *handler_cls); | 230 | void *handler_cls); |
@@ -297,8 +302,7 @@ struct GNUNET_MESH_TransmitHandle; | |||
297 | * memory); if NULL is returned, "notify" will NOT be called. | 302 | * memory); if NULL is returned, "notify" will NOT be called. |
298 | */ | 303 | */ |
299 | struct GNUNET_MESH_TransmitHandle * | 304 | struct GNUNET_MESH_TransmitHandle * |
300 | GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, | 305 | GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork, |
301 | int cork, | ||
302 | uint32_t priority, | 306 | uint32_t priority, |
303 | struct GNUNET_TIME_Relative maxdelay, | 307 | struct GNUNET_TIME_Relative maxdelay, |
304 | const struct GNUNET_PeerIdentity *target, | 308 | const struct GNUNET_PeerIdentity *target, |