diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-10 23:24:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-10 23:24:01 +0000 |
commit | 1c323bd4cbb388a9e7515a1f733a3062bf093aee (patch) | |
tree | 7cc525d79149d44840b9f7a0040aaf3e69ecd665 /src/transport/gnunet-service-transport_manipulation.h | |
parent | aedaaed687db1ff20b447378f01ad7306921450c (diff) | |
download | gnunet-1c323bd4cbb388a9e7515a1f733a3062bf093aee.tar.gz gnunet-1c323bd4cbb388a9e7515a1f733a3062bf093aee.zip |
fixing #3657 (replace ATS_Information with struct), but WIHTOUT fixing ATS testcases yet
Diffstat (limited to 'src/transport/gnunet-service-transport_manipulation.h')
-rw-r--r-- | src/transport/gnunet-service-transport_manipulation.h | 39 |
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 | |||
48 | void | 48 | void |
49 | GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client, | 49 | GST_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 | */ |
62 | void | 64 | void |
63 | GST_manipulation_send (const struct GNUNET_PeerIdentity *target, | 65 | GST_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 | */ |
96 | struct GNUNET_ATS_Information * | 98 | void |
97 | GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address, | 99 | GST_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, | |||
108 | void | 109 | void |
109 | GST_manipulation_peer_disconnect (const struct GNUNET_PeerIdentity *peer); | 110 | GST_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 | */ |
116 | void | 116 | void |
117 | GST_manipulation_init (const struct GNUNET_CONFIGURATION_Handle *GST_cfg); | 117 | GST_manipulation_init (void); |
118 | |||
118 | 119 | ||
119 | /** | 120 | /** |
120 | * Stop traffic manipulation | 121 | * Stop traffic manipulation |
121 | */ | 122 | */ |
122 | void | 123 | void |
123 | GST_manipulation_stop (); | 124 | GST_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 */ |