aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_validation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.h')
-rw-r--r--src/transport/gnunet-service-transport_validation.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index 06370161c..0e3c5e96d 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -46,6 +46,52 @@ GST_validation_stop (void);
46 46
47 47
48/** 48/**
49 * Update if we are using an address for a connection actively right now.
50 * Based on this, the validation module will measure latency for the
51 * address more or less often.
52 *
53 * @param sender peer sending the PING
54 * @param hdr the PING
55 * @param plugin_name name of plugin that received the PING
56 * @param session session we got the PING from
57 * @param sender_address address of the sender as known to the plugin, NULL
58 * if we did not initiate the connection
59 * @param sender_address_len number of bytes in sender_address
60 * @param in_use GNUNET_YES if we are now using the address for a connection,
61 * GNUNET_NO if we are no longer using the address for a connection
62 */
63void
64GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender,
65 const struct GNUNET_MessageHeader *hdr,
66 const char *plugin_name, struct Session *session,
67 const void *sender_address,
68 size_t sender_address_len,
69 int in_use);
70
71
72/**
73 * Query validation about the latest observed latency on a given
74 * address.
75 *
76 * @param sender peer sending the PING
77 * @param hdr the PING
78 * @param plugin_name name of plugin that received the PING
79 * @param session session we got the PING from
80 * @param sender_address address of the sender as known to the plugin, NULL
81 * if we did not initiate the connection
82 * @param sender_address_len number of bytes in sender_address
83 * @return observed latency of the address, FOREVER if the address was
84 * never successfully validated
85 */
86struct GNUNET_TIME_Relative
87GST_validation_get_address_latency (const struct GNUNET_PeerIdentity *sender,
88 const struct GNUNET_MessageHeader *hdr,
89 const char *plugin_name, struct Session *session,
90 const void *sender_address,
91 size_t sender_address_len);
92
93
94/**
49 * We've received a PING. If appropriate, generate a PONG. 95 * We've received a PING. If appropriate, generate a PONG.
50 * 96 *
51 * @param sender peer sending the PING 97 * @param sender peer sending the PING