aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.h')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.h89
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 */
42void 42void
43GST_neighbours_start(unsigned int max_fds); 43GST_neighbours_start (unsigned int max_fds);
44 44
45 45
46/** 46/**
47 * Cleanup the neighbours subsystem. 47 * Cleanup the neighbours subsystem.
48 */ 48 */
49void 49void
50GST_neighbours_stop(void); 50GST_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 */
59int 59int
60GST_neighbours_test_connected(const struct GNUNET_PeerIdentity *target); 60GST_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 */
88void 88void
89GST_neighbours_send(const struct GNUNET_PeerIdentity *target, 89GST_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 */
107struct GNUNET_TIME_Relative 107struct GNUNET_TIME_Relative
108GST_neighbours_calculate_receive_delay(const struct GNUNET_PeerIdentity *sender, 108GST_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 */
120void 121void
121GST_neighbours_keepalive(const struct GNUNET_PeerIdentity *neighbour, 122GST_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 */
133void 134void
134GST_neighbours_keepalive_response(const struct GNUNET_PeerIdentity *neighbour, 135GST_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 */
143void 144void
144GST_neighbours_force_disconnect(const struct GNUNET_PeerIdentity *target); 145GST_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 */
174void 175void
175GST_neighbours_iterate(GST_NeighbourIterator cb, void *cb_cls); 176GST_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 */
186int 187int
187GST_neighbours_session_terminated(const struct GNUNET_PeerIdentity *peer, 188GST_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 */
199void 200void
200GST_neighbours_notify_data_recv(const struct GNUNET_HELLO_Address *address, 201GST_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 */
213void 214void
214GST_neighbours_notify_data_sent(const struct GNUNET_HELLO_Address *address, 215GST_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 */
228void 229void
229GST_neighbours_switch_to_address(const struct GNUNET_HELLO_Address *address, 230GST_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 */
243int 246int
244GST_neighbours_handle_session_syn(const struct GNUNET_MessageHeader *message, 247GST_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 */
257int 260int
258GST_neighbours_handle_session_syn_ack(const struct GNUNET_MessageHeader *message, 261GST_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 */
273int 278int
274GST_neighbours_handle_session_ack(const struct GNUNET_MessageHeader *message, 279GST_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 */
285const struct GNUNET_HELLO_Address * 290const struct GNUNET_HELLO_Address *
286GST_neighbour_get_current_address(const struct GNUNET_PeerIdentity *peer); 291GST_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 */
296void 301void
297GST_neighbours_handle_quota_message(const struct GNUNET_PeerIdentity *peer, 302GST_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 */
308void 313void
309GST_neighbours_handle_disconnect_message(const struct GNUNET_PeerIdentity *peer, 314GST_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