diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-28 13:49:14 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-28 13:49:14 +0000 |
commit | ff71fa2f71ad29c1972efd0e57937459a0976389 (patch) | |
tree | b3d6741a74d8f923277538e5a82a88449734ad50 /src/transport/gnunet-service-transport_manipulation.h | |
parent | 80a7c5fe311c13c34411440a98d6d0398c7d3fe6 (diff) | |
download | gnunet-ff71fa2f71ad29c1972efd0e57937459a0976389.tar.gz gnunet-ff71fa2f71ad29c1972efd0e57937459a0976389.zip |
docu
Diffstat (limited to 'src/transport/gnunet-service-transport_manipulation.h')
-rw-r--r-- | src/transport/gnunet-service-transport_manipulation.h | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/src/transport/gnunet-service-transport_manipulation.h b/src/transport/gnunet-service-transport_manipulation.h index e9bfeddb6..091062459 100644 --- a/src/transport/gnunet-service-transport_manipulation.h +++ b/src/transport/gnunet-service-transport_manipulation.h | |||
@@ -41,11 +41,34 @@ void | |||
41 | GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client, | 41 | GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client, |
42 | const struct GNUNET_MessageHeader *message); | 42 | const struct GNUNET_MessageHeader *message); |
43 | 43 | ||
44 | /** | ||
45 | * Adapter function between transport's send function and transport plugins | ||
46 | * | ||
47 | * @param target the peer the message to send to | ||
48 | * @param msg the message received | ||
49 | * @param msg_size message size | ||
50 | * @param timeout timeout | ||
51 | * @param cont the continuation to call after sending | ||
52 | * @param cont_cls cls for continuation | ||
53 | */ | ||
44 | void | 54 | void |
45 | GST_manipulation_send (const struct GNUNET_PeerIdentity *target, const void *msg, | 55 | GST_manipulation_send (const struct GNUNET_PeerIdentity *target, |
46 | size_t msg_size, struct GNUNET_TIME_Relative timeout, | 56 | const void *msg, size_t msg_size, |
47 | GST_NeighbourSendContinuation cont, void *cont_cls); | 57 | struct GNUNET_TIME_Relative timeout, |
58 | GST_NeighbourSendContinuation cont, void *cont_cls); | ||
48 | 59 | ||
60 | /** | ||
61 | * Adapter function between transport plugins and transport receive function | ||
62 | * manipulation delays for next send. | ||
63 | * | ||
64 | * @param cls the closure for transport | ||
65 | * @param peer the peer the message was received from | ||
66 | * @param message the message received | ||
67 | * @param session the session the message was received on | ||
68 | * @param sender_address the sender address | ||
69 | * @param sender_address_len the length of the sender address | ||
70 | * @return manipulated delay for next receive | ||
71 | */ | ||
49 | struct GNUNET_TIME_Relative | 72 | struct GNUNET_TIME_Relative |
50 | GST_manipulation_recv (void *cls, | 73 | GST_manipulation_recv (void *cls, |
51 | const struct GNUNET_PeerIdentity *peer, | 74 | const struct GNUNET_PeerIdentity *peer, |
@@ -71,10 +94,17 @@ GST_manipulation_manipulate_metrics (const struct GNUNET_PeerIdentity *peer, | |||
71 | const struct GNUNET_ATS_Information *ats, | 94 | const struct GNUNET_ATS_Information *ats, |
72 | uint32_t ats_count); | 95 | uint32_t ats_count); |
73 | 96 | ||
97 | /** | ||
98 | * Initialize traffic manipulation | ||
99 | * | ||
100 | * @param GST_cfg configuration handle | ||
101 | */ | ||
74 | void | 102 | void |
75 | GST_manipulation_init (const struct GNUNET_CONFIGURATION_Handle *GST_cfg, | 103 | GST_manipulation_init (const struct GNUNET_CONFIGURATION_Handle *GST_cfg); |
76 | GNUNET_TRANSPORT_UpdateAddressMetrics metric_update_cb); | ||
77 | 104 | ||
105 | /** | ||
106 | * Stop traffic manipulation | ||
107 | */ | ||
78 | void | 108 | void |
79 | GST_manipulation_stop (); | 109 | GST_manipulation_stop (); |
80 | 110 | ||