diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-13 10:44:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-13 10:44:22 +0000 |
commit | 83c1ec41ce9987dace115519136a760e3eb4ea57 (patch) | |
tree | d7d5066373f81c47725753385c7a5607f423d2cf | |
parent | e7d1ebe3e0950968c4fe4899af2510f044f04c9f (diff) | |
download | gnunet-83c1ec41ce9987dace115519136a760e3eb4ea57.tar.gz gnunet-83c1ec41ce9987dace115519136a760e3eb4ea57.zip |
stuff
-rw-r--r-- | src/transport/gnunet-service-transport-new.c | 75 |
1 files changed, 70 insertions, 5 deletions
diff --git a/src/transport/gnunet-service-transport-new.c b/src/transport/gnunet-service-transport-new.c index eff799d03..759cfe542 100644 --- a/src/transport/gnunet-service-transport-new.c +++ b/src/transport/gnunet-service-transport-new.c | |||
@@ -86,6 +86,7 @@ process_hello_update (void *cls, | |||
86 | const struct GNUNET_MessageHeader *hello) | 86 | const struct GNUNET_MessageHeader *hello) |
87 | { | 87 | { |
88 | GST_clients_broadcast (hello, GNUNET_NO); | 88 | GST_clients_broadcast (hello, GNUNET_NO); |
89 | GNUNET_break (0); // FIXME | ||
89 | #if 0 | 90 | #if 0 |
90 | GNUNET_CONTAINER_multihashmap_iterate (neighbours, | 91 | GNUNET_CONTAINER_multihashmap_iterate (neighbours, |
91 | &transmit_our_hello_if_pong, | 92 | &transmit_our_hello_if_pong, |
@@ -131,6 +132,7 @@ plugin_env_receive_callback (void *cls, | |||
131 | const char *sender_address, | 132 | const char *sender_address, |
132 | uint16_t sender_address_len) | 133 | uint16_t sender_address_len) |
133 | { | 134 | { |
135 | GNUNET_break (0); // FIXME | ||
134 | return GNUNET_TIME_UNIT_ZERO; | 136 | return GNUNET_TIME_UNIT_ZERO; |
135 | } | 137 | } |
136 | 138 | ||
@@ -179,6 +181,69 @@ plugin_env_session_end (void *cls, | |||
179 | const struct GNUNET_PeerIdentity *peer, | 181 | const struct GNUNET_PeerIdentity *peer, |
180 | struct Session *session) | 182 | struct Session *session) |
181 | { | 183 | { |
184 | GNUNET_break (0); // FIXME | ||
185 | } | ||
186 | |||
187 | |||
188 | /** | ||
189 | * Function called by ATS to notify the callee that the | ||
190 | * assigned bandwidth or address for a given peer was changed. If the | ||
191 | * callback is called with address/bandwidth assignments of zero, the | ||
192 | * ATS disconnect function will still be called once the disconnect | ||
193 | * actually happened. | ||
194 | * | ||
195 | * @param cls closure | ||
196 | * @param peer identity of the peer | ||
197 | * @param plugin_name name of the transport plugin, NULL to disconnect | ||
198 | * @param session session to use (if available) | ||
199 | * @param plugin_addr address to use (if available) | ||
200 | * @param plugin_addr_len number of bytes in addr | ||
201 | * @param bandwidth assigned outbound bandwidth for the connection | ||
202 | */ | ||
203 | static void | ||
204 | ats_request_address_change (void *cls, | ||
205 | const struct GNUNET_PeerIdentity *peer, | ||
206 | const char *plugin_name, | ||
207 | struct Session *session, | ||
208 | const void *plugin_addr, | ||
209 | size_t plugin_addr_len, | ||
210 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth) | ||
211 | { | ||
212 | GNUNET_break (0); // FIXME | ||
213 | } | ||
214 | |||
215 | |||
216 | /** | ||
217 | * Function called to notify transport users that another | ||
218 | * peer connected to us. | ||
219 | * | ||
220 | * @param cls closure | ||
221 | * @param peer the peer that connected | ||
222 | * @param ats performance data | ||
223 | * @param ats_count number of entries in ats (excluding 0-termination) | ||
224 | */ | ||
225 | static void | ||
226 | neighbours_connect_notification (void *cls, | ||
227 | const struct GNUNET_PeerIdentity * peer, | ||
228 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | ||
229 | uint32_t ats_count) | ||
230 | { | ||
231 | GNUNET_break (0); // FIXME | ||
232 | } | ||
233 | |||
234 | |||
235 | /** | ||
236 | * Function called to notify transport users that another | ||
237 | * peer disconnected from us. | ||
238 | * | ||
239 | * @param cls closure | ||
240 | * @param peer the peer that disconnected | ||
241 | */ | ||
242 | static void | ||
243 | neighbours_disconnect_notification (void *cls, | ||
244 | const struct GNUNET_PeerIdentity *peer) | ||
245 | { | ||
246 | GNUNET_break (0); // FIXME | ||
182 | } | 247 | } |
183 | 248 | ||
184 | 249 | ||
@@ -282,11 +347,11 @@ run (void *cls, | |||
282 | &plugin_env_address_change_notification, | 347 | &plugin_env_address_change_notification, |
283 | &plugin_env_session_end); | 348 | &plugin_env_session_end); |
284 | GST_ats = GNUNET_ATS_init (GST_cfg, | 349 | GST_ats = GNUNET_ATS_init (GST_cfg, |
285 | NULL, // FIXME... | 350 | &ats_request_address_change, |
286 | NULL); // FIXME... | 351 | NULL); |
287 | GST_neighbours_start (NULL, // FIXME... | 352 | GST_neighbours_start (NULL, |
288 | NULL, // FIXME... | 353 | &neighbours_connect_notification, |
289 | NULL); // FIXME... | 354 | &neighbours_disconnect_notification); |
290 | GST_clients_start (server); | 355 | GST_clients_start (server); |
291 | GST_validation_start (); | 356 | GST_validation_start (); |
292 | } | 357 | } |