/**
 * Callback method used with libcurl
 * Method is called when libcurl needs to write data during sending
 *
 * @param stream pointer where to write data
 * @param size size of an individual element
 * @param nmemb count of elements that can be written to the buffer
 * @param cls destination pointer, passed to the libcurl handle
 * @return bytes read from stream
 */
static size_t
client_receive (void *stream, size_t size, size_t nmemb, void *cls)
{
  struct Session *s = cls;
  struct GNUNET_TIME_Absolute now;
  size_t len = size * nmemb;
  struct Plugin *plugin = s->plugin;

  GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
                   "Client: Received %Zu bytes from peer `%s'\n", len,
                   GNUNET_i2s (&s->target));
  now = GNUNET_TIME_absolute_get ();
  if (now.abs_value < s->next_receive.abs_value)
  {
    struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
    struct GNUNET_TIME_Relative delta =
        GNUNET_TIME_absolute_get_difference (now, s->next_receive);
    GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
                     "Client: %p No inbound bandwidth available! Next read was delayed for %llu ms\n",
                     s->client_get, delta.rel_value);
    if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK)
    {
      GNUNET_SCHEDULER_cancel (s->recv_wakeup_task);
      s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK;
    }
    s->recv_wakeup_task =
        GNUNET_SCHEDULER_add_delayed (delta, &client_wake_up, s);
    return CURLPAUSE_ALL;
  }
  if (NULL == s->msg_tk)
    s->msg_tk = GNUNET_SERVER_mst_create (&client_receive_mst_cb, s);
  GNUNET_SERVER_mst_receive (s->msg_tk, s, stream, len, GNUNET_NO, GNUNET_NO);
  return len;
}
Beispiel #2
0
/**
 * Starts a helper and begins reading from it. The helper process is
 * restarted when it dies except when it is stopped using GNUNET_HELPER_stop()
 * or when the exp_cb callback is not NULL.
 *
 * @param with_control_pipe does the helper support the use of a control pipe for signalling?
 * @param binary_name name of the binary to run
 * @param binary_argv NULL-terminated list of arguments to give when starting the binary (this
 *                    argument must not be modified by the client for
 *                     the lifetime of the helper handle)
 * @param cb function to call if we get messages from the helper
 * @param exp_cb the exception callback to call. Set this to NULL if the helper
 *          process has to be restarted automatically when it dies/crashes
 * @param cb_cls closure for the above callback
 * @return the new Handle, NULL on error
 */
struct GNUNET_HELPER_Handle *
GNUNET_HELPER_start (int with_control_pipe,
		     const char *binary_name,
		     char *const binary_argv[],
		     GNUNET_SERVER_MessageTokenizerCallback cb,
		     GNUNET_HELPER_ExceptionCallback exp_cb,
		     void *cb_cls)
{
  struct GNUNET_HELPER_Handle *h;
  unsigned int c;

  h = GNUNET_new (struct GNUNET_HELPER_Handle);
  h->with_control_pipe = with_control_pipe;
  /* Lookup in libexec path only if we are starting gnunet helpers */
  if (NULL != strstr (binary_name, "gnunet"))
    h->binary_name = GNUNET_OS_get_libexec_binary_path (binary_name);
  else
    h->binary_name = GNUNET_strdup (binary_name);
  for (c = 0; NULL != binary_argv[c]; c++);
  h->binary_argv = GNUNET_malloc (sizeof (char *) * (c + 1));
  for (c = 0; NULL != binary_argv[c]; c++)
    h->binary_argv[c] = GNUNET_strdup (binary_argv[c]);
  h->binary_argv[c] = NULL;
  h->cb_cls = cb_cls;
  if (NULL != cb)
    h->mst = GNUNET_SERVER_mst_create (cb, h->cb_cls);
  h->exp_cb = exp_cb;
  h->retry_back_off = 0;
  start_helper (h);
  return h;
}
/**
 * Setup broadcasting subsystem.
 *
 * @param plugin
 * @param server_addrv6
 * @param server_addrv4
 */
void
setup_broadcast (struct Plugin *plugin,
                 struct sockaddr_in6 *server_addrv6,
                 struct sockaddr_in *server_addrv4)
{
  if (GNUNET_YES ==
      GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg,
                                            "topology",
                                            "FRIENDS-ONLY"))
  {
    LOG (GNUNET_ERROR_TYPE_WARNING,
         _("Disabling HELLO broadcasting due to friend-to-friend only configuration!\n"));
    return;
  }

  /* always create tokenizers */
  plugin->broadcast_mst =
    GNUNET_SERVER_mst_create (&broadcast_mst_cb, plugin);

  if (GNUNET_YES != plugin->enable_broadcasting)
    return; /* We do not send, just receive */

  /* create IPv4 broadcast socket */
  if ((GNUNET_YES == plugin->enable_ipv4) && (NULL != plugin->sockv4))
  {
    static int yes = 1;

    if (GNUNET_NETWORK_socket_setsockopt
        (plugin->sockv4, SOL_SOCKET, SO_BROADCAST, &yes,
         sizeof (int)) != GNUNET_OK)
    {
      LOG (GNUNET_ERROR_TYPE_WARNING,
           _("Failed to set IPv4 broadcast option for broadcast socket on port %d\n"),
           ntohs (server_addrv4->sin_port));
    }
  }
  /* create IPv6 multicast socket */
  if ((GNUNET_YES == plugin->enable_ipv6) && (plugin->sockv6 != NULL))
  {
    memset (&plugin->ipv6_multicast_address, 0, sizeof (struct sockaddr_in6));
    GNUNET_assert (1 ==
                   inet_pton (AF_INET6, "FF05::13B",
                              &plugin->ipv6_multicast_address.sin6_addr));
    plugin->ipv6_multicast_address.sin6_family = AF_INET6;
    plugin->ipv6_multicast_address.sin6_port = htons (plugin->port);
  }
  GNUNET_OS_network_interfaces_list (&iface_proc, plugin);
}
/**
 * Functions of this type are called upon new stream connection from other peers
 * or upon binding error which happen when the app_port given in
 * GNUNET_STREAM_listen() is already taken.
 *
 * @param cls the closure from GNUNET_STREAM_listen
 * @param socket the socket representing the stream; NULL on binding error
 * @param initiator the identity of the peer who wants to establish a stream
 *            with us; NULL on binding error
 * @return GNUNET_OK to keep the socket open, GNUNET_SYSERR to close the
 *             stream (the socket will be invalid after the call)
 */
static int 
accept_cb (void *cls,
	   struct GNUNET_STREAM_Socket *socket,
	   const struct GNUNET_PeerIdentity *initiator)
{
  struct StreamClient *sc;

  if (NULL == socket)
    return GNUNET_SYSERR;
  if (sc_count >= sc_count_max)
  {
    GNUNET_STATISTICS_update (GSF_stats,
			      gettext_noop ("# stream client connections rejected"), 1,
			      GNUNET_NO);
    return GNUNET_SYSERR;
  }
  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
	      "Accepting inbound stream connection from `%s'\n",
	      GNUNET_i2s (initiator));
  GNUNET_STATISTICS_update (GSF_stats,
			    gettext_noop ("# stream connections active"), 1,
			    GNUNET_NO);
  sc = GNUNET_malloc (sizeof (struct StreamClient));
  sc->socket = socket;
  sc->mst = GNUNET_SERVER_mst_create (&request_cb,
				      sc);
  sc->rh = GNUNET_STREAM_read (sc->socket,
			       GNUNET_TIME_UNIT_FOREVER_REL,
			       &process_request,
			       sc);
  GNUNET_CONTAINER_DLL_insert (sc_head,
			       sc_tail,
			       sc);
  sc_count++;
  refresh_timeout_task (sc);
  return GNUNET_OK;
}
/**
 * Get (or create) a stream to talk to the given peer.
 *
 * @param target peer we want to communicate with
 */
static struct StreamHandle *
get_stream (const struct GNUNET_PeerIdentity *target)
{
  struct StreamHandle *sh;

  sh = GNUNET_CONTAINER_multihashmap_get (stream_map,
					  &target->hashPubKey);
  if (NULL != sh)
  {
    if (GNUNET_SCHEDULER_NO_TASK != sh->timeout_task)
    {
      GNUNET_SCHEDULER_cancel (sh->timeout_task);
      sh->timeout_task = GNUNET_SCHEDULER_NO_TASK;
    }
    return sh;
  }
  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
	      "Creating stream to %s\n",
	      GNUNET_i2s (target));
  sh = GNUNET_malloc (sizeof (struct StreamHandle));
  sh->mst = GNUNET_SERVER_mst_create (&reply_cb,
				      sh);
  sh->waiting_map = GNUNET_CONTAINER_multihashmap_create (512, GNUNET_YES);
  sh->target = *target;
  sh->stream = GNUNET_STREAM_open (GSF_cfg,
				   &sh->target,
				   GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER,
				   &stream_ready_cb, sh,
				   GNUNET_STREAM_OPTION_END);
  GNUNET_assert (GNUNET_OK ==
		 GNUNET_CONTAINER_multihashmap_put (stream_map,
						    &sh->target.hashPubKey,
						    sh,
						    GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
  return sh;
}
/**
 * Main function of a program that pretends to be a WLAN card.
 *
 * @param argc should be 2
 * @param argv either '1' or '2', depending on which of the two cards this dummy is to emulate
 * @return 1 on error, 0 if terminated normally via signal
 */
int
main (int argc, char *argv[])
{
  struct stat st;
  int erg;
  FILE *fpin = NULL;
  FILE *fpout = NULL;
  int fdpin;
  int fdpout;
  char readbuf[MAXLINE];
  int readsize;
  struct SendBuffer write_std;
  struct SendBuffer write_pout;
  int ret;
  int maxfd;
  fd_set rfds;
  fd_set wfds;
  struct timeval tv;
  int retval;
  struct GNUNET_SERVER_MessageStreamTokenizer *stdin_mst = NULL;
  struct GNUNET_SERVER_MessageStreamTokenizer *file_in_mst = NULL;
  struct GNUNET_TRANSPORT_WLAN_MacAddress macaddr;
  int first;

  if ( (2 != argc) ||
       ((0 != strcmp (argv[1], "1")) && (0 != strcmp (argv[1], "2"))) )
  {
    FPRINTF (stderr,
             "%s",
	     "This program must be started with the operating mode (1 or 2) as the only argument.\n");
    return 1;
  }

  /* make the fifos if needed */
  umask (0);
  if ( (GNUNET_OK != GNUNET_DISK_directory_create_for_file (FIFO_FILE1)) ||
       (GNUNET_OK != GNUNET_DISK_directory_create_for_file (FIFO_FILE2)) )
  {
    FPRINTF (stderr, "Failed to create directory for file `%s'\n", FIFO_FILE1);
    return 1;
  }
  if (0 == strcmp (argv[1], "1") )
  {
    if (0 != stat (FIFO_FILE1, &st))
    {
      erg = mkfifo (FIFO_FILE1, 0666);
      if ( (0 != erg) && (EEXIST != errno) )
	FPRINTF (stderr, "Error in mkfifo(%s): %s\n", FIFO_FILE1,
		 strerror (errno));    
    }
  }
  else
  {
    if (0 != stat (FIFO_FILE2, &st))
    {
      erg = mkfifo (FIFO_FILE2, 0666);
      if ( (0 != erg) && (EEXIST != errno) )
	FPRINTF (stderr, "Error in mkfifo(%s): %s\n", FIFO_FILE2,
		 strerror (errno));
    }
  }

  if (0 == strcmp (argv[1], "1"))
  {
    first = 1;
    fpin = fopen (FIFO_FILE1, "r");
    if (NULL == fpin)
    {
      FPRINTF (stderr, "fopen of read FIFO_FILE1 failed: %s\n", STRERROR (errno));
      goto end;
    }
    if (NULL == (fpout = fopen (FIFO_FILE2, "w")))
    {
      erg = mkfifo (FIFO_FILE2, 0666);
      fpout = fopen (FIFO_FILE2, "w");
    }
    if (NULL == fpout)
    {
      FPRINTF (stderr, "fopen of write FIFO_FILE2 failed: %s\n", STRERROR (errno));
      goto end;
    }
  }
  else
  {
    first = 0;
    if (NULL == (fpout = fopen (FIFO_FILE1, "w")))
    {
      erg = mkfifo (FIFO_FILE1, 0666);
      fpout = fopen (FIFO_FILE1, "w");
    }
    if (NULL == fpout)
    {
      FPRINTF (stderr, "fopen of write FIFO_FILE1 failed: %s\n", STRERROR (errno));
      goto end;
    }
    fpin = fopen (FIFO_FILE2, "r");
    if (NULL == fpin)
    {
      FPRINTF (stderr, "fopen of read FIFO_FILE2 failed: %s\n", STRERROR (errno));
      goto end;
    }
  }

  fdpin = fileno (fpin);
  GNUNET_assert (fpin >= 0);
  if (fdpin >= FD_SETSIZE)
  {
    FPRINTF (stderr, "File fdpin number too large (%d > %u)\n", fdpin,
             (unsigned int) FD_SETSIZE);
    goto end;
  }

  fdpout = fileno (fpout);
  GNUNET_assert (fdpout >= 0);

  if (fdpout >= FD_SETSIZE)
  {
    FPRINTF (stderr, "File fdpout number too large (%d > %u)\n", fdpout,
             (unsigned int) FD_SETSIZE);
    goto end;
  }

  signal (SIGINT, &sigfunc);
  signal (SIGTERM, &sigfunc);

  write_std.size = 0;
  write_std.pos = 0;
  write_pout.size = 0;
  write_pout.pos = 0;
  stdin_mst = GNUNET_SERVER_mst_create (&stdin_send, &write_pout);
  file_in_mst = GNUNET_SERVER_mst_create (&file_in_send, &write_std);

  /* Send 'random' mac address */
  macaddr.mac[0] = 0x13;
  macaddr.mac[1] = 0x22;
  macaddr.mac[2] = 0x33;
  macaddr.mac[3] = 0x44;
  macaddr.mac[4] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_STRONG, 256);
  macaddr.mac[5] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, 256);
  write_std.size = send_mac_to_plugin (write_std.buf, &macaddr);

  while (0 == closeprog)
  {
    maxfd = -1;
    tv.tv_sec = 5;
    tv.tv_usec = 0;

    FD_ZERO (&rfds);
    FD_ZERO (&wfds);
    /* if output queue is empty, read */
    if (0 == write_pout.size)
    {
      FD_SET (STDIN_FILENO, &rfds);
      maxfd = MAX (STDIN_FILENO, maxfd);
    }
    if (0 == write_std.size)
    {
      FD_SET (fdpin, &rfds);
      maxfd = MAX (fdpin, maxfd);
    }

    /* if there is something to write, try to write */
    if (0 < write_std.size)
    {
      FD_SET (STDOUT_FILENO, &wfds);
      maxfd = MAX (maxfd, STDOUT_FILENO);
    }
    if (0 < write_pout.size)
    {
      FD_SET (fdpout, &wfds);
      maxfd = MAX (maxfd, fdpout);
    }

    retval = select (maxfd + 1, &rfds, &wfds, NULL, &tv);
    if ((-1 == retval) && (EINTR == errno))
      continue;
    if (0 > retval)
    {
      FPRINTF (stderr, "select failed: %s\n", STRERROR (errno));
      closeprog = 1;
      break;
    }

    if (FD_ISSET (STDOUT_FILENO, &wfds))
    {
      ret =
          write (STDOUT_FILENO, write_std.buf + write_std.pos,
                 write_std.size - write_std.pos);
      if (0 > ret)
      {
        closeprog = 1;
        FPRINTF (stderr, "Write ERROR to STDOUT_FILENO: %s\n",
                 STRERROR (errno));
        break;
      }
      else
      {
        write_std.pos += ret;
        /* check if finished writing */
        if (write_std.pos == write_std.size)
        {
          write_std.pos = 0;
          write_std.size = 0;
        }
      }
    }

    if (FD_ISSET (fdpout, &wfds))
    {
      ret =
          write (fdpout, write_pout.buf + write_pout.pos,
                 write_pout.size - write_pout.pos);

      if (0 > ret)
      {
        closeprog = 1;
        FPRINTF (stderr, "Write ERROR to fdpout failed: %s\n", STRERROR (errno));
      }
      else
      {
        write_pout.pos += ret;
        /* check if finished writing */
        if (write_pout.pos == write_pout.size)
        {
          write_pout.pos = 0;
          write_pout.size = 0;
        }
      }
    }

    if (FD_ISSET (STDIN_FILENO, &rfds))
    {
      readsize = read (STDIN_FILENO, readbuf, sizeof (readbuf));

      if (0 > readsize)
      {
        closeprog = 1;
        FPRINTF (stderr, "Error reading from STDIN_FILENO: %s\n",
                 STRERROR (errno));
      }
      else if (0 < readsize)
      {
        GNUNET_SERVER_mst_receive (stdin_mst, NULL, readbuf, readsize,
                                   GNUNET_NO, GNUNET_NO);

      }
      else
      {
        /* eof */
        closeprog = 1;
      }
    }

    if (FD_ISSET (fdpin, &rfds))
    {
      readsize = read (fdpin, readbuf, sizeof (readbuf));
      if (0 > readsize)
      {
        closeprog = 1;
        FPRINTF (stderr, "Error reading from fdpin: %s\n", STRERROR (errno));
        break;
      }
      else if (0 < readsize)
      {
        GNUNET_SERVER_mst_receive (file_in_mst, NULL, readbuf, readsize,
                                   GNUNET_NO, GNUNET_NO);
      }
      else
      {
        /* eof */
        closeprog = 1;
      }
    }
  }

end:
  /* clean up */
  if (NULL != stdin_mst)
    GNUNET_SERVER_mst_destroy (stdin_mst);
  if (NULL != file_in_mst)
    GNUNET_SERVER_mst_destroy (file_in_mst);

  if (NULL != fpout)
    fclose (fpout);
  if (NULL != fpin)
    fclose (fpin);
  if (1 == first)
  {
    (void) unlink (FIFO_FILE1);
    (void) unlink (FIFO_FILE2);
  }
  return 0;
}
Beispiel #7
0
GstBin *
get_app(GNUNET_gstData *d, int type)
{
  GstBin *bin;
  GstPad *pad, *ghostpad;

  if ( type == SOURCE )
  {
    bin = GST_BIN(gst_bin_new("Gnunet appsrc"));


    GNUNET_assert (GNUNET_OK ==
       GNUNET_log_setup ("gnunet-helper-audio-playback",
             "WARNING",
             NULL));

    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
          "Audio playback starts\n");
    printf(" creating appsrc \n ");
    //d->audio_message.header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO);

// d->audio_message = GNUNET_malloc (UINT16_MAX);
 //  d->audio_message = (AudioMessage*)malloc(sizeof(struct AudioMessage));
//  d->audio_message = GNUNET_malloc(sizeof(struct AudioMessage));


 //d->audio_message.header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO);


    d->stdin_mst = GNUNET_SERVER_mst_create (&stdin_receiver, d);

    if ( d->stdin_mst == NULL)
     printf("stdin_mst = NULL");

    d->appsrc     = gst_element_factory_make ("appsrc",       "appsrc");

    gst_bin_add_many( bin, d->appsrc, NULL);
//    gst_element_link_many ( encoder, muxer, NULL);

    pad = gst_element_get_static_pad (d->appsrc, "src");
    ghostpad = gst_ghost_pad_new ("src", pad);
  }
  if ( type == SINK )
  {
    bin = GST_BIN(gst_bin_new("Gnunet appsink"));


    GNUNET_assert (GNUNET_OK ==
       GNUNET_log_setup ("gnunet-helper-audio-record",
             "WARNING",
             NULL));

    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
          "Audio source starts\n");

    d->appsink     = gst_element_factory_make ("appsink",       "appsink");

    // Move this out of here!
    d->audio_message = GNUNET_malloc (UINT16_MAX);
    (d->audio_message)->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO);
    g_object_set (G_OBJECT (d->appsink), "emit-signals", TRUE, "sync", TRUE, NULL);

    g_signal_connect (d->appsink, "new-sample",
          G_CALLBACK (on_appsink_new_sample), &d);

    gst_bin_add_many( bin, d->appsink, NULL);
//    gst_element_link_many ( encoder, muxer, NULL);

    pad = gst_element_get_static_pad (d->appsink, "sink");
    ghostpad = gst_ghost_pad_new ("sink", pad);
  }

  /* set the bin pads */
  gst_pad_set_active (ghostpad, TRUE);
  gst_element_add_pad (GST_ELEMENT(bin), ghostpad);

  gst_object_unref (pad);

  return bin;
}
void
setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *serverAddrv6, struct sockaddr_in *serverAddrv4)
{
  /* create IPv4 broadcast socket */
  plugin->broadcast_ipv4 = GNUNET_NO;
  if (plugin->sockv4 != NULL)
  {
    int yes = 1;

    if (GNUNET_NETWORK_socket_setsockopt
        (plugin->sockv4, SOL_SOCKET, SO_BROADCAST, &yes,
         sizeof (int)) != GNUNET_OK)
    {
      LOG (GNUNET_ERROR_TYPE_WARNING,
           _
           ("Failed to set IPv4 broadcast option for broadcast socket on port %d\n"),
           ntohs (serverAddrv4->sin_port));
    }
    else
    {
      GNUNET_OS_network_interfaces_list (iface_proc, plugin);
      plugin->send_ipv4_broadcast_task =
          GNUNET_SCHEDULER_add_now (&udp_ipv4_broadcast_send, plugin);

      plugin->broadcast_ipv4_mst =
          GNUNET_SERVER_mst_create (broadcast_ipv4_mst_cb, plugin);

      LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv4 Broadcasting running\n");
      plugin->broadcast_ipv4 = GNUNET_YES;
    }
  }

  plugin->broadcast_ipv6 = GNUNET_NO;
  if (plugin->sockv6 != NULL)
  {
    memset (&plugin->ipv6_multicast_address, 0, sizeof (struct sockaddr_in6));
    GNUNET_assert (1 ==
                   inet_pton (AF_INET6, "FF05::13B",
                              &plugin->ipv6_multicast_address.sin6_addr));

    plugin->ipv6_multicast_address.sin6_family = AF_INET6;
    plugin->ipv6_multicast_address.sin6_port = htons (plugin->port);

    plugin->broadcast_ipv6_mst =
        GNUNET_SERVER_mst_create (broadcast_ipv6_mst_cb, plugin);

    /* Create IPv6 multicast request */
    struct ipv6_mreq multicastRequest;

    multicastRequest.ipv6mr_multiaddr =
        plugin->ipv6_multicast_address.sin6_addr;
    /* TODO: 0 selects the "best" interface, tweak to use all interfaces
     *
     * http://tools.ietf.org/html/rfc2553#section-5.2:
     *
     * IPV6_JOIN_GROUP
     *
     * Join a multicast group on a specified local interface.  If the
     * interface index is specified as 0, the kernel chooses the local
     * interface.  For example, some kernels look up the multicast
     * group in the normal IPv6 routing table and using the resulting
     * interface.
     * */
    multicastRequest.ipv6mr_interface = 0;

    /* Join the multicast group */
    if (GNUNET_NETWORK_socket_setsockopt
        (plugin->sockv6, IPPROTO_IPV6, IPV6_JOIN_GROUP,
         (char *) &multicastRequest, sizeof (multicastRequest)) != GNUNET_OK)
    {
      LOG (GNUNET_ERROR_TYPE_WARNING,
      "Failed to join IPv6 multicast group: IPv6 broadcasting not running\n");
    }
    else
    {
      LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting running\n");
      plugin->send_ipv6_broadcast_task =
          GNUNET_SCHEDULER_add_now (&udp_ipv6_broadcast_send, plugin);
      plugin->broadcast_ipv6 = GNUNET_YES;
    }
  }
}