move GNUNET_TRANSPORT_ATS_ to GNUNET_ATS_
authorChristian Grothoff <christian@grothoff.org>
Mon, 17 Oct 2011 07:55:41 +0000 (07:55 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 17 Oct 2011 07:55:41 +0000 (07:55 +0000)
97 files changed:
src/ats-test/test_transport_ats_multiple_peers.c
src/ats/ats.h
src/ats/ats_api.c
src/ats/ats_api.h
src/ats/ats_api_performance.c
src/ats/ats_api_scheduling.c
src/ats/gnunet-service-ats_addresses.c
src/ats/gnunet-service-ats_addresses.h
src/ats/gnunet-service-ats_math.c
src/ats/gnunet-service-ats_math.h
src/ats/gnunet-service-ats_performance.c
src/ats/gnunet-service-ats_performance.h
src/ats/gnunet-service-ats_scheduling.c
src/ats/gnunet-service-ats_scheduling.h
src/ats/test_ats_api_bandwidth_consumption.c
src/ats/test_ats_api_scheduling.c
src/ats/test_ats_api_update_address.c
src/chat/gnunet-service-chat.c
src/core/core.h
src/core/core_api.c
src/core/core_api_iterate_peers.c
src/core/gnunet-core-list-connections.c
src/core/gnunet-service-core.c
src/core/gnunet-service-core_clients.c
src/core/gnunet-service-core_clients.h
src/core/gnunet-service-core_kx.c
src/core/gnunet-service-core_kx.h
src/core/gnunet-service-core_neighbours.c
src/core/gnunet-service-core_sessions.c
src/core/test_core_api.c
src/core/test_core_api_reliability.c
src/core/test_core_api_send_to_self.c
src/core/test_core_api_start_only.c
src/core/test_core_quota_compliance.c
src/dht/gnunet-service-dht_neighbours.c
src/dv/gnunet-service-dv.c
src/dv/plugin_transport_dv.c
src/dv/test_transport_api_dv.c
src/fs/gnunet-service-fs.c
src/fs/gnunet-service-fs_cp.c
src/fs/gnunet-service-fs_cp.h
src/hostlist/gnunet-daemon-hostlist.c
src/hostlist/hostlist-client.c
src/hostlist/hostlist-server.c
src/hostlist/test_gnunet_daemon_hostlist.c
src/hostlist/test_gnunet_daemon_hostlist_learning.c
src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
src/include/gnunet_ats_service.h
src/include/gnunet_core_service.h
src/include/gnunet_mesh_service.h
src/include/gnunet_mesh_service_new.h
src/include/gnunet_transport_plugin.h
src/include/gnunet_transport_service.h
src/mesh/gnunet-service-mesh.c
src/mesh/mesh_api.c
src/mesh/mesh_api_new.c
src/mesh/test_mesh_api.c
src/mesh/test_mesh_local_1.c
src/mesh/test_mesh_local_2.c
src/mesh/test_mesh_small.c
src/mesh/test_mesh_small_unicast.c
src/mesh/test_mesh_small_unicast_far.c
src/nse/gnunet-service-nse.c
src/testing/test_testing_large_topology.c
src/testing/test_testing_topology.c
src/testing/testing.c
src/testing/testing_group.c
src/topology/gnunet-daemon-topology.c
src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_blacklist.c
src/transport/gnunet-service-transport_clients.c
src/transport/gnunet-service-transport_neighbours.c
src/transport/gnunet-service-transport_neighbours.h
src/transport/gnunet-service-transport_validation.c
src/transport/gnunet-transport-connect-running-peers.c
src/transport/plugin_transport_http.c
src/transport/plugin_transport_tcp.c
src/transport/plugin_transport_udp.c
src/transport/plugin_transport_unix.c
src/transport/plugin_transport_wlan.c
src/transport/test_quota_compliance.c
src/transport/test_transport_api.c
src/transport/test_transport_api_disconnect.c
src/transport/test_transport_api_limited_sockets.c
src/transport/test_transport_api_reliability.c
src/transport/test_transport_api_timeout.c
src/transport/test_transport_api_unreliability.c
src/transport/test_transport_api_unreliability_constant.c
src/transport/test_transport_startonly.c
src/transport/test_transport_testing.c
src/transport/transport-testing.c
src/transport/transport.h
src/transport/transport_api.c
src/vpn/gnunet-daemon-exit.c
src/vpn/gnunet-daemon-vpn.c
src/vpn/gnunet-daemon-vpn.h
src/vpn/gnunet-service-dns.c

index fe317696acc5a289a1432935a9a5f1ea77a0074e..c79454411e4ad27017b1fd80f8a2ef378890f69b 100644 (file)
@@ -605,7 +605,7 @@ send_task_f (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   send_task = GNUNET_SCHEDULER_add_now (&send_task_f, NULL);
index bef63553e173a814d5e2a8feb0ff64a23edec006..fbc6ca7120a145ebda5bfffc7806f20f493116c6 100644 (file)
@@ -77,7 +77,7 @@ struct AddressUpdateMessage
   uint32_t session_id GNUNET_PACKED;
 
   /* followed by:
-     - struct GNUNET_TRANSPORT_ATS_Information [ats_count];
+     - struct GNUNET_ATS_Information [ats_count];
      - char address[address_length]
      - char plugin_name[plugin_name_length] (including '\0'-termination).
   */
@@ -126,7 +126,7 @@ struct AddressSuggestionMessage
   struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
 
   /* followed by:
-     - struct GNUNET_TRANSPORT_ATS_Information [ats_count];
+     - struct GNUNET_ATS_Information [ats_count];
      - char address[address_length]
      - char plugin_name[plugin_name_length] (including '\0'-termination).
   */
@@ -151,7 +151,7 @@ struct PeerInformationMessage
   struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
 
   /* followed by: 
-     - struct GNUNET_TRANSPORT_ATS_Information [ats_count];
+     - struct GNUNET_ATS_Information [ats_count];
      - char address[address_length]
      - char plugin_name[plugin_name_length] (including '\0'-termination).
   */
index 29a273e3e0f847c5a43588dffc370d5c5a3885d5..61d3895d28860351a9662868da193c718a736b81 100644 (file)
@@ -523,7 +523,7 @@ update_session (void *cls, const GNUNET_HashCode * key, void *value)
 static struct AllocationRecord *
 create_allocation_record (const char *plugin_name, struct Session *session,
                           const void *plugin_addr, size_t plugin_addr_len,
-                          const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                          const struct GNUNET_ATS_Information *ats,
                           uint32_t ats_count)
 {
   struct AllocationRecord *ar;
@@ -539,7 +539,7 @@ create_allocation_record (const char *plugin_name, struct Session *session,
   GNUNET_assert (ats_count > 0);
   GNUNET_array_grow (ar->ats, ar->ats_count, ats_count);
   memcpy (ar->ats, ats,
-          ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+          ats_count * sizeof (struct GNUNET_ATS_Information));
   ar->connected = GNUNET_SYSERR; /* aka: not known / no change */
   return ar;
 }
@@ -587,7 +587,7 @@ GNUNET_ATS_peer_connect (struct GNUNET_ATS_SchedulingHandle *atc,
                          const struct GNUNET_PeerIdentity *peer,
                          const char *plugin_name, struct Session *session,
                          const void *plugin_addr, size_t plugin_addr_len,
-                         const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                         const struct GNUNET_ATS_Information *ats,
                          uint32_t ats_count)
 {
   struct AllocationRecord *ar;
@@ -761,7 +761,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *atc,
                            struct GNUNET_TIME_Absolute valid_until,
                            const char *plugin_name, struct Session *session,
                            const void *plugin_addr, size_t plugin_addr_len,
-                           const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                           const struct GNUNET_ATS_Information *ats,
                            uint32_t ats_count)
 {
   struct AllocationRecord *ar;
index 2c98194be4e3ca5cf802d44a8052ec91c14981ed..a1060781763521436cf451f4426ab818e3f3e0fb 100644 (file)
@@ -37,7 +37,7 @@ struct AllocationRecord
   /**
    * Performance information associated with this address (array).
    */
-  struct GNUNET_TRANSPORT_ATS_Information *ats;
+  struct GNUNET_ATS_Information *ats;
 
   /**
    * Name of the plugin
index 2cae8a51ffa59e973eb9325fdfec5cf2b0622e2c..c3a5d2beddf26ea13940d6de8a572defcc74ab8a 100644 (file)
@@ -250,7 +250,7 @@ process_pi_message (struct GNUNET_ATS_PerformanceHandle *ph,
                    const struct GNUNET_MessageHeader *msg)
 {
   const struct PeerInformationMessage *pi;
-  const struct GNUNET_TRANSPORT_ATS_Information *atsi;
+  const struct GNUNET_ATS_Information *atsi;
   const char *address;
   const char *plugin_name;
   uint16_t address_length;
@@ -271,14 +271,14 @@ process_pi_message (struct GNUNET_ATS_PerformanceHandle *ph,
   ats_count = ntohl (pi->ats_count);
   address_length = ntohs (pi->address_length);
   plugin_name_length = ntohs (pi->plugin_name_length);
-  atsi = (const struct GNUNET_TRANSPORT_ATS_Information*) &pi[1];
+  atsi = (const struct GNUNET_ATS_Information*) &pi[1];
   address = (const char*) &atsi[ats_count];
   plugin_name = &address[address_length];
   if ( (address_length +
        plugin_name_length +
-       ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) +
+       ats_count * sizeof (struct GNUNET_ATS_Information) +
        sizeof (struct PeerInformationMessage) != ntohs (msg->size))  ||
-       (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)) ||
+       (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) ||
        (plugin_name[plugin_name_length - 1] != '\0') )
   {
     GNUNET_break (0);
index 53a21f996d40c3ee2875b267b0a865cba2b5babc..4855efadb0867a1b983ff4242c4f81e768aac15c 100644 (file)
@@ -317,7 +317,7 @@ process_ats_message (void *cls,
 {
   struct GNUNET_ATS_SchedulingHandle *sh = cls;
   const struct AddressSuggestionMessage *m;
-  const struct GNUNET_TRANSPORT_ATS_Information *atsi;
+  const struct GNUNET_ATS_Information *atsi;
   const char *address;
   const char *plugin_name;
   uint16_t address_length;
@@ -345,15 +345,15 @@ process_ats_message (void *cls,
   m = (const struct AddressSuggestionMessage*) msg;
   ats_count = ntohl (m->ats_count);
   address_length = ntohs (m->address_length);
-  atsi = (const struct GNUNET_TRANSPORT_ATS_Information*) &m[1];
+  atsi = (const struct GNUNET_ATS_Information*) &m[1];
   address = (const char*) &atsi[ats_count];
   plugin_name = &address[address_length];
   plugin_name_length = ntohs (m->plugin_name_length);
   if ( (address_length +
        plugin_name_length +
-       ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) +
+       ats_count * sizeof (struct GNUNET_ATS_Information) +
        sizeof (struct AddressSuggestionMessage) != ntohs (msg->size))  ||
-       (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)) ||
+       (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) ||
        (plugin_name[plugin_name_length - 1] != '\0') )
   {
     GNUNET_break (0);
@@ -525,23 +525,23 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
                            const char *plugin_name,
                            const void *plugin_addr, size_t plugin_addr_len,
                           struct Session *session,
-                           const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                           const struct GNUNET_ATS_Information *ats,
                            uint32_t ats_count)
 {
   struct PendingMessage *p;
   struct AddressUpdateMessage *m;
-  struct GNUNET_TRANSPORT_ATS_Information *am;
+  struct GNUNET_ATS_Information *am;
   char *pm;
   size_t namelen;
   size_t msize;
 
   namelen = (plugin_name == NULL) ? 0 : strlen (plugin_name) + 1;                                              
   msize = sizeof (struct AddressUpdateMessage) + plugin_addr_len + 
-    ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) + namelen;
+    ats_count * sizeof (struct GNUNET_ATS_Information) + namelen;
   if ( (msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
        (plugin_addr_len  >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
        (namelen  >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
-       (ats_count >= GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)) )
+       (ats_count >= GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) )
   {
     GNUNET_break (0);
     return;
@@ -557,8 +557,8 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
   m->address_length = htons (plugin_addr_len);
   m->plugin_name_length = htons (namelen);
   m->session_id = htonl (get_session_id (sh, session));
-  am = (struct GNUNET_TRANSPORT_ATS_Information*) &m[1];
-  memcpy (am, ats, ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+  am = (struct GNUNET_ATS_Information*) &m[1];
+  memcpy (am, ats, ats_count * sizeof (struct GNUNET_ATS_Information));
   pm = (char *) &am[ats_count];
   memcpy (pm, plugin_addr, plugin_addr_len);
   memcpy (&pm[plugin_addr_len], plugin_name, namelen);
index 9c504b26c179706801a489538b9aa85884206a92..2bcb9913ac8d4e42dc5ed9185b3496b5acb16e87 100644 (file)
@@ -46,7 +46,7 @@ struct ATS_Address
 
   char * plugin;
 
-  struct GNUNET_TRANSPORT_ATS_Information * ats;
+  struct GNUNET_ATS_Information * ats;
 
   struct GNUNET_BANDWIDTH_Value32NBO bw_in;
 
@@ -144,18 +144,18 @@ GAS_address_update (const struct GNUNET_PeerIdentity *peer,
                    const void *plugin_addr, size_t plugin_addr_len,
                    struct GNUNET_SERVER_Client *session_client,
                    uint32_t session_id,
-                   const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                   const struct GNUNET_ATS_Information *atsi,
                    uint32_t atsi_count)
 {
   struct ATS_Address * aa;
   struct ATS_Address * old;
 
   aa = GNUNET_malloc (sizeof (struct ATS_Address) + plugin_addr_len);
-  aa->ats = GNUNET_malloc(atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+  aa->ats = GNUNET_malloc(atsi_count * sizeof (struct GNUNET_ATS_Information));
   aa->peer = *peer;
   aa->addr_len = plugin_addr_len;
   aa->ats_count = atsi_count;
-  memcpy (aa->ats, atsi, atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+  memcpy (aa->ats, atsi, atsi_count * sizeof (struct GNUNET_ATS_Information));
   aa->addr = &aa[1];
   memcpy (&aa[1], plugin_addr, plugin_addr_len);
   aa->plugin = GNUNET_strdup (plugin_name);
index fdb3df678848444ad46f1f10ca637f7bc2e3d326..3358767207e305a4c32abf59b1bd8d823bc4f4b6 100644 (file)
@@ -28,7 +28,6 @@
 #define GNUNET_SERVICE_ATS_ADDRESSES_H
 
 #include "gnunet_util_lib.h"
-#include "gnunet_transport_service.h" // FIXME...
 #include "gnunet_ats_service.h" 
 #include "ats.h"
 
@@ -53,7 +52,7 @@ GAS_address_update (const struct GNUNET_PeerIdentity *peer,
                    const void *plugin_addr, size_t plugin_addr_len,
                    struct GNUNET_SERVER_Client *session_client,
                    uint32_t session_id,
-                   const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                   const struct GNUNET_ATS_Information *atsi,
                    uint32_t atsi_count);
 
 
index 220fe522b58ecf9b7ae21f60b5adf1dab6d5cd70..8d25e25c623772089eb795c5252a8904b310db83 100644 (file)
@@ -513,8 +513,8 @@ _dummy2 ()
 struct ATS_Handle *
 ats_init (double D, double U, double R, int v_b_min, int v_n_min,
           int max_iterations, struct GNUNET_TIME_Relative max_duration,
-          GNUNET_TRANSPORT_ATS_AddressNotification address_not,
-          GNUNET_TRANSPORT_ATS_ResultCallback res_cb)
+          GNUNET_ATS_AddressNotification address_not,
+          GNUNET_ATS_ResultCallback res_cb)
 {
   struct ATS_Handle *ats = NULL;
 
@@ -850,7 +850,7 @@ ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat,
     {
       ia[array_index] = row_index;
       ja[array_index] = c2;
-      if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY)
+      if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DELAY)
       {
         double v0 = 0, v1 = 0, v2 = 0;
 
@@ -866,7 +866,7 @@ ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat,
         value = 100.0 / ((v0 + 2 * v1 + 3 * v2) / 6.0);
         value = 1;
       }
-      if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE)
+      if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DISTANCE)
       {
         double v0 = 0, v1 = 0, v2 = 0;
 
@@ -1243,7 +1243,7 @@ ats_update_problem_qm (struct ATS_Handle *ats)
       GNUNET_assert (ats->mechanisms[c2].addr != NULL);
       GNUNET_assert (ats->mechanisms[c2].peer != NULL);
 
-      if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY)
+      if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DELAY)
       {
         double v0 = 0, v1 = 0, v2 = 0;
 
@@ -1259,7 +1259,7 @@ ats_update_problem_qm (struct ATS_Handle *ats)
         value = 100.0 / ((v0 + 2 * v1 + 3 * v2) / 6.0);
         //value = 1;
       }
-      if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE)
+      if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DISTANCE)
       {
         double v0 = 0, v1 = 0, v2 = 0;
 
index 4af1bdc4c2a6eb40cf78aaee896799317aec4928..1324c30d0599b4519fcb899e7fcf692bafdcc134 100644 (file)
 struct ATS_mechanism;
 struct ATS_peer;
 
-typedef void (*GNUNET_TRANSPORT_ATS_AddressNotification) (struct ATS_peer **
+typedef void (*GNUNET_ATS_AddressNotification) (struct ATS_peer **
                                                           peers, int *c_p,
                                                           struct ATS_mechanism
                                                           ** mechanisms,
                                                           int *c_m);
 
-typedef void (*GNUNET_TRANSPORT_ATS_ResultCallback) (void);
+typedef void (*GNUNET_ATS_ResultCallback) (void);
 
 enum ATS_problem_state
 {
@@ -211,9 +211,9 @@ struct ATS_Handle
    *  Callback functions
    */
 
-  GNUNET_TRANSPORT_ATS_AddressNotification addr_notification;
+  GNUNET_ATS_AddressNotification addr_notification;
 
-  GNUNET_TRANSPORT_ATS_ResultCallback result_cb;
+  GNUNET_ATS_ResultCallback result_cb;
 
 
     /**
@@ -452,8 +452,8 @@ static struct ATS_quality_metric qm[] = {
 struct ATS_Handle *
 ats_init (double D, double U, double R, int v_b_min, int v_n_min,
           int max_iterations, struct GNUNET_TIME_Relative max_duration,
-          GNUNET_TRANSPORT_ATS_AddressNotification address_not,
-          GNUNET_TRANSPORT_ATS_ResultCallback res_cb);
+          GNUNET_ATS_AddressNotification address_not,
+          GNUNET_ATS_ResultCallback res_cb);
 
 void
 ats_shutdown (struct ATS_Handle *ats);
index 3a4acc64186ade66416ae3ce4e2b0efd3bb39012..103040ea88e87ba433ae4b95380f49cc10710688 100644 (file)
@@ -151,7 +151,7 @@ void
 GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer,
                                const char *plugin_name,
                                const void *plugin_addr, size_t plugin_addr_len,
-                               const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                               const struct GNUNET_ATS_Information *atsi,
                                uint32_t atsi_count,                            
                                struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
                                struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
@@ -159,14 +159,14 @@ GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer,
   struct PerformanceClient *pc;
   struct PeerInformationMessage *msg;
   size_t plugin_name_length = strlen (plugin_name) + 1;
-  size_t msize = sizeof (struct PeerInformationMessage) + atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) 
+  size_t msize = sizeof (struct PeerInformationMessage) + atsi_count * sizeof (struct GNUNET_ATS_Information) 
     + plugin_addr_len + plugin_name_length;
   char buf[msize];
-  struct GNUNET_TRANSPORT_ATS_Information *atsp;
+  struct GNUNET_ATS_Information *atsp;
   char *addrp;
 
   GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE);
-  GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+  GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information));
   msg = (struct PeerInformationMessage*) buf;
   msg->header.size = htons (msize);
   msg->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION);
@@ -176,8 +176,8 @@ GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer,
   msg->plugin_name_length = htons (plugin_name_length);
   msg->bandwidth_out = bandwidth_out;
   msg->bandwidth_in = bandwidth_in;
-  atsp = (struct GNUNET_TRANSPORT_ATS_Information* ) &msg[1];
-  memcpy (atsp, atsi, sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count);
+  atsp = (struct GNUNET_ATS_Information* ) &msg[1];
+  memcpy (atsp, atsi, sizeof (struct GNUNET_ATS_Information) * atsi_count);
   addrp = (char*) &atsp[atsi_count];
   memcpy (addrp, plugin_addr, plugin_addr_len);
   strcpy (&addrp[plugin_addr_len], plugin_name);
index 6dfd112029a4d1dee72f93b63a3cc562e8313ea6..5988bff4440d67e44b76161f28060648bfdc1b45 100644 (file)
@@ -28,7 +28,7 @@
 #define GNUNET_SERVICE_ATS_PERFORMANCE_H
 
 #include "gnunet_util_lib.h"
-#include "gnunet_transport_service.h" // FIXME
+#include "gnunet_ats_service.h"
 #include "ats.h"
 
 /**
@@ -69,7 +69,7 @@ void
 GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer,
                                const char *plugin_name,
                                const void *plugin_addr, size_t plugin_addr_len,
-                               const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                               const struct GNUNET_ATS_Information *atsi,
                                uint32_t atsi_count,                            
                                struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
                                struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in);
index ca4e86ca483cb98d7e493402b1a3d92e0f0b7f93..825f00085512f4ad27ef8c59000c51994152fa26 100644 (file)
@@ -155,7 +155,7 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *pe
                                            const void *plugin_addr, size_t plugin_addr_len,
                                            struct GNUNET_SERVER_Client *session_client,
                                            uint32_t session_id,
-                                           const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                                           const struct GNUNET_ATS_Information *atsi,
                                            uint32_t atsi_count,                                
                                            struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
                                            struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
@@ -163,14 +163,14 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *pe
   struct SchedulingClient *sc;
   struct AddressSuggestionMessage *msg;
   size_t plugin_name_length = strlen (plugin_name) + 1;
-  size_t msize = sizeof (struct AddressSuggestionMessage) + atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) 
+  size_t msize = sizeof (struct AddressSuggestionMessage) + atsi_count * sizeof (struct GNUNET_ATS_Information) 
     + plugin_addr_len + plugin_name_length;
   char buf[msize];
-  struct GNUNET_TRANSPORT_ATS_Information *atsp;
+  struct GNUNET_ATS_Information *atsp;
   char *addrp;
 
   GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE);
-  GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+  GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information));
   msg = (struct AddressSuggestionMessage*) buf;
   msg->header.size = htons (msize);
   msg->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION);
@@ -181,8 +181,8 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *pe
   /* session ID is set only if 'client' is the same... */
   msg->bandwidth_out = bandwidth_out;
   msg->bandwidth_in = bandwidth_in;
-  atsp = (struct GNUNET_TRANSPORT_ATS_Information* ) &msg[1];
-  memcpy (atsp, atsi, sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count);
+  atsp = (struct GNUNET_ATS_Information* ) &msg[1];
+  memcpy (atsp, atsi, sizeof (struct GNUNET_ATS_Information) * atsi_count);
   addrp = (char*) &atsp[atsi_count];
   memcpy (addrp, plugin_addr, plugin_addr_len);
   strcpy (&addrp[plugin_addr_len], plugin_name);
@@ -234,7 +234,7 @@ GAS_handle_address_update (void *cls, struct GNUNET_SERVER_Client *client,
 
 {
   const struct AddressUpdateMessage * m;
-  const struct GNUNET_TRANSPORT_ATS_Information *atsi;
+  const struct GNUNET_ATS_Information *atsi;
   const char *address;
   const char *plugin_name;
   uint16_t address_length;
@@ -256,7 +256,7 @@ GAS_handle_address_update (void *cls, struct GNUNET_SERVER_Client *client,
   ats_count = ntohl (m->ats_count);
   address_length = ntohs (m->address_length);
   plugin_name_length = ntohs (m->plugin_name_length);  
-  atsi = (const struct GNUNET_TRANSPORT_ATS_Information*) &m[1];
+  atsi = (const struct GNUNET_ATS_Information*) &m[1];
   address = (const char*) &atsi[ats_count];
   if (plugin_name_length != 0)
     plugin_name = &address[address_length];
@@ -264,9 +264,9 @@ GAS_handle_address_update (void *cls, struct GNUNET_SERVER_Client *client,
     plugin_name = "";
   if ( (address_length +
        plugin_name_length +
-       ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) +
+       ats_count * sizeof (struct GNUNET_ATS_Information) +
        sizeof (struct AddressUpdateMessage) != ntohs (message->size))  ||
-       (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)) ||
+       (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) ||
        (plugin_name[plugin_name_length - 1] != '\0') )
   {
     GNUNET_break (0);
index 8d6fa977d28973ad1edf0fbe6fb5dee9797699c2..15eed7f85f62faac2cac14e971d2d801722a5a28 100644 (file)
@@ -70,7 +70,7 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *pe
                                            const void *plugin_addr, size_t plugin_addr_len,
                                            struct GNUNET_SERVER_Client *session_client,
                                            uint32_t session_id,
-                                           const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                                           const struct GNUNET_ATS_Information *atsi,
                                            uint32_t atsi_count,                                
                                            struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
                                            struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in);
index 5952237f48dfa07c487a431914ed4e0306b06a99..05a3e257a4d6729b375cf87bb48a5eafc9a0335c 100644 (file)
@@ -62,7 +62,7 @@ struct Address
   void * addr;
   size_t addr_len;
 
-  struct GNUNET_TRANSPORT_ATS_Information * ats;
+  struct GNUNET_ATS_Information * ats;
   int ats_count;
 
   void  *session;
@@ -156,7 +156,7 @@ void performance_cb (void *cls,
                     GNUNET_BANDWIDTH_Value32NBO
                     bandwidth_in,
                     const struct
-                    GNUNET_TRANSPORT_ATS_Information
+                    GNUNET_ATS_Information
                     * ats,
                     uint32_t ats_count)
 {
@@ -207,7 +207,7 @@ address_suggest_cb (void *cls,
                     GNUNET_BANDWIDTH_Value32NBO
                     bandwidth_in,
                     const struct
-                    GNUNET_TRANSPORT_ATS_Information
+                    GNUNET_ATS_Information
                     * ats,
                     uint32_t ats_count)
 
index dd4718c12ca34b8c8ed78e2dd09a9d623466b882..7dfd887fd183ba88631cead3447904a15b5bd825 100644 (file)
@@ -58,7 +58,7 @@ struct Address
   void * addr;
   size_t addr_len;
 
-  struct GNUNET_TRANSPORT_ATS_Information * ats;
+  struct GNUNET_ATS_Information * ats;
   int ats_count;
 
   void  *session;
@@ -73,7 +73,7 @@ struct PeerContext
 
 struct Address addr[2];
 struct PeerContext p[2];
-struct GNUNET_TRANSPORT_ATS_Information atsi[2];
+struct GNUNET_ATS_Information atsi[2];
 
 static void
 stop_arm ()
@@ -133,7 +133,7 @@ address_suggest_cb (void *cls,
                     GNUNET_BANDWIDTH_Value32NBO
                     bandwidth_in,
                     const struct
-                    GNUNET_TRANSPORT_ATS_Information
+                    GNUNET_ATS_Information
                     * ats,
                     uint32_t ats_count)
 
index 54383c1d33e3a3f1991d25bc8c65b7be429b908e..78011d4925ea21558287e5aad39756209c881e92 100644 (file)
@@ -73,7 +73,7 @@ struct AllocationRecord
   /**
    * Performance information associated with this address (array).
    */
-  struct GNUNET_TRANSPORT_ATS_Information *ats;
+  struct GNUNET_ATS_Information *ats;
 
   /**
    * Name of the plugin
@@ -121,7 +121,7 @@ suggest_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
             const char *plugin_name, const void *plugin_addr,
             size_t plugin_addr_len, struct Session *session,
             struct GNUNET_BANDWIDTH_Value32NBO bandwidth,
-            const struct GNUNET_TRANSPORT_ATS_Information *ats,
+            const struct GNUNET_ATS_Information *ats,
             uint32_t ats_count)
 {
   struct ExpectedValues *ex = cls;
@@ -179,7 +179,7 @@ check (void *cls, char *const *args, const char *cfgfile,
   ar->session = NULL;
   ar->plugin_addr = "address1";
   ar->plugin_addr_len = strlen (ar->plugin_addr) + 1;
-  ar->ats = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+  ar->ats = GNUNET_malloc (sizeof (struct GNUNET_ATS_Information));
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Initial ATS information\n");
   ar->ats_count = 1;
index c7420d8bb7347780046e62092185bf971e5059ff..a7001775961559663ecc072c2d5e367792aef460 100644 (file)
@@ -988,7 +988,7 @@ static int
 handle_p2p_join_notification (void *cls,
                               const struct GNUNET_PeerIdentity *other,
                               const struct GNUNET_MessageHeader *message,
-                              const struct GNUNET_TRANSPORT_ATS_Information
+                              const struct GNUNET_ATS_Information
                               *atsi)
 {
   const struct P2PJoinNotificationMessage *p2p_jnmsg;
@@ -1104,7 +1104,7 @@ static int
 handle_p2p_leave_notification (void *cls,
                                const struct GNUNET_PeerIdentity *other,
                                const struct GNUNET_MessageHeader *message,
-                               const struct GNUNET_TRANSPORT_ATS_Information
+                               const struct GNUNET_ATS_Information
                                *atsi)
 {
   const struct P2PLeaveNotificationMessage *p2p_lnmsg;
@@ -1185,7 +1185,7 @@ static int
 handle_p2p_message_notification (void *cls,
                                  const struct GNUNET_PeerIdentity *other,
                                  const struct GNUNET_MessageHeader *message,
-                                 const struct GNUNET_TRANSPORT_ATS_Information
+                                 const struct GNUNET_ATS_Information
                                  *atsi)
 {
   const struct P2PReceiveNotificationMessage *p2p_rnmsg;
@@ -1335,7 +1335,7 @@ handle_p2p_message_notification (void *cls,
 static int
 handle_p2p_sync_request (void *cls, const struct GNUNET_PeerIdentity *other,
                          const struct GNUNET_MessageHeader *message,
-                         const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                         const struct GNUNET_ATS_Information *atsi)
 {
   struct ChatClient *entry;
   struct GNUNET_CORE_TransmitHandle *th;
@@ -1377,7 +1377,7 @@ static int
 handle_p2p_confirmation_receipt (void *cls,
                                  const struct GNUNET_PeerIdentity *other,
                                  const struct GNUNET_MessageHeader *message,
-                                 const struct GNUNET_TRANSPORT_ATS_Information
+                                 const struct GNUNET_ATS_Information
                                  *atsi)
 {
   const struct P2PConfirmationReceiptMessage *p2p_crmsg;
@@ -1518,7 +1518,7 @@ transmit_sync_request_to_peer (void *cls, size_t size, void *buf)
  */
 static void
 peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
-                      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                      const struct GNUNET_ATS_Information *atsi)
 {
   struct ConnectedPeer *cp;
   struct GNUNET_CORE_TransmitHandle *th;
index 8c97f6177ed6897e7f41479119069ba888118d2d..5c0738ee4e74423a0f4be3f37a83886c22c24e5e 100644 (file)
@@ -125,7 +125,7 @@ struct ConnectNotifyMessage
    * First of the ATS information blocks (we must have at least
    * one due to the 0-termination requirement).
    */
-  struct GNUNET_TRANSPORT_ATS_Information ats;
+  struct GNUNET_ATS_Information ats;
 
 };
 
@@ -171,7 +171,7 @@ struct PeerStatusNotifyMessage
    * First of the ATS information blocks (we must have at least
    * one due to the 0-termination requirement).
    */
-  struct GNUNET_TRANSPORT_ATS_Information ats;
+  struct GNUNET_ATS_Information ats;
 
 };
 
@@ -232,7 +232,7 @@ struct NotifyTrafficMessage
    * First of the ATS information blocks (we must have at least
    * one due to the 0-termination requirement).
    */
-  struct GNUNET_TRANSPORT_ATS_Information ats;
+  struct GNUNET_ATS_Information ats;
 
 };
 
index 57d01f6bb305557f15c729b3fb693fdd8fd2b47f..0de64869b1953d35c9aa0f933220b0f05f422056 100644 (file)
@@ -864,8 +864,8 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
     ats_count = ntohl (cnm->ats_count);
     if ((msize !=
          sizeof (struct ConnectNotifyMessage) +
-         ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)) ||
-        (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR !=
+         ats_count * sizeof (struct GNUNET_ATS_Information)) ||
+        (GNUNET_ATS_ARRAY_TERMINATOR !=
          ntohl ((&cnm->ats)[ats_count].type)))
     {
       GNUNET_break (0);
@@ -945,9 +945,9 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
     ats_count = ntohl (ntm->ats_count);
     if ((msize <
          sizeof (struct NotifyTrafficMessage) +
-         ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) +
+         ats_count * sizeof (struct GNUNET_ATS_Information) +
          sizeof (struct GNUNET_MessageHeader)) ||
-        (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR !=
+        (GNUNET_ATS_ARRAY_TERMINATOR !=
          ntohl ((&ntm->ats)[ats_count].type)))
     {
       GNUNET_break (0);
@@ -970,7 +970,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
     if ((GNUNET_NO == h->inbound_hdr_only) &&
         (msize !=
          ntohs (em->size) + sizeof (struct NotifyTrafficMessage) +
-         +ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)))
+         +ats_count * sizeof (struct GNUNET_ATS_Information)))
     {
       GNUNET_break (0);
       reconnect_later (h);
@@ -1014,9 +1014,9 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
     ats_count = ntohl (ntm->ats_count);
     if ((msize <
          sizeof (struct NotifyTrafficMessage) +
-         ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) +
+         ats_count * sizeof (struct GNUNET_ATS_Information) +
          sizeof (struct GNUNET_MessageHeader)) ||
-        (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR !=
+        (GNUNET_ATS_ARRAY_TERMINATOR !=
          ntohl ((&ntm->ats)[ats_count].type)))
     {
       GNUNET_break (0);
@@ -1039,7 +1039,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
     if ((GNUNET_NO == h->outbound_hdr_only) &&
         (msize !=
          ntohs (em->size) + sizeof (struct NotifyTrafficMessage) +
-         ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)))
+         ats_count * sizeof (struct GNUNET_ATS_Information)))
     {
       GNUNET_break (0);
       reconnect_later (h);
index 0cc28e538a4250a81a7a4b1e791cbee730e23202..ed9ea175ee3b4d7f6fb07c01a4fb6fdbed95ded1 100644 (file)
@@ -101,8 +101,8 @@ receive_info (void *cls, const struct GNUNET_MessageHeader *msg)
   ats_count = ntohl (connect_message->ats_count);
   if ((msize !=
        sizeof (struct ConnectNotifyMessage) +
-       ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)) ||
-      (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR !=
+       ats_count * sizeof (struct GNUNET_ATS_Information)) ||
+      (GNUNET_ATS_ARRAY_TERMINATOR !=
        ntohl ((&connect_message->ats)[ats_count].type)))
   {
     GNUNET_break (0);
index fe037f73b434acce33923a609a5dd4564a0ff592..ae7feb915e4dd2748b28e3aafa5777c73fcccadb 100644 (file)
@@ -123,7 +123,7 @@ process_resolved_address (void *cls, const char *address)
  */
 static void
 connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
-                         const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                         const struct GNUNET_ATS_Information *atsi)
 {
   struct PrintContext *pc;
 
index 5d262fdc68fa424c7b855ca08dce131a0a6eedc9..010c42a09d87712c72fa3fdf2f4e28ace937311a 100644 (file)
@@ -490,7 +490,7 @@ struct Neighbour
   /**
    * Performance data for the peer.
    */
-  struct GNUNET_TRANSPORT_ATS_Information *ats;
+  struct GNUNET_ATS_Information *ats;
 
   /**
    * Identity of the neighbour.
@@ -957,7 +957,7 @@ handle_peer_status_change (struct Neighbour *n)
 {
   struct PeerStatusNotifyMessage *psnm;
   char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
-  struct GNUNET_TRANSPORT_ATS_Information *ats;
+  struct GNUNET_ATS_Information *ats;
   size_t size;
 
   if ((!n->is_connected) || (n->status != PEER_STATE_KEY_CONFIRMED))
@@ -968,7 +968,7 @@ handle_peer_status_change (struct Neighbour *n)
 #endif
   size =
       sizeof (struct PeerStatusNotifyMessage) +
-      n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+      n->ats_count * sizeof (struct GNUNET_ATS_Information);
   if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
   {
     GNUNET_break (0);
@@ -976,7 +976,7 @@ handle_peer_status_change (struct Neighbour *n)
     GNUNET_array_grow (n->ats, n->ats_count, 0);
     size =
         sizeof (struct PeerStatusNotifyMessage) +
-        n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+        n->ats_count * sizeof (struct GNUNET_ATS_Information);
   }
   psnm = (struct PeerStatusNotifyMessage *) buf;
   psnm->header.size = htons (size);
@@ -988,7 +988,7 @@ handle_peer_status_change (struct Neighbour *n)
   psnm->ats_count = htonl (n->ats_count);
   ats = &psnm->ats;
   memcpy (ats, n->ats,
-          n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+          n->ats_count * sizeof (struct GNUNET_ATS_Information));
   ats[n->ats_count].type = htonl (0);
   ats[n->ats_count].value = htonl (0);
   send_to_all_clients (&psnm->header, GNUNET_YES,
@@ -1245,12 +1245,12 @@ notify_client_about_neighbour (void *cls, const GNUNET_HashCode * key,
   struct Neighbour *n = value;
   size_t size;
   char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
-  struct GNUNET_TRANSPORT_ATS_Information *ats;
+  struct GNUNET_ATS_Information *ats;
   struct ConnectNotifyMessage *cnm;
 
   size =
       sizeof (struct ConnectNotifyMessage) +
-      (n->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+      (n->ats_count) * sizeof (struct GNUNET_ATS_Information);
   if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
   {
     GNUNET_break (0);
@@ -1258,7 +1258,7 @@ notify_client_about_neighbour (void *cls, const GNUNET_HashCode * key,
     GNUNET_array_grow (n->ats, n->ats_count, 0);
     size =
         sizeof (struct ConnectNotifyMessage) +
-        (n->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+        (n->ats_count) * sizeof (struct GNUNET_ATS_Information);
   }
   cnm = (struct ConnectNotifyMessage *) buf;
   cnm->header.size = htons (size);
@@ -1266,8 +1266,8 @@ notify_client_about_neighbour (void *cls, const GNUNET_HashCode * key,
   cnm->ats_count = htonl (n->ats_count);
   ats = &cnm->ats;
   memcpy (ats, n->ats,
-          sizeof (struct GNUNET_TRANSPORT_ATS_Information) * n->ats_count);
-  ats[n->ats_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+          sizeof (struct GNUNET_ATS_Information) * n->ats_count);
+  ats[n->ats_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
   ats[n->ats_count].value = htonl (0);
   if (n->status == PEER_STATE_KEY_CONFIRMED)
   {
@@ -1464,7 +1464,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value)
   struct GNUNET_SERVER_TransmitContext *tc = cls;
   struct Neighbour *n = value;
   char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
-  struct GNUNET_TRANSPORT_ATS_Information *ats;
+  struct GNUNET_ATS_Information *ats;
   size_t size;
   struct ConnectNotifyMessage *cnm;
 
@@ -1473,7 +1473,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value)
     return GNUNET_OK;
   size =
       sizeof (struct ConnectNotifyMessage) +
-      (n->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+      (n->ats_count) * sizeof (struct GNUNET_ATS_Information);
   if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
   {
     GNUNET_break (0);
@@ -1481,7 +1481,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value)
     GNUNET_array_grow (n->ats, n->ats_count, 0);
     size =
         sizeof (struct PeerStatusNotifyMessage) +
-        n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+        n->ats_count * sizeof (struct GNUNET_ATS_Information);
   }
   cnm = (struct ConnectNotifyMessage *) buf;
   cnm->header.size = htons (size);
@@ -1489,8 +1489,8 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value)
   cnm->ats_count = htonl (n->ats_count);
   ats = &cnm->ats;
   memcpy (ats, n->ats,
-          n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
-  ats[n->ats_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+          n->ats_count * sizeof (struct GNUNET_ATS_Information));
+  ats[n->ats_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
   ats[n->ats_count].value = htonl (0);
 #if DEBUG_CORE_CLIENT
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message to client.\n",
@@ -3089,7 +3089,7 @@ trigger_processing:
  */
 static void
 handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count);
 
 
@@ -3166,7 +3166,7 @@ process_hello_retry_handle_set_key (void *cls,
  */
 static void
 update_neighbour_performance (struct Neighbour *n,
-                              const struct GNUNET_TRANSPORT_ATS_Information
+                              const struct GNUNET_ATS_Information
                               *ats, uint32_t ats_count)
 {
   uint32_t i;
@@ -3203,7 +3203,7 @@ update_neighbour_performance (struct Neighbour *n,
  */
 static void
 handle_ping (struct Neighbour *n, const struct PingMessage *m,
-             const struct GNUNET_TRANSPORT_ATS_Information *ats,
+             const struct GNUNET_ATS_Information *ats,
              uint32_t ats_count)
 {
   struct PingMessage t;
@@ -3295,14 +3295,14 @@ handle_ping (struct Neighbour *n, const struct PingMessage *m,
  */
 static void
 handle_pong (struct Neighbour *n, const struct PongMessage *m,
-             const struct GNUNET_TRANSPORT_ATS_Information *ats,
+             const struct GNUNET_ATS_Information *ats,
              uint32_t ats_count)
 {
   struct PongMessage t;
   struct ConnectNotifyMessage *cnm;
   struct GNUNET_CRYPTO_AesInitializationVector iv;
   char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
-  struct GNUNET_TRANSPORT_ATS_Information *mats;
+  struct GNUNET_ATS_Information *mats;
   size_t size;
 
 #if DEBUG_HANDSHAKE
@@ -3393,7 +3393,7 @@ handle_pong (struct Neighbour *n, const struct PongMessage *m,
     update_neighbour_performance (n, ats, ats_count);
     size =
         sizeof (struct ConnectNotifyMessage) +
-        (n->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+        (n->ats_count) * sizeof (struct GNUNET_ATS_Information);
     if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
     {
       GNUNET_break (0);
@@ -3401,7 +3401,7 @@ handle_pong (struct Neighbour *n, const struct PongMessage *m,
       GNUNET_array_grow (n->ats, n->ats_count, 0);
       size =
           sizeof (struct PeerStatusNotifyMessage) +
-          n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+          n->ats_count * sizeof (struct GNUNET_ATS_Information);
     }
     cnm = (struct ConnectNotifyMessage *) buf;
     cnm->header.size = htons (size);
@@ -3410,8 +3410,8 @@ handle_pong (struct Neighbour *n, const struct PongMessage *m,
     cnm->peer = n->peer;
     mats = &cnm->ats;
     memcpy (mats, n->ats,
-            n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
-    mats[n->ats_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+            n->ats_count * sizeof (struct GNUNET_ATS_Information));
+    mats[n->ats_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
     mats[n->ats_count].value = htonl (0);
     send_to_all_clients (&cnm->header, GNUNET_NO,
                          GNUNET_CORE_OPTION_SEND_CONNECT);
@@ -3445,7 +3445,7 @@ handle_pong (struct Neighbour *n, const struct PongMessage *m,
  */
 static void
 handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   struct SetKeyMessage *m_cpy;
@@ -3619,10 +3619,10 @@ send_p2p_message_to_client (struct Neighbour *sender, struct Client *client,
 {
   size_t size =
       msize + sizeof (struct NotifyTrafficMessage) +
-      (sender->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+      (sender->ats_count) * sizeof (struct GNUNET_ATS_Information);
   char buf[size];
   struct NotifyTrafficMessage *ntm;
-  struct GNUNET_TRANSPORT_ATS_Information *ats;
+  struct GNUNET_ATS_Information *ats;
 
   GNUNET_assert (GNUNET_YES == sender->is_connected);
   GNUNET_break (sender->status == PEER_STATE_KEY_CONFIRMED);
@@ -3633,7 +3633,7 @@ send_p2p_message_to_client (struct Neighbour *sender, struct Client *client,
     GNUNET_array_grow (sender->ats, sender->ats_count, 0);
     size =
         msize + sizeof (struct NotifyTrafficMessage) +
-        (sender->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+        (sender->ats_count) * sizeof (struct GNUNET_ATS_Information);
   }
 #if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -3649,8 +3649,8 @@ send_p2p_message_to_client (struct Neighbour *sender, struct Client *client,
   ntm->peer = sender->peer;
   ats = &ntm->ats;
   memcpy (ats, sender->ats,
-          sizeof (struct GNUNET_TRANSPORT_ATS_Information) * sender->ats_count);
-  ats[sender->ats_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+          sizeof (struct GNUNET_ATS_Information) * sender->ats_count);
+  ats[sender->ats_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
   ats[sender->ats_count].value = htonl (0);
   memcpy (&ats[sender->ats_count + 1], m, msize);
   send_to_client (client, &ntm->header, GNUNET_YES);
@@ -3748,7 +3748,7 @@ deliver_message (void *cls, void *client, const struct GNUNET_MessageHeader *m)
  */
 static void
 handle_encrypted_message (struct Neighbour *n, const struct EncryptedMessage *m,
-                          const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                          const struct GNUNET_ATS_Information *ats,
                           uint32_t ats_count)
 {
   size_t size = ntohs (m->header.size);
@@ -3908,7 +3908,7 @@ handle_encrypted_message (struct Neighbour *n, const struct EncryptedMessage *m,
 static void
 handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                           const struct GNUNET_MessageHeader *message,
-                          const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                          const struct GNUNET_ATS_Information *ats,
                           uint32_t ats_count)
 {
   struct Neighbour *n;
@@ -4171,7 +4171,7 @@ neighbour_quota_update (void *cls,
 static void
 handle_transport_notify_connect (void *cls,
                                  const struct GNUNET_PeerIdentity *peer,
-                                 const struct GNUNET_TRANSPORT_ATS_Information
+                                 const struct GNUNET_ATS_Information
                                  *ats, uint32_t ats_count)
 {
   struct Neighbour *n;
index 5e25ac9070b0f68695e6f5e94e6a27dcca03a0ce..3159772aabf5ab365a5028f96e3be14b3385adf9 100644 (file)
@@ -616,7 +616,7 @@ GSC_CLIENTS_reject_request (struct GSC_ClientActiveRequest *car)
 void
 GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
                                           const struct GNUNET_PeerIdentity *neighbour,
-                                          const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                                          const struct GNUNET_ATS_Information *atsi,
                                           unsigned int atsi_count,
                                           const struct GSC_TypeMap *tmap_old,
                                           const struct GSC_TypeMap *tmap_new)
@@ -624,7 +624,7 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
   struct ConnectNotifyMessage *cnm;
   size_t size;
   char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
-  struct GNUNET_TRANSPORT_ATS_Information *a;
+  struct GNUNET_ATS_Information *a;
   struct DisconnectNotifyMessage dcm;
   int old_match;
   int new_match;
@@ -640,7 +640,7 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
     /* send connect */  
     size =
       sizeof (struct ConnectNotifyMessage) +
-      (atsi_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+      (atsi_count) * sizeof (struct GNUNET_ATS_Information);
     if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
       {
        GNUNET_break (0);
@@ -654,8 +654,8 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
     cnm->ats_count = htonl (atsi_count);
     a = &cnm->ats;
     memcpy (a, atsi,
-           sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count);
-    a[atsi_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+           sizeof (struct GNUNET_ATS_Information) * atsi_count);
+    a[atsi_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
     a[atsi_count].value = htonl (0);
 #if DEBUG_CORE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
@@ -690,7 +690,7 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
  */
 void
 GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *neighbour,
-                                           const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                                           const struct GNUNET_ATS_Information *atsi,
                                            unsigned int atsi_count,
                                            const struct GSC_TypeMap *tmap_old,
                                            const struct GSC_TypeMap *tmap_new)
@@ -719,17 +719,17 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *ne
  */
 void
 GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender,
-                            const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                            const struct GNUNET_ATS_Information *atsi,
                             unsigned int atsi_count,
                             const struct GNUNET_MessageHeader *msg,
                             uint16_t msize,
                             int options)
 {
   size_t size = msize + sizeof (struct NotifyTrafficMessage) +
-      atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+      atsi_count * sizeof (struct GNUNET_ATS_Information);
   char buf[size];
   struct NotifyTrafficMessage *ntm;
-  struct GNUNET_TRANSPORT_ATS_Information *a;
+  struct GNUNET_ATS_Information *a;
 
   if (0 == options)
   {
@@ -759,8 +759,8 @@ GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender,
   ntm->peer = *sender;
   a = &ntm->ats;
   memcpy (a, atsi,
-          sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count);
-  a[atsi_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+          sizeof (struct GNUNET_ATS_Information) * atsi_count);
+  a[atsi_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
   a[atsi_count].value = htonl (0);
   memcpy (&a[atsi_count + 1], msg, msize);
   send_to_all_clients (&ntm->header, GNUNET_YES, 
index 9774292c08415829e9afb5f02b48c00fd8c7188e..2385efc0578683d62377ab0d0059700e1f30bd08 100644 (file)
@@ -60,7 +60,7 @@ GSC_CLIENTS_send_to_client (struct GNUNET_SERVER_Client *client,
 void
 GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
                                           const struct GNUNET_PeerIdentity *neighbour,
-                                          const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                                          const struct GNUNET_ATS_Information *atsi,
                                           unsigned int atsi_count,
                                           const struct GSC_TypeMap *tmap_old,
                                           const struct GSC_TypeMap *tmap_new);
@@ -79,7 +79,7 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
  */
 void
 GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *neighbour,
-                                           const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                                           const struct GNUNET_ATS_Information *atsi,
                                            unsigned int atsi_count,
                                            const struct GSC_TypeMap *tmap_old,
                                            const struct GSC_TypeMap *tmap_new);
@@ -100,7 +100,7 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *ne
  */
 void
 GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender,
-                            const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                            const struct GNUNET_ATS_Information *atsi,
                             unsigned int atsi_count,
                             const struct GNUNET_MessageHeader *msg,
                             uint16_t msize,
index 92a9e13c96137d28371f4389d7370c9a074aa04d..dfc304226aeb3de8b755eadd4167f758ce1a00b7 100644 (file)
@@ -1301,7 +1301,7 @@ struct DeliverMessageContext
   /**
    * Performance information for the connection.
    */
-  const struct GNUNET_TRANSPORT_ATS_Information *atsi;
+  const struct GNUNET_ATS_Information *atsi;
 
   /**
    * Sender of the message.
@@ -1327,7 +1327,7 @@ struct DeliverMessageContext
 void
 GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx, 
                                 const struct GNUNET_MessageHeader *msg,
-                                const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                                const struct GNUNET_ATS_Information *atsi,
                                 uint32_t atsi_count)
 {
   const struct EncryptedMessage *m;
index 3c6734d7707ac0bad4f66a033baaa6f71199d832..0e963ef7aa1ceab496683539d4ceeac22ef25310 100644 (file)
@@ -96,7 +96,7 @@ GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo *kx,
 void
 GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx, 
                                 const struct GNUNET_MessageHeader *msg,
-                                const struct GNUNET_TRANSPORT_ATS_Information *atsi,
+                                const struct GNUNET_ATS_Information *atsi,
                                 uint32_t atsi_count);
 
 
index 60ce0e5124367a3d4ba081b264562c6c214d5f25..505b1797b0f7b7fa0f4e8f8dc633a4343066755a 100644 (file)
@@ -309,7 +309,7 @@ process_queue (struct Neighbour *n)
 static void
 handle_transport_notify_connect (void *cls,
                                  const struct GNUNET_PeerIdentity *peer,
-                                 const struct GNUNET_TRANSPORT_ATS_Information
+                                 const struct GNUNET_ATS_Information
                                  *ats, uint32_t ats_count)
 {
   struct Neighbour *n;
@@ -383,7 +383,7 @@ handle_transport_notify_disconnect (void *cls,
 static void
 handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                           const struct GNUNET_MessageHeader *message,
-                          const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                          const struct GNUNET_ATS_Information *ats,
                           uint32_t ats_count)
 {
   struct Neighbour *n;
index 3c29bd065be6dae0dd1731cb865dedd83fb855ad..c239f27c1b8af20e0393b2fb610dd136dcf14791 100644 (file)
@@ -632,7 +632,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value)
   struct GNUNET_SERVER_TransmitContext *tc = cls;
   struct Session *session = value;
   struct ConnectNotifyMessage cnm;
-  struct GNUNET_TRANSPORT_ATS_Information *a;
+  struct GNUNET_ATS_Information *a;
  
   /* FIXME: code duplication with clients... */
   cnm.header.size = htons (sizeof (struct ConnectNotifyMessage));
@@ -641,7 +641,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value)
   cnm.peer = session->peer;
   a = &cnm.ats;
   // FIXME: full ats...
-  a[0].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+  a[0].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
   a[0].value = htonl (0);
   GNUNET_SERVER_transmit_context_append_message (tc, &cnm.header);
   return GNUNET_OK;
index 15e3f812baf380efcb1b8ee6ef0d0b4636f03d4d..10cba9d8a376d70bad064b7afabf91c72fc63617 100644 (file)
@@ -165,7 +165,7 @@ transmit_ready (void *cls, size_t size, void *buf)
 
 static void
 connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   struct PeerContext *pc = cls;
 
@@ -218,7 +218,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
 static int
 inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other));
@@ -229,7 +229,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 static int
 outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
                  const struct GNUNET_MessageHeader *message,
-                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                 const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Core notifies about outbound data for `%4s'.\n",
@@ -242,7 +242,7 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving message from `%4s'.\n",
               GNUNET_i2s (peer));
index 05cc25afa2be2cf2169b46c4b207156921456434..1ae67b02b81d630366e71e61e8e5874adcb249da 100644 (file)
@@ -225,7 +225,7 @@ transmit_ready (void *cls, size_t size, void *buf)
 
 static void
 connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   struct PeerContext *pc = cls;
 
@@ -270,7 +270,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
 static int
 inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
 #if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -283,7 +283,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 static int
 outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
                  const struct GNUNET_MessageHeader *message,
-                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                 const struct GNUNET_ATS_Information *atsi)
 {
 #if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -300,7 +300,7 @@ transmit_ready (void *cls, size_t size, void *buf);
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   static int n;
   unsigned int s;
index b7e2b449b1eb06c932947c3557435de03903cd80..a1c3613761152ae3d4def4c97fe14129cbde85db 100644 (file)
@@ -90,7 +90,7 @@ cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tskctx)
 static int
 receive (void *cls, const struct GNUNET_PeerIdentity *other,
          const struct GNUNET_MessageHeader *message,
-         const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+         const struct GNUNET_ATS_Information *atsi)
 {
   if (die_task != GNUNET_SCHEDULER_NO_TASK)
     GNUNET_SCHEDULER_cancel (die_task);
@@ -134,7 +134,7 @@ init (void *cls, struct GNUNET_CORE_Handle *core,
 
 static void
 connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
-            const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+            const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %s.\n",
               GNUNET_i2s (peer));
index 744758191aa358b33ec71fa0dd4f317f4585f9bb..9825131be99f6f74a0f25d401cb92648993f683a 100644 (file)
@@ -67,7 +67,7 @@ static int ok;
 
 static void
 connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
 }
 
@@ -81,7 +81,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
 static int
 inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   return GNUNET_OK;
 }
@@ -90,7 +90,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 static int
 outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
                  const struct GNUNET_MessageHeader *message,
-                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                 const struct GNUNET_ATS_Information *atsi)
 {
   return GNUNET_OK;
 }
index e3b7606245c6a9df7441e57eccc5d41af15c9316..3f619f49af2a2d61a5a2e3ca0510ee62f382e8a9 100644 (file)
@@ -358,7 +358,7 @@ transmit_ready (void *cls, size_t size, void *buf)
 
 static void
 connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   struct PeerContext *pc = cls;
 
@@ -418,7 +418,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
 static int
 inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
 #if DEBUG_TRANSMISSION
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -433,7 +433,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 static int
 outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
                  const struct GNUNET_MessageHeader *message,
-                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                 const struct GNUNET_ATS_Information *atsi)
 {
 #if DEBUG_TRANSMISSION
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -450,7 +450,7 @@ transmit_ready (void *cls, size_t size, void *buf);
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   static int n;
   const struct TestMessage *hdr;
index 265bcdeef1461b8caecf858cfdf3be47353eb0a2..9d0bd996dfdb9922d7e18f9170db05f3dc94f18d 100644 (file)
@@ -603,7 +603,7 @@ send_find_peer_message (void *cls,
  */
 static void
 handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                     const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                     const struct GNUNET_ATS_Information *atsi)
 {
   struct PeerInfo *ret;
   int peer_bucket;
@@ -1515,7 +1515,7 @@ static int
 handle_dht_p2p_put (void *cls,
                    const struct GNUNET_PeerIdentity *peer,
                    const struct GNUNET_MessageHeader *message,
-                   const struct GNUNET_TRANSPORT_ATS_Information
+                   const struct GNUNET_ATS_Information
                    *atsi)
 {
   const struct PeerPutMessage *put;
@@ -1735,7 +1735,7 @@ handle_find_peer (const struct GNUNET_PeerIdentity *sender,
 static int
 handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer,
                    const struct GNUNET_MessageHeader *message,
-                   const struct GNUNET_TRANSPORT_ATS_Information
+                   const struct GNUNET_ATS_Information
                    *atsi)
 {
   struct PeerGetMessage *get;
@@ -1870,7 +1870,7 @@ handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer,
 static int
 handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer,
                       const struct GNUNET_MessageHeader *message,
-                      const struct GNUNET_TRANSPORT_ATS_Information
+                      const struct GNUNET_ATS_Information
                       *atsi)
 {
   const struct PeerResultMessage *prm;
index 44fa9dee562ab59b696ebdac2985c2b452c96ba9..3882ed36fa33e0fc9ef42121a7b28d80053f080e 100644 (file)
@@ -1347,12 +1347,12 @@ send_message_delayed (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  * @return connected transport distance
  */
 static uint32_t
-get_atsi_distance (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+get_atsi_distance (const struct GNUNET_ATS_Information *atsi)
 {
-  while ((ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) &&
-         (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE))
+  while ((ntohl (atsi->type) != GNUNET_ATS_ARRAY_TERMINATOR) &&
+         (ntohl (atsi->type) != GNUNET_ATS_QUALITY_NET_DISTANCE))
     atsi++;
-  if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR)
+  if (ntohl (atsi->type) == GNUNET_ATS_ARRAY_TERMINATOR)
   {
     GNUNET_break (0);
     /* FIXME: we do not have distance data? Assume direct neighbor. */
@@ -1368,12 +1368,12 @@ get_atsi_distance (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
  * @return connection latency
  */
 static struct GNUNET_TIME_Relative
-get_atsi_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+get_atsi_latency (const struct GNUNET_ATS_Information *atsi)
 {
-  while ((ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) &&
-         (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY))
+  while ((ntohl (atsi->type) != GNUNET_ATS_ARRAY_TERMINATOR) &&
+         (ntohl (atsi->type) != GNUNET_ATS_QUALITY_NET_DELAY))
     atsi++;
-  if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR)
+  if (ntohl (atsi->type) == GNUNET_ATS_ARRAY_TERMINATOR)
   {
     GNUNET_break (0);
     /* how can we not have latency data? */
@@ -1398,7 +1398,7 @@ get_atsi_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 static int
 handle_dv_data_message (void *cls, const struct GNUNET_PeerIdentity *peer,
                         const struct GNUNET_MessageHeader *message,
-                        const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                        const struct GNUNET_ATS_Information *atsi)
 {
   const p2p_dv_MESSAGE_Data *incoming = (const p2p_dv_MESSAGE_Data *) message;
   const struct GNUNET_MessageHeader *packed_message;
@@ -2075,12 +2075,12 @@ handle_dv_send_message (void *cls, struct GNUNET_SERVER_Client *client,
 static int
 handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer,
                           const struct GNUNET_MessageHeader *message,
-                          const struct GNUNET_TRANSPORT_ATS_Information *atsi);
+                          const struct GNUNET_ATS_Information *atsi);
 
 static int
 handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer,
                               const struct GNUNET_MessageHeader *message,
-                              const struct GNUNET_TRANSPORT_ATS_Information
+                              const struct GNUNET_ATS_Information
                               *atsi);
 /** End forward declarations **/
 
@@ -2649,19 +2649,19 @@ addUpdateNeighbor (const struct GNUNET_PeerIdentity *peer,
                       "%s: learned about peer %llu from which we have a previous unknown message, processing!\n",
                       my_short_id, referrer_peer_id);
 #endif
-          struct GNUNET_TRANSPORT_ATS_Information atsi[3];
+          struct GNUNET_ATS_Information atsi[3];
 
-          atsi[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+          atsi[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
           atsi[0].value = htonl (referrer->pending_messages[i].distance);
-          atsi[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
+          atsi[1].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
           atsi[1].value =
               htonl ((uint32_t) referrer->pending_messages[i].
                      latency.rel_value);
-          atsi[2].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+          atsi[2].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
           atsi[2].value = htonl (0);
           handle_dv_data_message (NULL, &referrer->pending_messages[i].sender,
                                   referrer->pending_messages[i].message,
-                                  (const struct GNUNET_TRANSPORT_ATS_Information
+                                  (const struct GNUNET_ATS_Information
                                    *) &atsi);
           GNUNET_free (referrer->pending_messages[i].message);
           referrer->pending_messages[i].sender_id = 0;
@@ -2732,7 +2732,7 @@ addUpdateNeighbor (const struct GNUNET_PeerIdentity *peer,
 static int
 handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer,
                               const struct GNUNET_MessageHeader *message,
-                              const struct GNUNET_TRANSPORT_ATS_Information
+                              const struct GNUNET_ATS_Information
                               *atsi)
 {
   struct DirectNeighbor *referrer;
@@ -2781,7 +2781,7 @@ handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer,
 static int
 handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer,
                           const struct GNUNET_MessageHeader *message,
-                          const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                          const struct GNUNET_ATS_Information *atsi)
 {
   struct DirectNeighbor *referrer;
   p2p_dv_MESSAGE_NeighborInfo *enc_message =
@@ -3082,7 +3082,7 @@ process_peerinfo (void *cls, const struct GNUNET_PeerIdentity *peer,
  */
 static void
 handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                     const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                     const struct GNUNET_ATS_Information *atsi)
 {
   struct DirectNeighbor *neighbor;
   struct DistantNeighbor *about;
index feb8a2e574867c2dcbc01f0b86f588966f9c40f7..5e2a6bd6c072ee677f9b760d3a156241fdebb070 100644 (file)
@@ -162,16 +162,16 @@ handle_dv_message_received (void *cls, struct GNUNET_PeerIdentity *sender,
                    distance);
   GNUNET_free_non_null (my_id);
 #endif
-  struct GNUNET_TRANSPORT_ATS_Information ats[2];
+  struct GNUNET_ATS_Information ats[2];
 
-  ats[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+  ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
   ats[0].value = htonl (distance);
-  ats[1].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
+  ats[1].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR);
   ats[1].value = htonl (0);
 
   plugin->env->receive (plugin->env->cls, sender,
                         (struct GNUNET_MessageHeader *) msg,
-                        (const struct GNUNET_TRANSPORT_ATS_Information *) &ats,
+                        (const struct GNUNET_ATS_Information *) &ats,
                         2, NULL, sender_address, sender_address_len);
 
 }
index a38e2fa290ed01ee61354e75c39e2732ea621f0b..82b3cb2357cc2a4b9f2559b94d780c79a59d1711 100644 (file)
@@ -394,12 +394,12 @@ send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
  * @return connected transport distance
  */
 static uint32_t
-get_atsi_distance (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+get_atsi_distance (const struct GNUNET_ATS_Information *atsi)
 {
-  while ((ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) &&
-         (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE))
+  while ((ntohl (atsi->type) != GNUNET_ATS_ARRAY_TERMINATOR) &&
+         (ntohl (atsi->type) != GNUNET_ATS_QUALITY_NET_DISTANCE))
     atsi++;
-  if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR)
+  if (ntohl (atsi->type) == GNUNET_ATS_ARRAY_TERMINATOR)
   {
     GNUNET_break (0);
     /* FIXME: we do not have distance data? Assume direct neighbor. */
@@ -411,7 +411,7 @@ get_atsi_distance (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   struct TestMessageContext *pos = cls;
   struct GNUNET_TestMessage *msg = (struct GNUNET_TestMessage *) message;
@@ -527,7 +527,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = {
  */
 static void
 connect_notify_peer2 (void *cls, const struct GNUNET_PeerIdentity *peer,
-                      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                      const struct GNUNET_ATS_Information *atsi)
 {
   struct TestMessageContext *pos = cls;
 
@@ -580,7 +580,7 @@ init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server,
  */
 static void
 connect_notify_peer1 (void *cls, const struct GNUNET_PeerIdentity *peer,
-                      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                      const struct GNUNET_ATS_Information *atsi)
 {
   struct TestMessageContext *pos = cls;
 
@@ -840,7 +840,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
  */
 static void
 all_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
-                     const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                     const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_TESTING_Daemon *d = cls;
   struct GNUNET_TESTING_Daemon *second_daemon;
index d4728760dafd3862e3cf619fbd658196a0599981..866860c0a218db50f2dfaedee417ee7047ae3599 100644 (file)
@@ -226,7 +226,7 @@ GSF_test_get_load_too_high_ (uint32_t priority)
 static int
 handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   struct GSF_ConnectedPeer *cp;
 
@@ -296,7 +296,7 @@ consider_forwarding (void *cls, struct GSF_PendingRequest *pr,
 static int
 handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   struct GSF_PendingRequest *pr;
 
@@ -439,7 +439,7 @@ consider_peer_for_forwarding (void *cls, const GNUNET_HashCode * key,
  */
 static void
 peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
-                      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                      const struct GNUNET_ATS_Information *atsi)
 {
   struct GSF_ConnectedPeer *cp;
 
index 3a2bdac7026e4fb4049fa713ddd368aa2bdedabd..0c852ec6440be1b368cd004658ffb7ff3b7196d4 100644 (file)
@@ -331,14 +331,14 @@ get_trust_filename (const struct GNUNET_PeerIdentity *id)
  * @return connection latency
  */
 static struct GNUNET_TIME_Relative
-get_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+get_latency (const struct GNUNET_ATS_Information *atsi)
 {
   if (atsi == NULL)
     return GNUNET_TIME_UNIT_SECONDS;
-  while ((ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) &&
-         (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY))
+  while ((ntohl (atsi->type) != GNUNET_ATS_ARRAY_TERMINATOR) &&
+         (ntohl (atsi->type) != GNUNET_ATS_QUALITY_NET_DELAY))
     atsi++;
-  if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR)
+  if (ntohl (atsi->type) == GNUNET_ATS_ARRAY_TERMINATOR)
   {
     /* We sometime have no latency data, i.e. if the address came from 
        peerinfo and we never had a chance to play transport-level 
@@ -358,7 +358,7 @@ get_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
  */
 static void
 update_atsi (struct GSF_ConnectedPeer *cp,
-             const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+             const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_TIME_Relative latency;
 
@@ -584,7 +584,7 @@ ats_reserve_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
  */
 struct GSF_ConnectedPeer *
 GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer,
-                           const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                           const struct GNUNET_ATS_Information *atsi)
 {
   struct GSF_ConnectedPeer *cp;
   char *fn;
@@ -669,7 +669,7 @@ int
 GSF_handle_p2p_migration_stop_ (void *cls,
                                 const struct GNUNET_PeerIdentity *other,
                                 const struct GNUNET_MessageHeader *message,
-                                const struct GNUNET_TRANSPORT_ATS_Information
+                                const struct GNUNET_ATS_Information
                                 *atsi)
 {
   struct GSF_ConnectedPeer *cp;
index 4a238dce82793534b80399ce347037c03ea90f4d..c725dee75e1e48089e7abd5a7b90459134ba1710 100644 (file)
@@ -39,7 +39,7 @@ struct GSF_PeerPerformanceData
   /**
    * Transport performance data.
    */
-  struct GNUNET_TRANSPORT_ATS_Information *atsi;
+  struct GNUNET_ATS_Information *atsi;
 
   /**
    * List of the last clients for which this peer successfully
@@ -172,7 +172,7 @@ struct GSF_PeerTransmitHandle;
  */
 struct GSF_ConnectedPeer *
 GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer,
-                           const struct GNUNET_TRANSPORT_ATS_Information *atsi);
+                           const struct GNUNET_ATS_Information *atsi);
 
 
 /**
@@ -267,7 +267,7 @@ int
 GSF_handle_p2p_migration_stop_ (void *cls,
                                 const struct GNUNET_PeerIdentity *other,
                                 const struct GNUNET_MessageHeader *message,
-                                const struct GNUNET_TRANSPORT_ATS_Information
+                                const struct GNUNET_ATS_Information
                                 *atsi);
 
 
index 30f73600295848c8fc0ea45e2fe85408a64f66d8..fb23d2345bca4b3f1681e06ee2159553876e6f6c 100644 (file)
@@ -140,7 +140,7 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
 static int
 advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
                        const struct GNUNET_MessageHeader *message,
-                       const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                       const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_assert (NULL != client_adv_handler);
   return (*client_adv_handler) (cls, peer, message, atsi);
@@ -156,7 +156,7 @@ advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
  */
 static void
 connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
-                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                 const struct GNUNET_ATS_Information *atsi)
 {
   if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity)))
     return;
index 1cc5836af6ae3842befb70d1d7ca72ebfa5ba259..1f3ad2a7c7212f9dcfc95f55a6d4fecb166bdfd8 100644 (file)
@@ -1110,7 +1110,7 @@ task_hostlist_saving (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  */
 static void
 handler_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                 const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_assert (stat_connection_count < UINT_MAX);
   stat_connection_count++;
@@ -1148,7 +1148,7 @@ handler_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 static int
 handler_advertisement (void *cls, const struct GNUNET_PeerIdentity *peer,
                        const struct GNUNET_MessageHeader *message,
-                       const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                       const struct GNUNET_ATS_Information *atsi)
 {
   size_t size;
   size_t uri_size;
index 633824c411a3094cd27cabf8da62ccdb1748685a..fb4c1b1b9243a8c9d25b918aaeeccbd30cc33025 100644 (file)
@@ -365,7 +365,7 @@ adv_transmit_ready (void *cls, size_t size, void *buf)
  */
 static void
 connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
-                 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                 const struct GNUNET_ATS_Information *atsi)
 {
   size_t size;
 
index 09410e14d13949c9eb84d196bec1bb802aceccb4..bcb302978aba2d87eea9d0a1ffbb152e8de8921a 100644 (file)
@@ -97,7 +97,7 @@ timeout_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  */
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   if (peer == NULL)
index c6b04ac7e6c242823f037a295f5002e863e6479b..9d72433cee0e532e33f20fc45e1b4019ceca21f4 100644 (file)
@@ -298,7 +298,7 @@ check_statistics (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 static int
 ad_arrive_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
                    const struct GNUNET_MessageHeader *message,
-                   const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                   const struct GNUNET_ATS_Information *atsi)
 {
   char *hostname;
   char *expected_uri;
index ae5c1b6dd9521728f2dd6ae6ece6ad32be34f291..18757a79ec408bb67d313a5f661b610fcf850553 100644 (file)
@@ -108,7 +108,7 @@ timeout_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  */
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   if (peer == NULL)
index 0213f0ed14bd8705397807314c1e9647daedb7eb..f2d1c2aad4fd9b42e7a11f89ae44b6a00c88ca12 100644 (file)
  * @brief automatic transport selection and outbound bandwidth determination
  * @author Christian Grothoff
  * @author Matthias Wachs
- *
- * TODO:
- * - move GNUNET_TRANSPORT_ATS* in here and rename...
  */
 #ifndef GNUNET_ATS_SERVICE_H
 #define GNUNET_ATS_SERVICE_H
 
 #include "gnunet_constants.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_transport_service.h"
-#include "gnunet_transport_plugin.h"
+
+
+/**
+ * Enum defining all known property types for ATS Enum values are used
+ * in the GNUNET_ATS_Information struct as
+ * (key,value)-pairs.
+ *
+ * Cost are always stored in uint32_t, so all units used to define costs
+ * have to be normalized to fit in uint32_t [0 .. 4.294.967.295]
+ */
+enum GNUNET_ATS_Property
+{
+
+  /**
+   * End of the array.
+   * @deprecated
+   */
+  GNUNET_ATS_ARRAY_TERMINATOR = 0,
+
+  /**
+   * Actual traffic on this connection from the other peer to this peer.
+   * 
+   * Unit: [bytes/second]
+   */
+  GNUNET_ATS_UTILIZATION_UP,
+
+  /**
+   * Actual traffic on this connection from this peer to the other peer.
+   * 
+   * Unit: [bytes/second]
+   */
+  GNUNET_ATS_UTILIZATION_DOWN,
+
+  /**
+   * Delay
+   * Time between when the time packet is sent and the packet arrives
+   *
+   * Unit: [ms]
+   *
+   * Examples:
+   *
+   * LAN   :    1
+   * WLAN  :    2
+   * Dialup:  500
+   */
+  GNUNET_ATS_QUALITY_NET_DELAY,
+  /**
+   * Distance on network layer (required for distance-vector routing).
+   *
+   * Unit: [DV-hops]
+   */
+  GNUNET_ATS_QUALITY_NET_DISTANCE,
+  /**
+   * Network overhead on WAN (Wide-Area Network)
+   *
+   * How many bytes are sent on the WAN when 1 kilobyte (1024 bytes)
+   * of application data is transmitted?
+   * A factor used with connect cost, bandwidth cost and energy cost
+   * to describe the overhead produced by the transport protocol
+   *
+   * Unit: [bytes/kb]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   *
+   * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb]
+   * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb]
+   * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8  = 1090 [bytes/kb]
+   * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8  = 1110 [bytes/kb]
+   */
+  GNUNET_ATS_COST_WAN,
+  /**
+   * Network overhead on LAN (Local-Area Network)
+   *
+   * How many bytes are sent on the LAN when 1 kilobyte (1024 bytes)
+   * of application data is transmitted?
+   * A factor used with connect cost, bandwidth cost and energy cost
+   * to describe the overhead produced by the transport protocol
+   *
+   * Unit: [bytes/kb]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   *
+   * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb]
+   * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb]
+   * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8  = 1090 [bytes/kb]
+   * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8  = 1110 [bytes/kb]
+   */
+  GNUNET_ATS_COST_LAN,
+  
+  /**
+   * Network overhead on WLAN (Wireless Local Area Network)
+   *
+   * How many bytes are sent on the LAN when 1 kilobyte (1024 bytes)
+   * of application data is transmitted?
+   * A factor used with connect cost, bandwidth cost and energy cost
+   * to describe the overhead produced by the transport protocol
+   *
+   * Unit: [bytes/kb]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   *
+   * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb]
+   * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb]
+   * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8  = 1090 [bytes/kb]
+   * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8  = 1110 [bytes/kb]
+   */
+  GNUNET_ATS_COST_WLAN
+
+
+  /* Cost related values */
+  /* =================== */
+
+  /**
+   * Volume based cost in financial units to transmit data
+   *
+   * Note: This value is not bound to a specific currency or unit and only
+   * used locally.
+   * "cent" just refers the smallest amount of money in the respective
+   * currency.
+   *
+   * Unit: [cent/MB]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   * LAN:  0 [cent/MB]
+   * 2G : 10 [cent/MB]
+   */
+  // GNUNET_ATS_COST_FINANCIAL_PER_VOLUME = 1,
+
+  /**
+   * Time based cost in financial units to transmit data
+   *
+   * Note: This value is not bound to a specific currency or unit and only
+   * used locally.
+   * "cent" just refers the smallest amount of money in the respective
+   * currency.
+   *
+   * Unit: [cent/h]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   * LAN   :  0 [cent/h]
+   * Dialup: 10 [cent/h]
+   */
+  // GNUNET_ATS_COST_FINANCIAL_PER_TIME = 2,
+
+  /**
+   * Computational costs
+   *
+   * Effort of preparing data to be sent with this transport
+   * Includes encoding, encryption and conversion of data
+   * Partial values can be summed up: c_sum = c_enc + c_enc + c_conv
+   * Resulting values depend on local system properties, e.g. CPU
+   *
+   * Unit: [ms/GB]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   *
+   * HTTPS with AES CBC-256:   7,382
+   * HTTPS with AES CBC-128:   5,279
+   * HTTPS with RC4-1024:      2,652
+   */
+  // GNUNET_ATS_COST_COMPUTATIONAL = 3,
+
+  /**
+   * Energy consumption
+   *
+   * Energy consumption using this transport when sending with a certain
+   * power at a certain bitrate. This is only an approximation based on:
+   * Energy consumption E = P / D
+   *
+   * with:
+   * Power P in Watt (J/s)
+   * Datarate D in MBit/s
+   *
+   * Conversion between power P and dBm used by WLAN in radiotap's dBm TX power:
+   *
+   * Lp(dbm) = 10 log10 (P/ 1mW)
+   *
+   * => P = 1 mW  * 10^(Lp(dbm)/10)
+   *
+   * Unit: [mJ/MB]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   *
+   * LAN:       0
+   * WLAN:      89 (600 mW @ 802.11g /w 54 MBit/s)
+   * Bluetooth: 267 (100 mW @ BT2.0 EDR /w 3 MBit/s)
+   */
+  // GNUNET_ATS_COST_ENERGY_CONSUMPTION = 4,
+
+  /**
+   * Connect cost
+   * How many bytes are transmitted to initiate a new connection using
+   * this transport?
+   *
+   * Unit: [bytes]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   *
+   * UDP (No connection)      :
+   *     0 bytes
+   * TCP (TCP 3-Way handshake):
+   *   220 bytes Ethernet,  172 bytes TCP/IP,  122 bytes TCP
+   * HTTP (TCP + Header)      :
+   *   477 bytes Ethernet,  429 bytes TCP/IP,  374 bytes TCP,  278 bytes HTTP
+   * HTTPS  HTTP+TLS Handshake:
+   *  2129 bytes Ethernet, 1975 bytes TCP/IP, 1755 bytes TCP, 1403 bytes HTTPS
+   *
+   * */
+  // GNUNET_ATS_COST_CONNECT = 5,
+
+  /**
+   * Bandwidth cost
+   *
+   * How many bandwidth is available to consume?
+   * Used to calculate which impact sending data with this transport has
+   *
+   * Unit: [kB/s]
+   *
+   * Interpretation: more is better
+   *
+   * Examples:
+   * LAN:     12,800  (100 MBit/s)
+   * WLAN:    6,912   (54 MBit/s)
+   * Dial-up: 8       (64 Kbit/s)
+   *
+   */
+  // GNUNET_ATS_COST_BANDWITH_AVAILABLE = 6,
+
+  /**
+   *  Network overhead
+   *
+   * How many bytes are sent over the wire when 1 kilobyte (1024 bytes)
+   * of application data is transmitted?
+   * A factor used with connect cost, bandwidth cost and energy cost
+   * to describe the overhead produced by the transport protocol
+   *
+   * Unit: [bytes/kb]
+   *
+   * Interpretation: less is better
+   *
+   * Examples:
+   *
+   * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb]
+   * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb]
+   * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8  = 1090 [bytes/kb]
+   * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8  = 1110 [bytes/kb]
+   */
+  // GNUNET_ATS_COST_NETWORK_OVERHEAD = 7,
+
+
+  /* Quality related values */
+  /* ====================== */
+
+  /* Physical layer quality properties */
+
+  /**
+   * Signal strength on physical layer
+   *
+   * Unit: [dBm]
+   */
+  // GNUNET_ATS_QUALITY_PHY_SIGNAL_STRENGTH = 1025,
+
+  /**
+   * Collision rate on physical layer
+   *
+   * Unit: [B/s]
+   */
+  // GNUNET_ATS_QUALITY_PHY_COLLISION_RATE = 1026,
+
+  /**
+   * Error rate on physical layer
+   *
+   * Unit: [B/s]
+   */
+  // GNUNET_ATS_QUALITY_PHY_ERROR_RATE = 1027,
+
+  /**
+   * Jitter
+   * Time variations of the delay
+   * 1st derivative of a delay function
+   *
+   * Unit: [ms]
+   */
+  // GNUNET_ATS_QUALITY_NET_JITTER = 1029,
+
+  /**
+   * Error rate on network layer
+   *
+   * Unit: [B/s]
+   *
+   * Examples:
+   *
+   * LAN       :    0
+   * WLAN      :  400
+   * Bluetooth :  100
+   * Note: This numbers are just assumptions as an example, not
+   * measured or somehow determined
+   */
+  // GNUNET_ATS_QUALITY_NET_ERRORRATE = 1030,
+
+  /**
+   * Drop rate on network layer
+   * Bytes actively dismissed by a network component during transmission
+   * Reasons for dropped data can be full queues, congestion, quota violations...
+   *
+   * Unit: [B/s]
+   *
+   * Examples:
+   *
+   * LAN       :    0
+   * WLAN      :  400
+   * Bluetooth :  100
+   * Note: This numbers are just assumptions as an example, not
+   * measured or somehow determined
+   */
+  // GNUNET_ATS_QUALITY_NET_DROPRATE = 1031,
+
+  /**
+   * Loss rate on network layer
+   * Bytes lost during transmission
+   * Reasons can be collisions, ...
+   *
+   * Unit: [B/s]
+   *
+   * Examples:
+   *
+   * LAN       :    0
+   * WLAN      :   40
+   * Bluetooth :   10
+   * Note: This numbers are just assumptions as an example, not measured
+   * or somehow determined
+   */
+  // GNUNET_ATS_QUALITY_NET_LOSSRATE = 1032,
+
+  /**
+   * Throughput on network layer
+   *
+   * Unit: [kB/s]
+   *
+   * Examples:
+   *
+   * LAN   : 3400
+   * WLAN  : 1200
+   * Dialup:     4
+   *
+   */
+  // GNUNET_ATS_QUALITY_NET_THROUGHPUT = 1033,
+
+
+  /* Availability related values */
+  /* =========================== */
+
+  /**
+   * Is a peer reachable?
+   */
+  // GNUNET_ATS_AVAILABILITY_REACHABLE = 2048,
+
+  /**
+   * Is there a connection established to a peer using this transport
+   */
+  // GNUNET_ATS_AVAILABILITY_CONNECTED = 2049
+};
+
+
+/**
+ * struct used to communicate the transport's properties like cost and
+ * quality of service as well as high-level constraints on resource
+ * consumption.
+ *
+ *                             +---+
+ *  +-----------+ Constraints  |   |  Plugin properties +---------+
+ *  | Highlevel |------------> |ATS| <------------------|Transport|
+ *  | Component | ATS struct   |   |    ATS struct      | Plugin  |
+ *  +-----------+              |   |                    +---------+
+ *                             +---+
+ *
+ * This structure will be used by transport plugins to communicate
+ * costs to ATS or by higher level components to tell ATS their
+ * constraints.  Always a pair of (GNUNET_ATS_Property,
+ * uint32_t value).  Value is always uint32_t, so all units used to
+ * define costs have to be normalized to fit uint32_t.
+ */
+struct GNUNET_ATS_Information
+{
+  /**
+   * ATS property type, in network byte order.
+   */
+  uint32_t type;
+
+  /**
+   * ATS property value, in network byte order.
+   */
+  uint32_t value;
+};
+
 
 
 /* ******************************** Scheduling API ***************************** */
@@ -79,7 +489,7 @@ typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls,
                                                       GNUNET_BANDWIDTH_Value32NBO
                                                       bandwidth_in,
                                                      const struct
-                                                     GNUNET_TRANSPORT_ATS_Information
+                                                     GNUNET_ATS_Information
                                                      * ats,
                                                      uint32_t ats_count);
 
@@ -142,7 +552,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
                            const char *plugin_name,
                            const void *plugin_addr, size_t plugin_addr_len,
                           struct Session *session,
-                           const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                           const struct GNUNET_ATS_Information *ats,
                            uint32_t ats_count);
 
 
@@ -200,7 +610,7 @@ typedef void (*GNUNET_ATS_PeerInformationCallback) (void *cls,
                                                    GNUNET_BANDWIDTH_Value32NBO
                                                    bandwidth_in,
                                                    const struct
-                                                   GNUNET_TRANSPORT_ATS_Information
+                                                   GNUNET_ATS_Information
                                                    * ats,
                                                    uint32_t ats_count);
 
index a7c5ba45c6ed3200742a0193c4ce8850ae84889e..d0adf127ba7394c81dc301f1a9721853571c155e 100644 (file)
@@ -62,7 +62,7 @@ typedef void (*GNUNET_CORE_ConnectEventHandler) (void *cls,
                                                  const struct
                                                  GNUNET_PeerIdentity * peer,
                                                  const struct
-                                                 GNUNET_TRANSPORT_ATS_Information
+                                                 GNUNET_ATS_Information
                                                  * atsi);
 
 
@@ -95,7 +95,7 @@ typedef int (*GNUNET_CORE_MessageCallback) (void *cls,
                                             const struct GNUNET_MessageHeader *
                                             message,
                                             const struct
-                                            GNUNET_TRANSPORT_ATS_Information *
+                                            GNUNET_ATS_Information *
                                             atsi);
 
 
index bf43c82899535a55abad3de058afd97f07bd1c9a..ab573557c8bcfa6c618f937b69be52b6946bf76f 100644 (file)
@@ -75,7 +75,7 @@ typedef int (*GNUNET_MESH_MessageCallback) (void *cls,
                                             const struct GNUNET_MessageHeader *
                                             message,
                                             const struct
-                                            GNUNET_TRANSPORT_ATS_Information *
+                                            GNUNET_ATS_Information *
                                             atsi);
 
 
@@ -189,7 +189,7 @@ typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls,
                                                   const struct
                                                   GNUNET_PeerIdentity * peer,
                                                   const struct
-                                                  GNUNET_TRANSPORT_ATS_Information
+                                                  GNUNET_ATS_Information
                                                   * atsi);
 
 
index 6db406de373b398ac0e2a697e8999c1fa22a95d7..6dd9da66c4d55ca89eb441b18bb611176b1d671e 100644 (file)
@@ -75,7 +75,7 @@ typedef int (*GNUNET_MESH_MessageCallback) (void *cls,
                                             const struct GNUNET_MessageHeader *
                                             message,
                                             const struct
-                                            GNUNET_TRANSPORT_ATS_Information *
+                                            GNUNET_ATS_Information *
                                             atsi);
 
 
@@ -124,7 +124,7 @@ typedef void *(GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls,
                                                               GNUNET_PeerIdentity
                                                               * initiator,
                                                               const struct
-                                                              GNUNET_TRANSPORT_ATS_Information
+                                                              GNUNET_ATS_Information
                                                               * atsi);
 
 
@@ -208,7 +208,7 @@ typedef void (*GNUNET_MESH_PeerConnectHandler) (void *cls,
                                                 const struct GNUNET_PeerIdentity
                                                 * peer,
                                                 const struct
-                                                GNUNET_TRANSPORT_ATS_Information
+                                                GNUNET_ATS_Information
                                                 * atsi);
 
 
index bc5b791d588f6c7d71bdcc078d62fbb21cf8d205..9fc0ffd8494b22552628eaf1fc0d98b943b77475 100644 (file)
@@ -114,7 +114,7 @@ typedef struct
                                                                     GNUNET_MessageHeader
                                                                     * message,
                                                                     const struct
-                                                                    GNUNET_TRANSPORT_ATS_Information
+                                                                    GNUNET_ATS_Information
                                                                     * ats,
                                                                     uint32_t
                                                                     ats_count,
index 2b6675c89b661b75ede5420fd96519f6297ca600..40e3fca5b847c6c8de54078ea88a58b993d09c8b 100644 (file)
@@ -35,12 +35,8 @@ extern "C"
 #endif
 #endif
 
-#include "gnunet_bandwidth_lib.h"
-#include "gnunet_configuration_lib.h"
-#include "gnunet_crypto_lib.h"
-#include "gnunet_connection_lib.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_time_lib.h"
+#include "gnunet_util_lib.h"
+#include "gnunet_ats_service.h"
 
 /**
  * Version number of the transport API.
@@ -48,349 +44,6 @@ extern "C"
 #define GNUNET_TRANSPORT_VERSION 0x00000000
 
 
-/**
- * Enum defining all known property types for ATS Enum values are used
- * in the GNUNET_TRANSPORT_ATS_Information struct as
- * (key,value)-pairs.
- *
- * Cost are always stored in uint32_t, so all units used to define costs
- * have to be normalized to fit in uint32_t [0 .. 4.294.967.295]
- *
- * To keep the elements ordered
- *    1..1024 : Values with a relation to cost
- * 1025..2048 : Values with a relation to quality
- * 2049..3072 : Values with a relation to availability
- *
- */
-enum GNUNET_TRANSPORT_ATS_Property
-{
-
-  /**
-   * End of the array.
-   */
-  GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR = 0,
-
-  /* Cost related values */
-  /* =================== */
-
-  /**
-   * Volume based cost in financial units to transmit data
-   *
-   * Note: This value is not bound to a specific currency or unit and only
-   * used locally.
-   * "cent" just refers the smallest amount of money in the respective
-   * currency.
-   *
-   * Unit: [cent/MB]
-   *
-   * Interpretation: less is better
-   *
-   * Examples:
-   * LAN:  0 [cent/MB]
-   * 2G : 10 [cent/MB]
-   */
-  GNUNET_TRANSPORT_ATS_COST_FINANCIAL_PER_VOLUME = 1,
-
-  /**
-   * Time based cost in financial units to transmit data
-   *
-   * Note: This value is not bound to a specific currency or unit and only
-   * used locally.
-   * "cent" just refers the smallest amount of money in the respective
-   * currency.
-   *
-   * Unit: [cent/h]
-   *
-   * Interpretation: less is better
-   *
-   * Examples:
-   * LAN   :  0 [cent/h]
-   * Dialup: 10 [cent/h]
-   */
-  GNUNET_TRANSPORT_ATS_COST_FINANCIAL_PER_TIME = 2,
-
-  /**
-   * Computational costs
-   *
-   * Effort of preparing data to be sent with this transport
-   * Includes encoding, encryption and conversion of data
-   * Partial values can be summed up: c_sum = c_enc + c_enc + c_conv
-   * Resulting values depend on local system properties, e.g. CPU
-   *
-   * Unit: [ms/GB]
-   *
-   * Interpretation: less is better
-   *
-   * Examples:
-   *
-   * HTTPS with AES CBC-256:   7,382
-   * HTTPS with AES CBC-128:   5,279
-   * HTTPS with RC4-1024:      2,652
-   */
-  GNUNET_TRANSPORT_ATS_COST_COMPUTATIONAL = 3,
-
-  /**
-   * Energy consumption
-   *
-   * Energy consumption using this transport when sending with a certain
-   * power at a certain bitrate. This is only an approximation based on:
-   * Energy consumption E = P / D
-   *
-   * with:
-   * Power P in Watt (J/s)
-   * Datarate D in MBit/s
-   *
-   * Conversion between power P and dBm used by WLAN in radiotap's dBm TX power:
-   *
-   * Lp(dbm) = 10 log10 (P/ 1mW)
-   *
-   * => P = 1 mW  * 10^(Lp(dbm)/10)
-   *
-   * Unit: [mJ/MB]
-   *
-   * Interpretation: less is better
-   *
-   * Examples:
-   *
-   * LAN:       0
-   * WLAN:      89 (600 mW @ 802.11g /w 54 MBit/s)
-   * Bluetooth: 267 (100 mW @ BT2.0 EDR /w 3 MBit/s)
-   */
-  GNUNET_TRANSPORT_ATS_COST_ENERGY_CONSUMPTION = 4,
-
-  /**
-   * Connect cost
-   * How many bytes are transmitted to initiate a new connection using
-   * this transport?
-   *
-   * Unit: [bytes]
-   *
-   * Interpretation: less is better
-   *
-   * Examples:
-   *
-   * UDP (No connection)      :
-   *     0 bytes
-   * TCP (TCP 3-Way handshake):
-   *   220 bytes Ethernet,  172 bytes TCP/IP,  122 bytes TCP
-   * HTTP (TCP + Header)      :
-   *   477 bytes Ethernet,  429 bytes TCP/IP,  374 bytes TCP,  278 bytes HTTP
-   * HTTPS  HTTP+TLS Handshake:
-   *  2129 bytes Ethernet, 1975 bytes TCP/IP, 1755 bytes TCP, 1403 bytes HTTPS
-   *
-   * */
-  GNUNET_TRANSPORT_ATS_COST_CONNECT = 5,
-
-  /**
-   * Bandwidth cost
-   *
-   * How many bandwidth is available to consume?
-   * Used to calculate which impact sending data with this transport has
-   *
-   * Unit: [kB/s]
-   *
-   * Interpretation: more is better
-   *
-   * Examples:
-   * LAN:     12,800  (100 MBit/s)
-   * WLAN:    6,912   (54 MBit/s)
-   * Dial-up: 8       (64 Kbit/s)
-   *
-   */
-  GNUNET_TRANSPORT_ATS_COST_BANDWITH_AVAILABLE = 6,
-
-  /**
-   *  Network overhead
-   *
-   * How many bytes are sent over the wire when 1 kilobyte (1024 bytes)
-   * of application data is transmitted?
-   * A factor used with connect cost, bandwidth cost and energy cost
-   * to describe the overhead produced by the transport protocol
-   *
-   * Unit: [bytes/kb]
-   *
-   * Interpretation: less is better
-   *
-   * Examples:
-   *
-   * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb]
-   * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb]
-   * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8  = 1090 [bytes/kb]
-   * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8  = 1110 [bytes/kb]
-   */
-  GNUNET_TRANSPORT_ATS_COST_NETWORK_OVERHEAD = 7,
-
-
-  /* Quality related values */
-  /* ====================== */
-
-  /* Physical layer quality properties */
-
-  /**
-   * Signal strength on physical layer
-   *
-   * Unit: [dBm]
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_PHY_SIGNAL_STRENGTH = 1025,
-
-  /**
-   * Collision rate on physical layer
-   *
-   * Unit: [B/s]
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_PHY_COLLISION_RATE = 1026,
-
-  /**
-   * Error rate on physical layer
-   *
-   * Unit: [B/s]
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_PHY_ERROR_RATE = 1027,
-
-  /* Network layer quality properties */
-
-  /**
-   * Delay
-   * Time between when the time packet is sent and the packet arrives
-   *
-   * Unit: [ms]
-   *
-   * Examples:
-   *
-   * LAN   :    1
-   * WLAN  :    2
-   * Dialup:  500
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY = 1028,
-
-  /**
-   * Jitter
-   * Time variations of the delay
-   * 1st derivative of a delay function
-   *
-   * Unit: [ms]
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_NET_JITTER = 1029,
-
-  /**
-   * Error rate on network layer
-   *
-   * Unit: [B/s]
-   *
-   * Examples:
-   *
-   * LAN       :    0
-   * WLAN      :  400
-   * Bluetooth :  100
-   * Note: This numbers are just assumptions as an example, not
-   * measured or somehow determined
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_NET_ERRORRATE = 1030,
-
-  /**
-   * Drop rate on network layer
-   * Bytes actively dismissed by a network component during transmission
-   * Reasons for dropped data can be full queues, congestion, quota violations...
-   *
-   * Unit: [B/s]
-   *
-   * Examples:
-   *
-   * LAN       :    0
-   * WLAN      :  400
-   * Bluetooth :  100
-   * Note: This numbers are just assumptions as an example, not
-   * measured or somehow determined
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_NET_DROPRATE = 1031,
-
-  /**
-   * Loss rate on network layer
-   * Bytes lost during transmission
-   * Reasons can be collisions, ...
-   *
-   * Unit: [B/s]
-   *
-   * Examples:
-   *
-   * LAN       :    0
-   * WLAN      :   40
-   * Bluetooth :   10
-   * Note: This numbers are just assumptions as an example, not measured
-   * or somehow determined
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_NET_LOSSRATE = 1032,
-
-  /**
-   * Throughput on network layer
-   *
-   * Unit: [kB/s]
-   *
-   * Examples:
-   *
-   * LAN   : 3400
-   * WLAN  : 1200
-   * Dialup:     4
-   *
-   */
-  GNUNET_TRANSPORT_ATS_QUALITY_NET_THROUGHPUT = 1033,
-
- /**
-  * Distance on network layer
-  *
-  * Unit: []
-  */
-  GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE = 1034,
-
-
-  /* Availability related values */
-  /* =========================== */
-
-  /**
-   * Is a peer reachable?
-   */
-  GNUNET_TRANSPORT_ATS_AVAILABILITY_REACHABLE = 2048,
-
-  /**
-   * Is there a connection established to a peer using this transport
-   */
-  GNUNET_TRANSPORT_ATS_AVAILABILITY_CONNECTED = 2049
-};
-
-
-/**
- * struct used to communicate the transport's properties like cost and
- * quality of service as well as high-level constraints on resource
- * consumption.
- *
- *                             +---+
- *  +-----------+ Constraints  |   |  Plugin properties +---------+
- *  | Highlevel |------------> |ATS| <------------------|Transport|
- *  | Component | ATS struct   |   |    ATS struct      | Plugin  |
- *  +-----------+              |   |                    +---------+
- *                             +---+
- *
- * This structure will be used by transport plugins to communicate
- * costs to ATS or by higher level components to tell ATS their
- * constraints.  Always a pair of (GNUNET_TRANSPORT_ATS_Property,
- * uint32_t value).  Value is always uint32_t, so all units used to
- * define costs have to be normalized to fit uint32_t.
- */
-struct GNUNET_TRANSPORT_ATS_Information
-{
-  /**
-   * ATS property type, in network byte order.
-   */
-  uint32_t type;
-
-  /**
-   * ATS property value, in network byte order.
-   */
-  uint32_t value;
-};
-
-
-
 /**
  * Function called by the transport for each received message.
  *
@@ -407,7 +60,7 @@ typedef void (*GNUNET_TRANSPORT_ReceiveCallback) (void *cls,
                                                   GNUNET_MessageHeader *
                                                   message,
                                                   const struct
-                                                  GNUNET_TRANSPORT_ATS_Information
+                                                  GNUNET_ATS_Information
                                                   * ats, uint32_t ats_count);
 
 
@@ -430,7 +83,7 @@ typedef void (*GNUNET_TRANSPORT_NotifyConnect) (void *cls,
                                                 const struct GNUNET_PeerIdentity
                                                 * peer,
                                                 const struct
-                                                GNUNET_TRANSPORT_ATS_Information
+                                                GNUNET_ATS_Information
                                                 * ats, uint32_t ats_count);
 
 /**
index 45d5d2cfde406e9b1f73a397da16137099f6cbfd..434e448af768178c6076b9b26e1bda4eb2e4288d 100644 (file)
@@ -2015,7 +2015,7 @@ send_p2p_tunnel_destroy (void *cls, size_t size, void *buf)
 static int
 handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
                          const struct GNUNET_MessageHeader *message,
-                         const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                         const struct GNUNET_ATS_Information *atsi)
 {
   unsigned int own_pos;
   uint16_t size;
@@ -2205,7 +2205,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
 static int
 handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer,
                           const struct GNUNET_MessageHeader *message,
-                          const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                          const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_MESH_Unicast *msg;
   struct MeshTunnel *t;
@@ -2270,7 +2270,7 @@ handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer,
 static int
 handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer,
                             const struct GNUNET_MessageHeader *message,
-                            const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                            const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_MESH_Multicast *msg;
   struct GNUNET_PeerIdentity *id;
@@ -2364,7 +2364,7 @@ handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer,
 static int
 handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer,
                           const struct GNUNET_MessageHeader *message,
-                          const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                          const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_MESH_ToOrigin *msg;
   struct GNUNET_PeerIdentity id;
@@ -2455,7 +2455,7 @@ handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer,
 static int
 handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
                       const struct GNUNET_MessageHeader *message,
-                      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                      const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_MESH_PathACK *msg;
   struct GNUNET_PeerIdentity id;
@@ -3612,7 +3612,7 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
  */
 static void
 core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-              const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+              const struct GNUNET_ATS_Information *atsi)
 {
   struct MeshPeerInfo *peer_info;
   struct MeshPeerPath *path;
index 8713187552f2936f1a2924248528d41bd78377e0..2067b7b6c3f26dfab2ed24e0a876fa3b2cc63667 100644 (file)
@@ -113,7 +113,7 @@ struct peer_list_element
   /* list of application-types */
   struct type_list_element *type_head, *type_tail;
 
-  struct GNUNET_TRANSPORT_ATS_Information atsi;
+  struct GNUNET_ATS_Information atsi;
   struct peer_list_element *next, *prev;
 
   /* The handle that sends the hellos to this peer */
@@ -254,7 +254,7 @@ schedule_hello_message (void *cls,
  */
 static void
 core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-              const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+              const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_MESH_Handle *handle = cls;
 
@@ -272,7 +272,7 @@ core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
 
   if (NULL != atsi)
     memcpy (&element->atsi, atsi,
-            sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+            sizeof (struct GNUNET_ATS_Information));
 
   GNUNET_CONTAINER_DLL_insert_after (handle->connected_peers.head,
                                      handle->connected_peers.tail,
@@ -383,7 +383,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 static int
 receive_hello (void *cls, const struct GNUNET_PeerIdentity *other,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_MESH_Handle *handle = cls;
   uint16_t *num = (uint16_t *) (message + 1);
@@ -469,7 +469,7 @@ receive_hello (void *cls, const struct GNUNET_PeerIdentity *other,
 static int
 core_receive (void *cls, const struct GNUNET_PeerIdentity *other,
               const struct GNUNET_MessageHeader *message,
-              const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+              const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_MESH_Handle *handle = cls;
   struct tunnel_message *tmessage = (struct tunnel_message *) message;
index a85173e5446c559baa320007ada2260d84d0f5e7..fda4e916f825aed719781546ecf6ea415fb618e4 100644 (file)
@@ -749,7 +749,7 @@ process_tunnel_created (struct GNUNET_MESH_Handle *h,
                         const struct GNUNET_MESH_TunnelNotification *msg)
 {
   struct GNUNET_MESH_Tunnel *t;
-  struct GNUNET_TRANSPORT_ATS_Information atsi;
+  struct GNUNET_ATS_Information atsi;
   MESH_TunnelNumber tid;
 
   tid = ntohl (msg->tunnel_id);
@@ -821,7 +821,7 @@ process_peer_event (struct GNUNET_MESH_Handle *h,
 {
   struct GNUNET_MESH_Tunnel *t;
   struct GNUNET_MESH_Peer *p;
-  struct GNUNET_TRANSPORT_ATS_Information atsi;
+  struct GNUNET_ATS_Information atsi;
   GNUNET_PEER_Id id;
   uint16_t size;
 
@@ -928,7 +928,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
     handler = &h->message_handlers[i];
     if (handler->type == type)
     {
-      struct GNUNET_TRANSPORT_ATS_Information atsi;
+      struct GNUNET_ATS_Information atsi;
 
       atsi.type = 0;
       atsi.value = 0;
index 6821a1ab8520f4614d633b6d8131d35a589773ce..1699097f6cfcc8fa30ae578037e4cb1de17d8f3f 100644 (file)
@@ -55,7 +55,7 @@ static int
 callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
           const struct GNUNET_PeerIdentity *sender,
           const struct GNUNET_MessageHeader *message,
-          const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+          const struct GNUNET_ATS_Information *atsi)
 {
   return GNUNET_OK;
 }
index d531dab6f4699aa91415b20552f83db2d873bb36..1c9196bb28f5f843bb012b877bfebaee4da33a59 100644 (file)
@@ -109,7 +109,7 @@ static int
 data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
                const struct GNUNET_PeerIdentity *sender,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Data callback\n");
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
@@ -132,7 +132,7 @@ data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
 static void *
 inbound_tunnel (void *cls, struct GNUNET_MESH_Tunnel *tunnel,
                 const struct GNUNET_PeerIdentity *initiator,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   unsigned int id = *(unsigned int *) cls;
 
@@ -180,7 +180,7 @@ inbound_end (void *cls, const struct GNUNET_MESH_Tunnel *tunnel,
  */
 static void
 peer_conected (void *cls, const struct GNUNET_PeerIdentity *peer,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer connected\n");
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_shutdown, NULL);
index 1e42a5e9bd48462069cbad5b7726e9ba575b0bb9..ee1e6c46a11b71f6b0727ced61da2d4e7c4c8e43 100644 (file)
@@ -109,7 +109,7 @@ static int
 data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
                const struct GNUNET_PeerIdentity *sender,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Data callback\n");
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
@@ -132,7 +132,7 @@ data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
 static void *
 inbound_tunnel (void *cls, struct GNUNET_MESH_Tunnel *tunnel,
                 const struct GNUNET_PeerIdentity *initiator,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   unsigned int id = *(unsigned int *) cls;
 
@@ -180,7 +180,7 @@ inbound_end (void *cls, const struct GNUNET_MESH_Tunnel *tunnel,
  */
 static void
 peer_conected (void *cls, const struct GNUNET_PeerIdentity *peer,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer connected\n");
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_shutdown, NULL);
index 0fd0b976630e591b83d57b7baafbdb102ab09f1c..a7ea4ee79554ca3f277f40291218f5bbc9b79e29 100644 (file)
@@ -219,7 +219,7 @@ dh (void *cls, const struct GNUNET_PeerIdentity *peer)
  */
 static void
 ch (void *cls, const struct GNUNET_PeerIdentity *peer,
-    const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+    const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "peer connected\n");
   return;
index 24db46d49eaa6dbee69ec318ac231e3672f52918..cc95a34e867e696850c1a8f15eb47d27051546ab 100644 (file)
@@ -231,7 +231,7 @@ data_callback (void *cls,
           void **tunnel_ctx,
           const struct GNUNET_PeerIdentity *sender,
           const struct GNUNET_MessageHeader *message,
-          const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+          const struct GNUNET_ATS_Information *atsi)
 {
   long client = (long) cls;
 
@@ -293,7 +293,7 @@ static void *
 incoming_tunnel (void *cls,
                  struct GNUNET_MESH_Tunnel * tunnel,
                  const struct GNUNET_PeerIdentity * initiator,
-                 const struct GNUNET_TRANSPORT_ATS_Information * atsi)
+                 const struct GNUNET_ATS_Information * atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "test: Incoming tunnel from %s\n",
@@ -353,7 +353,7 @@ dh (void *cls, const struct GNUNET_PeerIdentity *peer)
  */
 static void
 ch (void *cls, const struct GNUNET_PeerIdentity *peer,
-    const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+    const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "test: peer %s connected\n",
index 8833ce2877630a027d0a7bcc1f12107636df87d6..d5a768f98cffe15637b4a886071524f12a8131cb 100644 (file)
@@ -213,7 +213,7 @@ static void *
 incoming_tunnel (void *cls,
                  struct GNUNET_MESH_Tunnel * tunnel,
                  const struct GNUNET_PeerIdentity * initiator,
-                 const struct GNUNET_TRANSPORT_ATS_Information * atsi)
+                 const struct GNUNET_ATS_Information * atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "test: Incoming tunnel from %s\n",
@@ -269,7 +269,7 @@ dh (void *cls, const struct GNUNET_PeerIdentity *peer)
  */
 static void
 ch (void *cls, const struct GNUNET_PeerIdentity *peer,
-    const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+    const struct GNUNET_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "test: peer %s connected\n",
index 7000ec602da6289bf7d6ebe6a18c7c3723181d30..ce48ecfc4a557dafcee1eca0e2deb262870e328e 100644 (file)
@@ -943,7 +943,7 @@ update_flood_times (void *cls, const GNUNET_HashCode * key, void *value)
 static int
 handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
                           const struct GNUNET_MessageHeader *message,
-                          const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                          const struct GNUNET_ATS_Information *atsi)
 {
   const struct GNUNET_NSE_FloodMessage *incoming_flood;
   struct GNUNET_TIME_Absolute ts;
@@ -1097,7 +1097,7 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
  */
 static void
 handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                     const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                     const struct GNUNET_ATS_Information *atsi)
 {
   struct NSEPeerEntry *peer_entry;
 
index 33a9eb7879a29c5c2f0bd83e30a5b975eedf7431..78d91fa3d5800e9f001b0b9aebca2071551c369b 100644 (file)
@@ -309,7 +309,7 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first,
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   char *dotOutFileNameFinished;
   FILE *dotOutFileFinished;
@@ -501,7 +501,7 @@ init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server,
  */
 static void
 connect_notify_peers (void *cls, const struct GNUNET_PeerIdentity *peer,
-                      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                      const struct GNUNET_ATS_Information *atsi)
 {
   struct TestMessageContext *pos = cls;
 
index 6b60d243db45cc968f0ca90fd861890e3d369915..b83a8cf3cde53a9c89343cd62bae401e1acc0885 100644 (file)
@@ -348,7 +348,7 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first,
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
                const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_ATS_Information *atsi)
 {
   char *dotOutFileNameFinished;
   FILE *dotOutFileFinished;
@@ -540,7 +540,7 @@ init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server,
  */
 static void
 connect_notify_peers (void *cls, const struct GNUNET_PeerIdentity *peer,
-                      const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                      const struct GNUNET_ATS_Information *atsi)
 {
   struct TestMessageContext *pos = cls;
 
index 466692ce7d733caa02a19f1234962ab9af4cf09a..1798a1af675ffff44de9e592d35f96a93b9b1b20 100644 (file)
@@ -1886,7 +1886,7 @@ notify_connect_result (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  */
 static void
 connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_TESTING_ConnectContext *ctx = cls;
 
@@ -2084,7 +2084,7 @@ reattempt_daemons_connect (void *cls,
  */
 static void
 core_initial_iteration (void *cls, const struct GNUNET_PeerIdentity *peer,
-                        const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                        const struct GNUNET_ATS_Information *atsi)
 {
   struct GNUNET_TESTING_ConnectContext *ctx = cls;
 
index 8076530457214c1c0b537a0c123f4c4011a8813c..a2c68c93c3fed1c53874dad118f09b759373940f 100644 (file)
@@ -3383,7 +3383,7 @@ send_core_connect_requests (void *cls,
  */
 static void
 core_connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                     const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                     const struct GNUNET_ATS_Information *atsi)
 {
   struct SendHelloContext *send_hello_context = cls;
   struct PeerConnection *connection;
@@ -4877,7 +4877,7 @@ perform_dfs (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num)
  */
 static void
 internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
-                            const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                            const struct GNUNET_ATS_Information *atsi)
 {
   struct CoreContext *core_ctx = cls;
   struct TopologyIterateContext *iter_ctx = core_ctx->iter_context;
index 1616ab613eef992f9fef93c4c84275e27d21fb5f..453c9d924ddc0702c44d5c6fd8f9f5badd039276 100644 (file)
@@ -635,7 +635,7 @@ reschedule_hellos (void *cls, const GNUNET_HashCode * pid, void *value)
  */
 static void
 connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi)
 {
   struct Peer *pos;
 
@@ -1106,7 +1106,7 @@ read_friends_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
 static int
 handle_encrypted_hello (void *cls, const struct GNUNET_PeerIdentity *other,
                         const struct GNUNET_MessageHeader *message,
-                        const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                        const struct GNUNET_ATS_Information *atsi)
 {
   struct Peer *peer;
   struct GNUNET_PeerIdentity pid;
index a35a7809164b611adb3e08cb4a265b62f30e38bd..31f6de1d8a265a9d485f69d693b1cd9ea7e8e7db 100644 (file)
@@ -89,7 +89,7 @@ struct GNUNET_ATS_SchedulingHandle *GST_ats;
  */
 static void
 transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target,
-                    const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                    const struct GNUNET_ATS_Information *ats,
                     uint32_t ats_count,
                     const char * transport,
                     const void * addr,
@@ -161,7 +161,7 @@ try_connect_if_allowed (void *cls, const struct GNUNET_PeerIdentity *peer,
 static struct GNUNET_TIME_Relative
 plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
                              const struct GNUNET_MessageHeader *message,
-                             const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                             const struct GNUNET_ATS_Information *ats,
                              uint32_t ats_count, struct Session *session,
                              const char *sender_address,
                              uint16_t sender_address_len)
@@ -333,7 +333,7 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer,
                             struct Session *session,
                             struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
                             struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
-                            const struct GNUNET_TRANSPORT_ATS_Information * ats,
+                            const struct GNUNET_ATS_Information * ats,
                             uint32_t ats_count)
 {
   uint32_t bw_in = ntohl (bandwidth_in.value__);
@@ -382,11 +382,11 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer,
 static void
 neighbours_connect_notification (void *cls,
                                  const struct GNUNET_PeerIdentity *peer,
-                                 const struct GNUNET_TRANSPORT_ATS_Information
+                                 const struct GNUNET_ATS_Information
                                  *ats, uint32_t ats_count)
 {
   char buf[sizeof (struct ConnectInfoMessage) +
-           ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)];
+           ats_count * sizeof (struct GNUNET_ATS_Information)];
   struct ConnectInfoMessage *connect_msg = (struct ConnectInfoMessage *) buf;
 
   connect_msg->header.size = htons (sizeof (buf));
@@ -394,7 +394,7 @@ neighbours_connect_notification (void *cls,
   connect_msg->ats_count = htonl (ats_count);
   connect_msg->id = *peer;
   memcpy (&connect_msg->ats, &connect_msg->ats,
-          ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+          ats_count * sizeof (struct GNUNET_ATS_Information));
   GST_clients_broadcast (&connect_msg->header, GNUNET_NO);
 }
 
index cb79787ced992a89f5dfbfd3f352f209f847caa3..45d01e1e28f1a16b68f59580e92a674e711b14cc 100644 (file)
@@ -556,7 +556,7 @@ struct TestConnectionContext
  */
 static void
 test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour,
-                    const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                    const struct GNUNET_ATS_Information *ats,
                     uint32_t ats_count,
                     const char * transport,
                     const void * addr,
index 75b9bb93fea9951d9dc3fcac2837dec853b36484..9252a5c10fbc7ed9986ad2ea6144c5c09a23adc4 100644 (file)
@@ -328,7 +328,7 @@ client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client)
 static void
 notify_client_about_neighbour (void *cls,
                                const struct GNUNET_PeerIdentity *peer,
-                               const struct GNUNET_TRANSPORT_ATS_Information
+                               const struct GNUNET_ATS_Information
                                *ats, uint32_t ats_count,
                                const char * transport,
                                const void * addr,
@@ -340,7 +340,7 @@ notify_client_about_neighbour (void *cls,
 
   size =
       sizeof (struct ConnectInfoMessage) +
-      ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information);
+      ats_count * sizeof (struct GNUNET_ATS_Information);
   GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE);
   cim = GNUNET_malloc (size);
   cim->header.size = htons (size);
@@ -348,7 +348,7 @@ notify_client_about_neighbour (void *cls,
   cim->ats_count = htonl (ats_count);
   cim->id = *peer;
   memcpy (&cim->ats, ats,
-          ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information));
+          ats_count * sizeof (struct GNUNET_ATS_Information));
   unicast (tc, &cim->header, GNUNET_NO);
   GNUNET_free (cim);
 }
@@ -819,7 +819,7 @@ clients_handle_peer_address_lookup (void *cls,
  */
 static void
 output_addresses (void *cls, const struct GNUNET_PeerIdentity *peer,
-                  const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                  const struct GNUNET_ATS_Information *ats,
                   uint32_t ats_count,
                   const char * transport,
                   const void * addr,
index 086768dce4a33580378a32c391bd1fb5d8606770..f0dca68748c212a1bf934a513358e3fcfeab48a4 100644 (file)
@@ -193,7 +193,7 @@ struct NeighbourMapEntry
   /**
    * Performance data for the peer.
    */
-  //struct GNUNET_TRANSPORT_ATS_Information *ats;
+  //struct GNUNET_ATS_Information *ats;
 
   /**
    * Are we currently trying to send a message? If so, which one?
@@ -631,7 +631,7 @@ void
 GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
                                   const char *plugin_name, const void *address,
                                   size_t address_len, struct Session *session,
-                                  const struct GNUNET_TRANSPORT_ATS_Information
+                                  const struct GNUNET_ATS_Information
                                   *ats, uint32_t ats_count)
 {
   struct NeighbourMapEntry *n;
index 88e24b73abf3af586951d449e02e4f1d93c3d397..5b4929c2c52ddfeff22cefc1e837a69d81247308 100644 (file)
@@ -160,7 +160,7 @@ typedef void (*GST_NeighbourIterator) (void *cls,
                                        const struct GNUNET_PeerIdentity *
                                        neighbour,
                                        const struct
-                                       GNUNET_TRANSPORT_ATS_Information * ats,
+                                       GNUNET_ATS_Information * ats,
                                        uint32_t ats_count,
                                        const char * transport,
                                        const void * addr,
@@ -205,7 +205,7 @@ void
 GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
                                   const char *plugin_name, const void *address,
                                   size_t address_len, struct Session *session,
-                                  const struct GNUNET_TRANSPORT_ATS_Information
+                                  const struct GNUNET_ATS_Information
                                   *ats, uint32_t ats_count);
 
 
index f0cc12e41b737da30dbb3965a36c0e4fa80d8bb3..6b6b017684ca2fe97fdacc6ce92376cd56e5400d 100644 (file)
@@ -975,9 +975,9 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
   /* validity achieved, remember it! */
   ve->valid_until = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION);
   {
-    struct GNUNET_TRANSPORT_ATS_Information ats;
+    struct GNUNET_ATS_Information ats;
 
-    ats.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
+    ats.type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
     ats.value = htonl ((uint32_t) GNUNET_TIME_absolute_get_duration (ve->send_time).rel_value);
     GNUNET_ATS_address_update (GST_ats, &ve->pid,
                               ve->transport_name,ve->addr, ve->addrlen, NULL,
index 131961c234b8430f4f1c0684470a1134bdc41ed7..a0e3b93a207ab831f0dcb1858334d00aa53f628e 100644 (file)
@@ -200,7 +200,7 @@ read:
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -219,7 +219,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
index 7e740293b267306825ddc74c5dfea3a46b49d9a8..784dd30026e8741b9133324961e35e9ab3bf5ff0 100644 (file)
@@ -257,13 +257,13 @@ http_plugin_receive (void *cls, const struct GNUNET_PeerIdentity * peer,
 {
   struct Session *s = cls;
   struct Plugin *plugin = s->plugin;
-  struct GNUNET_TRANSPORT_ATS_Information distance;
+  struct GNUNET_ATS_Information distance;
   struct GNUNET_TIME_Relative delay;
 
-  distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+  distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
   distance.value = htonl (1);
 
-  delay = plugin->env->receive (plugin->env->cls, &s->target, message, (const struct GNUNET_TRANSPORT_ATS_Information*) &distance, 1, s, s->addr, s->addrlen);
+  delay = plugin->env->receive (plugin->env->cls, &s->target, message, (const struct GNUNET_ATS_Information*) &distance, 1, s, s->addr, s->addrlen);
   return delay;
 }
 
index d85d5fc821703eb6196da25ecf9972b90d8415cc..8856b926264bde6d6fa26dc687afc4840fb264c5 100644 (file)
@@ -1661,7 +1661,7 @@ delayed_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct Session *session = cls;
   struct GNUNET_TIME_Relative delay;
-  struct GNUNET_TRANSPORT_ATS_Information ats;
+  struct GNUNET_ATS_Information ats;
 
   session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK;
   delay =
@@ -1718,13 +1718,13 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
   GNUNET_STATISTICS_update (plugin->env->stats,
                             gettext_noop ("# bytes received via TCP"),
                             ntohs (message->size), GNUNET_NO);
-  struct GNUNET_TRANSPORT_ATS_Information distance;
+  struct GNUNET_ATS_Information distance;
 
-  distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+  distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
   distance.value = htonl (1);
   delay =
       plugin->env->receive (plugin->env->cls, &session->target, message,
-                            (const struct GNUNET_TRANSPORT_ATS_Information *)
+                            (const struct GNUNET_ATS_Information *)
                             &distance, 1, session,
                             (GNUNET_YES ==
                              session->inbound) ? NULL : session->connect_addr,
index 0b37b9be475d743282f194c0003ccefcffe41b81..f4a806723880291498a87d9523f4c24a5c019376 100644 (file)
@@ -759,10 +759,10 @@ process_inbound_tokenized_messages (void *cls, void *client,
 {
   struct Plugin *plugin = cls;
   struct SourceInformation *si = client;
-  struct GNUNET_TRANSPORT_ATS_Information distance;
+  struct GNUNET_ATS_Information distance;
 
   /* setup ATS */
-  distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+  distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
   distance.value = htonl (1);
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
index 14034e6831495eb3a085f2747c17c73cec8c52c9..32f047d658d87da2acf517788a803517a6f1ae3e 100644 (file)
@@ -719,9 +719,9 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
                     const struct GNUNET_MessageHeader *currhdr,
                     const struct sockaddr_un *un, size_t fromlen)
 {
-  struct GNUNET_TRANSPORT_ATS_Information distance;
+  struct GNUNET_ATS_Information distance;
 
-  distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+  distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
   distance.value = htonl (UNIX_DIRECT_DISTANCE);
 
   GNUNET_assert (fromlen >= sizeof (struct sockaddr_un));
@@ -731,7 +731,7 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
               un->sun_path);
 #endif
   plugin->env->receive (plugin->env->cls, sender, currhdr,
-                        (const struct GNUNET_TRANSPORT_ATS_Information *)
+                        (const struct GNUNET_ATS_Information *)
                         &distance, 1, NULL, un->sun_path,
                         strlen (un->sun_path) + 1);
 }
index 51da7ec32eae38fc3fcc6012092931e7275407f1..b3faf4480b32a1e1de1dee621de49c5005356807 100644 (file)
@@ -2334,9 +2334,9 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
   struct Session *session = (struct Session *) client;
   struct Plugin *plugin = (struct Plugin *) cls;
 
-  struct GNUNET_TRANSPORT_ATS_Information distance;
+  struct GNUNET_ATS_Information distance;
 
-  distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
+  distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
   distance.value = htonl (1);
 
 #if DEBUG_wlan
@@ -2349,7 +2349,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
 #endif
 
   plugin->env->receive (plugin->env->cls, &(session->target), hdr,
-                        (const struct GNUNET_TRANSPORT_ATS_Information *)
+                        (const struct GNUNET_ATS_Information *)
                         &distance, 1, session,
                         (const char *) &session->mac->addr,
                         sizeof (session->mac->addr));
index 8e4a40efce90272fc710211cef56c8036f7cb391..f73fea237d3930d908ae45b05aa9311b93993239 100644 (file)
@@ -234,7 +234,7 @@ get_size ()
 static void
 notify_receive_new (void *cls, const struct GNUNET_PeerIdentity *peer,
                     const struct GNUNET_MessageHeader *message,
-                    const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                    const struct GNUNET_ATS_Information *ats,
                     uint32_t ats_count)
 {
   const struct TestMessage *hdr;
@@ -576,7 +576,7 @@ exchange_hello (void *cls, const struct GNUNET_MessageHeader *message)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   connected++;
index 70658d40b473e1e8cc29f1c6fb5cf9df93753e54..81a0b39e13ccdb06dbb171e802fd29bd53cdfdf1 100644 (file)
@@ -140,7 +140,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   struct PeerContext * p = cls;
@@ -233,7 +233,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   static int c;
index ad169df4ce0e82800dc1fad68390befdd4e99723..e20ed8ee5979806db54877e2db8c09f99866a452 100644 (file)
@@ -189,7 +189,7 @@ end_badly ()
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -233,7 +233,7 @@ notify_ready (void *cls, size_t size, void *buf)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
index 66e1917a15afb32f781e46697b93d953c48b8e8a..20dc3ed2e87c039a89594197030b321691f7b4cb 100644 (file)
@@ -138,7 +138,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -185,7 +185,7 @@ notify_ready (void *cls, size_t size, void *buf)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
index 6ccb7c8d7683f003efb6bb8413c556031277564f..e4b6359050d70efab209b3c6f007538928676f02 100644 (file)
@@ -201,7 +201,7 @@ get_size (unsigned int iter)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   static int n;
@@ -356,7 +356,7 @@ notify_ready (void *cls, size_t size, void *buf)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
 
index 89a74e9a99a72a58999d08be7e60af2492221388..aff36853a108be4f55a60e0f2a40c694e75dfa0f 100644 (file)
@@ -161,7 +161,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -171,7 +171,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
index 7a08d590df1957eba014bc1d673fdbe3ebaf6ea9..a59b6c1d3957436f52a0dd8c31b18ded38684e74 100644 (file)
@@ -269,7 +269,7 @@ get_bit (const char *map, unsigned int bit)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   static int n;
@@ -413,7 +413,7 @@ notify_ready (void *cls, size_t size, void *buf)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
 
index c6062c96acf420058b150e1f2a0a9dd3754ea57b..c8638cd2318ad98685af169754c1cecc118ee0a0 100644 (file)
@@ -217,7 +217,7 @@ get_size (unsigned int iter)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   static int n;
@@ -373,7 +373,7 @@ notify_ready (void *cls, size_t size, void *buf)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
 
index 68fac8e957b03d2af0d8fbb5d4528ce6a28265de..721154f9e63309885786f02c9f814f2b49c03236 100644 (file)
@@ -92,7 +92,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n",
@@ -110,7 +110,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n");
index 44f05013137269d170f70edb93e8733f094ca9ab..26693358035324b9bfb7e8788fec448f2f1ee0c7 100644 (file)
@@ -104,7 +104,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n",
@@ -122,7 +122,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n");
index 2e0ca1e5502796773f31ebb7665feaa8e9b298d5..66844de312bbe8f3b932dabe764ff390ff02642c 100644 (file)
@@ -86,7 +86,7 @@ find_connecting_context ( struct GNUNET_TRANSPORT_TESTING_handle *tth,
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   struct PeerContext *p = cls;
@@ -159,7 +159,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                const struct GNUNET_ATS_Information *ats,
                 uint32_t ats_count)
 {
   struct PeerContext *p = cls;
index 6ccc8abd299617edd1a891ee8909edd8d4d63f98..440b0dfedb14b890563117f59ece8cbeb1fb4d5e 100644 (file)
@@ -114,7 +114,7 @@ struct ConnectInfoMessage
    * First of the ATS information blocks (we must have at least
    * one due to the 0-termination requirement).
    */
-  struct GNUNET_TRANSPORT_ATS_Information ats;
+  struct GNUNET_ATS_Information ats;
 };
 
 
@@ -224,7 +224,7 @@ struct InboundMessage
    * First of the ATS information blocks (we must have at least
    * one due to the 0-termination requirement).
    */
-  struct GNUNET_TRANSPORT_ATS_Information ats;
+  struct GNUNET_ATS_Information ats;
 };
 
 
index 3fdbcbd68253038762ba3a2452ab826b48f5565b..a258172d5b79301033fe1c1d572c816e91c1c402 100644 (file)
@@ -466,7 +466,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
     ats_count = ntohl (cim->ats_count);
     if (size !=
         sizeof (struct ConnectInfoMessage) +
-        ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information))
+        ats_count * sizeof (struct GNUNET_ATS_Information))
     {
       GNUNET_break (0);
       break;
@@ -548,7 +548,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
     imm = (const struct GNUNET_MessageHeader *) &((&(im->ats))[ats_count + 1]);
 
     if (ntohs (imm->size) + sizeof (struct InboundMessage) +
-        ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) != size)
+        ats_count * sizeof (struct GNUNET_ATS_Information) != size)
     {
       GNUNET_break (0);
       break;
index f5c701cae603fb12d59124be15c6fbea940b5e4c..677f61ea22653ce92a49be1914878b046c8ce252 100644 (file)
@@ -1025,7 +1025,7 @@ receive_tcp_service (void *cls
                      const struct GNUNET_PeerIdentity *sender
                      __attribute__ ((unused)),
                      const struct GNUNET_MessageHeader *message,
-                     const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                     const struct GNUNET_ATS_Information *atsi
                      __attribute__ ((unused)))
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n");
@@ -1133,7 +1133,7 @@ receive_tcp_remote (void *cls
                     const struct GNUNET_PeerIdentity *sender
                     __attribute__ ((unused)),
                     const struct GNUNET_MessageHeader *message,
-                    const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                    const struct GNUNET_ATS_Information *atsi
                     __attribute__ ((unused)))
 {
   GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
@@ -1209,7 +1209,7 @@ receive_udp_remote (void *cls
                     const struct GNUNET_PeerIdentity *sender
                     __attribute__ ((unused)),
                     const struct GNUNET_MessageHeader *message,
-                    const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                    const struct GNUNET_ATS_Information *atsi
                     __attribute__ ((unused)))
 {
   GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
@@ -1289,7 +1289,7 @@ receive_udp_service (void *cls
                      const struct GNUNET_PeerIdentity *sender
                      __attribute__ ((unused)),
                      const struct GNUNET_MessageHeader *message,
-                     const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                     const struct GNUNET_ATS_Information *atsi
                      __attribute__ ((unused)))
 {
   GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
index fbbffc9a125bd9512b4970d5779e8a9e16c22297..0f7bdff702b0faf61bb5fd7fff632870961a745b 100644 (file)
@@ -340,7 +340,7 @@ port_in_ports (uint64_t ports, uint16_t port)
 
 void
 send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
-                  const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                  const struct GNUNET_ATS_Information *atsi
                   __attribute__ ((unused)))
 {
   /* peer == NULL means that all peers in this request are connected */
@@ -871,7 +871,7 @@ receive_udp_back (void *cls
                   const struct GNUNET_PeerIdentity *sender
                   __attribute__ ((unused)),
                   const struct GNUNET_MessageHeader *message,
-                  const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                  const struct GNUNET_ATS_Information *atsi
                   __attribute__ ((unused)))
 {
   GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
@@ -1050,7 +1050,7 @@ receive_tcp_back (void *cls
                   const struct GNUNET_PeerIdentity *sender
                   __attribute__ ((unused)),
                   const struct GNUNET_MessageHeader *message,
-                  const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                  const struct GNUNET_ATS_Information *atsi
                   __attribute__ ((unused)))
 {
   GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
index 701a88d632690bda4e33ff44a7e6396ca7cdb7c0..c0dba360ef6489c5630140ab59db1efc0d52d107 100644 (file)
@@ -56,7 +56,7 @@ port_in_ports (uint64_t ports, uint16_t port);
 
 void
 send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
-                  const struct GNUNET_TRANSPORT_ATS_Information *atsi);
+                  const struct GNUNET_ATS_Information *atsi);
 
 /**
  * The configuration to use
index cb018746c790a2ed0d0b0218deb09beb9d362021..e0692937bb0fc6b8bd8cdc46a339aa135c0dac0e 100644 (file)
@@ -324,7 +324,7 @@ mesh_send (void *cls, size_t size, void *buf)
 
 void
 mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-              const struct GNUNET_TRANSPORT_ATS_Information *atsi
+              const struct GNUNET_ATS_Information *atsi
               __attribute__ ((unused)))
 {
   if (NULL == peer)
@@ -394,7 +394,7 @@ receive_mesh_query (void *cls
                     const struct GNUNET_PeerIdentity *sender
                     __attribute__ ((unused)),
                     const struct GNUNET_MessageHeader *message,
-                    const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                    const struct GNUNET_ATS_Information *atsi
                     __attribute__ ((unused)))
 {
   struct dns_pkt *dns = (struct dns_pkt *) (message + 1);
@@ -428,7 +428,7 @@ receive_mesh_answer (void *cls
                      __attribute__ ((unused)),
                      const struct GNUNET_PeerIdentity *sender,
                      const struct GNUNET_MessageHeader *message,
-                     const struct GNUNET_TRANSPORT_ATS_Information *atsi
+                     const struct GNUNET_ATS_Information *atsi
                      __attribute__ ((unused)))
 {
   /* TODo: size check */