+/**
+ * Send a multicast packet to a neighbor.
+ *
+ * @param cls Closure (Info about the multicast packet)
+ * @param neighbor_id Short ID of the neighbor to send the packet to.
+ */
+static void
+tunnel_send_multicast_iterator (void *cls, GNUNET_PEER_Id neighbor_id)
+{
+ struct MeshData *mdata = cls;
+ struct MeshTransmissionDescriptor *info;
+ struct GNUNET_PeerIdentity neighbor;
+ unsigned int i;
+
+ info = GNUNET_malloc (sizeof (struct MeshTransmissionDescriptor));
+
+ info->mesh_data = mdata;
+ (*(mdata->reference_counter)) ++;
+ info->destination = neighbor_id;
+ GNUNET_PEER_resolve (neighbor_id, &neighbor);
+#if MESH_DEBUG
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: sending to %s...\n",
+ GNUNET_i2s (&neighbor));
+#endif
+ info->peer = peer_info_get (&neighbor);
+ GNUNET_assert (NULL != info->peer);
+ i = peer_info_transmit_slot (info->peer);
+ info->handler_n = i;
+ info->peer->infos[i] = info;
+ info->peer->types[i] = GNUNET_MESSAGE_TYPE_MESH_MULTICAST;
+ info->peer->core_transmit[i] =
+ GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ &neighbor, info->mesh_data->data_len,
+ &send_core_data_multicast, info);
+}
+