aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_ats.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-05 00:53:22 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-05 00:53:22 +0000
commit15dd8e6cc1199d611d804853e134882bf13b234a (patch)
tree7cc90886eabe8d0ffa397a319e12a87042d0ba28 /src/transport/gnunet-service-transport_ats.h
parentbf6a2c9deeff7a3b384eb029d8267d6099066df3 (diff)
downloadgnunet-15dd8e6cc1199d611d804853e134882bf13b234a.tar.gz
gnunet-15dd8e6cc1199d611d804853e134882bf13b234a.zip
Various changes:
- removed "in_use" from being passed to ATS, no longer needed as we tell ATS when we cannot follow a suggestion by removing the address; simplifies the code a lot - better handling of state machine, fallback to primary session if address switch to new session timed out - nicer logging - more comments - new testcase failures, because of #3652, #3651 and #3650 (or more that i missed).
Diffstat (limited to 'src/transport/gnunet-service-transport_ats.h')
-rw-r--r--src/transport/gnunet-service-transport_ats.h43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/transport/gnunet-service-transport_ats.h b/src/transport/gnunet-service-transport_ats.h
index 53c4caa68..e2f829898 100644
--- a/src/transport/gnunet-service-transport_ats.h
+++ b/src/transport/gnunet-service-transport_ats.h
@@ -21,11 +21,6 @@
21 * @file transport/gnunet-service-transport_ats.h 21 * @file transport/gnunet-service-transport_ats.h
22 * @brief interfacing between transport and ATS service 22 * @brief interfacing between transport and ATS service
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 *
25 * FIXME:
26 * - add API to give ATS feedback about an address that was
27 * suggested but did not work out (without fully 'deleting'
28 * it forever)
29 */ 24 */
30#ifndef GNUNET_SERVICE_TRANSPORT_ATS_H 25#ifndef GNUNET_SERVICE_TRANSPORT_ATS_H
31#define GNUNET_SERVICE_TRANSPORT_ATS_H 26#define GNUNET_SERVICE_TRANSPORT_ATS_H
@@ -72,9 +67,14 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
72 struct Session *session); 67 struct Session *session);
73 68
74 69
70/* FIXME: might want to add a function to reset the
71 back-off from blocking */
72
75/** 73/**
76 * Notify ATS about the new address including the network this address is 74 * Notify ATS about the a new inbound address. We may already
77 * located in. 75 * know the address (as this is called each time we receive
76 * a message from an inbound connection). If the address is
77 * indeed new, make it available to ATS.
78 * 78 *
79 * @param address the address 79 * @param address the address
80 * @param session the session 80 * @param session the session
@@ -82,35 +82,36 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
82 * @param ats_count number of @a ats information 82 * @param ats_count number of @a ats information
83 */ 83 */
84void 84void
85GST_ats_add_address (const struct GNUNET_HELLO_Address *address, 85GST_ats_add_inbound_address (const struct GNUNET_HELLO_Address *address,
86 struct Session *session, 86 struct Session *session,
87 const struct GNUNET_ATS_Information *ats, 87 const struct GNUNET_ATS_Information *ats,
88 uint32_t ats_count); 88 uint32_t ats_count);
89 89
90 90
91/** 91/**
92 * Notify ATS about a new session now existing for the given 92 * Notify ATS about the new address including the network this address is
93 * address. 93 * located in. The address must NOT be inbound and must be new to ATS.
94 * 94 *
95 * @param address the address 95 * @param address the address
96 * @param session the session 96 * @param ats ats information
97 * @param ats_count number of @a ats information
97 */ 98 */
98void 99void
99GST_ats_new_session (const struct GNUNET_HELLO_Address *address, 100GST_ats_add_address (const struct GNUNET_HELLO_Address *address,
100 struct Session *session); 101 const struct GNUNET_ATS_Information *ats,
102 uint32_t ats_count);
101 103
102 104
103/** 105/**
104 * Notify ATS about a new session now being in use (or not). 106 * Notify ATS about a new session now existing for the given
107 * address.
105 * 108 *
106 * @param address the address 109 * @param address the address
107 * @param session the session 110 * @param session the session
108 * @param in_use #GNUNET_YES or #GNUNET_NO
109 */ 111 */
110void 112void
111GST_ats_set_in_use (const struct GNUNET_HELLO_Address *address, 113GST_ats_new_session (const struct GNUNET_HELLO_Address *address,
112 struct Session *session, 114 struct Session *session);
113 int in_use);
114 115
115 116
116/** 117/**