diff options
-rw-r--r-- | src/include/gnunet_transport_service.h | 4 | ||||
-rw-r--r-- | src/transport/transport_api_monitoring.c | 25 |
2 files changed, 20 insertions, 9 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index a38a7ac69..8ff9f401e 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -608,6 +608,7 @@ GNUNET_TRANSPORT_p2s (enum GNUNET_TRANSPORT_PeerState state); | |||
608 | int | 608 | int |
609 | GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state); | 609 | GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state); |
610 | 610 | ||
611 | |||
611 | /** | 612 | /** |
612 | * Return information about a specific peer or all peers currently known to | 613 | * Return information about a specific peer or all peers currently known to |
613 | * transport service once or in monitoring mode. To obtain information about | 614 | * transport service once or in monitoring mode. To obtain information about |
@@ -623,6 +624,9 @@ GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state); | |||
623 | * more time with 'NULL'. After this, the operation must no longer be | 624 | * more time with 'NULL'. After this, the operation must no longer be |
624 | * explicitly canceled. | 625 | * explicitly canceled. |
625 | * | 626 | * |
627 | * The #GNUNET_TRANSPORT_monitor_peers_cancel call MUST not be called in the | ||
628 | * the peer_callback! | ||
629 | * | ||
626 | * @param cfg configuration to use | 630 | * @param cfg configuration to use |
627 | * @param peer a specific peer identity to obtain information for, | 631 | * @param peer a specific peer identity to obtain information for, |
628 | * NULL for all peers | 632 | * NULL for all peers |
diff --git a/src/transport/transport_api_monitoring.c b/src/transport/transport_api_monitoring.c index b753ce73a..92ab2042c 100644 --- a/src/transport/transport_api_monitoring.c +++ b/src/transport/transport_api_monitoring.c | |||
@@ -437,22 +437,29 @@ peer_response_processor (void *cls, | |||
437 | 437 | ||
438 | 438 | ||
439 | /** | 439 | /** |
440 | * Return all the known addresses for a specific peer or all peers. | 440 | * Return information about a specific peer or all peers currently known to |
441 | * Returns continuously all address if one_shot is set to GNUNET_NO | 441 | * transport service once or in monitoring mode. To obtain information about |
442 | * a specific peer, a peer identity can be passed. To obtain information about | ||
443 | * all peers currently known to transport service, NULL can be passed as peer | ||
444 | * identity. | ||
442 | * | 445 | * |
443 | * CHANGE: Returns the address(es) that we are currently using for this | 446 | * For each peer, the callback is called with information about the address used |
444 | * peer. Upon completion, the 'AddressLookUpCallback' is called one more | 447 | * to communicate with this peer, the state this peer is currently in and the |
445 | * time with 'NULL' for the address and the peer. After this, the operation must no | 448 | * the current timeout for this state. |
446 | * longer be explicitly canceled. | 449 | * |
450 | * Upon completion, the 'GNUNET_TRANSPORT_PeerIterateCallback' is called one | ||
451 | * more time with 'NULL'. After this, the operation must no longer be | ||
452 | * explicitly canceled. | ||
447 | * | 453 | * |
448 | * The #GNUNET_TRANSPORT_monitor_peers_cancel call MUST not be called in the | 454 | * The #GNUNET_TRANSPORT_monitor_peers_cancel call MUST not be called in the |
449 | * the peer_callback! | 455 | * the peer_callback! |
450 | * | 456 | * |
451 | * @param cfg configuration to use | 457 | * @param cfg configuration to use |
452 | * @param peer peer identity to look up the addresses of, CHANGE: allow NULL for all (connected) peers | 458 | * @param peer a specific peer identity to obtain information for, |
459 | * NULL for all peers | ||
453 | * @param one_shot GNUNET_YES to return the current state and then end (with NULL+NULL), | 460 | * @param one_shot GNUNET_YES to return the current state and then end (with NULL+NULL), |
454 | * GNUNET_NO to monitor the set of addresses used (continuously, must be explicitly canceled) | 461 | * GNUNET_NO to monitor peers continuously |
455 | * @param timeout how long is the lookup allowed to take at most (irrelevant if one_shot is set to GNUNET_NO) | 462 | * @param timeout how long is the lookup allowed to take at most |
456 | * @param peer_callback function to call with the results | 463 | * @param peer_callback function to call with the results |
457 | * @param peer_callback_cls closure for peer_address_callback | 464 | * @param peer_callback_cls closure for peer_address_callback |
458 | */ | 465 | */ |