diff options
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.h')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.h | 69 |
1 files changed, 31 insertions, 38 deletions
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index c9485f23b..84165d8b7 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h | |||
@@ -140,8 +140,8 @@ typedef void (*GSF_ConnectedPeerIterator) (void *cls, | |||
140 | * @param buf where to copy the message, NULL on error (peer disconnect) | 140 | * @param buf where to copy the message, NULL on error (peer disconnect) |
141 | * @return number of bytes copied to 'buf', can be 0 (without indicating an error) | 141 | * @return number of bytes copied to 'buf', can be 0 (without indicating an error) |
142 | */ | 142 | */ |
143 | typedef size_t (*GSF_GetMessageCallback) (void *cls, | 143 | typedef size_t (*GSF_GetMessageCallback) (void *cls, size_t buf_size, |
144 | size_t buf_size, void *buf); | 144 | void *buf); |
145 | 145 | ||
146 | 146 | ||
147 | /** | 147 | /** |
@@ -225,10 +225,9 @@ void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth); | |||
225 | * @param request_time time at which the original query was transmitted | 225 | * @param request_time time at which the original query was transmitted |
226 | * @param request_priority priority of the original request | 226 | * @param request_priority priority of the original request |
227 | */ | 227 | */ |
228 | void | 228 | void GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, |
229 | GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, | 229 | struct GNUNET_TIME_Absolute request_time, |
230 | struct GNUNET_TIME_Absolute request_time, | 230 | uint32_t request_priority); |
231 | uint32_t request_priority); | ||
232 | 231 | ||
233 | 232 | ||
234 | /** | 233 | /** |
@@ -238,9 +237,9 @@ GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, | |||
238 | * @param cp responding peer (will be updated) | 237 | * @param cp responding peer (will be updated) |
239 | * @param initiator_client local client on responsible for query | 238 | * @param initiator_client local client on responsible for query |
240 | */ | 239 | */ |
241 | void | 240 | void GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, |
242 | GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, | 241 | struct GSF_LocalClient |
243 | struct GSF_LocalClient *initiator_client); | 242 | *initiator_client); |
244 | 243 | ||
245 | 244 | ||
246 | /** | 245 | /** |
@@ -250,10 +249,9 @@ GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, | |||
250 | * @param cp responding peer (will be updated) | 249 | * @param cp responding peer (will be updated) |
251 | * @param initiator_peer other peer responsible for query | 250 | * @param initiator_peer other peer responsible for query |
252 | */ | 251 | */ |
253 | void | 252 | void GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, |
254 | GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, | 253 | const struct GSF_ConnectedPeer |
255 | const struct GSF_ConnectedPeer | 254 | *initiator_peer); |
256 | *initiator_peer); | ||
257 | 255 | ||
258 | 256 | ||
259 | /** | 257 | /** |
@@ -267,13 +265,13 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, | |||
267 | * unless we see some further activity from it | 265 | * unless we see some further activity from it |
268 | * @param atsi status information | 266 | * @param atsi status information |
269 | */ | 267 | */ |
270 | void | 268 | void GSF_peer_status_handler_ (void *cls, |
271 | GSF_peer_status_handler_ (void *cls, | 269 | const struct GNUNET_PeerIdentity *peer, |
272 | const struct GNUNET_PeerIdentity *peer, | 270 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
273 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 271 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
274 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 272 | struct GNUNET_TIME_Absolute timeout, |
275 | struct GNUNET_TIME_Absolute timeout, | 273 | const struct GNUNET_TRANSPORT_ATS_Information |
276 | const struct GNUNET_TRANSPORT_ATS_Information *atsi); | 274 | *atsi); |
277 | 275 | ||
278 | 276 | ||
279 | /** | 277 | /** |
@@ -287,12 +285,11 @@ GSF_peer_status_handler_ (void *cls, | |||
287 | * @return GNUNET_OK to keep the connection open, | 285 | * @return GNUNET_OK to keep the connection open, |
288 | * GNUNET_SYSERR to close it (signal serious error) | 286 | * GNUNET_SYSERR to close it (signal serious error) |
289 | */ | 287 | */ |
290 | int | 288 | int GSF_handle_p2p_migration_stop_ (void *cls, |
291 | GSF_handle_p2p_migration_stop_ (void *cls, | 289 | const struct GNUNET_PeerIdentity *other, |
292 | const struct GNUNET_PeerIdentity *other, | 290 | const struct GNUNET_MessageHeader *message, |
293 | const struct GNUNET_MessageHeader *message, | 291 | const struct |
294 | const struct GNUNET_TRANSPORT_ATS_Information | 292 | GNUNET_TRANSPORT_ATS_Information *atsi); |
295 | *atsi); | ||
296 | 293 | ||
297 | 294 | ||
298 | /** | 295 | /** |
@@ -331,9 +328,8 @@ struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct | |||
331 | * @param cp peer to ask | 328 | * @param cp peer to ask |
332 | * @param block_time until when to block | 329 | * @param block_time until when to block |
333 | */ | 330 | */ |
334 | void | 331 | void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, |
335 | GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | 332 | struct GNUNET_TIME_Relative block_time); |
336 | struct GNUNET_TIME_Relative block_time); | ||
337 | 333 | ||
338 | 334 | ||
339 | /** | 335 | /** |
@@ -343,9 +339,8 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | |||
343 | * @param cls unused | 339 | * @param cls unused |
344 | * @param peer identity of peer that connected | 340 | * @param peer identity of peer that connected |
345 | */ | 341 | */ |
346 | void | 342 | void GSF_peer_disconnect_handler_ (void *cls, |
347 | GSF_peer_disconnect_handler_ (void *cls, | 343 | const struct GNUNET_PeerIdentity *peer); |
348 | const struct GNUNET_PeerIdentity *peer); | ||
349 | 344 | ||
350 | 345 | ||
351 | /** | 346 | /** |
@@ -366,9 +361,8 @@ void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc); | |||
366 | * @param cp peer to reserve bandwidth from | 361 | * @param cp peer to reserve bandwidth from |
367 | * @param pref preference change | 362 | * @param pref preference change |
368 | */ | 363 | */ |
369 | void | 364 | void GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, |
370 | GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, | 365 | uint64_t pref); |
371 | uint64_t pref); | ||
372 | 366 | ||
373 | 367 | ||
374 | /** | 368 | /** |
@@ -377,9 +371,8 @@ GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, | |||
377 | * @param cp peer to reserve bandwidth from | 371 | * @param cp peer to reserve bandwidth from |
378 | * @param id identity to set (written to) | 372 | * @param id identity to set (written to) |
379 | */ | 373 | */ |
380 | void | 374 | void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, |
381 | GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, | 375 | struct GNUNET_PeerIdentity *id); |
382 | struct GNUNET_PeerIdentity *id); | ||
383 | 376 | ||
384 | 377 | ||
385 | /** | 378 | /** |