+ send_packet (tunnel->mesh, &msg.header, tunnel);
+}
+
+
+/**
+ * Request that the mesh should try to connect to a peer matching the
+ * description given in the service string.
+ *
+ * FIXME: allow multiple? how to deal with reconnect?
+ *
+ * @param tunnel handle to existing tunnel
+ * @param description string describing the destination node requirements
+ */
+void
+GNUNET_MESH_peer_request_connect_by_string (struct GNUNET_MESH_Tunnel *tunnel,
+ const char *description)
+{
+ struct GNUNET_MESH_ConnectPeerByString *m;
+ size_t len;
+ size_t msgsize;
+
+ len = strlen (description);
+ msgsize = sizeof(struct GNUNET_MESH_ConnectPeerByString) + len;
+ GNUNET_assert (UINT16_MAX > msgsize);
+ {
+ char buffer[msgsize];
+
+ m = (struct GNUNET_MESH_ConnectPeerByString *) buffer;
+ m->header.size = htons (msgsize);
+ m->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD_BY_STRING);
+ m->tunnel_id = htonl (tunnel->tid);
+ memcpy(&m[1], description, len);
+
+ send_packet (tunnel->mesh, &m->header, tunnel);
+ }
+}
+
+
+/**
+ * Request that the given peer isn't added to this tunnel in calls to
+ * connect_by_* calls, (due to misbehaviour, bad performance, ...).
+ *
+ * @param tunnel handle to existing tunnel.
+ * @param peer peer identity of the peer which should be blacklisted
+ * for the tunnel.
+ */
+void
+GNUNET_MESH_peer_blacklist (struct GNUNET_MESH_Tunnel *tunnel,
+ const struct GNUNET_PeerIdentity *peer)
+{
+ struct GNUNET_MESH_PeerControl msg;
+
+ msg.header.size = htons (sizeof (struct GNUNET_MESH_PeerControl));
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_BLACKLIST);
+ msg.tunnel_id = htonl (tunnel->tid);
+ msg.peer = *peer;
+ send_packet (tunnel->mesh, &msg.header, tunnel);
+
+ return;
+}
+
+
+/**
+ * Request that the given peer isn't blacklisted anymore from this tunnel,
+ * and therefore can be added in future calls to connect_by_*.
+ * The peer must have been previously blacklisted for this tunnel.
+ *
+ * @param tunnel handle to existing tunnel.
+ * @param peer peer identity of the peer which shouldn't be blacklisted
+ * for the tunnel anymore.
+ */
+void
+GNUNET_MESH_peer_unblacklist (struct GNUNET_MESH_Tunnel *tunnel,
+ const struct GNUNET_PeerIdentity *peer)
+{
+ struct GNUNET_MESH_PeerControl msg;
+
+ msg.header.size = htons (sizeof (struct GNUNET_MESH_PeerControl));
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_UNBLACKLIST);
+ msg.tunnel_id = htonl (tunnel->tid);
+ msg.peer = *peer;
+ send_packet (tunnel->mesh, &msg.header, tunnel);
+
+ return;