/* list of application-types */
struct type_list_element *type_head, *type_tail;
- struct GNUNET_TRANSPORT_ATS_Information atsi;
struct peer_list_element *next, *prev;
/* The handle that sends the hellos to this peer */
struct GNUNET_MESH_Tunnel *tunnel = cls;
- tunnel->connect_handler (tunnel->handler_cls, NULL, NULL);
+ tunnel->connect_handler (tunnel->handler_cls, NULL, NULL, 0);
}
static void
struct GNUNET_MESH_Tunnel *tunnel = cls;
- tunnel->connect_handler (tunnel->handler_cls, &tunnel->handle->myself, NULL);
+ tunnel->connect_handler (tunnel->handler_cls, &tunnel->handle->myself, NULL, 0);
GNUNET_SCHEDULER_add_now (send_end_connect, tunnel);
}
struct GNUNET_MESH_Tunnel *tunnel = cls;
- tunnel->connect_handler (tunnel->handler_cls, &tunnel->peer, NULL);
+ tunnel->connect_handler (tunnel->handler_cls, &tunnel->peer, NULL, 0);
GNUNET_SCHEDULER_add_now (send_end_connect, tunnel);
}
*/
static void
core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_ATS_Information *atsi,
+ unsigned int atsi_count)
{
struct GNUNET_MESH_Handle *handle = cls;
/* Send a hello to this peer */
element->sched = GNUNET_SCHEDULER_add_now (schedule_hello_message, element);
-
- if (NULL != atsi)
- memcpy (&element->atsi, atsi,
- sizeof (struct GNUNET_TRANSPORT_ATS_Information));
-
GNUNET_CONTAINER_DLL_insert_after (handle->connected_peers.head,
handle->connected_peers.tail,
handle->connected_peers.tail, element);
handle->established_tunnels.tail,
handle->established_tunnels.tail,
tunnel);
- tunnel->tunnel.connect_handler (tunnel->tunnel.handler_cls, peer, atsi);
+ tunnel->tunnel.connect_handler (tunnel->tunnel.handler_cls, peer, atsi, atsi_count);
GNUNET_SCHEDULER_add_now (send_end_connect, tunnel);
tunnel = next;
}
static int
receive_hello (void *cls, const struct GNUNET_PeerIdentity *other,
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_ATS_Information *atsi,
+ unsigned int atsi_count)
{
struct GNUNET_MESH_Handle *handle = cls;
uint16_t *num = (uint16_t *) (message + 1);
memcpy (&tunnel->tunnel.peer, other,
sizeof (struct GNUNET_PeerIdentity));
tunnel->tunnel.connect_handler (tunnel->tunnel.handler_cls,
- &tunnel->tunnel.peer, atsi);
+ &tunnel->tunnel.peer, atsi, atsi_count);
GNUNET_SCHEDULER_add_now (send_end_connect, tunnel);
break;
}
static int
core_receive (void *cls, const struct GNUNET_PeerIdentity *other,
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_ATS_Information *atsi,
+ unsigned int atsi_count)
{
struct GNUNET_MESH_Handle *handle = cls;
struct tunnel_message *tmessage = (struct tunnel_message *) message;
GNUNET_i2s (other), ntohs (rmessage->type));
return handler->callback (handle->cls, &tunnel->tunnel, &tunnel->tunnel.ctx,
- other, rmessage, atsi);
+ other, rmessage, atsi, atsi_count);
}
struct GNUNET_MESH_Tunnel *
{
struct notify_cls *ncls = cls;
struct GNUNET_MESH_Tunnel *tunnel = ncls->tunnel;
+ tunnel->notify_handle = NULL;
if (NULL == buf)
return ncls->notify (ncls->notify_cls, 0, NULL);
- tunnel->notify_handle = NULL;
struct tunnel_message *message = buf;
void *cbuf = (void *) &message[1];