-/**
- * Demultiplex by message type and call appropriate handler for a message
- * towards a channel of a local tunnel.
- *
- * @param t Tunnel this message came on.
- * @param msgh Message header.
- * @param fwd Is this message fwd?
- */
-void
-GMT_handle_decrypted (struct MeshTunnel2 *t,
- const struct GNUNET_MessageHeader *msgh,
- int fwd)
-{
- switch (ntohs (msgh->type))
- {
- case GNUNET_MESSAGE_TYPE_MESH_DATA:
- /* Don't send hop ACK, wait for client to ACK */
- handle_data (t, (struct GNUNET_MESH_Data *) msgh, fwd);
- break;
-
- case GNUNET_MESSAGE_TYPE_MESH_DATA_ACK:
- handle_data_ack (t, (struct GNUNET_MESH_DataACK *) msgh, fwd);
- break;
-
- case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE:
- handle_channel_create (t,
- (struct GNUNET_MESH_ChannelCreate *) msgh,
- fwd);
- break;
-
- case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK:
- handle_channel_ack (t,
- (struct GNUNET_MESH_ChannelManage *) msgh,
- fwd);
- break;
-
- case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY:
- handle_channel_destroy (t,
- (struct GNUNET_MESH_ChannelManage *) msgh,
- fwd);
- break;
-
- default:
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "end-to-end message not known (%u)\n",
- ntohs (msgh->type));
- }
-}
-
-
-/**
- * Notifies a tunnel that a connection has broken that affects at least
- * some of its peers. Sends a notification towards the root of the tree.
- * In case the peer is the owner of the tree, notifies the client that owns
- * the tunnel and tries to reconnect.
- *
- * FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME
- *
- * @param t Tunnel affected.
- * @param p1 Peer that got disconnected from p2.
- * @param p2 Peer that got disconnected from p1.
- *
- * @return Short ID of the peer disconnected (either p1 or p2).
- * 0 if the tunnel remained unaffected.
- */
-GNUNET_PEER_Id
-GMT_notify_connection_broken (struct MeshTunnel2* t,
- GNUNET_PEER_Id p1, GNUNET_PEER_Id p2)
-{
-// if (myid != p1 && myid != p2) FIXME
-// {
-// return;
-// }
-//
-// if (tree_get_predecessor (t->tree) != 0)
-// {
-// /* We are the peer still connected, notify owner of the disconnection. */
-// struct GNUNET_MESH_PathBroken msg;
-// struct GNUNET_PeerIdentity neighbor;
-//
-// msg.header.size = htons (sizeof (msg));
-// msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN);
-// GNUNET_PEER_resolve (t->id.oid, &msg.oid);
-// msg.tid = htonl (t->id.tid);
-// msg.peer1 = my_full_id;
-// GNUNET_PEER_resolve (pid, &msg.peer2);
-// GNUNET_PEER_resolve (tree_get_predecessor (t->tree), &neighbor);
-// send_prebuilt_message (&msg.header, &neighbor, t);
-// }
- return 0;
-}