-/**
- * Callback function invoked for each interface found.
- *
- * @param cls NULL
- * @param name name of the interface (can be NULL for unknown)
- * @param isDefault is this presumably the default interface
- * @param addr address of this interface (can be NULL for unknown or unassigned)
- * @param broadcast_addr the broadcast address (can be NULL for unknown or unassigned)
- * @param netmask the network mask (can be NULL for unknown or unassigned))
- * @param addrlen length of the address
- * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
- */
-static int
-addr_proc (void *cls, const char *name, int isDefault,
- const struct sockaddr *addr,
- const struct sockaddr *broadcast_addr,
- const struct sockaddr *netmask, socklen_t addrlen)
-{
- struct Context *ctx = cls;
- const struct sockaddr_in *in_addr;
- char *ipaddr;
- char *tmp;
-
- if (sizeof (struct sockaddr_in) != addrlen)
- return GNUNET_OK;
- in_addr = (const struct sockaddr_in *) addr;
- if (NULL == (ipaddr = inet_ntoa (in_addr->sin_addr)))
- return GNUNET_OK;
- if (NULL == ctx->master_ips)
- {
- ctx->master_ips = GNUNET_strdup (ipaddr);
- return GNUNET_OK;
- }
- tmp = NULL;
- (void) GNUNET_asprintf (&tmp, "%s; %s", ctx->master_ips, ipaddr);
- GNUNET_free (ctx->master_ips);
- ctx->master_ips = tmp;
- return GNUNET_OK;
-}
-
-
-