aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_ats_application_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_ats_application_service.h')
-rw-r--r--src/include/gnunet_ats_application_service.h109
1 files changed, 0 insertions, 109 deletions
diff --git a/src/include/gnunet_ats_application_service.h b/src/include/gnunet_ats_application_service.h
deleted file mode 100644
index da7fd4b52..000000000
--- a/src/include/gnunet_ats_application_service.h
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2010-2015, 2018 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20/**
21 * @addtogroup Backbone
22 * @{
23 *
24 * @file
25 * Bandwidth allocation API for applications to interact with
26 *
27 * @author Christian Grothoff
28 * @author Matthias Wachs
29 *
30 * @defgroup ats ATS service
31 * Bandwidth allocation
32 *
33 * @see [Documentation](https://gnunet.org/ats-subsystem)
34 *
35 * @{
36 */
37#ifndef GNUNET_ATS_APPLICATION_SERVICE_H
38#define GNUNET_ATS_APPLICATION_SERVICE_H
39
40
41#include "gnunet_constants.h"
42#include "gnunet_util_lib.h"
43
44/**
45 * Handle to the ATS subsystem for making suggestions about
46 * connections the peer would like to have.
47 */
48struct GNUNET_ATS_ApplicationHandle;
49
50
51/**
52 * Initialize the ATS application client handle.
53 *
54 * @param cfg configuration to use
55 * @return ats application handle, NULL on error
56 */
57struct GNUNET_ATS_ApplicationHandle *
58GNUNET_ATS_application_init (const struct GNUNET_CONFIGURATION_Handle *cfg);
59
60
61/**
62 * Shutdown ATS application client.
63 *
64 * @param ch handle to destroy
65 */
66void
67GNUNET_ATS_application_done (struct GNUNET_ATS_ApplicationHandle *ch);
68
69
70/**
71 * Handle for suggestion requests.
72 */
73struct GNUNET_ATS_ApplicationSuggestHandle;
74
75
76/**
77 * An application would like to communicate with a peer. ATS should
78 * allocate bandwidth using a suitable address for requiremetns @a pk
79 * to transport.
80 *
81 * @param ch handle
82 * @param peer identity of the peer we need an address for
83 * @param pk what kind of application will the application require (can be
84 * #GNUNET_MQ_PREFERENCE_NONE, we will still try to connect)
85 * @param bw desired bandwidth, can be zero (we will still try to connect)
86 * @return suggestion handle, NULL if request is already pending
87 */
88struct GNUNET_ATS_ApplicationSuggestHandle *
89GNUNET_ATS_application_suggest (struct GNUNET_ATS_ApplicationHandle *ch,
90 const struct GNUNET_PeerIdentity *peer,
91 enum GNUNET_MQ_PreferenceKind pk,
92 struct GNUNET_BANDWIDTH_Value32NBO bw);
93
94
95/**
96 * We no longer care about communicating with a peer.
97 *
98 * @param sh handle
99 */
100void
101GNUNET_ATS_application_suggest_cancel (struct
102 GNUNET_ATS_ApplicationSuggestHandle *sh);
103
104/** @} */ /* end of group */
105
106/** @} */ /* end of Backbone addition*/
107
108#endif
109/* end of file gnunet_ats_application_service.h */