+#include "gnunet_hello_lib.h"
+
+
+/**
+ * Default bandwidth assigned to a network : 64 KB/s
+ */
+#define GNUNET_ATS_DefaultBandwidth 65536
+
+/**
+ * Undefined value for an `enum GNUNET_ATS_Property`
+ */
+#define GNUNET_ATS_VALUE_UNDEFINED UINT32_MAX
+
+/**
+ * String representation for GNUNET_ATS_VALUE_UNDEFINED
+ */
+#define GNUNET_ATS_VALUE_UNDEFINED_STR "undefined"
+
+/**
+ * Maximum bandwidth assigned to a network : 4095 MB/s
+ */
+#define GNUNET_ATS_MaxBandwidth UINT32_MAX
+
+/**
+ * Textual equivalent for GNUNET_ATS_MaxBandwidth
+ */
+#define GNUNET_ATS_MaxBandwidthString "unlimited"
+
+
+/**
+ * ATS performance characteristics for an address.
+ */
+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.
+ *
+ * Unit: [bytes/second]
+ */
+ uint32_t utilization_out;
+
+ /**
+ * Actual traffic on this connection from the other peer to this peer.
+ * Includes transport overhead.
+ *
+ * Unit: [bytes/second]
+ */
+ uint32_t utilization_in;
+
+ /**
+ * Distance on network layer (required for distance-vector routing)
+ * in hops. Zero for direct connections (i.e. plain TCP/UDP).
+ */
+ unsigned int distance;
+
+ /**
+ * Which network scope does the respective address belong to?
+ * This property does not change.
+ */
+ enum GNUNET_NetworkType scope;
+
+};
+
+
+/**
+ * ATS performance characteristics for an address in
+ * network byte order (for IPC).
+ */
+struct GNUNET_ATS_PropertiesNBO
+{
+
+ /**
+ * Actual traffic on this connection from this peer to the other peer.
+ * Includes transport overhead.
+ *
+ * Unit: [bytes/second]
+ */
+ uint32_t utilization_out GNUNET_PACKED;
+
+ /**
+ * Actual traffic on this connection from the other peer to this peer.
+ * Includes transport overhead.
+ *
+ * Unit: [bytes/second]
+ */
+ uint32_t utilization_in GNUNET_PACKED;
+
+ /**
+ * Which network scope does the respective address belong to?
+ * This property does not change.
+ */
+ uint32_t scope GNUNET_PACKED;
+
+ /**
+ * Distance on network layer (required for distance-vector routing)
+ * in hops. Zero for direct connections (i.e. plain TCP/UDP).
+ */
+ uint32_t distance GNUNET_PACKED;
+
+ /**
+ * Delay. Time between when the time packet is sent and the packet
+ * arrives. FOREVER if we did not measure yet.
+ */
+ struct GNUNET_TIME_RelativeNBO delay;
+
+};
+
+
+
+/* ********************* LAN Characterization library ************************ */
+/* Note: these functions do not really communicate with the ATS service */
+
+
+/**
+ * Convert ATS properties from host to network byte order.
+ *
+ * @param nbo[OUT] value written
+ * @param hbo value read
+ */
+void
+GNUNET_ATS_properties_hton (struct GNUNET_ATS_PropertiesNBO *nbo,
+ const struct GNUNET_ATS_Properties *hbo);
+
+
+/**
+ * Convert ATS properties from network to host byte order.
+ *
+ * @param hbo[OUT] value written
+ * @param nbo value read
+ */
+void
+GNUNET_ATS_properties_ntoh (struct GNUNET_ATS_Properties *hbo,
+ const struct GNUNET_ATS_PropertiesNBO *nbo);
+
+
+
+/* ********************Connection Suggestion API ***************************** */
+
+/**
+ * Handle to the ATS subsystem for making suggestions about
+ * connections the peer would like to have.
+ */
+struct GNUNET_ATS_ConnectivityHandle;
+
+/**
+ * Handle for address suggestion requests.
+ */
+struct GNUNET_ATS_ConnectivitySuggestHandle;
+
+
+/**
+ * Initialize the ATS connectivity suggestion client handle.
+ *
+ * @param cfg configuration to use
+ * @return ats connectivity handle, NULL on error
+ */
+struct GNUNET_ATS_ConnectivityHandle *
+GNUNET_ATS_connectivity_init (const struct GNUNET_CONFIGURATION_Handle *cfg);
+
+
+/**
+ * Shutdown ATS connectivity suggestion client.
+ *
+ * @param ch handle to destroy
+ */
+void
+GNUNET_ATS_connectivity_done (struct GNUNET_ATS_ConnectivityHandle *ch);
+
+
+/**
+ * We would like to establish a new connection with a peer. ATS
+ * should suggest a good address to begin with.
+ *
+ * @param ch handle
+ * @param peer identity of the peer we need an address for
+ * @param strength how urgent is the need for such a suggestion
+ * @return suggestion handle, NULL if request is already pending
+ */
+struct GNUNET_ATS_ConnectivitySuggestHandle *
+GNUNET_ATS_connectivity_suggest (struct GNUNET_ATS_ConnectivityHandle *ch,
+ const struct GNUNET_PeerIdentity *peer,
+ uint32_t strength);
+
+
+/**
+ * We no longer care about being connected to a peer.
+ *
+ * @param sh handle
+ */
+void
+GNUNET_ATS_connectivity_suggest_cancel (struct GNUNET_ATS_ConnectivitySuggestHandle *sh);