aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_manipulation.h
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-28 13:49:14 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-28 13:49:14 +0000
commitff71fa2f71ad29c1972efd0e57937459a0976389 (patch)
treeb3d6741a74d8f923277538e5a82a88449734ad50 /src/transport/gnunet-service-transport_manipulation.h
parent80a7c5fe311c13c34411440a98d6d0398c7d3fe6 (diff)
downloadgnunet-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.h40
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
41GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client, 41GST_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 */
44void 54void
45GST_manipulation_send (const struct GNUNET_PeerIdentity *target, const void *msg, 55GST_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 */
49struct GNUNET_TIME_Relative 72struct GNUNET_TIME_Relative
50GST_manipulation_recv (void *cls, 73GST_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 */
74void 102void
75GST_manipulation_init (const struct GNUNET_CONFIGURATION_Handle *GST_cfg, 103GST_manipulation_init (const struct GNUNET_CONFIGURATION_Handle *GST_cfg);
76 GNUNET_TRANSPORT_UpdateAddressMetrics metric_update_cb);
77 104
105/**
106 * Stop traffic manipulation
107 */
78void 108void
79GST_manipulation_stop (); 109GST_manipulation_stop ();
80 110