*/
/**
- * @file transport/gnunet_transport_plugin.h
+ * @file include/gnunet_transport_plugin.h
* @brief API for the transport services. This header
* specifies the struct that is given to the plugin's entry
* method and the other struct that must be returned.
#include "gnunet_scheduler_lib.h"
#include "gnunet_statistics_service.h"
#include "gnunet_transport_service.h"
-#include "transport_selection.h"
-
/**
* Opaque pointer that plugins can use to distinguish specific
const struct
GNUNET_MessageHeader *
message,
- uint32_t distance,
+ const struct GNUNET_TRANSPORT_ATS_Information *ats,
+ uint32_t ats_count,
struct Session *session,
const char *sender_address,
uint16_t sender_address_len);
/**
* Function called whenever the plugin has to notify ATS about costs for using this transport
*
- * The cost will be passed as struct GNUNET_ATS_Cost_Information[]
+ * The cost will be passed as struct GNUNET_TRANSPORT_ATS_Cost_Information[]
* This array is 0-terminated, so the last element will be a pair:
- * ((cost->cost_type==GNUNET_ATS_ARRAY_TERMINATOR) && cost->cost_value==0))
+ * ((cost->cost_type==GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && cost->cost_value==0))
*
* @param cls closure
* @param peer peer
* @param addr peer address
* @param addrlen address length
- * @param cost pointer to the first element of struct GNUNET_ATS_Cost_Information[]
+ * @param cost pointer to the first element of struct GNUNET_TRANSPORT_ATS_Cost_Information[]
*/
typedef void (*GNUNET_TRANSPORT_CostReport) (void *cls,
- const struct GNUNET_PeerIdentity *peer,
+ const struct GNUNET_PeerIdentity *peer,
const void *addr,
uint16_t addrlen,
- struct GNUNET_ATS_Information * cost);
+ struct GNUNET_TRANSPORT_ATS_Information * cost);
/**
* The transport service will pass a pointer to a struct
/**
* Function called by the GNUNET_TRANSPORT_TransmitFunction
- * upon "completion".
+ * upon "completion". In the case that a peer disconnects,
+ * this function must be called for each pending request
+ * (with a 'failure' indication) AFTER notifying the service
+ * about the disconnect event (so that the service won't try
+ * to transmit more messages, believing the connection still
+ * exists...).
*
* @param cls closure
* @param target who was the recipient of the message?