diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-02 22:25:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-02 22:25:48 +0000 |
commit | 69c3a52cfa679175da8f06bdcb8e2e4195465e44 (patch) | |
tree | 73109126cfcf1a807c5dc1e778f40b955fc959c5 /src/transport/gnunet-service-transport_neighbours.h | |
parent | c42deb089faffd654e27bf661ce85d5c1bb38b7a (diff) | |
download | gnunet-69c3a52cfa679175da8f06bdcb8e2e4195465e44.tar.gz gnunet-69c3a52cfa679175da8f06bdcb8e2e4195465e44.zip |
avoid passing both PeerIdentity and Address (which contains PeerIdentity) if address is always present as then this is redundant
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.h')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.h | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index 744a3b913..0c07557d0 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h | |||
@@ -201,8 +201,8 @@ GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target); | |||
201 | * Function called for each neighbour. | 201 | * Function called for each neighbour. |
202 | * | 202 | * |
203 | * @param cls closure | 203 | * @param cls closure |
204 | * @param neighbour identity of the neighbour | 204 | * @param peer identity of the neighbour |
205 | * @param address the address (or NULL) | 205 | * @param address the address of the neighbour |
206 | * @param state current state the peer is in | 206 | * @param state current state the peer is in |
207 | * @param state_timeout timeout for this state | 207 | * @param state_timeout timeout for this state |
208 | * @param bandwidth_in inbound quota in NBO | 208 | * @param bandwidth_in inbound quota in NBO |
@@ -210,7 +210,7 @@ GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target); | |||
210 | */ | 210 | */ |
211 | typedef void | 211 | typedef void |
212 | (*GST_NeighbourIterator) (void *cls, | 212 | (*GST_NeighbourIterator) (void *cls, |
213 | const struct GNUNET_PeerIdentity *neighbour, | 213 | const struct GNUNET_PeerIdentity *peer, |
214 | const struct GNUNET_HELLO_Address *address, | 214 | const struct GNUNET_HELLO_Address *address, |
215 | enum GNUNET_TRANSPORT_PeerState state, | 215 | enum GNUNET_TRANSPORT_PeerState state, |
216 | struct GNUNET_TIME_Absolute state_timeout, | 216 | struct GNUNET_TIME_Absolute state_timeout, |
@@ -245,8 +245,7 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, | |||
245 | * FIXME | 245 | * FIXME |
246 | */ | 246 | */ |
247 | void | 247 | void |
248 | GST_neighbours_notify_data_recv (const struct GNUNET_PeerIdentity *peer, | 248 | GST_neighbours_notify_data_recv (const struct GNUNET_HELLO_Address *address, |
249 | const struct GNUNET_HELLO_Address *address, | ||
250 | struct Session *session, | 249 | struct Session *session, |
251 | const struct GNUNET_MessageHeader *message); | 250 | const struct GNUNET_MessageHeader *message); |
252 | 251 | ||
@@ -255,8 +254,7 @@ GST_neighbours_notify_data_recv (const struct GNUNET_PeerIdentity *peer, | |||
255 | * FIXME | 254 | * FIXME |
256 | */ | 255 | */ |
257 | void | 256 | void |
258 | GST_neighbours_notify_payload_recv (const struct GNUNET_PeerIdentity *peer, | 257 | GST_neighbours_notify_payload_recv (const struct GNUNET_HELLO_Address *address, |
259 | const struct GNUNET_HELLO_Address *address, | ||
260 | struct Session *session, | 258 | struct Session *session, |
261 | const struct GNUNET_MessageHeader *message); | 259 | const struct GNUNET_MessageHeader *message); |
262 | 260 | ||
@@ -273,8 +271,7 @@ GST_neighbours_notify_payload_sent (const struct GNUNET_PeerIdentity *peer, | |||
273 | * FIXME | 271 | * FIXME |
274 | */ | 272 | */ |
275 | void | 273 | void |
276 | GST_neighbours_notify_data_sent (const struct GNUNET_PeerIdentity *peer, | 274 | GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, |
277 | const struct GNUNET_HELLO_Address *address, | ||
278 | struct Session *session, | 275 | struct Session *session, |
279 | size_t size); | 276 | size_t size); |
280 | 277 | ||
@@ -283,16 +280,13 @@ GST_neighbours_notify_data_sent (const struct GNUNET_PeerIdentity *peer, | |||
283 | * For an existing neighbour record, set the active connection to | 280 | * For an existing neighbour record, set the active connection to |
284 | * use the given address. | 281 | * use the given address. |
285 | * | 282 | * |
286 | * @param peer identity of the peer to switch the address for | 283 | * @param address address of the other peer to start using |
287 | * @param address address of the other peer, NULL if other peer | ||
288 | * connected to us | ||
289 | * @param session session to use (or NULL) | 284 | * @param session session to use (or NULL) |
290 | * @param bandwidth_in inbound quota to be used when connection is up | 285 | * @param bandwidth_in inbound quota to be used when connection is up |
291 | * @param bandwidth_out outbound quota to be used when connection is up | 286 | * @param bandwidth_out outbound quota to be used when connection is up |
292 | */ | 287 | */ |
293 | void | 288 | void |
294 | GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | 289 | GST_neighbours_switch_to_address (const struct GNUNET_HELLO_Address *address, |
295 | const struct GNUNET_HELLO_Address *address, | ||
296 | struct Session *session, | 290 | struct Session *session, |
297 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 291 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
298 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out); | 292 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out); |
@@ -316,15 +310,12 @@ GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message, | |||
316 | * Consider switching to it. | 310 | * Consider switching to it. |
317 | * | 311 | * |
318 | * @param message possibly a `struct SessionConnectMessage` (check format) | 312 | * @param message possibly a `struct SessionConnectMessage` (check format) |
319 | * @param peer identity of the peer to switch the address for | 313 | * @param address address of the other peer |
320 | * @param address address of the other peer, NULL if other peer | ||
321 | * connected to us | ||
322 | * @param session session to use (or NULL) | 314 | * @param session session to use (or NULL) |
323 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error | 315 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error |
324 | */ | 316 | */ |
325 | int | 317 | int |
326 | GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *message, | 318 | GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *message, |
327 | const struct GNUNET_PeerIdentity *peer, | ||
328 | const struct GNUNET_HELLO_Address *address, | 319 | const struct GNUNET_HELLO_Address *address, |
329 | struct Session *session); | 320 | struct Session *session); |
330 | 321 | ||
@@ -335,15 +326,12 @@ GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *messag | |||
335 | * connected. Otherwise, do nothing. | 326 | * connected. Otherwise, do nothing. |
336 | * | 327 | * |
337 | * @param message possibly a 'struct SessionConnectMessage' (check format) | 328 | * @param message possibly a 'struct SessionConnectMessage' (check format) |
338 | * @param peer identity of the peer to switch the address for | 329 | * @param address address of the other peer |
339 | * @param address address of the other peer, NULL if other peer | ||
340 | * connected to us | ||
341 | * @param session session to use (or NULL) | 330 | * @param session session to use (or NULL) |
342 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error | 331 | * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error |
343 | */ | 332 | */ |
344 | int | 333 | int |
345 | GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, | 334 | GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, |
346 | const struct GNUNET_PeerIdentity *peer, | ||
347 | const struct GNUNET_HELLO_Address *address, | 335 | const struct GNUNET_HELLO_Address *address, |
348 | struct Session *session); | 336 | struct Session *session); |
349 | 337 | ||