diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-01-06 05:22:01 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-01-06 05:22:01 +0000 |
commit | 2c132496d485c83553e9643e510aacaafff2dcc8 (patch) | |
tree | c46616683d64bcffb80b1d1eabba0628082231d8 /src | |
parent | 0ccd26a719e7f197ccfb053b9517162f51c9da2c (diff) | |
download | gnunet-2c132496d485c83553e9643e510aacaafff2dcc8.tar.gz gnunet-2c132496d485c83553e9643e510aacaafff2dcc8.zip |
- missing headers, removed message types
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_mesh_service.h | 89 | ||||
-rw-r--r-- | src/include/gnunet_protocols.h | 5 |
2 files changed, 77 insertions, 17 deletions
diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h index b99c724b9..97dc4619f 100644 --- a/src/include/gnunet_mesh_service.h +++ b/src/include/gnunet_mesh_service.h | |||
@@ -393,13 +393,24 @@ typedef void (*GNUNET_MESH_ChannelCB) (void *cls, | |||
393 | 393 | ||
394 | 394 | ||
395 | /** | 395 | /** |
396 | * Method called to retrieve information about all tunnels in MESH. | 396 | * Method called to retrieve information about all tunnels in MESH, called |
397 | * once per tunnel. | ||
398 | * | ||
399 | * After last tunnel has been reported, an additional call with NULL is done. | ||
397 | * | 400 | * |
398 | * @param cls Closure. | 401 | * @param cls Closure. |
399 | * @param peer Peer in the channel's tree. | 402 | * @param peer Destination peer, or NULL on "EOF". |
403 | * @param channels Number of channels. | ||
404 | * @param connections Number of connections. | ||
405 | * @param estate Encryption state. | ||
406 | * @param cstate Connectivity state. | ||
400 | */ | 407 | */ |
401 | typedef void (*GNUNET_MESH_TunnelsCB) (void *cls, | 408 | typedef void (*GNUNET_MESH_TunnelsCB) (void *cls, |
402 | const struct GNUNET_PeerIdentity *peer); | 409 | const struct GNUNET_PeerIdentity *peer, |
410 | unsigned int channels, | ||
411 | unsigned int connections, | ||
412 | uint16_t estate, | ||
413 | uint16_t cstate); | ||
403 | 414 | ||
404 | 415 | ||
405 | 416 | ||
@@ -408,15 +419,18 @@ typedef void (*GNUNET_MESH_TunnelsCB) (void *cls, | |||
408 | * has established, o`r is trying to establish. | 419 | * has established, o`r is trying to establish. |
409 | * | 420 | * |
410 | * @param cls Closure. | 421 | * @param cls Closure. |
411 | * @param peer Peer in the channel's tree. | 422 | * @param peer Peer towards whom the tunnel is directed. |
423 | * @param channels Number of channels. | ||
424 | * @param connections Number of connections. | ||
425 | * @param estate Encryption state. | ||
426 | * @param cstate Connectivity state. | ||
412 | */ | 427 | */ |
413 | typedef void (*GNUNET_MESH_TunnelCB) (void *cls, | 428 | typedef void (*GNUNET_MESH_TunnelCB) (void *cls, |
414 | const struct GNUNET_PeerIdentity *peer, | 429 | const struct GNUNET_PeerIdentity *peer, |
415 | unsigned int channels, | 430 | unsigned int channels, |
416 | unsigned int connections, | 431 | unsigned int connections, |
417 | unsigned int estatus, | 432 | unsigned int estate, |
418 | unsigned int cstatus | 433 | unsigned int cstate); |
419 | ); | ||
420 | 434 | ||
421 | 435 | ||
422 | /** | 436 | /** |
@@ -436,8 +450,8 @@ typedef void (*GNUNET_MESH_TunnelCB) (void *cls, | |||
436 | */ | 450 | */ |
437 | void | 451 | void |
438 | GNUNET_MESH_get_channels (struct GNUNET_MESH_Handle *h, | 452 | GNUNET_MESH_get_channels (struct GNUNET_MESH_Handle *h, |
439 | GNUNET_MESH_ChannelsCB callback, | 453 | GNUNET_MESH_ChannelsCB callback, |
440 | void *callback_cls); | 454 | void *callback_cls); |
441 | 455 | ||
442 | 456 | ||
443 | /** | 457 | /** |
@@ -446,14 +460,14 @@ GNUNET_MESH_get_channels (struct GNUNET_MESH_Handle *h, | |||
446 | * WARNING: unstable API, likely to change in the future! | 460 | * WARNING: unstable API, likely to change in the future! |
447 | * | 461 | * |
448 | * @param h Handle to the mesh peer. | 462 | * @param h Handle to the mesh peer. |
449 | * @param initiator ID of the owner of the channel. | 463 | * @param peer ID of the other end of the channel. |
450 | * @param channel_number Channel number. | 464 | * @param channel_number Channel number. |
451 | * @param callback Function to call with the requested data. | 465 | * @param callback Function to call with the requested data. |
452 | * @param callback_cls Closure for @c callback. | 466 | * @param callback_cls Closure for @c callback. |
453 | */ | 467 | */ |
454 | void | 468 | void |
455 | GNUNET_MESH_show_channel (struct GNUNET_MESH_Handle *h, | 469 | GNUNET_MESH_get_channel (struct GNUNET_MESH_Handle *h, |
456 | struct GNUNET_PeerIdentity *initiator, | 470 | struct GNUNET_PeerIdentity *peer, |
457 | uint32_t channel_number, | 471 | uint32_t channel_number, |
458 | GNUNET_MESH_ChannelCB callback, | 472 | GNUNET_MESH_ChannelCB callback, |
459 | void *callback_cls); | 473 | void *callback_cls); |
@@ -473,6 +487,57 @@ GNUNET_MESH_get_channels_cancel (struct GNUNET_MESH_Handle *h); | |||
473 | 487 | ||
474 | 488 | ||
475 | /** | 489 | /** |
490 | * Request information about the running mesh peer. | ||
491 | * The callback will be called for every channel known to the service, | ||
492 | * listing all active peers that blong to the channel. | ||
493 | * | ||
494 | * If called again on the same handle, it will overwrite the previous | ||
495 | * callback and cls. To retrieve the cls, monitor_cancel must be | ||
496 | * called first. | ||
497 | * | ||
498 | * WARNING: unstable API, likely to change in the future! | ||
499 | * | ||
500 | * @param h Handle to the mesh peer. | ||
501 | * @param callback Function to call with the requested data. | ||
502 | * @param callback_cls Closure for @c callback. | ||
503 | */ | ||
504 | void | ||
505 | GNUNET_MESH_get_tunnels (struct GNUNET_MESH_Handle *h, | ||
506 | GNUNET_MESH_TunnelsCB callback, | ||
507 | void *callback_cls); | ||
508 | |||
509 | /** | ||
510 | * Cancel a monitor request. The monitor callback will not be called. | ||
511 | * | ||
512 | * @param h Mesh handle. | ||
513 | * | ||
514 | * @return Closure given to GNUNET_MESH_monitor, if any. | ||
515 | */ | ||
516 | void * | ||
517 | GNUNET_MESH_get_tunnels_cancel (struct GNUNET_MESH_Handle *h); | ||
518 | |||
519 | /** | ||
520 | * Request information about the running mesh peer. | ||
521 | * The callback will be called for every channel known to the service, | ||
522 | * listing all active peers that blong to the channel. | ||
523 | * | ||
524 | * If called again on the same handle, it will overwrite the previous | ||
525 | * callback and cls. To retrieve the cls, monitor_cancel must be | ||
526 | * called first. | ||
527 | * | ||
528 | * WARNING: unstable API, likely to change in the future! | ||
529 | * | ||
530 | * @param h Handle to the mesh peer. | ||
531 | * @param callback Function to call with the requested data. | ||
532 | * @param callback_cls Closure for @c callback. | ||
533 | */ | ||
534 | void | ||
535 | GNUNET_MESH_get_tunnel (struct GNUNET_MESH_Handle *h, | ||
536 | const struct GNUNET_PeerIdentity *id, | ||
537 | GNUNET_MESH_TunnelCB callback, | ||
538 | void *callback_cls); | ||
539 | |||
540 | /** | ||
476 | * Create a message queue for a mesh channel. | 541 | * Create a message queue for a mesh channel. |
477 | * The message queue can only be used to transmit messages, | 542 | * The message queue can only be used to transmit messages, |
478 | * not to receive them. | 543 | * not to receive them. |
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 2470b3ab1..e2923b971 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -894,11 +894,6 @@ extern "C" | |||
894 | #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK 286 | 894 | #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK 286 |
895 | 895 | ||
896 | /** | 896 | /** |
897 | * Local NACK for rejected channels. | ||
898 | */ | ||
899 | #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_NACK 287 | ||
900 | |||
901 | /** | ||
902 | * Local information about all channels of service. | 897 | * Local information about all channels of service. |
903 | */ | 898 | */ |
904 | #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_CHANNELS 290 | 899 | #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_CHANNELS 290 |