aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-02-02 17:38:22 +0000
committerChristian Grothoff <christian@grothoff.org>2014-02-02 17:38:22 +0000
commit769c3e9561ea577ca167c74286a5cd092510a5cb (patch)
tree89c8ad4c414a61da8818b081889916ad0e06abaf /src
parentfdf369790b040af2ab491e80dab8eb1bb95151a2 (diff)
downloadgnunet-769c3e9561ea577ca167c74286a5cd092510a5cb.tar.gz
gnunet-769c3e9561ea577ca167c74286a5cd092510a5cb.zip
removing depreated 'priority' argument from GNUNET_TRANSPORT_notify_transmit_ready
Diffstat (limited to 'src')
-rw-r--r--src/ats-tests/ats-testing-traffic.c85
-rw-r--r--src/core/gnunet-service-core_neighbours.c2
-rw-r--r--src/include/gnunet_transport_service.h22
-rw-r--r--src/transport/gnunet-transport.c12
-rw-r--r--src/transport/test_quota_compliance.c4
-rw-r--r--src/transport/test_transport_api.c2
-rw-r--r--src/transport/test_transport_api_bidirectional_connect.c3
-rw-r--r--src/transport/test_transport_api_blacklisting.c4
-rw-r--r--src/transport/test_transport_api_disconnect.c2
-rw-r--r--src/transport/test_transport_api_limited_sockets.c3
-rw-r--r--src/transport/test_transport_api_manipulation_cfg.c4
-rw-r--r--src/transport/test_transport_api_manipulation_recv_tcp.c2
-rw-r--r--src/transport/test_transport_api_manipulation_send_tcp.c2
-rw-r--r--src/transport/test_transport_api_monitoring.c6
-rw-r--r--src/transport/test_transport_api_monitoring_validation.c6
-rw-r--r--src/transport/test_transport_api_reliability.c4
-rw-r--r--src/transport/test_transport_api_restart_1peer.c2
-rw-r--r--src/transport/test_transport_api_restart_2peers.c2
-rw-r--r--src/transport/test_transport_api_unreliability.c4
-rw-r--r--src/transport/test_transport_api_unreliability_constant.c4
-rw-r--r--src/transport/transport.h6
-rw-r--r--src/transport/transport_api.c31
22 files changed, 119 insertions, 93 deletions
diff --git a/src/ats-tests/ats-testing-traffic.c b/src/ats-tests/ats-testing-traffic.c
index 06a983d5c..4d5abb1d1 100644
--- a/src/ats-tests/ats-testing-traffic.c
+++ b/src/ats-tests/ats-testing-traffic.c
@@ -77,6 +77,7 @@ get_delay (struct TrafficGenerator *tg)
77 return delay; 77 return delay;
78} 78}
79 79
80
80static size_t 81static size_t
81send_ping_ready_cb (void *cls, size_t size, void *buf) 82send_ping_ready_cb (void *cls, size_t size, void *buf)
82{ 83{
@@ -96,24 +97,24 @@ send_ping_ready_cb (void *cls, size_t size, void *buf)
96 return 0; 97 return 0;
97 } 98 }
98 99
99 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Master [%u]: Sending PING to [%u]\n", 100 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
100 p->me->no, p->dest->no); 101 "Master [%u]: Sending PING to [%u]\n",
101 102 p->me->no, p->dest->no);
102 if (top->test_core) 103 if (top->test_core)
103 { 104 {
104 if (NULL == p->cth) 105 if (NULL == p->cth)
105 { 106 {
106 GNUNET_break (0); 107 GNUNET_break (0);
107 } 108 }
108 p->cth = NULL; 109 p->cth = NULL;
109 } 110 }
110 else 111 else
111 { 112 {
112 if (NULL == p->tth) 113 if (NULL == p->tth)
113 { 114 {
114 GNUNET_break (0); 115 GNUNET_break (0);
115 } 116 }
116 p->tth = NULL; 117 p->tth = NULL;
117 } 118 }
118 119
119 msg = (struct GNUNET_MessageHeader *) &msgbuf; 120 msg = (struct GNUNET_MessageHeader *) &msgbuf;
@@ -145,30 +146,32 @@ send_ping_ready_cb (void *cls, size_t size, void *buf)
145 146
146static void 147static void
147comm_schedule_send (void *cls, 148comm_schedule_send (void *cls,
148 const struct GNUNET_SCHEDULER_TaskContext* tc) 149 const struct GNUNET_SCHEDULER_TaskContext *tc)
149{ 150{
150 struct BenchmarkPartner *p = cls; 151 struct BenchmarkPartner *p = cls;
151 152
152 p->tg->send_task = GNUNET_SCHEDULER_NO_TASK; 153 p->tg->send_task = GNUNET_SCHEDULER_NO_TASK;
153
154 p->last_message_sent = GNUNET_TIME_absolute_get(); 154 p->last_message_sent = GNUNET_TIME_absolute_get();
155 if (GNUNET_YES == top->test_core) 155 if (GNUNET_YES == top->test_core)
156 { 156 {
157 p->cth = GNUNET_CORE_notify_transmit_ready ( 157 p->cth = GNUNET_CORE_notify_transmit_ready (p->me->ch, GNUNET_NO,
158 p->me->ch, GNUNET_NO, 158 GNUNET_CORE_PRIO_BEST_EFFORT,
159 GNUNET_CORE_PRIO_BEST_EFFORT, 159 GNUNET_TIME_UNIT_MINUTES,
160 GNUNET_TIME_UNIT_MINUTES, &p->dest->id, 160 &p->dest->id,
161 TEST_MESSAGE_SIZE, &send_ping_ready_cb, p); 161 TEST_MESSAGE_SIZE,
162 &send_ping_ready_cb, p);
162 } 163 }
163 else 164 else
164 { 165 {
165 p->tth = GNUNET_TRANSPORT_notify_transmit_ready ( 166 p->tth = GNUNET_TRANSPORT_notify_transmit_ready (p->me->th,
166 p->me->th, &p->dest->id, TEST_MESSAGE_SIZE, 0,GNUNET_TIME_UNIT_MINUTES, 167 &p->dest->id,
167 &send_ping_ready_cb, p); 168 TEST_MESSAGE_SIZE,
169 GNUNET_TIME_UNIT_MINUTES,
170 &send_ping_ready_cb, p);
168 } 171 }
169
170} 172}
171 173
174
172static size_t 175static size_t
173comm_send_pong_ready (void *cls, size_t size, void *buf) 176comm_send_pong_ready (void *cls, size_t size, void *buf)
174{ 177{
@@ -223,11 +226,12 @@ GNUNET_ATS_TEST_traffic_handle_ping (struct BenchmarkPartner *p)
223 { 226 {
224 GNUNET_assert (NULL == p->tth); 227 GNUNET_assert (NULL == p->tth);
225 p->tth = GNUNET_TRANSPORT_notify_transmit_ready (p->me->th, &p->dest->id, 228 p->tth = GNUNET_TRANSPORT_notify_transmit_ready (p->me->th, &p->dest->id,
226 TEST_MESSAGE_SIZE, 0, GNUNET_TIME_UNIT_MINUTES, &comm_send_pong_ready, 229 TEST_MESSAGE_SIZE, GNUNET_TIME_UNIT_MINUTES, &comm_send_pong_ready,
227 p); 230 p);
228 } 231 }
229} 232}
230 233
234
231void 235void
232GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p) 236GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p)
233{ 237{
@@ -265,9 +269,8 @@ GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p)
265 * Generate between the source master and the partner and send traffic with a 269 * Generate between the source master and the partner and send traffic with a
266 * maximum rate. 270 * maximum rate.
267 * 271 *
268 * @base_rate traffic base rate to send data with 272 * @param base_rate traffic base rate to send data with
269 * @max_rate traffic maximum rate to send data with 273 * @param max_rate traffic maximum rate to send data with
270 * @frequency
271 */ 274 */
272struct TrafficGenerator * 275struct TrafficGenerator *
273GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, 276GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src,
@@ -278,8 +281,7 @@ GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src,
278 struct GNUNET_TIME_Relative period, 281 struct GNUNET_TIME_Relative period,
279 struct GNUNET_TIME_Relative duration) 282 struct GNUNET_TIME_Relative duration)
280{ 283{
281 struct TrafficGenerator * tg; 284 struct TrafficGenerator *tg;
282 tg = NULL;
283 285
284 if (NULL != dest->tg) 286 if (NULL != dest->tg)
285 { 287 {
@@ -318,10 +320,10 @@ GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src,
318 return tg; 320 return tg;
319} 321}
320 322
323
321void 324void
322GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg) 325GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg)
323{ 326{
324
325 GNUNET_CONTAINER_DLL_remove (tg_head, tg_tail, tg); 327 GNUNET_CONTAINER_DLL_remove (tg_head, tg_tail, tg);
326 tg->dest->tg = NULL; 328 tg->dest->tg = NULL;
327 329
@@ -332,23 +334,24 @@ GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg)
332 } 334 }
333 if (top->test_core) 335 if (top->test_core)
334 { 336 {
335 if (NULL != tg->dest->cth) 337 if (NULL != tg->dest->cth)
336 { 338 {
337 GNUNET_CORE_notify_transmit_ready_cancel (tg->dest->cth); 339 GNUNET_CORE_notify_transmit_ready_cancel (tg->dest->cth);
338 tg->dest->cth = NULL; 340 tg->dest->cth = NULL;
339 } 341 }
340 } 342 }
341 else 343 else
342 { 344 {
343 if (NULL != tg->dest->tth) 345 if (NULL != tg->dest->tth)
344 { 346 {
345 GNUNET_TRANSPORT_notify_transmit_ready_cancel (tg->dest->tth); 347 GNUNET_TRANSPORT_notify_transmit_ready_cancel (tg->dest->tth);
346 tg->dest->tth = NULL; 348 tg->dest->tth = NULL;
347 } 349 }
348 } 350 }
349 GNUNET_free (tg); 351 GNUNET_free (tg);
350} 352}
351 353
354
352/** 355/**
353 * Stop all traffic generators 356 * Stop all traffic generators
354 */ 357 */
diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c
index 63ba8dbb6..ddca0859a 100644
--- a/src/core/gnunet-service-core_neighbours.c
+++ b/src/core/gnunet-service-core_neighbours.c
@@ -275,7 +275,7 @@ process_queue (struct Neighbour *n)
275 (unsigned int) m->size, GNUNET_i2s (&n->peer), 275 (unsigned int) m->size, GNUNET_i2s (&n->peer),
276 GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (m->deadline), GNUNET_NO)); 276 GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (m->deadline), GNUNET_NO));
277 n->th = 277 n->th =
278 GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, m->size, 0, 278 GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, m->size,
279 GNUNET_TIME_absolute_get_remaining 279 GNUNET_TIME_absolute_get_remaining
280 (m->deadline), &transmit_ready, 280 (m->deadline), &transmit_ready,
281 n); 281 n);
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index 7b94f2209..d4948e5ba 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -41,7 +41,7 @@ extern "C"
41/** 41/**
42 * Version number of the transport API. 42 * Version number of the transport API.
43 */ 43 */
44#define GNUNET_TRANSPORT_VERSION 0x00000000 44#define GNUNET_TRANSPORT_VERSION 0x00000001
45 45
46 46
47/** 47/**
@@ -451,6 +451,22 @@ struct GNUNET_TRANSPORT_TransmitHandle;
451 451
452 452
453/** 453/**
454 * Function called to notify a client about the connection begin ready
455 * to queue more data. @a buf will be NULL and @a size zero if the
456 * connection was closed for writing in the meantime.
457 *
458 * @param cls closure
459 * @param size number of bytes available in @a buf
460 * @param buf where the callee should write the message
461 * @return number of bytes written to @a buf
462 */
463typedef size_t
464(*GNUNET_TRANSPORT_TransmitReadyNotify) (void *cls,
465 size_t size,
466 void *buf);
467
468
469/**
454 * Check if we could queue a message of the given size for 470 * Check if we could queue a message of the given size for
455 * transmission. The transport service will take both its internal 471 * transmission. The transport service will take both its internal
456 * buffers and bandwidth limits imposed by the other peer into 472 * buffers and bandwidth limits imposed by the other peer into
@@ -459,7 +475,6 @@ struct GNUNET_TRANSPORT_TransmitHandle;
459 * @param handle connection to transport service 475 * @param handle connection to transport service
460 * @param target who should receive the message 476 * @param target who should receive the message
461 * @param size how big is the message we want to transmit? 477 * @param size how big is the message we want to transmit?
462 * @param priority how important is the message? @deprecated - remove?
463 * @param timeout after how long should we give up (and call 478 * @param timeout after how long should we give up (and call
464 * notify with buf NULL and size 0)? 479 * notify with buf NULL and size 0)?
465 * @param notify function to call when we are ready to 480 * @param notify function to call when we are ready to
@@ -473,9 +488,8 @@ struct GNUNET_TRANSPORT_TransmitHandle *
473GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle, 488GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle,
474 const struct GNUNET_PeerIdentity *target, 489 const struct GNUNET_PeerIdentity *target,
475 size_t size, 490 size_t size,
476 uint32_t priority,
477 struct GNUNET_TIME_Relative timeout, 491 struct GNUNET_TIME_Relative timeout,
478 GNUNET_CONNECTION_TransmitReadyNotify notify, 492 GNUNET_TRANSPORT_TransmitReadyNotify notify,
479 void *notify_cls); 493 void *notify_cls);
480 494
481 495
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 56df0fbf6..49c31663b 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -714,8 +714,10 @@ transmit_data (void *cls, size_t size, void *buf)
714 m->type = ntohs (GNUNET_MESSAGE_TYPE_DUMMY); 714 m->type = ntohs (GNUNET_MESSAGE_TYPE_DUMMY);
715 memset (&m[1], 52, size - sizeof(struct GNUNET_MessageHeader)); 715 memset (&m[1], 52, size - sizeof(struct GNUNET_MessageHeader));
716 traffic_sent += size; 716 traffic_sent += size;
717 th = GNUNET_TRANSPORT_notify_transmit_ready (handle, &pid, BLOCKSIZE * 1024, 717 th = GNUNET_TRANSPORT_notify_transmit_ready (handle, &pid,
718 0, GNUNET_TIME_UNIT_FOREVER_REL, &transmit_data, NULL ); 718 BLOCKSIZE * 1024,
719 GNUNET_TIME_UNIT_FOREVER_REL,
720 &transmit_data, NULL );
719 if (verbosity > 0) 721 if (verbosity > 0)
720 FPRINTF (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size, 722 FPRINTF (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size,
721 GNUNET_i2s (&pid)); 723 GNUNET_i2s (&pid));
@@ -767,8 +769,10 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
767 start_time = GNUNET_TIME_absolute_get (); 769 start_time = GNUNET_TIME_absolute_get ();
768 if (NULL == th) 770 if (NULL == th)
769 th = GNUNET_TRANSPORT_notify_transmit_ready (handle, peer, 771 th = GNUNET_TRANSPORT_notify_transmit_ready (handle, peer,
770 BLOCKSIZE * 1024, 0, GNUNET_TIME_UNIT_FOREVER_REL, &transmit_data, 772 BLOCKSIZE * 1024,
771 NULL ); 773 GNUNET_TIME_UNIT_FOREVER_REL,
774 &transmit_data,
775 NULL);
772 else 776 else
773 GNUNET_break(0); 777 GNUNET_break(0);
774 return; 778 return;
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 0dfe27c64..e1dbc17b6 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -336,7 +336,7 @@ notify_ready (void *cls, size_t size, void *buf)
336 if (n < TOTAL_MSGS) 336 if (n < TOTAL_MSGS)
337 { 337 {
338 if (th == NULL) 338 if (th == NULL)
339 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0, 339 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
340 TIMEOUT_TRANSMIT, 340 TIMEOUT_TRANSMIT,
341 &notify_ready, NULL); 341 &notify_ready, NULL);
342 msg_scheduled = n; 342 msg_scheduled = n;
@@ -384,7 +384,7 @@ static void
384sendtask () 384sendtask ()
385{ 385{
386 start_time = GNUNET_TIME_absolute_get (); 386 start_time = GNUNET_TIME_absolute_get ();
387 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0), 0, 387 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
388 TIMEOUT_TRANSMIT, &notify_ready, 388 TIMEOUT_TRANSMIT, &notify_ready,
389 NULL); 389 NULL);
390} 390}
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 0934f681c..4456c1dbf 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -238,7 +238,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
238 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 238 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
239 GNUNET_free (receiver_s); 239 GNUNET_free (receiver_s);
240 s_sending = GNUNET_YES; 240 s_sending = GNUNET_YES;
241 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0, 241 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE,
242 TIMEOUT_TRANSMIT, &notify_ready, 242 TIMEOUT_TRANSMIT, &notify_ready,
243 p1); 243 p1);
244} 244}
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c
index 5bc7d091b..64f39a4d8 100644
--- a/src/transport/test_transport_api_bidirectional_connect.c
+++ b/src/transport/test_transport_api_bidirectional_connect.c
@@ -93,6 +93,7 @@ end ()
93 GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2); 93 GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
94} 94}
95 95
96
96static void 97static void
97end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 98end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
98{ 99{
@@ -216,7 +217,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
216 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 217 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
217 GNUNET_free (receiver_s); 218 GNUNET_free (receiver_s);
218 219
219 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0, 220 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
220 TIMEOUT_TRANSMIT, &notify_ready, 221 TIMEOUT_TRANSMIT, &notify_ready,
221 p1); 222 p1);
222} 223}
diff --git a/src/transport/test_transport_api_blacklisting.c b/src/transport/test_transport_api_blacklisting.c
index 146e3477b..71f77a8db 100644
--- a/src/transport/test_transport_api_blacklisting.c
+++ b/src/transport/test_transport_api_blacklisting.c
@@ -268,11 +268,13 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
268 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 268 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
269 GNUNET_free (receiver_s); 269 GNUNET_free (receiver_s);
270 270
271 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0, 271 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
272 TEST_MESSAGE_SIZE,
272 TIMEOUT_TRANSMIT, &notify_ready, 273 TIMEOUT_TRANSMIT, &notify_ready,
273 p1); 274 p1);
274} 275}
275 276
277
276static void 278static void
277notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer) 279notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
278{ 280{
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c
index 24eaa9f71..3f8246142 100644
--- a/src/transport/test_transport_api_disconnect.c
+++ b/src/transport/test_transport_api_disconnect.c
@@ -261,7 +261,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
261 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 261 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
262 GNUNET_free (receiver_s); 262 GNUNET_free (receiver_s);
263 263
264 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0, 264 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
265 TIMEOUT_TRANSMIT, &notify_ready, 265 TIMEOUT_TRANSMIT, &notify_ready,
266 p1); 266 p1);
267} 267}
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c
index 511422aa6..617be38d4 100644
--- a/src/transport/test_transport_api_limited_sockets.c
+++ b/src/transport/test_transport_api_limited_sockets.c
@@ -202,10 +202,11 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
202 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 202 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
203 return; 203 return;
204 204
205 th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, 256, 0, TIMEOUT, 205 th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, 256, TIMEOUT,
206 &notify_ready, &p1); 206 &notify_ready, &p1);
207} 207}
208 208
209
209static void 210static void
210testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) 211testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
211{ 212{
diff --git a/src/transport/test_transport_api_manipulation_cfg.c b/src/transport/test_transport_api_manipulation_cfg.c
index c9bb5d08a..49e74ffaf 100644
--- a/src/transport/test_transport_api_manipulation_cfg.c
+++ b/src/transport/test_transport_api_manipulation_cfg.c
@@ -214,7 +214,7 @@ sendtask_request_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
214 214
215 s_sending = GNUNET_YES; 215 s_sending = GNUNET_YES;
216 start_request = GNUNET_TIME_absolute_get(); 216 start_request = GNUNET_TIME_absolute_get();
217 th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, TEST_MESSAGE_SIZE, 0, 217 th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, TEST_MESSAGE_SIZE,
218 TIMEOUT_TRANSMIT, &notify_request_ready, 218 TIMEOUT_TRANSMIT, &notify_request_ready,
219 p2); 219 p2);
220} 220}
@@ -274,7 +274,7 @@ sendtask_response_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc
274 274
275 s_sending = GNUNET_YES; 275 s_sending = GNUNET_YES;
276 start_response = GNUNET_TIME_absolute_get(); 276 start_response = GNUNET_TIME_absolute_get();
277 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0, 277 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE,
278 TIMEOUT_TRANSMIT, &notify_response_ready, 278 TIMEOUT_TRANSMIT, &notify_response_ready,
279 p1); 279 p1);
280} 280}
diff --git a/src/transport/test_transport_api_manipulation_recv_tcp.c b/src/transport/test_transport_api_manipulation_recv_tcp.c
index a91866be4..6b86e9ff1 100644
--- a/src/transport/test_transport_api_manipulation_recv_tcp.c
+++ b/src/transport/test_transport_api_manipulation_recv_tcp.c
@@ -304,7 +304,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
304 } 304 }
305 305
306 s_sending = GNUNET_YES; 306 s_sending = GNUNET_YES;
307 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0, 307 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE,
308 TIMEOUT_TRANSMIT, &notify_ready, 308 TIMEOUT_TRANSMIT, &notify_ready,
309 p1); 309 p1);
310} 310}
diff --git a/src/transport/test_transport_api_manipulation_send_tcp.c b/src/transport/test_transport_api_manipulation_send_tcp.c
index 2b7fdc250..381d7d38a 100644
--- a/src/transport/test_transport_api_manipulation_send_tcp.c
+++ b/src/transport/test_transport_api_manipulation_send_tcp.c
@@ -304,7 +304,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
304 } 304 }
305 305
306 s_sending = GNUNET_YES; 306 s_sending = GNUNET_YES;
307 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0, 307 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE,
308 TIMEOUT_TRANSMIT, &notify_ready, 308 TIMEOUT_TRANSMIT, &notify_ready,
309 p1); 309 p1);
310} 310}
diff --git a/src/transport/test_transport_api_monitoring.c b/src/transport/test_transport_api_monitoring.c
index 0767893ed..221d588ad 100644
--- a/src/transport/test_transport_api_monitoring.c
+++ b/src/transport/test_transport_api_monitoring.c
@@ -270,12 +270,14 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
270 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 270 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
271 GNUNET_free (receiver_s); 271 GNUNET_free (receiver_s);
272 s_sending = GNUNET_YES; 272 s_sending = GNUNET_YES;
273 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0, 273 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE,
274 TIMEOUT_TRANSMIT, &notify_ready, 274 TIMEOUT_TRANSMIT, &notify_ready,
275 p1); 275 p1);
276} 276}
277 277
278static void done () 278
279static void
280done ()
279{ 281{
280 if ((GNUNET_YES == p1_c) && (GNUNET_YES == p2_c) && p1_c_notify && p2_c_notify) 282 if ((GNUNET_YES == p1_c) && (GNUNET_YES == p2_c) && p1_c_notify && p2_c_notify)
281 { 283 {
diff --git a/src/transport/test_transport_api_monitoring_validation.c b/src/transport/test_transport_api_monitoring_validation.c
index c6afbb27f..80fa3e688 100644
--- a/src/transport/test_transport_api_monitoring_validation.c
+++ b/src/transport/test_transport_api_monitoring_validation.c
@@ -281,12 +281,14 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
281 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 281 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
282 GNUNET_free (receiver_s); 282 GNUNET_free (receiver_s);
283 s_sending = GNUNET_YES; 283 s_sending = GNUNET_YES;
284 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0, 284 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE,
285 TIMEOUT_TRANSMIT, &notify_ready, 285 TIMEOUT_TRANSMIT, &notify_ready,
286 p1); 286 p1);
287} 287}
288 288
289static void done () 289
290static void
291done ()
290{ 292{
291 if ((GNUNET_YES == p1_c) && (GNUNET_YES == p2_c) && p1_c_notify && p2_c_notify) 293 if ((GNUNET_YES == p1_c) && (GNUNET_YES == p2_c) && p1_c_notify && p2_c_notify)
292 { 294 {
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index 7bad5ff4e..d2a78d17f 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -327,7 +327,7 @@ notify_ready (void *cls, size_t size, void *buf)
327 if (n < TOTAL_MSGS) 327 if (n < TOTAL_MSGS)
328 { 328 {
329 if (th == NULL) 329 if (th == NULL)
330 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0, 330 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
331 TIMEOUT_TRANSMIT, 331 TIMEOUT_TRANSMIT,
332 &notify_ready, NULL); 332 &notify_ready, NULL);
333 msg_scheduled = n; 333 msg_scheduled = n;
@@ -375,7 +375,7 @@ static void
375sendtask () 375sendtask ()
376{ 376{
377 start_time = GNUNET_TIME_absolute_get (); 377 start_time = GNUNET_TIME_absolute_get ();
378 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0), 0, 378 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
379 TIMEOUT_TRANSMIT, &notify_ready, 379 TIMEOUT_TRANSMIT, &notify_ready,
380 NULL); 380 NULL);
381} 381}
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c
index 8472e29c0..f0d5d5660 100644
--- a/src/transport/test_transport_api_restart_1peer.c
+++ b/src/transport/test_transport_api_restart_1peer.c
@@ -273,7 +273,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
273 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 273 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
274 GNUNET_free (receiver_s); 274 GNUNET_free (receiver_s);
275 275
276 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0, 276 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
277 TIMEOUT_TRANSMIT, &notify_ready, 277 TIMEOUT_TRANSMIT, &notify_ready,
278 p1); 278 p1);
279} 279}
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c
index 7c1e03991..3b5d63bce 100644
--- a/src/transport/test_transport_api_restart_2peers.c
+++ b/src/transport/test_transport_api_restart_2peers.c
@@ -270,7 +270,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
270 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 270 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
271 GNUNET_free (receiver_s); 271 GNUNET_free (receiver_s);
272 272
273 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0, 273 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
274 TIMEOUT_TRANSMIT, &notify_ready, 274 TIMEOUT_TRANSMIT, &notify_ready,
275 p1); 275 p1);
276} 276}
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index 153a88685..3f40a7179 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -412,7 +412,7 @@ notify_ready (void *cls, size_t size, void *buf)
412 while ((size - ret >= s) && (n < TOTAL_MSGS)); 412 while ((size - ret >= s) && (n < TOTAL_MSGS));
413 if (n < TOTAL_MSGS) 413 if (n < TOTAL_MSGS)
414 { 414 {
415 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0, 415 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
416 TIMEOUT_TRANSMIT, 416 TIMEOUT_TRANSMIT,
417 &notify_ready, NULL); 417 &notify_ready, NULL);
418 msg_scheduled = n; 418 msg_scheduled = n;
@@ -460,7 +460,7 @@ sendtask ()
460 start_time = GNUNET_TIME_absolute_get (); 460 start_time = GNUNET_TIME_absolute_get ();
461 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting to send %u messages\n", 461 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting to send %u messages\n",
462 TOTAL_MSGS); 462 TOTAL_MSGS);
463 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0), 0, 463 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
464 TIMEOUT_TRANSMIT, &notify_ready, 464 TIMEOUT_TRANSMIT, &notify_ready,
465 NULL); 465 NULL);
466} 466}
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c
index cd5c2ce24..2ff1e4b0c 100644
--- a/src/transport/test_transport_api_unreliability_constant.c
+++ b/src/transport/test_transport_api_unreliability_constant.c
@@ -333,7 +333,7 @@ notify_ready (void *cls, size_t size, void *buf)
333 while (size - ret >= s); 333 while (size - ret >= s);
334 if (n < TOTAL_MSGS) 334 if (n < TOTAL_MSGS)
335 { 335 {
336 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0, 336 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
337 TIMEOUT_TRANSMIT, 337 TIMEOUT_TRANSMIT,
338 &notify_ready, NULL); 338 &notify_ready, NULL);
339 msg_scheduled = n; 339 msg_scheduled = n;
@@ -380,7 +380,7 @@ static void
380sendtask () 380sendtask ()
381{ 381{
382 start_time = GNUNET_TIME_absolute_get (); 382 start_time = GNUNET_TIME_absolute_get ();
383 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0), 0, 383 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
384 TIMEOUT_TRANSMIT, &notify_ready, 384 TIMEOUT_TRANSMIT, &notify_ready,
385 NULL); 385 NULL);
386} 386}
diff --git a/src/transport/transport.h b/src/transport/transport.h
index dab5415c2..eceda49d4 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -285,14 +285,14 @@ struct OutboundMessage
285{ 285{
286 286
287 /** 287 /**
288 * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_SEND 288 * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_SEND
289 */ 289 */
290 struct GNUNET_MessageHeader header; 290 struct GNUNET_MessageHeader header;
291 291
292 /** 292 /**
293 * Message priority. 293 * Always zero.
294 */ 294 */
295 uint32_t priority GNUNET_PACKED; 295 uint32_t reserved GNUNET_PACKED;
296 296
297 /** 297 /**
298 * Allowed delay. 298 * Allowed delay.
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index e892dd2ee..f6f608dfb 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -68,7 +68,7 @@ struct GNUNET_TRANSPORT_TransmitHandle
68 * Function to call when notify_size bytes are available 68 * Function to call when notify_size bytes are available
69 * for transmission. 69 * for transmission.
70 */ 70 */
71 GNUNET_CONNECTION_TransmitReadyNotify notify; 71 GNUNET_TRANSPORT_TransmitReadyNotify notify;
72 72
73 /** 73 /**
74 * Closure for notify. 74 * Closure for notify.
@@ -91,11 +91,6 @@ struct GNUNET_TRANSPORT_TransmitHandle
91 */ 91 */
92 size_t notify_size; 92 size_t notify_size;
93 93
94 /**
95 * How important is this message? Not used for control messages.
96 */
97 uint32_t priority;
98
99}; 94};
100 95
101 96
@@ -820,7 +815,7 @@ transport_notify_ready (void *cls, size_t size, void *buf)
820 GNUNET_SERVER_MAX_MESSAGE_SIZE); 815 GNUNET_SERVER_MAX_MESSAGE_SIZE);
821 obm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND); 816 obm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND);
822 obm.header.size = htons (mret + sizeof (struct OutboundMessage)); 817 obm.header.size = htons (mret + sizeof (struct OutboundMessage));
823 obm.priority = htonl (th->priority); 818 obm.reserved = htonl (0);
824 obm.timeout = 819 obm.timeout =
825 GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining 820 GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining
826 (th->timeout)); 821 (th->timeout));
@@ -888,7 +883,8 @@ schedule_transmission_task (void *cls,
888 return; /* no pending messages */ 883 return; /* no pending messages */
889 size = n->th->notify_size + sizeof (struct OutboundMessage); 884 size = n->th->notify_size + sizeof (struct OutboundMessage);
890 } 885 }
891 LOG (GNUNET_ERROR_TYPE_DEBUG, "Calling notify_transmit_ready\n"); 886 LOG (GNUNET_ERROR_TYPE_DEBUG,
887 "Calling notify_transmit_ready\n");
892 h->cth = 888 h->cth =
893 GNUNET_CLIENT_notify_transmit_ready (h->client, size, 889 GNUNET_CLIENT_notify_transmit_ready (h->client, size,
894 GNUNET_TIME_UNIT_FOREVER_REL, 890 GNUNET_TIME_UNIT_FOREVER_REL,
@@ -947,7 +943,7 @@ schedule_transmission (struct GNUNET_TRANSPORT_Handle *h)
947 */ 943 */
948static struct GNUNET_TRANSPORT_TransmitHandle * 944static struct GNUNET_TRANSPORT_TransmitHandle *
949schedule_control_transmit (struct GNUNET_TRANSPORT_Handle *h, size_t size, 945schedule_control_transmit (struct GNUNET_TRANSPORT_Handle *h, size_t size,
950 GNUNET_CONNECTION_TransmitReadyNotify notify, 946 GNUNET_TRANSPORT_TransmitReadyNotify notify,
951 void *notify_cls) 947 void *notify_cls)
952{ 948{
953 struct GNUNET_TRANSPORT_TransmitHandle *th; 949 struct GNUNET_TRANSPORT_TransmitHandle *th;
@@ -1035,7 +1031,8 @@ reconnect (void *cls,
1035 h->client = GNUNET_CLIENT_connect ("transport", h->cfg); 1031 h->client = GNUNET_CLIENT_connect ("transport", h->cfg);
1036 1032
1037 GNUNET_assert (NULL != h->client); 1033 GNUNET_assert (NULL != h->client);
1038 schedule_control_transmit (h, sizeof (struct StartMessage), &send_start, h); 1034 schedule_control_transmit (h, sizeof (struct StartMessage),
1035 &send_start, h);
1039} 1036}
1040 1037
1041 1038
@@ -1332,7 +1329,8 @@ GNUNET_TRANSPORT_set_traffic_metric (struct GNUNET_TRANSPORT_Handle *handle,
1332 msg->ats_count = htons (ats_count); 1329 msg->ats_count = htons (ats_count);
1333 msg->peer = (*peer); 1330 msg->peer = (*peer);
1334 memcpy (&msg[1], ats, ats_count * sizeof (struct GNUNET_ATS_Information)); 1331 memcpy (&msg[1], ats, ats_count * sizeof (struct GNUNET_ATS_Information));
1335 schedule_control_transmit (handle, len, &send_metric, msg); 1332 schedule_control_transmit (handle, len,
1333 &send_metric, msg);
1336} 1334}
1337 1335
1338 1336
@@ -1385,7 +1383,8 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
1385 ohh->cont = cont; 1383 ohh->cont = cont;
1386 ohh->cls = cls; 1384 ohh->cls = cls;
1387 ohh->msg = msg; 1385 ohh->msg = msg;
1388 ohh->tth = schedule_control_transmit (handle, size, &send_hello, ohh); 1386 ohh->tth = schedule_control_transmit (handle, size,
1387 &send_hello, ohh);
1389 GNUNET_CONTAINER_DLL_insert (handle->oh_head, handle->oh_tail, ohh); 1388 GNUNET_CONTAINER_DLL_insert (handle->oh_head, handle->oh_tail, ohh);
1390 return ohh; 1389 return ohh;
1391} 1390}
@@ -1542,7 +1541,7 @@ GNUNET_TRANSPORT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
1542 ret->ready_heap = 1541 ret->ready_heap =
1543 GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); 1542 GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
1544 schedule_control_transmit (ret, sizeof (struct StartMessage), 1543 schedule_control_transmit (ret, sizeof (struct StartMessage),
1545 &send_start, ret); 1544 &send_start, ret);
1546 return ret; 1545 return ret;
1547} 1546}
1548 1547
@@ -1594,7 +1593,6 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle)
1594 * @param handle connection to transport service 1593 * @param handle connection to transport service
1595 * @param target who should receive the message 1594 * @param target who should receive the message
1596 * @param size how big is the message we want to transmit? 1595 * @param size how big is the message we want to transmit?
1597 * @param priority how important is the message?
1598 * @param timeout after how long should we give up (and call 1596 * @param timeout after how long should we give up (and call
1599 * notify with buf NULL and size 0)? 1597 * notify with buf NULL and size 0)?
1600 * @param notify function to call when we are ready to 1598 * @param notify function to call when we are ready to
@@ -1607,9 +1605,9 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle)
1607struct GNUNET_TRANSPORT_TransmitHandle * 1605struct GNUNET_TRANSPORT_TransmitHandle *
1608GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle, 1606GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle,
1609 const struct GNUNET_PeerIdentity *target, 1607 const struct GNUNET_PeerIdentity *target,
1610 size_t size, uint32_t priority, 1608 size_t size,
1611 struct GNUNET_TIME_Relative timeout, 1609 struct GNUNET_TIME_Relative timeout,
1612 GNUNET_CONNECTION_TransmitReadyNotify notify, 1610 GNUNET_TRANSPORT_TransmitReadyNotify notify,
1613 void *notify_cls) 1611 void *notify_cls)
1614{ 1612{
1615 struct Neighbour *n; 1613 struct Neighbour *n;
@@ -1637,7 +1635,6 @@ GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle,
1637 th->notify_cls = notify_cls; 1635 th->notify_cls = notify_cls;
1638 th->timeout = GNUNET_TIME_relative_to_absolute (timeout); 1636 th->timeout = GNUNET_TIME_relative_to_absolute (timeout);
1639 th->notify_size = size; 1637 th->notify_size = size;
1640 th->priority = priority;
1641 n->th = th; 1638 n->th = th;
1642 /* calculate when our transmission should be ready */ 1639 /* calculate when our transmission should be ready */
1643 delay = GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker, size + n->traffic_overhead); 1640 delay = GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker, size + n->traffic_overhead);