diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-02-05 16:02:05 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-02-05 16:02:05 +0000 |
commit | b839234911d97f59e81a8851f2ee873541776dc0 (patch) | |
tree | 53e4075cc0b8a6be6ceb3060641b905cb5b7efb9 /src/include/gnunet_transport_service.h | |
parent | 5b8d8b20b1173decf43ab53bb0d431cc35553c3e (diff) | |
download | gnunet-b839234911d97f59e81a8851f2ee873541776dc0.tar.gz gnunet-b839234911d97f59e81a8851f2ee873541776dc0.zip |
docu
Diffstat (limited to 'src/include/gnunet_transport_service.h')
-rw-r--r-- | src/include/gnunet_transport_service.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 00b06c44f..5fb46a182 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -289,6 +289,31 @@ GNUNET_TRANSPORT_check_neighbour_connected (struct GNUNET_TRANSPORT_Handle *hand | |||
289 | const struct GNUNET_PeerIdentity *peer); | 289 | const struct GNUNET_PeerIdentity *peer); |
290 | 290 | ||
291 | 291 | ||
292 | /** | ||
293 | * Set transport metrics for a peer and a direction | ||
294 | * | ||
295 | * @param handle transport handle | ||
296 | * @param peer the peer to set the metric for | ||
297 | * @param direction can be: TM_SEND, TM_RECV, TM_BOTH | ||
298 | * @param ats the metric as ATS information | ||
299 | * @param ats_count the number of metrics | ||
300 | * | ||
301 | * Supported ATS values: | ||
302 | * GNUNET_ATS_QUALITY_NET_DELAY (value in ms) | ||
303 | * GNUNET_ATS_QUALITY_NET_DISTANCE (value in #hops) | ||
304 | * | ||
305 | * Example | ||
306 | * To enforce a delay of 10 ms for peer p1 in sending direction use: | ||
307 | * | ||
308 | * struct GNUNET_ATS_Information ats; | ||
309 | * ats.type = ntohl (GNUNET_ATS_QUALITY_NET_DELAY); | ||
310 | * ats.value = ntohl (10); | ||
311 | * GNUNET_TRANSPORT_set_traffic_metric (th, p1, TM_SEND, &ats, 1); | ||
312 | * | ||
313 | * Note: | ||
314 | * Delay restrictions in receiving direction will be enforced with | ||
315 | * 1 message delay. | ||
316 | */ | ||
292 | void | 317 | void |
293 | GNUNET_TRANSPORT_set_traffic_metric (struct GNUNET_TRANSPORT_Handle *handle, | 318 | GNUNET_TRANSPORT_set_traffic_metric (struct GNUNET_TRANSPORT_Handle *handle, |
294 | const struct GNUNET_PeerIdentity *peer, | 319 | const struct GNUNET_PeerIdentity *peer, |