aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-17 07:55:41 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-17 07:55:41 +0000
commita2d9b4434076254811584a4a0ffa8881d0903db8 (patch)
tree4f5a2ee5daaabdedb45aa5e7e1d03e3c0f28ed0e /src/transport
parent4b5e8dcb8d6f0d29fffb823e600c73be404d9b39 (diff)
downloadgnunet-a2d9b4434076254811584a4a0ffa8881d0903db8.tar.gz
gnunet-a2d9b4434076254811584a4a0ffa8881d0903db8.zip
move GNUNET_TRANSPORT_ATS_ to GNUNET_ATS_
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport.c12
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c2
-rw-r--r--src/transport/gnunet-service-transport_clients.c8
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c4
-rw-r--r--src/transport/gnunet-service-transport_neighbours.h4
-rw-r--r--src/transport/gnunet-service-transport_validation.c4
-rw-r--r--src/transport/gnunet-transport-connect-running-peers.c4
-rw-r--r--src/transport/plugin_transport_http.c6
-rw-r--r--src/transport/plugin_transport_tcp.c8
-rw-r--r--src/transport/plugin_transport_udp.c4
-rw-r--r--src/transport/plugin_transport_unix.c6
-rw-r--r--src/transport/plugin_transport_wlan.c6
-rw-r--r--src/transport/test_quota_compliance.c4
-rw-r--r--src/transport/test_transport_api.c4
-rw-r--r--src/transport/test_transport_api_disconnect.c4
-rw-r--r--src/transport/test_transport_api_limited_sockets.c4
-rw-r--r--src/transport/test_transport_api_reliability.c4
-rw-r--r--src/transport/test_transport_api_timeout.c4
-rw-r--r--src/transport/test_transport_api_unreliability.c4
-rw-r--r--src/transport/test_transport_api_unreliability_constant.c4
-rw-r--r--src/transport/test_transport_startonly.c4
-rw-r--r--src/transport/test_transport_testing.c4
-rw-r--r--src/transport/transport-testing.c4
-rw-r--r--src/transport/transport.h4
-rw-r--r--src/transport/transport_api.c4
25 files changed, 60 insertions, 60 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index a35a78091..31f6de1d8 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -89,7 +89,7 @@ struct GNUNET_ATS_SchedulingHandle *GST_ats;
89 */ 89 */
90static void 90static void
91transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target, 91transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target,
92 const struct GNUNET_TRANSPORT_ATS_Information *ats, 92 const struct GNUNET_ATS_Information *ats,
93 uint32_t ats_count, 93 uint32_t ats_count,
94 const char * transport, 94 const char * transport,
95 const void * addr, 95 const void * addr,
@@ -161,7 +161,7 @@ try_connect_if_allowed (void *cls, const struct GNUNET_PeerIdentity *peer,
161static struct GNUNET_TIME_Relative 161static struct GNUNET_TIME_Relative
162plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, 162plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
163 const struct GNUNET_MessageHeader *message, 163 const struct GNUNET_MessageHeader *message,
164 const struct GNUNET_TRANSPORT_ATS_Information *ats, 164 const struct GNUNET_ATS_Information *ats,
165 uint32_t ats_count, struct Session *session, 165 uint32_t ats_count, struct Session *session,
166 const char *sender_address, 166 const char *sender_address,
167 uint16_t sender_address_len) 167 uint16_t sender_address_len)
@@ -333,7 +333,7 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer,
333 struct Session *session, 333 struct Session *session,
334 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 334 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
335 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 335 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
336 const struct GNUNET_TRANSPORT_ATS_Information * ats, 336 const struct GNUNET_ATS_Information * ats,
337 uint32_t ats_count) 337 uint32_t ats_count)
338{ 338{
339 uint32_t bw_in = ntohl (bandwidth_in.value__); 339 uint32_t bw_in = ntohl (bandwidth_in.value__);
@@ -382,11 +382,11 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer,
382static void 382static void
383neighbours_connect_notification (void *cls, 383neighbours_connect_notification (void *cls,
384 const struct GNUNET_PeerIdentity *peer, 384 const struct GNUNET_PeerIdentity *peer,
385 const struct GNUNET_TRANSPORT_ATS_Information 385 const struct GNUNET_ATS_Information
386 *ats, uint32_t ats_count) 386 *ats, uint32_t ats_count)
387{ 387{
388 char buf[sizeof (struct ConnectInfoMessage) + 388 char buf[sizeof (struct ConnectInfoMessage) +
389 ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)]; 389 ats_count * sizeof (struct GNUNET_ATS_Information)];
390 struct ConnectInfoMessage *connect_msg = (struct ConnectInfoMessage *) buf; 390 struct ConnectInfoMessage *connect_msg = (struct ConnectInfoMessage *) buf;
391 391
392 connect_msg->header.size = htons (sizeof (buf)); 392 connect_msg->header.size = htons (sizeof (buf));
@@ -394,7 +394,7 @@ neighbours_connect_notification (void *cls,
394 connect_msg->ats_count = htonl (ats_count); 394 connect_msg->ats_count = htonl (ats_count);
395 connect_msg->id = *peer; 395 connect_msg->id = *peer;
396 memcpy (&connect_msg->ats, &connect_msg->ats, 396 memcpy (&connect_msg->ats, &connect_msg->ats,
397 ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); 397 ats_count * sizeof (struct GNUNET_ATS_Information));
398 GST_clients_broadcast (&connect_msg->header, GNUNET_NO); 398 GST_clients_broadcast (&connect_msg->header, GNUNET_NO);
399} 399}
400 400
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c
index cb79787ce..45d01e1e2 100644
--- a/src/transport/gnunet-service-transport_blacklist.c
+++ b/src/transport/gnunet-service-transport_blacklist.c
@@ -556,7 +556,7 @@ struct TestConnectionContext
556 */ 556 */
557static void 557static void
558test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour, 558test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour,
559 const struct GNUNET_TRANSPORT_ATS_Information *ats, 559 const struct GNUNET_ATS_Information *ats,
560 uint32_t ats_count, 560 uint32_t ats_count,
561 const char * transport, 561 const char * transport,
562 const void * addr, 562 const void * addr,
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c
index 75b9bb93f..9252a5c10 100644
--- a/src/transport/gnunet-service-transport_clients.c
+++ b/src/transport/gnunet-service-transport_clients.c
@@ -328,7 +328,7 @@ client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client)
328static void 328static void
329notify_client_about_neighbour (void *cls, 329notify_client_about_neighbour (void *cls,
330 const struct GNUNET_PeerIdentity *peer, 330 const struct GNUNET_PeerIdentity *peer,
331 const struct GNUNET_TRANSPORT_ATS_Information 331 const struct GNUNET_ATS_Information
332 *ats, uint32_t ats_count, 332 *ats, uint32_t ats_count,
333 const char * transport, 333 const char * transport,
334 const void * addr, 334 const void * addr,
@@ -340,7 +340,7 @@ notify_client_about_neighbour (void *cls,
340 340
341 size = 341 size =
342 sizeof (struct ConnectInfoMessage) + 342 sizeof (struct ConnectInfoMessage) +
343 ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information); 343 ats_count * sizeof (struct GNUNET_ATS_Information);
344 GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE); 344 GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE);
345 cim = GNUNET_malloc (size); 345 cim = GNUNET_malloc (size);
346 cim->header.size = htons (size); 346 cim->header.size = htons (size);
@@ -348,7 +348,7 @@ notify_client_about_neighbour (void *cls,
348 cim->ats_count = htonl (ats_count); 348 cim->ats_count = htonl (ats_count);
349 cim->id = *peer; 349 cim->id = *peer;
350 memcpy (&cim->ats, ats, 350 memcpy (&cim->ats, ats,
351 ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); 351 ats_count * sizeof (struct GNUNET_ATS_Information));
352 unicast (tc, &cim->header, GNUNET_NO); 352 unicast (tc, &cim->header, GNUNET_NO);
353 GNUNET_free (cim); 353 GNUNET_free (cim);
354} 354}
@@ -819,7 +819,7 @@ clients_handle_peer_address_lookup (void *cls,
819 */ 819 */
820static void 820static void
821output_addresses (void *cls, const struct GNUNET_PeerIdentity *peer, 821output_addresses (void *cls, const struct GNUNET_PeerIdentity *peer,
822 const struct GNUNET_TRANSPORT_ATS_Information *ats, 822 const struct GNUNET_ATS_Information *ats,
823 uint32_t ats_count, 823 uint32_t ats_count,
824 const char * transport, 824 const char * transport,
825 const void * addr, 825 const void * addr,
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 086768dce..f0dca6874 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -193,7 +193,7 @@ struct NeighbourMapEntry
193 /** 193 /**
194 * Performance data for the peer. 194 * Performance data for the peer.
195 */ 195 */
196 //struct GNUNET_TRANSPORT_ATS_Information *ats; 196 //struct GNUNET_ATS_Information *ats;
197 197
198 /** 198 /**
199 * Are we currently trying to send a message? If so, which one? 199 * Are we currently trying to send a message? If so, which one?
@@ -631,7 +631,7 @@ void
631GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, 631GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
632 const char *plugin_name, const void *address, 632 const char *plugin_name, const void *address,
633 size_t address_len, struct Session *session, 633 size_t address_len, struct Session *session,
634 const struct GNUNET_TRANSPORT_ATS_Information 634 const struct GNUNET_ATS_Information
635 *ats, uint32_t ats_count) 635 *ats, uint32_t ats_count)
636{ 636{
637 struct NeighbourMapEntry *n; 637 struct NeighbourMapEntry *n;
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h
index 88e24b73a..5b4929c2c 100644
--- a/src/transport/gnunet-service-transport_neighbours.h
+++ b/src/transport/gnunet-service-transport_neighbours.h
@@ -160,7 +160,7 @@ typedef void (*GST_NeighbourIterator) (void *cls,
160 const struct GNUNET_PeerIdentity * 160 const struct GNUNET_PeerIdentity *
161 neighbour, 161 neighbour,
162 const struct 162 const struct
163 GNUNET_TRANSPORT_ATS_Information * ats, 163 GNUNET_ATS_Information * ats,
164 uint32_t ats_count, 164 uint32_t ats_count,
165 const char * transport, 165 const char * transport,
166 const void * addr, 166 const void * addr,
@@ -205,7 +205,7 @@ void
205GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, 205GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
206 const char *plugin_name, const void *address, 206 const char *plugin_name, const void *address,
207 size_t address_len, struct Session *session, 207 size_t address_len, struct Session *session,
208 const struct GNUNET_TRANSPORT_ATS_Information 208 const struct GNUNET_ATS_Information
209 *ats, uint32_t ats_count); 209 *ats, uint32_t ats_count);
210 210
211 211
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index f0cc12e41..6b6b01768 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -975,9 +975,9 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
975 /* validity achieved, remember it! */ 975 /* validity achieved, remember it! */
976 ve->valid_until = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION); 976 ve->valid_until = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION);
977 { 977 {
978 struct GNUNET_TRANSPORT_ATS_Information ats; 978 struct GNUNET_ATS_Information ats;
979 979
980 ats.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY); 980 ats.type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
981 ats.value = htonl ((uint32_t) GNUNET_TIME_absolute_get_duration (ve->send_time).rel_value); 981 ats.value = htonl ((uint32_t) GNUNET_TIME_absolute_get_duration (ve->send_time).rel_value);
982 GNUNET_ATS_address_update (GST_ats, &ve->pid, 982 GNUNET_ATS_address_update (GST_ats, &ve->pid,
983 ve->transport_name,ve->addr, ve->addrlen, NULL, 983 ve->transport_name,ve->addr, ve->addrlen, NULL,
diff --git a/src/transport/gnunet-transport-connect-running-peers.c b/src/transport/gnunet-transport-connect-running-peers.c
index 131961c23..a0e3b93a2 100644
--- a/src/transport/gnunet-transport-connect-running-peers.c
+++ b/src/transport/gnunet-transport-connect-running-peers.c
@@ -200,7 +200,7 @@ read:
200static void 200static void
201notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 201notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
202 const struct GNUNET_MessageHeader *message, 202 const struct GNUNET_MessageHeader *message,
203 const struct GNUNET_TRANSPORT_ATS_Information *ats, 203 const struct GNUNET_ATS_Information *ats,
204 uint32_t ats_count) 204 uint32_t ats_count)
205{ 205{
206 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 206 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -219,7 +219,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
219 219
220static void 220static void
221notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 221notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
222 const struct GNUNET_TRANSPORT_ATS_Information *ats, 222 const struct GNUNET_ATS_Information *ats,
223 uint32_t ats_count) 223 uint32_t ats_count)
224{ 224{
225 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", 225 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index 7e740293b..784dd3002 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -257,13 +257,13 @@ http_plugin_receive (void *cls, const struct GNUNET_PeerIdentity * peer,
257{ 257{
258 struct Session *s = cls; 258 struct Session *s = cls;
259 struct Plugin *plugin = s->plugin; 259 struct Plugin *plugin = s->plugin;
260 struct GNUNET_TRANSPORT_ATS_Information distance; 260 struct GNUNET_ATS_Information distance;
261 struct GNUNET_TIME_Relative delay; 261 struct GNUNET_TIME_Relative delay;
262 262
263 distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); 263 distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
264 distance.value = htonl (1); 264 distance.value = htonl (1);
265 265
266 delay = plugin->env->receive (plugin->env->cls, &s->target, message, (const struct GNUNET_TRANSPORT_ATS_Information*) &distance, 1, s, s->addr, s->addrlen); 266 delay = plugin->env->receive (plugin->env->cls, &s->target, message, (const struct GNUNET_ATS_Information*) &distance, 1, s, s->addr, s->addrlen);
267 return delay; 267 return delay;
268} 268}
269 269
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index d85d5fc82..8856b9262 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1661,7 +1661,7 @@ delayed_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1661{ 1661{
1662 struct Session *session = cls; 1662 struct Session *session = cls;
1663 struct GNUNET_TIME_Relative delay; 1663 struct GNUNET_TIME_Relative delay;
1664 struct GNUNET_TRANSPORT_ATS_Information ats; 1664 struct GNUNET_ATS_Information ats;
1665 1665
1666 session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK; 1666 session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK;
1667 delay = 1667 delay =
@@ -1718,13 +1718,13 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
1718 GNUNET_STATISTICS_update (plugin->env->stats, 1718 GNUNET_STATISTICS_update (plugin->env->stats,
1719 gettext_noop ("# bytes received via TCP"), 1719 gettext_noop ("# bytes received via TCP"),
1720 ntohs (message->size), GNUNET_NO); 1720 ntohs (message->size), GNUNET_NO);
1721 struct GNUNET_TRANSPORT_ATS_Information distance; 1721 struct GNUNET_ATS_Information distance;
1722 1722
1723 distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); 1723 distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
1724 distance.value = htonl (1); 1724 distance.value = htonl (1);
1725 delay = 1725 delay =
1726 plugin->env->receive (plugin->env->cls, &session->target, message, 1726 plugin->env->receive (plugin->env->cls, &session->target, message,
1727 (const struct GNUNET_TRANSPORT_ATS_Information *) 1727 (const struct GNUNET_ATS_Information *)
1728 &distance, 1, session, 1728 &distance, 1, session,
1729 (GNUNET_YES == 1729 (GNUNET_YES ==
1730 session->inbound) ? NULL : session->connect_addr, 1730 session->inbound) ? NULL : session->connect_addr,
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 0b37b9be4..f4a806723 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -759,10 +759,10 @@ process_inbound_tokenized_messages (void *cls, void *client,
759{ 759{
760 struct Plugin *plugin = cls; 760 struct Plugin *plugin = cls;
761 struct SourceInformation *si = client; 761 struct SourceInformation *si = client;
762 struct GNUNET_TRANSPORT_ATS_Information distance; 762 struct GNUNET_ATS_Information distance;
763 763
764 /* setup ATS */ 764 /* setup ATS */
765 distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); 765 distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
766 distance.value = htonl (1); 766 distance.value = htonl (1);
767 767
768 LOG (GNUNET_ERROR_TYPE_DEBUG, 768 LOG (GNUNET_ERROR_TYPE_DEBUG,
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 14034e683..32f047d65 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -719,9 +719,9 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
719 const struct GNUNET_MessageHeader *currhdr, 719 const struct GNUNET_MessageHeader *currhdr,
720 const struct sockaddr_un *un, size_t fromlen) 720 const struct sockaddr_un *un, size_t fromlen)
721{ 721{
722 struct GNUNET_TRANSPORT_ATS_Information distance; 722 struct GNUNET_ATS_Information distance;
723 723
724 distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); 724 distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
725 distance.value = htonl (UNIX_DIRECT_DISTANCE); 725 distance.value = htonl (UNIX_DIRECT_DISTANCE);
726 726
727 GNUNET_assert (fromlen >= sizeof (struct sockaddr_un)); 727 GNUNET_assert (fromlen >= sizeof (struct sockaddr_un));
@@ -731,7 +731,7 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
731 un->sun_path); 731 un->sun_path);
732#endif 732#endif
733 plugin->env->receive (plugin->env->cls, sender, currhdr, 733 plugin->env->receive (plugin->env->cls, sender, currhdr,
734 (const struct GNUNET_TRANSPORT_ATS_Information *) 734 (const struct GNUNET_ATS_Information *)
735 &distance, 1, NULL, un->sun_path, 735 &distance, 1, NULL, un->sun_path,
736 strlen (un->sun_path) + 1); 736 strlen (un->sun_path) + 1);
737} 737}
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 51da7ec32..b3faf4480 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -2334,9 +2334,9 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
2334 struct Session *session = (struct Session *) client; 2334 struct Session *session = (struct Session *) client;
2335 struct Plugin *plugin = (struct Plugin *) cls; 2335 struct Plugin *plugin = (struct Plugin *) cls;
2336 2336
2337 struct GNUNET_TRANSPORT_ATS_Information distance; 2337 struct GNUNET_ATS_Information distance;
2338 2338
2339 distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); 2339 distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
2340 distance.value = htonl (1); 2340 distance.value = htonl (1);
2341 2341
2342#if DEBUG_wlan 2342#if DEBUG_wlan
@@ -2349,7 +2349,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
2349#endif 2349#endif
2350 2350
2351 plugin->env->receive (plugin->env->cls, &(session->target), hdr, 2351 plugin->env->receive (plugin->env->cls, &(session->target), hdr,
2352 (const struct GNUNET_TRANSPORT_ATS_Information *) 2352 (const struct GNUNET_ATS_Information *)
2353 &distance, 1, session, 2353 &distance, 1, session,
2354 (const char *) &session->mac->addr, 2354 (const char *) &session->mac->addr,
2355 sizeof (session->mac->addr)); 2355 sizeof (session->mac->addr));
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 8e4a40efc..f73fea237 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -234,7 +234,7 @@ get_size ()
234static void 234static void
235notify_receive_new (void *cls, const struct GNUNET_PeerIdentity *peer, 235notify_receive_new (void *cls, const struct GNUNET_PeerIdentity *peer,
236 const struct GNUNET_MessageHeader *message, 236 const struct GNUNET_MessageHeader *message,
237 const struct GNUNET_TRANSPORT_ATS_Information *ats, 237 const struct GNUNET_ATS_Information *ats,
238 uint32_t ats_count) 238 uint32_t ats_count)
239{ 239{
240 const struct TestMessage *hdr; 240 const struct TestMessage *hdr;
@@ -576,7 +576,7 @@ exchange_hello (void *cls, const struct GNUNET_MessageHeader *message)
576 576
577static void 577static void
578notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 578notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
579 const struct GNUNET_TRANSPORT_ATS_Information *ats, 579 const struct GNUNET_ATS_Information *ats,
580 uint32_t ats_count) 580 uint32_t ats_count)
581{ 581{
582 connected++; 582 connected++;
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 70658d40b..81a0b39e1 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -140,7 +140,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
140static void 140static void
141notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 141notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
142 const struct GNUNET_MessageHeader *message, 142 const struct GNUNET_MessageHeader *message,
143 const struct GNUNET_TRANSPORT_ATS_Information *ats, 143 const struct GNUNET_ATS_Information *ats,
144 uint32_t ats_count) 144 uint32_t ats_count)
145{ 145{
146 struct PeerContext * p = cls; 146 struct PeerContext * p = cls;
@@ -233,7 +233,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
233 233
234static void 234static void
235notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 235notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
236 const struct GNUNET_TRANSPORT_ATS_Information *ats, 236 const struct GNUNET_ATS_Information *ats,
237 uint32_t ats_count) 237 uint32_t ats_count)
238{ 238{
239 static int c; 239 static int c;
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c
index ad169df4c..e20ed8ee5 100644
--- a/src/transport/test_transport_api_disconnect.c
+++ b/src/transport/test_transport_api_disconnect.c
@@ -189,7 +189,7 @@ end_badly ()
189static void 189static void
190notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 190notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
191 const struct GNUNET_MessageHeader *message, 191 const struct GNUNET_MessageHeader *message,
192 const struct GNUNET_TRANSPORT_ATS_Information *ats, 192 const struct GNUNET_ATS_Information *ats,
193 uint32_t ats_count) 193 uint32_t ats_count)
194{ 194{
195 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 195 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -233,7 +233,7 @@ notify_ready (void *cls, size_t size, void *buf)
233 233
234static void 234static void
235notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 235notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
236 const struct GNUNET_TRANSPORT_ATS_Information *ats, 236 const struct GNUNET_ATS_Information *ats,
237 uint32_t ats_count) 237 uint32_t ats_count)
238{ 238{
239 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", 239 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c
index 66e1917a1..20dc3ed2e 100644
--- a/src/transport/test_transport_api_limited_sockets.c
+++ b/src/transport/test_transport_api_limited_sockets.c
@@ -138,7 +138,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
138static void 138static void
139notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 139notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
140 const struct GNUNET_MessageHeader *message, 140 const struct GNUNET_MessageHeader *message,
141 const struct GNUNET_TRANSPORT_ATS_Information *ats, 141 const struct GNUNET_ATS_Information *ats,
142 uint32_t ats_count) 142 uint32_t ats_count)
143{ 143{
144 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 144 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -185,7 +185,7 @@ notify_ready (void *cls, size_t size, void *buf)
185 185
186static void 186static void
187notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 187notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
188 const struct GNUNET_TRANSPORT_ATS_Information *ats, 188 const struct GNUNET_ATS_Information *ats,
189 uint32_t ats_count) 189 uint32_t ats_count)
190{ 190{
191 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", 191 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index 6ccb7c8d7..e4b635905 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -201,7 +201,7 @@ get_size (unsigned int iter)
201static void 201static void
202notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 202notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
203 const struct GNUNET_MessageHeader *message, 203 const struct GNUNET_MessageHeader *message,
204 const struct GNUNET_TRANSPORT_ATS_Information *ats, 204 const struct GNUNET_ATS_Information *ats,
205 uint32_t ats_count) 205 uint32_t ats_count)
206{ 206{
207 static int n; 207 static int n;
@@ -356,7 +356,7 @@ notify_ready (void *cls, size_t size, void *buf)
356 356
357static void 357static void
358notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 358notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
359 const struct GNUNET_TRANSPORT_ATS_Information *ats, 359 const struct GNUNET_ATS_Information *ats,
360 uint32_t ats_count) 360 uint32_t ats_count)
361{ 361{
362 362
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c
index 89a74e9a9..aff36853a 100644
--- a/src/transport/test_transport_api_timeout.c
+++ b/src/transport/test_transport_api_timeout.c
@@ -161,7 +161,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
161static void 161static void
162notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 162notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
163 const struct GNUNET_MessageHeader *message, 163 const struct GNUNET_MessageHeader *message,
164 const struct GNUNET_TRANSPORT_ATS_Information *ats, 164 const struct GNUNET_ATS_Information *ats,
165 uint32_t ats_count) 165 uint32_t ats_count)
166{ 166{
167 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 167 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -171,7 +171,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
171 171
172static void 172static void
173notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 173notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
174 const struct GNUNET_TRANSPORT_ATS_Information *ats, 174 const struct GNUNET_ATS_Information *ats,
175 uint32_t ats_count) 175 uint32_t ats_count)
176{ 176{
177 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", 177 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index 7a08d590d..a59b6c1d3 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -269,7 +269,7 @@ get_bit (const char *map, unsigned int bit)
269static void 269static void
270notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 270notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
271 const struct GNUNET_MessageHeader *message, 271 const struct GNUNET_MessageHeader *message,
272 const struct GNUNET_TRANSPORT_ATS_Information *ats, 272 const struct GNUNET_ATS_Information *ats,
273 uint32_t ats_count) 273 uint32_t ats_count)
274{ 274{
275 static int n; 275 static int n;
@@ -413,7 +413,7 @@ notify_ready (void *cls, size_t size, void *buf)
413 413
414static void 414static void
415notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 415notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
416 const struct GNUNET_TRANSPORT_ATS_Information *ats, 416 const struct GNUNET_ATS_Information *ats,
417 uint32_t ats_count) 417 uint32_t ats_count)
418{ 418{
419 419
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c
index c6062c96a..c8638cd23 100644
--- a/src/transport/test_transport_api_unreliability_constant.c
+++ b/src/transport/test_transport_api_unreliability_constant.c
@@ -217,7 +217,7 @@ get_size (unsigned int iter)
217static void 217static void
218notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 218notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
219 const struct GNUNET_MessageHeader *message, 219 const struct GNUNET_MessageHeader *message,
220 const struct GNUNET_TRANSPORT_ATS_Information *ats, 220 const struct GNUNET_ATS_Information *ats,
221 uint32_t ats_count) 221 uint32_t ats_count)
222{ 222{
223 static int n; 223 static int n;
@@ -373,7 +373,7 @@ notify_ready (void *cls, size_t size, void *buf)
373 373
374static void 374static void
375notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 375notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
376 const struct GNUNET_TRANSPORT_ATS_Information *ats, 376 const struct GNUNET_ATS_Information *ats,
377 uint32_t ats_count) 377 uint32_t ats_count)
378{ 378{
379 379
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c
index 68fac8e95..721154f9e 100644
--- a/src/transport/test_transport_startonly.c
+++ b/src/transport/test_transport_startonly.c
@@ -92,7 +92,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
92 92
93static void 93static void
94notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 94notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
95 const struct GNUNET_TRANSPORT_ATS_Information *ats, 95 const struct GNUNET_ATS_Information *ats,
96 uint32_t ats_count) 96 uint32_t ats_count)
97{ 97{
98 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n", 98 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n",
@@ -110,7 +110,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
110static void 110static void
111notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 111notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
112 const struct GNUNET_MessageHeader *message, 112 const struct GNUNET_MessageHeader *message,
113 const struct GNUNET_TRANSPORT_ATS_Information *ats, 113 const struct GNUNET_ATS_Information *ats,
114 uint32_t ats_count) 114 uint32_t ats_count)
115{ 115{
116 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n"); 116 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n");
diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c
index 44f050131..266933580 100644
--- a/src/transport/test_transport_testing.c
+++ b/src/transport/test_transport_testing.c
@@ -104,7 +104,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
104 104
105static void 105static void
106notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 106notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
107 const struct GNUNET_TRANSPORT_ATS_Information *ats, 107 const struct GNUNET_ATS_Information *ats,
108 uint32_t ats_count) 108 uint32_t ats_count)
109{ 109{
110 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n", 110 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n",
@@ -122,7 +122,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
122static void 122static void
123notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 123notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
124 const struct GNUNET_MessageHeader *message, 124 const struct GNUNET_MessageHeader *message,
125 const struct GNUNET_TRANSPORT_ATS_Information *ats, 125 const struct GNUNET_ATS_Information *ats,
126 uint32_t ats_count) 126 uint32_t ats_count)
127{ 127{
128 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n"); 128 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n");
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 2e0ca1e55..66844de31 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -86,7 +86,7 @@ find_connecting_context ( struct GNUNET_TRANSPORT_TESTING_handle *tth,
86 86
87static void 87static void
88notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 88notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
89 const struct GNUNET_TRANSPORT_ATS_Information *ats, 89 const struct GNUNET_ATS_Information *ats,
90 uint32_t ats_count) 90 uint32_t ats_count)
91{ 91{
92 struct PeerContext *p = cls; 92 struct PeerContext *p = cls;
@@ -159,7 +159,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
159static void 159static void
160notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, 160notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
161 const struct GNUNET_MessageHeader *message, 161 const struct GNUNET_MessageHeader *message,
162 const struct GNUNET_TRANSPORT_ATS_Information *ats, 162 const struct GNUNET_ATS_Information *ats,
163 uint32_t ats_count) 163 uint32_t ats_count)
164{ 164{
165 struct PeerContext *p = cls; 165 struct PeerContext *p = cls;
diff --git a/src/transport/transport.h b/src/transport/transport.h
index 6ccc8abd2..440b0dfed 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -114,7 +114,7 @@ struct ConnectInfoMessage
114 * First of the ATS information blocks (we must have at least 114 * First of the ATS information blocks (we must have at least
115 * one due to the 0-termination requirement). 115 * one due to the 0-termination requirement).
116 */ 116 */
117 struct GNUNET_TRANSPORT_ATS_Information ats; 117 struct GNUNET_ATS_Information ats;
118}; 118};
119 119
120 120
@@ -224,7 +224,7 @@ struct InboundMessage
224 * First of the ATS information blocks (we must have at least 224 * First of the ATS information blocks (we must have at least
225 * one due to the 0-termination requirement). 225 * one due to the 0-termination requirement).
226 */ 226 */
227 struct GNUNET_TRANSPORT_ATS_Information ats; 227 struct GNUNET_ATS_Information ats;
228}; 228};
229 229
230 230
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index 3fdbcbd68..a258172d5 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -466,7 +466,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
466 ats_count = ntohl (cim->ats_count); 466 ats_count = ntohl (cim->ats_count);
467 if (size != 467 if (size !=
468 sizeof (struct ConnectInfoMessage) + 468 sizeof (struct ConnectInfoMessage) +
469 ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)) 469 ats_count * sizeof (struct GNUNET_ATS_Information))
470 { 470 {
471 GNUNET_break (0); 471 GNUNET_break (0);
472 break; 472 break;
@@ -548,7 +548,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
548 imm = (const struct GNUNET_MessageHeader *) &((&(im->ats))[ats_count + 1]); 548 imm = (const struct GNUNET_MessageHeader *) &((&(im->ats))[ats_count + 1]);
549 549
550 if (ntohs (imm->size) + sizeof (struct InboundMessage) + 550 if (ntohs (imm->size) + sizeof (struct InboundMessage) +
551 ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) != size) 551 ats_count * sizeof (struct GNUNET_ATS_Information) != size)
552 { 552 {
553 GNUNET_break (0); 553 GNUNET_break (0);
554 break; 554 break;