diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-14 08:53:29 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-14 08:53:29 +0000 |
commit | 2a46bac24eaca8ce16d12359e88f4a9d3cf49c28 (patch) | |
tree | 832a1ebc38fd60e512fa69688f94abda5019741b /src/include/gnunet_transport_plugin.h | |
parent | 47bd57c6a129474f51001cf02d15a04340d9b834 (diff) | |
download | gnunet-2a46bac24eaca8ce16d12359e88f4a9d3cf49c28.tar.gz gnunet-2a46bac24eaca8ce16d12359e88f4a9d3cf49c28.zip |
removing ats functions from plugins, instead provide callback function
Diffstat (limited to 'src/include/gnunet_transport_plugin.h')
-rw-r--r-- | src/include/gnunet_transport_plugin.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index 84f1b1f4a..705886d53 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h | |||
@@ -128,6 +128,20 @@ typedef struct | |||
128 | 128 | ||
129 | 129 | ||
130 | /** | 130 | /** |
131 | * Function that will be called to figure if an address is an loopback, | ||
132 | * LAN, WAN etc. address | ||
133 | * | ||
134 | * @param cls closure | ||
135 | * @param addr binary address | ||
136 | * @param addrlen length of the address | ||
137 | * @return ATS Information containing the network type | ||
138 | */ | ||
139 | typedef const struct GNUNET_ATS_Information | ||
140 | (*GNUNET_TRANSPORT_AddressToType) (void *cls, | ||
141 | const struct sockaddr *addr, | ||
142 | size_t addrlen); | ||
143 | |||
144 | /** | ||
131 | * Function that will be called for each address the transport | 145 | * Function that will be called for each address the transport |
132 | * is aware that it might be reachable under. | 146 | * is aware that it might be reachable under. |
133 | * | 147 | * |
@@ -203,12 +217,6 @@ struct GNUNET_TRANSPORT_PluginEnvironment | |||
203 | struct GNUNET_STATISTICS_Handle *stats; | 217 | struct GNUNET_STATISTICS_Handle *stats; |
204 | 218 | ||
205 | /** | 219 | /** |
206 | * ATS Handle to request address type. | ||
207 | */ | ||
208 | struct GNUNET_ATS_SchedulingHandle *ats; | ||
209 | |||
210 | |||
211 | /** | ||
212 | * Function that should be called by the transport plugin | 220 | * Function that should be called by the transport plugin |
213 | * whenever a message is received. | 221 | * whenever a message is received. |
214 | */ | 222 | */ |
@@ -234,6 +242,13 @@ struct GNUNET_TRANSPORT_PluginEnvironment | |||
234 | GNUNET_TRANSPORT_SessionEnd session_end; | 242 | GNUNET_TRANSPORT_SessionEnd session_end; |
235 | 243 | ||
236 | /** | 244 | /** |
245 | * Function that will be called to figure if an address is an loopback, | ||
246 | * LAN, WAN etc. address | ||
247 | */ | ||
248 | GNUNET_TRANSPORT_AddressToType get_address_type; | ||
249 | |||
250 | |||
251 | /** | ||
237 | * What is the maximum number of connections that this transport | 252 | * What is the maximum number of connections that this transport |
238 | * should allow? Transports that do not have sessions (such as | 253 | * should allow? Transports that do not have sessions (such as |
239 | * UDP) can ignore this value. | 254 | * UDP) can ignore this value. |
@@ -464,7 +479,6 @@ struct GNUNET_TRANSPORT_PluginFunctions | |||
464 | * to a string (numeric conversion only). | 479 | * to a string (numeric conversion only). |
465 | */ | 480 | */ |
466 | GNUNET_TRANSPORT_AddressToString address_to_string; | 481 | GNUNET_TRANSPORT_AddressToString address_to_string; |
467 | |||
468 | }; | 482 | }; |
469 | 483 | ||
470 | 484 | ||