diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-17 07:55:41 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-17 07:55:41 +0000 |
commit | a2d9b4434076254811584a4a0ffa8881d0903db8 (patch) | |
tree | 4f5a2ee5daaabdedb45aa5e7e1d03e3c0f28ed0e /src | |
parent | 4b5e8dcb8d6f0d29fffb823e600c73be404d9b39 (diff) | |
download | gnunet-a2d9b4434076254811584a4a0ffa8881d0903db8.tar.gz gnunet-a2d9b4434076254811584a4a0ffa8881d0903db8.zip |
move GNUNET_TRANSPORT_ATS_ to GNUNET_ATS_
Diffstat (limited to 'src')
97 files changed, 755 insertions, 693 deletions
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) | |||
605 | 605 | ||
606 | static void | 606 | static void |
607 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 607 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
608 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 608 | const struct GNUNET_ATS_Information *ats, |
609 | uint32_t ats_count) | 609 | uint32_t ats_count) |
610 | { | 610 | { |
611 | send_task = GNUNET_SCHEDULER_add_now (&send_task_f, NULL); | 611 | 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 | |||
77 | uint32_t session_id GNUNET_PACKED; | 77 | uint32_t session_id GNUNET_PACKED; |
78 | 78 | ||
79 | /* followed by: | 79 | /* followed by: |
80 | - struct GNUNET_TRANSPORT_ATS_Information [ats_count]; | 80 | - struct GNUNET_ATS_Information [ats_count]; |
81 | - char address[address_length] | 81 | - char address[address_length] |
82 | - char plugin_name[plugin_name_length] (including '\0'-termination). | 82 | - char plugin_name[plugin_name_length] (including '\0'-termination). |
83 | */ | 83 | */ |
@@ -126,7 +126,7 @@ struct AddressSuggestionMessage | |||
126 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; | 126 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; |
127 | 127 | ||
128 | /* followed by: | 128 | /* followed by: |
129 | - struct GNUNET_TRANSPORT_ATS_Information [ats_count]; | 129 | - struct GNUNET_ATS_Information [ats_count]; |
130 | - char address[address_length] | 130 | - char address[address_length] |
131 | - char plugin_name[plugin_name_length] (including '\0'-termination). | 131 | - char plugin_name[plugin_name_length] (including '\0'-termination). |
132 | */ | 132 | */ |
@@ -151,7 +151,7 @@ struct PeerInformationMessage | |||
151 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; | 151 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; |
152 | 152 | ||
153 | /* followed by: | 153 | /* followed by: |
154 | - struct GNUNET_TRANSPORT_ATS_Information [ats_count]; | 154 | - struct GNUNET_ATS_Information [ats_count]; |
155 | - char address[address_length] | 155 | - char address[address_length] |
156 | - char plugin_name[plugin_name_length] (including '\0'-termination). | 156 | - char plugin_name[plugin_name_length] (including '\0'-termination). |
157 | */ | 157 | */ |
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) | |||
523 | static struct AllocationRecord * | 523 | static struct AllocationRecord * |
524 | create_allocation_record (const char *plugin_name, struct Session *session, | 524 | create_allocation_record (const char *plugin_name, struct Session *session, |
525 | const void *plugin_addr, size_t plugin_addr_len, | 525 | const void *plugin_addr, size_t plugin_addr_len, |
526 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 526 | const struct GNUNET_ATS_Information *ats, |
527 | uint32_t ats_count) | 527 | uint32_t ats_count) |
528 | { | 528 | { |
529 | struct AllocationRecord *ar; | 529 | struct AllocationRecord *ar; |
@@ -539,7 +539,7 @@ create_allocation_record (const char *plugin_name, struct Session *session, | |||
539 | GNUNET_assert (ats_count > 0); | 539 | GNUNET_assert (ats_count > 0); |
540 | GNUNET_array_grow (ar->ats, ar->ats_count, ats_count); | 540 | GNUNET_array_grow (ar->ats, ar->ats_count, ats_count); |
541 | memcpy (ar->ats, ats, | 541 | memcpy (ar->ats, ats, |
542 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 542 | ats_count * sizeof (struct GNUNET_ATS_Information)); |
543 | ar->connected = GNUNET_SYSERR; /* aka: not known / no change */ | 543 | ar->connected = GNUNET_SYSERR; /* aka: not known / no change */ |
544 | return ar; | 544 | return ar; |
545 | } | 545 | } |
@@ -587,7 +587,7 @@ GNUNET_ATS_peer_connect (struct GNUNET_ATS_SchedulingHandle *atc, | |||
587 | const struct GNUNET_PeerIdentity *peer, | 587 | const struct GNUNET_PeerIdentity *peer, |
588 | const char *plugin_name, struct Session *session, | 588 | const char *plugin_name, struct Session *session, |
589 | const void *plugin_addr, size_t plugin_addr_len, | 589 | const void *plugin_addr, size_t plugin_addr_len, |
590 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 590 | const struct GNUNET_ATS_Information *ats, |
591 | uint32_t ats_count) | 591 | uint32_t ats_count) |
592 | { | 592 | { |
593 | struct AllocationRecord *ar; | 593 | struct AllocationRecord *ar; |
@@ -761,7 +761,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *atc, | |||
761 | struct GNUNET_TIME_Absolute valid_until, | 761 | struct GNUNET_TIME_Absolute valid_until, |
762 | const char *plugin_name, struct Session *session, | 762 | const char *plugin_name, struct Session *session, |
763 | const void *plugin_addr, size_t plugin_addr_len, | 763 | const void *plugin_addr, size_t plugin_addr_len, |
764 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 764 | const struct GNUNET_ATS_Information *ats, |
765 | uint32_t ats_count) | 765 | uint32_t ats_count) |
766 | { | 766 | { |
767 | struct AllocationRecord *ar; | 767 | 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 | |||
37 | /** | 37 | /** |
38 | * Performance information associated with this address (array). | 38 | * Performance information associated with this address (array). |
39 | */ | 39 | */ |
40 | struct GNUNET_TRANSPORT_ATS_Information *ats; | 40 | struct GNUNET_ATS_Information *ats; |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * Name of the plugin | 43 | * 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, | |||
250 | const struct GNUNET_MessageHeader *msg) | 250 | const struct GNUNET_MessageHeader *msg) |
251 | { | 251 | { |
252 | const struct PeerInformationMessage *pi; | 252 | const struct PeerInformationMessage *pi; |
253 | const struct GNUNET_TRANSPORT_ATS_Information *atsi; | 253 | const struct GNUNET_ATS_Information *atsi; |
254 | const char *address; | 254 | const char *address; |
255 | const char *plugin_name; | 255 | const char *plugin_name; |
256 | uint16_t address_length; | 256 | uint16_t address_length; |
@@ -271,14 +271,14 @@ process_pi_message (struct GNUNET_ATS_PerformanceHandle *ph, | |||
271 | ats_count = ntohl (pi->ats_count); | 271 | ats_count = ntohl (pi->ats_count); |
272 | address_length = ntohs (pi->address_length); | 272 | address_length = ntohs (pi->address_length); |
273 | plugin_name_length = ntohs (pi->plugin_name_length); | 273 | plugin_name_length = ntohs (pi->plugin_name_length); |
274 | atsi = (const struct GNUNET_TRANSPORT_ATS_Information*) &pi[1]; | 274 | atsi = (const struct GNUNET_ATS_Information*) &pi[1]; |
275 | address = (const char*) &atsi[ats_count]; | 275 | address = (const char*) &atsi[ats_count]; |
276 | plugin_name = &address[address_length]; | 276 | plugin_name = &address[address_length]; |
277 | if ( (address_length + | 277 | if ( (address_length + |
278 | plugin_name_length + | 278 | plugin_name_length + |
279 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) + | 279 | ats_count * sizeof (struct GNUNET_ATS_Information) + |
280 | sizeof (struct PeerInformationMessage) != ntohs (msg->size)) || | 280 | sizeof (struct PeerInformationMessage) != ntohs (msg->size)) || |
281 | (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)) || | 281 | (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) || |
282 | (plugin_name[plugin_name_length - 1] != '\0') ) | 282 | (plugin_name[plugin_name_length - 1] != '\0') ) |
283 | { | 283 | { |
284 | GNUNET_break (0); | 284 | 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, | |||
317 | { | 317 | { |
318 | struct GNUNET_ATS_SchedulingHandle *sh = cls; | 318 | struct GNUNET_ATS_SchedulingHandle *sh = cls; |
319 | const struct AddressSuggestionMessage *m; | 319 | const struct AddressSuggestionMessage *m; |
320 | const struct GNUNET_TRANSPORT_ATS_Information *atsi; | 320 | const struct GNUNET_ATS_Information *atsi; |
321 | const char *address; | 321 | const char *address; |
322 | const char *plugin_name; | 322 | const char *plugin_name; |
323 | uint16_t address_length; | 323 | uint16_t address_length; |
@@ -345,15 +345,15 @@ process_ats_message (void *cls, | |||
345 | m = (const struct AddressSuggestionMessage*) msg; | 345 | m = (const struct AddressSuggestionMessage*) msg; |
346 | ats_count = ntohl (m->ats_count); | 346 | ats_count = ntohl (m->ats_count); |
347 | address_length = ntohs (m->address_length); | 347 | address_length = ntohs (m->address_length); |
348 | atsi = (const struct GNUNET_TRANSPORT_ATS_Information*) &m[1]; | 348 | atsi = (const struct GNUNET_ATS_Information*) &m[1]; |
349 | address = (const char*) &atsi[ats_count]; | 349 | address = (const char*) &atsi[ats_count]; |
350 | plugin_name = &address[address_length]; | 350 | plugin_name = &address[address_length]; |
351 | plugin_name_length = ntohs (m->plugin_name_length); | 351 | plugin_name_length = ntohs (m->plugin_name_length); |
352 | if ( (address_length + | 352 | if ( (address_length + |
353 | plugin_name_length + | 353 | plugin_name_length + |
354 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) + | 354 | ats_count * sizeof (struct GNUNET_ATS_Information) + |
355 | sizeof (struct AddressSuggestionMessage) != ntohs (msg->size)) || | 355 | sizeof (struct AddressSuggestionMessage) != ntohs (msg->size)) || |
356 | (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)) || | 356 | (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) || |
357 | (plugin_name[plugin_name_length - 1] != '\0') ) | 357 | (plugin_name[plugin_name_length - 1] != '\0') ) |
358 | { | 358 | { |
359 | GNUNET_break (0); | 359 | GNUNET_break (0); |
@@ -525,23 +525,23 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, | |||
525 | const char *plugin_name, | 525 | const char *plugin_name, |
526 | const void *plugin_addr, size_t plugin_addr_len, | 526 | const void *plugin_addr, size_t plugin_addr_len, |
527 | struct Session *session, | 527 | struct Session *session, |
528 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 528 | const struct GNUNET_ATS_Information *ats, |
529 | uint32_t ats_count) | 529 | uint32_t ats_count) |
530 | { | 530 | { |
531 | struct PendingMessage *p; | 531 | struct PendingMessage *p; |
532 | struct AddressUpdateMessage *m; | 532 | struct AddressUpdateMessage *m; |
533 | struct GNUNET_TRANSPORT_ATS_Information *am; | 533 | struct GNUNET_ATS_Information *am; |
534 | char *pm; | 534 | char *pm; |
535 | size_t namelen; | 535 | size_t namelen; |
536 | size_t msize; | 536 | size_t msize; |
537 | 537 | ||
538 | namelen = (plugin_name == NULL) ? 0 : strlen (plugin_name) + 1; | 538 | namelen = (plugin_name == NULL) ? 0 : strlen (plugin_name) + 1; |
539 | msize = sizeof (struct AddressUpdateMessage) + plugin_addr_len + | 539 | msize = sizeof (struct AddressUpdateMessage) + plugin_addr_len + |
540 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) + namelen; | 540 | ats_count * sizeof (struct GNUNET_ATS_Information) + namelen; |
541 | if ( (msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || | 541 | if ( (msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || |
542 | (plugin_addr_len >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || | 542 | (plugin_addr_len >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || |
543 | (namelen >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || | 543 | (namelen >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || |
544 | (ats_count >= GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)) ) | 544 | (ats_count >= GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) ) |
545 | { | 545 | { |
546 | GNUNET_break (0); | 546 | GNUNET_break (0); |
547 | return; | 547 | return; |
@@ -557,8 +557,8 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, | |||
557 | m->address_length = htons (plugin_addr_len); | 557 | m->address_length = htons (plugin_addr_len); |
558 | m->plugin_name_length = htons (namelen); | 558 | m->plugin_name_length = htons (namelen); |
559 | m->session_id = htonl (get_session_id (sh, session)); | 559 | m->session_id = htonl (get_session_id (sh, session)); |
560 | am = (struct GNUNET_TRANSPORT_ATS_Information*) &m[1]; | 560 | am = (struct GNUNET_ATS_Information*) &m[1]; |
561 | memcpy (am, ats, ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 561 | memcpy (am, ats, ats_count * sizeof (struct GNUNET_ATS_Information)); |
562 | pm = (char *) &am[ats_count]; | 562 | pm = (char *) &am[ats_count]; |
563 | memcpy (pm, plugin_addr, plugin_addr_len); | 563 | memcpy (pm, plugin_addr, plugin_addr_len); |
564 | memcpy (&pm[plugin_addr_len], plugin_name, namelen); | 564 | 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 | |||
46 | 46 | ||
47 | char * plugin; | 47 | char * plugin; |
48 | 48 | ||
49 | struct GNUNET_TRANSPORT_ATS_Information * ats; | 49 | struct GNUNET_ATS_Information * ats; |
50 | 50 | ||
51 | struct GNUNET_BANDWIDTH_Value32NBO bw_in; | 51 | struct GNUNET_BANDWIDTH_Value32NBO bw_in; |
52 | 52 | ||
@@ -144,18 +144,18 @@ GAS_address_update (const struct GNUNET_PeerIdentity *peer, | |||
144 | const void *plugin_addr, size_t plugin_addr_len, | 144 | const void *plugin_addr, size_t plugin_addr_len, |
145 | struct GNUNET_SERVER_Client *session_client, | 145 | struct GNUNET_SERVER_Client *session_client, |
146 | uint32_t session_id, | 146 | uint32_t session_id, |
147 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 147 | const struct GNUNET_ATS_Information *atsi, |
148 | uint32_t atsi_count) | 148 | uint32_t atsi_count) |
149 | { | 149 | { |
150 | struct ATS_Address * aa; | 150 | struct ATS_Address * aa; |
151 | struct ATS_Address * old; | 151 | struct ATS_Address * old; |
152 | 152 | ||
153 | aa = GNUNET_malloc (sizeof (struct ATS_Address) + plugin_addr_len); | 153 | aa = GNUNET_malloc (sizeof (struct ATS_Address) + plugin_addr_len); |
154 | aa->ats = GNUNET_malloc(atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 154 | aa->ats = GNUNET_malloc(atsi_count * sizeof (struct GNUNET_ATS_Information)); |
155 | aa->peer = *peer; | 155 | aa->peer = *peer; |
156 | aa->addr_len = plugin_addr_len; | 156 | aa->addr_len = plugin_addr_len; |
157 | aa->ats_count = atsi_count; | 157 | aa->ats_count = atsi_count; |
158 | memcpy (aa->ats, atsi, atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 158 | memcpy (aa->ats, atsi, atsi_count * sizeof (struct GNUNET_ATS_Information)); |
159 | aa->addr = &aa[1]; | 159 | aa->addr = &aa[1]; |
160 | memcpy (&aa[1], plugin_addr, plugin_addr_len); | 160 | memcpy (&aa[1], plugin_addr, plugin_addr_len); |
161 | aa->plugin = GNUNET_strdup (plugin_name); | 161 | 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 @@ | |||
28 | #define GNUNET_SERVICE_ATS_ADDRESSES_H | 28 | #define GNUNET_SERVICE_ATS_ADDRESSES_H |
29 | 29 | ||
30 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_transport_service.h" // FIXME... | ||
32 | #include "gnunet_ats_service.h" | 31 | #include "gnunet_ats_service.h" |
33 | #include "ats.h" | 32 | #include "ats.h" |
34 | 33 | ||
@@ -53,7 +52,7 @@ GAS_address_update (const struct GNUNET_PeerIdentity *peer, | |||
53 | const void *plugin_addr, size_t plugin_addr_len, | 52 | const void *plugin_addr, size_t plugin_addr_len, |
54 | struct GNUNET_SERVER_Client *session_client, | 53 | struct GNUNET_SERVER_Client *session_client, |
55 | uint32_t session_id, | 54 | uint32_t session_id, |
56 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 55 | const struct GNUNET_ATS_Information *atsi, |
57 | uint32_t atsi_count); | 56 | uint32_t atsi_count); |
58 | 57 | ||
59 | 58 | ||
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 () | |||
513 | struct ATS_Handle * | 513 | struct ATS_Handle * |
514 | ats_init (double D, double U, double R, int v_b_min, int v_n_min, | 514 | ats_init (double D, double U, double R, int v_b_min, int v_n_min, |
515 | int max_iterations, struct GNUNET_TIME_Relative max_duration, | 515 | int max_iterations, struct GNUNET_TIME_Relative max_duration, |
516 | GNUNET_TRANSPORT_ATS_AddressNotification address_not, | 516 | GNUNET_ATS_AddressNotification address_not, |
517 | GNUNET_TRANSPORT_ATS_ResultCallback res_cb) | 517 | GNUNET_ATS_ResultCallback res_cb) |
518 | { | 518 | { |
519 | struct ATS_Handle *ats = NULL; | 519 | struct ATS_Handle *ats = NULL; |
520 | 520 | ||
@@ -850,7 +850,7 @@ ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat, | |||
850 | { | 850 | { |
851 | ia[array_index] = row_index; | 851 | ia[array_index] = row_index; |
852 | ja[array_index] = c2; | 852 | ja[array_index] = c2; |
853 | if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY) | 853 | if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DELAY) |
854 | { | 854 | { |
855 | double v0 = 0, v1 = 0, v2 = 0; | 855 | double v0 = 0, v1 = 0, v2 = 0; |
856 | 856 | ||
@@ -866,7 +866,7 @@ ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat, | |||
866 | value = 100.0 / ((v0 + 2 * v1 + 3 * v2) / 6.0); | 866 | value = 100.0 / ((v0 + 2 * v1 + 3 * v2) / 6.0); |
867 | value = 1; | 867 | value = 1; |
868 | } | 868 | } |
869 | if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE) | 869 | if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DISTANCE) |
870 | { | 870 | { |
871 | double v0 = 0, v1 = 0, v2 = 0; | 871 | double v0 = 0, v1 = 0, v2 = 0; |
872 | 872 | ||
@@ -1243,7 +1243,7 @@ ats_update_problem_qm (struct ATS_Handle *ats) | |||
1243 | GNUNET_assert (ats->mechanisms[c2].addr != NULL); | 1243 | GNUNET_assert (ats->mechanisms[c2].addr != NULL); |
1244 | GNUNET_assert (ats->mechanisms[c2].peer != NULL); | 1244 | GNUNET_assert (ats->mechanisms[c2].peer != NULL); |
1245 | 1245 | ||
1246 | if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY) | 1246 | if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DELAY) |
1247 | { | 1247 | { |
1248 | double v0 = 0, v1 = 0, v2 = 0; | 1248 | double v0 = 0, v1 = 0, v2 = 0; |
1249 | 1249 | ||
@@ -1259,7 +1259,7 @@ ats_update_problem_qm (struct ATS_Handle *ats) | |||
1259 | value = 100.0 / ((v0 + 2 * v1 + 3 * v2) / 6.0); | 1259 | value = 100.0 / ((v0 + 2 * v1 + 3 * v2) / 6.0); |
1260 | //value = 1; | 1260 | //value = 1; |
1261 | } | 1261 | } |
1262 | if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE) | 1262 | if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DISTANCE) |
1263 | { | 1263 | { |
1264 | double v0 = 0, v1 = 0, v2 = 0; | 1264 | double v0 = 0, v1 = 0, v2 = 0; |
1265 | 1265 | ||
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 @@ | |||
67 | struct ATS_mechanism; | 67 | struct ATS_mechanism; |
68 | struct ATS_peer; | 68 | struct ATS_peer; |
69 | 69 | ||
70 | typedef void (*GNUNET_TRANSPORT_ATS_AddressNotification) (struct ATS_peer ** | 70 | typedef void (*GNUNET_ATS_AddressNotification) (struct ATS_peer ** |
71 | peers, int *c_p, | 71 | peers, int *c_p, |
72 | struct ATS_mechanism | 72 | struct ATS_mechanism |
73 | ** mechanisms, | 73 | ** mechanisms, |
74 | int *c_m); | 74 | int *c_m); |
75 | 75 | ||
76 | typedef void (*GNUNET_TRANSPORT_ATS_ResultCallback) (void); | 76 | typedef void (*GNUNET_ATS_ResultCallback) (void); |
77 | 77 | ||
78 | enum ATS_problem_state | 78 | enum ATS_problem_state |
79 | { | 79 | { |
@@ -211,9 +211,9 @@ struct ATS_Handle | |||
211 | * Callback functions | 211 | * Callback functions |
212 | */ | 212 | */ |
213 | 213 | ||
214 | GNUNET_TRANSPORT_ATS_AddressNotification addr_notification; | 214 | GNUNET_ATS_AddressNotification addr_notification; |
215 | 215 | ||
216 | GNUNET_TRANSPORT_ATS_ResultCallback result_cb; | 216 | GNUNET_ATS_ResultCallback result_cb; |
217 | 217 | ||
218 | 218 | ||
219 | /** | 219 | /** |
@@ -452,8 +452,8 @@ static struct ATS_quality_metric qm[] = { | |||
452 | struct ATS_Handle * | 452 | struct ATS_Handle * |
453 | ats_init (double D, double U, double R, int v_b_min, int v_n_min, | 453 | ats_init (double D, double U, double R, int v_b_min, int v_n_min, |
454 | int max_iterations, struct GNUNET_TIME_Relative max_duration, | 454 | int max_iterations, struct GNUNET_TIME_Relative max_duration, |
455 | GNUNET_TRANSPORT_ATS_AddressNotification address_not, | 455 | GNUNET_ATS_AddressNotification address_not, |
456 | GNUNET_TRANSPORT_ATS_ResultCallback res_cb); | 456 | GNUNET_ATS_ResultCallback res_cb); |
457 | 457 | ||
458 | void | 458 | void |
459 | ats_shutdown (struct ATS_Handle *ats); | 459 | 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 | |||
151 | GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, | 151 | GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, |
152 | const char *plugin_name, | 152 | const char *plugin_name, |
153 | const void *plugin_addr, size_t plugin_addr_len, | 153 | const void *plugin_addr, size_t plugin_addr_len, |
154 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 154 | const struct GNUNET_ATS_Information *atsi, |
155 | uint32_t atsi_count, | 155 | uint32_t atsi_count, |
156 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 156 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
157 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) | 157 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
@@ -159,14 +159,14 @@ GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, | |||
159 | struct PerformanceClient *pc; | 159 | struct PerformanceClient *pc; |
160 | struct PeerInformationMessage *msg; | 160 | struct PeerInformationMessage *msg; |
161 | size_t plugin_name_length = strlen (plugin_name) + 1; | 161 | size_t plugin_name_length = strlen (plugin_name) + 1; |
162 | size_t msize = sizeof (struct PeerInformationMessage) + atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) | 162 | size_t msize = sizeof (struct PeerInformationMessage) + atsi_count * sizeof (struct GNUNET_ATS_Information) |
163 | + plugin_addr_len + plugin_name_length; | 163 | + plugin_addr_len + plugin_name_length; |
164 | char buf[msize]; | 164 | char buf[msize]; |
165 | struct GNUNET_TRANSPORT_ATS_Information *atsp; | 165 | struct GNUNET_ATS_Information *atsp; |
166 | char *addrp; | 166 | char *addrp; |
167 | 167 | ||
168 | GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); | 168 | GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); |
169 | GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 169 | GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)); |
170 | msg = (struct PeerInformationMessage*) buf; | 170 | msg = (struct PeerInformationMessage*) buf; |
171 | msg->header.size = htons (msize); | 171 | msg->header.size = htons (msize); |
172 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION); | 172 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION); |
@@ -176,8 +176,8 @@ GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, | |||
176 | msg->plugin_name_length = htons (plugin_name_length); | 176 | msg->plugin_name_length = htons (plugin_name_length); |
177 | msg->bandwidth_out = bandwidth_out; | 177 | msg->bandwidth_out = bandwidth_out; |
178 | msg->bandwidth_in = bandwidth_in; | 178 | msg->bandwidth_in = bandwidth_in; |
179 | atsp = (struct GNUNET_TRANSPORT_ATS_Information* ) &msg[1]; | 179 | atsp = (struct GNUNET_ATS_Information* ) &msg[1]; |
180 | memcpy (atsp, atsi, sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count); | 180 | memcpy (atsp, atsi, sizeof (struct GNUNET_ATS_Information) * atsi_count); |
181 | addrp = (char*) &atsp[atsi_count]; | 181 | addrp = (char*) &atsp[atsi_count]; |
182 | memcpy (addrp, plugin_addr, plugin_addr_len); | 182 | memcpy (addrp, plugin_addr, plugin_addr_len); |
183 | strcpy (&addrp[plugin_addr_len], plugin_name); | 183 | 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 @@ | |||
28 | #define GNUNET_SERVICE_ATS_PERFORMANCE_H | 28 | #define GNUNET_SERVICE_ATS_PERFORMANCE_H |
29 | 29 | ||
30 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_transport_service.h" // FIXME | 31 | #include "gnunet_ats_service.h" |
32 | #include "ats.h" | 32 | #include "ats.h" |
33 | 33 | ||
34 | /** | 34 | /** |
@@ -69,7 +69,7 @@ void | |||
69 | GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, | 69 | GAS_performance_notify_clients (const struct GNUNET_PeerIdentity *peer, |
70 | const char *plugin_name, | 70 | const char *plugin_name, |
71 | const void *plugin_addr, size_t plugin_addr_len, | 71 | const void *plugin_addr, size_t plugin_addr_len, |
72 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 72 | const struct GNUNET_ATS_Information *atsi, |
73 | uint32_t atsi_count, | 73 | uint32_t atsi_count, |
74 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 74 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
75 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in); | 75 | 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 | |||
155 | const void *plugin_addr, size_t plugin_addr_len, | 155 | const void *plugin_addr, size_t plugin_addr_len, |
156 | struct GNUNET_SERVER_Client *session_client, | 156 | struct GNUNET_SERVER_Client *session_client, |
157 | uint32_t session_id, | 157 | uint32_t session_id, |
158 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 158 | const struct GNUNET_ATS_Information *atsi, |
159 | uint32_t atsi_count, | 159 | uint32_t atsi_count, |
160 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 160 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
161 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) | 161 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
@@ -163,14 +163,14 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *pe | |||
163 | struct SchedulingClient *sc; | 163 | struct SchedulingClient *sc; |
164 | struct AddressSuggestionMessage *msg; | 164 | struct AddressSuggestionMessage *msg; |
165 | size_t plugin_name_length = strlen (plugin_name) + 1; | 165 | size_t plugin_name_length = strlen (plugin_name) + 1; |
166 | size_t msize = sizeof (struct AddressSuggestionMessage) + atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) | 166 | size_t msize = sizeof (struct AddressSuggestionMessage) + atsi_count * sizeof (struct GNUNET_ATS_Information) |
167 | + plugin_addr_len + plugin_name_length; | 167 | + plugin_addr_len + plugin_name_length; |
168 | char buf[msize]; | 168 | char buf[msize]; |
169 | struct GNUNET_TRANSPORT_ATS_Information *atsp; | 169 | struct GNUNET_ATS_Information *atsp; |
170 | char *addrp; | 170 | char *addrp; |
171 | 171 | ||
172 | GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); | 172 | GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); |
173 | GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 173 | GNUNET_assert (atsi_count < GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)); |
174 | msg = (struct AddressSuggestionMessage*) buf; | 174 | msg = (struct AddressSuggestionMessage*) buf; |
175 | msg->header.size = htons (msize); | 175 | msg->header.size = htons (msize); |
176 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION); | 176 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION); |
@@ -181,8 +181,8 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *pe | |||
181 | /* session ID is set only if 'client' is the same... */ | 181 | /* session ID is set only if 'client' is the same... */ |
182 | msg->bandwidth_out = bandwidth_out; | 182 | msg->bandwidth_out = bandwidth_out; |
183 | msg->bandwidth_in = bandwidth_in; | 183 | msg->bandwidth_in = bandwidth_in; |
184 | atsp = (struct GNUNET_TRANSPORT_ATS_Information* ) &msg[1]; | 184 | atsp = (struct GNUNET_ATS_Information* ) &msg[1]; |
185 | memcpy (atsp, atsi, sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count); | 185 | memcpy (atsp, atsi, sizeof (struct GNUNET_ATS_Information) * atsi_count); |
186 | addrp = (char*) &atsp[atsi_count]; | 186 | addrp = (char*) &atsp[atsi_count]; |
187 | memcpy (addrp, plugin_addr, plugin_addr_len); | 187 | memcpy (addrp, plugin_addr, plugin_addr_len); |
188 | strcpy (&addrp[plugin_addr_len], plugin_name); | 188 | strcpy (&addrp[plugin_addr_len], plugin_name); |
@@ -234,7 +234,7 @@ GAS_handle_address_update (void *cls, struct GNUNET_SERVER_Client *client, | |||
234 | 234 | ||
235 | { | 235 | { |
236 | const struct AddressUpdateMessage * m; | 236 | const struct AddressUpdateMessage * m; |
237 | const struct GNUNET_TRANSPORT_ATS_Information *atsi; | 237 | const struct GNUNET_ATS_Information *atsi; |
238 | const char *address; | 238 | const char *address; |
239 | const char *plugin_name; | 239 | const char *plugin_name; |
240 | uint16_t address_length; | 240 | uint16_t address_length; |
@@ -256,7 +256,7 @@ GAS_handle_address_update (void *cls, struct GNUNET_SERVER_Client *client, | |||
256 | ats_count = ntohl (m->ats_count); | 256 | ats_count = ntohl (m->ats_count); |
257 | address_length = ntohs (m->address_length); | 257 | address_length = ntohs (m->address_length); |
258 | plugin_name_length = ntohs (m->plugin_name_length); | 258 | plugin_name_length = ntohs (m->plugin_name_length); |
259 | atsi = (const struct GNUNET_TRANSPORT_ATS_Information*) &m[1]; | 259 | atsi = (const struct GNUNET_ATS_Information*) &m[1]; |
260 | address = (const char*) &atsi[ats_count]; | 260 | address = (const char*) &atsi[ats_count]; |
261 | if (plugin_name_length != 0) | 261 | if (plugin_name_length != 0) |
262 | plugin_name = &address[address_length]; | 262 | plugin_name = &address[address_length]; |
@@ -264,9 +264,9 @@ GAS_handle_address_update (void *cls, struct GNUNET_SERVER_Client *client, | |||
264 | plugin_name = ""; | 264 | plugin_name = ""; |
265 | if ( (address_length + | 265 | if ( (address_length + |
266 | plugin_name_length + | 266 | plugin_name_length + |
267 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) + | 267 | ats_count * sizeof (struct GNUNET_ATS_Information) + |
268 | sizeof (struct AddressUpdateMessage) != ntohs (message->size)) || | 268 | sizeof (struct AddressUpdateMessage) != ntohs (message->size)) || |
269 | (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_TRANSPORT_ATS_Information)) || | 269 | (ats_count > GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) || |
270 | (plugin_name[plugin_name_length - 1] != '\0') ) | 270 | (plugin_name[plugin_name_length - 1] != '\0') ) |
271 | { | 271 | { |
272 | GNUNET_break (0); | 272 | 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 | |||
70 | const void *plugin_addr, size_t plugin_addr_len, | 70 | const void *plugin_addr, size_t plugin_addr_len, |
71 | struct GNUNET_SERVER_Client *session_client, | 71 | struct GNUNET_SERVER_Client *session_client, |
72 | uint32_t session_id, | 72 | uint32_t session_id, |
73 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 73 | const struct GNUNET_ATS_Information *atsi, |
74 | uint32_t atsi_count, | 74 | uint32_t atsi_count, |
75 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 75 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
76 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in); | 76 | 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 | |||
62 | void * addr; | 62 | void * addr; |
63 | size_t addr_len; | 63 | size_t addr_len; |
64 | 64 | ||
65 | struct GNUNET_TRANSPORT_ATS_Information * ats; | 65 | struct GNUNET_ATS_Information * ats; |
66 | int ats_count; | 66 | int ats_count; |
67 | 67 | ||
68 | void *session; | 68 | void *session; |
@@ -156,7 +156,7 @@ void performance_cb (void *cls, | |||
156 | GNUNET_BANDWIDTH_Value32NBO | 156 | GNUNET_BANDWIDTH_Value32NBO |
157 | bandwidth_in, | 157 | bandwidth_in, |
158 | const struct | 158 | const struct |
159 | GNUNET_TRANSPORT_ATS_Information | 159 | GNUNET_ATS_Information |
160 | * ats, | 160 | * ats, |
161 | uint32_t ats_count) | 161 | uint32_t ats_count) |
162 | { | 162 | { |
@@ -207,7 +207,7 @@ address_suggest_cb (void *cls, | |||
207 | GNUNET_BANDWIDTH_Value32NBO | 207 | GNUNET_BANDWIDTH_Value32NBO |
208 | bandwidth_in, | 208 | bandwidth_in, |
209 | const struct | 209 | const struct |
210 | GNUNET_TRANSPORT_ATS_Information | 210 | GNUNET_ATS_Information |
211 | * ats, | 211 | * ats, |
212 | uint32_t ats_count) | 212 | uint32_t ats_count) |
213 | 213 | ||
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 | |||
58 | void * addr; | 58 | void * addr; |
59 | size_t addr_len; | 59 | size_t addr_len; |
60 | 60 | ||
61 | struct GNUNET_TRANSPORT_ATS_Information * ats; | 61 | struct GNUNET_ATS_Information * ats; |
62 | int ats_count; | 62 | int ats_count; |
63 | 63 | ||
64 | void *session; | 64 | void *session; |
@@ -73,7 +73,7 @@ struct PeerContext | |||
73 | 73 | ||
74 | struct Address addr[2]; | 74 | struct Address addr[2]; |
75 | struct PeerContext p[2]; | 75 | struct PeerContext p[2]; |
76 | struct GNUNET_TRANSPORT_ATS_Information atsi[2]; | 76 | struct GNUNET_ATS_Information atsi[2]; |
77 | 77 | ||
78 | static void | 78 | static void |
79 | stop_arm () | 79 | stop_arm () |
@@ -133,7 +133,7 @@ address_suggest_cb (void *cls, | |||
133 | GNUNET_BANDWIDTH_Value32NBO | 133 | GNUNET_BANDWIDTH_Value32NBO |
134 | bandwidth_in, | 134 | bandwidth_in, |
135 | const struct | 135 | const struct |
136 | GNUNET_TRANSPORT_ATS_Information | 136 | GNUNET_ATS_Information |
137 | * ats, | 137 | * ats, |
138 | uint32_t ats_count) | 138 | uint32_t ats_count) |
139 | 139 | ||
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 | |||
73 | /** | 73 | /** |
74 | * Performance information associated with this address (array). | 74 | * Performance information associated with this address (array). |
75 | */ | 75 | */ |
76 | struct GNUNET_TRANSPORT_ATS_Information *ats; | 76 | struct GNUNET_ATS_Information *ats; |
77 | 77 | ||
78 | /** | 78 | /** |
79 | * Name of the plugin | 79 | * Name of the plugin |
@@ -121,7 +121,7 @@ suggest_cb (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
121 | const char *plugin_name, const void *plugin_addr, | 121 | const char *plugin_name, const void *plugin_addr, |
122 | size_t plugin_addr_len, struct Session *session, | 122 | size_t plugin_addr_len, struct Session *session, |
123 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth, | 123 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth, |
124 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 124 | const struct GNUNET_ATS_Information *ats, |
125 | uint32_t ats_count) | 125 | uint32_t ats_count) |
126 | { | 126 | { |
127 | struct ExpectedValues *ex = cls; | 127 | struct ExpectedValues *ex = cls; |
@@ -179,7 +179,7 @@ check (void *cls, char *const *args, const char *cfgfile, | |||
179 | ar->session = NULL; | 179 | ar->session = NULL; |
180 | ar->plugin_addr = "address1"; | 180 | ar->plugin_addr = "address1"; |
181 | ar->plugin_addr_len = strlen (ar->plugin_addr) + 1; | 181 | ar->plugin_addr_len = strlen (ar->plugin_addr) + 1; |
182 | ar->ats = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 182 | ar->ats = GNUNET_malloc (sizeof (struct GNUNET_ATS_Information)); |
183 | 183 | ||
184 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Initial ATS information\n"); | 184 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Initial ATS information\n"); |
185 | ar->ats_count = 1; | 185 | 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 | |||
988 | handle_p2p_join_notification (void *cls, | 988 | handle_p2p_join_notification (void *cls, |
989 | const struct GNUNET_PeerIdentity *other, | 989 | const struct GNUNET_PeerIdentity *other, |
990 | const struct GNUNET_MessageHeader *message, | 990 | const struct GNUNET_MessageHeader *message, |
991 | const struct GNUNET_TRANSPORT_ATS_Information | 991 | const struct GNUNET_ATS_Information |
992 | *atsi) | 992 | *atsi) |
993 | { | 993 | { |
994 | const struct P2PJoinNotificationMessage *p2p_jnmsg; | 994 | const struct P2PJoinNotificationMessage *p2p_jnmsg; |
@@ -1104,7 +1104,7 @@ static int | |||
1104 | handle_p2p_leave_notification (void *cls, | 1104 | handle_p2p_leave_notification (void *cls, |
1105 | const struct GNUNET_PeerIdentity *other, | 1105 | const struct GNUNET_PeerIdentity *other, |
1106 | const struct GNUNET_MessageHeader *message, | 1106 | const struct GNUNET_MessageHeader *message, |
1107 | const struct GNUNET_TRANSPORT_ATS_Information | 1107 | const struct GNUNET_ATS_Information |
1108 | *atsi) | 1108 | *atsi) |
1109 | { | 1109 | { |
1110 | const struct P2PLeaveNotificationMessage *p2p_lnmsg; | 1110 | const struct P2PLeaveNotificationMessage *p2p_lnmsg; |
@@ -1185,7 +1185,7 @@ static int | |||
1185 | handle_p2p_message_notification (void *cls, | 1185 | handle_p2p_message_notification (void *cls, |
1186 | const struct GNUNET_PeerIdentity *other, | 1186 | const struct GNUNET_PeerIdentity *other, |
1187 | const struct GNUNET_MessageHeader *message, | 1187 | const struct GNUNET_MessageHeader *message, |
1188 | const struct GNUNET_TRANSPORT_ATS_Information | 1188 | const struct GNUNET_ATS_Information |
1189 | *atsi) | 1189 | *atsi) |
1190 | { | 1190 | { |
1191 | const struct P2PReceiveNotificationMessage *p2p_rnmsg; | 1191 | const struct P2PReceiveNotificationMessage *p2p_rnmsg; |
@@ -1335,7 +1335,7 @@ handle_p2p_message_notification (void *cls, | |||
1335 | static int | 1335 | static int |
1336 | handle_p2p_sync_request (void *cls, const struct GNUNET_PeerIdentity *other, | 1336 | handle_p2p_sync_request (void *cls, const struct GNUNET_PeerIdentity *other, |
1337 | const struct GNUNET_MessageHeader *message, | 1337 | const struct GNUNET_MessageHeader *message, |
1338 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1338 | const struct GNUNET_ATS_Information *atsi) |
1339 | { | 1339 | { |
1340 | struct ChatClient *entry; | 1340 | struct ChatClient *entry; |
1341 | struct GNUNET_CORE_TransmitHandle *th; | 1341 | struct GNUNET_CORE_TransmitHandle *th; |
@@ -1377,7 +1377,7 @@ static int | |||
1377 | handle_p2p_confirmation_receipt (void *cls, | 1377 | handle_p2p_confirmation_receipt (void *cls, |
1378 | const struct GNUNET_PeerIdentity *other, | 1378 | const struct GNUNET_PeerIdentity *other, |
1379 | const struct GNUNET_MessageHeader *message, | 1379 | const struct GNUNET_MessageHeader *message, |
1380 | const struct GNUNET_TRANSPORT_ATS_Information | 1380 | const struct GNUNET_ATS_Information |
1381 | *atsi) | 1381 | *atsi) |
1382 | { | 1382 | { |
1383 | const struct P2PConfirmationReceiptMessage *p2p_crmsg; | 1383 | const struct P2PConfirmationReceiptMessage *p2p_crmsg; |
@@ -1518,7 +1518,7 @@ transmit_sync_request_to_peer (void *cls, size_t size, void *buf) | |||
1518 | */ | 1518 | */ |
1519 | static void | 1519 | static void |
1520 | peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 1520 | peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, |
1521 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1521 | const struct GNUNET_ATS_Information *atsi) |
1522 | { | 1522 | { |
1523 | struct ConnectedPeer *cp; | 1523 | struct ConnectedPeer *cp; |
1524 | struct GNUNET_CORE_TransmitHandle *th; | 1524 | 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 | |||
125 | * First of the ATS information blocks (we must have at least | 125 | * First of the ATS information blocks (we must have at least |
126 | * one due to the 0-termination requirement). | 126 | * one due to the 0-termination requirement). |
127 | */ | 127 | */ |
128 | struct GNUNET_TRANSPORT_ATS_Information ats; | 128 | struct GNUNET_ATS_Information ats; |
129 | 129 | ||
130 | }; | 130 | }; |
131 | 131 | ||
@@ -171,7 +171,7 @@ struct PeerStatusNotifyMessage | |||
171 | * First of the ATS information blocks (we must have at least | 171 | * First of the ATS information blocks (we must have at least |
172 | * one due to the 0-termination requirement). | 172 | * one due to the 0-termination requirement). |
173 | */ | 173 | */ |
174 | struct GNUNET_TRANSPORT_ATS_Information ats; | 174 | struct GNUNET_ATS_Information ats; |
175 | 175 | ||
176 | }; | 176 | }; |
177 | 177 | ||
@@ -232,7 +232,7 @@ struct NotifyTrafficMessage | |||
232 | * First of the ATS information blocks (we must have at least | 232 | * First of the ATS information blocks (we must have at least |
233 | * one due to the 0-termination requirement). | 233 | * one due to the 0-termination requirement). |
234 | */ | 234 | */ |
235 | struct GNUNET_TRANSPORT_ATS_Information ats; | 235 | struct GNUNET_ATS_Information ats; |
236 | 236 | ||
237 | }; | 237 | }; |
238 | 238 | ||
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) | |||
864 | ats_count = ntohl (cnm->ats_count); | 864 | ats_count = ntohl (cnm->ats_count); |
865 | if ((msize != | 865 | if ((msize != |
866 | sizeof (struct ConnectNotifyMessage) + | 866 | sizeof (struct ConnectNotifyMessage) + |
867 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)) || | 867 | ats_count * sizeof (struct GNUNET_ATS_Information)) || |
868 | (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR != | 868 | (GNUNET_ATS_ARRAY_TERMINATOR != |
869 | ntohl ((&cnm->ats)[ats_count].type))) | 869 | ntohl ((&cnm->ats)[ats_count].type))) |
870 | { | 870 | { |
871 | GNUNET_break (0); | 871 | GNUNET_break (0); |
@@ -945,9 +945,9 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
945 | ats_count = ntohl (ntm->ats_count); | 945 | ats_count = ntohl (ntm->ats_count); |
946 | if ((msize < | 946 | if ((msize < |
947 | sizeof (struct NotifyTrafficMessage) + | 947 | sizeof (struct NotifyTrafficMessage) + |
948 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) + | 948 | ats_count * sizeof (struct GNUNET_ATS_Information) + |
949 | sizeof (struct GNUNET_MessageHeader)) || | 949 | sizeof (struct GNUNET_MessageHeader)) || |
950 | (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR != | 950 | (GNUNET_ATS_ARRAY_TERMINATOR != |
951 | ntohl ((&ntm->ats)[ats_count].type))) | 951 | ntohl ((&ntm->ats)[ats_count].type))) |
952 | { | 952 | { |
953 | GNUNET_break (0); | 953 | GNUNET_break (0); |
@@ -970,7 +970,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
970 | if ((GNUNET_NO == h->inbound_hdr_only) && | 970 | if ((GNUNET_NO == h->inbound_hdr_only) && |
971 | (msize != | 971 | (msize != |
972 | ntohs (em->size) + sizeof (struct NotifyTrafficMessage) + | 972 | ntohs (em->size) + sizeof (struct NotifyTrafficMessage) + |
973 | +ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information))) | 973 | +ats_count * sizeof (struct GNUNET_ATS_Information))) |
974 | { | 974 | { |
975 | GNUNET_break (0); | 975 | GNUNET_break (0); |
976 | reconnect_later (h); | 976 | reconnect_later (h); |
@@ -1014,9 +1014,9 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
1014 | ats_count = ntohl (ntm->ats_count); | 1014 | ats_count = ntohl (ntm->ats_count); |
1015 | if ((msize < | 1015 | if ((msize < |
1016 | sizeof (struct NotifyTrafficMessage) + | 1016 | sizeof (struct NotifyTrafficMessage) + |
1017 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) + | 1017 | ats_count * sizeof (struct GNUNET_ATS_Information) + |
1018 | sizeof (struct GNUNET_MessageHeader)) || | 1018 | sizeof (struct GNUNET_MessageHeader)) || |
1019 | (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR != | 1019 | (GNUNET_ATS_ARRAY_TERMINATOR != |
1020 | ntohl ((&ntm->ats)[ats_count].type))) | 1020 | ntohl ((&ntm->ats)[ats_count].type))) |
1021 | { | 1021 | { |
1022 | GNUNET_break (0); | 1022 | GNUNET_break (0); |
@@ -1039,7 +1039,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
1039 | if ((GNUNET_NO == h->outbound_hdr_only) && | 1039 | if ((GNUNET_NO == h->outbound_hdr_only) && |
1040 | (msize != | 1040 | (msize != |
1041 | ntohs (em->size) + sizeof (struct NotifyTrafficMessage) + | 1041 | ntohs (em->size) + sizeof (struct NotifyTrafficMessage) + |
1042 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information))) | 1042 | ats_count * sizeof (struct GNUNET_ATS_Information))) |
1043 | { | 1043 | { |
1044 | GNUNET_break (0); | 1044 | GNUNET_break (0); |
1045 | reconnect_later (h); | 1045 | 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) | |||
101 | ats_count = ntohl (connect_message->ats_count); | 101 | ats_count = ntohl (connect_message->ats_count); |
102 | if ((msize != | 102 | if ((msize != |
103 | sizeof (struct ConnectNotifyMessage) + | 103 | sizeof (struct ConnectNotifyMessage) + |
104 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)) || | 104 | ats_count * sizeof (struct GNUNET_ATS_Information)) || |
105 | (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR != | 105 | (GNUNET_ATS_ARRAY_TERMINATOR != |
106 | ntohl ((&connect_message->ats)[ats_count].type))) | 106 | ntohl ((&connect_message->ats)[ats_count].type))) |
107 | { | 107 | { |
108 | GNUNET_break (0); | 108 | 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) | |||
123 | */ | 123 | */ |
124 | static void | 124 | static void |
125 | connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | 125 | connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer, |
126 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 126 | const struct GNUNET_ATS_Information *atsi) |
127 | { | 127 | { |
128 | struct PrintContext *pc; | 128 | struct PrintContext *pc; |
129 | 129 | ||
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 | |||
490 | /** | 490 | /** |
491 | * Performance data for the peer. | 491 | * Performance data for the peer. |
492 | */ | 492 | */ |
493 | struct GNUNET_TRANSPORT_ATS_Information *ats; | 493 | struct GNUNET_ATS_Information *ats; |
494 | 494 | ||
495 | /** | 495 | /** |
496 | * Identity of the neighbour. | 496 | * Identity of the neighbour. |
@@ -957,7 +957,7 @@ handle_peer_status_change (struct Neighbour *n) | |||
957 | { | 957 | { |
958 | struct PeerStatusNotifyMessage *psnm; | 958 | struct PeerStatusNotifyMessage *psnm; |
959 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; | 959 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; |
960 | struct GNUNET_TRANSPORT_ATS_Information *ats; | 960 | struct GNUNET_ATS_Information *ats; |
961 | size_t size; | 961 | size_t size; |
962 | 962 | ||
963 | if ((!n->is_connected) || (n->status != PEER_STATE_KEY_CONFIRMED)) | 963 | if ((!n->is_connected) || (n->status != PEER_STATE_KEY_CONFIRMED)) |
@@ -968,7 +968,7 @@ handle_peer_status_change (struct Neighbour *n) | |||
968 | #endif | 968 | #endif |
969 | size = | 969 | size = |
970 | sizeof (struct PeerStatusNotifyMessage) + | 970 | sizeof (struct PeerStatusNotifyMessage) + |
971 | n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 971 | n->ats_count * sizeof (struct GNUNET_ATS_Information); |
972 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 972 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) |
973 | { | 973 | { |
974 | GNUNET_break (0); | 974 | GNUNET_break (0); |
@@ -976,7 +976,7 @@ handle_peer_status_change (struct Neighbour *n) | |||
976 | GNUNET_array_grow (n->ats, n->ats_count, 0); | 976 | GNUNET_array_grow (n->ats, n->ats_count, 0); |
977 | size = | 977 | size = |
978 | sizeof (struct PeerStatusNotifyMessage) + | 978 | sizeof (struct PeerStatusNotifyMessage) + |
979 | n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 979 | n->ats_count * sizeof (struct GNUNET_ATS_Information); |
980 | } | 980 | } |
981 | psnm = (struct PeerStatusNotifyMessage *) buf; | 981 | psnm = (struct PeerStatusNotifyMessage *) buf; |
982 | psnm->header.size = htons (size); | 982 | psnm->header.size = htons (size); |
@@ -988,7 +988,7 @@ handle_peer_status_change (struct Neighbour *n) | |||
988 | psnm->ats_count = htonl (n->ats_count); | 988 | psnm->ats_count = htonl (n->ats_count); |
989 | ats = &psnm->ats; | 989 | ats = &psnm->ats; |
990 | memcpy (ats, n->ats, | 990 | memcpy (ats, n->ats, |
991 | n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 991 | n->ats_count * sizeof (struct GNUNET_ATS_Information)); |
992 | ats[n->ats_count].type = htonl (0); | 992 | ats[n->ats_count].type = htonl (0); |
993 | ats[n->ats_count].value = htonl (0); | 993 | ats[n->ats_count].value = htonl (0); |
994 | send_to_all_clients (&psnm->header, GNUNET_YES, | 994 | send_to_all_clients (&psnm->header, GNUNET_YES, |
@@ -1245,12 +1245,12 @@ notify_client_about_neighbour (void *cls, const GNUNET_HashCode * key, | |||
1245 | struct Neighbour *n = value; | 1245 | struct Neighbour *n = value; |
1246 | size_t size; | 1246 | size_t size; |
1247 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; | 1247 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; |
1248 | struct GNUNET_TRANSPORT_ATS_Information *ats; | 1248 | struct GNUNET_ATS_Information *ats; |
1249 | struct ConnectNotifyMessage *cnm; | 1249 | struct ConnectNotifyMessage *cnm; |
1250 | 1250 | ||
1251 | size = | 1251 | size = |
1252 | sizeof (struct ConnectNotifyMessage) + | 1252 | sizeof (struct ConnectNotifyMessage) + |
1253 | (n->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 1253 | (n->ats_count) * sizeof (struct GNUNET_ATS_Information); |
1254 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 1254 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) |
1255 | { | 1255 | { |
1256 | GNUNET_break (0); | 1256 | GNUNET_break (0); |
@@ -1258,7 +1258,7 @@ notify_client_about_neighbour (void *cls, const GNUNET_HashCode * key, | |||
1258 | GNUNET_array_grow (n->ats, n->ats_count, 0); | 1258 | GNUNET_array_grow (n->ats, n->ats_count, 0); |
1259 | size = | 1259 | size = |
1260 | sizeof (struct ConnectNotifyMessage) + | 1260 | sizeof (struct ConnectNotifyMessage) + |
1261 | (n->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 1261 | (n->ats_count) * sizeof (struct GNUNET_ATS_Information); |
1262 | } | 1262 | } |
1263 | cnm = (struct ConnectNotifyMessage *) buf; | 1263 | cnm = (struct ConnectNotifyMessage *) buf; |
1264 | cnm->header.size = htons (size); | 1264 | cnm->header.size = htons (size); |
@@ -1266,8 +1266,8 @@ notify_client_about_neighbour (void *cls, const GNUNET_HashCode * key, | |||
1266 | cnm->ats_count = htonl (n->ats_count); | 1266 | cnm->ats_count = htonl (n->ats_count); |
1267 | ats = &cnm->ats; | 1267 | ats = &cnm->ats; |
1268 | memcpy (ats, n->ats, | 1268 | memcpy (ats, n->ats, |
1269 | sizeof (struct GNUNET_TRANSPORT_ATS_Information) * n->ats_count); | 1269 | sizeof (struct GNUNET_ATS_Information) * n->ats_count); |
1270 | ats[n->ats_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 1270 | ats[n->ats_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
1271 | ats[n->ats_count].value = htonl (0); | 1271 | ats[n->ats_count].value = htonl (0); |
1272 | if (n->status == PEER_STATE_KEY_CONFIRMED) | 1272 | if (n->status == PEER_STATE_KEY_CONFIRMED) |
1273 | { | 1273 | { |
@@ -1464,7 +1464,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value) | |||
1464 | struct GNUNET_SERVER_TransmitContext *tc = cls; | 1464 | struct GNUNET_SERVER_TransmitContext *tc = cls; |
1465 | struct Neighbour *n = value; | 1465 | struct Neighbour *n = value; |
1466 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; | 1466 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; |
1467 | struct GNUNET_TRANSPORT_ATS_Information *ats; | 1467 | struct GNUNET_ATS_Information *ats; |
1468 | size_t size; | 1468 | size_t size; |
1469 | struct ConnectNotifyMessage *cnm; | 1469 | struct ConnectNotifyMessage *cnm; |
1470 | 1470 | ||
@@ -1473,7 +1473,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value) | |||
1473 | return GNUNET_OK; | 1473 | return GNUNET_OK; |
1474 | size = | 1474 | size = |
1475 | sizeof (struct ConnectNotifyMessage) + | 1475 | sizeof (struct ConnectNotifyMessage) + |
1476 | (n->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 1476 | (n->ats_count) * sizeof (struct GNUNET_ATS_Information); |
1477 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 1477 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) |
1478 | { | 1478 | { |
1479 | GNUNET_break (0); | 1479 | GNUNET_break (0); |
@@ -1481,7 +1481,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value) | |||
1481 | GNUNET_array_grow (n->ats, n->ats_count, 0); | 1481 | GNUNET_array_grow (n->ats, n->ats_count, 0); |
1482 | size = | 1482 | size = |
1483 | sizeof (struct PeerStatusNotifyMessage) + | 1483 | sizeof (struct PeerStatusNotifyMessage) + |
1484 | n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 1484 | n->ats_count * sizeof (struct GNUNET_ATS_Information); |
1485 | } | 1485 | } |
1486 | cnm = (struct ConnectNotifyMessage *) buf; | 1486 | cnm = (struct ConnectNotifyMessage *) buf; |
1487 | cnm->header.size = htons (size); | 1487 | cnm->header.size = htons (size); |
@@ -1489,8 +1489,8 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value) | |||
1489 | cnm->ats_count = htonl (n->ats_count); | 1489 | cnm->ats_count = htonl (n->ats_count); |
1490 | ats = &cnm->ats; | 1490 | ats = &cnm->ats; |
1491 | memcpy (ats, n->ats, | 1491 | memcpy (ats, n->ats, |
1492 | n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 1492 | n->ats_count * sizeof (struct GNUNET_ATS_Information)); |
1493 | ats[n->ats_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 1493 | ats[n->ats_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
1494 | ats[n->ats_count].value = htonl (0); | 1494 | ats[n->ats_count].value = htonl (0); |
1495 | #if DEBUG_CORE_CLIENT | 1495 | #if DEBUG_CORE_CLIENT |
1496 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message to client.\n", | 1496 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message to client.\n", |
@@ -3089,7 +3089,7 @@ trigger_processing: | |||
3089 | */ | 3089 | */ |
3090 | static void | 3090 | static void |
3091 | handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m, | 3091 | handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m, |
3092 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 3092 | const struct GNUNET_ATS_Information *ats, |
3093 | uint32_t ats_count); | 3093 | uint32_t ats_count); |
3094 | 3094 | ||
3095 | 3095 | ||
@@ -3166,7 +3166,7 @@ process_hello_retry_handle_set_key (void *cls, | |||
3166 | */ | 3166 | */ |
3167 | static void | 3167 | static void |
3168 | update_neighbour_performance (struct Neighbour *n, | 3168 | update_neighbour_performance (struct Neighbour *n, |
3169 | const struct GNUNET_TRANSPORT_ATS_Information | 3169 | const struct GNUNET_ATS_Information |
3170 | *ats, uint32_t ats_count) | 3170 | *ats, uint32_t ats_count) |
3171 | { | 3171 | { |
3172 | uint32_t i; | 3172 | uint32_t i; |
@@ -3203,7 +3203,7 @@ update_neighbour_performance (struct Neighbour *n, | |||
3203 | */ | 3203 | */ |
3204 | static void | 3204 | static void |
3205 | handle_ping (struct Neighbour *n, const struct PingMessage *m, | 3205 | handle_ping (struct Neighbour *n, const struct PingMessage *m, |
3206 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 3206 | const struct GNUNET_ATS_Information *ats, |
3207 | uint32_t ats_count) | 3207 | uint32_t ats_count) |
3208 | { | 3208 | { |
3209 | struct PingMessage t; | 3209 | struct PingMessage t; |
@@ -3295,14 +3295,14 @@ handle_ping (struct Neighbour *n, const struct PingMessage *m, | |||
3295 | */ | 3295 | */ |
3296 | static void | 3296 | static void |
3297 | handle_pong (struct Neighbour *n, const struct PongMessage *m, | 3297 | handle_pong (struct Neighbour *n, const struct PongMessage *m, |
3298 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 3298 | const struct GNUNET_ATS_Information *ats, |
3299 | uint32_t ats_count) | 3299 | uint32_t ats_count) |
3300 | { | 3300 | { |
3301 | struct PongMessage t; | 3301 | struct PongMessage t; |
3302 | struct ConnectNotifyMessage *cnm; | 3302 | struct ConnectNotifyMessage *cnm; |
3303 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 3303 | struct GNUNET_CRYPTO_AesInitializationVector iv; |
3304 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; | 3304 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; |
3305 | struct GNUNET_TRANSPORT_ATS_Information *mats; | 3305 | struct GNUNET_ATS_Information *mats; |
3306 | size_t size; | 3306 | size_t size; |
3307 | 3307 | ||
3308 | #if DEBUG_HANDSHAKE | 3308 | #if DEBUG_HANDSHAKE |
@@ -3393,7 +3393,7 @@ handle_pong (struct Neighbour *n, const struct PongMessage *m, | |||
3393 | update_neighbour_performance (n, ats, ats_count); | 3393 | update_neighbour_performance (n, ats, ats_count); |
3394 | size = | 3394 | size = |
3395 | sizeof (struct ConnectNotifyMessage) + | 3395 | sizeof (struct ConnectNotifyMessage) + |
3396 | (n->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 3396 | (n->ats_count) * sizeof (struct GNUNET_ATS_Information); |
3397 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 3397 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) |
3398 | { | 3398 | { |
3399 | GNUNET_break (0); | 3399 | GNUNET_break (0); |
@@ -3401,7 +3401,7 @@ handle_pong (struct Neighbour *n, const struct PongMessage *m, | |||
3401 | GNUNET_array_grow (n->ats, n->ats_count, 0); | 3401 | GNUNET_array_grow (n->ats, n->ats_count, 0); |
3402 | size = | 3402 | size = |
3403 | sizeof (struct PeerStatusNotifyMessage) + | 3403 | sizeof (struct PeerStatusNotifyMessage) + |
3404 | n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 3404 | n->ats_count * sizeof (struct GNUNET_ATS_Information); |
3405 | } | 3405 | } |
3406 | cnm = (struct ConnectNotifyMessage *) buf; | 3406 | cnm = (struct ConnectNotifyMessage *) buf; |
3407 | cnm->header.size = htons (size); | 3407 | cnm->header.size = htons (size); |
@@ -3410,8 +3410,8 @@ handle_pong (struct Neighbour *n, const struct PongMessage *m, | |||
3410 | cnm->peer = n->peer; | 3410 | cnm->peer = n->peer; |
3411 | mats = &cnm->ats; | 3411 | mats = &cnm->ats; |
3412 | memcpy (mats, n->ats, | 3412 | memcpy (mats, n->ats, |
3413 | n->ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 3413 | n->ats_count * sizeof (struct GNUNET_ATS_Information)); |
3414 | mats[n->ats_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 3414 | mats[n->ats_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
3415 | mats[n->ats_count].value = htonl (0); | 3415 | mats[n->ats_count].value = htonl (0); |
3416 | send_to_all_clients (&cnm->header, GNUNET_NO, | 3416 | send_to_all_clients (&cnm->header, GNUNET_NO, |
3417 | GNUNET_CORE_OPTION_SEND_CONNECT); | 3417 | GNUNET_CORE_OPTION_SEND_CONNECT); |
@@ -3445,7 +3445,7 @@ handle_pong (struct Neighbour *n, const struct PongMessage *m, | |||
3445 | */ | 3445 | */ |
3446 | static void | 3446 | static void |
3447 | handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m, | 3447 | handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m, |
3448 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 3448 | const struct GNUNET_ATS_Information *ats, |
3449 | uint32_t ats_count) | 3449 | uint32_t ats_count) |
3450 | { | 3450 | { |
3451 | struct SetKeyMessage *m_cpy; | 3451 | struct SetKeyMessage *m_cpy; |
@@ -3619,10 +3619,10 @@ send_p2p_message_to_client (struct Neighbour *sender, struct Client *client, | |||
3619 | { | 3619 | { |
3620 | size_t size = | 3620 | size_t size = |
3621 | msize + sizeof (struct NotifyTrafficMessage) + | 3621 | msize + sizeof (struct NotifyTrafficMessage) + |
3622 | (sender->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 3622 | (sender->ats_count) * sizeof (struct GNUNET_ATS_Information); |
3623 | char buf[size]; | 3623 | char buf[size]; |
3624 | struct NotifyTrafficMessage *ntm; | 3624 | struct NotifyTrafficMessage *ntm; |
3625 | struct GNUNET_TRANSPORT_ATS_Information *ats; | 3625 | struct GNUNET_ATS_Information *ats; |
3626 | 3626 | ||
3627 | GNUNET_assert (GNUNET_YES == sender->is_connected); | 3627 | GNUNET_assert (GNUNET_YES == sender->is_connected); |
3628 | GNUNET_break (sender->status == PEER_STATE_KEY_CONFIRMED); | 3628 | GNUNET_break (sender->status == PEER_STATE_KEY_CONFIRMED); |
@@ -3633,7 +3633,7 @@ send_p2p_message_to_client (struct Neighbour *sender, struct Client *client, | |||
3633 | GNUNET_array_grow (sender->ats, sender->ats_count, 0); | 3633 | GNUNET_array_grow (sender->ats, sender->ats_count, 0); |
3634 | size = | 3634 | size = |
3635 | msize + sizeof (struct NotifyTrafficMessage) + | 3635 | msize + sizeof (struct NotifyTrafficMessage) + |
3636 | (sender->ats_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 3636 | (sender->ats_count) * sizeof (struct GNUNET_ATS_Information); |
3637 | } | 3637 | } |
3638 | #if DEBUG_CORE | 3638 | #if DEBUG_CORE |
3639 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3639 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -3649,8 +3649,8 @@ send_p2p_message_to_client (struct Neighbour *sender, struct Client *client, | |||
3649 | ntm->peer = sender->peer; | 3649 | ntm->peer = sender->peer; |
3650 | ats = &ntm->ats; | 3650 | ats = &ntm->ats; |
3651 | memcpy (ats, sender->ats, | 3651 | memcpy (ats, sender->ats, |
3652 | sizeof (struct GNUNET_TRANSPORT_ATS_Information) * sender->ats_count); | 3652 | sizeof (struct GNUNET_ATS_Information) * sender->ats_count); |
3653 | ats[sender->ats_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 3653 | ats[sender->ats_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
3654 | ats[sender->ats_count].value = htonl (0); | 3654 | ats[sender->ats_count].value = htonl (0); |
3655 | memcpy (&ats[sender->ats_count + 1], m, msize); | 3655 | memcpy (&ats[sender->ats_count + 1], m, msize); |
3656 | send_to_client (client, &ntm->header, GNUNET_YES); | 3656 | send_to_client (client, &ntm->header, GNUNET_YES); |
@@ -3748,7 +3748,7 @@ deliver_message (void *cls, void *client, const struct GNUNET_MessageHeader *m) | |||
3748 | */ | 3748 | */ |
3749 | static void | 3749 | static void |
3750 | handle_encrypted_message (struct Neighbour *n, const struct EncryptedMessage *m, | 3750 | handle_encrypted_message (struct Neighbour *n, const struct EncryptedMessage *m, |
3751 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 3751 | const struct GNUNET_ATS_Information *ats, |
3752 | uint32_t ats_count) | 3752 | uint32_t ats_count) |
3753 | { | 3753 | { |
3754 | size_t size = ntohs (m->header.size); | 3754 | size_t size = ntohs (m->header.size); |
@@ -3908,7 +3908,7 @@ handle_encrypted_message (struct Neighbour *n, const struct EncryptedMessage *m, | |||
3908 | static void | 3908 | static void |
3909 | handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 3909 | handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
3910 | const struct GNUNET_MessageHeader *message, | 3910 | const struct GNUNET_MessageHeader *message, |
3911 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 3911 | const struct GNUNET_ATS_Information *ats, |
3912 | uint32_t ats_count) | 3912 | uint32_t ats_count) |
3913 | { | 3913 | { |
3914 | struct Neighbour *n; | 3914 | struct Neighbour *n; |
@@ -4171,7 +4171,7 @@ neighbour_quota_update (void *cls, | |||
4171 | static void | 4171 | static void |
4172 | handle_transport_notify_connect (void *cls, | 4172 | handle_transport_notify_connect (void *cls, |
4173 | const struct GNUNET_PeerIdentity *peer, | 4173 | const struct GNUNET_PeerIdentity *peer, |
4174 | const struct GNUNET_TRANSPORT_ATS_Information | 4174 | const struct GNUNET_ATS_Information |
4175 | *ats, uint32_t ats_count) | 4175 | *ats, uint32_t ats_count) |
4176 | { | 4176 | { |
4177 | struct Neighbour *n; | 4177 | 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) | |||
616 | void | 616 | void |
617 | GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, | 617 | GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, |
618 | const struct GNUNET_PeerIdentity *neighbour, | 618 | const struct GNUNET_PeerIdentity *neighbour, |
619 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 619 | const struct GNUNET_ATS_Information *atsi, |
620 | unsigned int atsi_count, | 620 | unsigned int atsi_count, |
621 | const struct GSC_TypeMap *tmap_old, | 621 | const struct GSC_TypeMap *tmap_old, |
622 | const struct GSC_TypeMap *tmap_new) | 622 | const struct GSC_TypeMap *tmap_new) |
@@ -624,7 +624,7 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, | |||
624 | struct ConnectNotifyMessage *cnm; | 624 | struct ConnectNotifyMessage *cnm; |
625 | size_t size; | 625 | size_t size; |
626 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; | 626 | char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1]; |
627 | struct GNUNET_TRANSPORT_ATS_Information *a; | 627 | struct GNUNET_ATS_Information *a; |
628 | struct DisconnectNotifyMessage dcm; | 628 | struct DisconnectNotifyMessage dcm; |
629 | int old_match; | 629 | int old_match; |
630 | int new_match; | 630 | int new_match; |
@@ -640,7 +640,7 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, | |||
640 | /* send connect */ | 640 | /* send connect */ |
641 | size = | 641 | size = |
642 | sizeof (struct ConnectNotifyMessage) + | 642 | sizeof (struct ConnectNotifyMessage) + |
643 | (atsi_count) * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 643 | (atsi_count) * sizeof (struct GNUNET_ATS_Information); |
644 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 644 | if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) |
645 | { | 645 | { |
646 | GNUNET_break (0); | 646 | GNUNET_break (0); |
@@ -654,8 +654,8 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, | |||
654 | cnm->ats_count = htonl (atsi_count); | 654 | cnm->ats_count = htonl (atsi_count); |
655 | a = &cnm->ats; | 655 | a = &cnm->ats; |
656 | memcpy (a, atsi, | 656 | memcpy (a, atsi, |
657 | sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count); | 657 | sizeof (struct GNUNET_ATS_Information) * atsi_count); |
658 | a[atsi_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 658 | a[atsi_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
659 | a[atsi_count].value = htonl (0); | 659 | a[atsi_count].value = htonl (0); |
660 | #if DEBUG_CORE | 660 | #if DEBUG_CORE |
661 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 661 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -690,7 +690,7 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, | |||
690 | */ | 690 | */ |
691 | void | 691 | void |
692 | GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *neighbour, | 692 | GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *neighbour, |
693 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 693 | const struct GNUNET_ATS_Information *atsi, |
694 | unsigned int atsi_count, | 694 | unsigned int atsi_count, |
695 | const struct GSC_TypeMap *tmap_old, | 695 | const struct GSC_TypeMap *tmap_old, |
696 | const struct GSC_TypeMap *tmap_new) | 696 | const struct GSC_TypeMap *tmap_new) |
@@ -719,17 +719,17 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *ne | |||
719 | */ | 719 | */ |
720 | void | 720 | void |
721 | GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender, | 721 | GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender, |
722 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 722 | const struct GNUNET_ATS_Information *atsi, |
723 | unsigned int atsi_count, | 723 | unsigned int atsi_count, |
724 | const struct GNUNET_MessageHeader *msg, | 724 | const struct GNUNET_MessageHeader *msg, |
725 | uint16_t msize, | 725 | uint16_t msize, |
726 | int options) | 726 | int options) |
727 | { | 727 | { |
728 | size_t size = msize + sizeof (struct NotifyTrafficMessage) + | 728 | size_t size = msize + sizeof (struct NotifyTrafficMessage) + |
729 | atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 729 | atsi_count * sizeof (struct GNUNET_ATS_Information); |
730 | char buf[size]; | 730 | char buf[size]; |
731 | struct NotifyTrafficMessage *ntm; | 731 | struct NotifyTrafficMessage *ntm; |
732 | struct GNUNET_TRANSPORT_ATS_Information *a; | 732 | struct GNUNET_ATS_Information *a; |
733 | 733 | ||
734 | if (0 == options) | 734 | if (0 == options) |
735 | { | 735 | { |
@@ -759,8 +759,8 @@ GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender, | |||
759 | ntm->peer = *sender; | 759 | ntm->peer = *sender; |
760 | a = &ntm->ats; | 760 | a = &ntm->ats; |
761 | memcpy (a, atsi, | 761 | memcpy (a, atsi, |
762 | sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count); | 762 | sizeof (struct GNUNET_ATS_Information) * atsi_count); |
763 | a[atsi_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 763 | a[atsi_count].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
764 | a[atsi_count].value = htonl (0); | 764 | a[atsi_count].value = htonl (0); |
765 | memcpy (&a[atsi_count + 1], msg, msize); | 765 | memcpy (&a[atsi_count + 1], msg, msize); |
766 | send_to_all_clients (&ntm->header, GNUNET_YES, | 766 | 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, | |||
60 | void | 60 | void |
61 | GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, | 61 | GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, |
62 | const struct GNUNET_PeerIdentity *neighbour, | 62 | const struct GNUNET_PeerIdentity *neighbour, |
63 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 63 | const struct GNUNET_ATS_Information *atsi, |
64 | unsigned int atsi_count, | 64 | unsigned int atsi_count, |
65 | const struct GSC_TypeMap *tmap_old, | 65 | const struct GSC_TypeMap *tmap_old, |
66 | const struct GSC_TypeMap *tmap_new); | 66 | const struct GSC_TypeMap *tmap_new); |
@@ -79,7 +79,7 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, | |||
79 | */ | 79 | */ |
80 | void | 80 | void |
81 | GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *neighbour, | 81 | GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *neighbour, |
82 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 82 | const struct GNUNET_ATS_Information *atsi, |
83 | unsigned int atsi_count, | 83 | unsigned int atsi_count, |
84 | const struct GSC_TypeMap *tmap_old, | 84 | const struct GSC_TypeMap *tmap_old, |
85 | const struct GSC_TypeMap *tmap_new); | 85 | const struct GSC_TypeMap *tmap_new); |
@@ -100,7 +100,7 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *ne | |||
100 | */ | 100 | */ |
101 | void | 101 | void |
102 | GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender, | 102 | GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender, |
103 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 103 | const struct GNUNET_ATS_Information *atsi, |
104 | unsigned int atsi_count, | 104 | unsigned int atsi_count, |
105 | const struct GNUNET_MessageHeader *msg, | 105 | const struct GNUNET_MessageHeader *msg, |
106 | uint16_t msize, | 106 | 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 | |||
1301 | /** | 1301 | /** |
1302 | * Performance information for the connection. | 1302 | * Performance information for the connection. |
1303 | */ | 1303 | */ |
1304 | const struct GNUNET_TRANSPORT_ATS_Information *atsi; | 1304 | const struct GNUNET_ATS_Information *atsi; |
1305 | 1305 | ||
1306 | /** | 1306 | /** |
1307 | * Sender of the message. | 1307 | * Sender of the message. |
@@ -1327,7 +1327,7 @@ struct DeliverMessageContext | |||
1327 | void | 1327 | void |
1328 | GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx, | 1328 | GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx, |
1329 | const struct GNUNET_MessageHeader *msg, | 1329 | const struct GNUNET_MessageHeader *msg, |
1330 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 1330 | const struct GNUNET_ATS_Information *atsi, |
1331 | uint32_t atsi_count) | 1331 | uint32_t atsi_count) |
1332 | { | 1332 | { |
1333 | const struct EncryptedMessage *m; | 1333 | 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, | |||
96 | void | 96 | void |
97 | GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx, | 97 | GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx, |
98 | const struct GNUNET_MessageHeader *msg, | 98 | const struct GNUNET_MessageHeader *msg, |
99 | const struct GNUNET_TRANSPORT_ATS_Information *atsi, | 99 | const struct GNUNET_ATS_Information *atsi, |
100 | uint32_t atsi_count); | 100 | uint32_t atsi_count); |
101 | 101 | ||
102 | 102 | ||
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) | |||
309 | static void | 309 | static void |
310 | handle_transport_notify_connect (void *cls, | 310 | handle_transport_notify_connect (void *cls, |
311 | const struct GNUNET_PeerIdentity *peer, | 311 | const struct GNUNET_PeerIdentity *peer, |
312 | const struct GNUNET_TRANSPORT_ATS_Information | 312 | const struct GNUNET_ATS_Information |
313 | *ats, uint32_t ats_count) | 313 | *ats, uint32_t ats_count) |
314 | { | 314 | { |
315 | struct Neighbour *n; | 315 | struct Neighbour *n; |
@@ -383,7 +383,7 @@ handle_transport_notify_disconnect (void *cls, | |||
383 | static void | 383 | static void |
384 | handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 384 | handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
385 | const struct GNUNET_MessageHeader *message, | 385 | const struct GNUNET_MessageHeader *message, |
386 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 386 | const struct GNUNET_ATS_Information *ats, |
387 | uint32_t ats_count) | 387 | uint32_t ats_count) |
388 | { | 388 | { |
389 | struct Neighbour *n; | 389 | 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) | |||
632 | struct GNUNET_SERVER_TransmitContext *tc = cls; | 632 | struct GNUNET_SERVER_TransmitContext *tc = cls; |
633 | struct Session *session = value; | 633 | struct Session *session = value; |
634 | struct ConnectNotifyMessage cnm; | 634 | struct ConnectNotifyMessage cnm; |
635 | struct GNUNET_TRANSPORT_ATS_Information *a; | 635 | struct GNUNET_ATS_Information *a; |
636 | 636 | ||
637 | /* FIXME: code duplication with clients... */ | 637 | /* FIXME: code duplication with clients... */ |
638 | cnm.header.size = htons (sizeof (struct ConnectNotifyMessage)); | 638 | cnm.header.size = htons (sizeof (struct ConnectNotifyMessage)); |
@@ -641,7 +641,7 @@ queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value) | |||
641 | cnm.peer = session->peer; | 641 | cnm.peer = session->peer; |
642 | a = &cnm.ats; | 642 | a = &cnm.ats; |
643 | // FIXME: full ats... | 643 | // FIXME: full ats... |
644 | a[0].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 644 | a[0].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
645 | a[0].value = htonl (0); | 645 | a[0].value = htonl (0); |
646 | GNUNET_SERVER_transmit_context_append_message (tc, &cnm.header); | 646 | GNUNET_SERVER_transmit_context_append_message (tc, &cnm.header); |
647 | return GNUNET_OK; | 647 | 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) | |||
165 | 165 | ||
166 | static void | 166 | static void |
167 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | 167 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, |
168 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 168 | const struct GNUNET_ATS_Information *atsi) |
169 | { | 169 | { |
170 | struct PeerContext *pc = cls; | 170 | struct PeerContext *pc = cls; |
171 | 171 | ||
@@ -218,7 +218,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
218 | static int | 218 | static int |
219 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 219 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
220 | const struct GNUNET_MessageHeader *message, | 220 | const struct GNUNET_MessageHeader *message, |
221 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 221 | const struct GNUNET_ATS_Information *atsi) |
222 | { | 222 | { |
223 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 223 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
224 | "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other)); | 224 | "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other)); |
@@ -229,7 +229,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | |||
229 | static int | 229 | static int |
230 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 230 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
231 | const struct GNUNET_MessageHeader *message, | 231 | const struct GNUNET_MessageHeader *message, |
232 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 232 | const struct GNUNET_ATS_Information *atsi) |
233 | { | 233 | { |
234 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 234 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
235 | "Core notifies about outbound data for `%4s'.\n", | 235 | "Core notifies about outbound data for `%4s'.\n", |
@@ -242,7 +242,7 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | |||
242 | static int | 242 | static int |
243 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | 243 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
244 | const struct GNUNET_MessageHeader *message, | 244 | const struct GNUNET_MessageHeader *message, |
245 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 245 | const struct GNUNET_ATS_Information *atsi) |
246 | { | 246 | { |
247 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving message from `%4s'.\n", | 247 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving message from `%4s'.\n", |
248 | GNUNET_i2s (peer)); | 248 | 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) | |||
225 | 225 | ||
226 | static void | 226 | static void |
227 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | 227 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, |
228 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 228 | const struct GNUNET_ATS_Information *atsi) |
229 | { | 229 | { |
230 | struct PeerContext *pc = cls; | 230 | struct PeerContext *pc = cls; |
231 | 231 | ||
@@ -270,7 +270,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
270 | static int | 270 | static int |
271 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 271 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
272 | const struct GNUNET_MessageHeader *message, | 272 | const struct GNUNET_MessageHeader *message, |
273 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 273 | const struct GNUNET_ATS_Information *atsi) |
274 | { | 274 | { |
275 | #if VERBOSE | 275 | #if VERBOSE |
276 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 276 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -283,7 +283,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | |||
283 | static int | 283 | static int |
284 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 284 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
285 | const struct GNUNET_MessageHeader *message, | 285 | const struct GNUNET_MessageHeader *message, |
286 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 286 | const struct GNUNET_ATS_Information *atsi) |
287 | { | 287 | { |
288 | #if VERBOSE | 288 | #if VERBOSE |
289 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 289 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -300,7 +300,7 @@ transmit_ready (void *cls, size_t size, void *buf); | |||
300 | static int | 300 | static int |
301 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | 301 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
302 | const struct GNUNET_MessageHeader *message, | 302 | const struct GNUNET_MessageHeader *message, |
303 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 303 | const struct GNUNET_ATS_Information *atsi) |
304 | { | 304 | { |
305 | static int n; | 305 | static int n; |
306 | unsigned int s; | 306 | 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) | |||
90 | static int | 90 | static int |
91 | receive (void *cls, const struct GNUNET_PeerIdentity *other, | 91 | receive (void *cls, const struct GNUNET_PeerIdentity *other, |
92 | const struct GNUNET_MessageHeader *message, | 92 | const struct GNUNET_MessageHeader *message, |
93 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 93 | const struct GNUNET_ATS_Information *atsi) |
94 | { | 94 | { |
95 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 95 | if (die_task != GNUNET_SCHEDULER_NO_TASK) |
96 | GNUNET_SCHEDULER_cancel (die_task); | 96 | GNUNET_SCHEDULER_cancel (die_task); |
@@ -134,7 +134,7 @@ init (void *cls, struct GNUNET_CORE_Handle *core, | |||
134 | 134 | ||
135 | static void | 135 | static void |
136 | connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer, | 136 | connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer, |
137 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 137 | const struct GNUNET_ATS_Information *atsi) |
138 | { | 138 | { |
139 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %s.\n", | 139 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %s.\n", |
140 | GNUNET_i2s (peer)); | 140 | 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; | |||
67 | 67 | ||
68 | static void | 68 | static void |
69 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | 69 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, |
70 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 70 | const struct GNUNET_ATS_Information *atsi) |
71 | { | 71 | { |
72 | } | 72 | } |
73 | 73 | ||
@@ -81,7 +81,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
81 | static int | 81 | static int |
82 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 82 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
83 | const struct GNUNET_MessageHeader *message, | 83 | const struct GNUNET_MessageHeader *message, |
84 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 84 | const struct GNUNET_ATS_Information *atsi) |
85 | { | 85 | { |
86 | return GNUNET_OK; | 86 | return GNUNET_OK; |
87 | } | 87 | } |
@@ -90,7 +90,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | |||
90 | static int | 90 | static int |
91 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 91 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
92 | const struct GNUNET_MessageHeader *message, | 92 | const struct GNUNET_MessageHeader *message, |
93 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 93 | const struct GNUNET_ATS_Information *atsi) |
94 | { | 94 | { |
95 | return GNUNET_OK; | 95 | return GNUNET_OK; |
96 | } | 96 | } |
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) | |||
358 | 358 | ||
359 | static void | 359 | static void |
360 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | 360 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, |
361 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 361 | const struct GNUNET_ATS_Information *atsi) |
362 | { | 362 | { |
363 | struct PeerContext *pc = cls; | 363 | struct PeerContext *pc = cls; |
364 | 364 | ||
@@ -418,7 +418,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
418 | static int | 418 | static int |
419 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 419 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
420 | const struct GNUNET_MessageHeader *message, | 420 | const struct GNUNET_MessageHeader *message, |
421 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 421 | const struct GNUNET_ATS_Information *atsi) |
422 | { | 422 | { |
423 | #if DEBUG_TRANSMISSION | 423 | #if DEBUG_TRANSMISSION |
424 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 424 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -433,7 +433,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | |||
433 | static int | 433 | static int |
434 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 434 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
435 | const struct GNUNET_MessageHeader *message, | 435 | const struct GNUNET_MessageHeader *message, |
436 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 436 | const struct GNUNET_ATS_Information *atsi) |
437 | { | 437 | { |
438 | #if DEBUG_TRANSMISSION | 438 | #if DEBUG_TRANSMISSION |
439 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 439 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -450,7 +450,7 @@ transmit_ready (void *cls, size_t size, void *buf); | |||
450 | static int | 450 | static int |
451 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | 451 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
452 | const struct GNUNET_MessageHeader *message, | 452 | const struct GNUNET_MessageHeader *message, |
453 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 453 | const struct GNUNET_ATS_Information *atsi) |
454 | { | 454 | { |
455 | static int n; | 455 | static int n; |
456 | const struct TestMessage *hdr; | 456 | 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, | |||
603 | */ | 603 | */ |
604 | static void | 604 | static void |
605 | handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 605 | handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
606 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 606 | const struct GNUNET_ATS_Information *atsi) |
607 | { | 607 | { |
608 | struct PeerInfo *ret; | 608 | struct PeerInfo *ret; |
609 | int peer_bucket; | 609 | int peer_bucket; |
@@ -1515,7 +1515,7 @@ static int | |||
1515 | handle_dht_p2p_put (void *cls, | 1515 | handle_dht_p2p_put (void *cls, |
1516 | const struct GNUNET_PeerIdentity *peer, | 1516 | const struct GNUNET_PeerIdentity *peer, |
1517 | const struct GNUNET_MessageHeader *message, | 1517 | const struct GNUNET_MessageHeader *message, |
1518 | const struct GNUNET_TRANSPORT_ATS_Information | 1518 | const struct GNUNET_ATS_Information |
1519 | *atsi) | 1519 | *atsi) |
1520 | { | 1520 | { |
1521 | const struct PeerPutMessage *put; | 1521 | const struct PeerPutMessage *put; |
@@ -1735,7 +1735,7 @@ handle_find_peer (const struct GNUNET_PeerIdentity *sender, | |||
1735 | static int | 1735 | static int |
1736 | handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer, | 1736 | handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer, |
1737 | const struct GNUNET_MessageHeader *message, | 1737 | const struct GNUNET_MessageHeader *message, |
1738 | const struct GNUNET_TRANSPORT_ATS_Information | 1738 | const struct GNUNET_ATS_Information |
1739 | *atsi) | 1739 | *atsi) |
1740 | { | 1740 | { |
1741 | struct PeerGetMessage *get; | 1741 | struct PeerGetMessage *get; |
@@ -1870,7 +1870,7 @@ handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1870 | static int | 1870 | static int |
1871 | handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer, | 1871 | handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer, |
1872 | const struct GNUNET_MessageHeader *message, | 1872 | const struct GNUNET_MessageHeader *message, |
1873 | const struct GNUNET_TRANSPORT_ATS_Information | 1873 | const struct GNUNET_ATS_Information |
1874 | *atsi) | 1874 | *atsi) |
1875 | { | 1875 | { |
1876 | const struct PeerResultMessage *prm; | 1876 | 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) | |||
1347 | * @return connected transport distance | 1347 | * @return connected transport distance |
1348 | */ | 1348 | */ |
1349 | static uint32_t | 1349 | static uint32_t |
1350 | get_atsi_distance (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1350 | get_atsi_distance (const struct GNUNET_ATS_Information *atsi) |
1351 | { | 1351 | { |
1352 | while ((ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && | 1352 | while ((ntohl (atsi->type) != GNUNET_ATS_ARRAY_TERMINATOR) && |
1353 | (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE)) | 1353 | (ntohl (atsi->type) != GNUNET_ATS_QUALITY_NET_DISTANCE)) |
1354 | atsi++; | 1354 | atsi++; |
1355 | if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) | 1355 | if (ntohl (atsi->type) == GNUNET_ATS_ARRAY_TERMINATOR) |
1356 | { | 1356 | { |
1357 | GNUNET_break (0); | 1357 | GNUNET_break (0); |
1358 | /* FIXME: we do not have distance data? Assume direct neighbor. */ | 1358 | /* FIXME: we do not have distance data? Assume direct neighbor. */ |
@@ -1368,12 +1368,12 @@ get_atsi_distance (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | |||
1368 | * @return connection latency | 1368 | * @return connection latency |
1369 | */ | 1369 | */ |
1370 | static struct GNUNET_TIME_Relative | 1370 | static struct GNUNET_TIME_Relative |
1371 | get_atsi_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1371 | get_atsi_latency (const struct GNUNET_ATS_Information *atsi) |
1372 | { | 1372 | { |
1373 | while ((ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && | 1373 | while ((ntohl (atsi->type) != GNUNET_ATS_ARRAY_TERMINATOR) && |
1374 | (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY)) | 1374 | (ntohl (atsi->type) != GNUNET_ATS_QUALITY_NET_DELAY)) |
1375 | atsi++; | 1375 | atsi++; |
1376 | if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) | 1376 | if (ntohl (atsi->type) == GNUNET_ATS_ARRAY_TERMINATOR) |
1377 | { | 1377 | { |
1378 | GNUNET_break (0); | 1378 | GNUNET_break (0); |
1379 | /* how can we not have latency data? */ | 1379 | /* how can we not have latency data? */ |
@@ -1398,7 +1398,7 @@ get_atsi_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | |||
1398 | static int | 1398 | static int |
1399 | handle_dv_data_message (void *cls, const struct GNUNET_PeerIdentity *peer, | 1399 | handle_dv_data_message (void *cls, const struct GNUNET_PeerIdentity *peer, |
1400 | const struct GNUNET_MessageHeader *message, | 1400 | const struct GNUNET_MessageHeader *message, |
1401 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1401 | const struct GNUNET_ATS_Information *atsi) |
1402 | { | 1402 | { |
1403 | const p2p_dv_MESSAGE_Data *incoming = (const p2p_dv_MESSAGE_Data *) message; | 1403 | const p2p_dv_MESSAGE_Data *incoming = (const p2p_dv_MESSAGE_Data *) message; |
1404 | const struct GNUNET_MessageHeader *packed_message; | 1404 | const struct GNUNET_MessageHeader *packed_message; |
@@ -2075,12 +2075,12 @@ handle_dv_send_message (void *cls, struct GNUNET_SERVER_Client *client, | |||
2075 | static int | 2075 | static int |
2076 | handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer, | 2076 | handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer, |
2077 | const struct GNUNET_MessageHeader *message, | 2077 | const struct GNUNET_MessageHeader *message, |
2078 | const struct GNUNET_TRANSPORT_ATS_Information *atsi); | 2078 | const struct GNUNET_ATS_Information *atsi); |
2079 | 2079 | ||
2080 | static int | 2080 | static int |
2081 | handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer, | 2081 | handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer, |
2082 | const struct GNUNET_MessageHeader *message, | 2082 | const struct GNUNET_MessageHeader *message, |
2083 | const struct GNUNET_TRANSPORT_ATS_Information | 2083 | const struct GNUNET_ATS_Information |
2084 | *atsi); | 2084 | *atsi); |
2085 | /** End forward declarations **/ | 2085 | /** End forward declarations **/ |
2086 | 2086 | ||
@@ -2649,19 +2649,19 @@ addUpdateNeighbor (const struct GNUNET_PeerIdentity *peer, | |||
2649 | "%s: learned about peer %llu from which we have a previous unknown message, processing!\n", | 2649 | "%s: learned about peer %llu from which we have a previous unknown message, processing!\n", |
2650 | my_short_id, referrer_peer_id); | 2650 | my_short_id, referrer_peer_id); |
2651 | #endif | 2651 | #endif |
2652 | struct GNUNET_TRANSPORT_ATS_Information atsi[3]; | 2652 | struct GNUNET_ATS_Information atsi[3]; |
2653 | 2653 | ||
2654 | atsi[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); | 2654 | atsi[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
2655 | atsi[0].value = htonl (referrer->pending_messages[i].distance); | 2655 | atsi[0].value = htonl (referrer->pending_messages[i].distance); |
2656 | atsi[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY); | 2656 | atsi[1].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY); |
2657 | atsi[1].value = | 2657 | atsi[1].value = |
2658 | htonl ((uint32_t) referrer->pending_messages[i]. | 2658 | htonl ((uint32_t) referrer->pending_messages[i]. |
2659 | latency.rel_value); | 2659 | latency.rel_value); |
2660 | atsi[2].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 2660 | atsi[2].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
2661 | atsi[2].value = htonl (0); | 2661 | atsi[2].value = htonl (0); |
2662 | handle_dv_data_message (NULL, &referrer->pending_messages[i].sender, | 2662 | handle_dv_data_message (NULL, &referrer->pending_messages[i].sender, |
2663 | referrer->pending_messages[i].message, | 2663 | referrer->pending_messages[i].message, |
2664 | (const struct GNUNET_TRANSPORT_ATS_Information | 2664 | (const struct GNUNET_ATS_Information |
2665 | *) &atsi); | 2665 | *) &atsi); |
2666 | GNUNET_free (referrer->pending_messages[i].message); | 2666 | GNUNET_free (referrer->pending_messages[i].message); |
2667 | referrer->pending_messages[i].sender_id = 0; | 2667 | referrer->pending_messages[i].sender_id = 0; |
@@ -2732,7 +2732,7 @@ addUpdateNeighbor (const struct GNUNET_PeerIdentity *peer, | |||
2732 | static int | 2732 | static int |
2733 | handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer, | 2733 | handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer, |
2734 | const struct GNUNET_MessageHeader *message, | 2734 | const struct GNUNET_MessageHeader *message, |
2735 | const struct GNUNET_TRANSPORT_ATS_Information | 2735 | const struct GNUNET_ATS_Information |
2736 | *atsi) | 2736 | *atsi) |
2737 | { | 2737 | { |
2738 | struct DirectNeighbor *referrer; | 2738 | struct DirectNeighbor *referrer; |
@@ -2781,7 +2781,7 @@ handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2781 | static int | 2781 | static int |
2782 | handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer, | 2782 | handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer, |
2783 | const struct GNUNET_MessageHeader *message, | 2783 | const struct GNUNET_MessageHeader *message, |
2784 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 2784 | const struct GNUNET_ATS_Information *atsi) |
2785 | { | 2785 | { |
2786 | struct DirectNeighbor *referrer; | 2786 | struct DirectNeighbor *referrer; |
2787 | p2p_dv_MESSAGE_NeighborInfo *enc_message = | 2787 | p2p_dv_MESSAGE_NeighborInfo *enc_message = |
@@ -3082,7 +3082,7 @@ process_peerinfo (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
3082 | */ | 3082 | */ |
3083 | static void | 3083 | static void |
3084 | handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 3084 | handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
3085 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 3085 | const struct GNUNET_ATS_Information *atsi) |
3086 | { | 3086 | { |
3087 | struct DirectNeighbor *neighbor; | 3087 | struct DirectNeighbor *neighbor; |
3088 | struct DistantNeighbor *about; | 3088 | 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, | |||
162 | distance); | 162 | distance); |
163 | GNUNET_free_non_null (my_id); | 163 | GNUNET_free_non_null (my_id); |
164 | #endif | 164 | #endif |
165 | struct GNUNET_TRANSPORT_ATS_Information ats[2]; | 165 | struct GNUNET_ATS_Information ats[2]; |
166 | 166 | ||
167 | ats[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); | 167 | ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
168 | ats[0].value = htonl (distance); | 168 | ats[0].value = htonl (distance); |
169 | ats[1].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 169 | ats[1].type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); |
170 | ats[1].value = htonl (0); | 170 | ats[1].value = htonl (0); |
171 | 171 | ||
172 | plugin->env->receive (plugin->env->cls, sender, | 172 | plugin->env->receive (plugin->env->cls, sender, |
173 | (struct GNUNET_MessageHeader *) msg, | 173 | (struct GNUNET_MessageHeader *) msg, |
174 | (const struct GNUNET_TRANSPORT_ATS_Information *) &ats, | 174 | (const struct GNUNET_ATS_Information *) &ats, |
175 | 2, NULL, sender_address, sender_address_len); | 175 | 2, NULL, sender_address, sender_address_len); |
176 | 176 | ||
177 | } | 177 | } |
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); | |||
394 | * @return connected transport distance | 394 | * @return connected transport distance |
395 | */ | 395 | */ |
396 | static uint32_t | 396 | static uint32_t |
397 | get_atsi_distance (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 397 | get_atsi_distance (const struct GNUNET_ATS_Information *atsi) |
398 | { | 398 | { |
399 | while ((ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && | 399 | while ((ntohl (atsi->type) != GNUNET_ATS_ARRAY_TERMINATOR) && |
400 | (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE)) | 400 | (ntohl (atsi->type) != GNUNET_ATS_QUALITY_NET_DISTANCE)) |
401 | atsi++; | 401 | atsi++; |
402 | if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) | 402 | if (ntohl (atsi->type) == GNUNET_ATS_ARRAY_TERMINATOR) |
403 | { | 403 | { |
404 | GNUNET_break (0); | 404 | GNUNET_break (0); |
405 | /* FIXME: we do not have distance data? Assume direct neighbor. */ | 405 | /* FIXME: we do not have distance data? Assume direct neighbor. */ |
@@ -411,7 +411,7 @@ get_atsi_distance (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | |||
411 | static int | 411 | static int |
412 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | 412 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
413 | const struct GNUNET_MessageHeader *message, | 413 | const struct GNUNET_MessageHeader *message, |
414 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 414 | const struct GNUNET_ATS_Information *atsi) |
415 | { | 415 | { |
416 | struct TestMessageContext *pos = cls; | 416 | struct TestMessageContext *pos = cls; |
417 | struct GNUNET_TestMessage *msg = (struct GNUNET_TestMessage *) message; | 417 | struct GNUNET_TestMessage *msg = (struct GNUNET_TestMessage *) message; |
@@ -527,7 +527,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = { | |||
527 | */ | 527 | */ |
528 | static void | 528 | static void |
529 | connect_notify_peer2 (void *cls, const struct GNUNET_PeerIdentity *peer, | 529 | connect_notify_peer2 (void *cls, const struct GNUNET_PeerIdentity *peer, |
530 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 530 | const struct GNUNET_ATS_Information *atsi) |
531 | { | 531 | { |
532 | struct TestMessageContext *pos = cls; | 532 | struct TestMessageContext *pos = cls; |
533 | 533 | ||
@@ -580,7 +580,7 @@ init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server, | |||
580 | */ | 580 | */ |
581 | static void | 581 | static void |
582 | connect_notify_peer1 (void *cls, const struct GNUNET_PeerIdentity *peer, | 582 | connect_notify_peer1 (void *cls, const struct GNUNET_PeerIdentity *peer, |
583 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 583 | const struct GNUNET_ATS_Information *atsi) |
584 | { | 584 | { |
585 | struct TestMessageContext *pos = cls; | 585 | struct TestMessageContext *pos = cls; |
586 | 586 | ||
@@ -840,7 +840,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
840 | */ | 840 | */ |
841 | static void | 841 | static void |
842 | all_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 842 | all_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, |
843 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 843 | const struct GNUNET_ATS_Information *atsi) |
844 | { | 844 | { |
845 | struct GNUNET_TESTING_Daemon *d = cls; | 845 | struct GNUNET_TESTING_Daemon *d = cls; |
846 | struct GNUNET_TESTING_Daemon *second_daemon; | 846 | 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) | |||
226 | static int | 226 | static int |
227 | handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, | 227 | handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, |
228 | const struct GNUNET_MessageHeader *message, | 228 | const struct GNUNET_MessageHeader *message, |
229 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 229 | const struct GNUNET_ATS_Information *atsi) |
230 | { | 230 | { |
231 | struct GSF_ConnectedPeer *cp; | 231 | struct GSF_ConnectedPeer *cp; |
232 | 232 | ||
@@ -296,7 +296,7 @@ consider_forwarding (void *cls, struct GSF_PendingRequest *pr, | |||
296 | static int | 296 | static int |
297 | handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, | 297 | handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, |
298 | const struct GNUNET_MessageHeader *message, | 298 | const struct GNUNET_MessageHeader *message, |
299 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 299 | const struct GNUNET_ATS_Information *atsi) |
300 | { | 300 | { |
301 | struct GSF_PendingRequest *pr; | 301 | struct GSF_PendingRequest *pr; |
302 | 302 | ||
@@ -439,7 +439,7 @@ consider_peer_for_forwarding (void *cls, const GNUNET_HashCode * key, | |||
439 | */ | 439 | */ |
440 | static void | 440 | static void |
441 | peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 441 | peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, |
442 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 442 | const struct GNUNET_ATS_Information *atsi) |
443 | { | 443 | { |
444 | struct GSF_ConnectedPeer *cp; | 444 | struct GSF_ConnectedPeer *cp; |
445 | 445 | ||
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) | |||
331 | * @return connection latency | 331 | * @return connection latency |
332 | */ | 332 | */ |
333 | static struct GNUNET_TIME_Relative | 333 | static struct GNUNET_TIME_Relative |
334 | get_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 334 | get_latency (const struct GNUNET_ATS_Information *atsi) |
335 | { | 335 | { |
336 | if (atsi == NULL) | 336 | if (atsi == NULL) |
337 | return GNUNET_TIME_UNIT_SECONDS; | 337 | return GNUNET_TIME_UNIT_SECONDS; |
338 | while ((ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) && | 338 | while ((ntohl (atsi->type) != GNUNET_ATS_ARRAY_TERMINATOR) && |
339 | (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY)) | 339 | (ntohl (atsi->type) != GNUNET_ATS_QUALITY_NET_DELAY)) |
340 | atsi++; | 340 | atsi++; |
341 | if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) | 341 | if (ntohl (atsi->type) == GNUNET_ATS_ARRAY_TERMINATOR) |
342 | { | 342 | { |
343 | /* We sometime have no latency data, i.e. if the address came from | 343 | /* We sometime have no latency data, i.e. if the address came from |
344 | peerinfo and we never had a chance to play transport-level | 344 | peerinfo and we never had a chance to play transport-level |
@@ -358,7 +358,7 @@ get_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | |||
358 | */ | 358 | */ |
359 | static void | 359 | static void |
360 | update_atsi (struct GSF_ConnectedPeer *cp, | 360 | update_atsi (struct GSF_ConnectedPeer *cp, |
361 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 361 | const struct GNUNET_ATS_Information *atsi) |
362 | { | 362 | { |
363 | struct GNUNET_TIME_Relative latency; | 363 | struct GNUNET_TIME_Relative latency; |
364 | 364 | ||
@@ -584,7 +584,7 @@ ats_reserve_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
584 | */ | 584 | */ |
585 | struct GSF_ConnectedPeer * | 585 | struct GSF_ConnectedPeer * |
586 | GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer, | 586 | GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer, |
587 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 587 | const struct GNUNET_ATS_Information *atsi) |
588 | { | 588 | { |
589 | struct GSF_ConnectedPeer *cp; | 589 | struct GSF_ConnectedPeer *cp; |
590 | char *fn; | 590 | char *fn; |
@@ -669,7 +669,7 @@ int | |||
669 | GSF_handle_p2p_migration_stop_ (void *cls, | 669 | GSF_handle_p2p_migration_stop_ (void *cls, |
670 | const struct GNUNET_PeerIdentity *other, | 670 | const struct GNUNET_PeerIdentity *other, |
671 | const struct GNUNET_MessageHeader *message, | 671 | const struct GNUNET_MessageHeader *message, |
672 | const struct GNUNET_TRANSPORT_ATS_Information | 672 | const struct GNUNET_ATS_Information |
673 | *atsi) | 673 | *atsi) |
674 | { | 674 | { |
675 | struct GSF_ConnectedPeer *cp; | 675 | 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 | |||
39 | /** | 39 | /** |
40 | * Transport performance data. | 40 | * Transport performance data. |
41 | */ | 41 | */ |
42 | struct GNUNET_TRANSPORT_ATS_Information *atsi; | 42 | struct GNUNET_ATS_Information *atsi; |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * List of the last clients for which this peer successfully | 45 | * List of the last clients for which this peer successfully |
@@ -172,7 +172,7 @@ struct GSF_PeerTransmitHandle; | |||
172 | */ | 172 | */ |
173 | struct GSF_ConnectedPeer * | 173 | struct GSF_ConnectedPeer * |
174 | GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer, | 174 | GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer, |
175 | const struct GNUNET_TRANSPORT_ATS_Information *atsi); | 175 | const struct GNUNET_ATS_Information *atsi); |
176 | 176 | ||
177 | 177 | ||
178 | /** | 178 | /** |
@@ -267,7 +267,7 @@ int | |||
267 | GSF_handle_p2p_migration_stop_ (void *cls, | 267 | GSF_handle_p2p_migration_stop_ (void *cls, |
268 | const struct GNUNET_PeerIdentity *other, | 268 | const struct GNUNET_PeerIdentity *other, |
269 | const struct GNUNET_MessageHeader *message, | 269 | const struct GNUNET_MessageHeader *message, |
270 | const struct GNUNET_TRANSPORT_ATS_Information | 270 | const struct GNUNET_ATS_Information |
271 | *atsi); | 271 | *atsi); |
272 | 272 | ||
273 | 273 | ||
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, | |||
140 | static int | 140 | static int |
141 | advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 141 | advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer, |
142 | const struct GNUNET_MessageHeader *message, | 142 | const struct GNUNET_MessageHeader *message, |
143 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 143 | const struct GNUNET_ATS_Information *atsi) |
144 | { | 144 | { |
145 | GNUNET_assert (NULL != client_adv_handler); | 145 | GNUNET_assert (NULL != client_adv_handler); |
146 | return (*client_adv_handler) (cls, peer, message, atsi); | 146 | return (*client_adv_handler) (cls, peer, message, atsi); |
@@ -156,7 +156,7 @@ advertisement_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
156 | */ | 156 | */ |
157 | static void | 157 | static void |
158 | connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 158 | connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, |
159 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 159 | const struct GNUNET_ATS_Information *atsi) |
160 | { | 160 | { |
161 | if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity))) | 161 | if (0 == memcmp (&me, peer, sizeof (struct GNUNET_PeerIdentity))) |
162 | return; | 162 | 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) | |||
1110 | */ | 1110 | */ |
1111 | static void | 1111 | static void |
1112 | handler_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 1112 | handler_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
1113 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1113 | const struct GNUNET_ATS_Information *atsi) |
1114 | { | 1114 | { |
1115 | GNUNET_assert (stat_connection_count < UINT_MAX); | 1115 | GNUNET_assert (stat_connection_count < UINT_MAX); |
1116 | stat_connection_count++; | 1116 | stat_connection_count++; |
@@ -1148,7 +1148,7 @@ handler_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
1148 | static int | 1148 | static int |
1149 | handler_advertisement (void *cls, const struct GNUNET_PeerIdentity *peer, | 1149 | handler_advertisement (void *cls, const struct GNUNET_PeerIdentity *peer, |
1150 | const struct GNUNET_MessageHeader *message, | 1150 | const struct GNUNET_MessageHeader *message, |
1151 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1151 | const struct GNUNET_ATS_Information *atsi) |
1152 | { | 1152 | { |
1153 | size_t size; | 1153 | size_t size; |
1154 | size_t uri_size; | 1154 | 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) | |||
365 | */ | 365 | */ |
366 | static void | 366 | static void |
367 | connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 367 | connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, |
368 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 368 | const struct GNUNET_ATS_Information *atsi) |
369 | { | 369 | { |
370 | size_t size; | 370 | size_t size; |
371 | 371 | ||
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) | |||
97 | */ | 97 | */ |
98 | static void | 98 | static void |
99 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 99 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
100 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 100 | const struct GNUNET_ATS_Information *ats, |
101 | uint32_t ats_count) | 101 | uint32_t ats_count) |
102 | { | 102 | { |
103 | if (peer == NULL) | 103 | 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) | |||
298 | static int | 298 | static int |
299 | ad_arrive_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 299 | ad_arrive_handler (void *cls, const struct GNUNET_PeerIdentity *peer, |
300 | const struct GNUNET_MessageHeader *message, | 300 | const struct GNUNET_MessageHeader *message, |
301 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 301 | const struct GNUNET_ATS_Information *atsi) |
302 | { | 302 | { |
303 | char *hostname; | 303 | char *hostname; |
304 | char *expected_uri; | 304 | 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) | |||
108 | */ | 108 | */ |
109 | static void | 109 | static void |
110 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 110 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
111 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 111 | const struct GNUNET_ATS_Information *ats, |
112 | uint32_t ats_count) | 112 | uint32_t ats_count) |
113 | { | 113 | { |
114 | if (peer == NULL) | 114 | 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 @@ | |||
22 | * @brief automatic transport selection and outbound bandwidth determination | 22 | * @brief automatic transport selection and outbound bandwidth determination |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | * @author Matthias Wachs | 24 | * @author Matthias Wachs |
25 | * | ||
26 | * TODO: | ||
27 | * - move GNUNET_TRANSPORT_ATS* in here and rename... | ||
28 | */ | 25 | */ |
29 | #ifndef GNUNET_ATS_SERVICE_H | 26 | #ifndef GNUNET_ATS_SERVICE_H |
30 | #define GNUNET_ATS_SERVICE_H | 27 | #define GNUNET_ATS_SERVICE_H |
31 | 28 | ||
32 | #include "gnunet_constants.h" | 29 | #include "gnunet_constants.h" |
33 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
34 | #include "gnunet_transport_service.h" | 31 | |
35 | #include "gnunet_transport_plugin.h" | 32 | |
33 | /** | ||
34 | * Enum defining all known property types for ATS Enum values are used | ||
35 | * in the GNUNET_ATS_Information struct as | ||
36 | * (key,value)-pairs. | ||
37 | * | ||
38 | * Cost are always stored in uint32_t, so all units used to define costs | ||
39 | * have to be normalized to fit in uint32_t [0 .. 4.294.967.295] | ||
40 | */ | ||
41 | enum GNUNET_ATS_Property | ||
42 | { | ||
43 | |||
44 | /** | ||
45 | * End of the array. | ||
46 | * @deprecated | ||
47 | */ | ||
48 | GNUNET_ATS_ARRAY_TERMINATOR = 0, | ||
49 | |||
50 | /** | ||
51 | * Actual traffic on this connection from the other peer to this peer. | ||
52 | * | ||
53 | * Unit: [bytes/second] | ||
54 | */ | ||
55 | GNUNET_ATS_UTILIZATION_UP, | ||
56 | |||
57 | /** | ||
58 | * Actual traffic on this connection from this peer to the other peer. | ||
59 | * | ||
60 | * Unit: [bytes/second] | ||
61 | */ | ||
62 | GNUNET_ATS_UTILIZATION_DOWN, | ||
63 | |||
64 | /** | ||
65 | * Delay | ||
66 | * Time between when the time packet is sent and the packet arrives | ||
67 | * | ||
68 | * Unit: [ms] | ||
69 | * | ||
70 | * Examples: | ||
71 | * | ||
72 | * LAN : 1 | ||
73 | * WLAN : 2 | ||
74 | * Dialup: 500 | ||
75 | */ | ||
76 | GNUNET_ATS_QUALITY_NET_DELAY, | ||
77 | |||
78 | /** | ||
79 | * Distance on network layer (required for distance-vector routing). | ||
80 | * | ||
81 | * Unit: [DV-hops] | ||
82 | */ | ||
83 | GNUNET_ATS_QUALITY_NET_DISTANCE, | ||
84 | |||
85 | /** | ||
86 | * Network overhead on WAN (Wide-Area Network) | ||
87 | * | ||
88 | * How many bytes are sent on the WAN when 1 kilobyte (1024 bytes) | ||
89 | * of application data is transmitted? | ||
90 | * A factor used with connect cost, bandwidth cost and energy cost | ||
91 | * to describe the overhead produced by the transport protocol | ||
92 | * | ||
93 | * Unit: [bytes/kb] | ||
94 | * | ||
95 | * Interpretation: less is better | ||
96 | * | ||
97 | * Examples: | ||
98 | * | ||
99 | * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb] | ||
100 | * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb] | ||
101 | * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8 = 1090 [bytes/kb] | ||
102 | * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8 = 1110 [bytes/kb] | ||
103 | */ | ||
104 | GNUNET_ATS_COST_WAN, | ||
105 | |||
106 | /** | ||
107 | * Network overhead on LAN (Local-Area Network) | ||
108 | * | ||
109 | * How many bytes are sent on the LAN when 1 kilobyte (1024 bytes) | ||
110 | * of application data is transmitted? | ||
111 | * A factor used with connect cost, bandwidth cost and energy cost | ||
112 | * to describe the overhead produced by the transport protocol | ||
113 | * | ||
114 | * Unit: [bytes/kb] | ||
115 | * | ||
116 | * Interpretation: less is better | ||
117 | * | ||
118 | * Examples: | ||
119 | * | ||
120 | * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb] | ||
121 | * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb] | ||
122 | * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8 = 1090 [bytes/kb] | ||
123 | * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8 = 1110 [bytes/kb] | ||
124 | */ | ||
125 | GNUNET_ATS_COST_LAN, | ||
126 | |||
127 | /** | ||
128 | * Network overhead on WLAN (Wireless Local Area Network) | ||
129 | * | ||
130 | * How many bytes are sent on the LAN when 1 kilobyte (1024 bytes) | ||
131 | * of application data is transmitted? | ||
132 | * A factor used with connect cost, bandwidth cost and energy cost | ||
133 | * to describe the overhead produced by the transport protocol | ||
134 | * | ||
135 | * Unit: [bytes/kb] | ||
136 | * | ||
137 | * Interpretation: less is better | ||
138 | * | ||
139 | * Examples: | ||
140 | * | ||
141 | * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb] | ||
142 | * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb] | ||
143 | * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8 = 1090 [bytes/kb] | ||
144 | * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8 = 1110 [bytes/kb] | ||
145 | */ | ||
146 | GNUNET_ATS_COST_WLAN | ||
147 | |||
148 | |||
149 | |||
150 | /* Cost related values */ | ||
151 | /* =================== */ | ||
152 | |||
153 | /** | ||
154 | * Volume based cost in financial units to transmit data | ||
155 | * | ||
156 | * Note: This value is not bound to a specific currency or unit and only | ||
157 | * used locally. | ||
158 | * "cent" just refers the smallest amount of money in the respective | ||
159 | * currency. | ||
160 | * | ||
161 | * Unit: [cent/MB] | ||
162 | * | ||
163 | * Interpretation: less is better | ||
164 | * | ||
165 | * Examples: | ||
166 | * LAN: 0 [cent/MB] | ||
167 | * 2G : 10 [cent/MB] | ||
168 | */ | ||
169 | // GNUNET_ATS_COST_FINANCIAL_PER_VOLUME = 1, | ||
170 | |||
171 | /** | ||
172 | * Time based cost in financial units to transmit data | ||
173 | * | ||
174 | * Note: This value is not bound to a specific currency or unit and only | ||
175 | * used locally. | ||
176 | * "cent" just refers the smallest amount of money in the respective | ||
177 | * currency. | ||
178 | * | ||
179 | * Unit: [cent/h] | ||
180 | * | ||
181 | * Interpretation: less is better | ||
182 | * | ||
183 | * Examples: | ||
184 | * LAN : 0 [cent/h] | ||
185 | * Dialup: 10 [cent/h] | ||
186 | */ | ||
187 | // GNUNET_ATS_COST_FINANCIAL_PER_TIME = 2, | ||
188 | |||
189 | /** | ||
190 | * Computational costs | ||
191 | * | ||
192 | * Effort of preparing data to be sent with this transport | ||
193 | * Includes encoding, encryption and conversion of data | ||
194 | * Partial values can be summed up: c_sum = c_enc + c_enc + c_conv | ||
195 | * Resulting values depend on local system properties, e.g. CPU | ||
196 | * | ||
197 | * Unit: [ms/GB] | ||
198 | * | ||
199 | * Interpretation: less is better | ||
200 | * | ||
201 | * Examples: | ||
202 | * | ||
203 | * HTTPS with AES CBC-256: 7,382 | ||
204 | * HTTPS with AES CBC-128: 5,279 | ||
205 | * HTTPS with RC4-1024: 2,652 | ||
206 | */ | ||
207 | // GNUNET_ATS_COST_COMPUTATIONAL = 3, | ||
208 | |||
209 | /** | ||
210 | * Energy consumption | ||
211 | * | ||
212 | * Energy consumption using this transport when sending with a certain | ||
213 | * power at a certain bitrate. This is only an approximation based on: | ||
214 | * Energy consumption E = P / D | ||
215 | * | ||
216 | * with: | ||
217 | * Power P in Watt (J/s) | ||
218 | * Datarate D in MBit/s | ||
219 | * | ||
220 | * Conversion between power P and dBm used by WLAN in radiotap's dBm TX power: | ||
221 | * | ||
222 | * Lp(dbm) = 10 log10 (P/ 1mW) | ||
223 | * | ||
224 | * => P = 1 mW * 10^(Lp(dbm)/10) | ||
225 | * | ||
226 | * Unit: [mJ/MB] | ||
227 | * | ||
228 | * Interpretation: less is better | ||
229 | * | ||
230 | * Examples: | ||
231 | * | ||
232 | * LAN: 0 | ||
233 | * WLAN: 89 (600 mW @ 802.11g /w 54 MBit/s) | ||
234 | * Bluetooth: 267 (100 mW @ BT2.0 EDR /w 3 MBit/s) | ||
235 | */ | ||
236 | // GNUNET_ATS_COST_ENERGY_CONSUMPTION = 4, | ||
237 | |||
238 | /** | ||
239 | * Connect cost | ||
240 | * How many bytes are transmitted to initiate a new connection using | ||
241 | * this transport? | ||
242 | * | ||
243 | * Unit: [bytes] | ||
244 | * | ||
245 | * Interpretation: less is better | ||
246 | * | ||
247 | * Examples: | ||
248 | * | ||
249 | * UDP (No connection) : | ||
250 | * 0 bytes | ||
251 | * TCP (TCP 3-Way handshake): | ||
252 | * 220 bytes Ethernet, 172 bytes TCP/IP, 122 bytes TCP | ||
253 | * HTTP (TCP + Header) : | ||
254 | * 477 bytes Ethernet, 429 bytes TCP/IP, 374 bytes TCP, 278 bytes HTTP | ||
255 | * HTTPS HTTP+TLS Handshake: | ||
256 | * 2129 bytes Ethernet, 1975 bytes TCP/IP, 1755 bytes TCP, 1403 bytes HTTPS | ||
257 | * | ||
258 | * */ | ||
259 | // GNUNET_ATS_COST_CONNECT = 5, | ||
260 | |||
261 | /** | ||
262 | * Bandwidth cost | ||
263 | * | ||
264 | * How many bandwidth is available to consume? | ||
265 | * Used to calculate which impact sending data with this transport has | ||
266 | * | ||
267 | * Unit: [kB/s] | ||
268 | * | ||
269 | * Interpretation: more is better | ||
270 | * | ||
271 | * Examples: | ||
272 | * LAN: 12,800 (100 MBit/s) | ||
273 | * WLAN: 6,912 (54 MBit/s) | ||
274 | * Dial-up: 8 (64 Kbit/s) | ||
275 | * | ||
276 | */ | ||
277 | // GNUNET_ATS_COST_BANDWITH_AVAILABLE = 6, | ||
278 | |||
279 | /** | ||
280 | * Network overhead | ||
281 | * | ||
282 | * How many bytes are sent over the wire when 1 kilobyte (1024 bytes) | ||
283 | * of application data is transmitted? | ||
284 | * A factor used with connect cost, bandwidth cost and energy cost | ||
285 | * to describe the overhead produced by the transport protocol | ||
286 | * | ||
287 | * Unit: [bytes/kb] | ||
288 | * | ||
289 | * Interpretation: less is better | ||
290 | * | ||
291 | * Examples: | ||
292 | * | ||
293 | * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb] | ||
294 | * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb] | ||
295 | * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8 = 1090 [bytes/kb] | ||
296 | * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8 = 1110 [bytes/kb] | ||
297 | */ | ||
298 | // GNUNET_ATS_COST_NETWORK_OVERHEAD = 7, | ||
299 | |||
300 | |||
301 | /* Quality related values */ | ||
302 | /* ====================== */ | ||
303 | |||
304 | /* Physical layer quality properties */ | ||
305 | |||
306 | /** | ||
307 | * Signal strength on physical layer | ||
308 | * | ||
309 | * Unit: [dBm] | ||
310 | */ | ||
311 | // GNUNET_ATS_QUALITY_PHY_SIGNAL_STRENGTH = 1025, | ||
312 | |||
313 | /** | ||
314 | * Collision rate on physical layer | ||
315 | * | ||
316 | * Unit: [B/s] | ||
317 | */ | ||
318 | // GNUNET_ATS_QUALITY_PHY_COLLISION_RATE = 1026, | ||
319 | |||
320 | /** | ||
321 | * Error rate on physical layer | ||
322 | * | ||
323 | * Unit: [B/s] | ||
324 | */ | ||
325 | // GNUNET_ATS_QUALITY_PHY_ERROR_RATE = 1027, | ||
326 | |||
327 | /** | ||
328 | * Jitter | ||
329 | * Time variations of the delay | ||
330 | * 1st derivative of a delay function | ||
331 | * | ||
332 | * Unit: [ms] | ||
333 | */ | ||
334 | // GNUNET_ATS_QUALITY_NET_JITTER = 1029, | ||
335 | |||
336 | /** | ||
337 | * Error rate on network layer | ||
338 | * | ||
339 | * Unit: [B/s] | ||
340 | * | ||
341 | * Examples: | ||
342 | * | ||
343 | * LAN : 0 | ||
344 | * WLAN : 400 | ||
345 | * Bluetooth : 100 | ||
346 | * Note: This numbers are just assumptions as an example, not | ||
347 | * measured or somehow determined | ||
348 | */ | ||
349 | // GNUNET_ATS_QUALITY_NET_ERRORRATE = 1030, | ||
350 | |||
351 | /** | ||
352 | * Drop rate on network layer | ||
353 | * Bytes actively dismissed by a network component during transmission | ||
354 | * Reasons for dropped data can be full queues, congestion, quota violations... | ||
355 | * | ||
356 | * Unit: [B/s] | ||
357 | * | ||
358 | * Examples: | ||
359 | * | ||
360 | * LAN : 0 | ||
361 | * WLAN : 400 | ||
362 | * Bluetooth : 100 | ||
363 | * Note: This numbers are just assumptions as an example, not | ||
364 | * measured or somehow determined | ||
365 | */ | ||
366 | // GNUNET_ATS_QUALITY_NET_DROPRATE = 1031, | ||
367 | |||
368 | /** | ||
369 | * Loss rate on network layer | ||
370 | * Bytes lost during transmission | ||
371 | * Reasons can be collisions, ... | ||
372 | * | ||
373 | * Unit: [B/s] | ||
374 | * | ||
375 | * Examples: | ||
376 | * | ||
377 | * LAN : 0 | ||
378 | * WLAN : 40 | ||
379 | * Bluetooth : 10 | ||
380 | * Note: This numbers are just assumptions as an example, not measured | ||
381 | * or somehow determined | ||
382 | */ | ||
383 | // GNUNET_ATS_QUALITY_NET_LOSSRATE = 1032, | ||
384 | |||
385 | /** | ||
386 | * Throughput on network layer | ||
387 | * | ||
388 | * Unit: [kB/s] | ||
389 | * | ||
390 | * Examples: | ||
391 | * | ||
392 | * LAN : 3400 | ||
393 | * WLAN : 1200 | ||
394 | * Dialup: 4 | ||
395 | * | ||
396 | */ | ||
397 | // GNUNET_ATS_QUALITY_NET_THROUGHPUT = 1033, | ||
398 | |||
399 | |||
400 | /* Availability related values */ | ||
401 | /* =========================== */ | ||
402 | |||
403 | /** | ||
404 | * Is a peer reachable? | ||
405 | */ | ||
406 | // GNUNET_ATS_AVAILABILITY_REACHABLE = 2048, | ||
407 | |||
408 | /** | ||
409 | * Is there a connection established to a peer using this transport | ||
410 | */ | ||
411 | // GNUNET_ATS_AVAILABILITY_CONNECTED = 2049 | ||
412 | }; | ||
413 | |||
414 | |||
415 | /** | ||
416 | * struct used to communicate the transport's properties like cost and | ||
417 | * quality of service as well as high-level constraints on resource | ||
418 | * consumption. | ||
419 | * | ||
420 | * +---+ | ||
421 | * +-----------+ Constraints | | Plugin properties +---------+ | ||
422 | * | Highlevel |------------> |ATS| <------------------|Transport| | ||
423 | * | Component | ATS struct | | ATS struct | Plugin | | ||
424 | * +-----------+ | | +---------+ | ||
425 | * +---+ | ||
426 | * | ||
427 | * This structure will be used by transport plugins to communicate | ||
428 | * costs to ATS or by higher level components to tell ATS their | ||
429 | * constraints. Always a pair of (GNUNET_ATS_Property, | ||
430 | * uint32_t value). Value is always uint32_t, so all units used to | ||
431 | * define costs have to be normalized to fit uint32_t. | ||
432 | */ | ||
433 | struct GNUNET_ATS_Information | ||
434 | { | ||
435 | /** | ||
436 | * ATS property type, in network byte order. | ||
437 | */ | ||
438 | uint32_t type; | ||
439 | |||
440 | /** | ||
441 | * ATS property value, in network byte order. | ||
442 | */ | ||
443 | uint32_t value; | ||
444 | }; | ||
445 | |||
36 | 446 | ||
37 | 447 | ||
38 | /* ******************************** Scheduling API ***************************** */ | 448 | /* ******************************** Scheduling API ***************************** */ |
@@ -79,7 +489,7 @@ typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, | |||
79 | GNUNET_BANDWIDTH_Value32NBO | 489 | GNUNET_BANDWIDTH_Value32NBO |
80 | bandwidth_in, | 490 | bandwidth_in, |
81 | const struct | 491 | const struct |
82 | GNUNET_TRANSPORT_ATS_Information | 492 | GNUNET_ATS_Information |
83 | * ats, | 493 | * ats, |
84 | uint32_t ats_count); | 494 | uint32_t ats_count); |
85 | 495 | ||
@@ -142,7 +552,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, | |||
142 | const char *plugin_name, | 552 | const char *plugin_name, |
143 | const void *plugin_addr, size_t plugin_addr_len, | 553 | const void *plugin_addr, size_t plugin_addr_len, |
144 | struct Session *session, | 554 | struct Session *session, |
145 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 555 | const struct GNUNET_ATS_Information *ats, |
146 | uint32_t ats_count); | 556 | uint32_t ats_count); |
147 | 557 | ||
148 | 558 | ||
@@ -200,7 +610,7 @@ typedef void (*GNUNET_ATS_PeerInformationCallback) (void *cls, | |||
200 | GNUNET_BANDWIDTH_Value32NBO | 610 | GNUNET_BANDWIDTH_Value32NBO |
201 | bandwidth_in, | 611 | bandwidth_in, |
202 | const struct | 612 | const struct |
203 | GNUNET_TRANSPORT_ATS_Information | 613 | GNUNET_ATS_Information |
204 | * ats, | 614 | * ats, |
205 | uint32_t ats_count); | 615 | uint32_t ats_count); |
206 | 616 | ||
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, | |||
62 | const struct | 62 | const struct |
63 | GNUNET_PeerIdentity * peer, | 63 | GNUNET_PeerIdentity * peer, |
64 | const struct | 64 | const struct |
65 | GNUNET_TRANSPORT_ATS_Information | 65 | GNUNET_ATS_Information |
66 | * atsi); | 66 | * atsi); |
67 | 67 | ||
68 | 68 | ||
@@ -95,7 +95,7 @@ typedef int (*GNUNET_CORE_MessageCallback) (void *cls, | |||
95 | const struct GNUNET_MessageHeader * | 95 | const struct GNUNET_MessageHeader * |
96 | message, | 96 | message, |
97 | const struct | 97 | const struct |
98 | GNUNET_TRANSPORT_ATS_Information * | 98 | GNUNET_ATS_Information * |
99 | atsi); | 99 | atsi); |
100 | 100 | ||
101 | 101 | ||
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, | |||
75 | const struct GNUNET_MessageHeader * | 75 | const struct GNUNET_MessageHeader * |
76 | message, | 76 | message, |
77 | const struct | 77 | const struct |
78 | GNUNET_TRANSPORT_ATS_Information * | 78 | GNUNET_ATS_Information * |
79 | atsi); | 79 | atsi); |
80 | 80 | ||
81 | 81 | ||
@@ -189,7 +189,7 @@ typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls, | |||
189 | const struct | 189 | const struct |
190 | GNUNET_PeerIdentity * peer, | 190 | GNUNET_PeerIdentity * peer, |
191 | const struct | 191 | const struct |
192 | GNUNET_TRANSPORT_ATS_Information | 192 | GNUNET_ATS_Information |
193 | * atsi); | 193 | * atsi); |
194 | 194 | ||
195 | 195 | ||
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, | |||
75 | const struct GNUNET_MessageHeader * | 75 | const struct GNUNET_MessageHeader * |
76 | message, | 76 | message, |
77 | const struct | 77 | const struct |
78 | GNUNET_TRANSPORT_ATS_Information * | 78 | GNUNET_ATS_Information * |
79 | atsi); | 79 | atsi); |
80 | 80 | ||
81 | 81 | ||
@@ -124,7 +124,7 @@ typedef void *(GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, | |||
124 | GNUNET_PeerIdentity | 124 | GNUNET_PeerIdentity |
125 | * initiator, | 125 | * initiator, |
126 | const struct | 126 | const struct |
127 | GNUNET_TRANSPORT_ATS_Information | 127 | GNUNET_ATS_Information |
128 | * atsi); | 128 | * atsi); |
129 | 129 | ||
130 | 130 | ||
@@ -208,7 +208,7 @@ typedef void (*GNUNET_MESH_PeerConnectHandler) (void *cls, | |||
208 | const struct GNUNET_PeerIdentity | 208 | const struct GNUNET_PeerIdentity |
209 | * peer, | 209 | * peer, |
210 | const struct | 210 | const struct |
211 | GNUNET_TRANSPORT_ATS_Information | 211 | GNUNET_ATS_Information |
212 | * atsi); | 212 | * atsi); |
213 | 213 | ||
214 | 214 | ||
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 | |||
114 | GNUNET_MessageHeader | 114 | GNUNET_MessageHeader |
115 | * message, | 115 | * message, |
116 | const struct | 116 | const struct |
117 | GNUNET_TRANSPORT_ATS_Information | 117 | GNUNET_ATS_Information |
118 | * ats, | 118 | * ats, |
119 | uint32_t | 119 | uint32_t |
120 | ats_count, | 120 | 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" | |||
35 | #endif | 35 | #endif |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #include "gnunet_bandwidth_lib.h" | 38 | #include "gnunet_util_lib.h" |
39 | #include "gnunet_configuration_lib.h" | 39 | #include "gnunet_ats_service.h" |
40 | #include "gnunet_crypto_lib.h" | ||
41 | #include "gnunet_connection_lib.h" | ||
42 | #include "gnunet_scheduler_lib.h" | ||
43 | #include "gnunet_time_lib.h" | ||
44 | 40 | ||
45 | /** | 41 | /** |
46 | * Version number of the transport API. | 42 | * Version number of the transport API. |
@@ -49,349 +45,6 @@ extern "C" | |||
49 | 45 | ||
50 | 46 | ||
51 | /** | 47 | /** |
52 | * Enum defining all known property types for ATS Enum values are used | ||
53 | * in the GNUNET_TRANSPORT_ATS_Information struct as | ||
54 | * (key,value)-pairs. | ||
55 | * | ||
56 | * Cost are always stored in uint32_t, so all units used to define costs | ||
57 | * have to be normalized to fit in uint32_t [0 .. 4.294.967.295] | ||
58 | * | ||
59 | * To keep the elements ordered | ||
60 | * 1..1024 : Values with a relation to cost | ||
61 | * 1025..2048 : Values with a relation to quality | ||
62 | * 2049..3072 : Values with a relation to availability | ||
63 | * | ||
64 | */ | ||
65 | enum GNUNET_TRANSPORT_ATS_Property | ||
66 | { | ||
67 | |||
68 | /** | ||
69 | * End of the array. | ||
70 | */ | ||
71 | GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR = 0, | ||
72 | |||
73 | /* Cost related values */ | ||
74 | /* =================== */ | ||
75 | |||
76 | /** | ||
77 | * Volume based cost in financial units to transmit data | ||
78 | * | ||
79 | * Note: This value is not bound to a specific currency or unit and only | ||
80 | * used locally. | ||
81 | * "cent" just refers the smallest amount of money in the respective | ||
82 | * currency. | ||
83 | * | ||
84 | * Unit: [cent/MB] | ||
85 | * | ||
86 | * Interpretation: less is better | ||
87 | * | ||
88 | * Examples: | ||
89 | * LAN: 0 [cent/MB] | ||
90 | * 2G : 10 [cent/MB] | ||
91 | */ | ||
92 | GNUNET_TRANSPORT_ATS_COST_FINANCIAL_PER_VOLUME = 1, | ||
93 | |||
94 | /** | ||
95 | * Time based cost in financial units to transmit data | ||
96 | * | ||
97 | * Note: This value is not bound to a specific currency or unit and only | ||
98 | * used locally. | ||
99 | * "cent" just refers the smallest amount of money in the respective | ||
100 | * currency. | ||
101 | * | ||
102 | * Unit: [cent/h] | ||
103 | * | ||
104 | * Interpretation: less is better | ||
105 | * | ||
106 | * Examples: | ||
107 | * LAN : 0 [cent/h] | ||
108 | * Dialup: 10 [cent/h] | ||
109 | */ | ||
110 | GNUNET_TRANSPORT_ATS_COST_FINANCIAL_PER_TIME = 2, | ||
111 | |||
112 | /** | ||
113 | * Computational costs | ||
114 | * | ||
115 | * Effort of preparing data to be sent with this transport | ||
116 | * Includes encoding, encryption and conversion of data | ||
117 | * Partial values can be summed up: c_sum = c_enc + c_enc + c_conv | ||
118 | * Resulting values depend on local system properties, e.g. CPU | ||
119 | * | ||
120 | * Unit: [ms/GB] | ||
121 | * | ||
122 | * Interpretation: less is better | ||
123 | * | ||
124 | * Examples: | ||
125 | * | ||
126 | * HTTPS with AES CBC-256: 7,382 | ||
127 | * HTTPS with AES CBC-128: 5,279 | ||
128 | * HTTPS with RC4-1024: 2,652 | ||
129 | */ | ||
130 | GNUNET_TRANSPORT_ATS_COST_COMPUTATIONAL = 3, | ||
131 | |||
132 | /** | ||
133 | * Energy consumption | ||
134 | * | ||
135 | * Energy consumption using this transport when sending with a certain | ||
136 | * power at a certain bitrate. This is only an approximation based on: | ||
137 | * Energy consumption E = P / D | ||
138 | * | ||
139 | * with: | ||
140 | * Power P in Watt (J/s) | ||
141 | * Datarate D in MBit/s | ||
142 | * | ||
143 | * Conversion between power P and dBm used by WLAN in radiotap's dBm TX power: | ||
144 | * | ||
145 | * Lp(dbm) = 10 log10 (P/ 1mW) | ||
146 | * | ||
147 | * => P = 1 mW * 10^(Lp(dbm)/10) | ||
148 | * | ||
149 | * Unit: [mJ/MB] | ||
150 | * | ||
151 | * Interpretation: less is better | ||
152 | * | ||
153 | * Examples: | ||
154 | * | ||
155 | * LAN: 0 | ||
156 | * WLAN: 89 (600 mW @ 802.11g /w 54 MBit/s) | ||
157 | * Bluetooth: 267 (100 mW @ BT2.0 EDR /w 3 MBit/s) | ||
158 | */ | ||
159 | GNUNET_TRANSPORT_ATS_COST_ENERGY_CONSUMPTION = 4, | ||
160 | |||
161 | /** | ||
162 | * Connect cost | ||
163 | * How many bytes are transmitted to initiate a new connection using | ||
164 | * this transport? | ||
165 | * | ||
166 | * Unit: [bytes] | ||
167 | * | ||
168 | * Interpretation: less is better | ||
169 | * | ||
170 | * Examples: | ||
171 | * | ||
172 | * UDP (No connection) : | ||
173 | * 0 bytes | ||
174 | * TCP (TCP 3-Way handshake): | ||
175 | * 220 bytes Ethernet, 172 bytes TCP/IP, 122 bytes TCP | ||
176 | * HTTP (TCP + Header) : | ||
177 | * 477 bytes Ethernet, 429 bytes TCP/IP, 374 bytes TCP, 278 bytes HTTP | ||
178 | * HTTPS HTTP+TLS Handshake: | ||
179 | * 2129 bytes Ethernet, 1975 bytes TCP/IP, 1755 bytes TCP, 1403 bytes HTTPS | ||
180 | * | ||
181 | * */ | ||
182 | GNUNET_TRANSPORT_ATS_COST_CONNECT = 5, | ||
183 | |||
184 | /** | ||
185 | * Bandwidth cost | ||
186 | * | ||
187 | * How many bandwidth is available to consume? | ||
188 | * Used to calculate which impact sending data with this transport has | ||
189 | * | ||
190 | * Unit: [kB/s] | ||
191 | * | ||
192 | * Interpretation: more is better | ||
193 | * | ||
194 | * Examples: | ||
195 | * LAN: 12,800 (100 MBit/s) | ||
196 | * WLAN: 6,912 (54 MBit/s) | ||
197 | * Dial-up: 8 (64 Kbit/s) | ||
198 | * | ||
199 | */ | ||
200 | GNUNET_TRANSPORT_ATS_COST_BANDWITH_AVAILABLE = 6, | ||
201 | |||
202 | /** | ||
203 | * Network overhead | ||
204 | * | ||
205 | * How many bytes are sent over the wire when 1 kilobyte (1024 bytes) | ||
206 | * of application data is transmitted? | ||
207 | * A factor used with connect cost, bandwidth cost and energy cost | ||
208 | * to describe the overhead produced by the transport protocol | ||
209 | * | ||
210 | * Unit: [bytes/kb] | ||
211 | * | ||
212 | * Interpretation: less is better | ||
213 | * | ||
214 | * Examples: | ||
215 | * | ||
216 | * TCP/IPv4 over Ethernet: 1024 + 38 + 20 + 20 = 1102 [bytes/kb] | ||
217 | * TCP/IPv6 over Ethernet: 1024 + 38 + 20 + 40 = 1122 [bytes/kb] | ||
218 | * UDP/IPv4 over Ethernet: 1024 + 38 + 20 + 8 = 1090 [bytes/kb] | ||
219 | * UDP/IPv6 over Ethernet: 1024 + 38 + 40 + 8 = 1110 [bytes/kb] | ||
220 | */ | ||
221 | GNUNET_TRANSPORT_ATS_COST_NETWORK_OVERHEAD = 7, | ||
222 | |||
223 | |||
224 | /* Quality related values */ | ||
225 | /* ====================== */ | ||
226 | |||
227 | /* Physical layer quality properties */ | ||
228 | |||
229 | /** | ||
230 | * Signal strength on physical layer | ||
231 | * | ||
232 | * Unit: [dBm] | ||
233 | */ | ||
234 | GNUNET_TRANSPORT_ATS_QUALITY_PHY_SIGNAL_STRENGTH = 1025, | ||
235 | |||
236 | /** | ||
237 | * Collision rate on physical layer | ||
238 | * | ||
239 | * Unit: [B/s] | ||
240 | */ | ||
241 | GNUNET_TRANSPORT_ATS_QUALITY_PHY_COLLISION_RATE = 1026, | ||
242 | |||
243 | /** | ||
244 | * Error rate on physical layer | ||
245 | * | ||
246 | * Unit: [B/s] | ||
247 | */ | ||
248 | GNUNET_TRANSPORT_ATS_QUALITY_PHY_ERROR_RATE = 1027, | ||
249 | |||
250 | /* Network layer quality properties */ | ||
251 | |||
252 | /** | ||
253 | * Delay | ||
254 | * Time between when the time packet is sent and the packet arrives | ||
255 | * | ||
256 | * Unit: [ms] | ||
257 | * | ||
258 | * Examples: | ||
259 | * | ||
260 | * LAN : 1 | ||
261 | * WLAN : 2 | ||
262 | * Dialup: 500 | ||
263 | */ | ||
264 | GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY = 1028, | ||
265 | |||
266 | /** | ||
267 | * Jitter | ||
268 | * Time variations of the delay | ||
269 | * 1st derivative of a delay function | ||
270 | * | ||
271 | * Unit: [ms] | ||
272 | */ | ||
273 | GNUNET_TRANSPORT_ATS_QUALITY_NET_JITTER = 1029, | ||
274 | |||
275 | /** | ||
276 | * Error rate on network layer | ||
277 | * | ||
278 | * Unit: [B/s] | ||
279 | * | ||
280 | * Examples: | ||
281 | * | ||
282 | * LAN : 0 | ||
283 | * WLAN : 400 | ||
284 | * Bluetooth : 100 | ||
285 | * Note: This numbers are just assumptions as an example, not | ||
286 | * measured or somehow determined | ||
287 | */ | ||
288 | GNUNET_TRANSPORT_ATS_QUALITY_NET_ERRORRATE = 1030, | ||
289 | |||
290 | /** | ||
291 | * Drop rate on network layer | ||
292 | * Bytes actively dismissed by a network component during transmission | ||
293 | * Reasons for dropped data can be full queues, congestion, quota violations... | ||
294 | * | ||
295 | * Unit: [B/s] | ||
296 | * | ||
297 | * Examples: | ||
298 | * | ||
299 | * LAN : 0 | ||
300 | * WLAN : 400 | ||
301 | * Bluetooth : 100 | ||
302 | * Note: This numbers are just assumptions as an example, not | ||
303 | * measured or somehow determined | ||
304 | */ | ||
305 | GNUNET_TRANSPORT_ATS_QUALITY_NET_DROPRATE = 1031, | ||
306 | |||
307 | /** | ||
308 | * Loss rate on network layer | ||
309 | * Bytes lost during transmission | ||
310 | * Reasons can be collisions, ... | ||
311 | * | ||
312 | * Unit: [B/s] | ||
313 | * | ||
314 | * Examples: | ||
315 | * | ||
316 | * LAN : 0 | ||
317 | * WLAN : 40 | ||
318 | * Bluetooth : 10 | ||
319 | * Note: This numbers are just assumptions as an example, not measured | ||
320 | * or somehow determined | ||
321 | */ | ||
322 | GNUNET_TRANSPORT_ATS_QUALITY_NET_LOSSRATE = 1032, | ||
323 | |||
324 | /** | ||
325 | * Throughput on network layer | ||
326 | * | ||
327 | * Unit: [kB/s] | ||
328 | * | ||
329 | * Examples: | ||
330 | * | ||
331 | * LAN : 3400 | ||
332 | * WLAN : 1200 | ||
333 | * Dialup: 4 | ||
334 | * | ||
335 | */ | ||
336 | GNUNET_TRANSPORT_ATS_QUALITY_NET_THROUGHPUT = 1033, | ||
337 | |||
338 | /** | ||
339 | * Distance on network layer | ||
340 | * | ||
341 | * Unit: [] | ||
342 | */ | ||
343 | GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE = 1034, | ||
344 | |||
345 | |||
346 | /* Availability related values */ | ||
347 | /* =========================== */ | ||
348 | |||
349 | /** | ||
350 | * Is a peer reachable? | ||
351 | */ | ||
352 | GNUNET_TRANSPORT_ATS_AVAILABILITY_REACHABLE = 2048, | ||
353 | |||
354 | /** | ||
355 | * Is there a connection established to a peer using this transport | ||
356 | */ | ||
357 | GNUNET_TRANSPORT_ATS_AVAILABILITY_CONNECTED = 2049 | ||
358 | }; | ||
359 | |||
360 | |||
361 | /** | ||
362 | * struct used to communicate the transport's properties like cost and | ||
363 | * quality of service as well as high-level constraints on resource | ||
364 | * consumption. | ||
365 | * | ||
366 | * +---+ | ||
367 | * +-----------+ Constraints | | Plugin properties +---------+ | ||
368 | * | Highlevel |------------> |ATS| <------------------|Transport| | ||
369 | * | Component | ATS struct | | ATS struct | Plugin | | ||
370 | * +-----------+ | | +---------+ | ||
371 | * +---+ | ||
372 | * | ||
373 | * This structure will be used by transport plugins to communicate | ||
374 | * costs to ATS or by higher level components to tell ATS their | ||
375 | * constraints. Always a pair of (GNUNET_TRANSPORT_ATS_Property, | ||
376 | * uint32_t value). Value is always uint32_t, so all units used to | ||
377 | * define costs have to be normalized to fit uint32_t. | ||
378 | */ | ||
379 | struct GNUNET_TRANSPORT_ATS_Information | ||
380 | { | ||
381 | /** | ||
382 | * ATS property type, in network byte order. | ||
383 | */ | ||
384 | uint32_t type; | ||
385 | |||
386 | /** | ||
387 | * ATS property value, in network byte order. | ||
388 | */ | ||
389 | uint32_t value; | ||
390 | }; | ||
391 | |||
392 | |||
393 | |||
394 | /** | ||
395 | * Function called by the transport for each received message. | 48 | * Function called by the transport for each received message. |
396 | * | 49 | * |
397 | * @param cls closure | 50 | * @param cls closure |
@@ -407,7 +60,7 @@ typedef void (*GNUNET_TRANSPORT_ReceiveCallback) (void *cls, | |||
407 | GNUNET_MessageHeader * | 60 | GNUNET_MessageHeader * |
408 | message, | 61 | message, |
409 | const struct | 62 | const struct |
410 | GNUNET_TRANSPORT_ATS_Information | 63 | GNUNET_ATS_Information |
411 | * ats, uint32_t ats_count); | 64 | * ats, uint32_t ats_count); |
412 | 65 | ||
413 | 66 | ||
@@ -430,7 +83,7 @@ typedef void (*GNUNET_TRANSPORT_NotifyConnect) (void *cls, | |||
430 | const struct GNUNET_PeerIdentity | 83 | const struct GNUNET_PeerIdentity |
431 | * peer, | 84 | * peer, |
432 | const struct | 85 | const struct |
433 | GNUNET_TRANSPORT_ATS_Information | 86 | GNUNET_ATS_Information |
434 | * ats, uint32_t ats_count); | 87 | * ats, uint32_t ats_count); |
435 | 88 | ||
436 | /** | 89 | /** |
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) | |||
2015 | static int | 2015 | static int |
2016 | handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | 2016 | handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, |
2017 | const struct GNUNET_MessageHeader *message, | 2017 | const struct GNUNET_MessageHeader *message, |
2018 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 2018 | const struct GNUNET_ATS_Information *atsi) |
2019 | { | 2019 | { |
2020 | unsigned int own_pos; | 2020 | unsigned int own_pos; |
2021 | uint16_t size; | 2021 | uint16_t size; |
@@ -2205,7 +2205,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2205 | static int | 2205 | static int |
2206 | handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer, | 2206 | handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer, |
2207 | const struct GNUNET_MessageHeader *message, | 2207 | const struct GNUNET_MessageHeader *message, |
2208 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 2208 | const struct GNUNET_ATS_Information *atsi) |
2209 | { | 2209 | { |
2210 | struct GNUNET_MESH_Unicast *msg; | 2210 | struct GNUNET_MESH_Unicast *msg; |
2211 | struct MeshTunnel *t; | 2211 | struct MeshTunnel *t; |
@@ -2270,7 +2270,7 @@ handle_mesh_data_unicast (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2270 | static int | 2270 | static int |
2271 | handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer, | 2271 | handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer, |
2272 | const struct GNUNET_MessageHeader *message, | 2272 | const struct GNUNET_MessageHeader *message, |
2273 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 2273 | const struct GNUNET_ATS_Information *atsi) |
2274 | { | 2274 | { |
2275 | struct GNUNET_MESH_Multicast *msg; | 2275 | struct GNUNET_MESH_Multicast *msg; |
2276 | struct GNUNET_PeerIdentity *id; | 2276 | struct GNUNET_PeerIdentity *id; |
@@ -2364,7 +2364,7 @@ handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2364 | static int | 2364 | static int |
2365 | handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer, | 2365 | handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer, |
2366 | const struct GNUNET_MessageHeader *message, | 2366 | const struct GNUNET_MessageHeader *message, |
2367 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 2367 | const struct GNUNET_ATS_Information *atsi) |
2368 | { | 2368 | { |
2369 | struct GNUNET_MESH_ToOrigin *msg; | 2369 | struct GNUNET_MESH_ToOrigin *msg; |
2370 | struct GNUNET_PeerIdentity id; | 2370 | struct GNUNET_PeerIdentity id; |
@@ -2455,7 +2455,7 @@ handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2455 | static int | 2455 | static int |
2456 | handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer, | 2456 | handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer, |
2457 | const struct GNUNET_MessageHeader *message, | 2457 | const struct GNUNET_MessageHeader *message, |
2458 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 2458 | const struct GNUNET_ATS_Information *atsi) |
2459 | { | 2459 | { |
2460 | struct GNUNET_MESH_PathACK *msg; | 2460 | struct GNUNET_MESH_PathACK *msg; |
2461 | struct GNUNET_PeerIdentity id; | 2461 | struct GNUNET_PeerIdentity id; |
@@ -3612,7 +3612,7 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server, | |||
3612 | */ | 3612 | */ |
3613 | static void | 3613 | static void |
3614 | core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 3614 | core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
3615 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 3615 | const struct GNUNET_ATS_Information *atsi) |
3616 | { | 3616 | { |
3617 | struct MeshPeerInfo *peer_info; | 3617 | struct MeshPeerInfo *peer_info; |
3618 | struct MeshPeerPath *path; | 3618 | 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 | |||
113 | /* list of application-types */ | 113 | /* list of application-types */ |
114 | struct type_list_element *type_head, *type_tail; | 114 | struct type_list_element *type_head, *type_tail; |
115 | 115 | ||
116 | struct GNUNET_TRANSPORT_ATS_Information atsi; | 116 | struct GNUNET_ATS_Information atsi; |
117 | struct peer_list_element *next, *prev; | 117 | struct peer_list_element *next, *prev; |
118 | 118 | ||
119 | /* The handle that sends the hellos to this peer */ | 119 | /* The handle that sends the hellos to this peer */ |
@@ -254,7 +254,7 @@ schedule_hello_message (void *cls, | |||
254 | */ | 254 | */ |
255 | static void | 255 | static void |
256 | core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 256 | core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
257 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 257 | const struct GNUNET_ATS_Information *atsi) |
258 | { | 258 | { |
259 | struct GNUNET_MESH_Handle *handle = cls; | 259 | struct GNUNET_MESH_Handle *handle = cls; |
260 | 260 | ||
@@ -272,7 +272,7 @@ core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
272 | 272 | ||
273 | if (NULL != atsi) | 273 | if (NULL != atsi) |
274 | memcpy (&element->atsi, atsi, | 274 | memcpy (&element->atsi, atsi, |
275 | sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 275 | sizeof (struct GNUNET_ATS_Information)); |
276 | 276 | ||
277 | GNUNET_CONTAINER_DLL_insert_after (handle->connected_peers.head, | 277 | GNUNET_CONTAINER_DLL_insert_after (handle->connected_peers.head, |
278 | handle->connected_peers.tail, | 278 | handle->connected_peers.tail, |
@@ -383,7 +383,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
383 | static int | 383 | static int |
384 | receive_hello (void *cls, const struct GNUNET_PeerIdentity *other, | 384 | receive_hello (void *cls, const struct GNUNET_PeerIdentity *other, |
385 | const struct GNUNET_MessageHeader *message, | 385 | const struct GNUNET_MessageHeader *message, |
386 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 386 | const struct GNUNET_ATS_Information *atsi) |
387 | { | 387 | { |
388 | struct GNUNET_MESH_Handle *handle = cls; | 388 | struct GNUNET_MESH_Handle *handle = cls; |
389 | uint16_t *num = (uint16_t *) (message + 1); | 389 | uint16_t *num = (uint16_t *) (message + 1); |
@@ -469,7 +469,7 @@ receive_hello (void *cls, const struct GNUNET_PeerIdentity *other, | |||
469 | static int | 469 | static int |
470 | core_receive (void *cls, const struct GNUNET_PeerIdentity *other, | 470 | core_receive (void *cls, const struct GNUNET_PeerIdentity *other, |
471 | const struct GNUNET_MessageHeader *message, | 471 | const struct GNUNET_MessageHeader *message, |
472 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 472 | const struct GNUNET_ATS_Information *atsi) |
473 | { | 473 | { |
474 | struct GNUNET_MESH_Handle *handle = cls; | 474 | struct GNUNET_MESH_Handle *handle = cls; |
475 | struct tunnel_message *tmessage = (struct tunnel_message *) message; | 475 | 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, | |||
749 | const struct GNUNET_MESH_TunnelNotification *msg) | 749 | const struct GNUNET_MESH_TunnelNotification *msg) |
750 | { | 750 | { |
751 | struct GNUNET_MESH_Tunnel *t; | 751 | struct GNUNET_MESH_Tunnel *t; |
752 | struct GNUNET_TRANSPORT_ATS_Information atsi; | 752 | struct GNUNET_ATS_Information atsi; |
753 | MESH_TunnelNumber tid; | 753 | MESH_TunnelNumber tid; |
754 | 754 | ||
755 | tid = ntohl (msg->tunnel_id); | 755 | tid = ntohl (msg->tunnel_id); |
@@ -821,7 +821,7 @@ process_peer_event (struct GNUNET_MESH_Handle *h, | |||
821 | { | 821 | { |
822 | struct GNUNET_MESH_Tunnel *t; | 822 | struct GNUNET_MESH_Tunnel *t; |
823 | struct GNUNET_MESH_Peer *p; | 823 | struct GNUNET_MESH_Peer *p; |
824 | struct GNUNET_TRANSPORT_ATS_Information atsi; | 824 | struct GNUNET_ATS_Information atsi; |
825 | GNUNET_PEER_Id id; | 825 | GNUNET_PEER_Id id; |
826 | uint16_t size; | 826 | uint16_t size; |
827 | 827 | ||
@@ -928,7 +928,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h, | |||
928 | handler = &h->message_handlers[i]; | 928 | handler = &h->message_handlers[i]; |
929 | if (handler->type == type) | 929 | if (handler->type == type) |
930 | { | 930 | { |
931 | struct GNUNET_TRANSPORT_ATS_Information atsi; | 931 | struct GNUNET_ATS_Information atsi; |
932 | 932 | ||
933 | atsi.type = 0; | 933 | atsi.type = 0; |
934 | atsi.value = 0; | 934 | 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 | |||
55 | callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, | 55 | callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, |
56 | const struct GNUNET_PeerIdentity *sender, | 56 | const struct GNUNET_PeerIdentity *sender, |
57 | const struct GNUNET_MessageHeader *message, | 57 | const struct GNUNET_MessageHeader *message, |
58 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 58 | const struct GNUNET_ATS_Information *atsi) |
59 | { | 59 | { |
60 | return GNUNET_OK; | 60 | return GNUNET_OK; |
61 | } | 61 | } |
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 | |||
109 | data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, | 109 | data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, |
110 | const struct GNUNET_PeerIdentity *sender, | 110 | const struct GNUNET_PeerIdentity *sender, |
111 | const struct GNUNET_MessageHeader *message, | 111 | const struct GNUNET_MessageHeader *message, |
112 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 112 | const struct GNUNET_ATS_Information *atsi) |
113 | { | 113 | { |
114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Data callback\n"); | 114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Data callback\n"); |
115 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 115 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
@@ -132,7 +132,7 @@ data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, | |||
132 | static void * | 132 | static void * |
133 | inbound_tunnel (void *cls, struct GNUNET_MESH_Tunnel *tunnel, | 133 | inbound_tunnel (void *cls, struct GNUNET_MESH_Tunnel *tunnel, |
134 | const struct GNUNET_PeerIdentity *initiator, | 134 | const struct GNUNET_PeerIdentity *initiator, |
135 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 135 | const struct GNUNET_ATS_Information *atsi) |
136 | { | 136 | { |
137 | unsigned int id = *(unsigned int *) cls; | 137 | unsigned int id = *(unsigned int *) cls; |
138 | 138 | ||
@@ -180,7 +180,7 @@ inbound_end (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, | |||
180 | */ | 180 | */ |
181 | static void | 181 | static void |
182 | peer_conected (void *cls, const struct GNUNET_PeerIdentity *peer, | 182 | peer_conected (void *cls, const struct GNUNET_PeerIdentity *peer, |
183 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 183 | const struct GNUNET_ATS_Information *atsi) |
184 | { | 184 | { |
185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer connected\n"); | 185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer connected\n"); |
186 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_shutdown, NULL); | 186 | 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 | |||
109 | data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, | 109 | data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, |
110 | const struct GNUNET_PeerIdentity *sender, | 110 | const struct GNUNET_PeerIdentity *sender, |
111 | const struct GNUNET_MessageHeader *message, | 111 | const struct GNUNET_MessageHeader *message, |
112 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 112 | const struct GNUNET_ATS_Information *atsi) |
113 | { | 113 | { |
114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Data callback\n"); | 114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Data callback\n"); |
115 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 115 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
@@ -132,7 +132,7 @@ data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, | |||
132 | static void * | 132 | static void * |
133 | inbound_tunnel (void *cls, struct GNUNET_MESH_Tunnel *tunnel, | 133 | inbound_tunnel (void *cls, struct GNUNET_MESH_Tunnel *tunnel, |
134 | const struct GNUNET_PeerIdentity *initiator, | 134 | const struct GNUNET_PeerIdentity *initiator, |
135 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 135 | const struct GNUNET_ATS_Information *atsi) |
136 | { | 136 | { |
137 | unsigned int id = *(unsigned int *) cls; | 137 | unsigned int id = *(unsigned int *) cls; |
138 | 138 | ||
@@ -180,7 +180,7 @@ inbound_end (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, | |||
180 | */ | 180 | */ |
181 | static void | 181 | static void |
182 | peer_conected (void *cls, const struct GNUNET_PeerIdentity *peer, | 182 | peer_conected (void *cls, const struct GNUNET_PeerIdentity *peer, |
183 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 183 | const struct GNUNET_ATS_Information *atsi) |
184 | { | 184 | { |
185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer connected\n"); | 185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer connected\n"); |
186 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_shutdown, NULL); | 186 | 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) | |||
219 | */ | 219 | */ |
220 | static void | 220 | static void |
221 | ch (void *cls, const struct GNUNET_PeerIdentity *peer, | 221 | ch (void *cls, const struct GNUNET_PeerIdentity *peer, |
222 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 222 | const struct GNUNET_ATS_Information *atsi) |
223 | { | 223 | { |
224 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "peer connected\n"); | 224 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "peer connected\n"); |
225 | return; | 225 | 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, | |||
231 | void **tunnel_ctx, | 231 | void **tunnel_ctx, |
232 | const struct GNUNET_PeerIdentity *sender, | 232 | const struct GNUNET_PeerIdentity *sender, |
233 | const struct GNUNET_MessageHeader *message, | 233 | const struct GNUNET_MessageHeader *message, |
234 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 234 | const struct GNUNET_ATS_Information *atsi) |
235 | { | 235 | { |
236 | long client = (long) cls; | 236 | long client = (long) cls; |
237 | 237 | ||
@@ -293,7 +293,7 @@ static void * | |||
293 | incoming_tunnel (void *cls, | 293 | incoming_tunnel (void *cls, |
294 | struct GNUNET_MESH_Tunnel * tunnel, | 294 | struct GNUNET_MESH_Tunnel * tunnel, |
295 | const struct GNUNET_PeerIdentity * initiator, | 295 | const struct GNUNET_PeerIdentity * initiator, |
296 | const struct GNUNET_TRANSPORT_ATS_Information * atsi) | 296 | const struct GNUNET_ATS_Information * atsi) |
297 | { | 297 | { |
298 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 298 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
299 | "test: Incoming tunnel from %s\n", | 299 | "test: Incoming tunnel from %s\n", |
@@ -353,7 +353,7 @@ dh (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
353 | */ | 353 | */ |
354 | static void | 354 | static void |
355 | ch (void *cls, const struct GNUNET_PeerIdentity *peer, | 355 | ch (void *cls, const struct GNUNET_PeerIdentity *peer, |
356 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 356 | const struct GNUNET_ATS_Information *atsi) |
357 | { | 357 | { |
358 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 358 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
359 | "test: peer %s connected\n", | 359 | "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 * | |||
213 | incoming_tunnel (void *cls, | 213 | incoming_tunnel (void *cls, |
214 | struct GNUNET_MESH_Tunnel * tunnel, | 214 | struct GNUNET_MESH_Tunnel * tunnel, |
215 | const struct GNUNET_PeerIdentity * initiator, | 215 | const struct GNUNET_PeerIdentity * initiator, |
216 | const struct GNUNET_TRANSPORT_ATS_Information * atsi) | 216 | const struct GNUNET_ATS_Information * atsi) |
217 | { | 217 | { |
218 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 218 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
219 | "test: Incoming tunnel from %s\n", | 219 | "test: Incoming tunnel from %s\n", |
@@ -269,7 +269,7 @@ dh (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
269 | */ | 269 | */ |
270 | static void | 270 | static void |
271 | ch (void *cls, const struct GNUNET_PeerIdentity *peer, | 271 | ch (void *cls, const struct GNUNET_PeerIdentity *peer, |
272 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 272 | const struct GNUNET_ATS_Information *atsi) |
273 | { | 273 | { |
274 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 274 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
275 | "test: peer %s connected\n", | 275 | "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) | |||
943 | static int | 943 | static int |
944 | handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer, | 944 | handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer, |
945 | const struct GNUNET_MessageHeader *message, | 945 | const struct GNUNET_MessageHeader *message, |
946 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 946 | const struct GNUNET_ATS_Information *atsi) |
947 | { | 947 | { |
948 | const struct GNUNET_NSE_FloodMessage *incoming_flood; | 948 | const struct GNUNET_NSE_FloodMessage *incoming_flood; |
949 | struct GNUNET_TIME_Absolute ts; | 949 | struct GNUNET_TIME_Absolute ts; |
@@ -1097,7 +1097,7 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1097 | */ | 1097 | */ |
1098 | static void | 1098 | static void |
1099 | handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 1099 | handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
1100 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1100 | const struct GNUNET_ATS_Information *atsi) |
1101 | { | 1101 | { |
1102 | struct NSEPeerEntry *peer_entry; | 1102 | struct NSEPeerEntry *peer_entry; |
1103 | 1103 | ||
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, | |||
309 | static int | 309 | static int |
310 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | 310 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
311 | const struct GNUNET_MessageHeader *message, | 311 | const struct GNUNET_MessageHeader *message, |
312 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 312 | const struct GNUNET_ATS_Information *atsi) |
313 | { | 313 | { |
314 | char *dotOutFileNameFinished; | 314 | char *dotOutFileNameFinished; |
315 | FILE *dotOutFileFinished; | 315 | FILE *dotOutFileFinished; |
@@ -501,7 +501,7 @@ init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server, | |||
501 | */ | 501 | */ |
502 | static void | 502 | static void |
503 | connect_notify_peers (void *cls, const struct GNUNET_PeerIdentity *peer, | 503 | connect_notify_peers (void *cls, const struct GNUNET_PeerIdentity *peer, |
504 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 504 | const struct GNUNET_ATS_Information *atsi) |
505 | { | 505 | { |
506 | struct TestMessageContext *pos = cls; | 506 | struct TestMessageContext *pos = cls; |
507 | 507 | ||
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, | |||
348 | static int | 348 | static int |
349 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | 349 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
350 | const struct GNUNET_MessageHeader *message, | 350 | const struct GNUNET_MessageHeader *message, |
351 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 351 | const struct GNUNET_ATS_Information *atsi) |
352 | { | 352 | { |
353 | char *dotOutFileNameFinished; | 353 | char *dotOutFileNameFinished; |
354 | FILE *dotOutFileFinished; | 354 | FILE *dotOutFileFinished; |
@@ -540,7 +540,7 @@ init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server, | |||
540 | */ | 540 | */ |
541 | static void | 541 | static void |
542 | connect_notify_peers (void *cls, const struct GNUNET_PeerIdentity *peer, | 542 | connect_notify_peers (void *cls, const struct GNUNET_PeerIdentity *peer, |
543 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 543 | const struct GNUNET_ATS_Information *atsi) |
544 | { | 544 | { |
545 | struct TestMessageContext *pos = cls; | 545 | struct TestMessageContext *pos = cls; |
546 | 546 | ||
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) | |||
1886 | */ | 1886 | */ |
1887 | static void | 1887 | static void |
1888 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | 1888 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, |
1889 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1889 | const struct GNUNET_ATS_Information *atsi) |
1890 | { | 1890 | { |
1891 | struct GNUNET_TESTING_ConnectContext *ctx = cls; | 1891 | struct GNUNET_TESTING_ConnectContext *ctx = cls; |
1892 | 1892 | ||
@@ -2084,7 +2084,7 @@ reattempt_daemons_connect (void *cls, | |||
2084 | */ | 2084 | */ |
2085 | static void | 2085 | static void |
2086 | core_initial_iteration (void *cls, const struct GNUNET_PeerIdentity *peer, | 2086 | core_initial_iteration (void *cls, const struct GNUNET_PeerIdentity *peer, |
2087 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 2087 | const struct GNUNET_ATS_Information *atsi) |
2088 | { | 2088 | { |
2089 | struct GNUNET_TESTING_ConnectContext *ctx = cls; | 2089 | struct GNUNET_TESTING_ConnectContext *ctx = cls; |
2090 | 2090 | ||
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, | |||
3383 | */ | 3383 | */ |
3384 | static void | 3384 | static void |
3385 | core_connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | 3385 | core_connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, |
3386 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 3386 | const struct GNUNET_ATS_Information *atsi) |
3387 | { | 3387 | { |
3388 | struct SendHelloContext *send_hello_context = cls; | 3388 | struct SendHelloContext *send_hello_context = cls; |
3389 | struct PeerConnection *connection; | 3389 | struct PeerConnection *connection; |
@@ -4877,7 +4877,7 @@ perform_dfs (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num) | |||
4877 | */ | 4877 | */ |
4878 | static void | 4878 | static void |
4879 | internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | 4879 | internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *peer, |
4880 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 4880 | const struct GNUNET_ATS_Information *atsi) |
4881 | { | 4881 | { |
4882 | struct CoreContext *core_ctx = cls; | 4882 | struct CoreContext *core_ctx = cls; |
4883 | struct TopologyIterateContext *iter_ctx = core_ctx->iter_context; | 4883 | 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) | |||
635 | */ | 635 | */ |
636 | static void | 636 | static void |
637 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | 637 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, |
638 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 638 | const struct GNUNET_ATS_Information *atsi) |
639 | { | 639 | { |
640 | struct Peer *pos; | 640 | struct Peer *pos; |
641 | 641 | ||
@@ -1106,7 +1106,7 @@ read_friends_file (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1106 | static int | 1106 | static int |
1107 | handle_encrypted_hello (void *cls, const struct GNUNET_PeerIdentity *other, | 1107 | handle_encrypted_hello (void *cls, const struct GNUNET_PeerIdentity *other, |
1108 | const struct GNUNET_MessageHeader *message, | 1108 | const struct GNUNET_MessageHeader *message, |
1109 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1109 | const struct GNUNET_ATS_Information *atsi) |
1110 | { | 1110 | { |
1111 | struct Peer *peer; | 1111 | struct Peer *peer; |
1112 | struct GNUNET_PeerIdentity pid; | 1112 | 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; | |||
89 | */ | 89 | */ |
90 | static void | 90 | static void |
91 | transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target, | 91 | transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target, |
92 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 92 | const struct GNUNET_ATS_Information *ats, |
93 | uint32_t ats_count, | 93 | uint32_t ats_count, |
94 | const char * transport, | 94 | const char * transport, |
95 | const void * addr, | 95 | const void * addr, |
@@ -161,7 +161,7 @@ try_connect_if_allowed (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
161 | static struct GNUNET_TIME_Relative | 161 | static struct GNUNET_TIME_Relative |
162 | plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | 162 | plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, |
163 | const struct GNUNET_MessageHeader *message, | 163 | const struct GNUNET_MessageHeader *message, |
164 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 164 | const struct GNUNET_ATS_Information *ats, |
165 | uint32_t ats_count, struct Session *session, | 165 | uint32_t ats_count, struct Session *session, |
166 | const char *sender_address, | 166 | const char *sender_address, |
167 | uint16_t sender_address_len) | 167 | uint16_t sender_address_len) |
@@ -333,7 +333,7 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
333 | struct Session *session, | 333 | struct Session *session, |
334 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 334 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
335 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 335 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
336 | const struct GNUNET_TRANSPORT_ATS_Information * ats, | 336 | const struct GNUNET_ATS_Information * ats, |
337 | uint32_t ats_count) | 337 | uint32_t ats_count) |
338 | { | 338 | { |
339 | uint32_t bw_in = ntohl (bandwidth_in.value__); | 339 | uint32_t bw_in = ntohl (bandwidth_in.value__); |
@@ -382,11 +382,11 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
382 | static void | 382 | static void |
383 | neighbours_connect_notification (void *cls, | 383 | neighbours_connect_notification (void *cls, |
384 | const struct GNUNET_PeerIdentity *peer, | 384 | const struct GNUNET_PeerIdentity *peer, |
385 | const struct GNUNET_TRANSPORT_ATS_Information | 385 | const struct GNUNET_ATS_Information |
386 | *ats, uint32_t ats_count) | 386 | *ats, uint32_t ats_count) |
387 | { | 387 | { |
388 | char buf[sizeof (struct ConnectInfoMessage) + | 388 | char buf[sizeof (struct ConnectInfoMessage) + |
389 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)]; | 389 | ats_count * sizeof (struct GNUNET_ATS_Information)]; |
390 | struct ConnectInfoMessage *connect_msg = (struct ConnectInfoMessage *) buf; | 390 | struct ConnectInfoMessage *connect_msg = (struct ConnectInfoMessage *) buf; |
391 | 391 | ||
392 | connect_msg->header.size = htons (sizeof (buf)); | 392 | connect_msg->header.size = htons (sizeof (buf)); |
@@ -394,7 +394,7 @@ neighbours_connect_notification (void *cls, | |||
394 | connect_msg->ats_count = htonl (ats_count); | 394 | connect_msg->ats_count = htonl (ats_count); |
395 | connect_msg->id = *peer; | 395 | connect_msg->id = *peer; |
396 | memcpy (&connect_msg->ats, &connect_msg->ats, | 396 | memcpy (&connect_msg->ats, &connect_msg->ats, |
397 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 397 | ats_count * sizeof (struct GNUNET_ATS_Information)); |
398 | GST_clients_broadcast (&connect_msg->header, GNUNET_NO); | 398 | GST_clients_broadcast (&connect_msg->header, GNUNET_NO); |
399 | } | 399 | } |
400 | 400 | ||
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index cb79787ce..45d01e1e2 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c | |||
@@ -556,7 +556,7 @@ struct TestConnectionContext | |||
556 | */ | 556 | */ |
557 | static void | 557 | static void |
558 | test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour, | 558 | test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour, |
559 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 559 | const struct GNUNET_ATS_Information *ats, |
560 | uint32_t ats_count, | 560 | uint32_t ats_count, |
561 | const char * transport, | 561 | const char * transport, |
562 | const void * addr, | 562 | const void * addr, |
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index 75b9bb93f..9252a5c10 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c | |||
@@ -328,7 +328,7 @@ client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client) | |||
328 | static void | 328 | static void |
329 | notify_client_about_neighbour (void *cls, | 329 | notify_client_about_neighbour (void *cls, |
330 | const struct GNUNET_PeerIdentity *peer, | 330 | const struct GNUNET_PeerIdentity *peer, |
331 | const struct GNUNET_TRANSPORT_ATS_Information | 331 | const struct GNUNET_ATS_Information |
332 | *ats, uint32_t ats_count, | 332 | *ats, uint32_t ats_count, |
333 | const char * transport, | 333 | const char * transport, |
334 | const void * addr, | 334 | const void * addr, |
@@ -340,7 +340,7 @@ notify_client_about_neighbour (void *cls, | |||
340 | 340 | ||
341 | size = | 341 | size = |
342 | sizeof (struct ConnectInfoMessage) + | 342 | sizeof (struct ConnectInfoMessage) + |
343 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information); | 343 | ats_count * sizeof (struct GNUNET_ATS_Information); |
344 | GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE); | 344 | GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE); |
345 | cim = GNUNET_malloc (size); | 345 | cim = GNUNET_malloc (size); |
346 | cim->header.size = htons (size); | 346 | cim->header.size = htons (size); |
@@ -348,7 +348,7 @@ notify_client_about_neighbour (void *cls, | |||
348 | cim->ats_count = htonl (ats_count); | 348 | cim->ats_count = htonl (ats_count); |
349 | cim->id = *peer; | 349 | cim->id = *peer; |
350 | memcpy (&cim->ats, ats, | 350 | memcpy (&cim->ats, ats, |
351 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)); | 351 | ats_count * sizeof (struct GNUNET_ATS_Information)); |
352 | unicast (tc, &cim->header, GNUNET_NO); | 352 | unicast (tc, &cim->header, GNUNET_NO); |
353 | GNUNET_free (cim); | 353 | GNUNET_free (cim); |
354 | } | 354 | } |
@@ -819,7 +819,7 @@ clients_handle_peer_address_lookup (void *cls, | |||
819 | */ | 819 | */ |
820 | static void | 820 | static void |
821 | output_addresses (void *cls, const struct GNUNET_PeerIdentity *peer, | 821 | output_addresses (void *cls, const struct GNUNET_PeerIdentity *peer, |
822 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 822 | const struct GNUNET_ATS_Information *ats, |
823 | uint32_t ats_count, | 823 | uint32_t ats_count, |
824 | const char * transport, | 824 | const char * transport, |
825 | const void * addr, | 825 | const void * addr, |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 086768dce..f0dca6874 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -193,7 +193,7 @@ struct NeighbourMapEntry | |||
193 | /** | 193 | /** |
194 | * Performance data for the peer. | 194 | * Performance data for the peer. |
195 | */ | 195 | */ |
196 | //struct GNUNET_TRANSPORT_ATS_Information *ats; | 196 | //struct GNUNET_ATS_Information *ats; |
197 | 197 | ||
198 | /** | 198 | /** |
199 | * Are we currently trying to send a message? If so, which one? | 199 | * Are we currently trying to send a message? If so, which one? |
@@ -631,7 +631,7 @@ void | |||
631 | GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | 631 | GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, |
632 | const char *plugin_name, const void *address, | 632 | const char *plugin_name, const void *address, |
633 | size_t address_len, struct Session *session, | 633 | size_t address_len, struct Session *session, |
634 | const struct GNUNET_TRANSPORT_ATS_Information | 634 | const struct GNUNET_ATS_Information |
635 | *ats, uint32_t ats_count) | 635 | *ats, uint32_t ats_count) |
636 | { | 636 | { |
637 | struct NeighbourMapEntry *n; | 637 | struct NeighbourMapEntry *n; |
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index 88e24b73a..5b4929c2c 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h | |||
@@ -160,7 +160,7 @@ typedef void (*GST_NeighbourIterator) (void *cls, | |||
160 | const struct GNUNET_PeerIdentity * | 160 | const struct GNUNET_PeerIdentity * |
161 | neighbour, | 161 | neighbour, |
162 | const struct | 162 | const struct |
163 | GNUNET_TRANSPORT_ATS_Information * ats, | 163 | GNUNET_ATS_Information * ats, |
164 | uint32_t ats_count, | 164 | uint32_t ats_count, |
165 | const char * transport, | 165 | const char * transport, |
166 | const void * addr, | 166 | const void * addr, |
@@ -205,7 +205,7 @@ void | |||
205 | GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | 205 | GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, |
206 | const char *plugin_name, const void *address, | 206 | const char *plugin_name, const void *address, |
207 | size_t address_len, struct Session *session, | 207 | size_t address_len, struct Session *session, |
208 | const struct GNUNET_TRANSPORT_ATS_Information | 208 | const struct GNUNET_ATS_Information |
209 | *ats, uint32_t ats_count); | 209 | *ats, uint32_t ats_count); |
210 | 210 | ||
211 | 211 | ||
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index f0cc12e41..6b6b01768 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -975,9 +975,9 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender, | |||
975 | /* validity achieved, remember it! */ | 975 | /* validity achieved, remember it! */ |
976 | ve->valid_until = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION); | 976 | ve->valid_until = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION); |
977 | { | 977 | { |
978 | struct GNUNET_TRANSPORT_ATS_Information ats; | 978 | struct GNUNET_ATS_Information ats; |
979 | 979 | ||
980 | ats.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY); | 980 | ats.type = htonl (GNUNET_ATS_QUALITY_NET_DELAY); |
981 | ats.value = htonl ((uint32_t) GNUNET_TIME_absolute_get_duration (ve->send_time).rel_value); | 981 | ats.value = htonl ((uint32_t) GNUNET_TIME_absolute_get_duration (ve->send_time).rel_value); |
982 | GNUNET_ATS_address_update (GST_ats, &ve->pid, | 982 | GNUNET_ATS_address_update (GST_ats, &ve->pid, |
983 | ve->transport_name,ve->addr, ve->addrlen, NULL, | 983 | ve->transport_name,ve->addr, ve->addrlen, NULL, |
diff --git a/src/transport/gnunet-transport-connect-running-peers.c b/src/transport/gnunet-transport-connect-running-peers.c index 131961c23..a0e3b93a2 100644 --- a/src/transport/gnunet-transport-connect-running-peers.c +++ b/src/transport/gnunet-transport-connect-running-peers.c | |||
@@ -200,7 +200,7 @@ read: | |||
200 | static void | 200 | static void |
201 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 201 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
202 | const struct GNUNET_MessageHeader *message, | 202 | const struct GNUNET_MessageHeader *message, |
203 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 203 | const struct GNUNET_ATS_Information *ats, |
204 | uint32_t ats_count) | 204 | uint32_t ats_count) |
205 | { | 205 | { |
206 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 206 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -219,7 +219,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
219 | 219 | ||
220 | static void | 220 | static void |
221 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 221 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
222 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 222 | const struct GNUNET_ATS_Information *ats, |
223 | uint32_t ats_count) | 223 | uint32_t ats_count) |
224 | { | 224 | { |
225 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", | 225 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", |
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 7e740293b..784dd3002 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -257,13 +257,13 @@ http_plugin_receive (void *cls, const struct GNUNET_PeerIdentity * peer, | |||
257 | { | 257 | { |
258 | struct Session *s = cls; | 258 | struct Session *s = cls; |
259 | struct Plugin *plugin = s->plugin; | 259 | struct Plugin *plugin = s->plugin; |
260 | struct GNUNET_TRANSPORT_ATS_Information distance; | 260 | struct GNUNET_ATS_Information distance; |
261 | struct GNUNET_TIME_Relative delay; | 261 | struct GNUNET_TIME_Relative delay; |
262 | 262 | ||
263 | distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); | 263 | distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
264 | distance.value = htonl (1); | 264 | distance.value = htonl (1); |
265 | 265 | ||
266 | delay = plugin->env->receive (plugin->env->cls, &s->target, message, (const struct GNUNET_TRANSPORT_ATS_Information*) &distance, 1, s, s->addr, s->addrlen); | 266 | delay = plugin->env->receive (plugin->env->cls, &s->target, message, (const struct GNUNET_ATS_Information*) &distance, 1, s, s->addr, s->addrlen); |
267 | return delay; | 267 | return delay; |
268 | } | 268 | } |
269 | 269 | ||
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index d85d5fc82..8856b9262 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -1661,7 +1661,7 @@ delayed_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1661 | { | 1661 | { |
1662 | struct Session *session = cls; | 1662 | struct Session *session = cls; |
1663 | struct GNUNET_TIME_Relative delay; | 1663 | struct GNUNET_TIME_Relative delay; |
1664 | struct GNUNET_TRANSPORT_ATS_Information ats; | 1664 | struct GNUNET_ATS_Information ats; |
1665 | 1665 | ||
1666 | session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK; | 1666 | session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK; |
1667 | delay = | 1667 | delay = |
@@ -1718,13 +1718,13 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client, | |||
1718 | GNUNET_STATISTICS_update (plugin->env->stats, | 1718 | GNUNET_STATISTICS_update (plugin->env->stats, |
1719 | gettext_noop ("# bytes received via TCP"), | 1719 | gettext_noop ("# bytes received via TCP"), |
1720 | ntohs (message->size), GNUNET_NO); | 1720 | ntohs (message->size), GNUNET_NO); |
1721 | struct GNUNET_TRANSPORT_ATS_Information distance; | 1721 | struct GNUNET_ATS_Information distance; |
1722 | 1722 | ||
1723 | distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); | 1723 | distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
1724 | distance.value = htonl (1); | 1724 | distance.value = htonl (1); |
1725 | delay = | 1725 | delay = |
1726 | plugin->env->receive (plugin->env->cls, &session->target, message, | 1726 | plugin->env->receive (plugin->env->cls, &session->target, message, |
1727 | (const struct GNUNET_TRANSPORT_ATS_Information *) | 1727 | (const struct GNUNET_ATS_Information *) |
1728 | &distance, 1, session, | 1728 | &distance, 1, session, |
1729 | (GNUNET_YES == | 1729 | (GNUNET_YES == |
1730 | session->inbound) ? NULL : session->connect_addr, | 1730 | session->inbound) ? NULL : session->connect_addr, |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 0b37b9be4..f4a806723 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -759,10 +759,10 @@ process_inbound_tokenized_messages (void *cls, void *client, | |||
759 | { | 759 | { |
760 | struct Plugin *plugin = cls; | 760 | struct Plugin *plugin = cls; |
761 | struct SourceInformation *si = client; | 761 | struct SourceInformation *si = client; |
762 | struct GNUNET_TRANSPORT_ATS_Information distance; | 762 | struct GNUNET_ATS_Information distance; |
763 | 763 | ||
764 | /* setup ATS */ | 764 | /* setup ATS */ |
765 | distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); | 765 | distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
766 | distance.value = htonl (1); | 766 | distance.value = htonl (1); |
767 | 767 | ||
768 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 768 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 14034e683..32f047d65 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -719,9 +719,9 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender, | |||
719 | const struct GNUNET_MessageHeader *currhdr, | 719 | const struct GNUNET_MessageHeader *currhdr, |
720 | const struct sockaddr_un *un, size_t fromlen) | 720 | const struct sockaddr_un *un, size_t fromlen) |
721 | { | 721 | { |
722 | struct GNUNET_TRANSPORT_ATS_Information distance; | 722 | struct GNUNET_ATS_Information distance; |
723 | 723 | ||
724 | distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); | 724 | distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
725 | distance.value = htonl (UNIX_DIRECT_DISTANCE); | 725 | distance.value = htonl (UNIX_DIRECT_DISTANCE); |
726 | 726 | ||
727 | GNUNET_assert (fromlen >= sizeof (struct sockaddr_un)); | 727 | GNUNET_assert (fromlen >= sizeof (struct sockaddr_un)); |
@@ -731,7 +731,7 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender, | |||
731 | un->sun_path); | 731 | un->sun_path); |
732 | #endif | 732 | #endif |
733 | plugin->env->receive (plugin->env->cls, sender, currhdr, | 733 | plugin->env->receive (plugin->env->cls, sender, currhdr, |
734 | (const struct GNUNET_TRANSPORT_ATS_Information *) | 734 | (const struct GNUNET_ATS_Information *) |
735 | &distance, 1, NULL, un->sun_path, | 735 | &distance, 1, NULL, un->sun_path, |
736 | strlen (un->sun_path) + 1); | 736 | strlen (un->sun_path) + 1); |
737 | } | 737 | } |
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 51da7ec32..b3faf4480 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -2334,9 +2334,9 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
2334 | struct Session *session = (struct Session *) client; | 2334 | struct Session *session = (struct Session *) client; |
2335 | struct Plugin *plugin = (struct Plugin *) cls; | 2335 | struct Plugin *plugin = (struct Plugin *) cls; |
2336 | 2336 | ||
2337 | struct GNUNET_TRANSPORT_ATS_Information distance; | 2337 | struct GNUNET_ATS_Information distance; |
2338 | 2338 | ||
2339 | distance.type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); | 2339 | distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
2340 | distance.value = htonl (1); | 2340 | distance.value = htonl (1); |
2341 | 2341 | ||
2342 | #if DEBUG_wlan | 2342 | #if DEBUG_wlan |
@@ -2349,7 +2349,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
2349 | #endif | 2349 | #endif |
2350 | 2350 | ||
2351 | plugin->env->receive (plugin->env->cls, &(session->target), hdr, | 2351 | plugin->env->receive (plugin->env->cls, &(session->target), hdr, |
2352 | (const struct GNUNET_TRANSPORT_ATS_Information *) | 2352 | (const struct GNUNET_ATS_Information *) |
2353 | &distance, 1, session, | 2353 | &distance, 1, session, |
2354 | (const char *) &session->mac->addr, | 2354 | (const char *) &session->mac->addr, |
2355 | sizeof (session->mac->addr)); | 2355 | sizeof (session->mac->addr)); |
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index 8e4a40efc..f73fea237 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c | |||
@@ -234,7 +234,7 @@ get_size () | |||
234 | static void | 234 | static void |
235 | notify_receive_new (void *cls, const struct GNUNET_PeerIdentity *peer, | 235 | notify_receive_new (void *cls, const struct GNUNET_PeerIdentity *peer, |
236 | const struct GNUNET_MessageHeader *message, | 236 | const struct GNUNET_MessageHeader *message, |
237 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 237 | const struct GNUNET_ATS_Information *ats, |
238 | uint32_t ats_count) | 238 | uint32_t ats_count) |
239 | { | 239 | { |
240 | const struct TestMessage *hdr; | 240 | const struct TestMessage *hdr; |
@@ -576,7 +576,7 @@ exchange_hello (void *cls, const struct GNUNET_MessageHeader *message) | |||
576 | 576 | ||
577 | static void | 577 | static void |
578 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 578 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
579 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 579 | const struct GNUNET_ATS_Information *ats, |
580 | uint32_t ats_count) | 580 | uint32_t ats_count) |
581 | { | 581 | { |
582 | connected++; | 582 | connected++; |
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 70658d40b..81a0b39e1 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -140,7 +140,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
140 | static void | 140 | static void |
141 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 141 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
142 | const struct GNUNET_MessageHeader *message, | 142 | const struct GNUNET_MessageHeader *message, |
143 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 143 | const struct GNUNET_ATS_Information *ats, |
144 | uint32_t ats_count) | 144 | uint32_t ats_count) |
145 | { | 145 | { |
146 | struct PeerContext * p = cls; | 146 | struct PeerContext * p = cls; |
@@ -233,7 +233,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
233 | 233 | ||
234 | static void | 234 | static void |
235 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 235 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
236 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 236 | const struct GNUNET_ATS_Information *ats, |
237 | uint32_t ats_count) | 237 | uint32_t ats_count) |
238 | { | 238 | { |
239 | static int c; | 239 | static int c; |
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c index ad169df4c..e20ed8ee5 100644 --- a/src/transport/test_transport_api_disconnect.c +++ b/src/transport/test_transport_api_disconnect.c | |||
@@ -189,7 +189,7 @@ end_badly () | |||
189 | static void | 189 | static void |
190 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 190 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
191 | const struct GNUNET_MessageHeader *message, | 191 | const struct GNUNET_MessageHeader *message, |
192 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 192 | const struct GNUNET_ATS_Information *ats, |
193 | uint32_t ats_count) | 193 | uint32_t ats_count) |
194 | { | 194 | { |
195 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 195 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -233,7 +233,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
233 | 233 | ||
234 | static void | 234 | static void |
235 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 235 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
236 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 236 | const struct GNUNET_ATS_Information *ats, |
237 | uint32_t ats_count) | 237 | uint32_t ats_count) |
238 | { | 238 | { |
239 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", | 239 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", |
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index 66e1917a1..20dc3ed2e 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c | |||
@@ -138,7 +138,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
138 | static void | 138 | static void |
139 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 139 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
140 | const struct GNUNET_MessageHeader *message, | 140 | const struct GNUNET_MessageHeader *message, |
141 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 141 | const struct GNUNET_ATS_Information *ats, |
142 | uint32_t ats_count) | 142 | uint32_t ats_count) |
143 | { | 143 | { |
144 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 144 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -185,7 +185,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
185 | 185 | ||
186 | static void | 186 | static void |
187 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 187 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
188 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 188 | const struct GNUNET_ATS_Information *ats, |
189 | uint32_t ats_count) | 189 | uint32_t ats_count) |
190 | { | 190 | { |
191 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", | 191 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", |
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 6ccb7c8d7..e4b635905 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c | |||
@@ -201,7 +201,7 @@ get_size (unsigned int iter) | |||
201 | static void | 201 | static void |
202 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 202 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
203 | const struct GNUNET_MessageHeader *message, | 203 | const struct GNUNET_MessageHeader *message, |
204 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 204 | const struct GNUNET_ATS_Information *ats, |
205 | uint32_t ats_count) | 205 | uint32_t ats_count) |
206 | { | 206 | { |
207 | static int n; | 207 | static int n; |
@@ -356,7 +356,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
356 | 356 | ||
357 | static void | 357 | static void |
358 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 358 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
359 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 359 | const struct GNUNET_ATS_Information *ats, |
360 | uint32_t ats_count) | 360 | uint32_t ats_count) |
361 | { | 361 | { |
362 | 362 | ||
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c index 89a74e9a9..aff36853a 100644 --- a/src/transport/test_transport_api_timeout.c +++ b/src/transport/test_transport_api_timeout.c | |||
@@ -161,7 +161,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
161 | static void | 161 | static void |
162 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 162 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
163 | const struct GNUNET_MessageHeader *message, | 163 | const struct GNUNET_MessageHeader *message, |
164 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 164 | const struct GNUNET_ATS_Information *ats, |
165 | uint32_t ats_count) | 165 | uint32_t ats_count) |
166 | { | 166 | { |
167 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 167 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -171,7 +171,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
171 | 171 | ||
172 | static void | 172 | static void |
173 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 173 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
174 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 174 | const struct GNUNET_ATS_Information *ats, |
175 | uint32_t ats_count) | 175 | uint32_t ats_count) |
176 | { | 176 | { |
177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", | 177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", |
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c index 7a08d590d..a59b6c1d3 100644 --- a/src/transport/test_transport_api_unreliability.c +++ b/src/transport/test_transport_api_unreliability.c | |||
@@ -269,7 +269,7 @@ get_bit (const char *map, unsigned int bit) | |||
269 | static void | 269 | static void |
270 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 270 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
271 | const struct GNUNET_MessageHeader *message, | 271 | const struct GNUNET_MessageHeader *message, |
272 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 272 | const struct GNUNET_ATS_Information *ats, |
273 | uint32_t ats_count) | 273 | uint32_t ats_count) |
274 | { | 274 | { |
275 | static int n; | 275 | static int n; |
@@ -413,7 +413,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
413 | 413 | ||
414 | static void | 414 | static void |
415 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 415 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
416 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 416 | const struct GNUNET_ATS_Information *ats, |
417 | uint32_t ats_count) | 417 | uint32_t ats_count) |
418 | { | 418 | { |
419 | 419 | ||
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c index c6062c96a..c8638cd23 100644 --- a/src/transport/test_transport_api_unreliability_constant.c +++ b/src/transport/test_transport_api_unreliability_constant.c | |||
@@ -217,7 +217,7 @@ get_size (unsigned int iter) | |||
217 | static void | 217 | static void |
218 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 218 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
219 | const struct GNUNET_MessageHeader *message, | 219 | const struct GNUNET_MessageHeader *message, |
220 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 220 | const struct GNUNET_ATS_Information *ats, |
221 | uint32_t ats_count) | 221 | uint32_t ats_count) |
222 | { | 222 | { |
223 | static int n; | 223 | static int n; |
@@ -373,7 +373,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
373 | 373 | ||
374 | static void | 374 | static void |
375 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 375 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
376 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 376 | const struct GNUNET_ATS_Information *ats, |
377 | uint32_t ats_count) | 377 | uint32_t ats_count) |
378 | { | 378 | { |
379 | 379 | ||
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c index 68fac8e95..721154f9e 100644 --- a/src/transport/test_transport_startonly.c +++ b/src/transport/test_transport_startonly.c | |||
@@ -92,7 +92,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
92 | 92 | ||
93 | static void | 93 | static void |
94 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 94 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
95 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 95 | const struct GNUNET_ATS_Information *ats, |
96 | uint32_t ats_count) | 96 | uint32_t ats_count) |
97 | { | 97 | { |
98 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n", | 98 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n", |
@@ -110,7 +110,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
110 | static void | 110 | static void |
111 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 111 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
112 | const struct GNUNET_MessageHeader *message, | 112 | const struct GNUNET_MessageHeader *message, |
113 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 113 | const struct GNUNET_ATS_Information *ats, |
114 | uint32_t ats_count) | 114 | uint32_t ats_count) |
115 | { | 115 | { |
116 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n"); | 116 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n"); |
diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c index 44f050131..266933580 100644 --- a/src/transport/test_transport_testing.c +++ b/src/transport/test_transport_testing.c | |||
@@ -104,7 +104,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | |||
104 | 104 | ||
105 | static void | 105 | static void |
106 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 106 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
107 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 107 | const struct GNUNET_ATS_Information *ats, |
108 | uint32_t ats_count) | 108 | uint32_t ats_count) |
109 | { | 109 | { |
110 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n", | 110 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n", |
@@ -122,7 +122,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
122 | static void | 122 | static void |
123 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 123 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
124 | const struct GNUNET_MessageHeader *message, | 124 | const struct GNUNET_MessageHeader *message, |
125 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 125 | const struct GNUNET_ATS_Information *ats, |
126 | uint32_t ats_count) | 126 | uint32_t ats_count) |
127 | { | 127 | { |
128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n"); | 128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n"); |
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index 2e0ca1e55..66844de31 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -86,7 +86,7 @@ find_connecting_context ( struct GNUNET_TRANSPORT_TESTING_handle *tth, | |||
86 | 86 | ||
87 | static void | 87 | static void |
88 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 88 | notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
89 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 89 | const struct GNUNET_ATS_Information *ats, |
90 | uint32_t ats_count) | 90 | uint32_t ats_count) |
91 | { | 91 | { |
92 | struct PeerContext *p = cls; | 92 | struct PeerContext *p = cls; |
@@ -159,7 +159,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
159 | static void | 159 | static void |
160 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | 160 | notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, |
161 | const struct GNUNET_MessageHeader *message, | 161 | const struct GNUNET_MessageHeader *message, |
162 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 162 | const struct GNUNET_ATS_Information *ats, |
163 | uint32_t ats_count) | 163 | uint32_t ats_count) |
164 | { | 164 | { |
165 | struct PeerContext *p = cls; | 165 | struct PeerContext *p = cls; |
diff --git a/src/transport/transport.h b/src/transport/transport.h index 6ccc8abd2..440b0dfed 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -114,7 +114,7 @@ struct ConnectInfoMessage | |||
114 | * First of the ATS information blocks (we must have at least | 114 | * First of the ATS information blocks (we must have at least |
115 | * one due to the 0-termination requirement). | 115 | * one due to the 0-termination requirement). |
116 | */ | 116 | */ |
117 | struct GNUNET_TRANSPORT_ATS_Information ats; | 117 | struct GNUNET_ATS_Information ats; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | 120 | ||
@@ -224,7 +224,7 @@ struct InboundMessage | |||
224 | * First of the ATS information blocks (we must have at least | 224 | * First of the ATS information blocks (we must have at least |
225 | * one due to the 0-termination requirement). | 225 | * one due to the 0-termination requirement). |
226 | */ | 226 | */ |
227 | struct GNUNET_TRANSPORT_ATS_Information ats; | 227 | struct GNUNET_ATS_Information ats; |
228 | }; | 228 | }; |
229 | 229 | ||
230 | 230 | ||
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 3fdbcbd68..a258172d5 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -466,7 +466,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg) | |||
466 | ats_count = ntohl (cim->ats_count); | 466 | ats_count = ntohl (cim->ats_count); |
467 | if (size != | 467 | if (size != |
468 | sizeof (struct ConnectInfoMessage) + | 468 | sizeof (struct ConnectInfoMessage) + |
469 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)) | 469 | ats_count * sizeof (struct GNUNET_ATS_Information)) |
470 | { | 470 | { |
471 | GNUNET_break (0); | 471 | GNUNET_break (0); |
472 | break; | 472 | break; |
@@ -548,7 +548,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg) | |||
548 | imm = (const struct GNUNET_MessageHeader *) &((&(im->ats))[ats_count + 1]); | 548 | imm = (const struct GNUNET_MessageHeader *) &((&(im->ats))[ats_count + 1]); |
549 | 549 | ||
550 | if (ntohs (imm->size) + sizeof (struct InboundMessage) + | 550 | if (ntohs (imm->size) + sizeof (struct InboundMessage) + |
551 | ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) != size) | 551 | ats_count * sizeof (struct GNUNET_ATS_Information) != size) |
552 | { | 552 | { |
553 | GNUNET_break (0); | 553 | GNUNET_break (0); |
554 | break; | 554 | break; |
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 | |||
1025 | const struct GNUNET_PeerIdentity *sender | 1025 | const struct GNUNET_PeerIdentity *sender |
1026 | __attribute__ ((unused)), | 1026 | __attribute__ ((unused)), |
1027 | const struct GNUNET_MessageHeader *message, | 1027 | const struct GNUNET_MessageHeader *message, |
1028 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 1028 | const struct GNUNET_ATS_Information *atsi |
1029 | __attribute__ ((unused))) | 1029 | __attribute__ ((unused))) |
1030 | { | 1030 | { |
1031 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); | 1031 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); |
@@ -1133,7 +1133,7 @@ receive_tcp_remote (void *cls | |||
1133 | const struct GNUNET_PeerIdentity *sender | 1133 | const struct GNUNET_PeerIdentity *sender |
1134 | __attribute__ ((unused)), | 1134 | __attribute__ ((unused)), |
1135 | const struct GNUNET_MessageHeader *message, | 1135 | const struct GNUNET_MessageHeader *message, |
1136 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 1136 | const struct GNUNET_ATS_Information *atsi |
1137 | __attribute__ ((unused))) | 1137 | __attribute__ ((unused))) |
1138 | { | 1138 | { |
1139 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1139 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
@@ -1209,7 +1209,7 @@ receive_udp_remote (void *cls | |||
1209 | const struct GNUNET_PeerIdentity *sender | 1209 | const struct GNUNET_PeerIdentity *sender |
1210 | __attribute__ ((unused)), | 1210 | __attribute__ ((unused)), |
1211 | const struct GNUNET_MessageHeader *message, | 1211 | const struct GNUNET_MessageHeader *message, |
1212 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 1212 | const struct GNUNET_ATS_Information *atsi |
1213 | __attribute__ ((unused))) | 1213 | __attribute__ ((unused))) |
1214 | { | 1214 | { |
1215 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1215 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
@@ -1289,7 +1289,7 @@ receive_udp_service (void *cls | |||
1289 | const struct GNUNET_PeerIdentity *sender | 1289 | const struct GNUNET_PeerIdentity *sender |
1290 | __attribute__ ((unused)), | 1290 | __attribute__ ((unused)), |
1291 | const struct GNUNET_MessageHeader *message, | 1291 | const struct GNUNET_MessageHeader *message, |
1292 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 1292 | const struct GNUNET_ATS_Information *atsi |
1293 | __attribute__ ((unused))) | 1293 | __attribute__ ((unused))) |
1294 | { | 1294 | { |
1295 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1295 | 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) | |||
340 | 340 | ||
341 | void | 341 | void |
342 | send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer, | 342 | send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer, |
343 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 343 | const struct GNUNET_ATS_Information *atsi |
344 | __attribute__ ((unused))) | 344 | __attribute__ ((unused))) |
345 | { | 345 | { |
346 | /* peer == NULL means that all peers in this request are connected */ | 346 | /* peer == NULL means that all peers in this request are connected */ |
@@ -871,7 +871,7 @@ receive_udp_back (void *cls | |||
871 | const struct GNUNET_PeerIdentity *sender | 871 | const struct GNUNET_PeerIdentity *sender |
872 | __attribute__ ((unused)), | 872 | __attribute__ ((unused)), |
873 | const struct GNUNET_MessageHeader *message, | 873 | const struct GNUNET_MessageHeader *message, |
874 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 874 | const struct GNUNET_ATS_Information *atsi |
875 | __attribute__ ((unused))) | 875 | __attribute__ ((unused))) |
876 | { | 876 | { |
877 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 877 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
@@ -1050,7 +1050,7 @@ receive_tcp_back (void *cls | |||
1050 | const struct GNUNET_PeerIdentity *sender | 1050 | const struct GNUNET_PeerIdentity *sender |
1051 | __attribute__ ((unused)), | 1051 | __attribute__ ((unused)), |
1052 | const struct GNUNET_MessageHeader *message, | 1052 | const struct GNUNET_MessageHeader *message, |
1053 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 1053 | const struct GNUNET_ATS_Information *atsi |
1054 | __attribute__ ((unused))) | 1054 | __attribute__ ((unused))) |
1055 | { | 1055 | { |
1056 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1056 | 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); | |||
56 | 56 | ||
57 | void | 57 | void |
58 | send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer, | 58 | send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer, |
59 | const struct GNUNET_TRANSPORT_ATS_Information *atsi); | 59 | const struct GNUNET_ATS_Information *atsi); |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * The configuration to use | 62 | * 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) | |||
324 | 324 | ||
325 | void | 325 | void |
326 | mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 326 | mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
327 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 327 | const struct GNUNET_ATS_Information *atsi |
328 | __attribute__ ((unused))) | 328 | __attribute__ ((unused))) |
329 | { | 329 | { |
330 | if (NULL == peer) | 330 | if (NULL == peer) |
@@ -394,7 +394,7 @@ receive_mesh_query (void *cls | |||
394 | const struct GNUNET_PeerIdentity *sender | 394 | const struct GNUNET_PeerIdentity *sender |
395 | __attribute__ ((unused)), | 395 | __attribute__ ((unused)), |
396 | const struct GNUNET_MessageHeader *message, | 396 | const struct GNUNET_MessageHeader *message, |
397 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 397 | const struct GNUNET_ATS_Information *atsi |
398 | __attribute__ ((unused))) | 398 | __attribute__ ((unused))) |
399 | { | 399 | { |
400 | struct dns_pkt *dns = (struct dns_pkt *) (message + 1); | 400 | struct dns_pkt *dns = (struct dns_pkt *) (message + 1); |
@@ -428,7 +428,7 @@ receive_mesh_answer (void *cls | |||
428 | __attribute__ ((unused)), | 428 | __attribute__ ((unused)), |
429 | const struct GNUNET_PeerIdentity *sender, | 429 | const struct GNUNET_PeerIdentity *sender, |
430 | const struct GNUNET_MessageHeader *message, | 430 | const struct GNUNET_MessageHeader *message, |
431 | const struct GNUNET_TRANSPORT_ATS_Information *atsi | 431 | const struct GNUNET_ATS_Information *atsi |
432 | __attribute__ ((unused))) | 432 | __attribute__ ((unused))) |
433 | { | 433 | { |
434 | /* TODo: size check */ | 434 | /* TODo: size check */ |