multicast, psyc, psycstore, client_manager fixes
[oweals/gnunet.git] / src / include / gnunet_ats_service.h
index 8b28f5dc709ff21bb2a1ddd3aa4be41147f10a80..616b963272aa82690f4163b718e450661d6fd26f 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 include/gnunet_ats_service.h
@@ -105,6 +105,12 @@ enum GNUNET_ATS_Network_Type
 struct GNUNET_ATS_Properties
 {
 
+  /**
+   * Delay.  Time between when the time packet is sent and the packet
+   * arrives.  FOREVER if we did not measure yet.
+   */
+  struct GNUNET_TIME_Relative delay;
+
   /**
    * Actual traffic on this connection from this peer to the other peer.
    * Includes transport overhead.
@@ -121,12 +127,6 @@ struct GNUNET_ATS_Properties
    */
   uint32_t utilization_in;
 
-  /**
-   * Which network scope does the respective address belong to?
-   * This property does not change.
-   */
-  enum GNUNET_ATS_Network_Type scope;
-
   /**
    * Distance on network layer (required for distance-vector routing)
    * in hops.  Zero for direct connections (i.e. plain TCP/UDP).
@@ -134,10 +134,10 @@ struct GNUNET_ATS_Properties
   unsigned int distance;
 
   /**
-   * Delay.  Time between when the time packet is sent and the packet
-   * arrives.  FOREVER if we did not measure yet.
+   * Which network scope does the respective address belong to?
+   * This property does not change.
    */
-  struct GNUNET_TIME_Relative delay;
+  enum GNUNET_ATS_Network_Type scope;
 
 };
 
@@ -378,20 +378,6 @@ void
 GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh);
 
 
-/**
- * Test if a address and a session is known to ATS.
- *
- * @param sh the scheduling handle
- * @param address the address
- * @param session the session
- * @return #GNUNET_YES or #GNUNET_NO
- */
-int
-GNUNET_ATS_session_known (struct GNUNET_ATS_SchedulingHandle *sh,
-                          const struct GNUNET_HELLO_Address *address,
-                          struct Session *session);
-
-
 /**
  * Handle used within ATS to track an address.
  */
@@ -485,7 +471,9 @@ struct GNUNET_ATS_PerformanceHandle;
  * Signature of a function that is called with QoS information about an address.
  *
  * @param cls closure
- * @param address the address, NULL if ATS service was disconnected
+ * @param address the address, NULL if ATS service was disconnected or
+ *        when the iteration is completed in the case of
+ *        #GNUNET_ATS_performance_list_addresses()
  * @param address_active #GNUNET_YES if this address is actively used
  *        to maintain a connection to a peer;
  *        #GNUNET_NO if the address is not actively used;
@@ -524,7 +512,6 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
                              void *addr_info_cb_cls);
 
 
-
 /**
  * Get information about addresses known to the ATS subsystem.
  *
@@ -535,7 +522,7 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
  * @param infocb callback to call with the addresses,
  *        will callback with address == NULL when done
  * @param infocb_cls closure for @a infocb
- * @return ats performance context
+ * @return handle to abort the operation
  */
 struct GNUNET_ATS_AddressListHandle *
 GNUNET_ATS_performance_list_addresses (struct GNUNET_ATS_PerformanceHandle *handle,
@@ -620,7 +607,7 @@ GNUNET_ATS_reserve_bandwidth_cancel (struct GNUNET_ATS_ReservationContext *rc);
 /**
  * ATS preference types as array initializer
  */
-#define GNUNET_ATS_PreferenceType {GNUNET_ATS_PREFERENCE_END, GNUNET_ATS_PREFERENCE_BANDWIDTH, GNUNET_ATS_PREFERENCE_LATENCY}
+#define GNUNET_ATS_PreferenceType {GNUNET_ATS_PREFERENCE_BANDWIDTH, GNUNET_ATS_PREFERENCE_LATENCY, GNUNET_ATS_PREFERENCE_END}
 
 /**
  * ATS preference types as string array initializer