diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-04-27 19:14:54 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-04-27 19:14:54 +0000 |
commit | a4a55d676df04d3359cb5407afe157dce7f839ef (patch) | |
tree | 9cb3f845e36a67f3838ba6ce8c9be9643857ded0 /src/cadet/gnunet-cadet.c | |
parent | 6de396c6ed1e51a115c7f478192985d74e4922fe (diff) |
- implement single peer info
Diffstat (limited to 'src/cadet/gnunet-cadet.c')
-rw-r--r-- | src/cadet/gnunet-cadet.c | 17 |
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(); } |