diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-15 17:18:11 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-15 17:18:11 +0000 |
commit | 2368c95a00afc72a8f03ab67bca1ff41328eecdf (patch) | |
tree | 3bcbc29808d7e91c85ca60ac5c998374b458862e /src/transport/transport.h | |
parent | b0144a11f14f33ab010fd7cf8c61bdd361f20fd3 (diff) | |
download | gnunet-2368c95a00afc72a8f03ab67bca1ff41328eecdf.tar.gz gnunet-2368c95a00afc72a8f03ab67bca1ff41328eecdf.zip |
transport validation monitoring API (not yet complete) + CLI
+ fix for crash in transport/plugin_transport_udp.c
Diffstat (limited to 'src/transport/transport.h')
-rw-r--r-- | src/transport/transport.h | 71 |
1 files changed, 57 insertions, 14 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h index 5a2f04056..dab5415c2 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -341,15 +341,20 @@ struct AddressLookupMessage | |||
341 | }; | 341 | }; |
342 | 342 | ||
343 | 343 | ||
344 | #if 0 | ||
345 | /** | 344 | /** |
346 | * Message from the library to the transport service | 345 | * Message from the transport service to the library containing information |
347 | * asking for human readable addresses known for a peer. | 346 | * about a peer. Information contained are: |
347 | * - current address used to communicate with this peer | ||
348 | * - state | ||
349 | * - state timeout | ||
350 | * | ||
351 | * Memory layout: | ||
352 | * [AddressIterateResponseMessage][address[addrlen]][transportname[pluginlen]] | ||
348 | */ | 353 | */ |
349 | struct PeerLookupMessage | 354 | struct ValidationIterateResponseMessage |
350 | { | 355 | { |
351 | /** | 356 | /** |
352 | * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_PEER_ADDRESS_LOOKUP | 357 | * Type is #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_RESPONSE |
353 | */ | 358 | */ |
354 | struct GNUNET_MessageHeader header; | 359 | struct GNUNET_MessageHeader header; |
355 | 360 | ||
@@ -359,16 +364,59 @@ struct PeerLookupMessage | |||
359 | uint32_t reserved; | 364 | uint32_t reserved; |
360 | 365 | ||
361 | /** | 366 | /** |
362 | * timeout to give up. FIXME: remove in the future. | 367 | * Peer identity |
363 | */ | 368 | */ |
364 | struct GNUNET_TIME_RelativeNBO timeout; | 369 | struct GNUNET_PeerIdentity peer; |
370 | |||
371 | /** | ||
372 | * Local info about the address | ||
373 | */ | ||
374 | uint32_t local_address_info GNUNET_PACKED; | ||
375 | |||
376 | /** | ||
377 | * Address length | ||
378 | */ | ||
379 | uint32_t addrlen GNUNET_PACKED; | ||
380 | |||
381 | /** | ||
382 | * Length of the plugin name | ||
383 | */ | ||
384 | uint32_t pluginlen GNUNET_PACKED; | ||
385 | |||
386 | /** | ||
387 | * State | ||
388 | */ | ||
389 | uint32_t state GNUNET_PACKED; | ||
390 | |||
391 | struct GNUNET_TIME_AbsoluteNBO last_validation; | ||
392 | |||
393 | struct GNUNET_TIME_AbsoluteNBO valid_until; | ||
394 | |||
395 | struct GNUNET_TIME_AbsoluteNBO next_validation; | ||
396 | }; | ||
397 | |||
398 | /** | ||
399 | * Message from the library to the transport service | ||
400 | * asking for binary addresses known for a peer. | ||
401 | */ | ||
402 | struct ValidationMonitorMessage | ||
403 | { | ||
404 | /** | ||
405 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_REQUEST | ||
406 | */ | ||
407 | struct GNUNET_MessageHeader header; | ||
408 | |||
409 | /** | ||
410 | * One shot call or continous replies? | ||
411 | */ | ||
412 | uint32_t one_shot; | ||
365 | 413 | ||
366 | /** | 414 | /** |
367 | * The identity of the peer to look up. | 415 | * The identity of the peer to look up. |
368 | */ | 416 | */ |
369 | struct GNUNET_PeerIdentity peer; | 417 | struct GNUNET_PeerIdentity peer; |
418 | |||
370 | }; | 419 | }; |
371 | #endif | ||
372 | 420 | ||
373 | 421 | ||
374 | /** | 422 | /** |
@@ -378,7 +426,7 @@ struct PeerLookupMessage | |||
378 | struct PeerMonitorMessage | 426 | struct PeerMonitorMessage |
379 | { | 427 | { |
380 | /** | 428 | /** |
381 | * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE | 429 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST |
382 | */ | 430 | */ |
383 | struct GNUNET_MessageHeader header; | 431 | struct GNUNET_MessageHeader header; |
384 | 432 | ||
@@ -388,11 +436,6 @@ struct PeerMonitorMessage | |||
388 | uint32_t one_shot; | 436 | uint32_t one_shot; |
389 | 437 | ||
390 | /** | 438 | /** |
391 | * timeout to give up. FIXME: remove in the future | ||
392 | */ | ||
393 | struct GNUNET_TIME_AbsoluteNBO timeout; | ||
394 | |||
395 | /** | ||
396 | * The identity of the peer to look up. | 439 | * The identity of the peer to look up. |
397 | */ | 440 | */ |
398 | struct GNUNET_PeerIdentity peer; | 441 | struct GNUNET_PeerIdentity peer; |