-broadcast_ipv6_mst_cb (void *cls, void *client,
- const struct GNUNET_MessageHeader *message)
-{
- struct Plugin *plugin = cls;
- struct Mstv6Context *mc = client;
- struct GNUNET_HELLO_Address *address;
- const struct GNUNET_MessageHeader *hello;
- const struct UDP_Beacon_Message *msg;
- struct GNUNET_ATS_Information atsi;
-
- msg = (const struct UDP_Beacon_Message *) message;
-
- if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON !=
- ntohs (msg->header.type))
- return GNUNET_OK;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Received beacon with %u bytes from peer `%s' via address `%s'\n",
- ntohs (msg->header.size), GNUNET_i2s (&msg->sender),
- udp_address_to_string (NULL, &mc->addr, sizeof (mc->addr)));
-
- /* setup ATS */
- atsi.type = htonl (GNUNET_ATS_NETWORK_TYPE);
- atsi.value = htonl (mc->ats_address_network_type);
- GNUNET_break (ntohl(mc->ats_address_network_type) != GNUNET_ATS_NET_UNSPECIFIED);
-
- hello = (struct GNUNET_MessageHeader *) &msg[1];
- address = GNUNET_HELLO_address_allocate (&msg->sender, PLUGIN_NAME,
- (const char *) &mc->addr, sizeof (mc->addr), GNUNET_HELLO_ADDRESS_INFO_INBOUND);
- plugin->env->receive (plugin->env->cls, address, NULL, hello);
- plugin->env->update_address_metrics (plugin->env->cls, address,
- NULL, &atsi, 1);
- GNUNET_HELLO_address_free (address);
- GNUNET_STATISTICS_update (plugin->env->stats,
- _
- ("# IPv6 multicast HELLO beacons received via udp"),
- 1, GNUNET_NO);
- GNUNET_free (mc);
- return GNUNET_OK;
-}
-
-
-static int
-broadcast_ipv4_mst_cb (void *cls, void *client,
- const struct GNUNET_MessageHeader *message)