trying to fix #4003
[oweals/gnunet.git] / src / transport / gnunet-service-transport_ats.h
index 780e66f60f88a8cb92e3a9c553de0f5185b85bfb..de0800d0a42a8114c84af2843cf8f25fb25aa88a 100644 (file)
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file transport/gnunet-service-transport_ats.h
@@ -42,17 +42,27 @@ GST_ats_done (void);
 
 
 /**
- * Test if ATS knows about this address.
+ * Test if ATS knows about this @a address and @a session.
  *
  * @param address the address
  * @param session the session
- * @return #GNUNET_YES if address is known, #GNUNET_NO if not.
+ * @return #GNUNET_YES if @a address is known, #GNUNET_NO if not.
  */
 int
 GST_ats_is_known (const struct GNUNET_HELLO_Address *address,
                   struct Session *session);
 
 
+/**
+ * Test if ATS knows about this @a address.
+ *
+ * @param address the address
+ * @return #GNUNET_YES if @a address is known, #GNUNET_NO if not.
+ */
+int
+GST_ats_is_known_no_session (const struct GNUNET_HELLO_Address *address);
+
+
 /**
  * Temporarily block a valid address for use by ATS for address
  * suggestions.  This function should be called if an address was
@@ -67,8 +77,18 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
                        struct Session *session);
 
 
-/* FIXME: might want to add a function to reset the
-   back-off from blocking */
+/**
+ * Reset address blocking time.  Resets the exponential
+ * back-off timer for this address to zero.  Done when
+ * an address was used to create a successful connection.
+ *
+ * @param address the address to reset the blocking timer
+ * @param session the session (can be NULL)
+ */
+void
+GST_ats_block_reset (const struct GNUNET_HELLO_Address *address,
+                     struct Session *session);
+
 
 /**
  * Notify ATS about the a new inbound address.  We may already