aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_validation.h
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-15 17:18:11 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-15 17:18:11 +0000
commit2368c95a00afc72a8f03ab67bca1ff41328eecdf (patch)
tree3bcbc29808d7e91c85ca60ac5c998374b458862e /src/transport/gnunet-service-transport_validation.h
parentb0144a11f14f33ab010fd7cf8c61bdd361f20fd3 (diff)
downloadgnunet-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/gnunet-service-transport_validation.h')
-rw-r--r--src/transport/gnunet-service-transport_validation.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index e07afc409..d117faca5 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -31,6 +31,26 @@
31#include "gnunet_util_lib.h" 31#include "gnunet_util_lib.h"
32#include "gnunet_hello_lib.h" 32#include "gnunet_hello_lib.h"
33 33
34/**
35 * Function called for each address (or address status change) that
36 * the validation module is aware of (for the given target).
37 *
38 * @param cls closure
39 * @param public_key public key for the peer, never NULL
40 * @param valid_until is ZERO if we never validated the address,
41 * otherwise a time up to when we consider it (or was) valid
42 * @param validation_block is FOREVER if the address is for an unsupported plugin (from PEERINFO)
43 * is ZERO if the address is considered valid (no validation needed)
44 * otherwise a time in the future if we're currently denying re-validation
45 * @param address the address
46 */
47typedef void (*GST_ValidationChangedCallback) (void *cls,
48 const struct GNUNET_PeerIdentity *peer,
49 const struct GNUNET_HELLO_Address *address,
50 struct GNUNET_TIME_Absolute last_validation,
51 struct GNUNET_TIME_Absolute valid_until,
52 struct GNUNET_TIME_Absolute next_validation,
53 enum GNUNET_TRANSPORT_ValidationState state);
34 54
35/** 55/**
36 * Start the validation subsystem. 56 * Start the validation subsystem.
@@ -38,7 +58,7 @@
38 * @param max_fds maximum number of fds to use 58 * @param max_fds maximum number of fds to use
39 */ 59 */
40void 60void
41GST_validation_start (unsigned int max_fds); 61GST_validation_start (GST_ValidationChangedCallback cb, void *cb_cls, unsigned int max_fds);
42 62
43 63
44/** 64/**
@@ -79,6 +99,14 @@ GST_validation_get_address_latency (const struct GNUNET_PeerIdentity *sender,
79 const struct GNUNET_HELLO_Address *address, 99 const struct GNUNET_HELLO_Address *address,
80 struct Session *session); 100 struct Session *session);
81 101
102/**
103 * Iterate over all iteration entries
104 *
105 * @param cb function to call
106 * @param cb_cls closure for cb
107 */
108void
109GST_validation_iterate (GST_ValidationChangedCallback cb, void *cb_cls);
82 110
83/** 111/**
84 * We've received a PING. If appropriate, generate a PONG. 112 * We've received a PING. If appropriate, generate a PONG.