summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_ats_application_service.h27
-rw-r--r--src/include/gnunet_ats_transport_service.h62
-rw-r--r--src/include/gnunet_crypto_lib.h2
-rw-r--r--src/include/gnunet_protocols.h50
-rw-r--r--src/include/gnunet_transport_communication_service.h1
5 files changed, 95 insertions, 47 deletions
diff --git a/src/include/gnunet_ats_application_service.h b/src/include/gnunet_ats_application_service.h
index af92d5639..60560790a 100644
--- a/src/include/gnunet_ats_application_service.h
+++ b/src/include/gnunet_ats_application_service.h
@@ -39,32 +39,32 @@
* Handle to the ATS subsystem for making suggestions about
* connections the peer would like to have.
*/
-struct GNUNET_ATS_ConnectivityHandle;
+struct GNUNET_ATS_ApplicationHandle;
/**
- * Initialize the ATS connectivity suggestion client handle.
+ * Initialize the ATS application client handle.
*
* @param cfg configuration to use
- * @return ats connectivity handle, NULL on error
+ * @return ats application handle, NULL on error
*/
-struct GNUNET_ATS_ConnectivityHandle *
-GNUNET_ATS_connectivity_init (const struct GNUNET_CONFIGURATION_Handle *cfg);
+struct GNUNET_ATS_ApplicationHandle *
+GNUNET_ATS_application_init (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
- * Shutdown ATS connectivity suggestion client.
+ * Shutdown ATS application client.
*
* @param ch handle to destroy
*/
void
-GNUNET_ATS_connectivity_done (struct GNUNET_ATS_ConnectivityHandle *ch);
+GNUNET_ATS_application_done (struct GNUNET_ATS_ApplicationHandle *ch);
/**
- * Handle for address suggestion requests.
+ * Handle for suggestion requests.
*/
-struct GNUNET_ATS_ConnectivitySuggestHandle;
+struct GNUNET_ATS_ApplicationSuggestHandle;
/**
@@ -74,13 +74,13 @@ struct GNUNET_ATS_ConnectivitySuggestHandle;
*
* @param ch handle
* @param peer identity of the peer we need an address for
- * @param pk what kind of connectivity will the application require (can be
+ * @param pk what kind of application will the application require (can be
* #GNUNET_MQ_PREFERENCE_NONE, we will still try to connect)
* @param bw desired bandwith, can be zero (we will still try to connect)
* @return suggestion handle, NULL if request is already pending
*/
-struct GNUNET_ATS_ConnectivitySuggestHandle *
-GNUNET_ATS_connectivity_suggest (struct GNUNET_ATS_ConnectivityHandle *ch,
+struct GNUNET_ATS_ApplicationSuggestHandle *
+GNUNET_ATS_application_suggest (struct GNUNET_ATS_ApplicationHandle *ch,
const struct GNUNET_PeerIdentity *peer,
enum GNUNET_MQ_PreferenceKind pk,
struct GNUNET_BANDWIDTH_Value32NBO bw);
@@ -92,8 +92,9 @@ GNUNET_ATS_connectivity_suggest (struct GNUNET_ATS_ConnectivityHandle *ch,
* @param sh handle
*/
void
-GNUNET_ATS_connectivity_suggest_cancel (struct GNUNET_ATS_ConnectivitySuggestHandle *sh);
+GNUNET_ATS_application_suggest_cancel (struct GNUNET_ATS_ApplicationSuggestHandle *sh);
/** @} */ /* end of group */
+#endif
/* end of file gnunet_ats_application_service.h */
diff --git a/src/include/gnunet_ats_transport_service.h b/src/include/gnunet_ats_transport_service.h
index b069f8b24..b55c6a374 100644
--- a/src/include/gnunet_ats_transport_service.h
+++ b/src/include/gnunet_ats_transport_service.h
@@ -108,12 +108,12 @@ struct GNUNET_ATS_Properties
};
-/* ******************************** Scheduling API ***************************** */
+/* ******************************** Transport API ***************************** */
/**
- * Handle to the ATS subsystem for bandwidth/transport scheduling information.
+ * Handle to the ATS subsystem for bandwidth/transport transport information.
*/
-struct GNUNET_ATS_SchedulingHandle;
+struct GNUNET_ATS_TransportHandle;
/**
* Opaque session handle, to be defined by transport. Contents not known to ATS.
@@ -154,7 +154,7 @@ typedef void
/**
- * Initialize the ATS scheduling subsystem.
+ * Initialize the ATS transport subsystem.
*
* @param cfg configuration to use
* @param alloc_cb notification to call whenever the allocation changed
@@ -163,45 +163,45 @@ typedef void
* @param suggest_cb_cls closure for @a suggest_cb
* @return ats context
*/
-struct GNUNET_ATS_SchedulingHandle *
-GNUNET_ATS_scheduling_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
- GNUNET_ATS_AllocationCallback alloc_cb,
- void *alloc_cb_cls);
- GNUNET_ATS_SuggestionCallback suggest_cb,
- void *suggest_cb_cls);
+struct GNUNET_ATS_TransportHandle *
+GNUNET_ATS_transport_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_ATS_AllocationCallback alloc_cb,
+ void *alloc_cb_cls,
+ GNUNET_ATS_SuggestionCallback suggest_cb,
+ void *suggest_cb_cls);
/**
- * Client is done with ATS scheduling, release resources.
+ * Client is done with ATS transport, release resources.
*
- * @param sh handle to release
+ * @param ath handle to release
*/
void
-GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh);
+GNUNET_ATS_transport_done (struct GNUNET_ATS_TransportHandle *ath);
/**
- * Handle used within ATS to track an address.
+ * Handle used within ATS to track an session.
*/
-struct GNUNET_ATS_AddressRecord;
+struct GNUNET_ATS_SessionRecord;
/**
- * We have a new address ATS should know. Addresses have to be added with this
+ * We have a new session ATS should know. Sessiones have to be added with this
* function before they can be: updated, set in use and destroyed
*
- * @param sh handle
+ * @param ath handle
* @param pid peer we connected to
- * @param address the address (human readable version), NULL if
+ * @param address the address (human readable version),
+ * @param session transport-internal handle for the session/queue, NULL if
* the session is inbound-only
- * @param session transport-internal handle for the address/queue
- * @param prop performance data for the address
- * @return handle to the address representation inside ATS, NULL
- * on error (i.e. ATS knows this exact address already, or
- * address is invalid)
+ * @param prop performance data for the session
+ * @return handle to the session representation inside ATS, NULL
+ * on error (i.e. ATS knows this exact session already, or
+ * session is invalid)
*/
-struct GNUNET_ATS_AddressRecord *
-GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh,
+struct GNUNET_ATS_SessionRecord *
+GNUNET_ATS_session_add (struct GNUNET_ATS_TransportHandle *ath,
const struct GNUNET_PeerIdentity *pid,
const char *address,
struct GNUNET_ATS_Session *session,
@@ -209,14 +209,14 @@ GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh,
/**
- * We have updated performance statistics for a given address. Based
+ * We have updated performance statistics for a given session. Based
* on the information provided, ATS may update bandwidth assignments.
*
- * @param ar address record to update information for
- * @param prop performance data for the address
+ * @param ar session record to update information for
+ * @param prop performance data for the session
*/
void
-GNUNET_ATS_address_update (struct GNUNET_ATS_AddressRecord *ar,
+GNUNET_ATS_session_update (struct GNUNET_ATS_SessionRecord *ar,
const struct GNUNET_ATS_Properties *prop);
@@ -225,10 +225,10 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_AddressRecord *ar,
* allocate under the assumption that this @a ar is no
* longer in use.
*
- * @param ar address record to drop
+ * @param ar session record to drop
*/
void
-GNUNET_ATS_address_del (struct GNUNET_ATS_AddressRecord *ar);
+GNUNET_ATS_session_del (struct GNUNET_ATS_SessionRecord *ar);
#endif
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 8a591fa09..1c69646f3 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 6f3b886d8..c82b11762 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -3095,9 +3095,57 @@ extern "C"
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_END 1252
+/* ************** NEW (NG) ATS Messages ************* */
+
+/**
+ * Type of the 'struct ExpressPreferenceMessage' send by clients to ATS
+ * to establish bandwidth preference.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_SUGGEST 1400
+
/**
- * Next available: 1400
+ * Type of the 'struct ExpressPreferenceMessage' send by clients to ATS
+ * to abandon bandwidth preference.
*/
+#define GNUNET_MESSAGE_TYPE_ATS_SUGGEST_CANCEL 1401
+
+
+/**
+ * Type of the 'struct SessionAddMessage' send by transport clients to ATS
+ * to ask ATS to allocate resources to a session.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_SESSION_ADD 1402
+
+/**
+ * Type of the 'struct SessionAddMessage' send by transport clients to ATS
+ * to inform ATS about a session where resources are consumed but allocation
+ * is impossible (unidirectional).
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_SESSION_ADD_INBOUND_ONLY 1403
+
+/**
+ * Type of the 'struct SessionUpdateMessage' send by transport clients to ATS
+ * to inform ATS about property changes of a session.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_SESSION_UPDATE 1404
+
+/**
+ * Type of the 'struct SessionDelMessage' send by transport clients to ATS
+ * to tell ATS that a session is no longer available.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_SESSION_DEL 1405
+
+/**
+ * Type of the 'struct SessionAllocationMessage' send by ATS to the
+ * transport to tell it about resources to allocate to the session.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_SESSION_ALLOCATION 1406
+
+
+/**
+ * Next available: 1450
+ */
+
/**
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h
index 1d0add99f..8a0f0fcd5 100644
--- a/src/include/gnunet_transport_communication_service.h
+++ b/src/include/gnunet_transport_communication_service.h
@@ -42,7 +42,6 @@ extern "C"
#endif
#include "gnunet_util_lib.h"
-#include "gnunet_ats_service.h"
/**
* Version number of the transport communication API.