struct GNUNET_MESH_TunnelMessage tmsg;
struct GNUNET_MESH_PeerControl pmsg;
+ if (t->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
+ {
+ /* Tunnel was created by service (incoming tunnel) */
+ /* TODO: Notify service of missing tunnel, to request
+ * creator to recreate path (find a path to him via DHT?)
+ */
+ continue;
+ }
tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
tmsg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
tmsg.tunnel_id = htonl (t->tid);
MESH_TunnelNumber tid;
tid = ntohl (msg->tunnel_id);
- if (tid <= GNUNET_MESH_LOCAL_TUNNEL_ID_CLI)
+ if (tid < GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
{
GNUNET_break (0);
return;
}
+/**
+ * Transition API for tunnel ctx management
+ */
+void
+GNUNET_MESH_tunnel_set_data (struct GNUNET_MESH_Tunnel *tunnel, void *data)
+{
+ tunnel->ctx = data;
+}
+
+/**
+ * Transition API for tunnel ctx management
+ */
+void *
+GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel)
+{
+ return tunnel->ctx;
+}
+
+
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif