From 1c9f269ea5cadb20bb5f7fc209274ba5d6af4749 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 27 Jan 2019 04:29:52 +0100 Subject: in principle finished with #5385, could use some testing... --- src/cadet/gnunet-cadet.c | 90 ------------------------------------------------ 1 file changed, 90 deletions(-) (limited to 'src/cadet/gnunet-cadet.c') diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index 9e2d105b3..dba517a7b 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c @@ -46,11 +46,6 @@ static char *peer_id; */ static int request_tunnels; -/** - * Option --tunnel - */ -static char *tunnel_id; - /** * Option --connection */ @@ -601,47 +596,6 @@ tunnels_callback (void *cls, } -/** - * Method called to retrieve information about a specific tunnel the cadet peer - * has established, o`r is trying to establish. - * - * @param cls Closure. - * @param peer Peer towards whom the tunnel is directed. - * @param n_channels Number of channels. - * @param n_connections Number of connections. - * @param channels Channels. - * @param connections Connections. - * @param estate Encryption status. - * @param cstate Connectivity status. - */ -static void -tunnel_callback (void *cls, - const struct GNUNET_PeerIdentity *peer, - unsigned int n_channels, - unsigned int n_connections, - const struct GNUNET_CADET_ChannelTunnelNumber *channels, - const struct GNUNET_CADET_ConnectionTunnelIdentifier *connections, - unsigned int estate, - unsigned int cstate) -{ - unsigned int i; - - if (NULL != peer) - { - FPRINTF (stdout, "Tunnel %s\n", GNUNET_i2s_full (peer)); - FPRINTF (stdout, "\t%u channels\n", n_channels); - for (i = 0; i < n_channels; i++) - FPRINTF (stdout, "\t\t%X\n", ntohl (channels[i].cn)); - FPRINTF (stdout, "\t%u connections\n", n_connections); - for (i = 0; i < n_connections; i++) - FPRINTF (stdout, "\t\t%s\n", GNUNET_sh2s (&connections[i].connection_of_tunnel)); - FPRINTF (stdout, "\tencryption state: %s\n", enc_2s (estate)); - FPRINTF (stdout, "\tconnection state: %s\n", conn_2s (cstate)); - } - GNUNET_SCHEDULER_shutdown (); -} - - /** * Call CADET's meta API, get all peers known to a peer. * @@ -701,37 +655,6 @@ get_tunnels (void *cls) } -/** - * Call CADET's monitor API, get info of one tunnel. - * - * @param cls Closure (unused). - */ -static void -show_tunnel (void *cls) -{ - struct GNUNET_PeerIdentity pid; - - job = NULL; - if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_public_key_from_string (tunnel_id, - strlen (tunnel_id), - &pid.public_key)) - { - fprintf (stderr, - _("Invalid tunnel owner `%s'\n"), - tunnel_id); - GNUNET_SCHEDULER_shutdown (); - return; - } -#if FIXME5385 - GNUNET_CADET_get_tunnel (my_cfg, - &pid, - &tunnel_callback, - NULL); -#endif -} - - /** * Call CADET's monitor API, get info of one channel. * @@ -787,7 +710,6 @@ run (void *cls, target_port = args[1]; if ( (0 != (request_peers | request_tunnels) - || NULL != tunnel_id || NULL != conn_id || NULL != channel_id) && target_id != NULL) @@ -805,13 +727,6 @@ run (void *cls, job = GNUNET_SCHEDULER_add_now (&show_peer, NULL); } - else if (NULL != tunnel_id) - { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Show tunnel\n"); - job = GNUNET_SCHEDULER_add_now (&show_tunnel, - NULL); - } else if (NULL != channel_id) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -959,11 +874,6 @@ main (int argc, "peers", gettext_noop ("Provide information about all peers"), &request_peers), - GNUNET_GETOPT_option_string ('t', - "tunnel", - "TUNNEL_ID", - gettext_noop ("Provide information about a particular tunnel"), - &tunnel_id), GNUNET_GETOPT_option_flag ('T', "tunnels", gettext_noop ("Provide information about all tunnels"), -- cgit v1.2.3