From a2d9b4434076254811584a4a0ffa8881d0903db8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 17 Oct 2011 07:55:41 +0000 Subject: move GNUNET_TRANSPORT_ATS_ to GNUNET_ATS_ --- src/ats-test/test_transport_ats_multiple_peers.c | 2 +- src/ats/ats.h | 6 +- src/ats/ats_api.c | 8 +- src/ats/ats_api.h | 2 +- src/ats/ats_api_performance.c | 8 +- src/ats/ats_api_scheduling.c | 20 +- src/ats/gnunet-service-ats_addresses.c | 8 +- src/ats/gnunet-service-ats_addresses.h | 3 +- src/ats/gnunet-service-ats_math.c | 12 +- src/ats/gnunet-service-ats_math.h | 12 +- src/ats/gnunet-service-ats_performance.c | 12 +- src/ats/gnunet-service-ats_performance.h | 4 +- src/ats/gnunet-service-ats_scheduling.c | 20 +- src/ats/gnunet-service-ats_scheduling.h | 2 +- src/ats/test_ats_api_bandwidth_consumption.c | 6 +- src/ats/test_ats_api_scheduling.c | 6 +- src/ats/test_ats_api_update_address.c | 6 +- src/chat/gnunet-service-chat.c | 12 +- src/core/core.h | 6 +- src/core/core_api.c | 16 +- src/core/core_api_iterate_peers.c | 4 +- src/core/gnunet-core-list-connections.c | 2 +- src/core/gnunet-service-core.c | 66 ++-- src/core/gnunet-service-core_clients.c | 22 +- src/core/gnunet-service-core_clients.h | 6 +- src/core/gnunet-service-core_kx.c | 4 +- src/core/gnunet-service-core_kx.h | 2 +- src/core/gnunet-service-core_neighbours.c | 4 +- src/core/gnunet-service-core_sessions.c | 4 +- src/core/test_core_api.c | 8 +- src/core/test_core_api_reliability.c | 8 +- src/core/test_core_api_send_to_self.c | 4 +- src/core/test_core_api_start_only.c | 6 +- src/core/test_core_quota_compliance.c | 8 +- src/dht/gnunet-service-dht_neighbours.c | 8 +- src/dv/gnunet-service-dv.c | 38 +- src/dv/plugin_transport_dv.c | 8 +- src/dv/test_transport_api_dv.c | 16 +- src/fs/gnunet-service-fs.c | 6 +- src/fs/gnunet-service-fs_cp.c | 14 +- src/fs/gnunet-service-fs_cp.h | 6 +- src/hostlist/gnunet-daemon-hostlist.c | 4 +- src/hostlist/hostlist-client.c | 4 +- src/hostlist/hostlist-server.c | 2 +- src/hostlist/test_gnunet_daemon_hostlist.c | 2 +- .../test_gnunet_daemon_hostlist_learning.c | 2 +- .../test_gnunet_daemon_hostlist_reconnect.c | 2 +- src/include/gnunet_ats_service.h | 426 ++++++++++++++++++++- src/include/gnunet_core_service.h | 4 +- src/include/gnunet_mesh_service.h | 4 +- src/include/gnunet_mesh_service_new.h | 6 +- src/include/gnunet_transport_plugin.h | 2 +- src/include/gnunet_transport_service.h | 355 +---------------- src/mesh/gnunet-service-mesh.c | 12 +- src/mesh/mesh_api.c | 10 +- src/mesh/mesh_api_new.c | 6 +- src/mesh/test_mesh_api.c | 2 +- src/mesh/test_mesh_local_1.c | 6 +- src/mesh/test_mesh_local_2.c | 6 +- src/mesh/test_mesh_small.c | 2 +- src/mesh/test_mesh_small_unicast.c | 6 +- src/mesh/test_mesh_small_unicast_far.c | 4 +- src/nse/gnunet-service-nse.c | 4 +- src/testing/test_testing_large_topology.c | 4 +- src/testing/test_testing_topology.c | 4 +- src/testing/testing.c | 4 +- src/testing/testing_group.c | 4 +- src/topology/gnunet-daemon-topology.c | 4 +- src/transport/gnunet-service-transport.c | 12 +- src/transport/gnunet-service-transport_blacklist.c | 2 +- src/transport/gnunet-service-transport_clients.c | 8 +- .../gnunet-service-transport_neighbours.c | 4 +- .../gnunet-service-transport_neighbours.h | 4 +- .../gnunet-service-transport_validation.c | 4 +- .../gnunet-transport-connect-running-peers.c | 4 +- src/transport/plugin_transport_http.c | 6 +- src/transport/plugin_transport_tcp.c | 8 +- src/transport/plugin_transport_udp.c | 4 +- src/transport/plugin_transport_unix.c | 6 +- src/transport/plugin_transport_wlan.c | 6 +- src/transport/test_quota_compliance.c | 4 +- src/transport/test_transport_api.c | 4 +- src/transport/test_transport_api_disconnect.c | 4 +- src/transport/test_transport_api_limited_sockets.c | 4 +- src/transport/test_transport_api_reliability.c | 4 +- src/transport/test_transport_api_timeout.c | 4 +- src/transport/test_transport_api_unreliability.c | 4 +- .../test_transport_api_unreliability_constant.c | 4 +- src/transport/test_transport_startonly.c | 4 +- src/transport/test_transport_testing.c | 4 +- src/transport/transport-testing.c | 4 +- src/transport/transport.h | 4 +- src/transport/transport_api.c | 4 +- src/vpn/gnunet-daemon-exit.c | 8 +- src/vpn/gnunet-daemon-vpn.c | 6 +- src/vpn/gnunet-daemon-vpn.h | 2 +- src/vpn/gnunet-service-dns.c | 6 +- 97 files changed, 755 insertions(+), 693 deletions(-) (limited to 'src') diff --git a/src/ats-test/test_transport_ats_multiple_peers.c b/src/ats-test/test_transport_ats_multiple_peers.c index fe317696a..c79454411 100644 --- a/src/ats-test/test_transport_ats_multiple_peers.c +++ b/src/ats-test/test_transport_ats_multiple_peers.c @@ -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); diff --git a/src/ats/ats.h b/src/ats/ats.h index bef63553e..fbc6ca712 100644 --- a/src/ats/ats.h +++ b/src/ats/ats.h @@ -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). */ diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c index 29a273e3e..61d3895d2 100644 --- a/src/ats/ats_api.c +++ b/src/ats/ats_api.c @@ -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; diff --git a/src/ats/ats_api.h b/src/ats/ats_api.h index 2c98194be..a10607817 100644 --- a/src/ats/ats_api.h +++ b/src/ats/ats_api.h @@ -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 diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index 2cae8a51f..c3a5d2bed 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c @@ -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); diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index 53a21f996..4855efadb 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c @@ -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); diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index 9c504b26c..2bcb9913a 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c @@ -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); diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h index fdb3df678..335876720 100644 --- a/src/ats/gnunet-service-ats_addresses.h +++ b/src/ats/gnunet-service-ats_addresses.h @@ -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); diff --git a/src/ats/gnunet-service-ats_math.c b/src/ats/gnunet-service-ats_math.c index 220fe522b..8d25e25c6 100644 --- a/src/ats/gnunet-service-ats_math.c +++ b/src/ats/gnunet-service-ats_math.c @@ -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; diff --git a/src/ats/gnunet-service-ats_math.h b/src/ats/gnunet-service-ats_math.h index 4af1bdc4c..1324c30d0 100644 --- a/src/ats/gnunet-service-ats_math.h +++ b/src/ats/gnunet-service-ats_math.h @@ -67,13 +67,13 @@ 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); diff --git a/src/ats/gnunet-service-ats_performance.c b/src/ats/gnunet-service-ats_performance.c index 3a4acc641..103040ea8 100644 --- a/src/ats/gnunet-service-ats_performance.c +++ b/src/ats/gnunet-service-ats_performance.c @@ -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); diff --git a/src/ats/gnunet-service-ats_performance.h b/src/ats/gnunet-service-ats_performance.h index 6dfd11202..5988bff44 100644 --- a/src/ats/gnunet-service-ats_performance.h +++ b/src/ats/gnunet-service-ats_performance.h @@ -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); diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c index ca4e86ca4..825f00085 100644 --- a/src/ats/gnunet-service-ats_scheduling.c +++ b/src/ats/gnunet-service-ats_scheduling.c @@ -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); diff --git a/src/ats/gnunet-service-ats_scheduling.h b/src/ats/gnunet-service-ats_scheduling.h index 8d6fa977d..15eed7f85 100644 --- a/src/ats/gnunet-service-ats_scheduling.h +++ b/src/ats/gnunet-service-ats_scheduling.h @@ -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); diff --git a/src/ats/test_ats_api_bandwidth_consumption.c b/src/ats/test_ats_api_bandwidth_consumption.c index 5952237f4..05a3e257a 100644 --- a/src/ats/test_ats_api_bandwidth_consumption.c +++ b/src/ats/test_ats_api_bandwidth_consumption.c @@ -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) diff --git a/src/ats/test_ats_api_scheduling.c b/src/ats/test_ats_api_scheduling.c index dd4718c12..7dfd887fd 100644 --- a/src/ats/test_ats_api_scheduling.c +++ b/src/ats/test_ats_api_scheduling.c @@ -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) diff --git a/src/ats/test_ats_api_update_address.c b/src/ats/test_ats_api_update_address.c index 54383c1d3..78011d492 100644 --- a/src/ats/test_ats_api_update_address.c +++ b/src/ats/test_ats_api_update_address.c @@ -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; diff --git a/src/chat/gnunet-service-chat.c b/src/chat/gnunet-service-chat.c index c7420d8bb..a70017759 100644 --- a/src/chat/gnunet-service-chat.c +++ b/src/chat/gnunet-service-chat.c @@ -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; diff --git a/src/core/core.h b/src/core/core.h index 8c97f6177..5c0738ee4 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -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; }; diff --git a/src/core/core_api.c b/src/core/core_api.c index 57d01f6bb..0de64869b 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -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); diff --git a/src/core/core_api_iterate_peers.c b/src/core/core_api_iterate_peers.c index 0cc28e538..ed9ea175e 100644 --- a/src/core/core_api_iterate_peers.c +++ b/src/core/core_api_iterate_peers.c @@ -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); diff --git a/src/core/gnunet-core-list-connections.c b/src/core/gnunet-core-list-connections.c index fe037f73b..ae7feb915 100644 --- a/src/core/gnunet-core-list-connections.c +++ b/src/core/gnunet-core-list-connections.c @@ -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; diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 5d262fdc6..010c42a09 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -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; diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c index 5e25ac907..3159772aa 100644 --- a/src/core/gnunet-service-core_clients.c +++ b/src/core/gnunet-service-core_clients.c @@ -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, diff --git a/src/core/gnunet-service-core_clients.h b/src/core/gnunet-service-core_clients.h index 9774292c0..2385efc05 100644 --- a/src/core/gnunet-service-core_clients.h +++ b/src/core/gnunet-service-core_clients.h @@ -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, diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index 92a9e13c9..dfc304226 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c @@ -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; diff --git a/src/core/gnunet-service-core_kx.h b/src/core/gnunet-service-core_kx.h index 3c6734d77..0e963ef7a 100644 --- a/src/core/gnunet-service-core_kx.h +++ b/src/core/gnunet-service-core_kx.h @@ -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); diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c index 60ce0e512..505b1797b 100644 --- a/src/core/gnunet-service-core_neighbours.c +++ b/src/core/gnunet-service-core_neighbours.c @@ -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; diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index 3c29bd065..c239f27c1 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c @@ -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; diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 15e3f812b..10cba9d8a 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c @@ -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)); diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index 05cc25afa..1ae67b02b 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c @@ -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; diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c index b7e2b449b..a1c361376 100644 --- a/src/core/test_core_api_send_to_self.c +++ b/src/core/test_core_api_send_to_self.c @@ -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)); diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index 744758191..9825131be 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c @@ -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; } diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index e3b760624..3f619f49a 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c @@ -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; diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index 265bcdeef..9d0bd996d 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c @@ -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; diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 44fa9dee5..3882ed36f 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c @@ -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; diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c index feb8a2e57..5e2a6bd6c 100644 --- a/src/dv/plugin_transport_dv.c +++ b/src/dv/plugin_transport_dv.c @@ -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); } diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index a38e2fa29..82b3cb235 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c @@ -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; diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index d4728760d..866860c0a 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -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; diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 3a2bdac70..0c852ec64 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c @@ -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; diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index 4a238dce8..c725dee75 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h @@ -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); diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c index 30f736002..fb23d2345 100644 --- a/src/hostlist/gnunet-daemon-hostlist.c +++ b/src/hostlist/gnunet-daemon-hostlist.c @@ -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; diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index 1cc5836af..1f3ad2a7c 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c @@ -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; diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c index 633824c41..fb4c1b1b9 100644 --- a/src/hostlist/hostlist-server.c +++ b/src/hostlist/hostlist-server.c @@ -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; diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index 09410e14d..bcb302978 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c @@ -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) diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index c6b04ac7e..9d72433ce 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c @@ -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; diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index ae5c1b6dd..18757a79e 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c @@ -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) diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 0213f0ed1..f2d1c2aad 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h @@ -22,17 +22,427 @@ * @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); diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index a7c5ba45c..d0adf127b 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h @@ -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); diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h index bf43c8289..ab573557c 100644 --- a/src/include/gnunet_mesh_service.h +++ b/src/include/gnunet_mesh_service.h @@ -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); diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index 6db406de3..6dd9da66c 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h @@ -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); diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index bc5b791d5..9fc0ffd84 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h @@ -114,7 +114,7 @@ typedef struct GNUNET_MessageHeader * message, const struct - GNUNET_TRANSPORT_ATS_Information + GNUNET_ATS_Information * ats, uint32_t ats_count, diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 2b6675c89..40e3fca5b 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h @@ -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); /** diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 45d5d2cfd..434e448af 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -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; diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 871318755..2067b7b6c 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -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; diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c index a85173e54..fda4e916f 100644 --- a/src/mesh/mesh_api_new.c +++ b/src/mesh/mesh_api_new.c @@ -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; diff --git a/src/mesh/test_mesh_api.c b/src/mesh/test_mesh_api.c index 6821a1ab8..1699097f6 100644 --- a/src/mesh/test_mesh_api.c +++ b/src/mesh/test_mesh_api.c @@ -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; } diff --git a/src/mesh/test_mesh_local_1.c b/src/mesh/test_mesh_local_1.c index d531dab6f..1c9196bb2 100644 --- a/src/mesh/test_mesh_local_1.c +++ b/src/mesh/test_mesh_local_1.c @@ -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); diff --git a/src/mesh/test_mesh_local_2.c b/src/mesh/test_mesh_local_2.c index 1e42a5e9b..ee1e6c46a 100644 --- a/src/mesh/test_mesh_local_2.c +++ b/src/mesh/test_mesh_local_2.c @@ -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); diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index 0fd0b9766..a7ea4ee79 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c @@ -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; diff --git a/src/mesh/test_mesh_small_unicast.c b/src/mesh/test_mesh_small_unicast.c index 24db46d49..cc95a34e8 100644 --- a/src/mesh/test_mesh_small_unicast.c +++ b/src/mesh/test_mesh_small_unicast.c @@ -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", diff --git a/src/mesh/test_mesh_small_unicast_far.c b/src/mesh/test_mesh_small_unicast_far.c index 8833ce287..d5a768f98 100644 --- a/src/mesh/test_mesh_small_unicast_far.c +++ b/src/mesh/test_mesh_small_unicast_far.c @@ -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", diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index 7000ec602..ce48ecfc4 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c @@ -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; diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c index 33a9eb787..78d91fa3d 100644 --- a/src/testing/test_testing_large_topology.c +++ b/src/testing/test_testing_large_topology.c @@ -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; diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c index 6b60d243d..b83a8cf3c 100644 --- a/src/testing/test_testing_topology.c +++ b/src/testing/test_testing_topology.c @@ -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; diff --git a/src/testing/testing.c b/src/testing/testing.c index 466692ce7..1798a1af6 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -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; diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index 807653045..a2c68c93c 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c @@ -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; diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 1616ab613..453c9d924 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c @@ -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; 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; */ 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); } 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 */ 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, 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) 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, 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 /** * 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; 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, 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); 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, /* 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, 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: 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", 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, { 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; } 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) { 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, 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, { 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, 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, 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); } 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) 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)); 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 () 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++; 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) 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; 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 () 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", 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) 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", 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) 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) { 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) 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", 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) 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) { 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) 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) { 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) 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"); 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) 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"); 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, 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; 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 * 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; }; 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) 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; diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c index f5c701cae..677f61ea2 100644 --- a/src/vpn/gnunet-daemon-exit.c +++ b/src/vpn/gnunet-daemon-exit.c @@ -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); diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index fbbffc9a1..0f7bdff70 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -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); diff --git a/src/vpn/gnunet-daemon-vpn.h b/src/vpn/gnunet-daemon-vpn.h index 701a88d63..c0dba360e 100644 --- a/src/vpn/gnunet-daemon-vpn.h +++ b/src/vpn/gnunet-daemon-vpn.h @@ -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 diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index cb018746c..e0692937b 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c @@ -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 */ -- cgit v1.2.3