aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/gnunet_transport_plugin.h25
-rw-r--r--src/transport/gnunet-service-transport-new.c26
-rw-r--r--src/transport/gnunet-service-transport_plugins.c4
-rw-r--r--src/transport/gnunet-service-transport_plugins.h5
4 files changed, 3 insertions, 57 deletions
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h
index fdd298e7f..b47843188 100644
--- a/src/include/gnunet_transport_plugin.h
+++ b/src/include/gnunet_transport_plugin.h
@@ -159,26 +159,6 @@ typedef struct GNUNET_TIME_Relative (*GNUNET_TRANSPORT_TrafficReport) (void *cls
159 159
160 160
161/** 161/**
162 * Function called whenever the plugin has to notify ATS about costs for using this transport
163 *
164 * The cost will be passed as struct GNUNET_TRANSPORT_ATS_Cost_Information[]
165 * This array is 0-terminated, so the last element will be a pair:
166 * ((cost->cost_type==GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && cost->cost_value==0))
167 *
168 * @param cls closure
169 * @param peer peer
170 * @param addr peer address
171 * @param addrlen address length
172 * @param cost pointer to the first element of struct GNUNET_TRANSPORT_ATS_Cost_Information[]
173 */
174typedef void (*GNUNET_TRANSPORT_CostReport) (void *cls,
175 const struct GNUNET_PeerIdentity *peer,
176 const void *addr,
177 uint16_t addrlen,
178 struct GNUNET_TRANSPORT_ATS_Information * cost);
179
180
181/**
182 * Function that returns a HELLO message. 162 * Function that returns a HELLO message.
183 */ 163 */
184typedef const struct GNUNET_MessageHeader * (*GNUNET_TRANSPORT_GetHelloCallback)(void); 164typedef const struct GNUNET_MessageHeader * (*GNUNET_TRANSPORT_GetHelloCallback)(void);
@@ -237,11 +217,6 @@ struct GNUNET_TRANSPORT_PluginEnvironment
237 GNUNET_TRANSPORT_SessionEnd session_end; 217 GNUNET_TRANSPORT_SessionEnd session_end;
238 218
239 /** 219 /**
240 * Inform service about costs for using this transport plugin
241 */
242 GNUNET_TRANSPORT_CostReport cost_report;
243
244 /**
245 * What is the maximum number of connections that this transport 220 * What is the maximum number of connections that this transport
246 * should allow? Transports that do not have sessions (such as 221 * should allow? Transports that do not have sessions (such as
247 * UDP) can ignore this value. 222 * UDP) can ignore this value.
diff --git a/src/transport/gnunet-service-transport-new.c b/src/transport/gnunet-service-transport-new.c
index 7b9ffe2ee..eff799d03 100644
--- a/src/transport/gnunet-service-transport-new.c
+++ b/src/transport/gnunet-service-transport-new.c
@@ -183,29 +183,6 @@ plugin_env_session_end (void *cls,
183 183
184 184
185/** 185/**
186 * Function called whenever the plugin has to notify ATS about costs for using this transport
187 *
188 * The cost will be passed as struct GNUNET_TRANSPORT_ATS_Cost_Information[]
189 * This array is 0-terminated, so the last element will be a pair:
190 * ((cost->cost_type==GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && cost->cost_value==0))
191 *
192 * @param cls closure
193 * @param peer peer
194 * @param addr peer address
195 * @param addrlen address length
196 * @param cost pointer to the first element of struct GNUNET_TRANSPORT_ATS_Cost_Information[]
197 */
198static void
199plugin_env_cost_notification (void *cls,
200 const struct GNUNET_PeerIdentity *peer,
201 const void *addr,
202 uint16_t addrlen,
203 struct GNUNET_TRANSPORT_ATS_Information * cost)
204{
205}
206
207
208/**
209 * Function called when the service shuts down. Unloads our plugins 186 * Function called when the service shuts down. Unloads our plugins
210 * and cancels pending validations. 187 * and cancels pending validations.
211 * 188 *
@@ -303,8 +280,7 @@ run (void *cls,
303 GST_blacklist_start (server); 280 GST_blacklist_start (server);
304 GST_plugins_load (&plugin_env_receive_callback, 281 GST_plugins_load (&plugin_env_receive_callback,
305 &plugin_env_address_change_notification, 282 &plugin_env_address_change_notification,
306 &plugin_env_session_end, 283 &plugin_env_session_end);
307 &plugin_env_cost_notification);
308 GST_ats = GNUNET_ATS_init (GST_cfg, 284 GST_ats = GNUNET_ATS_init (GST_cfg,
309 NULL, // FIXME... 285 NULL, // FIXME...
310 NULL); // FIXME... 286 NULL); // FIXME...
diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c
index bacafa5f3..7fcc6f80d 100644
--- a/src/transport/gnunet-service-transport_plugins.c
+++ b/src/transport/gnunet-service-transport_plugins.c
@@ -89,13 +89,11 @@ static struct TransportPlugin *plugins_tail;
89 * @param address_cb function to call when our public addresses changed 89 * @param address_cb function to call when our public addresses changed
90 * @param traffic_cb function to call for flow control 90 * @param traffic_cb function to call for flow control
91 * @param session_end_cb function to call when a session was terminated 91 * @param session_end_cb function to call when a session was terminated
92 * @param cost_cb function to call about ATS cost changes
93 */ 92 */
94void 93void
95GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, 94GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
96 GNUNET_TRANSPORT_AddressNotification address_cb, 95 GNUNET_TRANSPORT_AddressNotification address_cb,
97 GNUNET_TRANSPORT_SessionEnd session_end_cb, 96 GNUNET_TRANSPORT_SessionEnd session_end_cb)
98 GNUNET_TRANSPORT_CostReport cost_cb)
99{ 97{
100 struct TransportPlugin *plug; 98 struct TransportPlugin *plug;
101 unsigned long long tneigh; 99 unsigned long long tneigh;
diff --git a/src/transport/gnunet-service-transport_plugins.h b/src/transport/gnunet-service-transport_plugins.h
index ee93918c7..2852ab4bb 100644
--- a/src/transport/gnunet-service-transport_plugins.h
+++ b/src/transport/gnunet-service-transport_plugins.h
@@ -40,15 +40,12 @@
40 * 40 *
41 * @param recv_cb function to call when data is received 41 * @param recv_cb function to call when data is received
42 * @param address_cb function to call when our public addresses changed 42 * @param address_cb function to call when our public addresses changed
43 * @param traffic_cb function to call for flow control
44 * @param session_end_cb function to call when a session was terminated 43 * @param session_end_cb function to call when a session was terminated
45 * @param cost_cb function to call about ATS cost changes
46 */ 44 */
47void 45void
48GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, 46GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
49 GNUNET_TRANSPORT_AddressNotification address_cb, 47 GNUNET_TRANSPORT_AddressNotification address_cb,
50 GNUNET_TRANSPORT_SessionEnd session_end_cb, 48 GNUNET_TRANSPORT_SessionEnd session_end_cb);
51 GNUNET_TRANSPORT_CostReport cost_cb);
52 49
53 50
54/** 51/**