diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-05 15:09:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-05 15:09:28 +0200 |
commit | c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 (patch) | |
tree | cac3ce030d77b4cbe7c7dc62ed58cfe6d24f73e1 /src/transport/gnunet-service-transport_neighbours.h | |
parent | fbb71d527c7d6babf269a8fefce1db291b9f7068 (diff) | |
download | gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.tar.gz gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.zip |
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.h')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.h | 89 |
1 files changed, 48 insertions, 41 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index 2ce149cf3..13aeab4e6 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h | |||
@@ -40,14 +40,14 @@ | |||
40 | * @param max_fds maximum number of fds to use | 40 | * @param max_fds maximum number of fds to use |
41 | */ | 41 | */ |
42 | void | 42 | void |
43 | GST_neighbours_start(unsigned int max_fds); | 43 | GST_neighbours_start (unsigned int max_fds); |
44 | 44 | ||
45 | 45 | ||
46 | /** | 46 | /** |
47 | * Cleanup the neighbours subsystem. | 47 | * Cleanup the neighbours subsystem. |
48 | */ | 48 | */ |
49 | void | 49 | void |
50 | GST_neighbours_stop(void); | 50 | GST_neighbours_stop (void); |
51 | 51 | ||
52 | 52 | ||
53 | /** | 53 | /** |
@@ -57,7 +57,7 @@ GST_neighbours_stop(void); | |||
57 | * @return #GNUNET_YES if we are connected, #GNUNET_NO if not | 57 | * @return #GNUNET_YES if we are connected, #GNUNET_NO if not |
58 | */ | 58 | */ |
59 | int | 59 | int |
60 | GST_neighbours_test_connected(const struct GNUNET_PeerIdentity *target); | 60 | GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target); |
61 | 61 | ||
62 | 62 | ||
63 | /** | 63 | /** |
@@ -86,11 +86,11 @@ typedef void | |||
86 | * @param cont_cls closure for @a cont | 86 | * @param cont_cls closure for @a cont |
87 | */ | 87 | */ |
88 | void | 88 | void |
89 | GST_neighbours_send(const struct GNUNET_PeerIdentity *target, | 89 | GST_neighbours_send (const struct GNUNET_PeerIdentity *target, |
90 | const void *msg, | 90 | const void *msg, |
91 | size_t msg_size, | 91 | size_t msg_size, |
92 | struct GNUNET_TIME_Relative timeout, | 92 | struct GNUNET_TIME_Relative timeout, |
93 | GST_NeighbourSendContinuation cont, void *cont_cls); | 93 | GST_NeighbourSendContinuation cont, void *cont_cls); |
94 | 94 | ||
95 | 95 | ||
96 | /** | 96 | /** |
@@ -105,9 +105,10 @@ GST_neighbours_send(const struct GNUNET_PeerIdentity *target, | |||
105 | * @return how long to wait before reading more from this sender | 105 | * @return how long to wait before reading more from this sender |
106 | */ | 106 | */ |
107 | struct GNUNET_TIME_Relative | 107 | struct GNUNET_TIME_Relative |
108 | GST_neighbours_calculate_receive_delay(const struct GNUNET_PeerIdentity *sender, | 108 | GST_neighbours_calculate_receive_delay (const struct |
109 | ssize_t size, | 109 | GNUNET_PeerIdentity *sender, |
110 | int *do_forward); | 110 | ssize_t size, |
111 | int *do_forward); | ||
111 | 112 | ||
112 | 113 | ||
113 | /** | 114 | /** |
@@ -118,8 +119,8 @@ GST_neighbours_calculate_receive_delay(const struct GNUNET_PeerIdentity *sender, | |||
118 | * @param m the keep alive message containing the nonce to respond to | 119 | * @param m the keep alive message containing the nonce to respond to |
119 | */ | 120 | */ |
120 | void | 121 | void |
121 | GST_neighbours_keepalive(const struct GNUNET_PeerIdentity *neighbour, | 122 | GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour, |
122 | const struct GNUNET_MessageHeader *m); | 123 | const struct GNUNET_MessageHeader *m); |
123 | 124 | ||
124 | 125 | ||
125 | /** | 126 | /** |
@@ -131,8 +132,8 @@ GST_neighbours_keepalive(const struct GNUNET_PeerIdentity *neighbour, | |||
131 | * @param m the message containing the keep alive response | 132 | * @param m the message containing the keep alive response |
132 | */ | 133 | */ |
133 | void | 134 | void |
134 | GST_neighbours_keepalive_response(const struct GNUNET_PeerIdentity *neighbour, | 135 | GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour, |
135 | const struct GNUNET_MessageHeader *m); | 136 | const struct GNUNET_MessageHeader *m); |
136 | 137 | ||
137 | 138 | ||
138 | /** | 139 | /** |
@@ -141,7 +142,7 @@ GST_neighbours_keepalive_response(const struct GNUNET_PeerIdentity *neighbour, | |||
141 | * @param target peer to disconnect from | 142 | * @param target peer to disconnect from |
142 | */ | 143 | */ |
143 | void | 144 | void |
144 | GST_neighbours_force_disconnect(const struct GNUNET_PeerIdentity *target); | 145 | GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target); |
145 | 146 | ||
146 | 147 | ||
147 | /** | 148 | /** |
@@ -172,7 +173,7 @@ typedef void | |||
172 | * @param cb_cls closure for @a cb | 173 | * @param cb_cls closure for @a cb |
173 | */ | 174 | */ |
174 | void | 175 | void |
175 | GST_neighbours_iterate(GST_NeighbourIterator cb, void *cb_cls); | 176 | GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls); |
176 | 177 | ||
177 | 178 | ||
178 | /** | 179 | /** |
@@ -184,8 +185,8 @@ GST_neighbours_iterate(GST_NeighbourIterator cb, void *cb_cls); | |||
184 | * this session was not in use | 185 | * this session was not in use |
185 | */ | 186 | */ |
186 | int | 187 | int |
187 | GST_neighbours_session_terminated(const struct GNUNET_PeerIdentity *peer, | 188 | GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, |
188 | struct GNUNET_ATS_Session *session); | 189 | struct GNUNET_ATS_Session *session); |
189 | 190 | ||
190 | 191 | ||
191 | /** | 192 | /** |
@@ -197,8 +198,8 @@ GST_neighbours_session_terminated(const struct GNUNET_PeerIdentity *peer, | |||
197 | * @param message the message we received (really only the size is used) | 198 | * @param message the message we received (really only the size is used) |
198 | */ | 199 | */ |
199 | void | 200 | void |
200 | GST_neighbours_notify_data_recv(const struct GNUNET_HELLO_Address *address, | 201 | GST_neighbours_notify_data_recv (const struct GNUNET_HELLO_Address *address, |
201 | const struct GNUNET_MessageHeader *message); | 202 | const struct GNUNET_MessageHeader *message); |
202 | 203 | ||
203 | 204 | ||
204 | /** | 205 | /** |
@@ -211,9 +212,9 @@ GST_neighbours_notify_data_recv(const struct GNUNET_HELLO_Address *address, | |||
211 | * @param message the message we sent (really only the size is used) | 212 | * @param message the message we sent (really only the size is used) |
212 | */ | 213 | */ |
213 | void | 214 | void |
214 | GST_neighbours_notify_data_sent(const struct GNUNET_HELLO_Address *address, | 215 | GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, |
215 | struct GNUNET_ATS_Session *session, | 216 | struct GNUNET_ATS_Session *session, |
216 | size_t size); | 217 | size_t size); |
217 | 218 | ||
218 | 219 | ||
219 | /** | 220 | /** |
@@ -226,10 +227,12 @@ GST_neighbours_notify_data_sent(const struct GNUNET_HELLO_Address *address, | |||
226 | * @param bandwidth_out outbound quota to be used when connection is up | 227 | * @param bandwidth_out outbound quota to be used when connection is up |
227 | */ | 228 | */ |
228 | void | 229 | void |
229 | GST_neighbours_switch_to_address(const struct GNUNET_HELLO_Address *address, | 230 | GST_neighbours_switch_to_address (const struct GNUNET_HELLO_Address *address, |
230 | struct GNUNET_ATS_Session *session, | 231 | struct GNUNET_ATS_Session *session, |
231 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 232 | struct GNUNET_BANDWIDTH_Value32NBO |
232 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out); | 233 | bandwidth_in, |
234 | struct GNUNET_BANDWIDTH_Value32NBO | ||
235 | bandwidth_out); | ||
233 | 236 | ||
234 | 237 | ||
235 | /** | 238 | /** |
@@ -241,8 +244,8 @@ GST_neighbours_switch_to_address(const struct GNUNET_HELLO_Address *address, | |||
241 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error | 244 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error |
242 | */ | 245 | */ |
243 | int | 246 | int |
244 | GST_neighbours_handle_session_syn(const struct GNUNET_MessageHeader *message, | 247 | GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message, |
245 | const struct GNUNET_PeerIdentity *peer); | 248 | const struct GNUNET_PeerIdentity *peer); |
246 | 249 | ||
247 | 250 | ||
248 | /** | 251 | /** |
@@ -255,9 +258,11 @@ GST_neighbours_handle_session_syn(const struct GNUNET_MessageHeader *message, | |||
255 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error | 258 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error |
256 | */ | 259 | */ |
257 | int | 260 | int |
258 | GST_neighbours_handle_session_syn_ack(const struct GNUNET_MessageHeader *message, | 261 | GST_neighbours_handle_session_syn_ack (const struct |
259 | const struct GNUNET_HELLO_Address *address, | 262 | GNUNET_MessageHeader *message, |
260 | struct GNUNET_ATS_Session *session); | 263 | const struct |
264 | GNUNET_HELLO_Address *address, | ||
265 | struct GNUNET_ATS_Session *session); | ||
261 | 266 | ||
262 | 267 | ||
263 | /** | 268 | /** |
@@ -271,9 +276,9 @@ GST_neighbours_handle_session_syn_ack(const struct GNUNET_MessageHeader *message | |||
271 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error | 276 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error |
272 | */ | 277 | */ |
273 | int | 278 | int |
274 | GST_neighbours_handle_session_ack(const struct GNUNET_MessageHeader *message, | 279 | GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, |
275 | const struct GNUNET_HELLO_Address *address, | 280 | const struct GNUNET_HELLO_Address *address, |
276 | struct GNUNET_ATS_Session *session); | 281 | struct GNUNET_ATS_Session *session); |
277 | 282 | ||
278 | 283 | ||
279 | /** | 284 | /** |
@@ -283,7 +288,7 @@ GST_neighbours_handle_session_ack(const struct GNUNET_MessageHeader *message, | |||
283 | * @return address currently used | 288 | * @return address currently used |
284 | */ | 289 | */ |
285 | const struct GNUNET_HELLO_Address * | 290 | const struct GNUNET_HELLO_Address * |
286 | GST_neighbour_get_current_address(const struct GNUNET_PeerIdentity *peer); | 291 | GST_neighbour_get_current_address (const struct GNUNET_PeerIdentity *peer); |
287 | 292 | ||
288 | 293 | ||
289 | /** | 294 | /** |
@@ -294,8 +299,8 @@ GST_neighbour_get_current_address(const struct GNUNET_PeerIdentity *peer); | |||
294 | * @param msg the quota message | 299 | * @param msg the quota message |
295 | */ | 300 | */ |
296 | void | 301 | void |
297 | GST_neighbours_handle_quota_message(const struct GNUNET_PeerIdentity *peer, | 302 | GST_neighbours_handle_quota_message (const struct GNUNET_PeerIdentity *peer, |
298 | const struct GNUNET_MessageHeader *msg); | 303 | const struct GNUNET_MessageHeader *msg); |
299 | 304 | ||
300 | 305 | ||
301 | /** | 306 | /** |
@@ -306,8 +311,10 @@ GST_neighbours_handle_quota_message(const struct GNUNET_PeerIdentity *peer, | |||
306 | * @param msg the disconnect message | 311 | * @param msg the disconnect message |
307 | */ | 312 | */ |
308 | void | 313 | void |
309 | GST_neighbours_handle_disconnect_message(const struct GNUNET_PeerIdentity *peer, | 314 | GST_neighbours_handle_disconnect_message (const struct |
310 | const struct GNUNET_MessageHeader *msg); | 315 | GNUNET_PeerIdentity *peer, |
316 | const struct | ||
317 | GNUNET_MessageHeader *msg); | ||
311 | 318 | ||
312 | 319 | ||
313 | #endif | 320 | #endif |