GNUnet  0.10.x
gnunet-service-ats_plugins.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2011-2014 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 
27 #ifndef GNUNET_SERVICE_ATS_PLUGINS_H
28 #define GNUNET_SERVICE_ATS_PLUGINS_H
29 
31 
32 
43 int
45 
46 
50 void
51 GAS_plugin_done (void);
52 
53 
61 void
63  enum GNUNET_ATS_PreferenceKind kind,
64  double pref_rel);
65 
66 
72 void
74 
75 
83 void
84 GAS_plugin_new_address (struct ATS_Address *new_address);
85 
86 
93 void
95 
96 
107 void
109  const struct GNUNET_PeerIdentity *peer,
110  const struct GNUNET_TIME_Relative scope,
111  enum GNUNET_ATS_PreferenceKind kind,
112  float score_abs);
113 
114 
119 void
121 
122 
126 void
128 
129 
136 void
138 
139 
146 void
148 
149 
150 #endif
void GAS_plugin_notify_preference_changed(const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind, double pref_rel)
The preference changed for a peer, update solver.
void GAS_plugin_solver_lock(void)
Stop instant solving, there are many state updates happening in bulk right now.
Handle to a client that is connected to a service.
Definition: service.c:249
void GAS_plugin_done(void)
Shutdown address subsystem.
void GAS_plugin_new_address(struct ATS_Address *new_address)
Tell the solver that the given address can now be used for talking to the respective peer...
static enum GNUNET_NetworkType scope
Which network scope do we belong to?
void GAS_plugin_solver_unlock(void)
Resume instant solving, we are done with the bulk state updates.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
Address with additional information.
int GAS_plugin_init(const struct GNUNET_CONFIGURATION_Handle *cfg)
Initialize address subsystem.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
ats service address management
The identity of the host (wraps the signing key of the peer).
configuration data
Definition: configuration.c:85
void GAS_plugin_delete_address(struct ATS_Address *address)
Tell the solver that the given address is no longer valid can cannot be used any longer.
void GAS_plugin_notify_feedback(struct GNUNET_SERVICE_Client *application, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_TIME_Relative scope, enum GNUNET_ATS_PreferenceKind kind, float score_abs)
Tell the solver that the given client has expressed its appreciation for the past performance of a gi...
GNUNET_ATS_PreferenceKind
Enum defining all known preference categories.
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
void GAS_plugin_request_connect_stop(const struct GNUNET_PeerIdentity *pid)
Notify the plugin that a request to connect to a particular peer was dropped.
void GAS_plugin_notify_property_changed(struct ATS_Address *address)
The relative value for a property changed.
static char * address
GNS address for this phone.
void GAS_plugin_request_connect_start(const struct GNUNET_PeerIdentity *pid)
Notify the plugin that a request to connect to a particular peer was given to us. ...
Time for relative time used by GNUnet, in microseconds.