count_address (void *cls,
const char *tname,
struct GNUNET_TIME_Absolute expiration,
- const void *addr, size_t addrlen)
+ const void *addr, uint16_t addrlen)
{
struct PrintContext *pc = cls;
pc->off++;
print_address (void *cls,
const char *tname,
struct GNUNET_TIME_Absolute expiration,
- const void *addr, size_t addrlen)
+ const void *addr, uint16_t addrlen)
{
struct PrintContext *pc = cls;
GNUNET_TRANSPORT_address_lookup (sched,
if (peer == NULL)
{
GNUNET_PEERINFO_disconnect (peerinfo);
+ switch (trust)
+ {
+ case 0:
+ break;
+ case 1:
+ fprintf (stderr,
+ _("Timeout trying to interact with PEERINFO service\n"));
+ break;
+ case 2:
+ fprintf (stderr,
+ _("Error in communication with PEERINFO service\n"));
+ break;
+ default:
+ GNUNET_break (0);
+ break;
+ }
return;
}
if (be_quiet)
struct GNUNET_PeerIdentity pid;
struct GNUNET_CRYPTO_HashAsciiEncoded enc;
char *fn;
+ int delta;
sched = s;
cfg = c;
+ delta = 0;
+ if ( (args[0] != NULL) &&
+ (args[1] != NULL) &&
+ (1 == sscanf(args[0], "%d", &delta)) &&
+ (GNUNET_OK ==
+ GNUNET_CRYPTO_hash_from_string (args[1],
+ &pid.hashPubKey)) )
+ {
+ peerinfo = GNUNET_PEERINFO_connect (sched, cfg);
+ GNUNET_PEERINFO_iterate (peerinfo,
+ &pid,
+ delta,
+ GNUNET_TIME_UNIT_SECONDS,
+ &print_peer_info, NULL);
+ return;
+ }
+ else if (args[0] != NULL)
+ {
+ fprintf (stderr,
+ _("Invalid command line argument `%s'\n"),
+ args[0]);
+ return;
+ }
if (get_self != GNUNET_YES)
{
peerinfo = GNUNET_PEERINFO_connect (sched, cfg);