+/**
+ * Function called by the solver to prompt the transport to
+ * try out a new address.
+ *
+ * @param cls closure, NULL
+ * @param pid peer this is about
+ * @param address address the transport should try
+ */
+static void
+suggest_cb (void *cls,
+ const struct GNUNET_PeerIdentity *pid,
+ const char *address)
+{
+ struct GNUNET_MQ_Envelope *env;
+ size_t slen = strlen (address) + 1;
+ struct AddressSuggestionMessage *as;
+
+ if (NULL == transport_client)
+ {
+ // FIXME: stats!
+ return;
+ }
+ env = GNUNET_MQ_msg_extra (as,
+ slen,
+ GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION);
+ as->peer = *pid;
+ memcpy (&as[1],
+ address,
+ slen);
+ GNUNET_MQ_send (transport_client->mq,
+ env);
+}
+
+
+/**
+ * Function called by the solver to tell the transpor to
+ * allocate bandwidth for the specified session.
+ *
+ * @param cls closure, NULL
+ * @param session session this is about
+ * @param peer peer this is about
+ * @param bw_in suggested bandwidth for receiving
+ * @param bw_out suggested bandwidth for transmission
+ */
+static void
+allocate_cb (void *cls,
+ struct GNUNET_ATS_Session *session,
+ const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_BANDWIDTH_Value32NBO bw_in,
+ struct GNUNET_BANDWIDTH_Value32NBO bw_out)
+{
+ struct GNUNET_MQ_Envelope *env;
+ struct SessionAllocationMessage *sam;
+
+ (void) cls;
+ if ( (NULL == transport_client) ||
+ (session->client != transport_client) )
+ {
+ /* transport must have just died and solver is addressing the
+ losses of sessions (possibly of previous transport), ignore! */
+ return;
+ }
+ env = GNUNET_MQ_msg (sam,
+ GNUNET_MESSAGE_TYPE_ATS_SESSION_ALLOCATION);
+ sam->session_id = session->session_id;
+ sam->peer = *peer;
+ sam->bandwidth_in = bw_in;
+ sam->bandwidth_out = bw_out;
+ GNUNET_MQ_send (transport_client->mq,
+ env);
+}
+
+