aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_manipulation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport_manipulation.h')
-rw-r--r--src/transport/gnunet-service-transport_manipulation.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/transport/gnunet-service-transport_manipulation.h b/src/transport/gnunet-service-transport_manipulation.h
index 8a3ab9849..1f87de249 100644
--- a/src/transport/gnunet-service-transport_manipulation.h
+++ b/src/transport/gnunet-service-transport_manipulation.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2010,2011 Christian Grothoff (and other contributing authors) 3 Copyright (C) 2010-2015 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -20,7 +20,8 @@
20 20
21/** 21/**
22 * @file transport/gnunet-service-transport_neighbours.h 22 * @file transport/gnunet-service-transport_neighbours.h
23 * @brief neighbour management API 23 * @brief neighbour manipulation API, allows manipulation of
24 * performance metrics (delay and towards ATS)
24 * @author Christian Grothoff 25 * @author Christian Grothoff
25 */ 26 */
26#ifndef GNUNET_SERVICE_TRANSPORT_MANIPULATION_H 27#ifndef GNUNET_SERVICE_TRANSPORT_MANIPULATION_H
@@ -44,10 +45,11 @@
44 * @param client client sending message 45 * @param client client sending message
45 * @param message containing information 46 * @param message containing information
46 */ 47 */
47
48void 48void
49GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client, 49GST_manipulation_set_metric (void *cls,
50 const struct GNUNET_MessageHeader *message); 50 struct GNUNET_SERVER_Client *client,
51 const struct GNUNET_MessageHeader *message);
52
51 53
52/** 54/**
53 * Adapter function between transport's send function and transport plugins 55 * Adapter function between transport's send function and transport plugins
@@ -61,9 +63,12 @@ GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client,
61 */ 63 */
62void 64void
63GST_manipulation_send (const struct GNUNET_PeerIdentity *target, 65GST_manipulation_send (const struct GNUNET_PeerIdentity *target,
64 const void *msg, size_t msg_size, 66 const void *msg,
65 struct GNUNET_TIME_Relative timeout, 67 size_t msg_size,
66 GST_NeighbourSendContinuation cont, void *cont_cls); 68 struct GNUNET_TIME_Relative timeout,
69 GST_NeighbourSendContinuation cont,
70 void *cont_cls);
71
67 72
68/** 73/**
69 * Adapter function between transport plugins and transport receive function 74 * Adapter function between transport plugins and transport receive function
@@ -86,18 +91,14 @@ GST_manipulation_recv (void *cls,
86 * Function that will be called to manipulate ATS information according to 91 * Function that will be called to manipulate ATS information according to
87 * current manipulation settings 92 * current manipulation settings
88 * 93 *
89 * @param peer the peer
90 * @param address binary address 94 * @param address binary address
91 * @param session the session 95 * @param session the session
92 * @param ats the ats information 96 * @param prop[IN|OUT] metrics to modify
93 * @param ats_count the number of ats information
94 * @return modified @a ats information
95 */ 97 */
96struct GNUNET_ATS_Information * 98void
97GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address, 99GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address,
98 struct Session *session, 100 struct Session *session,
99 const struct GNUNET_ATS_Information *ats, 101 struct GNUNET_ATS_Properties *prop);
100 uint32_t ats_count);
101 102
102 103
103/** 104/**
@@ -108,19 +109,19 @@ GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address,
108void 109void
109GST_manipulation_peer_disconnect (const struct GNUNET_PeerIdentity *peer); 110GST_manipulation_peer_disconnect (const struct GNUNET_PeerIdentity *peer);
110 111
112
111/** 113/**
112 * Initialize traffic manipulation 114 * Initialize traffic manipulation
113 *
114 * @param GST_cfg configuration handle
115 */ 115 */
116void 116void
117GST_manipulation_init (const struct GNUNET_CONFIGURATION_Handle *GST_cfg); 117GST_manipulation_init (void);
118
118 119
119/** 120/**
120 * Stop traffic manipulation 121 * Stop traffic manipulation
121 */ 122 */
122void 123void
123GST_manipulation_stop (); 124GST_manipulation_stop (void);
124 125
125#endif 126#endif
126/* end of file gnunet-service-transport_neighbours.h */ 127/* end of file gnunet-service-transport_neighbours.h */