*/
struct ATS_Network * net_tail;
-
/**
* Array of session objects (we need to translate them to numbers and back
* for the protocol; the offset in the array is the session number on the
/**
* Task retrieving interfaces from the system
*/
-
GNUNET_SCHEDULER_TaskIdentifier interface_task;
do_transmit (sh);
}
+
/**
* delete the current network list
*/
-
static void
delete_networks (struct GNUNET_ATS_SchedulingHandle *sh)
{
}
-
/**
* Periodically get list of addresses
* @param cls closure
sh);
}
+
/**
* Returns where the address is located: LAN or WAN or ...
+ *
* @param sh the scheduling handle
* @param addr address
* @param addrlen address length
* @return location as GNUNET_ATS_Information
*/
-
struct GNUNET_ATS_Information
GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle * sh, const struct sockaddr * addr, socklen_t addrlen)
{
return (const struct GNUNET_ATS_Information) ats;
}
+
/**
* Initialize the ATS subsystem.
*
struct PendingMessage *p;
struct RequestAddressMessage *m;
+ // FIXME: ATS needs to remember this in case of
+ // a disconnect!
p = GNUNET_malloc (sizeof (struct PendingMessage) +
sizeof (struct RequestAddressMessage));
p->size = sizeof (struct RequestAddressMessage);
do_transmit (sh);
}
+
/**
* We have updated performance statistics for a given address. Note
* that this function can be called for addresses that are currently
memcpy (pm, address->address, address->address_length);
memcpy (&pm[address->address_length], address->transport_name, namelen);
GNUNET_CONTAINER_DLL_insert_tail (sh->pending_head, sh->pending_tail, p);
-
do_transmit (sh);
}
+
/**
* A session got destroyed, stop including it as a valid address.
*
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&search_result_free, sc);
GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map);
- if (NULL == sc->requests)
+ if (NULL != sc->requests)
{
GNUNET_assert (GNUNET_FS_uri_test_ksk (sc->uri));
for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
* and does NOT mean that the message was not transmitted (DV)
*/
typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls,
- struct Session *session,
- const char *msgbuf, size_t msgbuf_size,
- unsigned int priority,
- struct GNUNET_TIME_Relative to,
- GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls);
+ struct Session *session,
+ const char *msgbuf, size_t msgbuf_size,
+ unsigned int priority,
+ struct GNUNET_TIME_Relative to,
+ GNUNET_TRANSPORT_TransmitContinuation cont,
+ void *cont_cls);
/**