SET service: accurate results for symmetric mode
[oweals/gnunet.git] / src / include / gnunet_transport_plugin.h
index 8ebb3a92bdf61c20d1911d6549f6941b816335e9..0b0be1fb978c45b858c27b0b94467c528a94b469 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2009-2014 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009-2014 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -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.
 */
 
 /**
@@ -80,15 +80,13 @@ typedef void
  * @param cls unused
  * @param address the address
  * @param session the new session
- * @param ats ats information
- * @param ats_count number of @a ats information
+ * @param net network information
  */
 typedef void
 (*GNUNET_TRANSPORT_SessionStart) (void *cls,
                                   const struct GNUNET_HELLO_Address *address,
                                   struct Session *session,
-                                  const struct GNUNET_ATS_Information *ats,
-                                  uint32_t ats_count);
+                                  enum GNUNET_ATS_Network_Type net);
 
 
 /**
@@ -137,22 +135,16 @@ typedef enum GNUNET_ATS_Network_Type
 
 
 /**
- * Function called when quality properties of an address change.
+ * Function called when distance of an address changes.
  *
  * @param cls closure
  * @param peer peer
- * @param address address
- * @param address_len length of the @a address
- * @param session session
- * @param ats ATS information
- * @param ats_count number entries in the @a ats array
+ * @param distance new distance
  */
 typedef void
-(*GNUNET_TRANSPORT_UpdateAddressMetrics) (void *cls,
-                                         const struct GNUNET_HELLO_Address *address,
-                                         struct Session *session,
-                                         const struct GNUNET_ATS_Information *ats,
-                                         uint32_t ats_count);
+(*GNUNET_TRANSPORT_UpdateAddressDistance) (void *cls,
+                                           const struct GNUNET_HELLO_Address *address,
+                                           uint32_t distance);
 
 
 /**
@@ -192,38 +184,6 @@ typedef struct GNUNET_TIME_Relative
                                    size_t amount_recved);
 
 
-/**
- * Function to be called by the plugin to be notified about changes to the quota
- * for a specific peer, plugin and session
- *
- * @param cls closure
- * @param peer the peer to be notified about
- * @param plugin the plugin to be notified about
- * @param session the session for include in the notification
- *
- */
-typedef void
-(*GNUNET_TRANSPORT_RegisterQuotaNotification) (void *cls,
-                                               const struct GNUNET_PeerIdentity *peer,
-                                               const char *plugin,
-                                               struct Session *session);
-
-
-/**
- * Function to be called by the plugin to stop notification about changes to the quota
- * for a specific peer, plugin and session
- *
- * @param cls closure
- * @param peer the peer to be notified about
- * @param plugin the plugin to be notified about
- * @param session the session for include in the notification
- */
-typedef void
-(*GNUNET_TRANSPORT_UnregisterQuotaNotification) (void *cls,
-                                                 const struct GNUNET_PeerIdentity *peer,
-                                                 const char *plugin,
-                                                 struct Session *session);
-
 /**
  * Function that returns a HELLO message.
  *
@@ -301,20 +261,10 @@ struct GNUNET_TRANSPORT_PluginEnvironment
   GNUNET_TRANSPORT_AddressToType get_address_type;
 
   /**
-   * Function that will be called to figure if an address is an loopback,
-   * LAN, WAN etc. address
-   */
-  GNUNET_TRANSPORT_UpdateAddressMetrics update_address_metrics;
-
-  /**
-   * FIXME: document!
-   */
-  GNUNET_TRANSPORT_RegisterQuotaNotification register_quota_notification;
-
-  /**
-   * FIXME: document!
+   * Function that will be called by DV to update distance for
+   * an address.
    */
-  GNUNET_TRANSPORT_UnregisterQuotaNotification unregister_quota_notification;
+  GNUNET_TRANSPORT_UpdateAddressDistance update_address_distance;
 
   /**
    * What is the maximum number of connections that this transport
@@ -533,7 +483,6 @@ typedef void
                                           struct Session *session);
 
 
-
 /**
  * Function that will be called whenever the transport service wants to
  * notify the plugin that the inbound quota changed and that the plugin