aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-cadet.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-04-27 19:14:54 +0000
committerBart Polot <bart@net.in.tum.de>2015-04-27 19:14:54 +0000
commita4a55d676df04d3359cb5407afe157dce7f839ef (patch)
tree9cb3f845e36a67f3838ba6ce8c9be9643857ded0 /src/cadet/gnunet-cadet.c
parent6de396c6ed1e51a115c7f478192985d74e4922fe (diff)
- implement single peer info
Diffstat (limited to 'src/cadet/gnunet-cadet.c')
-rw-r--r--src/cadet/gnunet-cadet.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c
index 3ce87a8825..958c1ad7f7 100644
--- a/src/cadet/gnunet-cadet.c
+++ b/src/cadet/gnunet-cadet.c
@@ -508,6 +508,23 @@ peer_callback (void *cls,
unsigned int n_paths,
struct GNUNET_PeerIdentity *paths)
{
+ unsigned int i;
+ struct GNUNET_PeerIdentity *p;
+
+ FPRINTF (stdout, "%s [TUNNEL: %s, NEIGHBOR: %s, PATHS: %u]\n",
+ GNUNET_i2s_full (peer),
+ tunnel ? "Y" : "N", neighbor ? "Y" : "N", n_paths);
+ p = paths;
+ for (i = 0; i < n_paths && NULL != p; i++)
+ {
+ FPRINTF (stdout, "%s ", GNUNET_i2s_full (p));
+ if (0 == memcmp (p, peer, sizeof (*p)))
+ {
+ FPRINTF (stdout, "\n");
+ }
+ p++;
+ }
+ GNUNET_SCHEDULER_shutdown();
}