-void
+int
broadcast_ipv6_mst_cb (void *cls, void *client,
const struct GNUNET_MessageHeader *message)
{
if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON !=
ntohs (msg->header.type))
- return;
+ 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),
("# IPv6 multicast HELLO beacons received via udp"),
1, GNUNET_NO);
GNUNET_free (mc);
+ return GNUNET_OK;
}
-void
+int
broadcast_ipv4_mst_cb (void *cls, void *client,
const struct GNUNET_MessageHeader *message)
{
if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON !=
ntohs (msg->header.type))
- return;
+ 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),
("# IPv4 broadcast HELLO beacons received via udp"),
1, GNUNET_NO);
GNUNET_free (mc);
+ return GNUNET_OK;
}
void
(const struct sockaddr *) addr,
baddr->addrlen);
if (sent == GNUNET_SYSERR)
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "sendto");
+ {
+ if ((ENETUNREACH == errno) || (ENETDOWN == errno))
+ {
+ /* "Network unreachable" or "Network down"
+ *
+ * This indicates that we just do not have network connectivity
+ */
+ GNUNET_log (GNUNET_ERROR_TYPE_BULK | GNUNET_ERROR_TYPE_WARNING,
+ "Network connectivity is down, cannot send beacon!\n");
+ }
+ else
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "sendto");
+ }
else
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
&plugin->ipv6_multicast_address,
sizeof (struct sockaddr_in6));
if (sent == GNUNET_SYSERR)
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "sendto");
+ {
+ if ((ENETUNREACH == errno) || (ENETDOWN == errno))
+ {
+ /* "Network unreachable" or "Network down"
+ *
+ * This indicates that this system is IPv6 enabled, but does not
+ * have a valid global IPv6 address assigned
+ */
+ GNUNET_log (GNUNET_ERROR_TYPE_BULK | GNUNET_ERROR_TYPE_WARNING,
+ "Network connectivity is down, cannot send beacon!\n");
+ }
+ else
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "sendto");
+ }
else
{
LOG (GNUNET_ERROR_TYPE_DEBUG,