Print the virtual links transport currently has, with the flow control state CORE rides on. More...
Go to the source code of this file.
Functions | |
| static void | shutdown_task (void *cls) |
| Task run when the user aborts us or the listing finished. | |
| static const char * | route_to_string (const struct GNUNET_TRANSPORT_LinkInformation *li, char *buf, size_t buf_size) |
| Render how a link is routed into buf. | |
| static void | print_link_verbose (const struct GNUNET_PeerIdentity *peer, const struct GNUNET_TRANSPORT_LinkInformation *li) |
| Print everything we know about li, one field per line. | |
| static void | link_cb (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_TRANSPORT_LinkInformation *li) |
| Function called once per virtual link, and a final time with both arguments NULL. | |
| static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
| Main function that will be run by the scheduler. | |
| int | main (int argc, char *const *argv) |
| The main function to list the virtual links of the transport service. | |
Variables | |
| static int | ret |
| Return code. | |
| static int | include_unconfirmed |
| Option -a: also show links that are not established yet. | |
| static int | verbose |
| Option -V: show the full flow control state of every link. | |
| static char * | peer_id |
| Option -p: restrict the listing to this peer. | |
| static struct GNUNET_TRANSPORT_LinkListContext * | llc |
| Handle to the running listing, NULL once it completed. | |
| static unsigned int | num_links |
| Number of links reported so far. | |
Print the virtual links transport currently has, with the flow control state CORE rides on.
Definition in file gnunet-transport.c.
|
static |
Task run when the user aborts us or the listing finished.
| cls | NULL |
Definition at line 68 of file gnunet-transport.c.
References GNUNET_TRANSPORT_links_list_cancel(), and llc.
|
static |
Render how a link is routed into buf.
| li | link to describe | |
| [out] | buf | where to write the description |
| buf_size | number of bytes available in buf |
Definition at line 88 of file gnunet-transport.c.
References _, GNUNET_TRANSPORT_LinkInformation::distance, GNUNET_snprintf(), GNUNET_TRANSPORT_LINK_ROUTE_DIRECT, and GNUNET_TRANSPORT_LinkInformation::route.
Referenced by link_cb(), and print_link_verbose().
|
static |
Print everything we know about li, one field per line.
| peer | peer at the other end of the link |
| li | the link to print |
Definition at line 111 of file gnunet-transport.c.
References _, GNUNET_TRANSPORT_LinkInformation::available_fc_window_size, GNUNET_TRANSPORT_LinkInformation::communicators, GNUNET_TRANSPORT_LinkInformation::confirmed, GNUNET_TRANSPORT_LinkInformation::core_recv_window, GNUNET_TRANSPORT_LinkInformation::fc_retransmit_count, GNUNET_free, GNUNET_i2s_full(), GNUNET_STRINGS_byte_size_fancy(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get_duration(), GNUNET_YES, GNUNET_TRANSPORT_LinkInformation::incoming_fc_window_size, GNUNET_TRANSPORT_LinkInformation::incoming_fc_window_size_loss, GNUNET_TRANSPORT_LinkInformation::incoming_fc_window_size_ram, GNUNET_TRANSPORT_LinkInformation::incoming_fc_window_size_used, GNUNET_TRANSPORT_LinkInformation::last_fc_rtt, GNUNET_TRANSPORT_LinkInformation::last_fc_transmission, GNUNET_TRANSPORT_LinkInformation::num_queues, GNUNET_TRANSPORT_LinkInformation::other_rtt, GNUNET_TRANSPORT_LinkInformation::outbound_fc_window_size, GNUNET_TRANSPORT_LinkInformation::outbound_fc_window_size_used, GNUNET_TRANSPORT_LinkInformation::pending, route_to_string(), and GNUNET_TRANSPORT_LinkInformation::stalled.
Referenced by link_cb().
|
static |
Function called once per virtual link, and a final time with both arguments NULL.
| cls | NULL |
| peer | peer at the other end of the link, NULL when done |
| li | state of the link, NULL when done |
Definition at line 179 of file gnunet-transport.c.
References _, GNUNET_TRANSPORT_LinkInformation::communicators, GNUNET_TRANSPORT_LinkInformation::core_recv_window, GNUNET_i2s(), GNUNET_SCHEDULER_shutdown(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_YES, GNUNET_TRANSPORT_LinkInformation::last_fc_rtt, llc, num_links, GNUNET_TRANSPORT_LinkInformation::pending, print_link_verbose(), route_to_string(), GNUNET_TRANSPORT_LinkInformation::stalled, and verbose.
Referenced by run().
|
static |
Main function that will be run by the scheduler.
| cls | closure |
| args | remaining command-line arguments |
| cfgfile | name of the configuration file used (can be NULL!) |
| cfg | configuration |
Definition at line 234 of file gnunet-transport.c.
References _, cfg, GNUNET_CRYPTO_eddsa_public_key_from_string(), GNUNET_NO, GNUNET_OK, GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), GNUNET_TRANSPORT_links_list(), GNUNET_YES, include_unconfirmed, link_cb(), llc, peer_id, GNUNET_PeerIdentity::public_key, ret, and shutdown_task.
Referenced by main().
| int main | ( | int | argc, |
| char *const * | argv | ||
| ) |
The main function to list the virtual links of the transport service.
| argc | number of arguments from the command line |
| argv | command line arguments |
Definition at line 287 of file gnunet-transport.c.
References gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_string(), GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_PROGRAM_run(), include_unconfirmed, options, peer_id, res, ret, run(), and verbose.
|
static |
|
static |
Option -a: also show links that are not established yet.
Definition at line 39 of file gnunet-transport.c.
Referenced by GNUNET_TRANSPORT_links_list(), main(), and run().
|
static |
Option -V: show the full flow control state of every link.
Definition at line 44 of file gnunet-transport.c.
|
static |
Option -p: restrict the listing to this peer.
Definition at line 49 of file gnunet-transport.c.
|
static |
Handle to the running listing, NULL once it completed.
Definition at line 54 of file gnunet-transport.c.
Referenced by GNUNET_TRANSPORT_links_list(), GNUNET_TRANSPORT_links_list_cancel(), handle_link_list_request(), handle_link_list_response(), handle_link_list_response_end(), link_cb(), link_list_done(), link_list_error_handler(), report_link(), run(), and shutdown_task().
|
static |
Number of links reported so far.
Definition at line 59 of file gnunet-transport.c.
Referenced by link_cb().