aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-29 20:47:18 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-29 20:47:18 +0000
commit71ea5bd2d05058008e604ffd42993be9c7250e04 (patch)
treea5074671ddfaa9d1621a4182fc95a91a98b3d536
parentb335777fd435142c16eb05e86c8a64a4b1a45447 (diff)
downloadgnunet-71ea5bd2d05058008e604ffd42993be9c7250e04.tar.gz
gnunet-71ea5bd2d05058008e604ffd42993be9c7250e04.zip
-fixing indentation
-rw-r--r--po/de.po261
-rw-r--r--po/es.po260
-rw-r--r--po/sv.po261
-rw-r--r--po/vi.po261
-rw-r--r--po/zh_CN.po258
-rw-r--r--src/ats/ats_api.c4
-rw-r--r--src/ats/ats_api_performance.c4
-rw-r--r--src/ats/ats_api_scheduling.c81
-rw-r--r--src/ats/gnunet-service-ats_addresses.c43
-rw-r--r--src/ats/gnunet-service-ats_addresses.h3
-rw-r--r--src/ats/gnunet-service-ats_scheduling.c23
-rw-r--r--src/ats/gnunet-service-ats_scheduling.h5
-rw-r--r--src/ats/test_ats_api_scheduling.c12
-rw-r--r--src/core/core_api.c4
-rw-r--r--src/core/gnunet-core-list-connections.c31
-rw-r--r--src/core/gnunet-service-core_clients.c26
-rw-r--r--src/core/gnunet-service-core_neighbours.c8
-rw-r--r--src/core/gnunet-service-core_sessions.c10
-rw-r--r--src/core/test_core_quota_compliance.c16
-rw-r--r--src/datastore/datastore_api.c3
-rw-r--r--src/dht/test_dht_multipeer.c2
-rw-r--r--src/dv/plugin_transport_dv.c15
-rw-r--r--src/dv/test_transport_api_dv.c17
-rw-r--r--src/fragmentation/fragmentation.c11
-rw-r--r--src/fs/fs_api.c2
-rw-r--r--src/fs/fs_search.c2
-rw-r--r--src/fs/gnunet-fs.c3
-rw-r--r--src/fs/gnunet-service-fs.c18
-rw-r--r--src/fs/gnunet-service-fs_lc.c54
-rw-r--r--src/fs/gnunet-service-fs_lc.h2
-rw-r--r--src/fs/gnunet-service-fs_pe.c48
-rw-r--r--src/fs/gnunet-service-fs_pr.c2
-rw-r--r--src/hello/address.c40
-rw-r--r--src/hello/hello.c28
-rw-r--r--src/hello/test_hello.c8
-rw-r--r--src/include/gnunet_ats_service.h17
-rw-r--r--src/include/gnunet_fs_service.h4
-rw-r--r--src/include/gnunet_hello_lib.h22
-rw-r--r--src/include/gnunet_os_lib.h10
-rw-r--r--src/include/gnunet_transport_service.h45
-rw-r--r--src/include/winproc.h20
-rw-r--r--src/mesh/gnunet-service-mesh.c44
-rw-r--r--src/mesh/mesh_tunnel_tree.c2
-rw-r--r--src/mesh/test_mesh_2dtorus.c58
-rw-r--r--src/mesh/test_mesh_small.c2
-rw-r--r--src/mesh/test_mesh_small_unicast_far.c2
-rw-r--r--src/mesh/test_mesh_tree_api.c39
-rw-r--r--src/nat/nat.c12
-rw-r--r--src/nat/test_nat.c9
-rw-r--r--src/nse/gnunet-nse-profiler.c2
-rw-r--r--src/nse/gnunet-service-nse.c41
-rw-r--r--src/nse/nse_api.c2
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c17
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c7
-rwxr-xr-xsrc/peerinfo/perf_peerinfo_api.c6
-rw-r--r--src/peerinfo/test_peerinfo_api.c16
-rw-r--r--src/testing/test_testing_2dtorus.c57
-rw-r--r--src/testing/test_testing_large_topology.c2
-rw-r--r--src/testing/test_testing_topology.c4
-rw-r--r--src/testing/test_testing_topology_blacklist.c2
-rw-r--r--src/testing/testing.c23
-rw-r--r--src/testing/testing_group.c21
-rw-r--r--src/testing/testing_peergroup.c18
-rw-r--r--src/transport/gnunet-service-transport.c39
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c2
-rw-r--r--src/transport/gnunet-service-transport_clients.c43
-rw-r--r--src/transport/gnunet-service-transport_hello.c15
-rw-r--r--src/transport/gnunet-service-transport_hello.h4
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c463
-rw-r--r--src/transport/gnunet-service-transport_neighbours.h19
-rw-r--r--src/transport/gnunet-service-transport_plugins.c17
-rw-r--r--src/transport/gnunet-service-transport_validation.c146
-rw-r--r--src/transport/gnunet-service-transport_validation.h18
-rw-r--r--src/transport/gnunet-transport-wlan-helper-dummy.c47
-rw-r--r--src/transport/gnunet-transport-wlan-helper.c1033
-rw-r--r--src/transport/gnunet-transport.c38
-rw-r--r--src/transport/plugin_transport_http.c41
-rw-r--r--src/transport/plugin_transport_http_server.c49
-rw-r--r--src/transport/plugin_transport_udp.c301
-rw-r--r--src/transport/plugin_transport_wlan.c23
-rw-r--r--src/transport/test_quota_compliance.c3
-rw-r--r--src/transport/test_transport_api_bidirectional_connect.c10
-rw-r--r--src/transport/test_transport_api_disconnect.c2
-rw-r--r--src/transport/test_transport_api_restart_1peer.c28
-rw-r--r--src/transport/test_transport_api_restart_2peers.c30
-rw-r--r--src/transport/test_transport_api_unreliability.c7
-rw-r--r--src/transport/transport-testing.c90
-rw-r--r--src/transport/transport-testing.h8
-rw-r--r--src/transport/transport.h2
-rw-r--r--src/transport/transport_api_address_lookup.c43
-rw-r--r--src/transport/transport_api_address_to_string.c22
-rw-r--r--src/util/common_logging.c209
-rw-r--r--src/util/crypto_random.c8
-rw-r--r--src/util/getopt.c4
-rw-r--r--src/util/os_network.c27
-rw-r--r--src/util/scheduler.c8
-rw-r--r--src/util/service.c12
-rw-r--r--src/util/strings.c4
-rw-r--r--src/util/test_bio.c2
-rw-r--r--src/util/test_common_logging_runtime_loglevels.c9
-rw-r--r--src/util/test_os_network.c7
-rw-r--r--src/vpn/gnunet-daemon-exit.c73
-rw-r--r--src/vpn/gnunet-daemon-vpn-dns.c6
-rw-r--r--src/vpn/gnunet-daemon-vpn-helper.c10
-rw-r--r--src/vpn/gnunet-daemon-vpn.c30
-rw-r--r--src/vpn/gnunet-service-dns.c73
106 files changed, 2629 insertions, 2726 deletions
diff --git a/po/de.po b/po/de.po
index cb112eaed..9790a99b2 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: GNUnet 0.7.0b\n" 8"Project-Id-Version: GNUnet 0.7.0b\n"
9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
10"POT-Creation-Date: 2011-11-26 14:53+0100\n" 10"POT-Creation-Date: 2011-11-29 21:38+0100\n"
11"PO-Revision-Date: 2006-03-17 21:37+0100\n" 11"PO-Revision-Date: 2006-03-17 21:37+0100\n"
12"Last-Translator: Nils Durner <durner@gnunet.org>\n" 12"Last-Translator: Nils Durner <durner@gnunet.org>\n"
13"Language-Team: German <de@li.org>\n" 13"Language-Team: German <de@li.org>\n"
@@ -30,8 +30,8 @@ msgstr ""
30#: src/datacache/plugin_datacache_mysql.c:517 30#: src/datacache/plugin_datacache_mysql.c:517
31#: src/datacache/plugin_datacache_mysql.c:526 31#: src/datacache/plugin_datacache_mysql.c:526
32#: src/datacache/plugin_datacache_mysql.c:598 32#: src/datacache/plugin_datacache_mysql.c:598
33#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:389 33#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:394
34#: src/include/gnunet_common.h:396 34#: src/include/gnunet_common.h:401
35#, c-format 35#, c-format
36msgid "`%s' failed at %s:%d with error: %s\n" 36msgid "`%s' failed at %s:%d with error: %s\n"
37msgstr "`%s' schlug bei %s:%d mit dem Fehler %s fehl\n" 37msgstr "`%s' schlug bei %s:%d mit dem Fehler %s fehl\n"
@@ -399,33 +399,33 @@ msgstr ""
399msgid "Peer `%s'\n" 399msgid "Peer `%s'\n"
400msgstr "Ich bin Peer `%s'.\n" 400msgstr "Ich bin Peer `%s'.\n"
401 401
402#: src/core/gnunet-core-list-connections.c:167 402#: src/core/gnunet-core-list-connections.c:178
403#: src/peerinfo-tool/gnunet-peerinfo.c:199 403#: src/peerinfo-tool/gnunet-peerinfo.c:197
404#, fuzzy, c-format 404#, fuzzy, c-format
405msgid "Invalid command line argument `%s'\n" 405msgid "Invalid command line argument `%s'\n"
406msgstr "Ungültige Kommandozeilen Parameter:\n" 406msgstr "Ungültige Kommandozeilen Parameter:\n"
407 407
408#: src/core/gnunet-core-list-connections.c:188 408#: src/core/gnunet-core-list-connections.c:199
409#: src/peerinfo-tool/gnunet-peerinfo.c:257 409#: src/peerinfo-tool/gnunet-peerinfo.c:255
410msgid "don't resolve host names" 410msgid "don't resolve host names"
411msgstr "" 411msgstr ""
412 412
413#: src/core/gnunet-core-list-connections.c:195 413#: src/core/gnunet-core-list-connections.c:206
414#, fuzzy 414#, fuzzy
415msgid "Print information about connected peers." 415msgid "Print information about connected peers."
416msgstr "Informationen über andere GNUnet Knoten ausgeben." 416msgstr "Informationen über andere GNUnet Knoten ausgeben."
417 417
418#: src/core/gnunet-service-core_clients.c:357 418#: src/core/gnunet-service-core_clients.c:359
419#, fuzzy 419#, fuzzy
420msgid "# send requests dropped (disconnected)" 420msgid "# send requests dropped (disconnected)"
421msgstr "# gap Anfragen verworfen: Kollision in RT" 421msgstr "# gap Anfragen verworfen: Kollision in RT"
422 422
423#: src/core/gnunet-service-core_clients.c:462 423#: src/core/gnunet-service-core_clients.c:464
424#, fuzzy 424#, fuzzy
425msgid "# messages discarded (session disconnected)" 425msgid "# messages discarded (session disconnected)"
426msgstr "# defragmentierter Nachrichten" 426msgstr "# defragmentierter Nachrichten"
427 427
428#: src/core/gnunet-service-core_clients.c:800 428#: src/core/gnunet-service-core_clients.c:801
429#, fuzzy, c-format 429#, fuzzy, c-format
430msgid "# bytes of messages of type %u received" 430msgid "# bytes of messages of type %u received"
431msgstr "# Bytes Rauschen empfangen" 431msgstr "# Bytes Rauschen empfangen"
@@ -473,7 +473,7 @@ msgid "# bytes decrypted"
473msgstr "# Bytes entschlüsselt" 473msgstr "# Bytes entschlüsselt"
474 474
475#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002 475#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002
476#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:156 476#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:154
477#, fuzzy, c-format 477#, fuzzy, c-format
478msgid "Error in communication with PEERINFO service\n" 478msgid "Error in communication with PEERINFO service\n"
479msgstr "Informationen über andere GNUnet Knoten ausgeben." 479msgstr "Informationen über andere GNUnet Knoten ausgeben."
@@ -595,7 +595,7 @@ msgstr ""
595 595
596#: src/core/gnunet-service-core_kx.c:1539 596#: src/core/gnunet-service-core_kx.c:1539
597#: src/transport/gnunet-service-transport.c:537 597#: src/transport/gnunet-service-transport.c:537
598#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:207 598#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:205
599#, fuzzy, c-format 599#, fuzzy, c-format
600msgid "Could not access PEERINFO service. Exiting.\n" 600msgid "Could not access PEERINFO service. Exiting.\n"
601msgstr "Auf die Namespace Informationen konnte nicht zugegriffen werden.\n" 601msgstr "Auf die Namespace Informationen konnte nicht zugegriffen werden.\n"
@@ -763,11 +763,11 @@ msgstr "%s: Option '-W %s' erlaubt keinen Parameter\n"
763msgid "Use --help to get a list of options.\n" 763msgid "Use --help to get a list of options.\n"
764msgstr "Verwenden Sie --help, um eine Liste der Optionen zu erhalten.\n" 764msgstr "Verwenden Sie --help, um eine Liste der Optionen zu erhalten.\n"
765 765
766#: src/util/scheduler.c:860 766#: src/util/scheduler.c:870
767msgid "Looks like we're busy waiting...\n" 767msgid "Looks like we're busy waiting...\n"
768msgstr "" 768msgstr ""
769 769
770#: src/util/scheduler.c:990 770#: src/util/scheduler.c:1000
771#, c-format 771#, c-format
772msgid "Attempt to cancel dead task %llu!\n" 772msgid "Attempt to cancel dead task %llu!\n"
773msgstr "" 773msgstr ""
@@ -1260,34 +1260,34 @@ msgstr "Aufruf von `%s' mit Schlüssel `%s'.\n"
1260msgid "RSA signature verification failed at %s:%d: %s\n" 1260msgid "RSA signature verification failed at %s:%d: %s\n"
1261msgstr "RSA Signaturüberprüfung fehlgeschlagen bei %s:%d: %s\n" 1261msgstr "RSA Signaturüberprüfung fehlgeschlagen bei %s:%d: %s\n"
1262 1262
1263#: src/nse/gnunet-nse-profiler.c:647 src/dht/gnunet-dht-get.c:213 1263#: src/nse/gnunet-nse-profiler.c:634 src/dht/gnunet-dht-get.c:213
1264#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169 1264#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169
1265#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591 1265#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591
1266#: src/fs/gnunet-download.c:263 1266#: src/fs/gnunet-download.c:263
1267msgid "be verbose (print progress information)" 1267msgid "be verbose (print progress information)"
1268msgstr "" 1268msgstr ""
1269 1269
1270#: src/nse/gnunet-nse-profiler.c:665 1270#: src/nse/gnunet-nse-profiler.c:652
1271#, fuzzy 1271#, fuzzy
1272msgid "Measure quality and performance of the NSE service." 1272msgid "Measure quality and performance of the NSE service."
1273msgstr "Auf den Dienst konnte nicht zugegriffen werden" 1273msgstr "Auf den Dienst konnte nicht zugegriffen werden"
1274 1274
1275#: src/nse/gnunet-service-nse.c:904 1275#: src/nse/gnunet-service-nse.c:902
1276#, c-format 1276#, c-format
1277msgid "Proof of work invalid: %llu!\n" 1277msgid "Proof of work invalid: %llu!\n"
1278msgstr "" 1278msgstr ""
1279 1279
1280#: src/nse/gnunet-service-nse.c:1329 src/nse/gnunet-service-nse.c:1348 1280#: src/nse/gnunet-service-nse.c:1326 src/nse/gnunet-service-nse.c:1345
1281#: src/nse/gnunet-service-nse.c:1369 1281#: src/nse/gnunet-service-nse.c:1366
1282msgid "NSE service is lacking key configuration settings. Exiting.\n" 1282msgid "NSE service is lacking key configuration settings. Exiting.\n"
1283msgstr "" 1283msgstr ""
1284 1284
1285#: src/nse/gnunet-service-nse.c:1336 1285#: src/nse/gnunet-service-nse.c:1333
1286#, fuzzy 1286#, fuzzy
1287msgid "Invalid work requirement for NSE service. Exiting.\n" 1287msgid "Invalid work requirement for NSE service. Exiting.\n"
1288msgstr "Ungültige Parameter. Abbruch.\n" 1288msgstr "Ungültige Parameter. Abbruch.\n"
1289 1289
1290#: src/nse/gnunet-service-nse.c:1357 1290#: src/nse/gnunet-service-nse.c:1354
1291#, fuzzy 1291#, fuzzy
1292msgid "NSE service could not access hostkey. Exiting.\n" 1292msgid "NSE service could not access hostkey. Exiting.\n"
1293msgstr "Auf die Namespace Informationen konnte nicht zugegriffen werden.\n" 1293msgstr "Auf die Namespace Informationen konnte nicht zugegriffen werden.\n"
@@ -2392,7 +2392,7 @@ msgid "Option `%s' is required when using option `%s'.\n"
2392msgstr "Option `%s' macht keinen Sinn ohne die Option `%s'.\n" 2392msgstr "Option `%s' macht keinen Sinn ohne die Option `%s'.\n"
2393 2393
2394#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400 2394#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400
2395#: src/transport/gnunet-transport.c:477 2395#: src/transport/gnunet-transport.c:510
2396#, c-format 2396#, c-format
2397msgid "Option `%s' makes no sense without option `%s'.\n" 2397msgid "Option `%s' makes no sense without option `%s'.\n"
2398msgstr "Option `%s' macht keinen Sinn ohne die Option `%s'.\n" 2398msgstr "Option `%s' macht keinen Sinn ohne die Option `%s'.\n"
@@ -2708,9 +2708,9 @@ msgstr ""
2708#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543 2708#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543
2709#: src/transport/gnunet-service-transport_neighbours.c:938 2709#: src/transport/gnunet-service-transport_neighbours.c:938
2710#: src/transport/gnunet-service-transport_neighbours.c:943 2710#: src/transport/gnunet-service-transport_neighbours.c:943
2711#: src/transport/gnunet-service-transport_neighbours.c:1266 2711#: src/transport/gnunet-service-transport_neighbours.c:1269
2712#: src/transport/gnunet-service-transport_neighbours.c:2354 2712#: src/transport/gnunet-service-transport_neighbours.c:2382
2713#: src/transport/gnunet-service-transport_neighbours.c:2425 2713#: src/transport/gnunet-service-transport_neighbours.c:2453
2714#: src/topology/gnunet-daemon-topology.c:654 2714#: src/topology/gnunet-daemon-topology.c:654
2715#: src/topology/gnunet-daemon-topology.c:756 2715#: src/topology/gnunet-daemon-topology.c:756
2716#, fuzzy 2716#, fuzzy
@@ -3195,7 +3195,7 @@ msgstr "# gap Routing erfolgreich (insgesamt)"
3195 3195
3196#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290 3196#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290
3197#: src/topology/gnunet-daemon-topology.c:1297 3197#: src/topology/gnunet-daemon-topology.c:1297
3198#: src/hostlist/gnunet-daemon-hostlist.c:290 3198#: src/hostlist/gnunet-daemon-hostlist.c:295
3199#, fuzzy, c-format 3199#, fuzzy, c-format
3200msgid "Failed to connect to `%s' service.\n" 3200msgid "Failed to connect to `%s' service.\n"
3201msgstr "`%s' Dienst konnte nicht initialisiert werden.\n" 3201msgstr "`%s' Dienst konnte nicht initialisiert werden.\n"
@@ -3234,73 +3234,73 @@ msgstr "# p2p Trace-Antworten gesendet"
3234msgid "# peers disconnected due to global disconnect" 3234msgid "# peers disconnected due to global disconnect"
3235msgstr "# Knotenankündigungen empfangen" 3235msgstr "# Knotenankündigungen empfangen"
3236 3236
3237#: src/transport/gnunet-service-transport_neighbours.c:1774 3237#: src/transport/gnunet-service-transport_neighbours.c:1800
3238#: src/transport/gnunet-service-transport_neighbours.c:1795 3238#: src/transport/gnunet-service-transport_neighbours.c:1821
3239#, fuzzy 3239#, fuzzy
3240msgid "# messages not sent (no such peer or not connected)" 3240msgid "# messages not sent (no such peer or not connected)"
3241msgstr "# defragmentierter Nachrichten" 3241msgstr "# defragmentierter Nachrichten"
3242 3242
3243#: src/transport/gnunet-service-transport_neighbours.c:1811 3243#: src/transport/gnunet-service-transport_neighbours.c:1837
3244#, fuzzy 3244#, fuzzy
3245msgid "# bytes in message queue for other peers" 3245msgid "# bytes in message queue for other peers"
3246msgstr "# Bytes ausgehender Nachrichten verworfen" 3246msgstr "# Bytes ausgehender Nachrichten verworfen"
3247 3247
3248#: src/transport/gnunet-service-transport_neighbours.c:1863 3248#: src/transport/gnunet-service-transport_neighbours.c:1889
3249#, fuzzy 3249#, fuzzy
3250msgid "# messages discarded due to lack of neighbour record" 3250msgid "# messages discarded due to lack of neighbour record"
3251msgstr "# defragmentierter Nachrichten" 3251msgstr "# defragmentierter Nachrichten"
3252 3252
3253#: src/transport/gnunet-service-transport_neighbours.c:1899 3253#: src/transport/gnunet-service-transport_neighbours.c:1925
3254#, fuzzy 3254#, fuzzy
3255msgid "# bandwidth quota violations by other peers" 3255msgid "# bandwidth quota violations by other peers"
3256msgstr "Verfolgt die Bandbreitennutzung von gnunetd" 3256msgstr "Verfolgt die Bandbreitennutzung von gnunetd"
3257 3257
3258#: src/transport/gnunet-service-transport_neighbours.c:1917 3258#: src/transport/gnunet-service-transport_neighbours.c:1943
3259msgid "# ms throttling suggested" 3259msgid "# ms throttling suggested"
3260msgstr "" 3260msgstr ""
3261 3261
3262#: src/transport/gnunet-service-transport_neighbours.c:1946 3262#: src/transport/gnunet-service-transport_neighbours.c:1972
3263#, fuzzy 3263#, fuzzy
3264msgid "# KEEPALIVE messages discarded (not connected)" 3264msgid "# KEEPALIVE messages discarded (not connected)"
3265msgstr "# defragmentierter Nachrichten" 3265msgstr "# defragmentierter Nachrichten"
3266 3266
3267#: src/transport/gnunet-service-transport_neighbours.c:1995 3267#: src/transport/gnunet-service-transport_neighbours.c:2023
3268#, fuzzy 3268#, fuzzy
3269msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)" 3269msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)"
3270msgstr "# defragmentierter Nachrichten" 3270msgstr "# defragmentierter Nachrichten"
3271 3271
3272#: src/transport/gnunet-service-transport_neighbours.c:2003 3272#: src/transport/gnunet-service-transport_neighbours.c:2031
3273#, fuzzy 3273#, fuzzy
3274msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)" 3274msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)"
3275msgstr "# defragmentierter Nachrichten" 3275msgstr "# defragmentierter Nachrichten"
3276 3276
3277#: src/transport/gnunet-service-transport_neighbours.c:2064 3277#: src/transport/gnunet-service-transport_neighbours.c:2092
3278msgid "# SET QUOTA messages ignored (no such peer)" 3278msgid "# SET QUOTA messages ignored (no such peer)"
3279msgstr "" 3279msgstr ""
3280 3280
3281#: src/transport/gnunet-service-transport_neighbours.c:2082 3281#: src/transport/gnunet-service-transport_neighbours.c:2110
3282msgid "# disconnects due to quota of 0" 3282msgid "# disconnects due to quota of 0"
3283msgstr "" 3283msgstr ""
3284 3284
3285#: src/transport/gnunet-service-transport_neighbours.c:2200 3285#: src/transport/gnunet-service-transport_neighbours.c:2228
3286msgid "# disconnect messages ignored (old format)" 3286msgid "# disconnect messages ignored (old format)"
3287msgstr "" 3287msgstr ""
3288 3288
3289#: src/transport/gnunet-service-transport_neighbours.c:2213 3289#: src/transport/gnunet-service-transport_neighbours.c:2241
3290msgid "# disconnect messages ignored (timestamp)" 3290msgid "# disconnect messages ignored (timestamp)"
3291msgstr "" 3291msgstr ""
3292 3292
3293#: src/transport/gnunet-service-transport_neighbours.c:2289 3293#: src/transport/gnunet-service-transport_neighbours.c:2317
3294#, fuzzy 3294#, fuzzy
3295msgid "# unexpected CONNECT_ACK messages (no peer)" 3295msgid "# unexpected CONNECT_ACK messages (no peer)"
3296msgstr "COUNT Nachrichten versenden" 3296msgstr "COUNT Nachrichten versenden"
3297 3297
3298#: src/transport/gnunet-service-transport_neighbours.c:2304 3298#: src/transport/gnunet-service-transport_neighbours.c:2332
3299#, fuzzy 3299#, fuzzy
3300msgid "# unexpected CONNECT_ACK messages" 3300msgid "# unexpected CONNECT_ACK messages"
3301msgstr "COUNT Nachrichten versenden" 3301msgstr "COUNT Nachrichten versenden"
3302 3302
3303#: src/transport/gnunet-service-transport_neighbours.c:2402 3303#: src/transport/gnunet-service-transport_neighbours.c:2430
3304#, fuzzy 3304#, fuzzy
3305msgid "# unexpected ACK messages" 3305msgid "# unexpected ACK messages"
3306msgstr "# verschlüsselter PONG Nachrichten gesendet" 3306msgstr "# verschlüsselter PONG Nachrichten gesendet"
@@ -3361,41 +3361,41 @@ msgstr ""
3361msgid "# refreshed my HELLO" 3361msgid "# refreshed my HELLO"
3362msgstr "" 3362msgstr ""
3363 3363
3364#: src/transport/plugin_transport_udp.c:1518 3364#: src/transport/plugin_transport_udp.c:1520
3365#, fuzzy 3365#, fuzzy
3366msgid "# IPv4 broadcast HELLO beacons received via udp" 3366msgid "# IPv4 broadcast HELLO beacons received via udp"
3367msgstr "# verschlüsselter PONG Nachrichten empfangen" 3367msgstr "# verschlüsselter PONG Nachrichten empfangen"
3368 3368
3369#: src/transport/plugin_transport_udp.c:1555 3369#: src/transport/plugin_transport_udp.c:1557
3370#, fuzzy 3370#, fuzzy
3371msgid "# IPv6 multicast HELLO beacons received via udp" 3371msgid "# IPv6 multicast HELLO beacons received via udp"
3372msgstr "# verschlüsselter PONG Nachrichten empfangen" 3372msgstr "# verschlüsselter PONG Nachrichten empfangen"
3373 3373
3374#: src/transport/plugin_transport_udp.c:2041 3374#: src/transport/plugin_transport_udp.c:2043
3375#: src/transport/plugin_transport_udp_new.c:1218 3375#: src/transport/plugin_transport_udp_new.c:1218
3376#, c-format 3376#, c-format
3377msgid "Given `%s' option is out of range: %llu > %u\n" 3377msgid "Given `%s' option is out of range: %llu > %u\n"
3378msgstr "" 3378msgstr ""
3379 3379
3380#: src/transport/plugin_transport_udp.c:2092 3380#: src/transport/plugin_transport_udp.c:2094
3381#: src/transport/plugin_transport_udp_new.c:1268 3381#: src/transport/plugin_transport_udp_new.c:1268
3382#, fuzzy, c-format 3382#, fuzzy, c-format
3383msgid "Invalid IPv6 address: `%s'\n" 3383msgid "Invalid IPv6 address: `%s'\n"
3384msgstr "Ungültiger Parameter: `%s'\n" 3384msgstr "Ungültiger Parameter: `%s'\n"
3385 3385
3386#: src/transport/plugin_transport_udp.c:2235 3386#: src/transport/plugin_transport_udp.c:2237
3387#, c-format 3387#, c-format
3388msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" 3388msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n"
3389msgstr "" 3389msgstr ""
3390 3390
3391#: src/transport/plugin_transport_udp.c:2296 3391#: src/transport/plugin_transport_udp.c:2298
3392#: src/transport/plugin_transport_udp_new.c:1396 3392#: src/transport/plugin_transport_udp_new.c:1396
3393#, fuzzy 3393#, fuzzy
3394msgid "Failed to open UDP sockets\n" 3394msgid "Failed to open UDP sockets\n"
3395msgstr "Fehler beim Binden an UDP6 Port %d.\n" 3395msgstr "Fehler beim Binden an UDP6 Port %d.\n"
3396 3396
3397#: src/transport/plugin_transport_http_client.c:107 3397#: src/transport/plugin_transport_http_client.c:108
3398#: src/transport/plugin_transport_http_client.c:122 3398#: src/transport/plugin_transport_http_client.c:123
3399#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682 3399#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682
3400#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740 3400#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740
3401#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877 3401#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877
@@ -3404,7 +3404,7 @@ msgstr "Fehler beim Binden an UDP6 Port %d.\n"
3404msgid "%s failed at %s:%d: `%s'\n" 3404msgid "%s failed at %s:%d: `%s'\n"
3405msgstr "`%s' schlug fehl bei %s:%d mit dem Fehler: `%s'.\n" 3405msgstr "`%s' schlug fehl bei %s:%d mit dem Fehler: `%s'.\n"
3406 3406
3407#: src/transport/plugin_transport_http_client.c:619 3407#: src/transport/plugin_transport_http_client.c:620
3408#, c-format 3408#, c-format
3409msgid "Could not initialize curl multi handle, failed to start %s plugin!\n" 3409msgid "Could not initialize curl multi handle, failed to start %s plugin!\n"
3410msgstr "" 3410msgstr ""
@@ -3630,188 +3630,193 @@ msgstr "Teste Transport(e) %s\n"
3630msgid "Failed to load transport plugin for `%s'\n" 3630msgid "Failed to load transport plugin for `%s'\n"
3631msgstr "Anwendung `%s' konnte nicht initialisiert werden.\n" 3631msgstr "Anwendung `%s' konnte nicht initialisiert werden.\n"
3632 3632
3633#: src/transport/plugin_transport_wlan.c:881 3633#: src/transport/plugin_transport_wlan.c:884
3634#, fuzzy 3634#, fuzzy
3635msgid "# wlan session timeouts" 3635msgid "# wlan session timeouts"
3636msgstr "# Sitzungsschlüssel akzeptiert" 3636msgstr "# Sitzungsschlüssel akzeptiert"
3637 3637
3638#: src/transport/plugin_transport_wlan.c:905 3638#: src/transport/plugin_transport_wlan.c:908
3639#, fuzzy 3639#, fuzzy
3640msgid "# wlan session created" 3640msgid "# wlan session created"
3641msgstr "# Sitzungsschlüssel akzeptiert" 3641msgstr "# Sitzungsschlüssel akzeptiert"
3642 3642
3643#: src/transport/plugin_transport_wlan.c:989 3643#: src/transport/plugin_transport_wlan.c:992
3644#: src/transport/plugin_transport_wlan.c:1151 3644#: src/transport/plugin_transport_wlan.c:1154
3645#: src/transport/plugin_transport_wlan.c:1172 3645#: src/transport/plugin_transport_wlan.c:1175
3646#: src/transport/plugin_transport_wlan.c:1203 3646#: src/transport/plugin_transport_wlan.c:1206
3647#: src/transport/plugin_transport_wlan.c:2406 3647#: src/transport/plugin_transport_wlan.c:2409
3648#: src/transport/plugin_transport_wlan.c:3265 3648#: src/transport/plugin_transport_wlan.c:3268
3649msgid "# wlan pending sessions" 3649msgid "# wlan pending sessions"
3650msgstr "" 3650msgstr ""
3651 3651
3652#: src/transport/plugin_transport_wlan.c:1246 3652#: src/transport/plugin_transport_wlan.c:1249
3653#: src/transport/plugin_transport_wlan.c:1961 3653#: src/transport/plugin_transport_wlan.c:1964
3654#, fuzzy 3654#, fuzzy
3655msgid "# wlan pending fragments" 3655msgid "# wlan pending fragments"
3656msgstr "# verworfener Nachrichten" 3656msgstr "# verworfener Nachrichten"
3657 3657
3658#: src/transport/plugin_transport_wlan.c:1437 3658#: src/transport/plugin_transport_wlan.c:1440
3659#, c-format 3659#, c-format
3660msgid "Finished reading from wlan-helper stdout with code: %d\n" 3660msgid "Finished reading from wlan-helper stdout with code: %d\n"
3661msgstr "" 3661msgstr ""
3662 3662
3663#: src/transport/plugin_transport_wlan.c:1802 3663#: src/transport/plugin_transport_wlan.c:1805
3664msgid "# wlan hello beacons send" 3664msgid "# wlan hello beacons send"
3665msgstr "" 3665msgstr ""
3666 3666
3667#: src/transport/plugin_transport_wlan.c:1835 3667#: src/transport/plugin_transport_wlan.c:1838
3668#: src/transport/plugin_transport_wlan.c:2050 3668#: src/transport/plugin_transport_wlan.c:2053
3669#: src/transport/plugin_transport_wlan.c:2145 3669#: src/transport/plugin_transport_wlan.c:2148
3670#, c-format 3670#, c-format
3671msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n" 3671msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n"
3672msgstr "" 3672msgstr ""
3673 3673
3674#: src/transport/plugin_transport_wlan.c:2036 3674#: src/transport/plugin_transport_wlan.c:2039
3675msgid "# wlan acks send" 3675msgid "# wlan acks send"
3676msgstr "" 3676msgstr ""
3677 3677
3678#: src/transport/plugin_transport_wlan.c:2107 3678#: src/transport/plugin_transport_wlan.c:2110
3679#, fuzzy 3679#, fuzzy
3680msgid "# wlan fragments send" 3680msgid "# wlan fragments send"
3681msgstr "# verworfener Nachrichten" 3681msgstr "# verworfener Nachrichten"
3682 3682
3683#: src/transport/plugin_transport_wlan.c:2273 3683#: src/transport/plugin_transport_wlan.c:2276
3684#, c-format 3684#, c-format
3685msgid "Wlan Address len %d is wrong\n" 3685msgid "Wlan Address len %d is wrong\n"
3686msgstr "" 3686msgstr ""
3687 3687
3688#: src/transport/plugin_transport_wlan.c:2278 3688#: src/transport/plugin_transport_wlan.c:2281
3689#, fuzzy 3689#, fuzzy
3690msgid "# wlan messages queued" 3690msgid "# wlan messages queued"
3691msgstr "# verschlüsselter PING Nachrichten empfangen" 3691msgstr "# verschlüsselter PING Nachrichten empfangen"
3692 3692
3693#: src/transport/plugin_transport_wlan.c:2367 3693#: src/transport/plugin_transport_wlan.c:2370
3694#: src/transport/plugin_transport_wlan.c:3021 3694#: src/transport/plugin_transport_wlan.c:3024
3695#: src/transport/plugin_transport_wlan.c:3268 3695#: src/transport/plugin_transport_wlan.c:3271
3696msgid "# wlan mac endpoints" 3696msgid "# wlan mac endpoints"
3697msgstr "" 3697msgstr ""
3698 3698
3699#: src/transport/plugin_transport_wlan.c:2595 3699#: src/transport/plugin_transport_wlan.c:2598
3700#, fuzzy 3700#, fuzzy
3701msgid "# wlan whole messages received" 3701msgid "# wlan whole messages received"
3702msgstr "# verschlüsselter PING Nachrichten empfangen" 3702msgstr "# verschlüsselter PING Nachrichten empfangen"
3703 3703
3704#: src/transport/plugin_transport_wlan.c:2795 3704#: src/transport/plugin_transport_wlan.c:2798
3705#, fuzzy 3705#, fuzzy
3706msgid "# wlan hello messages received" 3706msgid "# wlan hello messages received"
3707msgstr "# verschlüsselter PING Nachrichten empfangen" 3707msgstr "# verschlüsselter PING Nachrichten empfangen"
3708 3708
3709#: src/transport/plugin_transport_wlan.c:2832 3709#: src/transport/plugin_transport_wlan.c:2835
3710#, fuzzy 3710#, fuzzy
3711msgid "# wlan fragments received" 3711msgid "# wlan fragments received"
3712msgstr "# verworfener Nachrichten" 3712msgstr "# verworfener Nachrichten"
3713 3713
3714#: src/transport/plugin_transport_wlan.c:2884 3714#: src/transport/plugin_transport_wlan.c:2887
3715#, fuzzy 3715#, fuzzy
3716msgid "# wlan acks received" 3716msgid "# wlan acks received"
3717msgstr "# gap Anfragen insgesamt empfangen" 3717msgstr "# gap Anfragen insgesamt empfangen"
3718 3718
3719#: src/transport/plugin_transport_wlan.c:2981 3719#: src/transport/plugin_transport_wlan.c:2984
3720msgid "# wlan mac endpoints timeouts" 3720msgid "# wlan mac endpoints timeouts"
3721msgstr "" 3721msgstr ""
3722 3722
3723#: src/transport/plugin_transport_wlan.c:3005 3723#: src/transport/plugin_transport_wlan.c:3008
3724#, fuzzy 3724#, fuzzy
3725msgid "# wlan mac endpoints created" 3725msgid "# wlan mac endpoints created"
3726msgstr "# Client Trace-Anfragen empfangen" 3726msgstr "# Client Trace-Anfragen empfangen"
3727 3727
3728#: src/transport/plugin_transport_wlan.c:3063 3728#: src/transport/plugin_transport_wlan.c:3066
3729msgid "# wlan WLAN_HELPER_DATA received" 3729msgid "# wlan WLAN_HELPER_DATA received"
3730msgstr "" 3730msgstr ""
3731 3731
3732#: src/transport/plugin_transport_wlan.c:3119 3732#: src/transport/plugin_transport_wlan.c:3122
3733#, fuzzy 3733#, fuzzy
3734msgid "# wlan messages for this client received" 3734msgid "# wlan messages for this client received"
3735msgstr "# verschlüsselter PING Nachrichten empfangen" 3735msgstr "# verschlüsselter PING Nachrichten empfangen"
3736 3736
3737#: src/transport/plugin_transport_wlan.c:3130 3737#: src/transport/plugin_transport_wlan.c:3133
3738#, fuzzy 3738#, fuzzy
3739msgid "# wlan messages inside WLAN_HELPER_DATA received" 3739msgid "# wlan messages inside WLAN_HELPER_DATA received"
3740msgstr "# verschlüsselter PING Nachrichten empfangen" 3740msgstr "# verschlüsselter PING Nachrichten empfangen"
3741 3741
3742#: src/transport/gnunet-transport.c:245 3742#: src/transport/gnunet-transport.c:250
3743#, c-format 3743#, c-format
3744msgid "No transport plugins configured, peer will never communicate\n" 3744msgid "No transport plugins configured, peer will never communicate\n"
3745msgstr "" 3745msgstr ""
3746 3746
3747#: src/transport/gnunet-transport.c:258 3747#: src/transport/gnunet-transport.c:263
3748#, c-format 3748#, c-format
3749msgid "No port configured for plugin `%s', cannot test it\n" 3749msgid "No port configured for plugin `%s', cannot test it\n"
3750msgstr "" 3750msgstr ""
3751 3751
3752#: src/transport/gnunet-transport.c:308 3752#: src/transport/gnunet-transport.c:313
3753#, c-format 3753#, c-format
3754msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n" 3754msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n"
3755msgstr "" 3755msgstr ""
3756 3756
3757#: src/transport/gnunet-transport.c:315 3757#: src/transport/gnunet-transport.c:320
3758#, c-format 3758#, c-format
3759msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n" 3759msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"
3760msgstr "" 3760msgstr ""
3761 3761
3762#: src/transport/gnunet-transport.c:348 3762#: src/transport/gnunet-transport.c:353
3763#, fuzzy, c-format 3763#, fuzzy, c-format
3764msgid "Transmitting %u bytes to %s\n" 3764msgid "Transmitting %u bytes to %s\n"
3765msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n" 3765msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n"
3766 3766
3767#: src/transport/gnunet-transport.c:368 3767#: src/transport/gnunet-transport.c:373
3768#, fuzzy, c-format 3768#, fuzzy, c-format
3769msgid "Connected to %s\n" 3769msgid "Connected to %s\n"
3770msgstr "`%s' hat sich mit `%s' verbunden.\n" 3770msgstr "`%s' hat sich mit `%s' verbunden.\n"
3771 3771
3772#: src/transport/gnunet-transport.c:399 3772#: src/transport/gnunet-transport.c:404
3773#, fuzzy, c-format 3773#, fuzzy, c-format
3774msgid "Disconnected from %s\n" 3774msgid "Disconnected from %s\n"
3775msgstr "`%s' hat sich mit `%s' verbunden.\n" 3775msgstr "`%s' hat sich mit `%s' verbunden.\n"
3776 3776
3777#: src/transport/gnunet-transport.c:428 3777#: src/transport/gnunet-transport.c:433
3778#, fuzzy, c-format 3778#, fuzzy, c-format
3779msgid "Received %u bytes from %s\n" 3779msgid "Received %u bytes from %s\n"
3780msgstr "GAP hat ungültige Inhalte von `%s' empfangen.\n" 3780msgstr "GAP hat ungültige Inhalte von `%s' empfangen.\n"
3781 3781
3782#: src/transport/gnunet-transport.c:448 3782#: src/transport/gnunet-transport.c:447
3783#, fuzzy, c-format 3783#, fuzzy, c-format
3784msgid "Peer `%s' plugin: `%s' address `%s'\n" 3784msgid "Peer `%s': %s\n"
3785msgstr "Knoten `%s' mit Vertrauen %8u und Adresse `%s'\n" 3785msgstr "Ich bin Peer `%s'.\n"
3786 3786
3787#: src/transport/gnunet-transport.c:486 3787#: src/transport/gnunet-transport.c:519
3788#, fuzzy, c-format 3788#, fuzzy, c-format
3789msgid "Failed to parse peer identity `%s'\n" 3789msgid "Failed to parse peer identity `%s'\n"
3790msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n" 3790msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n"
3791 3791
3792#: src/transport/gnunet-transport.c:522 3792#: src/transport/gnunet-transport.c:556
3793msgid "measure how fast we are receiving data (until CTRL-C)" 3793msgid "measure how fast we are receiving data (until CTRL-C)"
3794msgstr "" 3794msgstr ""
3795 3795
3796#: src/transport/gnunet-transport.c:525 3796#: src/transport/gnunet-transport.c:559
3797#, fuzzy 3797#, fuzzy
3798msgid "try to connect to the given peer" 3798msgid "try to connect to the given peer"
3799msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" 3799msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n"
3800 3800
3801#: src/transport/gnunet-transport.c:528 3801#: src/transport/gnunet-transport.c:562
3802#, fuzzy 3802#, fuzzy
3803msgid "provide information about all current connections (once)" 3803msgid "provide information about all current connections (once)"
3804msgstr "Informationen über andere GNUnet Knoten ausgeben." 3804msgstr "Informationen über andere GNUnet Knoten ausgeben."
3805 3805
3806#: src/transport/gnunet-transport.c:532 3806#: src/transport/gnunet-transport.c:566
3807msgid "send data for benchmarking to the other peer (until CTRL-C)" 3807msgid "send data for benchmarking to the other peer (until CTRL-C)"
3808msgstr "" 3808msgstr ""
3809 3809
3810#: src/transport/gnunet-transport.c:535 3810#: src/transport/gnunet-transport.c:569
3811msgid "test transport configuration (involves external server)" 3811msgid "test transport configuration (involves external server)"
3812msgstr "" 3812msgstr ""
3813 3813
3814#: src/transport/gnunet-transport.c:543 3814#: src/transport/gnunet-transport.c:572
3815#, fuzzy
3816msgid "do not resolve hostnames"
3817msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n"
3818
3819#: src/transport/gnunet-transport.c:580
3815#, fuzzy 3820#, fuzzy
3816msgid "Direct access to transport service." 3821msgid "Direct access to transport service."
3817msgstr "Der Transportdienst auf Port %d konnte nicht gestartet werden.\n" 3822msgstr "Der Transportdienst auf Port %d konnte nicht gestartet werden.\n"
@@ -4302,33 +4307,33 @@ msgstr ""
4302msgid "GNUnet NAT traversal test helper daemon" 4307msgid "GNUnet NAT traversal test helper daemon"
4303msgstr "" 4308msgstr ""
4304 4309
4305#: src/nat/nat.c:803 4310#: src/nat/nat.c:805
4306#, c-format 4311#, c-format
4307msgid "gnunet-helper-nat-server generated malformed address `%s'\n" 4312msgid "gnunet-helper-nat-server generated malformed address `%s'\n"
4308msgstr "" 4313msgstr ""
4309 4314
4310#: src/nat/nat.c:852 4315#: src/nat/nat.c:854
4311#, fuzzy, c-format 4316#, fuzzy, c-format
4312msgid "Failed to start %s\n" 4317msgid "Failed to start %s\n"
4313msgstr "Fehler beim Starten der Collection.\n" 4318msgstr "Fehler beim Starten der Collection.\n"
4314 4319
4315#: src/nat/nat.c:1121 4320#: src/nat/nat.c:1123
4316#, fuzzy, c-format 4321#, fuzzy, c-format
4317msgid "Malformed %s `%s' given in configuration!\n" 4322msgid "Malformed %s `%s' given in configuration!\n"
4318msgstr "Fehler beim Speichern der Konfiguration!" 4323msgstr "Fehler beim Speichern der Konfiguration!"
4319 4324
4320#: src/nat/nat.c:1187 src/nat/nat.c:1197 4325#: src/nat/nat.c:1189 src/nat/nat.c:1199
4321#, c-format 4326#, c-format
4322msgid "" 4327msgid ""
4323"Configuration requires `%s', but binary is not installed properly (SUID bit " 4328"Configuration requires `%s', but binary is not installed properly (SUID bit "
4324"not set). Option disabled.\n" 4329"not set). Option disabled.\n"
4325msgstr "" 4330msgstr ""
4326 4331
4327#: src/nat/nat.c:1329 4332#: src/nat/nat.c:1331
4328msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n" 4333msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n"
4329msgstr "" 4334msgstr ""
4330 4335
4331#: src/nat/nat.c:1341 4336#: src/nat/nat.c:1343
4332#, c-format 4337#, c-format
4333msgid "Running gnunet-helper-nat-client %s %s %u\n" 4338msgid "Running gnunet-helper-nat-client %s %s %u\n"
4334msgstr "" 4339msgstr ""
@@ -4366,16 +4371,16 @@ msgstr ""
4366msgid "Loading block plugin `%s'\n" 4371msgid "Loading block plugin `%s'\n"
4367msgstr "Teste Transport(e) %s\n" 4372msgstr "Teste Transport(e) %s\n"
4368 4373
4369#: src/mesh/gnunet-service-mesh.c:4201 4374#: src/mesh/gnunet-service-mesh.c:4218
4370msgid "MESH: Wrong CORE service\n" 4375msgid "MESH: Wrong CORE service\n"
4371msgstr "" 4376msgstr ""
4372 4377
4373#: src/mesh/gnunet-service-mesh.c:4406 4378#: src/mesh/gnunet-service-mesh.c:4423
4374#, fuzzy 4379#, fuzzy
4375msgid "Mesh service is lacking key configuration settings. Exiting.\n" 4380msgid "Mesh service is lacking key configuration settings. Exiting.\n"
4376msgstr "GNUnet Konfiguration" 4381msgstr "GNUnet Konfiguration"
4377 4382
4378#: src/mesh/gnunet-service-mesh.c:4415 4383#: src/mesh/gnunet-service-mesh.c:4432
4379#, fuzzy 4384#, fuzzy
4380msgid "Mesh service could not access hostkey. Exiting.\n" 4385msgid "Mesh service could not access hostkey. Exiting.\n"
4381msgstr "Auf die Namespace Informationen konnte nicht zugegriffen werden.\n" 4386msgstr "Auf die Namespace Informationen konnte nicht zugegriffen werden.\n"
@@ -4563,31 +4568,31 @@ msgstr ""
4563msgid "Hostlist file `%s' could not be removed\n" 4568msgid "Hostlist file `%s' could not be removed\n"
4564msgstr "Sitzungsschlüssel von Knoten `%s' konnte nicht überprüft werden.\n" 4569msgstr "Sitzungsschlüssel von Knoten `%s' konnte nicht überprüft werden.\n"
4565 4570
4566#: src/hostlist/gnunet-daemon-hostlist.c:257 4571#: src/hostlist/gnunet-daemon-hostlist.c:262
4567msgid "" 4572msgid ""
4568"None of the functions for the hostlist daemon were enabled. I have no " 4573"None of the functions for the hostlist daemon were enabled. I have no "
4569"reason to run!\n" 4574"reason to run!\n"
4570msgstr "" 4575msgstr ""
4571 4576
4572#: src/hostlist/gnunet-daemon-hostlist.c:310 4577#: src/hostlist/gnunet-daemon-hostlist.c:315
4573msgid "advertise our hostlist to other peers" 4578msgid "advertise our hostlist to other peers"
4574msgstr "" 4579msgstr ""
4575 4580
4576#: src/hostlist/gnunet-daemon-hostlist.c:315 4581#: src/hostlist/gnunet-daemon-hostlist.c:320
4577msgid "" 4582msgid ""
4578"bootstrap using hostlists (it is highly recommended that you always use this " 4583"bootstrap using hostlists (it is highly recommended that you always use this "
4579"option)" 4584"option)"
4580msgstr "" 4585msgstr ""
4581 4586
4582#: src/hostlist/gnunet-daemon-hostlist.c:318 4587#: src/hostlist/gnunet-daemon-hostlist.c:323
4583msgid "enable learning about hostlist servers from other peers" 4588msgid "enable learning about hostlist servers from other peers"
4584msgstr "" 4589msgstr ""
4585 4590
4586#: src/hostlist/gnunet-daemon-hostlist.c:322 4591#: src/hostlist/gnunet-daemon-hostlist.c:327
4587msgid "provide a hostlist server" 4592msgid "provide a hostlist server"
4588msgstr "" 4593msgstr ""
4589 4594
4590#: src/hostlist/gnunet-daemon-hostlist.c:334 4595#: src/hostlist/gnunet-daemon-hostlist.c:339
4591msgid "GNUnet hostlist server and client" 4596msgid "GNUnet hostlist server and client"
4592msgstr "" 4597msgstr ""
4593 4598
@@ -4679,30 +4684,30 @@ msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n"
4679msgid "Could not start hostlist HTTP server on port %u\n" 4684msgid "Could not start hostlist HTTP server on port %u\n"
4680msgstr "Der Transportdienst auf Port %d konnte nicht gestartet werden.\n" 4685msgstr "Der Transportdienst auf Port %d konnte nicht gestartet werden.\n"
4681 4686
4682#: src/peerinfo-tool/gnunet-peerinfo.c:221 4687#: src/peerinfo-tool/gnunet-peerinfo.c:219
4683#, fuzzy, c-format 4688#, fuzzy, c-format
4684msgid "Could not find option `%s:%s' in configuration.\n" 4689msgid "Could not find option `%s:%s' in configuration.\n"
4685msgstr "Knoten `%s' konnte nicht in der Routing Tabelle gefunden werden!\n" 4690msgstr "Knoten `%s' konnte nicht in der Routing Tabelle gefunden werden!\n"
4686 4691
4687#: src/peerinfo-tool/gnunet-peerinfo.c:228 4692#: src/peerinfo-tool/gnunet-peerinfo.c:226
4688#, fuzzy, c-format 4693#, fuzzy, c-format
4689msgid "Loading hostkey from `%s' failed.\n" 4694msgid "Loading hostkey from `%s' failed.\n"
4690msgstr "Das Parsen des Hello von `%s' schlug fehl.\n" 4695msgstr "Das Parsen des Hello von `%s' schlug fehl.\n"
4691 4696
4692#: src/peerinfo-tool/gnunet-peerinfo.c:240 4697#: src/peerinfo-tool/gnunet-peerinfo.c:238
4693#, c-format 4698#, c-format
4694msgid "I am peer `%s'.\n" 4699msgid "I am peer `%s'.\n"
4695msgstr "Ich bin Peer `%s'.\n" 4700msgstr "Ich bin Peer `%s'.\n"
4696 4701
4697#: src/peerinfo-tool/gnunet-peerinfo.c:260 4702#: src/peerinfo-tool/gnunet-peerinfo.c:258
4698msgid "output only the identity strings" 4703msgid "output only the identity strings"
4699msgstr "" 4704msgstr ""
4700 4705
4701#: src/peerinfo-tool/gnunet-peerinfo.c:263 4706#: src/peerinfo-tool/gnunet-peerinfo.c:261
4702msgid "output our own identity only" 4707msgid "output our own identity only"
4703msgstr "" 4708msgstr ""
4704 4709
4705#: src/peerinfo-tool/gnunet-peerinfo.c:269 4710#: src/peerinfo-tool/gnunet-peerinfo.c:267
4706#, fuzzy 4711#, fuzzy
4707msgid "Print information about peers." 4712msgid "Print information about peers."
4708msgstr "Informationen über andere GNUnet Knoten ausgeben." 4713msgstr "Informationen über andere GNUnet Knoten ausgeben."
@@ -4731,23 +4736,27 @@ msgstr "umfangreiche Meldungen ausgeben"
4731msgid "use configuration file FILENAME" 4736msgid "use configuration file FILENAME"
4732msgstr "Konfigurationsdatei FILENAME verwenden" 4737msgstr "Konfigurationsdatei FILENAME verwenden"
4733 4738
4734#: src/include/gnunet_common.h:361 src/include/gnunet_common.h:366 4739#: src/include/gnunet_common.h:366 src/include/gnunet_common.h:371
4735#: src/include/gnunet_common.h:372 4740#: src/include/gnunet_common.h:377
4736#, fuzzy, c-format 4741#, fuzzy, c-format
4737msgid "Assertion failed at %s:%d.\n" 4742msgid "Assertion failed at %s:%d.\n"
4738msgstr "Absicherung fehlgeschlagen bei %s:%d.\n" 4743msgstr "Absicherung fehlgeschlagen bei %s:%d.\n"
4739 4744
4740#: src/include/gnunet_common.h:382 4745#: src/include/gnunet_common.h:387
4741#, fuzzy, c-format 4746#, fuzzy, c-format
4742msgid "External protocol violation detected at %s:%d.\n" 4747msgid "External protocol violation detected at %s:%d.\n"
4743msgstr "Absicherung fehlgeschlagen bei %s:%d.\n" 4748msgstr "Absicherung fehlgeschlagen bei %s:%d.\n"
4744 4749
4745#: src/include/gnunet_common.h:403 src/include/gnunet_common.h:410 4750#: src/include/gnunet_common.h:408 src/include/gnunet_common.h:415
4746#, fuzzy, c-format 4751#, fuzzy, c-format
4747msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" 4752msgid "`%s' failed on file `%s' at %s:%d with error: %s\n"
4748msgstr "`%s' schlug bei Datei `%s' fehl. Ort: %s:%d. Fehler: %s\n" 4753msgstr "`%s' schlug bei Datei `%s' fehl. Ort: %s:%d. Fehler: %s\n"
4749 4754
4750#, fuzzy 4755#, fuzzy
4756#~ msgid "Peer `%s' plugin: `%s' address `%s'\n"
4757#~ msgstr "Knoten `%s' mit Vertrauen %8u und Adresse `%s'\n"
4758
4759#, fuzzy
4751#~ msgid "Failed to transmit request to DATASTORE.\n" 4760#~ msgid "Failed to transmit request to DATASTORE.\n"
4752#~ msgstr "Fehler beim Senden einer `%s' Anfrage an den SMTP Server.\n" 4761#~ msgstr "Fehler beim Senden einer `%s' Anfrage an den SMTP Server.\n"
4753 4762
diff --git a/po/es.po b/po/es.po
index 05a2c126b..0388a7515 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: GNUnet 0.7.0e\n" 8"Project-Id-Version: GNUnet 0.7.0e\n"
9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
10"POT-Creation-Date: 2011-11-26 14:53+0100\n" 10"POT-Creation-Date: 2011-11-29 21:38+0100\n"
11"PO-Revision-Date: 2006-06-29 12:05+0200\n" 11"PO-Revision-Date: 2006-06-29 12:05+0200\n"
12"Last-Translator: Miguel Angel Arruga <miguel.13@telefonica.net>\n" 12"Last-Translator: Miguel Angel Arruga <miguel.13@telefonica.net>\n"
13"Language-Team: Spanish\n" 13"Language-Team: Spanish\n"
@@ -30,8 +30,8 @@ msgstr ""
30#: src/datacache/plugin_datacache_mysql.c:517 30#: src/datacache/plugin_datacache_mysql.c:517
31#: src/datacache/plugin_datacache_mysql.c:526 31#: src/datacache/plugin_datacache_mysql.c:526
32#: src/datacache/plugin_datacache_mysql.c:598 32#: src/datacache/plugin_datacache_mysql.c:598
33#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:389 33#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:394
34#: src/include/gnunet_common.h:396 34#: src/include/gnunet_common.h:401
35#, c-format 35#, c-format
36msgid "`%s' failed at %s:%d with error: %s\n" 36msgid "`%s' failed at %s:%d with error: %s\n"
37msgstr "'%s' falló en %s: %d con el error: %s\n" 37msgstr "'%s' falló en %s: %d con el error: %s\n"
@@ -396,33 +396,33 @@ msgstr ""
396msgid "Peer `%s'\n" 396msgid "Peer `%s'\n"
397msgstr "Yo soy el par '%s'.\n" 397msgstr "Yo soy el par '%s'.\n"
398 398
399#: src/core/gnunet-core-list-connections.c:167 399#: src/core/gnunet-core-list-connections.c:178
400#: src/peerinfo-tool/gnunet-peerinfo.c:199 400#: src/peerinfo-tool/gnunet-peerinfo.c:197
401#, fuzzy, c-format 401#, fuzzy, c-format
402msgid "Invalid command line argument `%s'\n" 402msgid "Invalid command line argument `%s'\n"
403msgstr "Argumentos en la linea de comandos inválidos:\n" 403msgstr "Argumentos en la linea de comandos inválidos:\n"
404 404
405#: src/core/gnunet-core-list-connections.c:188 405#: src/core/gnunet-core-list-connections.c:199
406#: src/peerinfo-tool/gnunet-peerinfo.c:257 406#: src/peerinfo-tool/gnunet-peerinfo.c:255
407msgid "don't resolve host names" 407msgid "don't resolve host names"
408msgstr "" 408msgstr ""
409 409
410#: src/core/gnunet-core-list-connections.c:195 410#: src/core/gnunet-core-list-connections.c:206
411#, fuzzy 411#, fuzzy
412msgid "Print information about connected peers." 412msgid "Print information about connected peers."
413msgstr "Imprime información de los pares de GNUnet." 413msgstr "Imprime información de los pares de GNUnet."
414 414
415#: src/core/gnunet-service-core_clients.c:357 415#: src/core/gnunet-service-core_clients.c:359
416#, fuzzy 416#, fuzzy
417msgid "# send requests dropped (disconnected)" 417msgid "# send requests dropped (disconnected)"
418msgstr "# Anuncios de los pares recibidos" 418msgstr "# Anuncios de los pares recibidos"
419 419
420#: src/core/gnunet-service-core_clients.c:462 420#: src/core/gnunet-service-core_clients.c:464
421#, fuzzy 421#, fuzzy
422msgid "# messages discarded (session disconnected)" 422msgid "# messages discarded (session disconnected)"
423msgstr "# mensajes defragmentados" 423msgstr "# mensajes defragmentados"
424 424
425#: src/core/gnunet-service-core_clients.c:800 425#: src/core/gnunet-service-core_clients.c:801
426#, fuzzy, c-format 426#, fuzzy, c-format
427msgid "# bytes of messages of type %u received" 427msgid "# bytes of messages of type %u received"
428msgstr "# bytes de ruido recibidos" 428msgstr "# bytes de ruido recibidos"
@@ -470,7 +470,7 @@ msgid "# bytes decrypted"
470msgstr "# bytes desencriptados" 470msgstr "# bytes desencriptados"
471 471
472#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002 472#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002
473#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:156 473#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:154
474#, fuzzy, c-format 474#, fuzzy, c-format
475msgid "Error in communication with PEERINFO service\n" 475msgid "Error in communication with PEERINFO service\n"
476msgstr "Imprime información de los pares de GNUnet." 476msgstr "Imprime información de los pares de GNUnet."
@@ -592,7 +592,7 @@ msgstr ""
592 592
593#: src/core/gnunet-service-core_kx.c:1539 593#: src/core/gnunet-service-core_kx.c:1539
594#: src/transport/gnunet-service-transport.c:537 594#: src/transport/gnunet-service-transport.c:537
595#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:207 595#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:205
596#, fuzzy, c-format 596#, fuzzy, c-format
597msgid "Could not access PEERINFO service. Exiting.\n" 597msgid "Could not access PEERINFO service. Exiting.\n"
598msgstr "Imposible acceder a la información del espacio.\n" 598msgstr "Imposible acceder a la información del espacio.\n"
@@ -758,11 +758,11 @@ msgstr "%s: la opción '-W %s' no permite un argumento\n"
758msgid "Use --help to get a list of options.\n" 758msgid "Use --help to get a list of options.\n"
759msgstr "Usar --help para obtener una lista de opciones.\n" 759msgstr "Usar --help para obtener una lista de opciones.\n"
760 760
761#: src/util/scheduler.c:860 761#: src/util/scheduler.c:870
762msgid "Looks like we're busy waiting...\n" 762msgid "Looks like we're busy waiting...\n"
763msgstr "" 763msgstr ""
764 764
765#: src/util/scheduler.c:990 765#: src/util/scheduler.c:1000
766#, c-format 766#, c-format
767msgid "Attempt to cancel dead task %llu!\n" 767msgid "Attempt to cancel dead task %llu!\n"
768msgstr "" 768msgstr ""
@@ -1257,34 +1257,34 @@ msgstr "Llamada a '%s' con la clave '%s'.\n"
1257msgid "RSA signature verification failed at %s:%d: %s\n" 1257msgid "RSA signature verification failed at %s:%d: %s\n"
1258msgstr "La verificación de la firma RSA fallo en %s: %d: %s\n" 1258msgstr "La verificación de la firma RSA fallo en %s: %d: %s\n"
1259 1259
1260#: src/nse/gnunet-nse-profiler.c:647 src/dht/gnunet-dht-get.c:213 1260#: src/nse/gnunet-nse-profiler.c:634 src/dht/gnunet-dht-get.c:213
1261#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169 1261#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169
1262#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591 1262#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591
1263#: src/fs/gnunet-download.c:263 1263#: src/fs/gnunet-download.c:263
1264msgid "be verbose (print progress information)" 1264msgid "be verbose (print progress information)"
1265msgstr "" 1265msgstr ""
1266 1266
1267#: src/nse/gnunet-nse-profiler.c:665 1267#: src/nse/gnunet-nse-profiler.c:652
1268#, fuzzy 1268#, fuzzy
1269msgid "Measure quality and performance of the NSE service." 1269msgid "Measure quality and performance of the NSE service."
1270msgstr "Imposible acceder al servicio" 1270msgstr "Imposible acceder al servicio"
1271 1271
1272#: src/nse/gnunet-service-nse.c:904 1272#: src/nse/gnunet-service-nse.c:902
1273#, c-format 1273#, c-format
1274msgid "Proof of work invalid: %llu!\n" 1274msgid "Proof of work invalid: %llu!\n"
1275msgstr "" 1275msgstr ""
1276 1276
1277#: src/nse/gnunet-service-nse.c:1329 src/nse/gnunet-service-nse.c:1348 1277#: src/nse/gnunet-service-nse.c:1326 src/nse/gnunet-service-nse.c:1345
1278#: src/nse/gnunet-service-nse.c:1369 1278#: src/nse/gnunet-service-nse.c:1366
1279msgid "NSE service is lacking key configuration settings. Exiting.\n" 1279msgid "NSE service is lacking key configuration settings. Exiting.\n"
1280msgstr "" 1280msgstr ""
1281 1281
1282#: src/nse/gnunet-service-nse.c:1336 1282#: src/nse/gnunet-service-nse.c:1333
1283#, fuzzy 1283#, fuzzy
1284msgid "Invalid work requirement for NSE service. Exiting.\n" 1284msgid "Invalid work requirement for NSE service. Exiting.\n"
1285msgstr "Argumentos no válidos. Saliendo.\n" 1285msgstr "Argumentos no válidos. Saliendo.\n"
1286 1286
1287#: src/nse/gnunet-service-nse.c:1357 1287#: src/nse/gnunet-service-nse.c:1354
1288#, fuzzy 1288#, fuzzy
1289msgid "NSE service could not access hostkey. Exiting.\n" 1289msgid "NSE service could not access hostkey. Exiting.\n"
1290msgstr "Imposible acceder a la información del espacio.\n" 1290msgstr "Imposible acceder a la información del espacio.\n"
@@ -2379,7 +2379,7 @@ msgid "Option `%s' is required when using option `%s'.\n"
2379msgstr "La opción '%s' no tiene sentido sin la opción '%s'.\n" 2379msgstr "La opción '%s' no tiene sentido sin la opción '%s'.\n"
2380 2380
2381#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400 2381#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400
2382#: src/transport/gnunet-transport.c:477 2382#: src/transport/gnunet-transport.c:510
2383#, c-format 2383#, c-format
2384msgid "Option `%s' makes no sense without option `%s'.\n" 2384msgid "Option `%s' makes no sense without option `%s'.\n"
2385msgstr "La opción '%s' no tiene sentido sin la opción '%s'.\n" 2385msgstr "La opción '%s' no tiene sentido sin la opción '%s'.\n"
@@ -2694,9 +2694,9 @@ msgstr ""
2694#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543 2694#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543
2695#: src/transport/gnunet-service-transport_neighbours.c:938 2695#: src/transport/gnunet-service-transport_neighbours.c:938
2696#: src/transport/gnunet-service-transport_neighbours.c:943 2696#: src/transport/gnunet-service-transport_neighbours.c:943
2697#: src/transport/gnunet-service-transport_neighbours.c:1266 2697#: src/transport/gnunet-service-transport_neighbours.c:1269
2698#: src/transport/gnunet-service-transport_neighbours.c:2354 2698#: src/transport/gnunet-service-transport_neighbours.c:2382
2699#: src/transport/gnunet-service-transport_neighbours.c:2425 2699#: src/transport/gnunet-service-transport_neighbours.c:2453
2700#: src/topology/gnunet-daemon-topology.c:654 2700#: src/topology/gnunet-daemon-topology.c:654
2701#: src/topology/gnunet-daemon-topology.c:756 2701#: src/topology/gnunet-daemon-topology.c:756
2702#, fuzzy 2702#, fuzzy
@@ -3179,7 +3179,7 @@ msgstr ""
3179 3179
3180#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290 3180#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290
3181#: src/topology/gnunet-daemon-topology.c:1297 3181#: src/topology/gnunet-daemon-topology.c:1297
3182#: src/hostlist/gnunet-daemon-hostlist.c:290 3182#: src/hostlist/gnunet-daemon-hostlist.c:295
3183#, fuzzy, c-format 3183#, fuzzy, c-format
3184msgid "Failed to connect to `%s' service.\n" 3184msgid "Failed to connect to `%s' service.\n"
3185msgstr "Fallo al conectar a gnunetd.\n" 3185msgstr "Fallo al conectar a gnunetd.\n"
@@ -3218,72 +3218,72 @@ msgstr "# claves de la sesión mandadas"
3218msgid "# peers disconnected due to global disconnect" 3218msgid "# peers disconnected due to global disconnect"
3219msgstr "# Anuncios de los pares recibidos" 3219msgstr "# Anuncios de los pares recibidos"
3220 3220
3221#: src/transport/gnunet-service-transport_neighbours.c:1774 3221#: src/transport/gnunet-service-transport_neighbours.c:1800
3222#: src/transport/gnunet-service-transport_neighbours.c:1795 3222#: src/transport/gnunet-service-transport_neighbours.c:1821
3223#, fuzzy 3223#, fuzzy
3224msgid "# messages not sent (no such peer or not connected)" 3224msgid "# messages not sent (no such peer or not connected)"
3225msgstr "# mensajes defragmentados" 3225msgstr "# mensajes defragmentados"
3226 3226
3227#: src/transport/gnunet-service-transport_neighbours.c:1811 3227#: src/transport/gnunet-service-transport_neighbours.c:1837
3228#, fuzzy 3228#, fuzzy
3229msgid "# bytes in message queue for other peers" 3229msgid "# bytes in message queue for other peers"
3230msgstr "# bytes de mensajes salientes omitidos" 3230msgstr "# bytes de mensajes salientes omitidos"
3231 3231
3232#: src/transport/gnunet-service-transport_neighbours.c:1863 3232#: src/transport/gnunet-service-transport_neighbours.c:1889
3233#, fuzzy 3233#, fuzzy
3234msgid "# messages discarded due to lack of neighbour record" 3234msgid "# messages discarded due to lack of neighbour record"
3235msgstr "# mensajes defragmentados" 3235msgstr "# mensajes defragmentados"
3236 3236
3237#: src/transport/gnunet-service-transport_neighbours.c:1899 3237#: src/transport/gnunet-service-transport_neighbours.c:1925
3238msgid "# bandwidth quota violations by other peers" 3238msgid "# bandwidth quota violations by other peers"
3239msgstr "" 3239msgstr ""
3240 3240
3241#: src/transport/gnunet-service-transport_neighbours.c:1917 3241#: src/transport/gnunet-service-transport_neighbours.c:1943
3242msgid "# ms throttling suggested" 3242msgid "# ms throttling suggested"
3243msgstr "" 3243msgstr ""
3244 3244
3245#: src/transport/gnunet-service-transport_neighbours.c:1946 3245#: src/transport/gnunet-service-transport_neighbours.c:1972
3246#, fuzzy 3246#, fuzzy
3247msgid "# KEEPALIVE messages discarded (not connected)" 3247msgid "# KEEPALIVE messages discarded (not connected)"
3248msgstr "# mensajes defragmentados" 3248msgstr "# mensajes defragmentados"
3249 3249
3250#: src/transport/gnunet-service-transport_neighbours.c:1995 3250#: src/transport/gnunet-service-transport_neighbours.c:2023
3251#, fuzzy 3251#, fuzzy
3252msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)" 3252msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)"
3253msgstr "# mensajes defragmentados" 3253msgstr "# mensajes defragmentados"
3254 3254
3255#: src/transport/gnunet-service-transport_neighbours.c:2003 3255#: src/transport/gnunet-service-transport_neighbours.c:2031
3256#, fuzzy 3256#, fuzzy
3257msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)" 3257msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)"
3258msgstr "# mensajes defragmentados" 3258msgstr "# mensajes defragmentados"
3259 3259
3260#: src/transport/gnunet-service-transport_neighbours.c:2064 3260#: src/transport/gnunet-service-transport_neighbours.c:2092
3261msgid "# SET QUOTA messages ignored (no such peer)" 3261msgid "# SET QUOTA messages ignored (no such peer)"
3262msgstr "" 3262msgstr ""
3263 3263
3264#: src/transport/gnunet-service-transport_neighbours.c:2082 3264#: src/transport/gnunet-service-transport_neighbours.c:2110
3265msgid "# disconnects due to quota of 0" 3265msgid "# disconnects due to quota of 0"
3266msgstr "" 3266msgstr ""
3267 3267
3268#: src/transport/gnunet-service-transport_neighbours.c:2200 3268#: src/transport/gnunet-service-transport_neighbours.c:2228
3269msgid "# disconnect messages ignored (old format)" 3269msgid "# disconnect messages ignored (old format)"
3270msgstr "" 3270msgstr ""
3271 3271
3272#: src/transport/gnunet-service-transport_neighbours.c:2213 3272#: src/transport/gnunet-service-transport_neighbours.c:2241
3273msgid "# disconnect messages ignored (timestamp)" 3273msgid "# disconnect messages ignored (timestamp)"
3274msgstr "" 3274msgstr ""
3275 3275
3276#: src/transport/gnunet-service-transport_neighbours.c:2289 3276#: src/transport/gnunet-service-transport_neighbours.c:2317
3277#, fuzzy 3277#, fuzzy
3278msgid "# unexpected CONNECT_ACK messages (no peer)" 3278msgid "# unexpected CONNECT_ACK messages (no peer)"
3279msgstr "envia COUNT mensajes" 3279msgstr "envia COUNT mensajes"
3280 3280
3281#: src/transport/gnunet-service-transport_neighbours.c:2304 3281#: src/transport/gnunet-service-transport_neighbours.c:2332
3282#, fuzzy 3282#, fuzzy
3283msgid "# unexpected CONNECT_ACK messages" 3283msgid "# unexpected CONNECT_ACK messages"
3284msgstr "envia COUNT mensajes" 3284msgstr "envia COUNT mensajes"
3285 3285
3286#: src/transport/gnunet-service-transport_neighbours.c:2402 3286#: src/transport/gnunet-service-transport_neighbours.c:2430
3287#, fuzzy 3287#, fuzzy
3288msgid "# unexpected ACK messages" 3288msgid "# unexpected ACK messages"
3289msgstr "# de pares conectados" 3289msgstr "# de pares conectados"
@@ -3346,41 +3346,41 @@ msgstr ""
3346msgid "# refreshed my HELLO" 3346msgid "# refreshed my HELLO"
3347msgstr "" 3347msgstr ""
3348 3348
3349#: src/transport/plugin_transport_udp.c:1518 3349#: src/transport/plugin_transport_udp.c:1520
3350#, fuzzy 3350#, fuzzy
3351msgid "# IPv4 broadcast HELLO beacons received via udp" 3351msgid "# IPv4 broadcast HELLO beacons received via udp"
3352msgstr "# mensajes PONG encriptados recibidos" 3352msgstr "# mensajes PONG encriptados recibidos"
3353 3353
3354#: src/transport/plugin_transport_udp.c:1555 3354#: src/transport/plugin_transport_udp.c:1557
3355#, fuzzy 3355#, fuzzy
3356msgid "# IPv6 multicast HELLO beacons received via udp" 3356msgid "# IPv6 multicast HELLO beacons received via udp"
3357msgstr "# mensajes PONG encriptados recibidos" 3357msgstr "# mensajes PONG encriptados recibidos"
3358 3358
3359#: src/transport/plugin_transport_udp.c:2041 3359#: src/transport/plugin_transport_udp.c:2043
3360#: src/transport/plugin_transport_udp_new.c:1218 3360#: src/transport/plugin_transport_udp_new.c:1218
3361#, c-format 3361#, c-format
3362msgid "Given `%s' option is out of range: %llu > %u\n" 3362msgid "Given `%s' option is out of range: %llu > %u\n"
3363msgstr "" 3363msgstr ""
3364 3364
3365#: src/transport/plugin_transport_udp.c:2092 3365#: src/transport/plugin_transport_udp.c:2094
3366#: src/transport/plugin_transport_udp_new.c:1268 3366#: src/transport/plugin_transport_udp_new.c:1268
3367#, fuzzy, c-format 3367#, fuzzy, c-format
3368msgid "Invalid IPv6 address: `%s'\n" 3368msgid "Invalid IPv6 address: `%s'\n"
3369msgstr "Argumento no válido: '%s'\n" 3369msgstr "Argumento no válido: '%s'\n"
3370 3370
3371#: src/transport/plugin_transport_udp.c:2235 3371#: src/transport/plugin_transport_udp.c:2237
3372#, c-format 3372#, c-format
3373msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" 3373msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n"
3374msgstr "" 3374msgstr ""
3375 3375
3376#: src/transport/plugin_transport_udp.c:2296 3376#: src/transport/plugin_transport_udp.c:2298
3377#: src/transport/plugin_transport_udp_new.c:1396 3377#: src/transport/plugin_transport_udp_new.c:1396
3378#, fuzzy 3378#, fuzzy
3379msgid "Failed to open UDP sockets\n" 3379msgid "Failed to open UDP sockets\n"
3380msgstr "Fichero almacenado en '%s'.\n" 3380msgstr "Fichero almacenado en '%s'.\n"
3381 3381
3382#: src/transport/plugin_transport_http_client.c:107 3382#: src/transport/plugin_transport_http_client.c:108
3383#: src/transport/plugin_transport_http_client.c:122 3383#: src/transport/plugin_transport_http_client.c:123
3384#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682 3384#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682
3385#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740 3385#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740
3386#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877 3386#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877
@@ -3389,7 +3389,7 @@ msgstr "Fichero almacenado en '%s'.\n"
3389msgid "%s failed at %s:%d: `%s'\n" 3389msgid "%s failed at %s:%d: `%s'\n"
3390msgstr "'%s' falló en %s: %d con error: '%s'.\n" 3390msgstr "'%s' falló en %s: %d con error: '%s'.\n"
3391 3391
3392#: src/transport/plugin_transport_http_client.c:619 3392#: src/transport/plugin_transport_http_client.c:620
3393#, c-format 3393#, c-format
3394msgid "Could not initialize curl multi handle, failed to start %s plugin!\n" 3394msgid "Could not initialize curl multi handle, failed to start %s plugin!\n"
3395msgstr "" 3395msgstr ""
@@ -3610,188 +3610,192 @@ msgstr "Probando transporte(s) %s\n"
3610msgid "Failed to load transport plugin for `%s'\n" 3610msgid "Failed to load transport plugin for `%s'\n"
3611msgstr "Imposible inicializar la aplicación '%s'\n" 3611msgstr "Imposible inicializar la aplicación '%s'\n"
3612 3612
3613#: src/transport/plugin_transport_wlan.c:881 3613#: src/transport/plugin_transport_wlan.c:884
3614#, fuzzy 3614#, fuzzy
3615msgid "# wlan session timeouts" 3615msgid "# wlan session timeouts"
3616msgstr "# claves de la sesión aceptadas" 3616msgstr "# claves de la sesión aceptadas"
3617 3617
3618#: src/transport/plugin_transport_wlan.c:905 3618#: src/transport/plugin_transport_wlan.c:908
3619#, fuzzy 3619#, fuzzy
3620msgid "# wlan session created" 3620msgid "# wlan session created"
3621msgstr "# claves de la sesión aceptadas" 3621msgstr "# claves de la sesión aceptadas"
3622 3622
3623#: src/transport/plugin_transport_wlan.c:989 3623#: src/transport/plugin_transport_wlan.c:992
3624#: src/transport/plugin_transport_wlan.c:1151 3624#: src/transport/plugin_transport_wlan.c:1154
3625#: src/transport/plugin_transport_wlan.c:1172 3625#: src/transport/plugin_transport_wlan.c:1175
3626#: src/transport/plugin_transport_wlan.c:1203 3626#: src/transport/plugin_transport_wlan.c:1206
3627#: src/transport/plugin_transport_wlan.c:2406 3627#: src/transport/plugin_transport_wlan.c:2409
3628#: src/transport/plugin_transport_wlan.c:3265 3628#: src/transport/plugin_transport_wlan.c:3268
3629msgid "# wlan pending sessions" 3629msgid "# wlan pending sessions"
3630msgstr "" 3630msgstr ""
3631 3631
3632#: src/transport/plugin_transport_wlan.c:1246 3632#: src/transport/plugin_transport_wlan.c:1249
3633#: src/transport/plugin_transport_wlan.c:1961 3633#: src/transport/plugin_transport_wlan.c:1964
3634#, fuzzy 3634#, fuzzy
3635msgid "# wlan pending fragments" 3635msgid "# wlan pending fragments"
3636msgstr "# fragmentos descartados" 3636msgstr "# fragmentos descartados"
3637 3637
3638#: src/transport/plugin_transport_wlan.c:1437 3638#: src/transport/plugin_transport_wlan.c:1440
3639#, c-format 3639#, c-format
3640msgid "Finished reading from wlan-helper stdout with code: %d\n" 3640msgid "Finished reading from wlan-helper stdout with code: %d\n"
3641msgstr "" 3641msgstr ""
3642 3642
3643#: src/transport/plugin_transport_wlan.c:1802 3643#: src/transport/plugin_transport_wlan.c:1805
3644msgid "# wlan hello beacons send" 3644msgid "# wlan hello beacons send"
3645msgstr "" 3645msgstr ""
3646 3646
3647#: src/transport/plugin_transport_wlan.c:1835 3647#: src/transport/plugin_transport_wlan.c:1838
3648#: src/transport/plugin_transport_wlan.c:2050 3648#: src/transport/plugin_transport_wlan.c:2053
3649#: src/transport/plugin_transport_wlan.c:2145 3649#: src/transport/plugin_transport_wlan.c:2148
3650#, c-format 3650#, c-format
3651msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n" 3651msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n"
3652msgstr "" 3652msgstr ""
3653 3653
3654#: src/transport/plugin_transport_wlan.c:2036 3654#: src/transport/plugin_transport_wlan.c:2039
3655msgid "# wlan acks send" 3655msgid "# wlan acks send"
3656msgstr "" 3656msgstr ""
3657 3657
3658#: src/transport/plugin_transport_wlan.c:2107 3658#: src/transport/plugin_transport_wlan.c:2110
3659#, fuzzy 3659#, fuzzy
3660msgid "# wlan fragments send" 3660msgid "# wlan fragments send"
3661msgstr "# fragmentos descartados" 3661msgstr "# fragmentos descartados"
3662 3662
3663#: src/transport/plugin_transport_wlan.c:2273 3663#: src/transport/plugin_transport_wlan.c:2276
3664#, c-format 3664#, c-format
3665msgid "Wlan Address len %d is wrong\n" 3665msgid "Wlan Address len %d is wrong\n"
3666msgstr "" 3666msgstr ""
3667 3667
3668#: src/transport/plugin_transport_wlan.c:2278 3668#: src/transport/plugin_transport_wlan.c:2281
3669#, fuzzy 3669#, fuzzy
3670msgid "# wlan messages queued" 3670msgid "# wlan messages queued"
3671msgstr "# mensajes PONG encriptados recibidos" 3671msgstr "# mensajes PONG encriptados recibidos"
3672 3672
3673#: src/transport/plugin_transport_wlan.c:2367 3673#: src/transport/plugin_transport_wlan.c:2370
3674#: src/transport/plugin_transport_wlan.c:3021 3674#: src/transport/plugin_transport_wlan.c:3024
3675#: src/transport/plugin_transport_wlan.c:3268 3675#: src/transport/plugin_transport_wlan.c:3271
3676msgid "# wlan mac endpoints" 3676msgid "# wlan mac endpoints"
3677msgstr "" 3677msgstr ""
3678 3678
3679#: src/transport/plugin_transport_wlan.c:2595 3679#: src/transport/plugin_transport_wlan.c:2598
3680#, fuzzy 3680#, fuzzy
3681msgid "# wlan whole messages received" 3681msgid "# wlan whole messages received"
3682msgstr "# mensajes PONG encriptados recibidos" 3682msgstr "# mensajes PONG encriptados recibidos"
3683 3683
3684#: src/transport/plugin_transport_wlan.c:2795 3684#: src/transport/plugin_transport_wlan.c:2798
3685#, fuzzy 3685#, fuzzy
3686msgid "# wlan hello messages received" 3686msgid "# wlan hello messages received"
3687msgstr "# mensajes PONG encriptados recibidos" 3687msgstr "# mensajes PONG encriptados recibidos"
3688 3688
3689#: src/transport/plugin_transport_wlan.c:2832 3689#: src/transport/plugin_transport_wlan.c:2835
3690#, fuzzy 3690#, fuzzy
3691msgid "# wlan fragments received" 3691msgid "# wlan fragments received"
3692msgstr "# fragmentos descartados" 3692msgstr "# fragmentos descartados"
3693 3693
3694#: src/transport/plugin_transport_wlan.c:2884 3694#: src/transport/plugin_transport_wlan.c:2887
3695#, fuzzy 3695#, fuzzy
3696msgid "# wlan acks received" 3696msgid "# wlan acks received"
3697msgstr "# mensajes PONG encriptados recibidos" 3697msgstr "# mensajes PONG encriptados recibidos"
3698 3698
3699#: src/transport/plugin_transport_wlan.c:2981 3699#: src/transport/plugin_transport_wlan.c:2984
3700msgid "# wlan mac endpoints timeouts" 3700msgid "# wlan mac endpoints timeouts"
3701msgstr "" 3701msgstr ""
3702 3702
3703#: src/transport/plugin_transport_wlan.c:3005 3703#: src/transport/plugin_transport_wlan.c:3008
3704#, fuzzy 3704#, fuzzy
3705msgid "# wlan mac endpoints created" 3705msgid "# wlan mac endpoints created"
3706msgstr "# mensajes PONG encriptados recibidos" 3706msgstr "# mensajes PONG encriptados recibidos"
3707 3707
3708#: src/transport/plugin_transport_wlan.c:3063 3708#: src/transport/plugin_transport_wlan.c:3066
3709msgid "# wlan WLAN_HELPER_DATA received" 3709msgid "# wlan WLAN_HELPER_DATA received"
3710msgstr "" 3710msgstr ""
3711 3711
3712#: src/transport/plugin_transport_wlan.c:3119 3712#: src/transport/plugin_transport_wlan.c:3122
3713#, fuzzy 3713#, fuzzy
3714msgid "# wlan messages for this client received" 3714msgid "# wlan messages for this client received"
3715msgstr "# mensajes PONG encriptados recibidos" 3715msgstr "# mensajes PONG encriptados recibidos"
3716 3716
3717#: src/transport/plugin_transport_wlan.c:3130 3717#: src/transport/plugin_transport_wlan.c:3133
3718#, fuzzy 3718#, fuzzy
3719msgid "# wlan messages inside WLAN_HELPER_DATA received" 3719msgid "# wlan messages inside WLAN_HELPER_DATA received"
3720msgstr "# mensajes PONG encriptados recibidos" 3720msgstr "# mensajes PONG encriptados recibidos"
3721 3721
3722#: src/transport/gnunet-transport.c:245 3722#: src/transport/gnunet-transport.c:250
3723#, c-format 3723#, c-format
3724msgid "No transport plugins configured, peer will never communicate\n" 3724msgid "No transport plugins configured, peer will never communicate\n"
3725msgstr "" 3725msgstr ""
3726 3726
3727#: src/transport/gnunet-transport.c:258 3727#: src/transport/gnunet-transport.c:263
3728#, c-format 3728#, c-format
3729msgid "No port configured for plugin `%s', cannot test it\n" 3729msgid "No port configured for plugin `%s', cannot test it\n"
3730msgstr "" 3730msgstr ""
3731 3731
3732#: src/transport/gnunet-transport.c:308 3732#: src/transport/gnunet-transport.c:313
3733#, c-format 3733#, c-format
3734msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n" 3734msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n"
3735msgstr "" 3735msgstr ""
3736 3736
3737#: src/transport/gnunet-transport.c:315 3737#: src/transport/gnunet-transport.c:320
3738#, c-format 3738#, c-format
3739msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n" 3739msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"
3740msgstr "" 3740msgstr ""
3741 3741
3742#: src/transport/gnunet-transport.c:348 3742#: src/transport/gnunet-transport.c:353
3743#, c-format 3743#, c-format
3744msgid "Transmitting %u bytes to %s\n" 3744msgid "Transmitting %u bytes to %s\n"
3745msgstr "" 3745msgstr ""
3746 3746
3747#: src/transport/gnunet-transport.c:368 3747#: src/transport/gnunet-transport.c:373
3748#, fuzzy, c-format 3748#, fuzzy, c-format
3749msgid "Connected to %s\n" 3749msgid "Connected to %s\n"
3750msgstr "'%s' conectado a '%s'.\n" 3750msgstr "'%s' conectado a '%s'.\n"
3751 3751
3752#: src/transport/gnunet-transport.c:399 3752#: src/transport/gnunet-transport.c:404
3753#, fuzzy, c-format 3753#, fuzzy, c-format
3754msgid "Disconnected from %s\n" 3754msgid "Disconnected from %s\n"
3755msgstr "'%s' conectado a '%s'.\n" 3755msgstr "'%s' conectado a '%s'.\n"
3756 3756
3757#: src/transport/gnunet-transport.c:428 3757#: src/transport/gnunet-transport.c:433
3758#, fuzzy, c-format 3758#, fuzzy, c-format
3759msgid "Received %u bytes from %s\n" 3759msgid "Received %u bytes from %s\n"
3760msgstr "GAP recibido contenido no válido de '%s'\n" 3760msgstr "GAP recibido contenido no válido de '%s'\n"
3761 3761
3762#: src/transport/gnunet-transport.c:448 3762#: src/transport/gnunet-transport.c:447
3763#, fuzzy, c-format 3763#, fuzzy, c-format
3764msgid "Peer `%s' plugin: `%s' address `%s'\n" 3764msgid "Peer `%s': %s\n"
3765msgstr "Par '%s' con credibilidad %8u y dirección '%s'\n" 3765msgstr "Yo soy el par '%s'.\n"
3766 3766
3767#: src/transport/gnunet-transport.c:486 3767#: src/transport/gnunet-transport.c:519
3768#, fuzzy, c-format 3768#, fuzzy, c-format
3769msgid "Failed to parse peer identity `%s'\n" 3769msgid "Failed to parse peer identity `%s'\n"
3770msgstr "Falló al actualizar los datos del módulo '%s'\n" 3770msgstr "Falló al actualizar los datos del módulo '%s'\n"
3771 3771
3772#: src/transport/gnunet-transport.c:522 3772#: src/transport/gnunet-transport.c:556
3773msgid "measure how fast we are receiving data (until CTRL-C)" 3773msgid "measure how fast we are receiving data (until CTRL-C)"
3774msgstr "" 3774msgstr ""
3775 3775
3776#: src/transport/gnunet-transport.c:525 3776#: src/transport/gnunet-transport.c:559
3777#, fuzzy 3777#, fuzzy
3778msgid "try to connect to the given peer" 3778msgid "try to connect to the given peer"
3779msgstr "Fallo al conectar a gnunetd.\n" 3779msgstr "Fallo al conectar a gnunetd.\n"
3780 3780
3781#: src/transport/gnunet-transport.c:528 3781#: src/transport/gnunet-transport.c:562
3782#, fuzzy 3782#, fuzzy
3783msgid "provide information about all current connections (once)" 3783msgid "provide information about all current connections (once)"
3784msgstr "Imprime información de los pares de GNUnet." 3784msgstr "Imprime información de los pares de GNUnet."
3785 3785
3786#: src/transport/gnunet-transport.c:532 3786#: src/transport/gnunet-transport.c:566
3787msgid "send data for benchmarking to the other peer (until CTRL-C)" 3787msgid "send data for benchmarking to the other peer (until CTRL-C)"
3788msgstr "" 3788msgstr ""
3789 3789
3790#: src/transport/gnunet-transport.c:535 3790#: src/transport/gnunet-transport.c:569
3791msgid "test transport configuration (involves external server)" 3791msgid "test transport configuration (involves external server)"
3792msgstr "" 3792msgstr ""
3793 3793
3794#: src/transport/gnunet-transport.c:543 3794#: src/transport/gnunet-transport.c:572
3795msgid "do not resolve hostnames"
3796msgstr ""
3797
3798#: src/transport/gnunet-transport.c:580
3795#, fuzzy 3799#, fuzzy
3796msgid "Direct access to transport service." 3800msgid "Direct access to transport service."
3797msgstr "Fallo al conectar a gnunetd.\n" 3801msgstr "Fallo al conectar a gnunetd.\n"
@@ -4282,33 +4286,33 @@ msgstr ""
4282msgid "GNUnet NAT traversal test helper daemon" 4286msgid "GNUnet NAT traversal test helper daemon"
4283msgstr "" 4287msgstr ""
4284 4288
4285#: src/nat/nat.c:803 4289#: src/nat/nat.c:805
4286#, c-format 4290#, c-format
4287msgid "gnunet-helper-nat-server generated malformed address `%s'\n" 4291msgid "gnunet-helper-nat-server generated malformed address `%s'\n"
4288msgstr "" 4292msgstr ""
4289 4293
4290#: src/nat/nat.c:852 4294#: src/nat/nat.c:854
4291#, fuzzy, c-format 4295#, fuzzy, c-format
4292msgid "Failed to start %s\n" 4296msgid "Failed to start %s\n"
4293msgstr "Falló al comenzar la recolección.\n" 4297msgstr "Falló al comenzar la recolección.\n"
4294 4298
4295#: src/nat/nat.c:1121 4299#: src/nat/nat.c:1123
4296#, fuzzy, c-format 4300#, fuzzy, c-format
4297msgid "Malformed %s `%s' given in configuration!\n" 4301msgid "Malformed %s `%s' given in configuration!\n"
4298msgstr "Imposible guardar la configuración" 4302msgstr "Imposible guardar la configuración"
4299 4303
4300#: src/nat/nat.c:1187 src/nat/nat.c:1197 4304#: src/nat/nat.c:1189 src/nat/nat.c:1199
4301#, c-format 4305#, c-format
4302msgid "" 4306msgid ""
4303"Configuration requires `%s', but binary is not installed properly (SUID bit " 4307"Configuration requires `%s', but binary is not installed properly (SUID bit "
4304"not set). Option disabled.\n" 4308"not set). Option disabled.\n"
4305msgstr "" 4309msgstr ""
4306 4310
4307#: src/nat/nat.c:1329 4311#: src/nat/nat.c:1331
4308msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n" 4312msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n"
4309msgstr "" 4313msgstr ""
4310 4314
4311#: src/nat/nat.c:1341 4315#: src/nat/nat.c:1343
4312#, c-format 4316#, c-format
4313msgid "Running gnunet-helper-nat-client %s %s %u\n" 4317msgid "Running gnunet-helper-nat-client %s %s %u\n"
4314msgstr "" 4318msgstr ""
@@ -4346,16 +4350,16 @@ msgstr ""
4346msgid "Loading block plugin `%s'\n" 4350msgid "Loading block plugin `%s'\n"
4347msgstr "Probando transporte(s) %s\n" 4351msgstr "Probando transporte(s) %s\n"
4348 4352
4349#: src/mesh/gnunet-service-mesh.c:4201 4353#: src/mesh/gnunet-service-mesh.c:4218
4350msgid "MESH: Wrong CORE service\n" 4354msgid "MESH: Wrong CORE service\n"
4351msgstr "" 4355msgstr ""
4352 4356
4353#: src/mesh/gnunet-service-mesh.c:4406 4357#: src/mesh/gnunet-service-mesh.c:4423
4354#, fuzzy 4358#, fuzzy
4355msgid "Mesh service is lacking key configuration settings. Exiting.\n" 4359msgid "Mesh service is lacking key configuration settings. Exiting.\n"
4356msgstr "Configuración de GNUnet" 4360msgstr "Configuración de GNUnet"
4357 4361
4358#: src/mesh/gnunet-service-mesh.c:4415 4362#: src/mesh/gnunet-service-mesh.c:4432
4359#, fuzzy 4363#, fuzzy
4360msgid "Mesh service could not access hostkey. Exiting.\n" 4364msgid "Mesh service could not access hostkey. Exiting.\n"
4361msgstr "Imposible acceder a la información del espacio.\n" 4365msgstr "Imposible acceder a la información del espacio.\n"
@@ -4543,31 +4547,31 @@ msgstr ""
4543msgid "Hostlist file `%s' could not be removed\n" 4547msgid "Hostlist file `%s' could not be removed\n"
4544msgstr "La clave de sesión del par '%s' no pudo ser verificada.\n" 4548msgstr "La clave de sesión del par '%s' no pudo ser verificada.\n"
4545 4549
4546#: src/hostlist/gnunet-daemon-hostlist.c:257 4550#: src/hostlist/gnunet-daemon-hostlist.c:262
4547msgid "" 4551msgid ""
4548"None of the functions for the hostlist daemon were enabled. I have no " 4552"None of the functions for the hostlist daemon were enabled. I have no "
4549"reason to run!\n" 4553"reason to run!\n"
4550msgstr "" 4554msgstr ""
4551 4555
4552#: src/hostlist/gnunet-daemon-hostlist.c:310 4556#: src/hostlist/gnunet-daemon-hostlist.c:315
4553msgid "advertise our hostlist to other peers" 4557msgid "advertise our hostlist to other peers"
4554msgstr "" 4558msgstr ""
4555 4559
4556#: src/hostlist/gnunet-daemon-hostlist.c:315 4560#: src/hostlist/gnunet-daemon-hostlist.c:320
4557msgid "" 4561msgid ""
4558"bootstrap using hostlists (it is highly recommended that you always use this " 4562"bootstrap using hostlists (it is highly recommended that you always use this "
4559"option)" 4563"option)"
4560msgstr "" 4564msgstr ""
4561 4565
4562#: src/hostlist/gnunet-daemon-hostlist.c:318 4566#: src/hostlist/gnunet-daemon-hostlist.c:323
4563msgid "enable learning about hostlist servers from other peers" 4567msgid "enable learning about hostlist servers from other peers"
4564msgstr "" 4568msgstr ""
4565 4569
4566#: src/hostlist/gnunet-daemon-hostlist.c:322 4570#: src/hostlist/gnunet-daemon-hostlist.c:327
4567msgid "provide a hostlist server" 4571msgid "provide a hostlist server"
4568msgstr "" 4572msgstr ""
4569 4573
4570#: src/hostlist/gnunet-daemon-hostlist.c:334 4574#: src/hostlist/gnunet-daemon-hostlist.c:339
4571msgid "GNUnet hostlist server and client" 4575msgid "GNUnet hostlist server and client"
4572msgstr "" 4576msgstr ""
4573 4577
@@ -4659,30 +4663,30 @@ msgstr ""
4659msgid "Could not start hostlist HTTP server on port %u\n" 4663msgid "Could not start hostlist HTTP server on port %u\n"
4660msgstr "" 4664msgstr ""
4661 4665
4662#: src/peerinfo-tool/gnunet-peerinfo.c:221 4666#: src/peerinfo-tool/gnunet-peerinfo.c:219
4663#, fuzzy, c-format 4667#, fuzzy, c-format
4664msgid "Could not find option `%s:%s' in configuration.\n" 4668msgid "Could not find option `%s:%s' in configuration.\n"
4665msgstr "¡Imposible encontrar el par '%s' en la tabla de enrutado!\n" 4669msgstr "¡Imposible encontrar el par '%s' en la tabla de enrutado!\n"
4666 4670
4667#: src/peerinfo-tool/gnunet-peerinfo.c:228 4671#: src/peerinfo-tool/gnunet-peerinfo.c:226
4668#, fuzzy, c-format 4672#, fuzzy, c-format
4669msgid "Loading hostkey from `%s' failed.\n" 4673msgid "Loading hostkey from `%s' failed.\n"
4670msgstr "Analizando saludo de '%s' se produjo un fallo.\n" 4674msgstr "Analizando saludo de '%s' se produjo un fallo.\n"
4671 4675
4672#: src/peerinfo-tool/gnunet-peerinfo.c:240 4676#: src/peerinfo-tool/gnunet-peerinfo.c:238
4673#, c-format 4677#, c-format
4674msgid "I am peer `%s'.\n" 4678msgid "I am peer `%s'.\n"
4675msgstr "Yo soy el par '%s'.\n" 4679msgstr "Yo soy el par '%s'.\n"
4676 4680
4677#: src/peerinfo-tool/gnunet-peerinfo.c:260 4681#: src/peerinfo-tool/gnunet-peerinfo.c:258
4678msgid "output only the identity strings" 4682msgid "output only the identity strings"
4679msgstr "" 4683msgstr ""
4680 4684
4681#: src/peerinfo-tool/gnunet-peerinfo.c:263 4685#: src/peerinfo-tool/gnunet-peerinfo.c:261
4682msgid "output our own identity only" 4686msgid "output our own identity only"
4683msgstr "" 4687msgstr ""
4684 4688
4685#: src/peerinfo-tool/gnunet-peerinfo.c:269 4689#: src/peerinfo-tool/gnunet-peerinfo.c:267
4686#, fuzzy 4690#, fuzzy
4687msgid "Print information about peers." 4691msgid "Print information about peers."
4688msgstr "Imprime información de los pares de GNUnet." 4692msgstr "Imprime información de los pares de GNUnet."
@@ -4712,22 +4716,26 @@ msgstr ""
4712msgid "use configuration file FILENAME" 4716msgid "use configuration file FILENAME"
4713msgstr "usa el fichero de configuración FILENAME" 4717msgstr "usa el fichero de configuración FILENAME"
4714 4718
4715#: src/include/gnunet_common.h:361 src/include/gnunet_common.h:366 4719#: src/include/gnunet_common.h:366 src/include/gnunet_common.h:371
4716#: src/include/gnunet_common.h:372 4720#: src/include/gnunet_common.h:377
4717#, fuzzy, c-format 4721#, fuzzy, c-format
4718msgid "Assertion failed at %s:%d.\n" 4722msgid "Assertion failed at %s:%d.\n"
4719msgstr "La verificación de la firma RSA fallo en %s: %d: %s\n" 4723msgstr "La verificación de la firma RSA fallo en %s: %d: %s\n"
4720 4724
4721#: src/include/gnunet_common.h:382 4725#: src/include/gnunet_common.h:387
4722#, fuzzy, c-format 4726#, fuzzy, c-format
4723msgid "External protocol violation detected at %s:%d.\n" 4727msgid "External protocol violation detected at %s:%d.\n"
4724msgstr "La verificación de la firma RSA fallo en %s: %d: %s\n" 4728msgstr "La verificación de la firma RSA fallo en %s: %d: %s\n"
4725 4729
4726#: src/include/gnunet_common.h:403 src/include/gnunet_common.h:410 4730#: src/include/gnunet_common.h:408 src/include/gnunet_common.h:415
4727#, fuzzy, c-format 4731#, fuzzy, c-format
4728msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" 4732msgid "`%s' failed on file `%s' at %s:%d with error: %s\n"
4729msgstr "'%s' falló en el fichero '%s' en %s: %d con el error: %s\n" 4733msgstr "'%s' falló en el fichero '%s' en %s: %d con el error: %s\n"
4730 4734
4735#, fuzzy
4736#~ msgid "Peer `%s' plugin: `%s' address `%s'\n"
4737#~ msgstr "Par '%s' con credibilidad %8u y dirección '%s'\n"
4738
4731#~ msgid "KiB" 4739#~ msgid "KiB"
4732#~ msgstr "KiB" 4740#~ msgstr "KiB"
4733 4741
diff --git a/po/sv.po b/po/sv.po
index 4a607a025..6484a045e 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: GNUnet 0.7.0b\n" 8"Project-Id-Version: GNUnet 0.7.0b\n"
9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
10"POT-Creation-Date: 2011-11-26 14:53+0100\n" 10"POT-Creation-Date: 2011-11-29 21:38+0100\n"
11"PO-Revision-Date: 2006-01-21 17:16+0100\n" 11"PO-Revision-Date: 2006-01-21 17:16+0100\n"
12"Last-Translator: Daniel Nylander <po@danielnylander.se>\n" 12"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
13"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" 13"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@@ -29,8 +29,8 @@ msgstr ""
29#: src/datacache/plugin_datacache_mysql.c:517 29#: src/datacache/plugin_datacache_mysql.c:517
30#: src/datacache/plugin_datacache_mysql.c:526 30#: src/datacache/plugin_datacache_mysql.c:526
31#: src/datacache/plugin_datacache_mysql.c:598 31#: src/datacache/plugin_datacache_mysql.c:598
32#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:389 32#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:394
33#: src/include/gnunet_common.h:396 33#: src/include/gnunet_common.h:401
34#, c-format 34#, c-format
35msgid "`%s' failed at %s:%d with error: %s\n" 35msgid "`%s' failed at %s:%d with error: %s\n"
36msgstr "\"%s\" misslyckades vid %s:%d med fel: %s\n" 36msgstr "\"%s\" misslyckades vid %s:%d med fel: %s\n"
@@ -384,32 +384,32 @@ msgstr ""
384msgid "Peer `%s'\n" 384msgid "Peer `%s'\n"
385msgstr "Jag är ändpunkt \"%s\".\n" 385msgstr "Jag är ändpunkt \"%s\".\n"
386 386
387#: src/core/gnunet-core-list-connections.c:167 387#: src/core/gnunet-core-list-connections.c:178
388#: src/peerinfo-tool/gnunet-peerinfo.c:199 388#: src/peerinfo-tool/gnunet-peerinfo.c:197
389#, fuzzy, c-format 389#, fuzzy, c-format
390msgid "Invalid command line argument `%s'\n" 390msgid "Invalid command line argument `%s'\n"
391msgstr "Ogiltiga kommandoradsargument:\n" 391msgstr "Ogiltiga kommandoradsargument:\n"
392 392
393#: src/core/gnunet-core-list-connections.c:188 393#: src/core/gnunet-core-list-connections.c:199
394#: src/peerinfo-tool/gnunet-peerinfo.c:257 394#: src/peerinfo-tool/gnunet-peerinfo.c:255
395msgid "don't resolve host names" 395msgid "don't resolve host names"
396msgstr "" 396msgstr ""
397 397
398#: src/core/gnunet-core-list-connections.c:195 398#: src/core/gnunet-core-list-connections.c:206
399#, fuzzy 399#, fuzzy
400msgid "Print information about connected peers." 400msgid "Print information about connected peers."
401msgstr "Skriv ut information om GNUnets motparter." 401msgstr "Skriv ut information om GNUnets motparter."
402 402
403#: src/core/gnunet-service-core_clients.c:357 403#: src/core/gnunet-service-core_clients.c:359
404msgid "# send requests dropped (disconnected)" 404msgid "# send requests dropped (disconnected)"
405msgstr "" 405msgstr ""
406 406
407#: src/core/gnunet-service-core_clients.c:462 407#: src/core/gnunet-service-core_clients.c:464
408#, fuzzy 408#, fuzzy
409msgid "# messages discarded (session disconnected)" 409msgid "# messages discarded (session disconnected)"
410msgstr "Nätverksannonsering avstängd i konfigurationen!\n" 410msgstr "Nätverksannonsering avstängd i konfigurationen!\n"
411 411
412#: src/core/gnunet-service-core_clients.c:800 412#: src/core/gnunet-service-core_clients.c:801
413#, fuzzy, c-format 413#, fuzzy, c-format
414msgid "# bytes of messages of type %u received" 414msgid "# bytes of messages of type %u received"
415msgstr "# krypterade PONG-meddelanden mottagna" 415msgstr "# krypterade PONG-meddelanden mottagna"
@@ -457,7 +457,7 @@ msgid "# bytes decrypted"
457msgstr "# byte dekrypterade" 457msgstr "# byte dekrypterade"
458 458
459#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002 459#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002
460#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:156 460#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:154
461#, fuzzy, c-format 461#, fuzzy, c-format
462msgid "Error in communication with PEERINFO service\n" 462msgid "Error in communication with PEERINFO service\n"
463msgstr "Skriv ut information om GNUnets motparter." 463msgstr "Skriv ut information om GNUnets motparter."
@@ -579,7 +579,7 @@ msgstr ""
579 579
580#: src/core/gnunet-service-core_kx.c:1539 580#: src/core/gnunet-service-core_kx.c:1539
581#: src/transport/gnunet-service-transport.c:537 581#: src/transport/gnunet-service-transport.c:537
582#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:207 582#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:205
583#, fuzzy, c-format 583#, fuzzy, c-format
584msgid "Could not access PEERINFO service. Exiting.\n" 584msgid "Could not access PEERINFO service. Exiting.\n"
585msgstr "Kunde inte komma åt namnrymdsinformation.\n" 585msgstr "Kunde inte komma åt namnrymdsinformation.\n"
@@ -744,11 +744,11 @@ msgstr "%s: flagga \"-W %s\" tillåter inte ett argument\n"
744msgid "Use --help to get a list of options.\n" 744msgid "Use --help to get a list of options.\n"
745msgstr "Använd --help för att få en lista på flaggor.\n" 745msgstr "Använd --help för att få en lista på flaggor.\n"
746 746
747#: src/util/scheduler.c:860 747#: src/util/scheduler.c:870
748msgid "Looks like we're busy waiting...\n" 748msgid "Looks like we're busy waiting...\n"
749msgstr "" 749msgstr ""
750 750
751#: src/util/scheduler.c:990 751#: src/util/scheduler.c:1000
752#, c-format 752#, c-format
753msgid "Attempt to cancel dead task %llu!\n" 753msgid "Attempt to cancel dead task %llu!\n"
754msgstr "" 754msgstr ""
@@ -1242,34 +1242,34 @@ msgstr "Anrop till \"%s\" med nyckel \"%s\".\n"
1242msgid "RSA signature verification failed at %s:%d: %s\n" 1242msgid "RSA signature verification failed at %s:%d: %s\n"
1243msgstr "" 1243msgstr ""
1244 1244
1245#: src/nse/gnunet-nse-profiler.c:647 src/dht/gnunet-dht-get.c:213 1245#: src/nse/gnunet-nse-profiler.c:634 src/dht/gnunet-dht-get.c:213
1246#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169 1246#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169
1247#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591 1247#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591
1248#: src/fs/gnunet-download.c:263 1248#: src/fs/gnunet-download.c:263
1249msgid "be verbose (print progress information)" 1249msgid "be verbose (print progress information)"
1250msgstr "" 1250msgstr ""
1251 1251
1252#: src/nse/gnunet-nse-profiler.c:665 1252#: src/nse/gnunet-nse-profiler.c:652
1253#, fuzzy 1253#, fuzzy
1254msgid "Measure quality and performance of the NSE service." 1254msgid "Measure quality and performance of the NSE service."
1255msgstr "Kan inte tillgå tjänsten" 1255msgstr "Kan inte tillgå tjänsten"
1256 1256
1257#: src/nse/gnunet-service-nse.c:904 1257#: src/nse/gnunet-service-nse.c:902
1258#, c-format 1258#, c-format
1259msgid "Proof of work invalid: %llu!\n" 1259msgid "Proof of work invalid: %llu!\n"
1260msgstr "" 1260msgstr ""
1261 1261
1262#: src/nse/gnunet-service-nse.c:1329 src/nse/gnunet-service-nse.c:1348 1262#: src/nse/gnunet-service-nse.c:1326 src/nse/gnunet-service-nse.c:1345
1263#: src/nse/gnunet-service-nse.c:1369 1263#: src/nse/gnunet-service-nse.c:1366
1264msgid "NSE service is lacking key configuration settings. Exiting.\n" 1264msgid "NSE service is lacking key configuration settings. Exiting.\n"
1265msgstr "" 1265msgstr ""
1266 1266
1267#: src/nse/gnunet-service-nse.c:1336 1267#: src/nse/gnunet-service-nse.c:1333
1268#, fuzzy 1268#, fuzzy
1269msgid "Invalid work requirement for NSE service. Exiting.\n" 1269msgid "Invalid work requirement for NSE service. Exiting.\n"
1270msgstr "Ogiltiga argument. Avslutar.\n" 1270msgstr "Ogiltiga argument. Avslutar.\n"
1271 1271
1272#: src/nse/gnunet-service-nse.c:1357 1272#: src/nse/gnunet-service-nse.c:1354
1273#, fuzzy 1273#, fuzzy
1274msgid "NSE service could not access hostkey. Exiting.\n" 1274msgid "NSE service could not access hostkey. Exiting.\n"
1275msgstr "Kunde inte komma åt namnrymdsinformation.\n" 1275msgstr "Kunde inte komma åt namnrymdsinformation.\n"
@@ -2348,7 +2348,7 @@ msgid "Option `%s' is required when using option `%s'.\n"
2348msgstr "Kommando \"%s\" kräver ett argument (\"%s\").\n" 2348msgstr "Kommando \"%s\" kräver ett argument (\"%s\").\n"
2349 2349
2350#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400 2350#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400
2351#: src/transport/gnunet-transport.c:477 2351#: src/transport/gnunet-transport.c:510
2352#, c-format 2352#, c-format
2353msgid "Option `%s' makes no sense without option `%s'.\n" 2353msgid "Option `%s' makes no sense without option `%s'.\n"
2354msgstr "" 2354msgstr ""
@@ -2650,9 +2650,9 @@ msgstr ""
2650#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543 2650#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543
2651#: src/transport/gnunet-service-transport_neighbours.c:938 2651#: src/transport/gnunet-service-transport_neighbours.c:938
2652#: src/transport/gnunet-service-transport_neighbours.c:943 2652#: src/transport/gnunet-service-transport_neighbours.c:943
2653#: src/transport/gnunet-service-transport_neighbours.c:1266 2653#: src/transport/gnunet-service-transport_neighbours.c:1269
2654#: src/transport/gnunet-service-transport_neighbours.c:2354 2654#: src/transport/gnunet-service-transport_neighbours.c:2382
2655#: src/transport/gnunet-service-transport_neighbours.c:2425 2655#: src/transport/gnunet-service-transport_neighbours.c:2453
2656#: src/topology/gnunet-daemon-topology.c:654 2656#: src/topology/gnunet-daemon-topology.c:654
2657#: src/topology/gnunet-daemon-topology.c:756 2657#: src/topology/gnunet-daemon-topology.c:756
2658#, fuzzy 2658#, fuzzy
@@ -3128,7 +3128,7 @@ msgstr ""
3128 3128
3129#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290 3129#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290
3130#: src/topology/gnunet-daemon-topology.c:1297 3130#: src/topology/gnunet-daemon-topology.c:1297
3131#: src/hostlist/gnunet-daemon-hostlist.c:290 3131#: src/hostlist/gnunet-daemon-hostlist.c:295
3132#, fuzzy, c-format 3132#, fuzzy, c-format
3133msgid "Failed to connect to `%s' service.\n" 3133msgid "Failed to connect to `%s' service.\n"
3134msgstr "Misslyckades att initiera tjänsten \"%s\".\n" 3134msgstr "Misslyckades att initiera tjänsten \"%s\".\n"
@@ -3168,69 +3168,69 @@ msgstr "# sessionsnycklar skickade"
3168msgid "# peers disconnected due to global disconnect" 3168msgid "# peers disconnected due to global disconnect"
3169msgstr "Nätverksannonsering avstängd i konfigurationen!\n" 3169msgstr "Nätverksannonsering avstängd i konfigurationen!\n"
3170 3170
3171#: src/transport/gnunet-service-transport_neighbours.c:1774 3171#: src/transport/gnunet-service-transport_neighbours.c:1800
3172#: src/transport/gnunet-service-transport_neighbours.c:1795 3172#: src/transport/gnunet-service-transport_neighbours.c:1821
3173msgid "# messages not sent (no such peer or not connected)" 3173msgid "# messages not sent (no such peer or not connected)"
3174msgstr "" 3174msgstr ""
3175 3175
3176#: src/transport/gnunet-service-transport_neighbours.c:1811 3176#: src/transport/gnunet-service-transport_neighbours.c:1837
3177msgid "# bytes in message queue for other peers" 3177msgid "# bytes in message queue for other peers"
3178msgstr "" 3178msgstr ""
3179 3179
3180#: src/transport/gnunet-service-transport_neighbours.c:1863 3180#: src/transport/gnunet-service-transport_neighbours.c:1889
3181#, fuzzy 3181#, fuzzy
3182msgid "# messages discarded due to lack of neighbour record" 3182msgid "# messages discarded due to lack of neighbour record"
3183msgstr "Nätverksannonsering avstängd i konfigurationen!\n" 3183msgstr "Nätverksannonsering avstängd i konfigurationen!\n"
3184 3184
3185#: src/transport/gnunet-service-transport_neighbours.c:1899 3185#: src/transport/gnunet-service-transport_neighbours.c:1925
3186msgid "# bandwidth quota violations by other peers" 3186msgid "# bandwidth quota violations by other peers"
3187msgstr "" 3187msgstr ""
3188 3188
3189#: src/transport/gnunet-service-transport_neighbours.c:1917 3189#: src/transport/gnunet-service-transport_neighbours.c:1943
3190msgid "# ms throttling suggested" 3190msgid "# ms throttling suggested"
3191msgstr "" 3191msgstr ""
3192 3192
3193#: src/transport/gnunet-service-transport_neighbours.c:1946 3193#: src/transport/gnunet-service-transport_neighbours.c:1972
3194msgid "# KEEPALIVE messages discarded (not connected)" 3194msgid "# KEEPALIVE messages discarded (not connected)"
3195msgstr "" 3195msgstr ""
3196 3196
3197#: src/transport/gnunet-service-transport_neighbours.c:1995 3197#: src/transport/gnunet-service-transport_neighbours.c:2023
3198#, fuzzy 3198#, fuzzy
3199msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)" 3199msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)"
3200msgstr "Nätverksannonsering avstängd i konfigurationen!\n" 3200msgstr "Nätverksannonsering avstängd i konfigurationen!\n"
3201 3201
3202#: src/transport/gnunet-service-transport_neighbours.c:2003 3202#: src/transport/gnunet-service-transport_neighbours.c:2031
3203#, fuzzy 3203#, fuzzy
3204msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)" 3204msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)"
3205msgstr "Nätverksannonsering avstängd i konfigurationen!\n" 3205msgstr "Nätverksannonsering avstängd i konfigurationen!\n"
3206 3206
3207#: src/transport/gnunet-service-transport_neighbours.c:2064 3207#: src/transport/gnunet-service-transport_neighbours.c:2092
3208msgid "# SET QUOTA messages ignored (no such peer)" 3208msgid "# SET QUOTA messages ignored (no such peer)"
3209msgstr "" 3209msgstr ""
3210 3210
3211#: src/transport/gnunet-service-transport_neighbours.c:2082 3211#: src/transport/gnunet-service-transport_neighbours.c:2110
3212msgid "# disconnects due to quota of 0" 3212msgid "# disconnects due to quota of 0"
3213msgstr "" 3213msgstr ""
3214 3214
3215#: src/transport/gnunet-service-transport_neighbours.c:2200 3215#: src/transport/gnunet-service-transport_neighbours.c:2228
3216msgid "# disconnect messages ignored (old format)" 3216msgid "# disconnect messages ignored (old format)"
3217msgstr "" 3217msgstr ""
3218 3218
3219#: src/transport/gnunet-service-transport_neighbours.c:2213 3219#: src/transport/gnunet-service-transport_neighbours.c:2241
3220msgid "# disconnect messages ignored (timestamp)" 3220msgid "# disconnect messages ignored (timestamp)"
3221msgstr "" 3221msgstr ""
3222 3222
3223#: src/transport/gnunet-service-transport_neighbours.c:2289 3223#: src/transport/gnunet-service-transport_neighbours.c:2317
3224#, fuzzy 3224#, fuzzy
3225msgid "# unexpected CONNECT_ACK messages (no peer)" 3225msgid "# unexpected CONNECT_ACK messages (no peer)"
3226msgstr "skicka ANTAL meddelanden" 3226msgstr "skicka ANTAL meddelanden"
3227 3227
3228#: src/transport/gnunet-service-transport_neighbours.c:2304 3228#: src/transport/gnunet-service-transport_neighbours.c:2332
3229#, fuzzy 3229#, fuzzy
3230msgid "# unexpected CONNECT_ACK messages" 3230msgid "# unexpected CONNECT_ACK messages"
3231msgstr "skicka ANTAL meddelanden" 3231msgstr "skicka ANTAL meddelanden"
3232 3232
3233#: src/transport/gnunet-service-transport_neighbours.c:2402 3233#: src/transport/gnunet-service-transport_neighbours.c:2430
3234#, fuzzy 3234#, fuzzy
3235msgid "# unexpected ACK messages" 3235msgid "# unexpected ACK messages"
3236msgstr "# krypterade PONG-meddelanden skickade" 3236msgstr "# krypterade PONG-meddelanden skickade"
@@ -3291,41 +3291,41 @@ msgstr ""
3291msgid "# refreshed my HELLO" 3291msgid "# refreshed my HELLO"
3292msgstr "" 3292msgstr ""
3293 3293
3294#: src/transport/plugin_transport_udp.c:1518 3294#: src/transport/plugin_transport_udp.c:1520
3295#, fuzzy 3295#, fuzzy
3296msgid "# IPv4 broadcast HELLO beacons received via udp" 3296msgid "# IPv4 broadcast HELLO beacons received via udp"
3297msgstr "# krypterade PONG-meddelanden mottagna" 3297msgstr "# krypterade PONG-meddelanden mottagna"
3298 3298
3299#: src/transport/plugin_transport_udp.c:1555 3299#: src/transport/plugin_transport_udp.c:1557
3300#, fuzzy 3300#, fuzzy
3301msgid "# IPv6 multicast HELLO beacons received via udp" 3301msgid "# IPv6 multicast HELLO beacons received via udp"
3302msgstr "# krypterade PONG-meddelanden mottagna" 3302msgstr "# krypterade PONG-meddelanden mottagna"
3303 3303
3304#: src/transport/plugin_transport_udp.c:2041 3304#: src/transport/plugin_transport_udp.c:2043
3305#: src/transport/plugin_transport_udp_new.c:1218 3305#: src/transport/plugin_transport_udp_new.c:1218
3306#, c-format 3306#, c-format
3307msgid "Given `%s' option is out of range: %llu > %u\n" 3307msgid "Given `%s' option is out of range: %llu > %u\n"
3308msgstr "" 3308msgstr ""
3309 3309
3310#: src/transport/plugin_transport_udp.c:2092 3310#: src/transport/plugin_transport_udp.c:2094
3311#: src/transport/plugin_transport_udp_new.c:1268 3311#: src/transport/plugin_transport_udp_new.c:1268
3312#, fuzzy, c-format 3312#, fuzzy, c-format
3313msgid "Invalid IPv6 address: `%s'\n" 3313msgid "Invalid IPv6 address: `%s'\n"
3314msgstr "Ogiltigt svar på \"%s\".\n" 3314msgstr "Ogiltigt svar på \"%s\".\n"
3315 3315
3316#: src/transport/plugin_transport_udp.c:2235 3316#: src/transport/plugin_transport_udp.c:2237
3317#, c-format 3317#, c-format
3318msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" 3318msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n"
3319msgstr "" 3319msgstr ""
3320 3320
3321#: src/transport/plugin_transport_udp.c:2296 3321#: src/transport/plugin_transport_udp.c:2298
3322#: src/transport/plugin_transport_udp_new.c:1396 3322#: src/transport/plugin_transport_udp_new.c:1396
3323#, fuzzy 3323#, fuzzy
3324msgid "Failed to open UDP sockets\n" 3324msgid "Failed to open UDP sockets\n"
3325msgstr "Misslyckades att binda till UDP6-port %d.\n" 3325msgstr "Misslyckades att binda till UDP6-port %d.\n"
3326 3326
3327#: src/transport/plugin_transport_http_client.c:107 3327#: src/transport/plugin_transport_http_client.c:108
3328#: src/transport/plugin_transport_http_client.c:122 3328#: src/transport/plugin_transport_http_client.c:123
3329#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682 3329#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682
3330#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740 3330#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740
3331#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877 3331#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877
@@ -3334,7 +3334,7 @@ msgstr "Misslyckades att binda till UDP6-port %d.\n"
3334msgid "%s failed at %s:%d: `%s'\n" 3334msgid "%s failed at %s:%d: `%s'\n"
3335msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" 3335msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n"
3336 3336
3337#: src/transport/plugin_transport_http_client.c:619 3337#: src/transport/plugin_transport_http_client.c:620
3338#, c-format 3338#, c-format
3339msgid "Could not initialize curl multi handle, failed to start %s plugin!\n" 3339msgid "Could not initialize curl multi handle, failed to start %s plugin!\n"
3340msgstr "" 3340msgstr ""
@@ -3557,188 +3557,193 @@ msgstr "Testar transport(er) %s\n"
3557msgid "Failed to load transport plugin for `%s'\n" 3557msgid "Failed to load transport plugin for `%s'\n"
3558msgstr "Kunde inte slå upp \"%s\": %s\n" 3558msgstr "Kunde inte slå upp \"%s\": %s\n"
3559 3559
3560#: src/transport/plugin_transport_wlan.c:881 3560#: src/transport/plugin_transport_wlan.c:884
3561#, fuzzy 3561#, fuzzy
3562msgid "# wlan session timeouts" 3562msgid "# wlan session timeouts"
3563msgstr "# sessionsnycklar accepterade" 3563msgstr "# sessionsnycklar accepterade"
3564 3564
3565#: src/transport/plugin_transport_wlan.c:905 3565#: src/transport/plugin_transport_wlan.c:908
3566#, fuzzy 3566#, fuzzy
3567msgid "# wlan session created" 3567msgid "# wlan session created"
3568msgstr "# sessionsnycklar accepterade" 3568msgstr "# sessionsnycklar accepterade"
3569 3569
3570#: src/transport/plugin_transport_wlan.c:989 3570#: src/transport/plugin_transport_wlan.c:992
3571#: src/transport/plugin_transport_wlan.c:1151 3571#: src/transport/plugin_transport_wlan.c:1154
3572#: src/transport/plugin_transport_wlan.c:1172 3572#: src/transport/plugin_transport_wlan.c:1175
3573#: src/transport/plugin_transport_wlan.c:1203 3573#: src/transport/plugin_transport_wlan.c:1206
3574#: src/transport/plugin_transport_wlan.c:2406 3574#: src/transport/plugin_transport_wlan.c:2409
3575#: src/transport/plugin_transport_wlan.c:3265 3575#: src/transport/plugin_transport_wlan.c:3268
3576msgid "# wlan pending sessions" 3576msgid "# wlan pending sessions"
3577msgstr "" 3577msgstr ""
3578 3578
3579#: src/transport/plugin_transport_wlan.c:1246 3579#: src/transport/plugin_transport_wlan.c:1249
3580#: src/transport/plugin_transport_wlan.c:1961 3580#: src/transport/plugin_transport_wlan.c:1964
3581#, fuzzy 3581#, fuzzy
3582msgid "# wlan pending fragments" 3582msgid "# wlan pending fragments"
3583msgstr "# byte mottogs via TCP" 3583msgstr "# byte mottogs via TCP"
3584 3584
3585#: src/transport/plugin_transport_wlan.c:1437 3585#: src/transport/plugin_transport_wlan.c:1440
3586#, c-format 3586#, c-format
3587msgid "Finished reading from wlan-helper stdout with code: %d\n" 3587msgid "Finished reading from wlan-helper stdout with code: %d\n"
3588msgstr "" 3588msgstr ""
3589 3589
3590#: src/transport/plugin_transport_wlan.c:1802 3590#: src/transport/plugin_transport_wlan.c:1805
3591msgid "# wlan hello beacons send" 3591msgid "# wlan hello beacons send"
3592msgstr "" 3592msgstr ""
3593 3593
3594#: src/transport/plugin_transport_wlan.c:1835 3594#: src/transport/plugin_transport_wlan.c:1838
3595#: src/transport/plugin_transport_wlan.c:2050 3595#: src/transport/plugin_transport_wlan.c:2053
3596#: src/transport/plugin_transport_wlan.c:2145 3596#: src/transport/plugin_transport_wlan.c:2148
3597#, c-format 3597#, c-format
3598msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n" 3598msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n"
3599msgstr "" 3599msgstr ""
3600 3600
3601#: src/transport/plugin_transport_wlan.c:2036 3601#: src/transport/plugin_transport_wlan.c:2039
3602msgid "# wlan acks send" 3602msgid "# wlan acks send"
3603msgstr "" 3603msgstr ""
3604 3604
3605#: src/transport/plugin_transport_wlan.c:2107 3605#: src/transport/plugin_transport_wlan.c:2110
3606#, fuzzy 3606#, fuzzy
3607msgid "# wlan fragments send" 3607msgid "# wlan fragments send"
3608msgstr "# byte mottogs via TCP" 3608msgstr "# byte mottogs via TCP"
3609 3609
3610#: src/transport/plugin_transport_wlan.c:2273 3610#: src/transport/plugin_transport_wlan.c:2276
3611#, c-format 3611#, c-format
3612msgid "Wlan Address len %d is wrong\n" 3612msgid "Wlan Address len %d is wrong\n"
3613msgstr "" 3613msgstr ""
3614 3614
3615#: src/transport/plugin_transport_wlan.c:2278 3615#: src/transport/plugin_transport_wlan.c:2281
3616#, fuzzy 3616#, fuzzy
3617msgid "# wlan messages queued" 3617msgid "# wlan messages queued"
3618msgstr "# krypterade PONG-meddelanden mottagna" 3618msgstr "# krypterade PONG-meddelanden mottagna"
3619 3619
3620#: src/transport/plugin_transport_wlan.c:2367 3620#: src/transport/plugin_transport_wlan.c:2370
3621#: src/transport/plugin_transport_wlan.c:3021 3621#: src/transport/plugin_transport_wlan.c:3024
3622#: src/transport/plugin_transport_wlan.c:3268 3622#: src/transport/plugin_transport_wlan.c:3271
3623msgid "# wlan mac endpoints" 3623msgid "# wlan mac endpoints"
3624msgstr "" 3624msgstr ""
3625 3625
3626#: src/transport/plugin_transport_wlan.c:2595 3626#: src/transport/plugin_transport_wlan.c:2598
3627#, fuzzy 3627#, fuzzy
3628msgid "# wlan whole messages received" 3628msgid "# wlan whole messages received"
3629msgstr "# krypterade PONG-meddelanden mottagna" 3629msgstr "# krypterade PONG-meddelanden mottagna"
3630 3630
3631#: src/transport/plugin_transport_wlan.c:2795 3631#: src/transport/plugin_transport_wlan.c:2798
3632#, fuzzy 3632#, fuzzy
3633msgid "# wlan hello messages received" 3633msgid "# wlan hello messages received"
3634msgstr "# krypterade PONG-meddelanden mottagna" 3634msgstr "# krypterade PONG-meddelanden mottagna"
3635 3635
3636#: src/transport/plugin_transport_wlan.c:2832 3636#: src/transport/plugin_transport_wlan.c:2835
3637#, fuzzy 3637#, fuzzy
3638msgid "# wlan fragments received" 3638msgid "# wlan fragments received"
3639msgstr "# byte mottogs via TCP" 3639msgstr "# byte mottogs via TCP"
3640 3640
3641#: src/transport/plugin_transport_wlan.c:2884 3641#: src/transport/plugin_transport_wlan.c:2887
3642#, fuzzy 3642#, fuzzy
3643msgid "# wlan acks received" 3643msgid "# wlan acks received"
3644msgstr "# klartext PONG-meddelanden mottagna" 3644msgstr "# klartext PONG-meddelanden mottagna"
3645 3645
3646#: src/transport/plugin_transport_wlan.c:2981 3646#: src/transport/plugin_transport_wlan.c:2984
3647msgid "# wlan mac endpoints timeouts" 3647msgid "# wlan mac endpoints timeouts"
3648msgstr "" 3648msgstr ""
3649 3649
3650#: src/transport/plugin_transport_wlan.c:3005 3650#: src/transport/plugin_transport_wlan.c:3008
3651#, fuzzy 3651#, fuzzy
3652msgid "# wlan mac endpoints created" 3652msgid "# wlan mac endpoints created"
3653msgstr "# byte mottogs via TCP" 3653msgstr "# byte mottogs via TCP"
3654 3654
3655#: src/transport/plugin_transport_wlan.c:3063 3655#: src/transport/plugin_transport_wlan.c:3066
3656msgid "# wlan WLAN_HELPER_DATA received" 3656msgid "# wlan WLAN_HELPER_DATA received"
3657msgstr "" 3657msgstr ""
3658 3658
3659#: src/transport/plugin_transport_wlan.c:3119 3659#: src/transport/plugin_transport_wlan.c:3122
3660#, fuzzy 3660#, fuzzy
3661msgid "# wlan messages for this client received" 3661msgid "# wlan messages for this client received"
3662msgstr "# krypterade PONG-meddelanden mottagna" 3662msgstr "# krypterade PONG-meddelanden mottagna"
3663 3663
3664#: src/transport/plugin_transport_wlan.c:3130 3664#: src/transport/plugin_transport_wlan.c:3133
3665#, fuzzy 3665#, fuzzy
3666msgid "# wlan messages inside WLAN_HELPER_DATA received" 3666msgid "# wlan messages inside WLAN_HELPER_DATA received"
3667msgstr "# krypterade PONG-meddelanden mottagna" 3667msgstr "# krypterade PONG-meddelanden mottagna"
3668 3668
3669#: src/transport/gnunet-transport.c:245 3669#: src/transport/gnunet-transport.c:250
3670#, c-format 3670#, c-format
3671msgid "No transport plugins configured, peer will never communicate\n" 3671msgid "No transport plugins configured, peer will never communicate\n"
3672msgstr "" 3672msgstr ""
3673 3673
3674#: src/transport/gnunet-transport.c:258 3674#: src/transport/gnunet-transport.c:263
3675#, c-format 3675#, c-format
3676msgid "No port configured for plugin `%s', cannot test it\n" 3676msgid "No port configured for plugin `%s', cannot test it\n"
3677msgstr "" 3677msgstr ""
3678 3678
3679#: src/transport/gnunet-transport.c:308 3679#: src/transport/gnunet-transport.c:313
3680#, c-format 3680#, c-format
3681msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n" 3681msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n"
3682msgstr "" 3682msgstr ""
3683 3683
3684#: src/transport/gnunet-transport.c:315 3684#: src/transport/gnunet-transport.c:320
3685#, c-format 3685#, c-format
3686msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n" 3686msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"
3687msgstr "" 3687msgstr ""
3688 3688
3689#: src/transport/gnunet-transport.c:348 3689#: src/transport/gnunet-transport.c:353
3690#, fuzzy, c-format 3690#, fuzzy, c-format
3691msgid "Transmitting %u bytes to %s\n" 3691msgid "Transmitting %u bytes to %s\n"
3692msgstr "Misslyckades att läsa kompislista från \"%s\"\n" 3692msgstr "Misslyckades att läsa kompislista från \"%s\"\n"
3693 3693
3694#: src/transport/gnunet-transport.c:368 3694#: src/transport/gnunet-transport.c:373
3695#, fuzzy, c-format 3695#, fuzzy, c-format
3696msgid "Connected to %s\n" 3696msgid "Connected to %s\n"
3697msgstr "\"%s\" ansluten till \"%s\".\n" 3697msgstr "\"%s\" ansluten till \"%s\".\n"
3698 3698
3699#: src/transport/gnunet-transport.c:399 3699#: src/transport/gnunet-transport.c:404
3700#, fuzzy, c-format 3700#, fuzzy, c-format
3701msgid "Disconnected from %s\n" 3701msgid "Disconnected from %s\n"
3702msgstr "\"%s\" ansluten till \"%s\".\n" 3702msgstr "\"%s\" ansluten till \"%s\".\n"
3703 3703
3704#: src/transport/gnunet-transport.c:428 3704#: src/transport/gnunet-transport.c:433
3705#, c-format 3705#, c-format
3706msgid "Received %u bytes from %s\n" 3706msgid "Received %u bytes from %s\n"
3707msgstr "" 3707msgstr ""
3708 3708
3709#: src/transport/gnunet-transport.c:448 3709#: src/transport/gnunet-transport.c:447
3710#, fuzzy, c-format 3710#, fuzzy, c-format
3711msgid "Peer `%s' plugin: `%s' address `%s'\n" 3711msgid "Peer `%s': %s\n"
3712msgstr "Motpart \"%s\" med pålitlighet %8u och adress \"%s\"\n" 3712msgstr "Jag är ändpunkt \"%s\".\n"
3713 3713
3714#: src/transport/gnunet-transport.c:486 3714#: src/transport/gnunet-transport.c:519
3715#, fuzzy, c-format 3715#, fuzzy, c-format
3716msgid "Failed to parse peer identity `%s'\n" 3716msgid "Failed to parse peer identity `%s'\n"
3717msgstr "Misslyckades att läsa kompislista från \"%s\"\n" 3717msgstr "Misslyckades att läsa kompislista från \"%s\"\n"
3718 3718
3719#: src/transport/gnunet-transport.c:522 3719#: src/transport/gnunet-transport.c:556
3720msgid "measure how fast we are receiving data (until CTRL-C)" 3720msgid "measure how fast we are receiving data (until CTRL-C)"
3721msgstr "" 3721msgstr ""
3722 3722
3723#: src/transport/gnunet-transport.c:525 3723#: src/transport/gnunet-transport.c:559
3724#, fuzzy 3724#, fuzzy
3725msgid "try to connect to the given peer" 3725msgid "try to connect to the given peer"
3726msgstr "Misslyckades att ansluta till gnunetd.\n" 3726msgstr "Misslyckades att ansluta till gnunetd.\n"
3727 3727
3728#: src/transport/gnunet-transport.c:528 3728#: src/transport/gnunet-transport.c:562
3729#, fuzzy 3729#, fuzzy
3730msgid "provide information about all current connections (once)" 3730msgid "provide information about all current connections (once)"
3731msgstr "Skriv ut information om GNUnets motparter." 3731msgstr "Skriv ut information om GNUnets motparter."
3732 3732
3733#: src/transport/gnunet-transport.c:532 3733#: src/transport/gnunet-transport.c:566
3734msgid "send data for benchmarking to the other peer (until CTRL-C)" 3734msgid "send data for benchmarking to the other peer (until CTRL-C)"
3735msgstr "" 3735msgstr ""
3736 3736
3737#: src/transport/gnunet-transport.c:535 3737#: src/transport/gnunet-transport.c:569
3738msgid "test transport configuration (involves external server)" 3738msgid "test transport configuration (involves external server)"
3739msgstr "" 3739msgstr ""
3740 3740
3741#: src/transport/gnunet-transport.c:543 3741#: src/transport/gnunet-transport.c:572
3742#, fuzzy
3743msgid "do not resolve hostnames"
3744msgstr "Misslyckades att läsa kompislista från \"%s\"\n"
3745
3746#: src/transport/gnunet-transport.c:580
3742#, fuzzy 3747#, fuzzy
3743msgid "Direct access to transport service." 3748msgid "Direct access to transport service."
3744msgstr "Misslyckades att ansluta till gnunetd.\n" 3749msgstr "Misslyckades att ansluta till gnunetd.\n"
@@ -4229,33 +4234,33 @@ msgstr ""
4229msgid "GNUnet NAT traversal test helper daemon" 4234msgid "GNUnet NAT traversal test helper daemon"
4230msgstr "" 4235msgstr ""
4231 4236
4232#: src/nat/nat.c:803 4237#: src/nat/nat.c:805
4233#, c-format 4238#, c-format
4234msgid "gnunet-helper-nat-server generated malformed address `%s'\n" 4239msgid "gnunet-helper-nat-server generated malformed address `%s'\n"
4235msgstr "" 4240msgstr ""
4236 4241
4237#: src/nat/nat.c:852 4242#: src/nat/nat.c:854
4238#, fuzzy, c-format 4243#, fuzzy, c-format
4239msgid "Failed to start %s\n" 4244msgid "Failed to start %s\n"
4240msgstr "Misslyckades att starta samling.\n" 4245msgstr "Misslyckades att starta samling.\n"
4241 4246
4242#: src/nat/nat.c:1121 4247#: src/nat/nat.c:1123
4243#, fuzzy, c-format 4248#, fuzzy, c-format
4244msgid "Malformed %s `%s' given in configuration!\n" 4249msgid "Malformed %s `%s' given in configuration!\n"
4245msgstr "Kunde inte spara konfiguration!" 4250msgstr "Kunde inte spara konfiguration!"
4246 4251
4247#: src/nat/nat.c:1187 src/nat/nat.c:1197 4252#: src/nat/nat.c:1189 src/nat/nat.c:1199
4248#, c-format 4253#, c-format
4249msgid "" 4254msgid ""
4250"Configuration requires `%s', but binary is not installed properly (SUID bit " 4255"Configuration requires `%s', but binary is not installed properly (SUID bit "
4251"not set). Option disabled.\n" 4256"not set). Option disabled.\n"
4252msgstr "" 4257msgstr ""
4253 4258
4254#: src/nat/nat.c:1329 4259#: src/nat/nat.c:1331
4255msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n" 4260msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n"
4256msgstr "" 4261msgstr ""
4257 4262
4258#: src/nat/nat.c:1341 4263#: src/nat/nat.c:1343
4259#, c-format 4264#, c-format
4260msgid "Running gnunet-helper-nat-client %s %s %u\n" 4265msgid "Running gnunet-helper-nat-client %s %s %u\n"
4261msgstr "" 4266msgstr ""
@@ -4293,16 +4298,16 @@ msgstr ""
4293msgid "Loading block plugin `%s'\n" 4298msgid "Loading block plugin `%s'\n"
4294msgstr "Testar transport(er) %s\n" 4299msgstr "Testar transport(er) %s\n"
4295 4300
4296#: src/mesh/gnunet-service-mesh.c:4201 4301#: src/mesh/gnunet-service-mesh.c:4218
4297msgid "MESH: Wrong CORE service\n" 4302msgid "MESH: Wrong CORE service\n"
4298msgstr "" 4303msgstr ""
4299 4304
4300#: src/mesh/gnunet-service-mesh.c:4406 4305#: src/mesh/gnunet-service-mesh.c:4423
4301#, fuzzy 4306#, fuzzy
4302msgid "Mesh service is lacking key configuration settings. Exiting.\n" 4307msgid "Mesh service is lacking key configuration settings. Exiting.\n"
4303msgstr "GNUnet-konfiguration" 4308msgstr "GNUnet-konfiguration"
4304 4309
4305#: src/mesh/gnunet-service-mesh.c:4415 4310#: src/mesh/gnunet-service-mesh.c:4432
4306#, fuzzy 4311#, fuzzy
4307msgid "Mesh service could not access hostkey. Exiting.\n" 4312msgid "Mesh service could not access hostkey. Exiting.\n"
4308msgstr "Kunde inte komma åt namnrymdsinformation.\n" 4313msgstr "Kunde inte komma åt namnrymdsinformation.\n"
@@ -4487,31 +4492,31 @@ msgstr ""
4487msgid "Hostlist file `%s' could not be removed\n" 4492msgid "Hostlist file `%s' could not be removed\n"
4488msgstr "" 4493msgstr ""
4489 4494
4490#: src/hostlist/gnunet-daemon-hostlist.c:257 4495#: src/hostlist/gnunet-daemon-hostlist.c:262
4491msgid "" 4496msgid ""
4492"None of the functions for the hostlist daemon were enabled. I have no " 4497"None of the functions for the hostlist daemon were enabled. I have no "
4493"reason to run!\n" 4498"reason to run!\n"
4494msgstr "" 4499msgstr ""
4495 4500
4496#: src/hostlist/gnunet-daemon-hostlist.c:310 4501#: src/hostlist/gnunet-daemon-hostlist.c:315
4497msgid "advertise our hostlist to other peers" 4502msgid "advertise our hostlist to other peers"
4498msgstr "" 4503msgstr ""
4499 4504
4500#: src/hostlist/gnunet-daemon-hostlist.c:315 4505#: src/hostlist/gnunet-daemon-hostlist.c:320
4501msgid "" 4506msgid ""
4502"bootstrap using hostlists (it is highly recommended that you always use this " 4507"bootstrap using hostlists (it is highly recommended that you always use this "
4503"option)" 4508"option)"
4504msgstr "" 4509msgstr ""
4505 4510
4506#: src/hostlist/gnunet-daemon-hostlist.c:318 4511#: src/hostlist/gnunet-daemon-hostlist.c:323
4507msgid "enable learning about hostlist servers from other peers" 4512msgid "enable learning about hostlist servers from other peers"
4508msgstr "" 4513msgstr ""
4509 4514
4510#: src/hostlist/gnunet-daemon-hostlist.c:322 4515#: src/hostlist/gnunet-daemon-hostlist.c:327
4511msgid "provide a hostlist server" 4516msgid "provide a hostlist server"
4512msgstr "" 4517msgstr ""
4513 4518
4514#: src/hostlist/gnunet-daemon-hostlist.c:334 4519#: src/hostlist/gnunet-daemon-hostlist.c:339
4515msgid "GNUnet hostlist server and client" 4520msgid "GNUnet hostlist server and client"
4516msgstr "" 4521msgstr ""
4517 4522
@@ -4598,30 +4603,30 @@ msgstr "Misslyckades att läsa kompislista från \"%s\"\n"
4598msgid "Could not start hostlist HTTP server on port %u\n" 4603msgid "Could not start hostlist HTTP server on port %u\n"
4599msgstr "" 4604msgstr ""
4600 4605
4601#: src/peerinfo-tool/gnunet-peerinfo.c:221 4606#: src/peerinfo-tool/gnunet-peerinfo.c:219
4602#, fuzzy, c-format 4607#, fuzzy, c-format
4603msgid "Could not find option `%s:%s' in configuration.\n" 4608msgid "Could not find option `%s:%s' in configuration.\n"
4604msgstr "Kunde inte hitta motpart \"%s\" i routingtabell!\n" 4609msgstr "Kunde inte hitta motpart \"%s\" i routingtabell!\n"
4605 4610
4606#: src/peerinfo-tool/gnunet-peerinfo.c:228 4611#: src/peerinfo-tool/gnunet-peerinfo.c:226
4607#, fuzzy, c-format 4612#, fuzzy, c-format
4608msgid "Loading hostkey from `%s' failed.\n" 4613msgid "Loading hostkey from `%s' failed.\n"
4609msgstr "Tolkning av HTTP-svar för URL \"%s\" misslyckades.\n" 4614msgstr "Tolkning av HTTP-svar för URL \"%s\" misslyckades.\n"
4610 4615
4611#: src/peerinfo-tool/gnunet-peerinfo.c:240 4616#: src/peerinfo-tool/gnunet-peerinfo.c:238
4612#, c-format 4617#, c-format
4613msgid "I am peer `%s'.\n" 4618msgid "I am peer `%s'.\n"
4614msgstr "Jag är ändpunkt \"%s\".\n" 4619msgstr "Jag är ändpunkt \"%s\".\n"
4615 4620
4616#: src/peerinfo-tool/gnunet-peerinfo.c:260 4621#: src/peerinfo-tool/gnunet-peerinfo.c:258
4617msgid "output only the identity strings" 4622msgid "output only the identity strings"
4618msgstr "" 4623msgstr ""
4619 4624
4620#: src/peerinfo-tool/gnunet-peerinfo.c:263 4625#: src/peerinfo-tool/gnunet-peerinfo.c:261
4621msgid "output our own identity only" 4626msgid "output our own identity only"
4622msgstr "" 4627msgstr ""
4623 4628
4624#: src/peerinfo-tool/gnunet-peerinfo.c:269 4629#: src/peerinfo-tool/gnunet-peerinfo.c:267
4625#, fuzzy 4630#, fuzzy
4626msgid "Print information about peers." 4631msgid "Print information about peers."
4627msgstr "Skriv ut information om GNUnets motparter." 4632msgstr "Skriv ut information om GNUnets motparter."
@@ -4650,23 +4655,27 @@ msgstr "var informativ"
4650msgid "use configuration file FILENAME" 4655msgid "use configuration file FILENAME"
4651msgstr "använd konfigurationsfil FILNAMN" 4656msgstr "använd konfigurationsfil FILNAMN"
4652 4657
4653#: src/include/gnunet_common.h:361 src/include/gnunet_common.h:366 4658#: src/include/gnunet_common.h:366 src/include/gnunet_common.h:371
4654#: src/include/gnunet_common.h:372 4659#: src/include/gnunet_common.h:377
4655#, fuzzy, c-format 4660#, fuzzy, c-format
4656msgid "Assertion failed at %s:%d.\n" 4661msgid "Assertion failed at %s:%d.\n"
4657msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" 4662msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n"
4658 4663
4659#: src/include/gnunet_common.h:382 4664#: src/include/gnunet_common.h:387
4660#, c-format 4665#, c-format
4661msgid "External protocol violation detected at %s:%d.\n" 4666msgid "External protocol violation detected at %s:%d.\n"
4662msgstr "" 4667msgstr ""
4663 4668
4664#: src/include/gnunet_common.h:403 src/include/gnunet_common.h:410 4669#: src/include/gnunet_common.h:408 src/include/gnunet_common.h:415
4665#, c-format 4670#, c-format
4666msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" 4671msgid "`%s' failed on file `%s' at %s:%d with error: %s\n"
4667msgstr "\"%s\" misslyckades för fil \"%s\" vid %s:%d med fel: %s\n" 4672msgstr "\"%s\" misslyckades för fil \"%s\" vid %s:%d med fel: %s\n"
4668 4673
4669#, fuzzy 4674#, fuzzy
4675#~ msgid "Peer `%s' plugin: `%s' address `%s'\n"
4676#~ msgstr "Motpart \"%s\" med pålitlighet %8u och adress \"%s\"\n"
4677
4678#, fuzzy
4670#~ msgid "Failed to create IPv4 broadcast socket on port %d\n" 4679#~ msgid "Failed to create IPv4 broadcast socket on port %d\n"
4671#~ msgstr "Misslyckades att läsa kompislista från \"%s\"\n" 4680#~ msgstr "Misslyckades att läsa kompislista från \"%s\"\n"
4672 4681
diff --git a/po/vi.po b/po/vi.po
index 2e12e221a..b2963a9ce 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,7 +8,7 @@ msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: gnunet 0.8.0a\n" 9"Project-Id-Version: gnunet 0.8.0a\n"
10"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 10"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
11"POT-Creation-Date: 2011-11-26 14:53+0100\n" 11"POT-Creation-Date: 2011-11-29 21:38+0100\n"
12"PO-Revision-Date: 2008-09-10 22:05+0930\n" 12"PO-Revision-Date: 2008-09-10 22:05+0930\n"
13"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" 13"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
14"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" 14"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
@@ -32,8 +32,8 @@ msgstr ""
32#: src/datacache/plugin_datacache_mysql.c:517 32#: src/datacache/plugin_datacache_mysql.c:517
33#: src/datacache/plugin_datacache_mysql.c:526 33#: src/datacache/plugin_datacache_mysql.c:526
34#: src/datacache/plugin_datacache_mysql.c:598 34#: src/datacache/plugin_datacache_mysql.c:598
35#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:389 35#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:394
36#: src/include/gnunet_common.h:396 36#: src/include/gnunet_common.h:401
37#, c-format 37#, c-format
38msgid "`%s' failed at %s:%d with error: %s\n" 38msgid "`%s' failed at %s:%d with error: %s\n"
39msgstr "« %s » bị lỗi tại %s:%d với lỗi: %s\n" 39msgstr "« %s » bị lỗi tại %s:%d với lỗi: %s\n"
@@ -401,33 +401,33 @@ msgstr ""
401msgid "Peer `%s'\n" 401msgid "Peer `%s'\n"
402msgstr "Tôi là đồng đẳng « %s ».\n" 402msgstr "Tôi là đồng đẳng « %s ».\n"
403 403
404#: src/core/gnunet-core-list-connections.c:167 404#: src/core/gnunet-core-list-connections.c:178
405#: src/peerinfo-tool/gnunet-peerinfo.c:199 405#: src/peerinfo-tool/gnunet-peerinfo.c:197
406#, fuzzy, c-format 406#, fuzzy, c-format
407msgid "Invalid command line argument `%s'\n" 407msgid "Invalid command line argument `%s'\n"
408msgstr "Đối số không hợp lệ cho « %s ».\n" 408msgstr "Đối số không hợp lệ cho « %s ».\n"
409 409
410#: src/core/gnunet-core-list-connections.c:188 410#: src/core/gnunet-core-list-connections.c:199
411#: src/peerinfo-tool/gnunet-peerinfo.c:257 411#: src/peerinfo-tool/gnunet-peerinfo.c:255
412msgid "don't resolve host names" 412msgid "don't resolve host names"
413msgstr "không quyết định các tên máy" 413msgstr "không quyết định các tên máy"
414 414
415#: src/core/gnunet-core-list-connections.c:195 415#: src/core/gnunet-core-list-connections.c:206
416#, fuzzy 416#, fuzzy
417msgid "Print information about connected peers." 417msgid "Print information about connected peers."
418msgstr "In ra thông tin về các đồng đẳng GNUnet." 418msgstr "In ra thông tin về các đồng đẳng GNUnet."
419 419
420#: src/core/gnunet-service-core_clients.c:357 420#: src/core/gnunet-service-core_clients.c:359
421#, fuzzy 421#, fuzzy
422msgid "# send requests dropped (disconnected)" 422msgid "# send requests dropped (disconnected)"
423msgstr "# các yêu cầu lỗ hổng bị bỏ do trọng tải" 423msgstr "# các yêu cầu lỗ hổng bị bỏ do trọng tải"
424 424
425#: src/core/gnunet-service-core_clients.c:462 425#: src/core/gnunet-service-core_clients.c:464
426#, fuzzy 426#, fuzzy
427msgid "# messages discarded (session disconnected)" 427msgid "# messages discarded (session disconnected)"
428msgstr "# các thông báo được chắp liền" 428msgstr "# các thông báo được chắp liền"
429 429
430#: src/core/gnunet-service-core_clients.c:800 430#: src/core/gnunet-service-core_clients.c:801
431#, fuzzy, c-format 431#, fuzzy, c-format
432msgid "# bytes of messages of type %u received" 432msgid "# bytes of messages of type %u received"
433msgstr "# các byte nhiễu được nhận" 433msgstr "# các byte nhiễu được nhận"
@@ -475,7 +475,7 @@ msgid "# bytes decrypted"
475msgstr "# các byte đã giải mã" 475msgstr "# các byte đã giải mã"
476 476
477#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002 477#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002
478#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:156 478#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:154
479#, fuzzy, c-format 479#, fuzzy, c-format
480msgid "Error in communication with PEERINFO service\n" 480msgid "Error in communication with PEERINFO service\n"
481msgstr "Cổng để liên lạc với giao diện người dùng GNUnet" 481msgstr "Cổng để liên lạc với giao diện người dùng GNUnet"
@@ -597,7 +597,7 @@ msgstr ""
597 597
598#: src/core/gnunet-service-core_kx.c:1539 598#: src/core/gnunet-service-core_kx.c:1539
599#: src/transport/gnunet-service-transport.c:537 599#: src/transport/gnunet-service-transport.c:537
600#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:207 600#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:205
601#, fuzzy, c-format 601#, fuzzy, c-format
602msgid "Could not access PEERINFO service. Exiting.\n" 602msgid "Could not access PEERINFO service. Exiting.\n"
603msgstr "Không thể truy cập đến thông tin về không gian tên.\n" 603msgstr "Không thể truy cập đến thông tin về không gian tên.\n"
@@ -764,11 +764,11 @@ msgid "Use --help to get a list of options.\n"
764msgstr "" 764msgstr ""
765"Hãy sử dụng câu lệnh trợ giúp « --help » để xem danh sách các tùy chọn.\n" 765"Hãy sử dụng câu lệnh trợ giúp « --help » để xem danh sách các tùy chọn.\n"
766 766
767#: src/util/scheduler.c:860 767#: src/util/scheduler.c:870
768msgid "Looks like we're busy waiting...\n" 768msgid "Looks like we're busy waiting...\n"
769msgstr "" 769msgstr ""
770 770
771#: src/util/scheduler.c:990 771#: src/util/scheduler.c:1000
772#, c-format 772#, c-format
773msgid "Attempt to cancel dead task %llu!\n" 773msgid "Attempt to cancel dead task %llu!\n"
774msgstr "" 774msgstr ""
@@ -1257,33 +1257,33 @@ msgstr ""
1257msgid "RSA signature verification failed at %s:%d: %s\n" 1257msgid "RSA signature verification failed at %s:%d: %s\n"
1258msgstr "Lỗi thẩm tra chữ ký RSA tại %s:%d: %s\n" 1258msgstr "Lỗi thẩm tra chữ ký RSA tại %s:%d: %s\n"
1259 1259
1260#: src/nse/gnunet-nse-profiler.c:647 src/dht/gnunet-dht-get.c:213 1260#: src/nse/gnunet-nse-profiler.c:634 src/dht/gnunet-dht-get.c:213
1261#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169 1261#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169
1262#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591 1262#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591
1263#: src/fs/gnunet-download.c:263 1263#: src/fs/gnunet-download.c:263
1264msgid "be verbose (print progress information)" 1264msgid "be verbose (print progress information)"
1265msgstr "" 1265msgstr ""
1266 1266
1267#: src/nse/gnunet-nse-profiler.c:665 1267#: src/nse/gnunet-nse-profiler.c:652
1268#, fuzzy 1268#, fuzzy
1269msgid "Measure quality and performance of the NSE service." 1269msgid "Measure quality and performance of the NSE service."
1270msgstr "Không thể truy cập đến dịch vụ" 1270msgstr "Không thể truy cập đến dịch vụ"
1271 1271
1272#: src/nse/gnunet-service-nse.c:904 1272#: src/nse/gnunet-service-nse.c:902
1273#, c-format 1273#, c-format
1274msgid "Proof of work invalid: %llu!\n" 1274msgid "Proof of work invalid: %llu!\n"
1275msgstr "" 1275msgstr ""
1276 1276
1277#: src/nse/gnunet-service-nse.c:1329 src/nse/gnunet-service-nse.c:1348 1277#: src/nse/gnunet-service-nse.c:1326 src/nse/gnunet-service-nse.c:1345
1278#: src/nse/gnunet-service-nse.c:1369 1278#: src/nse/gnunet-service-nse.c:1366
1279msgid "NSE service is lacking key configuration settings. Exiting.\n" 1279msgid "NSE service is lacking key configuration settings. Exiting.\n"
1280msgstr "" 1280msgstr ""
1281 1281
1282#: src/nse/gnunet-service-nse.c:1336 1282#: src/nse/gnunet-service-nse.c:1333
1283msgid "Invalid work requirement for NSE service. Exiting.\n" 1283msgid "Invalid work requirement for NSE service. Exiting.\n"
1284msgstr "" 1284msgstr ""
1285 1285
1286#: src/nse/gnunet-service-nse.c:1357 1286#: src/nse/gnunet-service-nse.c:1354
1287#, fuzzy 1287#, fuzzy
1288msgid "NSE service could not access hostkey. Exiting.\n" 1288msgid "NSE service could not access hostkey. Exiting.\n"
1289msgstr "Không thể truy cập đến thông tin về không gian tên.\n" 1289msgstr "Không thể truy cập đến thông tin về không gian tên.\n"
@@ -2378,7 +2378,7 @@ msgid "Option `%s' is required when using option `%s'.\n"
2378msgstr "Tùy chọn « %s » cần thiết khi dùng tùy chọn « %s ».\n" 2378msgstr "Tùy chọn « %s » cần thiết khi dùng tùy chọn « %s ».\n"
2379 2379
2380#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400 2380#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400
2381#: src/transport/gnunet-transport.c:477 2381#: src/transport/gnunet-transport.c:510
2382#, c-format 2382#, c-format
2383msgid "Option `%s' makes no sense without option `%s'.\n" 2383msgid "Option `%s' makes no sense without option `%s'.\n"
2384msgstr "Tùy chọn « %s » không có nghĩa khi không có tùy chọn « %s ».\n" 2384msgstr "Tùy chọn « %s » không có nghĩa khi không có tùy chọn « %s ».\n"
@@ -2698,9 +2698,9 @@ msgstr ""
2698#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543 2698#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543
2699#: src/transport/gnunet-service-transport_neighbours.c:938 2699#: src/transport/gnunet-service-transport_neighbours.c:938
2700#: src/transport/gnunet-service-transport_neighbours.c:943 2700#: src/transport/gnunet-service-transport_neighbours.c:943
2701#: src/transport/gnunet-service-transport_neighbours.c:1266 2701#: src/transport/gnunet-service-transport_neighbours.c:1269
2702#: src/transport/gnunet-service-transport_neighbours.c:2354 2702#: src/transport/gnunet-service-transport_neighbours.c:2382
2703#: src/transport/gnunet-service-transport_neighbours.c:2425 2703#: src/transport/gnunet-service-transport_neighbours.c:2453
2704#: src/topology/gnunet-daemon-topology.c:654 2704#: src/topology/gnunet-daemon-topology.c:654
2705#: src/topology/gnunet-daemon-topology.c:756 2705#: src/topology/gnunet-daemon-topology.c:756
2706#, fuzzy 2706#, fuzzy
@@ -3183,7 +3183,7 @@ msgstr "# tổng số định tuyến lỗ hổng thành công"
3183 3183
3184#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290 3184#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290
3185#: src/topology/gnunet-daemon-topology.c:1297 3185#: src/topology/gnunet-daemon-topology.c:1297
3186#: src/hostlist/gnunet-daemon-hostlist.c:290 3186#: src/hostlist/gnunet-daemon-hostlist.c:295
3187#, fuzzy, c-format 3187#, fuzzy, c-format
3188msgid "Failed to connect to `%s' service.\n" 3188msgid "Failed to connect to `%s' service.\n"
3189msgstr "Lỗi sơ khởi dịch vụ « %s ».\n" 3189msgstr "Lỗi sơ khởi dịch vụ « %s ».\n"
@@ -3222,73 +3222,73 @@ msgstr "# các khoá phiên chạy được gửi"
3222msgid "# peers disconnected due to global disconnect" 3222msgid "# peers disconnected due to global disconnect"
3223msgstr "# Các quảng cáo đồng đẳng bị hủy do trọng tải" 3223msgstr "# Các quảng cáo đồng đẳng bị hủy do trọng tải"
3224 3224
3225#: src/transport/gnunet-service-transport_neighbours.c:1774 3225#: src/transport/gnunet-service-transport_neighbours.c:1800
3226#: src/transport/gnunet-service-transport_neighbours.c:1795 3226#: src/transport/gnunet-service-transport_neighbours.c:1821
3227#, fuzzy 3227#, fuzzy
3228msgid "# messages not sent (no such peer or not connected)" 3228msgid "# messages not sent (no such peer or not connected)"
3229msgstr "# các thông báo được chắp liền" 3229msgstr "# các thông báo được chắp liền"
3230 3230
3231#: src/transport/gnunet-service-transport_neighbours.c:1811 3231#: src/transport/gnunet-service-transport_neighbours.c:1837
3232#, fuzzy 3232#, fuzzy
3233msgid "# bytes in message queue for other peers" 3233msgid "# bytes in message queue for other peers"
3234msgstr "# các byte thông báo gửi đi bị loại bỏ" 3234msgstr "# các byte thông báo gửi đi bị loại bỏ"
3235 3235
3236#: src/transport/gnunet-service-transport_neighbours.c:1863 3236#: src/transport/gnunet-service-transport_neighbours.c:1889
3237#, fuzzy 3237#, fuzzy
3238msgid "# messages discarded due to lack of neighbour record" 3238msgid "# messages discarded due to lack of neighbour record"
3239msgstr "# các thông báo được chắp liền" 3239msgstr "# các thông báo được chắp liền"
3240 3240
3241#: src/transport/gnunet-service-transport_neighbours.c:1899 3241#: src/transport/gnunet-service-transport_neighbours.c:1925
3242#, fuzzy 3242#, fuzzy
3243msgid "# bandwidth quota violations by other peers" 3243msgid "# bandwidth quota violations by other peers"
3244msgstr "theo dõi gnunetd sử dụng dải thông" 3244msgstr "theo dõi gnunetd sử dụng dải thông"
3245 3245
3246#: src/transport/gnunet-service-transport_neighbours.c:1917 3246#: src/transport/gnunet-service-transport_neighbours.c:1943
3247msgid "# ms throttling suggested" 3247msgid "# ms throttling suggested"
3248msgstr "" 3248msgstr ""
3249 3249
3250#: src/transport/gnunet-service-transport_neighbours.c:1946 3250#: src/transport/gnunet-service-transport_neighbours.c:1972
3251#, fuzzy 3251#, fuzzy
3252msgid "# KEEPALIVE messages discarded (not connected)" 3252msgid "# KEEPALIVE messages discarded (not connected)"
3253msgstr "# các thông báo được chắp liền" 3253msgstr "# các thông báo được chắp liền"
3254 3254
3255#: src/transport/gnunet-service-transport_neighbours.c:1995 3255#: src/transport/gnunet-service-transport_neighbours.c:2023
3256#, fuzzy 3256#, fuzzy
3257msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)" 3257msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)"
3258msgstr "# các thông báo được chắp liền" 3258msgstr "# các thông báo được chắp liền"
3259 3259
3260#: src/transport/gnunet-service-transport_neighbours.c:2003 3260#: src/transport/gnunet-service-transport_neighbours.c:2031
3261#, fuzzy 3261#, fuzzy
3262msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)" 3262msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)"
3263msgstr "# các thông báo được chắp liền" 3263msgstr "# các thông báo được chắp liền"
3264 3264
3265#: src/transport/gnunet-service-transport_neighbours.c:2064 3265#: src/transport/gnunet-service-transport_neighbours.c:2092
3266msgid "# SET QUOTA messages ignored (no such peer)" 3266msgid "# SET QUOTA messages ignored (no such peer)"
3267msgstr "" 3267msgstr ""
3268 3268
3269#: src/transport/gnunet-service-transport_neighbours.c:2082 3269#: src/transport/gnunet-service-transport_neighbours.c:2110
3270msgid "# disconnects due to quota of 0" 3270msgid "# disconnects due to quota of 0"
3271msgstr "" 3271msgstr ""
3272 3272
3273#: src/transport/gnunet-service-transport_neighbours.c:2200 3273#: src/transport/gnunet-service-transport_neighbours.c:2228
3274msgid "# disconnect messages ignored (old format)" 3274msgid "# disconnect messages ignored (old format)"
3275msgstr "" 3275msgstr ""
3276 3276
3277#: src/transport/gnunet-service-transport_neighbours.c:2213 3277#: src/transport/gnunet-service-transport_neighbours.c:2241
3278msgid "# disconnect messages ignored (timestamp)" 3278msgid "# disconnect messages ignored (timestamp)"
3279msgstr "" 3279msgstr ""
3280 3280
3281#: src/transport/gnunet-service-transport_neighbours.c:2289 3281#: src/transport/gnunet-service-transport_neighbours.c:2317
3282#, fuzzy 3282#, fuzzy
3283msgid "# unexpected CONNECT_ACK messages (no peer)" 3283msgid "# unexpected CONNECT_ACK messages (no peer)"
3284msgstr "gửi ĐẾM thông báo" 3284msgstr "gửi ĐẾM thông báo"
3285 3285
3286#: src/transport/gnunet-service-transport_neighbours.c:2304 3286#: src/transport/gnunet-service-transport_neighbours.c:2332
3287#, fuzzy 3287#, fuzzy
3288msgid "# unexpected CONNECT_ACK messages" 3288msgid "# unexpected CONNECT_ACK messages"
3289msgstr "gửi ĐẾM thông báo" 3289msgstr "gửi ĐẾM thông báo"
3290 3290
3291#: src/transport/gnunet-service-transport_neighbours.c:2402 3291#: src/transport/gnunet-service-transport_neighbours.c:2430
3292#, fuzzy 3292#, fuzzy
3293msgid "# unexpected ACK messages" 3293msgid "# unexpected ACK messages"
3294msgstr "# các thông báo PONG đã mật mã được gửi" 3294msgstr "# các thông báo PONG đã mật mã được gửi"
@@ -3350,41 +3350,41 @@ msgstr ""
3350msgid "# refreshed my HELLO" 3350msgid "# refreshed my HELLO"
3351msgstr "" 3351msgstr ""
3352 3352
3353#: src/transport/plugin_transport_udp.c:1518 3353#: src/transport/plugin_transport_udp.c:1520
3354#, fuzzy 3354#, fuzzy
3355msgid "# IPv4 broadcast HELLO beacons received via udp" 3355msgid "# IPv4 broadcast HELLO beacons received via udp"
3356msgstr "# các thông báo PONG đã mật mã được nhận" 3356msgstr "# các thông báo PONG đã mật mã được nhận"
3357 3357
3358#: src/transport/plugin_transport_udp.c:1555 3358#: src/transport/plugin_transport_udp.c:1557
3359#, fuzzy 3359#, fuzzy
3360msgid "# IPv6 multicast HELLO beacons received via udp" 3360msgid "# IPv6 multicast HELLO beacons received via udp"
3361msgstr "# các thông báo PONG đã mật mã được nhận" 3361msgstr "# các thông báo PONG đã mật mã được nhận"
3362 3362
3363#: src/transport/plugin_transport_udp.c:2041 3363#: src/transport/plugin_transport_udp.c:2043
3364#: src/transport/plugin_transport_udp_new.c:1218 3364#: src/transport/plugin_transport_udp_new.c:1218
3365#, c-format 3365#, c-format
3366msgid "Given `%s' option is out of range: %llu > %u\n" 3366msgid "Given `%s' option is out of range: %llu > %u\n"
3367msgstr "" 3367msgstr ""
3368 3368
3369#: src/transport/plugin_transport_udp.c:2092 3369#: src/transport/plugin_transport_udp.c:2094
3370#: src/transport/plugin_transport_udp_new.c:1268 3370#: src/transport/plugin_transport_udp_new.c:1268
3371#, fuzzy, c-format 3371#, fuzzy, c-format
3372msgid "Invalid IPv6 address: `%s'\n" 3372msgid "Invalid IPv6 address: `%s'\n"
3373msgstr "Mức ưu tiên tiến trình không hợp lê « %s ».\n" 3373msgstr "Mức ưu tiên tiến trình không hợp lê « %s ».\n"
3374 3374
3375#: src/transport/plugin_transport_udp.c:2235 3375#: src/transport/plugin_transport_udp.c:2237
3376#, c-format 3376#, c-format
3377msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" 3377msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n"
3378msgstr "" 3378msgstr ""
3379 3379
3380#: src/transport/plugin_transport_udp.c:2296 3380#: src/transport/plugin_transport_udp.c:2298
3381#: src/transport/plugin_transport_udp_new.c:1396 3381#: src/transport/plugin_transport_udp_new.c:1396
3382#, fuzzy 3382#, fuzzy
3383msgid "Failed to open UDP sockets\n" 3383msgid "Failed to open UDP sockets\n"
3384msgstr "Lỗi mở tập tin ghi sự kiện « %s »: %s\n" 3384msgstr "Lỗi mở tập tin ghi sự kiện « %s »: %s\n"
3385 3385
3386#: src/transport/plugin_transport_http_client.c:107 3386#: src/transport/plugin_transport_http_client.c:108
3387#: src/transport/plugin_transport_http_client.c:122 3387#: src/transport/plugin_transport_http_client.c:123
3388#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682 3388#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682
3389#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740 3389#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740
3390#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877 3390#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877
@@ -3393,7 +3393,7 @@ msgstr "Lỗi mở tập tin ghi sự kiện « %s »: %s\n"
3393msgid "%s failed at %s:%d: `%s'\n" 3393msgid "%s failed at %s:%d: `%s'\n"
3394msgstr "%s bị lỗi tại %s:%d: « %s »\n" 3394msgstr "%s bị lỗi tại %s:%d: « %s »\n"
3395 3395
3396#: src/transport/plugin_transport_http_client.c:619 3396#: src/transport/plugin_transport_http_client.c:620
3397#, c-format 3397#, c-format
3398msgid "Could not initialize curl multi handle, failed to start %s plugin!\n" 3398msgid "Could not initialize curl multi handle, failed to start %s plugin!\n"
3399msgstr "" 3399msgstr ""
@@ -3612,188 +3612,193 @@ msgstr "Đang nạp các truyền tải « %s »\n"
3612msgid "Failed to load transport plugin for `%s'\n" 3612msgid "Failed to load transport plugin for `%s'\n"
3613msgstr "Không thể nạp phần bổ sung truyền tải « %s »\n" 3613msgstr "Không thể nạp phần bổ sung truyền tải « %s »\n"
3614 3614
3615#: src/transport/plugin_transport_wlan.c:881 3615#: src/transport/plugin_transport_wlan.c:884
3616#, fuzzy 3616#, fuzzy
3617msgid "# wlan session timeouts" 3617msgid "# wlan session timeouts"
3618msgstr "# các khoá phiên chạy được chấp nhận" 3618msgstr "# các khoá phiên chạy được chấp nhận"
3619 3619
3620#: src/transport/plugin_transport_wlan.c:905 3620#: src/transport/plugin_transport_wlan.c:908
3621#, fuzzy 3621#, fuzzy
3622msgid "# wlan session created" 3622msgid "# wlan session created"
3623msgstr "# các khoá phiên chạy được chấp nhận" 3623msgstr "# các khoá phiên chạy được chấp nhận"
3624 3624
3625#: src/transport/plugin_transport_wlan.c:989 3625#: src/transport/plugin_transport_wlan.c:992
3626#: src/transport/plugin_transport_wlan.c:1151 3626#: src/transport/plugin_transport_wlan.c:1154
3627#: src/transport/plugin_transport_wlan.c:1172 3627#: src/transport/plugin_transport_wlan.c:1175
3628#: src/transport/plugin_transport_wlan.c:1203 3628#: src/transport/plugin_transport_wlan.c:1206
3629#: src/transport/plugin_transport_wlan.c:2406 3629#: src/transport/plugin_transport_wlan.c:2409
3630#: src/transport/plugin_transport_wlan.c:3265 3630#: src/transport/plugin_transport_wlan.c:3268
3631msgid "# wlan pending sessions" 3631msgid "# wlan pending sessions"
3632msgstr "" 3632msgstr ""
3633 3633
3634#: src/transport/plugin_transport_wlan.c:1246 3634#: src/transport/plugin_transport_wlan.c:1249
3635#: src/transport/plugin_transport_wlan.c:1961 3635#: src/transport/plugin_transport_wlan.c:1964
3636#, fuzzy 3636#, fuzzy
3637msgid "# wlan pending fragments" 3637msgid "# wlan pending fragments"
3638msgstr "# các mảnh bị loại bỏ" 3638msgstr "# các mảnh bị loại bỏ"
3639 3639
3640#: src/transport/plugin_transport_wlan.c:1437 3640#: src/transport/plugin_transport_wlan.c:1440
3641#, c-format 3641#, c-format
3642msgid "Finished reading from wlan-helper stdout with code: %d\n" 3642msgid "Finished reading from wlan-helper stdout with code: %d\n"
3643msgstr "" 3643msgstr ""
3644 3644
3645#: src/transport/plugin_transport_wlan.c:1802 3645#: src/transport/plugin_transport_wlan.c:1805
3646msgid "# wlan hello beacons send" 3646msgid "# wlan hello beacons send"
3647msgstr "" 3647msgstr ""
3648 3648
3649#: src/transport/plugin_transport_wlan.c:1835 3649#: src/transport/plugin_transport_wlan.c:1838
3650#: src/transport/plugin_transport_wlan.c:2050 3650#: src/transport/plugin_transport_wlan.c:2053
3651#: src/transport/plugin_transport_wlan.c:2145 3651#: src/transport/plugin_transport_wlan.c:2148
3652#, c-format 3652#, c-format
3653msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n" 3653msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n"
3654msgstr "" 3654msgstr ""
3655 3655
3656#: src/transport/plugin_transport_wlan.c:2036 3656#: src/transport/plugin_transport_wlan.c:2039
3657msgid "# wlan acks send" 3657msgid "# wlan acks send"
3658msgstr "" 3658msgstr ""
3659 3659
3660#: src/transport/plugin_transport_wlan.c:2107 3660#: src/transport/plugin_transport_wlan.c:2110
3661#, fuzzy 3661#, fuzzy
3662msgid "# wlan fragments send" 3662msgid "# wlan fragments send"
3663msgstr "# các mảnh bị loại bỏ" 3663msgstr "# các mảnh bị loại bỏ"
3664 3664
3665#: src/transport/plugin_transport_wlan.c:2273 3665#: src/transport/plugin_transport_wlan.c:2276
3666#, c-format 3666#, c-format
3667msgid "Wlan Address len %d is wrong\n" 3667msgid "Wlan Address len %d is wrong\n"
3668msgstr "" 3668msgstr ""
3669 3669
3670#: src/transport/plugin_transport_wlan.c:2278 3670#: src/transport/plugin_transport_wlan.c:2281
3671#, fuzzy 3671#, fuzzy
3672msgid "# wlan messages queued" 3672msgid "# wlan messages queued"
3673msgstr "# các thông báo phát hiện dht được nhận" 3673msgstr "# các thông báo phát hiện dht được nhận"
3674 3674
3675#: src/transport/plugin_transport_wlan.c:2367 3675#: src/transport/plugin_transport_wlan.c:2370
3676#: src/transport/plugin_transport_wlan.c:3021 3676#: src/transport/plugin_transport_wlan.c:3024
3677#: src/transport/plugin_transport_wlan.c:3268 3677#: src/transport/plugin_transport_wlan.c:3271
3678msgid "# wlan mac endpoints" 3678msgid "# wlan mac endpoints"
3679msgstr "" 3679msgstr ""
3680 3680
3681#: src/transport/plugin_transport_wlan.c:2595 3681#: src/transport/plugin_transport_wlan.c:2598
3682#, fuzzy 3682#, fuzzy
3683msgid "# wlan whole messages received" 3683msgid "# wlan whole messages received"
3684msgstr "# các thông báo phát hiện dht được nhận" 3684msgstr "# các thông báo phát hiện dht được nhận"
3685 3685
3686#: src/transport/plugin_transport_wlan.c:2795 3686#: src/transport/plugin_transport_wlan.c:2798
3687#, fuzzy 3687#, fuzzy
3688msgid "# wlan hello messages received" 3688msgid "# wlan hello messages received"
3689msgstr "# các thông báo phát hiện dht được nhận" 3689msgstr "# các thông báo phát hiện dht được nhận"
3690 3690
3691#: src/transport/plugin_transport_wlan.c:2832 3691#: src/transport/plugin_transport_wlan.c:2835
3692#, fuzzy 3692#, fuzzy
3693msgid "# wlan fragments received" 3693msgid "# wlan fragments received"
3694msgstr "# các mảnh bị loại bỏ" 3694msgstr "# các mảnh bị loại bỏ"
3695 3695
3696#: src/transport/plugin_transport_wlan.c:2884 3696#: src/transport/plugin_transport_wlan.c:2887
3697#, fuzzy 3697#, fuzzy
3698msgid "# wlan acks received" 3698msgid "# wlan acks received"
3699msgstr "# các yêu cầu khách lỗ hổng được nhận" 3699msgstr "# các yêu cầu khách lỗ hổng được nhận"
3700 3700
3701#: src/transport/plugin_transport_wlan.c:2981 3701#: src/transport/plugin_transport_wlan.c:2984
3702msgid "# wlan mac endpoints timeouts" 3702msgid "# wlan mac endpoints timeouts"
3703msgstr "" 3703msgstr ""
3704 3704
3705#: src/transport/plugin_transport_wlan.c:3005 3705#: src/transport/plugin_transport_wlan.c:3008
3706#, fuzzy 3706#, fuzzy
3707msgid "# wlan mac endpoints created" 3707msgid "# wlan mac endpoints created"
3708msgstr "# các yêu cầu get (lấy) dht được nhận" 3708msgstr "# các yêu cầu get (lấy) dht được nhận"
3709 3709
3710#: src/transport/plugin_transport_wlan.c:3063 3710#: src/transport/plugin_transport_wlan.c:3066
3711msgid "# wlan WLAN_HELPER_DATA received" 3711msgid "# wlan WLAN_HELPER_DATA received"
3712msgstr "" 3712msgstr ""
3713 3713
3714#: src/transport/plugin_transport_wlan.c:3119 3714#: src/transport/plugin_transport_wlan.c:3122
3715#, fuzzy 3715#, fuzzy
3716msgid "# wlan messages for this client received" 3716msgid "# wlan messages for this client received"
3717msgstr "# các thông báo phát hiện dht được nhận" 3717msgstr "# các thông báo phát hiện dht được nhận"
3718 3718
3719#: src/transport/plugin_transport_wlan.c:3130 3719#: src/transport/plugin_transport_wlan.c:3133
3720#, fuzzy 3720#, fuzzy
3721msgid "# wlan messages inside WLAN_HELPER_DATA received" 3721msgid "# wlan messages inside WLAN_HELPER_DATA received"
3722msgstr "# các thông báo phát hiện dht được nhận" 3722msgstr "# các thông báo phát hiện dht được nhận"
3723 3723
3724#: src/transport/gnunet-transport.c:245 3724#: src/transport/gnunet-transport.c:250
3725#, c-format 3725#, c-format
3726msgid "No transport plugins configured, peer will never communicate\n" 3726msgid "No transport plugins configured, peer will never communicate\n"
3727msgstr "" 3727msgstr ""
3728 3728
3729#: src/transport/gnunet-transport.c:258 3729#: src/transport/gnunet-transport.c:263
3730#, c-format 3730#, c-format
3731msgid "No port configured for plugin `%s', cannot test it\n" 3731msgid "No port configured for plugin `%s', cannot test it\n"
3732msgstr "" 3732msgstr ""
3733 3733
3734#: src/transport/gnunet-transport.c:308 3734#: src/transport/gnunet-transport.c:313
3735#, c-format 3735#, c-format
3736msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n" 3736msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n"
3737msgstr "" 3737msgstr ""
3738 3738
3739#: src/transport/gnunet-transport.c:315 3739#: src/transport/gnunet-transport.c:320
3740#, c-format 3740#, c-format
3741msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n" 3741msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"
3742msgstr "" 3742msgstr ""
3743 3743
3744#: src/transport/gnunet-transport.c:348 3744#: src/transport/gnunet-transport.c:353
3745#, fuzzy, c-format 3745#, fuzzy, c-format
3746msgid "Transmitting %u bytes to %s\n" 3746msgid "Transmitting %u bytes to %s\n"
3747msgstr "Đang thử tải danh sách các máy xuống « %s »\n" 3747msgstr "Đang thử tải danh sách các máy xuống « %s »\n"
3748 3748
3749#: src/transport/gnunet-transport.c:368 3749#: src/transport/gnunet-transport.c:373
3750#, fuzzy, c-format 3750#, fuzzy, c-format
3751msgid "Connected to %s\n" 3751msgid "Connected to %s\n"
3752msgstr "« %s » được kết nối tới « %s ».\n" 3752msgstr "« %s » được kết nối tới « %s ».\n"
3753 3753
3754#: src/transport/gnunet-transport.c:399 3754#: src/transport/gnunet-transport.c:404
3755#, fuzzy, c-format 3755#, fuzzy, c-format
3756msgid "Disconnected from %s\n" 3756msgid "Disconnected from %s\n"
3757msgstr "« %.*s » được kết nối tới « %.*s ».\n" 3757msgstr "« %.*s » được kết nối tới « %.*s ».\n"
3758 3758
3759#: src/transport/gnunet-transport.c:428 3759#: src/transport/gnunet-transport.c:433
3760#, fuzzy, c-format 3760#, fuzzy, c-format
3761msgid "Received %u bytes from %s\n" 3761msgid "Received %u bytes from %s\n"
3762msgstr "Nhận yêu cầu định tuyến\n" 3762msgstr "Nhận yêu cầu định tuyến\n"
3763 3763
3764#: src/transport/gnunet-transport.c:448 3764#: src/transport/gnunet-transport.c:447
3765#, fuzzy, c-format 3765#, fuzzy, c-format
3766msgid "Peer `%s' plugin: `%s' address `%s'\n" 3766msgid "Peer `%s': %s\n"
3767msgstr "ồng đẳng « %s » có mức tin cậy %8u và địa chỉ « %s »\n" 3767msgstr "Tôi là ồng đẳng « %s ».\n"
3768 3768
3769#: src/transport/gnunet-transport.c:486 3769#: src/transport/gnunet-transport.c:519
3770#, fuzzy, c-format 3770#, fuzzy, c-format
3771msgid "Failed to parse peer identity `%s'\n" 3771msgid "Failed to parse peer identity `%s'\n"
3772msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" 3772msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n"
3773 3773
3774#: src/transport/gnunet-transport.c:522 3774#: src/transport/gnunet-transport.c:556
3775msgid "measure how fast we are receiving data (until CTRL-C)" 3775msgid "measure how fast we are receiving data (until CTRL-C)"
3776msgstr "" 3776msgstr ""
3777 3777
3778#: src/transport/gnunet-transport.c:525 3778#: src/transport/gnunet-transport.c:559
3779#, fuzzy 3779#, fuzzy
3780msgid "try to connect to the given peer" 3780msgid "try to connect to the given peer"
3781msgstr "Lỗi kết nối đến gnunetd.\n" 3781msgstr "Lỗi kết nối đến gnunetd.\n"
3782 3782
3783#: src/transport/gnunet-transport.c:528 3783#: src/transport/gnunet-transport.c:562
3784#, fuzzy 3784#, fuzzy
3785msgid "provide information about all current connections (once)" 3785msgid "provide information about all current connections (once)"
3786msgstr "In ra thông tin về các đồng đẳng GNUnet." 3786msgstr "In ra thông tin về các đồng đẳng GNUnet."
3787 3787
3788#: src/transport/gnunet-transport.c:532 3788#: src/transport/gnunet-transport.c:566
3789msgid "send data for benchmarking to the other peer (until CTRL-C)" 3789msgid "send data for benchmarking to the other peer (until CTRL-C)"
3790msgstr "" 3790msgstr ""
3791 3791
3792#: src/transport/gnunet-transport.c:535 3792#: src/transport/gnunet-transport.c:569
3793msgid "test transport configuration (involves external server)" 3793msgid "test transport configuration (involves external server)"
3794msgstr "" 3794msgstr ""
3795 3795
3796#: src/transport/gnunet-transport.c:543 3796#: src/transport/gnunet-transport.c:572
3797#, fuzzy
3798msgid "do not resolve hostnames"
3799msgstr "không quyết định các tên máy"
3800
3801#: src/transport/gnunet-transport.c:580
3797#, fuzzy 3802#, fuzzy
3798msgid "Direct access to transport service." 3803msgid "Direct access to transport service."
3799msgstr "Lỗi kết nối đến gnunetd.\n" 3804msgstr "Lỗi kết nối đến gnunetd.\n"
@@ -4302,33 +4307,33 @@ msgstr ""
4302msgid "GNUnet NAT traversal test helper daemon" 4307msgid "GNUnet NAT traversal test helper daemon"
4303msgstr "" 4308msgstr ""
4304 4309
4305#: src/nat/nat.c:803 4310#: src/nat/nat.c:805
4306#, c-format 4311#, c-format
4307msgid "gnunet-helper-nat-server generated malformed address `%s'\n" 4312msgid "gnunet-helper-nat-server generated malformed address `%s'\n"
4308msgstr "" 4313msgstr ""
4309 4314
4310#: src/nat/nat.c:852 4315#: src/nat/nat.c:854
4311#, fuzzy, c-format 4316#, fuzzy, c-format
4312msgid "Failed to start %s\n" 4317msgid "Failed to start %s\n"
4313msgstr "Lỗi bắt đầu thu thập.\n" 4318msgstr "Lỗi bắt đầu thu thập.\n"
4314 4319
4315#: src/nat/nat.c:1121 4320#: src/nat/nat.c:1123
4316#, fuzzy, c-format 4321#, fuzzy, c-format
4317msgid "Malformed %s `%s' given in configuration!\n" 4322msgid "Malformed %s `%s' given in configuration!\n"
4318msgstr "Lỗi lưu cấu hình." 4323msgstr "Lỗi lưu cấu hình."
4319 4324
4320#: src/nat/nat.c:1187 src/nat/nat.c:1197 4325#: src/nat/nat.c:1189 src/nat/nat.c:1199
4321#, c-format 4326#, c-format
4322msgid "" 4327msgid ""
4323"Configuration requires `%s', but binary is not installed properly (SUID bit " 4328"Configuration requires `%s', but binary is not installed properly (SUID bit "
4324"not set). Option disabled.\n" 4329"not set). Option disabled.\n"
4325msgstr "" 4330msgstr ""
4326 4331
4327#: src/nat/nat.c:1329 4332#: src/nat/nat.c:1331
4328msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n" 4333msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n"
4329msgstr "" 4334msgstr ""
4330 4335
4331#: src/nat/nat.c:1341 4336#: src/nat/nat.c:1343
4332#, c-format 4337#, c-format
4333msgid "Running gnunet-helper-nat-client %s %s %u\n" 4338msgid "Running gnunet-helper-nat-client %s %s %u\n"
4334msgstr "" 4339msgstr ""
@@ -4366,16 +4371,16 @@ msgstr ""
4366msgid "Loading block plugin `%s'\n" 4371msgid "Loading block plugin `%s'\n"
4367msgstr "Đang nạp các truyền tải « %s »\n" 4372msgstr "Đang nạp các truyền tải « %s »\n"
4368 4373
4369#: src/mesh/gnunet-service-mesh.c:4201 4374#: src/mesh/gnunet-service-mesh.c:4218
4370msgid "MESH: Wrong CORE service\n" 4375msgid "MESH: Wrong CORE service\n"
4371msgstr "" 4376msgstr ""
4372 4377
4373#: src/mesh/gnunet-service-mesh.c:4406 4378#: src/mesh/gnunet-service-mesh.c:4423
4374#, fuzzy 4379#, fuzzy
4375msgid "Mesh service is lacking key configuration settings. Exiting.\n" 4380msgid "Mesh service is lacking key configuration settings. Exiting.\n"
4376msgstr "Lưu cấu hình ngay bây giờ không?" 4381msgstr "Lưu cấu hình ngay bây giờ không?"
4377 4382
4378#: src/mesh/gnunet-service-mesh.c:4415 4383#: src/mesh/gnunet-service-mesh.c:4432
4379#, fuzzy 4384#, fuzzy
4380msgid "Mesh service could not access hostkey. Exiting.\n" 4385msgid "Mesh service could not access hostkey. Exiting.\n"
4381msgstr "Không thể truy cập đến thông tin về không gian tên.\n" 4386msgstr "Không thể truy cập đến thông tin về không gian tên.\n"
@@ -4567,34 +4572,34 @@ msgstr ""
4567msgid "Hostlist file `%s' could not be removed\n" 4572msgid "Hostlist file `%s' could not be removed\n"
4568msgstr "Khoá phiên chạy từ đồng đẳng « %s » không thể được thẩm tra.\n" 4573msgstr "Khoá phiên chạy từ đồng đẳng « %s » không thể được thẩm tra.\n"
4569 4574
4570#: src/hostlist/gnunet-daemon-hostlist.c:257 4575#: src/hostlist/gnunet-daemon-hostlist.c:262
4571msgid "" 4576msgid ""
4572"None of the functions for the hostlist daemon were enabled. I have no " 4577"None of the functions for the hostlist daemon were enabled. I have no "
4573"reason to run!\n" 4578"reason to run!\n"
4574msgstr "" 4579msgstr ""
4575 4580
4576#: src/hostlist/gnunet-daemon-hostlist.c:310 4581#: src/hostlist/gnunet-daemon-hostlist.c:315
4577#, fuzzy 4582#, fuzzy
4578msgid "advertise our hostlist to other peers" 4583msgid "advertise our hostlist to other peers"
4579msgstr "Tắt quảng cáo máy này cho đồng đẳng khác" 4584msgstr "Tắt quảng cáo máy này cho đồng đẳng khác"
4580 4585
4581#: src/hostlist/gnunet-daemon-hostlist.c:315 4586#: src/hostlist/gnunet-daemon-hostlist.c:320
4582msgid "" 4587msgid ""
4583"bootstrap using hostlists (it is highly recommended that you always use this " 4588"bootstrap using hostlists (it is highly recommended that you always use this "
4584"option)" 4589"option)"
4585msgstr "" 4590msgstr ""
4586 4591
4587#: src/hostlist/gnunet-daemon-hostlist.c:318 4592#: src/hostlist/gnunet-daemon-hostlist.c:323
4588#, fuzzy 4593#, fuzzy
4589msgid "enable learning about hostlist servers from other peers" 4594msgid "enable learning about hostlist servers from other peers"
4590msgstr "Tắt quảng cáo máy này cho đồng đẳng khác" 4595msgstr "Tắt quảng cáo máy này cho đồng đẳng khác"
4591 4596
4592#: src/hostlist/gnunet-daemon-hostlist.c:322 4597#: src/hostlist/gnunet-daemon-hostlist.c:327
4593#, fuzzy 4598#, fuzzy
4594msgid "provide a hostlist server" 4599msgid "provide a hostlist server"
4595msgstr "trình phục vụ danh sách máy HTTP hợp nhất" 4600msgstr "trình phục vụ danh sách máy HTTP hợp nhất"
4596 4601
4597#: src/hostlist/gnunet-daemon-hostlist.c:334 4602#: src/hostlist/gnunet-daemon-hostlist.c:339
4598msgid "GNUnet hostlist server and client" 4603msgid "GNUnet hostlist server and client"
4599msgstr "" 4604msgstr ""
4600 4605
@@ -4687,30 +4692,30 @@ msgstr "Đang thử tải danh sách các máy xuống « %s »\n"
4687msgid "Could not start hostlist HTTP server on port %u\n" 4692msgid "Could not start hostlist HTTP server on port %u\n"
4688msgstr "Cổng cho trình phục vụ HTTP danh sách máy chủ thống nhất" 4693msgstr "Cổng cho trình phục vụ HTTP danh sách máy chủ thống nhất"
4689 4694
4690#: src/peerinfo-tool/gnunet-peerinfo.c:221 4695#: src/peerinfo-tool/gnunet-peerinfo.c:219
4691#, fuzzy, c-format 4696#, fuzzy, c-format
4692msgid "Could not find option `%s:%s' in configuration.\n" 4697msgid "Could not find option `%s:%s' in configuration.\n"
4693msgstr "Không tìm thấy phương pháp « %s%s » trong thư viện « %s ».\n" 4698msgstr "Không tìm thấy phương pháp « %s%s » trong thư viện « %s ».\n"
4694 4699
4695#: src/peerinfo-tool/gnunet-peerinfo.c:228 4700#: src/peerinfo-tool/gnunet-peerinfo.c:226
4696#, c-format 4701#, c-format
4697msgid "Loading hostkey from `%s' failed.\n" 4702msgid "Loading hostkey from `%s' failed.\n"
4698msgstr "" 4703msgstr ""
4699 4704
4700#: src/peerinfo-tool/gnunet-peerinfo.c:240 4705#: src/peerinfo-tool/gnunet-peerinfo.c:238
4701#, c-format 4706#, c-format
4702msgid "I am peer `%s'.\n" 4707msgid "I am peer `%s'.\n"
4703msgstr "Tôi là đồng đẳng « %s ».\n" 4708msgstr "Tôi là đồng đẳng « %s ».\n"
4704 4709
4705#: src/peerinfo-tool/gnunet-peerinfo.c:260 4710#: src/peerinfo-tool/gnunet-peerinfo.c:258
4706msgid "output only the identity strings" 4711msgid "output only the identity strings"
4707msgstr "chỉ xuất những chuỗi nhận diện" 4712msgstr "chỉ xuất những chuỗi nhận diện"
4708 4713
4709#: src/peerinfo-tool/gnunet-peerinfo.c:263 4714#: src/peerinfo-tool/gnunet-peerinfo.c:261
4710msgid "output our own identity only" 4715msgid "output our own identity only"
4711msgstr "chỉ xuất nhận diện mình" 4716msgstr "chỉ xuất nhận diện mình"
4712 4717
4713#: src/peerinfo-tool/gnunet-peerinfo.c:269 4718#: src/peerinfo-tool/gnunet-peerinfo.c:267
4714#, fuzzy 4719#, fuzzy
4715msgid "Print information about peers." 4720msgid "Print information about peers."
4716msgstr "In ra thông tin về các đồng đẳng GNUnet." 4721msgstr "In ra thông tin về các đồng đẳng GNUnet."
@@ -4740,22 +4745,26 @@ msgstr "xuất chi tiết"
4740msgid "use configuration file FILENAME" 4745msgid "use configuration file FILENAME"
4741msgstr "dùng tập tin cấu hình TÊN_TẬP_TIN" 4746msgstr "dùng tập tin cấu hình TÊN_TẬP_TIN"
4742 4747
4743#: src/include/gnunet_common.h:361 src/include/gnunet_common.h:366 4748#: src/include/gnunet_common.h:366 src/include/gnunet_common.h:371
4744#: src/include/gnunet_common.h:372 4749#: src/include/gnunet_common.h:377
4745#, fuzzy, c-format 4750#, fuzzy, c-format
4746msgid "Assertion failed at %s:%d.\n" 4751msgid "Assertion failed at %s:%d.\n"
4747msgstr "Lỗi nội bộ : khẳng định không thành công tại %s:%d.\n" 4752msgstr "Lỗi nội bộ : khẳng định không thành công tại %s:%d.\n"
4748 4753
4749#: src/include/gnunet_common.h:382 4754#: src/include/gnunet_common.h:387
4750#, fuzzy, c-format 4755#, fuzzy, c-format
4751msgid "External protocol violation detected at %s:%d.\n" 4756msgid "External protocol violation detected at %s:%d.\n"
4752msgstr "Lỗi nội bộ : khẳng định không thành công tại %s:%d.\n" 4757msgstr "Lỗi nội bộ : khẳng định không thành công tại %s:%d.\n"
4753 4758
4754#: src/include/gnunet_common.h:403 src/include/gnunet_common.h:410 4759#: src/include/gnunet_common.h:408 src/include/gnunet_common.h:415
4755#, c-format 4760#, c-format
4756msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" 4761msgid "`%s' failed on file `%s' at %s:%d with error: %s\n"
4757msgstr "« %s » thất bại ở tập tin « %s » tại %s:%d với lỗi: %s\n" 4762msgstr "« %s » thất bại ở tập tin « %s » tại %s:%d với lỗi: %s\n"
4758 4763
4764#, fuzzy
4765#~ msgid "Peer `%s' plugin: `%s' address `%s'\n"
4766#~ msgstr "Đồng đẳng « %s » có mức tin cậy %8u và địa chỉ « %s »\n"
4767
4759#~ msgid "KiB" 4768#~ msgid "KiB"
4760#~ msgstr "KiB" 4769#~ msgstr "KiB"
4761 4770
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 6c6a00a4e..bd1418e34 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: gnunet-0.8.1\n" 8"Project-Id-Version: gnunet-0.8.1\n"
9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" 9"Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n"
10"POT-Creation-Date: 2011-11-26 14:53+0100\n" 10"POT-Creation-Date: 2011-11-29 21:38+0100\n"
11"PO-Revision-Date: 2011-07-09 12:12+0800\n" 11"PO-Revision-Date: 2011-07-09 12:12+0800\n"
12"Last-Translator: Wylmer Wang <wantinghard@gmail.com>\n" 12"Last-Translator: Wylmer Wang <wantinghard@gmail.com>\n"
13"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" 13"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
@@ -29,8 +29,8 @@ msgstr ""
29#: src/datacache/plugin_datacache_mysql.c:517 29#: src/datacache/plugin_datacache_mysql.c:517
30#: src/datacache/plugin_datacache_mysql.c:526 30#: src/datacache/plugin_datacache_mysql.c:526
31#: src/datacache/plugin_datacache_mysql.c:598 31#: src/datacache/plugin_datacache_mysql.c:598
32#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:389 32#: src/datacache/plugin_datacache_mysql.c:614 src/include/gnunet_common.h:394
33#: src/include/gnunet_common.h:396 33#: src/include/gnunet_common.h:401
34#, fuzzy, c-format 34#, fuzzy, c-format
35msgid "`%s' failed at %s:%d with error: %s\n" 35msgid "`%s' failed at %s:%d with error: %s\n"
36msgstr "“%s”于 %s:%d 处失败,错误为:%s\n" 36msgstr "“%s”于 %s:%d 处失败,错误为:%s\n"
@@ -369,30 +369,30 @@ msgstr ""
369msgid "Peer `%s'\n" 369msgid "Peer `%s'\n"
370msgstr "" 370msgstr ""
371 371
372#: src/core/gnunet-core-list-connections.c:167 372#: src/core/gnunet-core-list-connections.c:178
373#: src/peerinfo-tool/gnunet-peerinfo.c:199 373#: src/peerinfo-tool/gnunet-peerinfo.c:197
374#, fuzzy, c-format 374#, fuzzy, c-format
375msgid "Invalid command line argument `%s'\n" 375msgid "Invalid command line argument `%s'\n"
376msgstr "“%s”的参数无效。\n" 376msgstr "“%s”的参数无效。\n"
377 377
378#: src/core/gnunet-core-list-connections.c:188 378#: src/core/gnunet-core-list-connections.c:199
379#: src/peerinfo-tool/gnunet-peerinfo.c:257 379#: src/peerinfo-tool/gnunet-peerinfo.c:255
380msgid "don't resolve host names" 380msgid "don't resolve host names"
381msgstr "" 381msgstr ""
382 382
383#: src/core/gnunet-core-list-connections.c:195 383#: src/core/gnunet-core-list-connections.c:206
384msgid "Print information about connected peers." 384msgid "Print information about connected peers."
385msgstr "" 385msgstr ""
386 386
387#: src/core/gnunet-service-core_clients.c:357 387#: src/core/gnunet-service-core_clients.c:359
388msgid "# send requests dropped (disconnected)" 388msgid "# send requests dropped (disconnected)"
389msgstr "" 389msgstr ""
390 390
391#: src/core/gnunet-service-core_clients.c:462 391#: src/core/gnunet-service-core_clients.c:464
392msgid "# messages discarded (session disconnected)" 392msgid "# messages discarded (session disconnected)"
393msgstr "" 393msgstr ""
394 394
395#: src/core/gnunet-service-core_clients.c:800 395#: src/core/gnunet-service-core_clients.c:801
396#, c-format 396#, c-format
397msgid "# bytes of messages of type %u received" 397msgid "# bytes of messages of type %u received"
398msgstr "" 398msgstr ""
@@ -438,7 +438,7 @@ msgid "# bytes decrypted"
438msgstr "" 438msgstr ""
439 439
440#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002 440#: src/core/gnunet-service-core_kx.c:602 src/dv/gnunet-service-dv.c:3002
441#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:156 441#: src/hostlist/hostlist-server.c:436 src/peerinfo-tool/gnunet-peerinfo.c:154
442#, c-format 442#, c-format
443msgid "Error in communication with PEERINFO service\n" 443msgid "Error in communication with PEERINFO service\n"
444msgstr "" 444msgstr ""
@@ -546,7 +546,7 @@ msgstr ""
546 546
547#: src/core/gnunet-service-core_kx.c:1539 547#: src/core/gnunet-service-core_kx.c:1539
548#: src/transport/gnunet-service-transport.c:537 548#: src/transport/gnunet-service-transport.c:537
549#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:207 549#: src/hostlist/hostlist-server.c:555 src/peerinfo-tool/gnunet-peerinfo.c:205
550#, c-format 550#, c-format
551msgid "Could not access PEERINFO service. Exiting.\n" 551msgid "Could not access PEERINFO service. Exiting.\n"
552msgstr "" 552msgstr ""
@@ -708,11 +708,11 @@ msgstr "%s:选项“-W %s” 不允许有参数\n"
708msgid "Use --help to get a list of options.\n" 708msgid "Use --help to get a list of options.\n"
709msgstr "请使用 --help 获取选项列表。\n" 709msgstr "请使用 --help 获取选项列表。\n"
710 710
711#: src/util/scheduler.c:860 711#: src/util/scheduler.c:870
712msgid "Looks like we're busy waiting...\n" 712msgid "Looks like we're busy waiting...\n"
713msgstr "" 713msgstr ""
714 714
715#: src/util/scheduler.c:990 715#: src/util/scheduler.c:1000
716#, c-format 716#, c-format
717msgid "Attempt to cancel dead task %llu!\n" 717msgid "Attempt to cancel dead task %llu!\n"
718msgstr "" 718msgstr ""
@@ -1200,33 +1200,33 @@ msgstr ""
1200msgid "RSA signature verification failed at %s:%d: %s\n" 1200msgid "RSA signature verification failed at %s:%d: %s\n"
1201msgstr "" 1201msgstr ""
1202 1202
1203#: src/nse/gnunet-nse-profiler.c:647 src/dht/gnunet-dht-get.c:213 1203#: src/nse/gnunet-nse-profiler.c:634 src/dht/gnunet-dht-get.c:213
1204#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169 1204#: src/dht/gnunet-dht-put.c:184 src/fs/gnunet-unindex.c:169
1205#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591 1205#: src/fs/gnunet-search.c:297 src/fs/gnunet-publish.c:591
1206#: src/fs/gnunet-download.c:263 1206#: src/fs/gnunet-download.c:263
1207msgid "be verbose (print progress information)" 1207msgid "be verbose (print progress information)"
1208msgstr "" 1208msgstr ""
1209 1209
1210#: src/nse/gnunet-nse-profiler.c:665 1210#: src/nse/gnunet-nse-profiler.c:652
1211#, fuzzy 1211#, fuzzy
1212msgid "Measure quality and performance of the NSE service." 1212msgid "Measure quality and performance of the NSE service."
1213msgstr "无法访问该服务" 1213msgstr "无法访问该服务"
1214 1214
1215#: src/nse/gnunet-service-nse.c:904 1215#: src/nse/gnunet-service-nse.c:902
1216#, c-format 1216#, c-format
1217msgid "Proof of work invalid: %llu!\n" 1217msgid "Proof of work invalid: %llu!\n"
1218msgstr "" 1218msgstr ""
1219 1219
1220#: src/nse/gnunet-service-nse.c:1329 src/nse/gnunet-service-nse.c:1348 1220#: src/nse/gnunet-service-nse.c:1326 src/nse/gnunet-service-nse.c:1345
1221#: src/nse/gnunet-service-nse.c:1369 1221#: src/nse/gnunet-service-nse.c:1366
1222msgid "NSE service is lacking key configuration settings. Exiting.\n" 1222msgid "NSE service is lacking key configuration settings. Exiting.\n"
1223msgstr "" 1223msgstr ""
1224 1224
1225#: src/nse/gnunet-service-nse.c:1336 1225#: src/nse/gnunet-service-nse.c:1333
1226msgid "Invalid work requirement for NSE service. Exiting.\n" 1226msgid "Invalid work requirement for NSE service. Exiting.\n"
1227msgstr "" 1227msgstr ""
1228 1228
1229#: src/nse/gnunet-service-nse.c:1357 1229#: src/nse/gnunet-service-nse.c:1354
1230#, fuzzy 1230#, fuzzy
1231msgid "NSE service could not access hostkey. Exiting.\n" 1231msgid "NSE service could not access hostkey. Exiting.\n"
1232msgstr "找不到接口“%s”的一个 IP 地址。\n" 1232msgstr "找不到接口“%s”的一个 IP 地址。\n"
@@ -2274,7 +2274,7 @@ msgid "Option `%s' is required when using option `%s'.\n"
2274msgstr "" 2274msgstr ""
2275 2275
2276#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400 2276#: src/fs/gnunet-publish.c:393 src/fs/gnunet-publish.c:400
2277#: src/transport/gnunet-transport.c:477 2277#: src/transport/gnunet-transport.c:510
2278#, c-format 2278#, c-format
2279msgid "Option `%s' makes no sense without option `%s'.\n" 2279msgid "Option `%s' makes no sense without option `%s'.\n"
2280msgstr "" 2280msgstr ""
@@ -2563,9 +2563,9 @@ msgstr ""
2563#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543 2563#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1543
2564#: src/transport/gnunet-service-transport_neighbours.c:938 2564#: src/transport/gnunet-service-transport_neighbours.c:938
2565#: src/transport/gnunet-service-transport_neighbours.c:943 2565#: src/transport/gnunet-service-transport_neighbours.c:943
2566#: src/transport/gnunet-service-transport_neighbours.c:1266 2566#: src/transport/gnunet-service-transport_neighbours.c:1269
2567#: src/transport/gnunet-service-transport_neighbours.c:2354 2567#: src/transport/gnunet-service-transport_neighbours.c:2382
2568#: src/transport/gnunet-service-transport_neighbours.c:2425 2568#: src/transport/gnunet-service-transport_neighbours.c:2453
2569#: src/topology/gnunet-daemon-topology.c:654 2569#: src/topology/gnunet-daemon-topology.c:654
2570#: src/topology/gnunet-daemon-topology.c:756 2570#: src/topology/gnunet-daemon-topology.c:756
2571msgid "# peers connected" 2571msgid "# peers connected"
@@ -3027,7 +3027,7 @@ msgstr ""
3027 3027
3028#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290 3028#: src/fs/gnunet-service-fs.c:583 src/topology/gnunet-daemon-topology.c:1290
3029#: src/topology/gnunet-daemon-topology.c:1297 3029#: src/topology/gnunet-daemon-topology.c:1297
3030#: src/hostlist/gnunet-daemon-hostlist.c:290 3030#: src/hostlist/gnunet-daemon-hostlist.c:295
3031#, fuzzy, c-format 3031#, fuzzy, c-format
3032msgid "Failed to connect to `%s' service.\n" 3032msgid "Failed to connect to `%s' service.\n"
3033msgstr "初始化“%s”服务失败。\n" 3033msgstr "初始化“%s”服务失败。\n"
@@ -3064,64 +3064,64 @@ msgstr ""
3064msgid "# peers disconnected due to global disconnect" 3064msgid "# peers disconnected due to global disconnect"
3065msgstr "" 3065msgstr ""
3066 3066
3067#: src/transport/gnunet-service-transport_neighbours.c:1774 3067#: src/transport/gnunet-service-transport_neighbours.c:1800
3068#: src/transport/gnunet-service-transport_neighbours.c:1795 3068#: src/transport/gnunet-service-transport_neighbours.c:1821
3069msgid "# messages not sent (no such peer or not connected)" 3069msgid "# messages not sent (no such peer or not connected)"
3070msgstr "" 3070msgstr ""
3071 3071
3072#: src/transport/gnunet-service-transport_neighbours.c:1811 3072#: src/transport/gnunet-service-transport_neighbours.c:1837
3073msgid "# bytes in message queue for other peers" 3073msgid "# bytes in message queue for other peers"
3074msgstr "" 3074msgstr ""
3075 3075
3076#: src/transport/gnunet-service-transport_neighbours.c:1863 3076#: src/transport/gnunet-service-transport_neighbours.c:1889
3077msgid "# messages discarded due to lack of neighbour record" 3077msgid "# messages discarded due to lack of neighbour record"
3078msgstr "" 3078msgstr ""
3079 3079
3080#: src/transport/gnunet-service-transport_neighbours.c:1899 3080#: src/transport/gnunet-service-transport_neighbours.c:1925
3081msgid "# bandwidth quota violations by other peers" 3081msgid "# bandwidth quota violations by other peers"
3082msgstr "" 3082msgstr ""
3083 3083
3084#: src/transport/gnunet-service-transport_neighbours.c:1917 3084#: src/transport/gnunet-service-transport_neighbours.c:1943
3085msgid "# ms throttling suggested" 3085msgid "# ms throttling suggested"
3086msgstr "" 3086msgstr ""
3087 3087
3088#: src/transport/gnunet-service-transport_neighbours.c:1946 3088#: src/transport/gnunet-service-transport_neighbours.c:1972
3089msgid "# KEEPALIVE messages discarded (not connected)" 3089msgid "# KEEPALIVE messages discarded (not connected)"
3090msgstr "" 3090msgstr ""
3091 3091
3092#: src/transport/gnunet-service-transport_neighbours.c:1995 3092#: src/transport/gnunet-service-transport_neighbours.c:2023
3093msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)" 3093msgid "# KEEPALIVE_RESPONSE messages discarded (not connected)"
3094msgstr "" 3094msgstr ""
3095 3095
3096#: src/transport/gnunet-service-transport_neighbours.c:2003 3096#: src/transport/gnunet-service-transport_neighbours.c:2031
3097msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)" 3097msgid "# KEEPALIVE_RESPONSE messages discarded (not expected)"
3098msgstr "" 3098msgstr ""
3099 3099
3100#: src/transport/gnunet-service-transport_neighbours.c:2064 3100#: src/transport/gnunet-service-transport_neighbours.c:2092
3101msgid "# SET QUOTA messages ignored (no such peer)" 3101msgid "# SET QUOTA messages ignored (no such peer)"
3102msgstr "" 3102msgstr ""
3103 3103
3104#: src/transport/gnunet-service-transport_neighbours.c:2082 3104#: src/transport/gnunet-service-transport_neighbours.c:2110
3105msgid "# disconnects due to quota of 0" 3105msgid "# disconnects due to quota of 0"
3106msgstr "" 3106msgstr ""
3107 3107
3108#: src/transport/gnunet-service-transport_neighbours.c:2200 3108#: src/transport/gnunet-service-transport_neighbours.c:2228
3109msgid "# disconnect messages ignored (old format)" 3109msgid "# disconnect messages ignored (old format)"
3110msgstr "" 3110msgstr ""
3111 3111
3112#: src/transport/gnunet-service-transport_neighbours.c:2213 3112#: src/transport/gnunet-service-transport_neighbours.c:2241
3113msgid "# disconnect messages ignored (timestamp)" 3113msgid "# disconnect messages ignored (timestamp)"
3114msgstr "" 3114msgstr ""
3115 3115
3116#: src/transport/gnunet-service-transport_neighbours.c:2289 3116#: src/transport/gnunet-service-transport_neighbours.c:2317
3117msgid "# unexpected CONNECT_ACK messages (no peer)" 3117msgid "# unexpected CONNECT_ACK messages (no peer)"
3118msgstr "" 3118msgstr ""
3119 3119
3120#: src/transport/gnunet-service-transport_neighbours.c:2304 3120#: src/transport/gnunet-service-transport_neighbours.c:2332
3121msgid "# unexpected CONNECT_ACK messages" 3121msgid "# unexpected CONNECT_ACK messages"
3122msgstr "" 3122msgstr ""
3123 3123
3124#: src/transport/gnunet-service-transport_neighbours.c:2402 3124#: src/transport/gnunet-service-transport_neighbours.c:2430
3125msgid "# unexpected ACK messages" 3125msgid "# unexpected ACK messages"
3126msgstr "" 3126msgstr ""
3127 3127
@@ -3181,39 +3181,39 @@ msgstr ""
3181msgid "# refreshed my HELLO" 3181msgid "# refreshed my HELLO"
3182msgstr "" 3182msgstr ""
3183 3183
3184#: src/transport/plugin_transport_udp.c:1518 3184#: src/transport/plugin_transport_udp.c:1520
3185msgid "# IPv4 broadcast HELLO beacons received via udp" 3185msgid "# IPv4 broadcast HELLO beacons received via udp"
3186msgstr "" 3186msgstr ""
3187 3187
3188#: src/transport/plugin_transport_udp.c:1555 3188#: src/transport/plugin_transport_udp.c:1557
3189msgid "# IPv6 multicast HELLO beacons received via udp" 3189msgid "# IPv6 multicast HELLO beacons received via udp"
3190msgstr "" 3190msgstr ""
3191 3191
3192#: src/transport/plugin_transport_udp.c:2041 3192#: src/transport/plugin_transport_udp.c:2043
3193#: src/transport/plugin_transport_udp_new.c:1218 3193#: src/transport/plugin_transport_udp_new.c:1218
3194#, c-format 3194#, c-format
3195msgid "Given `%s' option is out of range: %llu > %u\n" 3195msgid "Given `%s' option is out of range: %llu > %u\n"
3196msgstr "" 3196msgstr ""
3197 3197
3198#: src/transport/plugin_transport_udp.c:2092 3198#: src/transport/plugin_transport_udp.c:2094
3199#: src/transport/plugin_transport_udp_new.c:1268 3199#: src/transport/plugin_transport_udp_new.c:1268
3200#, fuzzy, c-format 3200#, fuzzy, c-format
3201msgid "Invalid IPv6 address: `%s'\n" 3201msgid "Invalid IPv6 address: `%s'\n"
3202msgstr "无效的进程优先级“%s”\n" 3202msgstr "无效的进程优先级“%s”\n"
3203 3203
3204#: src/transport/plugin_transport_udp.c:2235 3204#: src/transport/plugin_transport_udp.c:2237
3205#, c-format 3205#, c-format
3206msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" 3206msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n"
3207msgstr "" 3207msgstr ""
3208 3208
3209#: src/transport/plugin_transport_udp.c:2296 3209#: src/transport/plugin_transport_udp.c:2298
3210#: src/transport/plugin_transport_udp_new.c:1396 3210#: src/transport/plugin_transport_udp_new.c:1396
3211#, fuzzy 3211#, fuzzy
3212msgid "Failed to open UDP sockets\n" 3212msgid "Failed to open UDP sockets\n"
3213msgstr "打开日志文件“%s”失败:%s\n" 3213msgstr "打开日志文件“%s”失败:%s\n"
3214 3214
3215#: src/transport/plugin_transport_http_client.c:107 3215#: src/transport/plugin_transport_http_client.c:108
3216#: src/transport/plugin_transport_http_client.c:122 3216#: src/transport/plugin_transport_http_client.c:123
3217#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682 3217#: src/hostlist/hostlist-client.c:472 src/hostlist/hostlist-client.c:682
3218#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740 3218#: src/hostlist/hostlist-client.c:688 src/hostlist/hostlist-client.c:740
3219#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877 3219#: src/hostlist/hostlist-client.c:749 src/hostlist/hostlist-client.c:877
@@ -3222,7 +3222,7 @@ msgstr "打开日志文件“%s”失败:%s\n"
3222msgid "%s failed at %s:%d: `%s'\n" 3222msgid "%s failed at %s:%d: `%s'\n"
3223msgstr "" 3223msgstr ""
3224 3224
3225#: src/transport/plugin_transport_http_client.c:619 3225#: src/transport/plugin_transport_http_client.c:620
3226#, c-format 3226#, c-format
3227msgid "Could not initialize curl multi handle, failed to start %s plugin!\n" 3227msgid "Could not initialize curl multi handle, failed to start %s plugin!\n"
3228msgstr "" 3228msgstr ""
@@ -3433,175 +3433,179 @@ msgstr ""
3433msgid "Failed to load transport plugin for `%s'\n" 3433msgid "Failed to load transport plugin for `%s'\n"
3434msgstr "解析配置文件“%s”失败\n" 3434msgstr "解析配置文件“%s”失败\n"
3435 3435
3436#: src/transport/plugin_transport_wlan.c:881 3436#: src/transport/plugin_transport_wlan.c:884
3437msgid "# wlan session timeouts" 3437msgid "# wlan session timeouts"
3438msgstr "" 3438msgstr ""
3439 3439
3440#: src/transport/plugin_transport_wlan.c:905 3440#: src/transport/plugin_transport_wlan.c:908
3441msgid "# wlan session created" 3441msgid "# wlan session created"
3442msgstr "" 3442msgstr ""
3443 3443
3444#: src/transport/plugin_transport_wlan.c:989 3444#: src/transport/plugin_transport_wlan.c:992
3445#: src/transport/plugin_transport_wlan.c:1151 3445#: src/transport/plugin_transport_wlan.c:1154
3446#: src/transport/plugin_transport_wlan.c:1172 3446#: src/transport/plugin_transport_wlan.c:1175
3447#: src/transport/plugin_transport_wlan.c:1203 3447#: src/transport/plugin_transport_wlan.c:1206
3448#: src/transport/plugin_transport_wlan.c:2406 3448#: src/transport/plugin_transport_wlan.c:2409
3449#: src/transport/plugin_transport_wlan.c:3265 3449#: src/transport/plugin_transport_wlan.c:3268
3450msgid "# wlan pending sessions" 3450msgid "# wlan pending sessions"
3451msgstr "" 3451msgstr ""
3452 3452
3453#: src/transport/plugin_transport_wlan.c:1246 3453#: src/transport/plugin_transport_wlan.c:1249
3454#: src/transport/plugin_transport_wlan.c:1961 3454#: src/transport/plugin_transport_wlan.c:1964
3455msgid "# wlan pending fragments" 3455msgid "# wlan pending fragments"
3456msgstr "" 3456msgstr ""
3457 3457
3458#: src/transport/plugin_transport_wlan.c:1437 3458#: src/transport/plugin_transport_wlan.c:1440
3459#, c-format 3459#, c-format
3460msgid "Finished reading from wlan-helper stdout with code: %d\n" 3460msgid "Finished reading from wlan-helper stdout with code: %d\n"
3461msgstr "" 3461msgstr ""
3462 3462
3463#: src/transport/plugin_transport_wlan.c:1802 3463#: src/transport/plugin_transport_wlan.c:1805
3464msgid "# wlan hello beacons send" 3464msgid "# wlan hello beacons send"
3465msgstr "" 3465msgstr ""
3466 3466
3467#: src/transport/plugin_transport_wlan.c:1835 3467#: src/transport/plugin_transport_wlan.c:1838
3468#: src/transport/plugin_transport_wlan.c:2050 3468#: src/transport/plugin_transport_wlan.c:2053
3469#: src/transport/plugin_transport_wlan.c:2145 3469#: src/transport/plugin_transport_wlan.c:2148
3470#, c-format 3470#, c-format
3471msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n" 3471msgid "Error writing to wlan helper. errno == %d, ERROR: %s\n"
3472msgstr "" 3472msgstr ""
3473 3473
3474#: src/transport/plugin_transport_wlan.c:2036 3474#: src/transport/plugin_transport_wlan.c:2039
3475msgid "# wlan acks send" 3475msgid "# wlan acks send"
3476msgstr "" 3476msgstr ""
3477 3477
3478#: src/transport/plugin_transport_wlan.c:2107 3478#: src/transport/plugin_transport_wlan.c:2110
3479msgid "# wlan fragments send" 3479msgid "# wlan fragments send"
3480msgstr "" 3480msgstr ""
3481 3481
3482#: src/transport/plugin_transport_wlan.c:2273 3482#: src/transport/plugin_transport_wlan.c:2276
3483#, c-format 3483#, c-format
3484msgid "Wlan Address len %d is wrong\n" 3484msgid "Wlan Address len %d is wrong\n"
3485msgstr "" 3485msgstr ""
3486 3486
3487#: src/transport/plugin_transport_wlan.c:2278 3487#: src/transport/plugin_transport_wlan.c:2281
3488msgid "# wlan messages queued" 3488msgid "# wlan messages queued"
3489msgstr "" 3489msgstr ""
3490 3490
3491#: src/transport/plugin_transport_wlan.c:2367 3491#: src/transport/plugin_transport_wlan.c:2370
3492#: src/transport/plugin_transport_wlan.c:3021 3492#: src/transport/plugin_transport_wlan.c:3024
3493#: src/transport/plugin_transport_wlan.c:3268 3493#: src/transport/plugin_transport_wlan.c:3271
3494msgid "# wlan mac endpoints" 3494msgid "# wlan mac endpoints"
3495msgstr "" 3495msgstr ""
3496 3496
3497#: src/transport/plugin_transport_wlan.c:2595 3497#: src/transport/plugin_transport_wlan.c:2598
3498msgid "# wlan whole messages received" 3498msgid "# wlan whole messages received"
3499msgstr "" 3499msgstr ""
3500 3500
3501#: src/transport/plugin_transport_wlan.c:2795 3501#: src/transport/plugin_transport_wlan.c:2798
3502msgid "# wlan hello messages received" 3502msgid "# wlan hello messages received"
3503msgstr "" 3503msgstr ""
3504 3504
3505#: src/transport/plugin_transport_wlan.c:2832 3505#: src/transport/plugin_transport_wlan.c:2835
3506msgid "# wlan fragments received" 3506msgid "# wlan fragments received"
3507msgstr "" 3507msgstr ""
3508 3508
3509#: src/transport/plugin_transport_wlan.c:2884 3509#: src/transport/plugin_transport_wlan.c:2887
3510msgid "# wlan acks received" 3510msgid "# wlan acks received"
3511msgstr "" 3511msgstr ""
3512 3512
3513#: src/transport/plugin_transport_wlan.c:2981 3513#: src/transport/plugin_transport_wlan.c:2984
3514msgid "# wlan mac endpoints timeouts" 3514msgid "# wlan mac endpoints timeouts"
3515msgstr "" 3515msgstr ""
3516 3516
3517#: src/transport/plugin_transport_wlan.c:3005 3517#: src/transport/plugin_transport_wlan.c:3008
3518msgid "# wlan mac endpoints created" 3518msgid "# wlan mac endpoints created"
3519msgstr "" 3519msgstr ""
3520 3520
3521#: src/transport/plugin_transport_wlan.c:3063 3521#: src/transport/plugin_transport_wlan.c:3066
3522msgid "# wlan WLAN_HELPER_DATA received" 3522msgid "# wlan WLAN_HELPER_DATA received"
3523msgstr "" 3523msgstr ""
3524 3524
3525#: src/transport/plugin_transport_wlan.c:3119 3525#: src/transport/plugin_transport_wlan.c:3122
3526msgid "# wlan messages for this client received" 3526msgid "# wlan messages for this client received"
3527msgstr "" 3527msgstr ""
3528 3528
3529#: src/transport/plugin_transport_wlan.c:3130 3529#: src/transport/plugin_transport_wlan.c:3133
3530msgid "# wlan messages inside WLAN_HELPER_DATA received" 3530msgid "# wlan messages inside WLAN_HELPER_DATA received"
3531msgstr "" 3531msgstr ""
3532 3532
3533#: src/transport/gnunet-transport.c:245 3533#: src/transport/gnunet-transport.c:250
3534#, c-format 3534#, c-format
3535msgid "No transport plugins configured, peer will never communicate\n" 3535msgid "No transport plugins configured, peer will never communicate\n"
3536msgstr "" 3536msgstr ""
3537 3537
3538#: src/transport/gnunet-transport.c:258 3538#: src/transport/gnunet-transport.c:263
3539#, c-format 3539#, c-format
3540msgid "No port configured for plugin `%s', cannot test it\n" 3540msgid "No port configured for plugin `%s', cannot test it\n"
3541msgstr "" 3541msgstr ""
3542 3542
3543#: src/transport/gnunet-transport.c:308 3543#: src/transport/gnunet-transport.c:313
3544#, c-format 3544#, c-format
3545msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n" 3545msgid "Received %llu bytes/s (%llu bytes in %llu ms)\n"
3546msgstr "" 3546msgstr ""
3547 3547
3548#: src/transport/gnunet-transport.c:315 3548#: src/transport/gnunet-transport.c:320
3549#, c-format 3549#, c-format
3550msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n" 3550msgid "Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"
3551msgstr "" 3551msgstr ""
3552 3552
3553#: src/transport/gnunet-transport.c:348 3553#: src/transport/gnunet-transport.c:353
3554#, c-format 3554#, c-format
3555msgid "Transmitting %u bytes to %s\n" 3555msgid "Transmitting %u bytes to %s\n"
3556msgstr "" 3556msgstr ""
3557 3557
3558#: src/transport/gnunet-transport.c:368 3558#: src/transport/gnunet-transport.c:373
3559#, fuzzy, c-format 3559#, fuzzy, c-format
3560msgid "Connected to %s\n" 3560msgid "Connected to %s\n"
3561msgstr "“%s”已连接到“%s”。\n" 3561msgstr "“%s”已连接到“%s”。\n"
3562 3562
3563#: src/transport/gnunet-transport.c:399 3563#: src/transport/gnunet-transport.c:404
3564#, fuzzy, c-format 3564#, fuzzy, c-format
3565msgid "Disconnected from %s\n" 3565msgid "Disconnected from %s\n"
3566msgstr "“%s”已连接到“%s”。\n" 3566msgstr "“%s”已连接到“%s”。\n"
3567 3567
3568#: src/transport/gnunet-transport.c:428 3568#: src/transport/gnunet-transport.c:433
3569#, c-format 3569#, c-format
3570msgid "Received %u bytes from %s\n" 3570msgid "Received %u bytes from %s\n"
3571msgstr "" 3571msgstr ""
3572 3572
3573#: src/transport/gnunet-transport.c:448 3573#: src/transport/gnunet-transport.c:447
3574#, c-format 3574#, fuzzy, c-format
3575msgid "Peer `%s' plugin: `%s' address `%s'\n" 3575msgid "Peer `%s': %s\n"
3576msgstr "" 3576msgstr "运行 %s失败:%s %d\n"
3577 3577
3578#: src/transport/gnunet-transport.c:486 3578#: src/transport/gnunet-transport.c:519
3579#, fuzzy, c-format 3579#, fuzzy, c-format
3580msgid "Failed to parse peer identity `%s'\n" 3580msgid "Failed to parse peer identity `%s'\n"
3581msgstr "解析配置文件“%s”失败\n" 3581msgstr "解析配置文件“%s”失败\n"
3582 3582
3583#: src/transport/gnunet-transport.c:522 3583#: src/transport/gnunet-transport.c:556
3584msgid "measure how fast we are receiving data (until CTRL-C)" 3584msgid "measure how fast we are receiving data (until CTRL-C)"
3585msgstr "" 3585msgstr ""
3586 3586
3587#: src/transport/gnunet-transport.c:525 3587#: src/transport/gnunet-transport.c:559
3588#, fuzzy 3588#, fuzzy
3589msgid "try to connect to the given peer" 3589msgid "try to connect to the given peer"
3590msgstr "初始化“%s”服务失败。\n" 3590msgstr "初始化“%s”服务失败。\n"
3591 3591
3592#: src/transport/gnunet-transport.c:528 3592#: src/transport/gnunet-transport.c:562
3593msgid "provide information about all current connections (once)" 3593msgid "provide information about all current connections (once)"
3594msgstr "" 3594msgstr ""
3595 3595
3596#: src/transport/gnunet-transport.c:532 3596#: src/transport/gnunet-transport.c:566
3597msgid "send data for benchmarking to the other peer (until CTRL-C)" 3597msgid "send data for benchmarking to the other peer (until CTRL-C)"
3598msgstr "" 3598msgstr ""
3599 3599
3600#: src/transport/gnunet-transport.c:535 3600#: src/transport/gnunet-transport.c:569
3601msgid "test transport configuration (involves external server)" 3601msgid "test transport configuration (involves external server)"
3602msgstr "" 3602msgstr ""
3603 3603
3604#: src/transport/gnunet-transport.c:543 3604#: src/transport/gnunet-transport.c:572
3605msgid "do not resolve hostnames"
3606msgstr ""
3607
3608#: src/transport/gnunet-transport.c:580
3605#, fuzzy 3609#, fuzzy
3606msgid "Direct access to transport service." 3610msgid "Direct access to transport service."
3607msgstr "初始化“%s”服务失败。\n" 3611msgstr "初始化“%s”服务失败。\n"
@@ -4084,33 +4088,33 @@ msgstr ""
4084msgid "GNUnet NAT traversal test helper daemon" 4088msgid "GNUnet NAT traversal test helper daemon"
4085msgstr "" 4089msgstr ""
4086 4090
4087#: src/nat/nat.c:803 4091#: src/nat/nat.c:805
4088#, c-format 4092#, c-format
4089msgid "gnunet-helper-nat-server generated malformed address `%s'\n" 4093msgid "gnunet-helper-nat-server generated malformed address `%s'\n"
4090msgstr "" 4094msgstr ""
4091 4095
4092#: src/nat/nat.c:852 4096#: src/nat/nat.c:854
4093#, fuzzy, c-format 4097#, fuzzy, c-format
4094msgid "Failed to start %s\n" 4098msgid "Failed to start %s\n"
4095msgstr "运行 %s失败:%s %d\n" 4099msgstr "运行 %s失败:%s %d\n"
4096 4100
4097#: src/nat/nat.c:1121 4101#: src/nat/nat.c:1123
4098#, fuzzy, c-format 4102#, fuzzy, c-format
4099msgid "Malformed %s `%s' given in configuration!\n" 4103msgid "Malformed %s `%s' given in configuration!\n"
4100msgstr "保存配置失败。" 4104msgstr "保存配置失败。"
4101 4105
4102#: src/nat/nat.c:1187 src/nat/nat.c:1197 4106#: src/nat/nat.c:1189 src/nat/nat.c:1199
4103#, c-format 4107#, c-format
4104msgid "" 4108msgid ""
4105"Configuration requires `%s', but binary is not installed properly (SUID bit " 4109"Configuration requires `%s', but binary is not installed properly (SUID bit "
4106"not set). Option disabled.\n" 4110"not set). Option disabled.\n"
4107msgstr "" 4111msgstr ""
4108 4112
4109#: src/nat/nat.c:1329 4113#: src/nat/nat.c:1331
4110msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n" 4114msgid "Internal IP address not known, cannot use ICMP NAT traversal method\n"
4111msgstr "" 4115msgstr ""
4112 4116
4113#: src/nat/nat.c:1341 4117#: src/nat/nat.c:1343
4114#, c-format 4118#, c-format
4115msgid "Running gnunet-helper-nat-client %s %s %u\n" 4119msgid "Running gnunet-helper-nat-client %s %s %u\n"
4116msgstr "" 4120msgstr ""
@@ -4147,16 +4151,16 @@ msgstr ""
4147msgid "Loading block plugin `%s'\n" 4151msgid "Loading block plugin `%s'\n"
4148msgstr "打开日志文件“%s”失败:%s\n" 4152msgstr "打开日志文件“%s”失败:%s\n"
4149 4153
4150#: src/mesh/gnunet-service-mesh.c:4201 4154#: src/mesh/gnunet-service-mesh.c:4218
4151msgid "MESH: Wrong CORE service\n" 4155msgid "MESH: Wrong CORE service\n"
4152msgstr "" 4156msgstr ""
4153 4157
4154#: src/mesh/gnunet-service-mesh.c:4406 4158#: src/mesh/gnunet-service-mesh.c:4423
4155#, fuzzy 4159#, fuzzy
4156msgid "Mesh service is lacking key configuration settings. Exiting.\n" 4160msgid "Mesh service is lacking key configuration settings. Exiting.\n"
4157msgstr "立即保存配置?" 4161msgstr "立即保存配置?"
4158 4162
4159#: src/mesh/gnunet-service-mesh.c:4415 4163#: src/mesh/gnunet-service-mesh.c:4432
4160#, fuzzy 4164#, fuzzy
4161msgid "Mesh service could not access hostkey. Exiting.\n" 4165msgid "Mesh service could not access hostkey. Exiting.\n"
4162msgstr "找不到接口“%s”的一个 IP 地址。\n" 4166msgstr "找不到接口“%s”的一个 IP 地址。\n"
@@ -4339,31 +4343,31 @@ msgstr ""
4339msgid "Hostlist file `%s' could not be removed\n" 4343msgid "Hostlist file `%s' could not be removed\n"
4340msgstr "" 4344msgstr ""
4341 4345
4342#: src/hostlist/gnunet-daemon-hostlist.c:257 4346#: src/hostlist/gnunet-daemon-hostlist.c:262
4343msgid "" 4347msgid ""
4344"None of the functions for the hostlist daemon were enabled. I have no " 4348"None of the functions for the hostlist daemon were enabled. I have no "
4345"reason to run!\n" 4349"reason to run!\n"
4346msgstr "" 4350msgstr ""
4347 4351
4348#: src/hostlist/gnunet-daemon-hostlist.c:310 4352#: src/hostlist/gnunet-daemon-hostlist.c:315
4349msgid "advertise our hostlist to other peers" 4353msgid "advertise our hostlist to other peers"
4350msgstr "" 4354msgstr ""
4351 4355
4352#: src/hostlist/gnunet-daemon-hostlist.c:315 4356#: src/hostlist/gnunet-daemon-hostlist.c:320
4353msgid "" 4357msgid ""
4354"bootstrap using hostlists (it is highly recommended that you always use this " 4358"bootstrap using hostlists (it is highly recommended that you always use this "
4355"option)" 4359"option)"
4356msgstr "" 4360msgstr ""
4357 4361
4358#: src/hostlist/gnunet-daemon-hostlist.c:318 4362#: src/hostlist/gnunet-daemon-hostlist.c:323
4359msgid "enable learning about hostlist servers from other peers" 4363msgid "enable learning about hostlist servers from other peers"
4360msgstr "" 4364msgstr ""
4361 4365
4362#: src/hostlist/gnunet-daemon-hostlist.c:322 4366#: src/hostlist/gnunet-daemon-hostlist.c:327
4363msgid "provide a hostlist server" 4367msgid "provide a hostlist server"
4364msgstr "" 4368msgstr ""
4365 4369
4366#: src/hostlist/gnunet-daemon-hostlist.c:334 4370#: src/hostlist/gnunet-daemon-hostlist.c:339
4367msgid "GNUnet hostlist server and client" 4371msgid "GNUnet hostlist server and client"
4368msgstr "" 4372msgstr ""
4369 4373
@@ -4449,30 +4453,30 @@ msgstr ""
4449msgid "Could not start hostlist HTTP server on port %u\n" 4453msgid "Could not start hostlist HTTP server on port %u\n"
4450msgstr "" 4454msgstr ""
4451 4455
4452#: src/peerinfo-tool/gnunet-peerinfo.c:221 4456#: src/peerinfo-tool/gnunet-peerinfo.c:219
4453#, fuzzy, c-format 4457#, fuzzy, c-format
4454msgid "Could not find option `%s:%s' in configuration.\n" 4458msgid "Could not find option `%s:%s' in configuration.\n"
4455msgstr "找不到主机“%s”的 IP:%s\n" 4459msgstr "找不到主机“%s”的 IP:%s\n"
4456 4460
4457#: src/peerinfo-tool/gnunet-peerinfo.c:228 4461#: src/peerinfo-tool/gnunet-peerinfo.c:226
4458#, c-format 4462#, c-format
4459msgid "Loading hostkey from `%s' failed.\n" 4463msgid "Loading hostkey from `%s' failed.\n"
4460msgstr "" 4464msgstr ""
4461 4465
4462#: src/peerinfo-tool/gnunet-peerinfo.c:240 4466#: src/peerinfo-tool/gnunet-peerinfo.c:238
4463#, c-format 4467#, c-format
4464msgid "I am peer `%s'.\n" 4468msgid "I am peer `%s'.\n"
4465msgstr "" 4469msgstr ""
4466 4470
4467#: src/peerinfo-tool/gnunet-peerinfo.c:260 4471#: src/peerinfo-tool/gnunet-peerinfo.c:258
4468msgid "output only the identity strings" 4472msgid "output only the identity strings"
4469msgstr "" 4473msgstr ""
4470 4474
4471#: src/peerinfo-tool/gnunet-peerinfo.c:263 4475#: src/peerinfo-tool/gnunet-peerinfo.c:261
4472msgid "output our own identity only" 4476msgid "output our own identity only"
4473msgstr "" 4477msgstr ""
4474 4478
4475#: src/peerinfo-tool/gnunet-peerinfo.c:269 4479#: src/peerinfo-tool/gnunet-peerinfo.c:267
4476#, fuzzy 4480#, fuzzy
4477msgid "Print information about peers." 4481msgid "Print information about peers."
4478msgstr "无法获取有关用户“%s”的信息:%s\n" 4482msgstr "无法获取有关用户“%s”的信息:%s\n"
@@ -4501,18 +4505,18 @@ msgstr ""
4501msgid "use configuration file FILENAME" 4505msgid "use configuration file FILENAME"
4502msgstr "" 4506msgstr ""
4503 4507
4504#: src/include/gnunet_common.h:361 src/include/gnunet_common.h:366 4508#: src/include/gnunet_common.h:366 src/include/gnunet_common.h:371
4505#: src/include/gnunet_common.h:372 4509#: src/include/gnunet_common.h:377
4506#, c-format 4510#, c-format
4507msgid "Assertion failed at %s:%d.\n" 4511msgid "Assertion failed at %s:%d.\n"
4508msgstr "" 4512msgstr ""
4509 4513
4510#: src/include/gnunet_common.h:382 4514#: src/include/gnunet_common.h:387
4511#, c-format 4515#, c-format
4512msgid "External protocol violation detected at %s:%d.\n" 4516msgid "External protocol violation detected at %s:%d.\n"
4513msgstr "" 4517msgstr ""
4514 4518
4515#: src/include/gnunet_common.h:403 src/include/gnunet_common.h:410 4519#: src/include/gnunet_common.h:408 src/include/gnunet_common.h:415
4516#, c-format 4520#, c-format
4517msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" 4521msgid "`%s' failed on file `%s' at %s:%d with error: %s\n"
4518msgstr "" 4522msgstr ""
diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c
index 47daad6cf..7c0fb2d32 100644
--- a/src/ats/ats_api.c
+++ b/src/ats/ats_api.c
@@ -342,9 +342,9 @@ GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
342 atc->peers = GNUNET_CONTAINER_multihashmap_create (256); 342 atc->peers = GNUNET_CONTAINER_multihashmap_create (256);
343 atc->notify_map = GNUNET_CONTAINER_multihashmap_create (256); 343 atc->notify_map = GNUNET_CONTAINER_multihashmap_create (256);
344 GNUNET_CONFIGURATION_get_value_size (cfg, "ats", "WAN_QUOTA_OUT", 344 GNUNET_CONFIGURATION_get_value_size (cfg, "ats", "WAN_QUOTA_OUT",
345 &atc->total_bps_out); 345 &atc->total_bps_out);
346 GNUNET_CONFIGURATION_get_value_size (cfg, "ats", "WAN_QUOTA_IN", 346 GNUNET_CONFIGURATION_get_value_size (cfg, "ats", "WAN_QUOTA_IN",
347 &atc->total_bps_in); 347 &atc->total_bps_in);
348 return atc; 348 return atc;
349} 349}
350 350
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c
index 9739ac1e5..c9f9a0b38 100644
--- a/src/ats/ats_api_performance.c
+++ b/src/ats/ats_api_performance.c
@@ -307,8 +307,8 @@ process_pi_message (struct GNUNET_ATS_PerformanceHandle *ph,
307 address.address = plugin_address; 307 address.address = plugin_address;
308 address.address_length = plugin_address_length; 308 address.address_length = plugin_address_length;
309 address.transport_name = plugin_name; 309 address.transport_name = plugin_name;
310 ph->infocb (ph->infocb_cls, &address, 310 ph->infocb (ph->infocb_cls, &address, pi->bandwidth_out, pi->bandwidth_in,
311 pi->bandwidth_out, pi->bandwidth_in, atsi, ats_count); 311 atsi, ats_count);
312 return GNUNET_OK; 312 return GNUNET_OK;
313} 313}
314 314
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c
index 89a3bb472..0658e362c 100644
--- a/src/ats/ats_api_scheduling.c
+++ b/src/ats/ats_api_scheduling.c
@@ -287,11 +287,8 @@ find_session (struct GNUNET_ATS_SchedulingHandle *sh, uint32_t session_id,
287 const struct GNUNET_PeerIdentity *peer) 287 const struct GNUNET_PeerIdentity *peer)
288{ 288{
289#if DEBUG_ATS 289#if DEBUG_ATS
290 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 290 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Find session %u from peer %s in %p\n",
291 "Find session %u from peer %s in %p\n", 291 (unsigned int) session_id, GNUNET_i2s (peer), sh);
292 (unsigned int) session_id,
293 GNUNET_i2s (peer),
294 sh);
295#endif 292#endif
296 if (session_id >= sh->session_array_size) 293 if (session_id >= sh->session_array_size)
297 { 294 {
@@ -303,14 +300,14 @@ find_session (struct GNUNET_ATS_SchedulingHandle *sh, uint32_t session_id,
303 if (sh->session_array[session_id].session == NULL) 300 if (sh->session_array[session_id].session == NULL)
304 { 301 {
305 GNUNET_break (0 == 302 GNUNET_break (0 ==
306 memcmp (peer, &sh->session_array[session_id].peer, 303 memcmp (peer, &sh->session_array[session_id].peer,
307 sizeof (struct GNUNET_PeerIdentity))); 304 sizeof (struct GNUNET_PeerIdentity)));
308 return NULL; 305 return NULL;
309 } 306 }
310 307
311 if (0 != 308 if (0 !=
312 memcmp (peer, &sh->session_array[session_id].peer, 309 memcmp (peer, &sh->session_array[session_id].peer,
313 sizeof (struct GNUNET_PeerIdentity))) 310 sizeof (struct GNUNET_PeerIdentity)))
314 { 311 {
315 GNUNET_break (0); 312 GNUNET_break (0);
316 sh->reconnect = GNUNET_YES; 313 sh->reconnect = GNUNET_YES;
@@ -338,10 +335,8 @@ get_session_id (struct GNUNET_ATS_SchedulingHandle *sh, struct Session *session,
338 335
339#if DEBUG_ATS 336#if DEBUG_ATS
340 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 337 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
341 "Get session ID for session %p from peer %s in %p\n", 338 "Get session ID for session %p from peer %s in %p\n", session,
342 session, 339 GNUNET_i2s (peer), sh);
343 GNUNET_i2s (peer),
344 sh);
345#endif 340#endif
346 if (NULL == session) 341 if (NULL == session)
347 return 0; 342 return 0;
@@ -350,8 +345,9 @@ get_session_id (struct GNUNET_ATS_SchedulingHandle *sh, struct Session *session,
350 { 345 {
351 if (session == sh->session_array[i].session) 346 if (session == sh->session_array[i].session)
352 { 347 {
353 GNUNET_assert (0 == memcmp (peer, &sh->session_array[i].peer, 348 GNUNET_assert (0 ==
354 sizeof (struct GNUNET_PeerIdentity))); 349 memcmp (peer, &sh->session_array[i].peer,
350 sizeof (struct GNUNET_PeerIdentity)));
355 return i; 351 return i;
356 } 352 }
357 if ((f == 0) && (sh->session_array[i].slot_used == GNUNET_NO)) 353 if ((f == 0) && (sh->session_array[i].slot_used == GNUNET_NO))
@@ -369,11 +365,8 @@ get_session_id (struct GNUNET_ATS_SchedulingHandle *sh, struct Session *session,
369 sh->session_array[f].slot_used = GNUNET_YES; 365 sh->session_array[f].slot_used = GNUNET_YES;
370#if DEBUG_ATS 366#if DEBUG_ATS
371 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 367 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
372 "Assigning session ID %u for session %p of peer %s in %p\n", 368 "Assigning session ID %u for session %p of peer %s in %p\n", f,
373 f, 369 session, GNUNET_i2s (peer), sh);
374 session,
375 GNUNET_i2s (peer),
376 sh);
377#endif 370#endif
378 return f; 371 return f;
379} 372}
@@ -393,16 +386,15 @@ remove_session (struct GNUNET_ATS_SchedulingHandle *sh, uint32_t session_id,
393{ 386{
394#if DEBUG_ATS 387#if DEBUG_ATS
395 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 388 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
396 "Remove sessionID %u from peer %s in %p\n", 389 "Remove sessionID %u from peer %s in %p\n",
397 (unsigned int) session_id, 390 (unsigned int) session_id, GNUNET_i2s (peer), sh);
398 GNUNET_i2s (peer),
399 sh);
400#endif 391#endif
401 if (0 == session_id) 392 if (0 == session_id)
402 return; 393 return;
403 GNUNET_assert (session_id < sh->session_array_size); 394 GNUNET_assert (session_id < sh->session_array_size);
404 GNUNET_assert (GNUNET_YES == sh->session_array[session_id].slot_used); 395 GNUNET_assert (GNUNET_YES == sh->session_array[session_id].slot_used);
405 GNUNET_assert (0 == memcmp (peer, &sh->session_array[session_id].peer, 396 GNUNET_assert (0 ==
397 memcmp (peer, &sh->session_array[session_id].peer,
406 sizeof (struct GNUNET_PeerIdentity))); 398 sizeof (struct GNUNET_PeerIdentity)));
407 sh->session_array[session_id].session = NULL; 399 sh->session_array[session_id].session = NULL;
408} 400}
@@ -422,10 +414,8 @@ release_session (struct GNUNET_ATS_SchedulingHandle *sh, uint32_t session_id,
422{ 414{
423#if DEBUG_ATS 415#if DEBUG_ATS
424 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 416 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
425 "Release sessionID %u from peer %s in %p\n", 417 "Release sessionID %u from peer %s in %p\n",
426 (unsigned int) session_id, 418 (unsigned int) session_id, GNUNET_i2s (peer), sh);
427 GNUNET_i2s (peer),
428 sh);
429#endif 419#endif
430 if (session_id >= sh->session_array_size) 420 if (session_id >= sh->session_array_size)
431 { 421 {
@@ -437,7 +427,8 @@ release_session (struct GNUNET_ATS_SchedulingHandle *sh, uint32_t session_id,
437 /* this slot should have been removed from remove_session before */ 427 /* this slot should have been removed from remove_session before */
438 GNUNET_assert (sh->session_array[session_id].session == NULL); 428 GNUNET_assert (sh->session_array[session_id].session == NULL);
439 429
440 if (0 != memcmp (peer, &sh->session_array[session_id].peer, 430 if (0 !=
431 memcmp (peer, &sh->session_array[session_id].peer,
441 sizeof (struct GNUNET_PeerIdentity))) 432 sizeof (struct GNUNET_PeerIdentity)))
442 { 433 {
443 GNUNET_break (0); 434 GNUNET_break (0);
@@ -477,7 +468,7 @@ process_ats_message (void *cls, const struct GNUNET_MessageHeader *msg)
477 uint16_t plugin_name_length; 468 uint16_t plugin_name_length;
478 uint32_t ats_count; 469 uint32_t ats_count;
479 struct GNUNET_HELLO_Address address; 470 struct GNUNET_HELLO_Address address;
480 struct Session * s; 471 struct Session *s;
481 472
482 if (NULL == msg) 473 if (NULL == msg)
483 { 474 {
@@ -519,7 +510,7 @@ process_ats_message (void *cls, const struct GNUNET_MessageHeader *msg)
519 force_reconnect (sh); 510 force_reconnect (sh);
520 return; 511 return;
521 } 512 }
522 uint32_t session_id = ntohl (m->session_id); 513 uint32_t session_id = ntohl (m->session_id);
523 514
524 if (session_id == 0) 515 if (session_id == 0)
525 s = NULL; 516 s = NULL;
@@ -529,9 +520,9 @@ process_ats_message (void *cls, const struct GNUNET_MessageHeader *msg)
529 if (s == NULL) 520 if (s == NULL)
530 { 521 {
531#if DEBUG_ATS 522#if DEBUG_ATS
532 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 523 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
533 "ATS tries to use outdated session `%s'\n", 524 "ATS tries to use outdated session `%s'\n",
534 GNUNET_i2s(&m->peer)); 525 GNUNET_i2s (&m->peer));
535#endif 526#endif
536 GNUNET_CLIENT_receive (sh->client, &process_ats_message, sh, 527 GNUNET_CLIENT_receive (sh->client, &process_ats_message, sh,
537 GNUNET_TIME_UNIT_FOREVER_REL); 528 GNUNET_TIME_UNIT_FOREVER_REL);
@@ -545,9 +536,10 @@ process_ats_message (void *cls, const struct GNUNET_MessageHeader *msg)
545 536
546 if ((s == NULL) && (0 == address.address_length)) 537 if ((s == NULL) && (0 == address.address_length))
547 { 538 {
548 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 539 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
549 "ATS returned invalid address for peer `%s' transport `%s' address length %i, session_id %i\n", 540 "ATS returned invalid address for peer `%s' transport `%s' address length %i, session_id %i\n",
550 GNUNET_i2s(&address.peer) , address.transport_name, plugin_address_length, session_id); 541 GNUNET_i2s (&address.peer), address.transport_name,
542 plugin_address_length, session_id);
551 GNUNET_break_op (0); 543 GNUNET_break_op (0);
552 GNUNET_CLIENT_receive (sh->client, &process_ats_message, sh, 544 GNUNET_CLIENT_receive (sh->client, &process_ats_message, sh,
553 GNUNET_TIME_UNIT_FOREVER_REL); 545 GNUNET_TIME_UNIT_FOREVER_REL);
@@ -731,7 +723,9 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
731 size_t namelen; 723 size_t namelen;
732 size_t msize; 724 size_t msize;
733 725
734 namelen = (address->transport_name == NULL) ? 0 : strlen (address->transport_name) + 1; 726 namelen =
727 (address->transport_name ==
728 NULL) ? 0 : strlen (address->transport_name) + 1;
735 msize = 729 msize =
736 sizeof (struct AddressUpdateMessage) + address->address_length + 730 sizeof (struct AddressUpdateMessage) + address->address_length +
737 ats_count * sizeof (struct GNUNET_ATS_Information) + namelen; 731 ats_count * sizeof (struct GNUNET_ATS_Information) + namelen;
@@ -778,8 +772,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
778void 772void
779GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh, 773GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh,
780 const struct GNUNET_HELLO_Address *address, 774 const struct GNUNET_HELLO_Address *address,
781 struct Session *session, 775 struct Session *session, int in_use)
782 int in_use)
783{ 776{
784 struct PendingMessage *p; 777 struct PendingMessage *p;
785 struct AddressUseMessage *m; 778 struct AddressUseMessage *m;
@@ -788,7 +781,9 @@ GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh,
788 size_t msize; 781 size_t msize;
789 782
790 GNUNET_assert (NULL != address); 783 GNUNET_assert (NULL != address);
791 namelen = (address->transport_name == NULL) ? 0 : strlen (address->transport_name) + 1; 784 namelen =
785 (address->transport_name ==
786 NULL) ? 0 : strlen (address->transport_name) + 1;
792 msize = sizeof (struct AddressUseMessage) + address->address_length + namelen; 787 msize = sizeof (struct AddressUseMessage) + address->address_length + namelen;
793 if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || 788 if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
794 (address->address_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || 789 (address->address_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
@@ -839,7 +834,9 @@ GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh,
839 GNUNET_assert (address->transport_name != NULL); 834 GNUNET_assert (address->transport_name != NULL);
840 namelen = strlen (address->transport_name) + 1; 835 namelen = strlen (address->transport_name) + 1;
841 GNUNET_assert (namelen > 1); 836 GNUNET_assert (namelen > 1);
842 msize = sizeof (struct AddressDestroyedMessage) + address->address_length + namelen; 837 msize =
838 sizeof (struct AddressDestroyedMessage) + address->address_length +
839 namelen;
843 if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || 840 if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
844 (address->address_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || 841 (address->address_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) ||
845 (namelen >= GNUNET_SERVER_MAX_MESSAGE_SIZE)) 842 (namelen >= GNUNET_SERVER_MAX_MESSAGE_SIZE))
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index 04eacbbb1..e9f7539be 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -305,26 +305,22 @@ destroy_by_session_id (void *cls, const GNUNET_HashCode * key, void *value)
305 const struct ATS_Address *info = cls; 305 const struct ATS_Address *info = cls;
306 struct ATS_Address *aa = value; 306 struct ATS_Address *aa = value;
307 307
308 GNUNET_assert (0 == memcmp (&aa->peer, 308 GNUNET_assert (0 ==
309 &info->peer, 309 memcmp (&aa->peer, &info->peer,
310 sizeof (struct GNUNET_PeerIdentity))); 310 sizeof (struct GNUNET_PeerIdentity)));
311 if ( (info->session_id == 0) && 311 if ((info->session_id == 0) && (0 == strcmp (info->plugin, aa->plugin)) &&
312 (0 == strcmp (info->plugin, 312 (aa->addr_len == info->addr_len) &&
313 aa->plugin)) && 313 (0 == memcmp (info->addr, aa->addr, aa->addr_len)))
314 (aa->addr_len == info->addr_len) &&
315 (0 == memcmp (info->addr,
316 aa->addr,
317 aa->addr_len)) )
318 { 314 {
319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 315 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
320 "Deleting address for peer `%s': `%s'\n", 316 "Deleting address for peer `%s': `%s'\n",
321 GNUNET_i2s (&aa->peer), aa->plugin); 317 GNUNET_i2s (&aa->peer), aa->plugin);
322 if (GNUNET_YES == destroy_address (aa)) 318 if (GNUNET_YES == destroy_address (aa))
323 recalculate_assigned_bw (); 319 recalculate_assigned_bw ();
324 return GNUNET_OK; 320 return GNUNET_OK;
325 } 321 }
326 if (aa->session_id != info->session_id) 322 if (aa->session_id != info->session_id)
327 return GNUNET_OK; /* irrelevant */ 323 return GNUNET_OK; /* irrelevant */
328 if (aa->session_id != 0) 324 if (aa->session_id != 0)
329 GNUNET_break (0 == strcmp (info->plugin, aa->plugin)); 325 GNUNET_break (0 == strcmp (info->plugin, aa->plugin));
330 /* session died */ 326 /* session died */
@@ -358,10 +354,8 @@ GAS_addresses_destroy (const struct GNUNET_PeerIdentity *peer,
358 aa.addr = plugin_addr; 354 aa.addr = plugin_addr;
359 aa.plugin = (char *) plugin_name; 355 aa.plugin = (char *) plugin_name;
360 aa.session_id = session_id; 356 aa.session_id = session_id;
361 GNUNET_CONTAINER_multihashmap_get_multiple (addresses, 357 GNUNET_CONTAINER_multihashmap_get_multiple (addresses, &peer->hashPubKey,
362 &peer->hashPubKey, 358 &destroy_by_session_id, &aa);
363 &destroy_by_session_id,
364 &aa);
365} 359}
366 360
367 361
@@ -414,12 +408,11 @@ find_address_it (void *cls, const GNUNET_HashCode * key, void *value)
414void 408void
415GAS_addresses_in_use (const struct GNUNET_PeerIdentity *peer, 409GAS_addresses_in_use (const struct GNUNET_PeerIdentity *peer,
416 const char *plugin_name, const void *plugin_addr, 410 const char *plugin_name, const void *plugin_addr,
417 size_t plugin_addr_len, uint32_t session_id, 411 size_t plugin_addr_len, uint32_t session_id, int in_use)
418 int in_use)
419{ 412{
420 413
421 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message for peer `%s': %i\n", 414 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
422 "ADDRESS_IN_USE", 415 "Received `%s' message for peer `%s': %i\n", "ADDRESS_IN_USE",
423 GNUNET_i2s (peer), in_use); 416 GNUNET_i2s (peer), in_use);
424} 417}
425 418
@@ -476,12 +469,12 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
476{ 469{
477 GNUNET_assert (GNUNET_OK == 470 GNUNET_assert (GNUNET_OK ==
478 GNUNET_CONFIGURATION_get_value_size (cfg, "ats", 471 GNUNET_CONFIGURATION_get_value_size (cfg, "ats",
479 "WAN_QUOTA_IN", 472 "WAN_QUOTA_IN",
480 &wan_quota_in)); 473 &wan_quota_in));
481 GNUNET_assert (GNUNET_OK == 474 GNUNET_assert (GNUNET_OK ==
482 GNUNET_CONFIGURATION_get_value_size (cfg, "ats", 475 GNUNET_CONFIGURATION_get_value_size (cfg, "ats",
483 "WAN_QUOTA_OUT", 476 "WAN_QUOTA_OUT",
484 &wan_quota_out)); 477 &wan_quota_out));
485 addresses = GNUNET_CONTAINER_multihashmap_create (128); 478 addresses = GNUNET_CONTAINER_multihashmap_create (128);
486} 479}
487 480
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h
index 95f267bf9..75c220017 100644
--- a/src/ats/gnunet-service-ats_addresses.h
+++ b/src/ats/gnunet-service-ats_addresses.h
@@ -52,8 +52,7 @@ GAS_addresses_done (void);
52void 52void
53GAS_addresses_in_use (const struct GNUNET_PeerIdentity *peer, 53GAS_addresses_in_use (const struct GNUNET_PeerIdentity *peer,
54 const char *plugin_name, const void *plugin_addr, 54 const char *plugin_name, const void *plugin_addr,
55 size_t plugin_addr_len, uint32_t session_id, 55 size_t plugin_addr_len, uint32_t session_id, int in_use);
56 int in_use);
57 56
58void 57void
59GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, 58GAS_addresses_update (const struct GNUNET_PeerIdentity *peer,
diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c
index 4659a2363..f5e286a64 100644
--- a/src/ats/gnunet-service-ats_scheduling.c
+++ b/src/ats/gnunet-service-ats_scheduling.c
@@ -142,8 +142,10 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity
142 memcpy (addrp, plugin_addr, plugin_addr_len); 142 memcpy (addrp, plugin_addr, plugin_addr_len);
143 strcpy (&addrp[plugin_addr_len], plugin_name); 143 strcpy (&addrp[plugin_addr_len], plugin_name);
144 144
145 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS sends quota for peer `%s': (in/out) %u/%u\n", 145 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
146 GNUNET_i2s (peer), ntohl (bandwidth_in.value__), ntohl(bandwidth_out.value__)); 146 "ATS sends quota for peer `%s': (in/out) %u/%u\n",
147 GNUNET_i2s (peer), ntohl (bandwidth_in.value__),
148 ntohl (bandwidth_out.value__));
147 149
148 GNUNET_SERVER_notification_context_unicast (nc, my_client, &msg->header, 150 GNUNET_SERVER_notification_context_unicast (nc, my_client, &msg->header,
149 GNUNET_YES); 151 GNUNET_YES);
@@ -182,8 +184,9 @@ GAS_handle_request_address (void *cls, struct GNUNET_SERVER_Client *client,
182 * @param message the request message 184 * @param message the request message
183 */ 185 */
184void 186void
185GAS_handle_request_address_cancel (void *cls, struct GNUNET_SERVER_Client *client, 187GAS_handle_request_address_cancel (void *cls,
186 const struct GNUNET_MessageHeader *message) 188 struct GNUNET_SERVER_Client *client,
189 const struct GNUNET_MessageHeader *message)
187{ 190{
188 const struct RequestAddressMessage *msg = 191 const struct RequestAddressMessage *msg =
189 (const struct RequestAddressMessage *) message; 192 (const struct RequestAddressMessage *) message;
@@ -304,12 +307,8 @@ GAS_handle_address_in_use (void *cls, struct GNUNET_SERVER_Client *client,
304 } 307 }
305 308
306 in_use = ntohs (m->in_use); 309 in_use = ntohs (m->in_use);
307 GAS_addresses_in_use (&m->peer, 310 GAS_addresses_in_use (&m->peer, plugin_name, address, address_length,
308 plugin_name, 311 ntohl (m->session_id), in_use);
309 address,
310 address_length,
311 ntohl (m->session_id),
312 in_use);
313 312
314 GNUNET_SERVER_receive_done (client, GNUNET_OK); 313 GNUNET_SERVER_receive_done (client, GNUNET_OK);
315} 314}
@@ -359,8 +358,8 @@ GAS_handle_address_destroyed (void *cls, struct GNUNET_SERVER_Client *client,
359 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 358 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
360 return; 359 return;
361 } 360 }
362 if ( (plugin_name_length == 0) || 361 if ((plugin_name_length == 0) ||
363 (plugin_name[plugin_name_length - 1] != '\0')) 362 (plugin_name[plugin_name_length - 1] != '\0'))
364 { 363 {
365 GNUNET_break (0); 364 GNUNET_break (0);
366 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 365 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
diff --git a/src/ats/gnunet-service-ats_scheduling.h b/src/ats/gnunet-service-ats_scheduling.h
index cb4e5e08e..45fca2f3d 100644
--- a/src/ats/gnunet-service-ats_scheduling.h
+++ b/src/ats/gnunet-service-ats_scheduling.h
@@ -98,8 +98,9 @@ GAS_handle_request_address (void *cls, struct GNUNET_SERVER_Client *client,
98 * @param message the request message 98 * @param message the request message
99 */ 99 */
100void 100void
101GAS_handle_request_address_cancel (void *cls, struct GNUNET_SERVER_Client *client, 101GAS_handle_request_address_cancel (void *cls,
102 const struct GNUNET_MessageHeader *message); 102 struct GNUNET_SERVER_Client *client,
103 const struct GNUNET_MessageHeader *message);
103 104
104/** 105/**
105 * Handle 'address update' messages from clients. 106 * Handle 'address update' messages from clients.
diff --git a/src/ats/test_ats_api_scheduling.c b/src/ats/test_ats_api_scheduling.c
index bf11aef8d..fdff3e36d 100644
--- a/src/ats/test_ats_api_scheduling.c
+++ b/src/ats/test_ats_api_scheduling.c
@@ -118,8 +118,7 @@ end ()
118 118
119 119
120static void 120static void
121address_suggest_cb (void *cls, 121address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
122 const struct GNUNET_HELLO_Address *address,
123 struct Session *session, 122 struct Session *session,
124 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 123 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
125 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 124 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
@@ -130,10 +129,13 @@ address_suggest_cb (void *cls,
130 GNUNET_i2s (&address->peer)); 129 GNUNET_i2s (&address->peer));
131 130
132 GNUNET_assert (0 == 131 GNUNET_assert (0 ==
133 memcmp (&address->peer, &p[0].id, sizeof (struct GNUNET_PeerIdentity))); 132 memcmp (&address->peer, &p[0].id,
133 sizeof (struct GNUNET_PeerIdentity)));
134 GNUNET_assert (0 == strcmp (address->transport_name, addr[0].plugin)); 134 GNUNET_assert (0 == strcmp (address->transport_name, addr[0].plugin));
135 GNUNET_assert (address->address_length == addr[0].addr_len); 135 GNUNET_assert (address->address_length == addr[0].addr_len);
136 GNUNET_assert (0 == memcmp (address->address, addr[0].plugin, address->address_length)); 136 GNUNET_assert (0 ==
137 memcmp (address->address, addr[0].plugin,
138 address->address_length));
137 GNUNET_assert (addr[0].session == session); 139 GNUNET_assert (addr[0].session == session);
138 140
139 141
@@ -224,7 +226,7 @@ check (void *cls, char *const *args, const char *cfgfile,
224 GNUNET_ATS_address_update (ats, &address0, addr[0].session, atsi, 2); 226 GNUNET_ATS_address_update (ats, &address0, addr[0].session, atsi, 2);
225 227
226 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Testing manual address deletion \n"); 228 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Testing manual address deletion \n");
227 address0.peer = p[1].id; // FIXME: why? typo in old code? 229 address0.peer = p[1].id; // FIXME: why? typo in old code?
228 GNUNET_ATS_address_update (ats, &address0, addr[0].session, NULL, 0); 230 GNUNET_ATS_address_update (ats, &address0, addr[0].session, NULL, 0);
229 GNUNET_ATS_address_destroyed (ats, &address0, addr[0].session); 231 GNUNET_ATS_address_destroyed (ats, &address0, addr[0].session);
230 232
diff --git a/src/core/core_api.c b/src/core/core_api.c
index a279874d7..281a851e0 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -1424,8 +1424,8 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
1424 } 1424 }
1425 1425
1426 /* Order entries by deadline, but SKIP 'HEAD' (as we may have transmitted 1426 /* Order entries by deadline, but SKIP 'HEAD' (as we may have transmitted
1427 that request already or might even already be approved to transmit that 1427 * that request already or might even already be approved to transmit that
1428 message to core) */ 1428 * message to core) */
1429 pos = pr->pending_head; 1429 pos = pr->pending_head;
1430 if (pos != NULL) 1430 if (pos != NULL)
1431 pos = pos->next; /* skip head */ 1431 pos = pos->next; /* skip head */
diff --git a/src/core/gnunet-core-list-connections.c b/src/core/gnunet-core-list-connections.c
index e0d95d0f8..c93f50981 100644
--- a/src/core/gnunet-core-list-connections.c
+++ b/src/core/gnunet-core-list-connections.c
@@ -98,11 +98,11 @@ dump_pc (struct PrintContext *pc)
98 * @param address NULL on error, otherwise 0-terminated printable UTF-8 string 98 * @param address NULL on error, otherwise 0-terminated printable UTF-8 string
99 */ 99 */
100static void 100static void
101process_resolved_address (void *cls, 101process_resolved_address (void *cls, const struct GNUNET_PeerIdentity *peer,
102 const struct GNUNET_PeerIdentity *peer, 102 const struct GNUNET_HELLO_Address *address)
103 const struct GNUNET_HELLO_Address *address)
104{ 103{
105 struct PrintContext *pc = cls; 104 struct PrintContext *pc = cls;
105
106// struct AddressStringList *new_address; 106// struct AddressStringList *new_address;
107 107
108 if (address == NULL) 108 if (address == NULL)
@@ -111,16 +111,16 @@ process_resolved_address (void *cls,
111 return; 111 return;
112 } 112 }
113 113
114 /* This does exactly the same as gnunet-transport -i !*/ 114 /* This does exactly the same as gnunet-transport -i ! */
115 /* 115 /*
116 new_address = GNUNET_malloc (sizeof (struct AddressStringList)); 116 * new_address = GNUNET_malloc (sizeof (struct AddressStringList));
117#if VERBOSE 117 * #if VERBOSE
118 fprintf (stderr, "Received address %s\n", address); 118 * fprintf (stderr, "Received address %s\n", address);
119#endif 119 * #endif
120 120 *
121 new_address->address_string = GNUNET_strdup ("FIXME"); 121 * new_address->address_string = GNUNET_strdup ("FIXME");
122 GNUNET_CONTAINER_DLL_insert (pc->address_list_head, pc->address_list_tail, 122 * GNUNET_CONTAINER_DLL_insert (pc->address_list_head, pc->address_list_tail,
123 new_address); 123 * new_address);
124 */ 124 */
125} 125}
126 126
@@ -143,12 +143,9 @@ connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
143#endif 143#endif
144 pc = GNUNET_malloc (sizeof (struct PrintContext)); 144 pc = GNUNET_malloc (sizeof (struct PrintContext));
145 pc->peer = *peer; 145 pc->peer = *peer;
146 GNUNET_TRANSPORT_peer_get_active_addresses (cfg, 146 GNUNET_TRANSPORT_peer_get_active_addresses (cfg, peer, GNUNET_YES,
147 peer,
148 GNUNET_YES,
149 GNUNET_TIME_UNIT_MINUTES, 147 GNUNET_TIME_UNIT_MINUTES,
150 &process_resolved_address, 148 &process_resolved_address, pc);
151 pc);
152 } 149 }
153#if VERBOSE 150#if VERBOSE
154 else 151 else
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c
index 5448d5d0f..4098b45b1 100644
--- a/src/core/gnunet-service-core_clients.c
+++ b/src/core/gnunet-service-core_clients.c
@@ -343,13 +343,14 @@ handle_client_send_request (void *cls, struct GNUNET_SERVER_Client *client,
343 "Client asked for transmission to `%s'\n", 343 "Client asked for transmission to `%s'\n",
344 GNUNET_i2s (&req->peer)); 344 GNUNET_i2s (&req->peer));
345#endif 345#endif
346 is_loopback = (0 == 346 is_loopback =
347 memcmp (&req->peer, &GSC_my_identity, 347 (0 ==
348 sizeof (struct GNUNET_PeerIdentity))); 348 memcmp (&req->peer, &GSC_my_identity,
349 if ( (! is_loopback) && 349 sizeof (struct GNUNET_PeerIdentity)));
350 (GNUNET_YES != 350 if ((!is_loopback) &&
351 GNUNET_CONTAINER_multihashmap_contains (c->connectmap, 351 (GNUNET_YES !=
352 &req->peer.hashPubKey)) ) 352 GNUNET_CONTAINER_multihashmap_contains (c->connectmap,
353 &req->peer.hashPubKey)))
353 { 354 {
354 /* neighbour must have disconnected since request was issued, 355 /* neighbour must have disconnected since request was issued,
355 * ignore (client will realize it once it processes the 356 * ignore (client will realize it once it processes the
@@ -390,8 +391,8 @@ handle_client_send_request (void *cls, struct GNUNET_SERVER_Client *client,
390 GSC_CLIENTS_solicit_request (car); 391 GSC_CLIENTS_solicit_request (car);
391 GNUNET_SERVER_receive_done (client, GNUNET_OK); 392 GNUNET_SERVER_receive_done (client, GNUNET_OK);
392 return; 393 return;
393 } 394 }
394 GSC_SESSIONS_queue_request (car); 395 GSC_SESSIONS_queue_request (car);
395 GNUNET_SERVER_receive_done (client, GNUNET_OK); 396 GNUNET_SERVER_receive_done (client, GNUNET_OK);
396} 397}
397 398
@@ -610,13 +611,12 @@ GSC_CLIENTS_solicit_request (struct GSC_ClientActiveRequest *car)
610 c = car->client_handle; 611 c = car->client_handle;
611 if (GNUNET_YES != 612 if (GNUNET_YES !=
612 GNUNET_CONTAINER_multihashmap_contains (c->connectmap, 613 GNUNET_CONTAINER_multihashmap_contains (c->connectmap,
613 &car-> 614 &car->target.hashPubKey))
614 target.hashPubKey))
615 { 615 {
616 /* connection has gone down since, drop request */ 616 /* connection has gone down since, drop request */
617 GNUNET_assert (0 != 617 GNUNET_assert (0 !=
618 memcmp (&car->target, &GSC_my_identity, 618 memcmp (&car->target, &GSC_my_identity,
619 sizeof (struct GNUNET_PeerIdentity))); 619 sizeof (struct GNUNET_PeerIdentity)));
620 GSC_SESSIONS_dequeue_request (car); 620 GSC_SESSIONS_dequeue_request (car);
621 GSC_CLIENTS_reject_request (car); 621 GSC_CLIENTS_reject_request (car);
622 return; 622 return;
diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c
index 0e292fbd1..6c696ce84 100644
--- a/src/core/gnunet-service-core_neighbours.c
+++ b/src/core/gnunet-service-core_neighbours.c
@@ -427,10 +427,10 @@ handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
427 break; 427 break;
428 default: 428 default:
429 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 429 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
430 _("Unsupported message of type %u (%u bytes) received from peer `%s'\n"), 430 _
431 (unsigned int) type, 431 ("Unsupported message of type %u (%u bytes) received from peer `%s'\n"),
432 (unsigned int) ntohs (message->size), 432 (unsigned int) type, (unsigned int) ntohs (message->size),
433 GNUNET_i2s (peer)); 433 GNUNET_i2s (peer));
434 return; 434 return;
435 } 435 }
436} 436}
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c
index 219272809..1f697cf16 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -172,7 +172,7 @@ GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid)
172 struct Session *session; 172 struct Session *session;
173 struct GSC_ClientActiveRequest *car; 173 struct GSC_ClientActiveRequest *car;
174 struct SessionMessageEntry *sme; 174 struct SessionMessageEntry *sme;
175 175
176 session = find_session (pid); 176 session = find_session (pid);
177 if (NULL == session) 177 if (NULL == session)
178 return; 178 return;
@@ -193,9 +193,7 @@ GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid)
193 } 193 }
194 while (NULL != (sme = session->sme_head)) 194 while (NULL != (sme = session->sme_head))
195 { 195 {
196 GNUNET_CONTAINER_DLL_remove (session->sme_head, 196 GNUNET_CONTAINER_DLL_remove (session->sme_head, session->sme_tail, sme);
197 session->sme_tail,
198 sme);
199 GNUNET_free (sme); 197 GNUNET_free (sme);
200 } 198 }
201 GNUNET_SCHEDULER_cancel (session->typemap_task); 199 GNUNET_SCHEDULER_cancel (session->typemap_task);
@@ -347,7 +345,7 @@ GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest *car)
347 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 345 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
348 "Dropped client request for transmission (am disconnected)\n"); 346 "Dropped client request for transmission (am disconnected)\n");
349#endif 347#endif
350 GNUNET_break (0); /* should have been rejected earlier */ 348 GNUNET_break (0); /* should have been rejected earlier */
351 GSC_CLIENTS_reject_request (car); 349 GSC_CLIENTS_reject_request (car);
352 return; 350 return;
353 } 351 }
@@ -438,7 +436,7 @@ solicit_messages (struct Session *session)
438 discard_expired_requests (session); 436 discard_expired_requests (session);
439 so_size = 0; 437 so_size = 0;
440 nxt = session->active_client_request_head; 438 nxt = session->active_client_request_head;
441 while (NULL != (car = nxt) ) 439 while (NULL != (car = nxt))
442 { 440 {
443 nxt = car->next; 441 nxt = car->next;
444 if (so_size + car->msize > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE) 442 if (so_size + car->msize > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE)
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 59305725a..adfa93f1f 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -630,20 +630,20 @@ run (void *cls, char *const *args, const char *cfgfile,
630 GNUNET_assert (test != -1); 630 GNUNET_assert (test != -1);
631 GNUNET_assert (GNUNET_SYSERR != 631 GNUNET_assert (GNUNET_SYSERR !=
632 GNUNET_CONFIGURATION_get_value_size (p1.cfg, "ATS", 632 GNUNET_CONFIGURATION_get_value_size (p1.cfg, "ATS",
633 "WAN_QUOTA_IN", 633 "WAN_QUOTA_IN",
634 &current_quota_p1_in)); 634 &current_quota_p1_in));
635 GNUNET_assert (GNUNET_SYSERR != 635 GNUNET_assert (GNUNET_SYSERR !=
636 GNUNET_CONFIGURATION_get_value_size (p2.cfg, "ATS", 636 GNUNET_CONFIGURATION_get_value_size (p2.cfg, "ATS",
637 "WAN_QUOTA_IN", 637 "WAN_QUOTA_IN",
638 &current_quota_p2_in)); 638 &current_quota_p2_in));
639 GNUNET_assert (GNUNET_SYSERR != 639 GNUNET_assert (GNUNET_SYSERR !=
640 GNUNET_CONFIGURATION_get_value_size (p1.cfg, "ATS", 640 GNUNET_CONFIGURATION_get_value_size (p1.cfg, "ATS",
641 "WAN_QUOTA_OUT", 641 "WAN_QUOTA_OUT",
642 &current_quota_p1_out)); 642 &current_quota_p1_out));
643 GNUNET_assert (GNUNET_SYSERR != 643 GNUNET_assert (GNUNET_SYSERR !=
644 GNUNET_CONFIGURATION_get_value_size (p2.cfg, "ATS", 644 GNUNET_CONFIGURATION_get_value_size (p2.cfg, "ATS",
645 "WAN_QUOTA_OUT", 645 "WAN_QUOTA_OUT",
646 &current_quota_p2_out)); 646 &current_quota_p2_out));
647 647
648 p1.ch = 648 p1.ch =
649 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify, 649 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 5ae9525bd..46004c4f3 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -602,8 +602,7 @@ transmit_request (void *cls, size_t size, void *buf)
602 if (buf == NULL) 602 if (buf == NULL)
603 { 603 {
604#if DEBUG_DATASTORE 604#if DEBUG_DATASTORE
605 LOG (GNUNET_ERROR_TYPE_DEBUG, 605 LOG (GNUNET_ERROR_TYPE_DEBUG, "Failed to transmit request to DATASTORE.\n");
606 "Failed to transmit request to DATASTORE.\n");
607#endif 606#endif
608 GNUNET_STATISTICS_update (h->stats, 607 GNUNET_STATISTICS_update (h->stats,
609 gettext_noop ("# transmission request failures"), 608 gettext_noop ("# transmission request failures"),
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c
index 8de16b363..1a4fbaf13 100644
--- a/src/dht/test_dht_multipeer.c
+++ b/src/dht/test_dht_multipeer.c
@@ -463,7 +463,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
463 } 463 }
464 ok = 1; 464 ok = 1;
465 /* testing_peergroup will do that in its own end_badly() handler */ 465 /* testing_peergroup will do that in its own end_badly() handler */
466 /*GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);*/ 466 /*GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); */
467 pg = NULL; 467 pg = NULL;
468} 468}
469 469
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c
index 569213f72..78200e634 100644
--- a/src/dv/plugin_transport_dv.c
+++ b/src/dv/plugin_transport_dv.c
@@ -160,10 +160,17 @@ handle_dv_message_received (void *cls, struct GNUNET_PeerIdentity *sender,
160 my_id, GNUNET_i2s (sender), 160 my_id, GNUNET_i2s (sender),
161 ntohs (((struct GNUNET_MessageHeader *) msg)->type), 161 ntohs (((struct GNUNET_MessageHeader *) msg)->type),
162 distance); 162 distance);
163 if (sender_address_len == (2 * sizeof(struct GNUNET_PeerIdentity))) 163 if (sender_address_len == (2 * sizeof (struct GNUNET_PeerIdentity)))
164 { 164 {
165 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "plugin_transport_dv", "Parsed sender address: %s:%s\n", GNUNET_i2s((struct GNUNET_PeerIdentity *)sender_address), GNUNET_h2s(&((struct GNUNET_PeerIdentity *)&sender_address[sizeof(struct GNUNET_PeerIdentity)])->hashPubKey)); 165 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "plugin_transport_dv",
166 } 166 "Parsed sender address: %s:%s\n",
167 GNUNET_i2s ((struct GNUNET_PeerIdentity *) sender_address),
168 GNUNET_h2s (&
169 ((struct GNUNET_PeerIdentity *)
170 &sender_address[sizeof
171 (struct
172 GNUNET_PeerIdentity)])->hashPubKey));
173 }
167 174
168 GNUNET_free_non_null (my_id); 175 GNUNET_free_non_null (my_id);
169#endif 176#endif
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c
index 5f40fb522..942ee07c0 100644
--- a/src/dv/test_transport_api_dv.c
+++ b/src/dv/test_transport_api_dv.c
@@ -394,15 +394,16 @@ send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
394 * @return connected transport distance 394 * @return connected transport distance
395 */ 395 */
396static uint32_t 396static uint32_t
397get_atsi_distance (const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count) 397get_atsi_distance (const struct GNUNET_ATS_Information *atsi,
398 unsigned int atsi_count)
398{ 399{
399 unsigned int i; 400 unsigned int i;
400 401
401 for (i = 0; i < atsi_count; i++) 402 for (i = 0; i < atsi_count; i++)
402 { 403 {
403 if (ntohl (atsi->type) == GNUNET_ATS_QUALITY_NET_DISTANCE) 404 if (ntohl (atsi->type) == GNUNET_ATS_QUALITY_NET_DISTANCE)
404 return ntohl (atsi->value); 405 return ntohl (atsi->value);
405 } 406 }
406 407
407 GNUNET_break (0); 408 GNUNET_break (0);
408 /* FIXME: we do not have distance data? Assume direct neighbor. */ 409 /* FIXME: we do not have distance data? Assume direct neighbor. */
@@ -411,8 +412,7 @@ get_atsi_distance (const struct GNUNET_ATS_Information *atsi, unsigned int atsi_
411 412
412 413
413static int 414static int
414process_mtype (void *cls, 415process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
415 const struct GNUNET_PeerIdentity *peer,
416 const struct GNUNET_MessageHeader *message, 416 const struct GNUNET_MessageHeader *message,
417 const struct GNUNET_ATS_Information *atsi, 417 const struct GNUNET_ATS_Information *atsi,
418 unsigned int atsi_count) 418 unsigned int atsi_count)
@@ -464,7 +464,8 @@ process_mtype (void *cls,
464 { 464 {
465 GNUNET_SCHEDULER_cancel (die_task); 465 GNUNET_SCHEDULER_cancel (die_task);
466#if VERBOSE 466#if VERBOSE
467 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Scheduling timeout from DV connections.\n"); 467 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
468 "Scheduling timeout from DV connections.\n");
468#endif 469#endif
469 die_task = 470 die_task =
470 GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly, 471 GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly,
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c
index e5b11f5d9..8fab3fee4 100644
--- a/src/fragmentation/fragmentation.c
+++ b/src/fragmentation/fragmentation.c
@@ -117,7 +117,7 @@ struct GNUNET_FRAGMENT_Context
117 /** 117 /**
118 * Target fragment size. 118 * Target fragment size.
119 */ 119 */
120 uint16_t mtu; 120 uint16_t mtu;
121 121
122}; 122};
123 123
@@ -208,7 +208,8 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
208 fc->num_rounds++; 208 fc->num_rounds++;
209 delay = 209 delay =
210 GNUNET_TIME_relative_max (GNUNET_TIME_relative_multiply (delay, 2), 210 GNUNET_TIME_relative_max (GNUNET_TIME_relative_multiply (delay, 2),
211 GNUNET_TIME_relative_multiply (fc->delay, fc->num_rounds)); 211 GNUNET_TIME_relative_multiply (fc->delay,
212 fc->num_rounds));
212 /* never use zero, need some time for ACK always */ 213 /* never use zero, need some time for ACK always */
213 delay = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, delay); 214 delay = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, delay);
214 fc->last_round = GNUNET_TIME_absolute_get (); 215 fc->last_round = GNUNET_TIME_absolute_get ();
@@ -330,13 +331,13 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
330 if (ntohl (fa->fragment_id) != fc->fragment_id) 331 if (ntohl (fa->fragment_id) != fc->fragment_id)
331 return GNUNET_SYSERR; /* not our ACK */ 332 return GNUNET_SYSERR; /* not our ACK */
332 abits = GNUNET_ntohll (fa->bits); 333 abits = GNUNET_ntohll (fa->bits);
333 if ( (GNUNET_YES == fc->wack) && 334 if ((GNUNET_YES == fc->wack) && (abits == (fc->acks & abits)))
334 (abits == (fc->acks & abits)) )
335 { 335 {
336 /* normal ACK, can update running average of delay... */ 336 /* normal ACK, can update running average of delay... */
337 fc->wack = GNUNET_NO; 337 fc->wack = GNUNET_NO;
338 ndelay = GNUNET_TIME_absolute_get_duration (fc->last_round); 338 ndelay = GNUNET_TIME_absolute_get_duration (fc->last_round);
339 fc->delay.rel_value = (ndelay.rel_value * fc->num_rounds + 3 * fc->delay.rel_value) / 4; 339 fc->delay.rel_value =
340 (ndelay.rel_value * fc->num_rounds + 3 * fc->delay.rel_value) / 4;
340 } 341 }
341 GNUNET_STATISTICS_update (fc->stats, 342 GNUNET_STATISTICS_update (fc->stats,
342 _("# fragment acknowledgements received"), 1, 343 _("# fragment acknowledgements received"), 1,
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index ce4b3b887..ab351a209 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -2464,7 +2464,7 @@ deserialize_download (struct GNUNET_FS_Handle *h,
2464 } 2464 }
2465 if (parent != NULL) 2465 if (parent != NULL)
2466 { 2466 {
2467 GNUNET_abort (); // for debugging for now - FIXME 2467 GNUNET_abort (); // for debugging for now - FIXME
2468 GNUNET_CONTAINER_DLL_insert (parent->child_head, parent->child_tail, dc); 2468 GNUNET_CONTAINER_DLL_insert (parent->child_head, parent->child_tail, dc);
2469 } 2469 }
2470 if (search != NULL) 2470 if (search != NULL)
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index a2346aab9..052bf83d2 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -995,7 +995,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
995 mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt); 995 mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt);
996 if (sc->search_request_map_offset < sqms) 996 if (sc->search_request_map_offset < sqms)
997 GNUNET_assert (mbc.put_cnt > 0); 997 GNUNET_assert (mbc.put_cnt > 0);
998 998
999 sm->header.size = htons (msize); 999 sm->header.size = htons (msize);
1000 sm->type = htonl (GNUNET_BLOCK_TYPE_ANY); 1000 sm->type = htonl (GNUNET_BLOCK_TYPE_ANY);
1001 sm->anonymity_level = htonl (sc->anonymity); 1001 sm->anonymity_level = htonl (sc->anonymity);
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c
index 9025b71da..dc86ce984 100644
--- a/src/fs/gnunet-fs.c
+++ b/src/fs/gnunet-fs.c
@@ -93,7 +93,8 @@ run (void *cls, char *const *args, const char *cfgfile,
93{ 93{
94 if (list_indexed_files) 94 if (list_indexed_files)
95 { 95 {
96 fs = GNUNET_FS_start (cfg, "gnunet-fs", NULL, NULL, GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); 96 fs = GNUNET_FS_start (cfg, "gnunet-fs", NULL, NULL, GNUNET_FS_FLAGS_NONE,
97 GNUNET_FS_OPTIONS_END);
97 if (NULL == fs) 98 if (NULL == fs)
98 { 99 {
99 ret = 1; 100 ret = 1;
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 5923823ef..2a90b538c 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -232,9 +232,9 @@ update_latencies (const struct GNUNET_ATS_Information *atsi,
232 { 232 {
233 if (ntohl (atsi[i].type) == GNUNET_ATS_QUALITY_NET_DELAY) 233 if (ntohl (atsi[i].type) == GNUNET_ATS_QUALITY_NET_DELAY)
234 { 234 {
235 GSF_avg_latency.rel_value = (GSF_avg_latency.rel_value * 31 + 235 GSF_avg_latency.rel_value =
236 GNUNET_MIN (5000, 236 (GSF_avg_latency.rel_value * 31 +
237 ntohl (atsi[i].value))) / 32; 237 GNUNET_MIN (5000, ntohl (atsi[i].value))) / 32;
238 GNUNET_STATISTICS_set (GSF_stats, 238 GNUNET_STATISTICS_set (GSF_stats,
239 gettext_noop 239 gettext_noop
240 ("# running average P2P latency (ms)"), 240 ("# running average P2P latency (ms)"),
@@ -405,8 +405,7 @@ handle_start_search (void *cls, struct GNUNET_SERVER_Client *client,
405 int ret; 405 int ret;
406 406
407 pr = NULL; 407 pr = NULL;
408 ret = GSF_local_client_start_search_handler_ (client, message, 408 ret = GSF_local_client_start_search_handler_ (client, message, &pr);
409 &pr);
410 switch (ret) 409 switch (ret)
411 { 410 {
412 case GNUNET_SYSERR: 411 case GNUNET_SYSERR:
@@ -572,11 +571,10 @@ main_init (struct GNUNET_SERVER_Handle *server,
572 {NULL, NULL, 0, 0} 571 {NULL, NULL, 0, 0}
573 }; 572 };
574 573
575 GSF_core = GNUNET_CORE_connect (GSF_cfg, 1, 574 GSF_core =
576 NULL, &peer_init_handler, 575 GNUNET_CORE_connect (GSF_cfg, 1, NULL, &peer_init_handler,
577 &peer_connect_handler, 576 &peer_connect_handler, &GSF_peer_disconnect_handler_,
578 &GSF_peer_disconnect_handler_, NULL, 577 NULL, GNUNET_NO, NULL, GNUNET_NO, p2p_handlers);
579 GNUNET_NO, NULL, GNUNET_NO, p2p_handlers);
580 if (NULL == GSF_core) 578 if (NULL == GSF_core)
581 { 579 {
582 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 580 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c
index 65dece707..502cef941 100644
--- a/src/fs/gnunet-service-fs_lc.c
+++ b/src/fs/gnunet-service-fs_lc.c
@@ -295,7 +295,7 @@ int
295GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client, 295GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
296 const struct GNUNET_MessageHeader 296 const struct GNUNET_MessageHeader
297 *message, 297 *message,
298 struct GSF_PendingRequest **prptr) 298 struct GSF_PendingRequest **prptr)
299{ 299{
300 static GNUNET_HashCode all_zeros; 300 static GNUNET_HashCode all_zeros;
301 const struct SearchMessage *sm; 301 const struct SearchMessage *sm;
@@ -350,45 +350,45 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
350 { 350 {
351#if DEBUG_FS_CLIENT 351#if DEBUG_FS_CLIENT
352 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 352 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
353 "Have existing request, merging content-seen lists.\n"); 353 "Have existing request, merging content-seen lists.\n");
354#endif 354#endif
355 GSF_pending_request_update_ (cr->pr, (const GNUNET_HashCode *) &sm[1], 355 GSF_pending_request_update_ (cr->pr, (const GNUNET_HashCode *) &sm[1], sc);
356 sc);
357 GNUNET_STATISTICS_update (GSF_stats, 356 GNUNET_STATISTICS_update (GSF_stats,
358 gettext_noop 357 gettext_noop
359 ("# client searches updated (merged content seen list)"), 358 ("# client searches updated (merged content seen list)"),
360 1, GNUNET_NO); 359 1, GNUNET_NO);
361 } 360 }
362 else 361 else
363 { 362 {
364 GNUNET_STATISTICS_update (GSF_stats, 363 GNUNET_STATISTICS_update (GSF_stats,
365 gettext_noop ("# client searches active"), 1, 364 gettext_noop ("# client searches active"), 1,
366 GNUNET_NO); 365 GNUNET_NO);
367 cr = GNUNET_malloc (sizeof (struct ClientRequest)); 366 cr = GNUNET_malloc (sizeof (struct ClientRequest));
368 cr->lc = lc; 367 cr->lc = lc;
369 GNUNET_CONTAINER_DLL_insert (lc->cr_head, lc->cr_tail, cr); 368 GNUNET_CONTAINER_DLL_insert (lc->cr_head, lc->cr_tail, cr);
370 options = GSF_PRO_LOCAL_REQUEST; 369 options = GSF_PRO_LOCAL_REQUEST;
371 if (0 != (SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY & ntohl (sm->options))) 370 if (0 != (SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY & ntohl (sm->options)))
372 options |= GSF_PRO_LOCAL_ONLY; 371 options |= GSF_PRO_LOCAL_ONLY;
373 cr->pr = GSF_pending_request_create_ (options, type, &sm->query, 372 cr->pr = GSF_pending_request_create_ (options, type, &sm->query, (type == GNUNET_BLOCK_TYPE_FS_SBLOCK) ? &sm->target /* namespace */
374 (type == GNUNET_BLOCK_TYPE_FS_SBLOCK) ? &sm->target /* namespace */ 373 : NULL,
375 : NULL, 374 (0 !=
376 (0 != 375 memcmp (&sm->target, &all_zeros,
377 memcmp (&sm->target, &all_zeros, 376 sizeof (GNUNET_HashCode)))
378 sizeof (GNUNET_HashCode))) 377 ? (const struct GNUNET_PeerIdentity *)
379 ? (const struct GNUNET_PeerIdentity *) 378 &sm->target : NULL, NULL, 0,
380 &sm->target : NULL, NULL, 0, 379 0 /* bf */ ,
381 0 /* bf */ , 380 ntohl (sm->anonymity_level),
382 ntohl (sm->anonymity_level), 381 0 /* priority */ ,
383 0 /* priority */ , 382 0 /* ttl */ ,
384 0 /* ttl */ , 383 0 /* sender PID */ ,
385 0 /* sender PID */ , 384 0 /* origin PID */ ,
386 0 /* origin PID */ , 385 (const GNUNET_HashCode *) &sm[1], sc,
387 (const GNUNET_HashCode *) &sm[1], sc, 386 &client_response_handler, cr);
388 &client_response_handler, cr);
389 } 387 }
390 *prptr = cr->pr; 388 *prptr = cr->pr;
391 return (0 != (SEARCH_MESSAGE_OPTION_CONTINUED & ntohl (sm->options))) ? GNUNET_NO : GNUNET_YES; 389 return (0 !=
390 (SEARCH_MESSAGE_OPTION_CONTINUED & ntohl (sm->options))) ? GNUNET_NO :
391 GNUNET_YES;
392} 392}
393 393
394 394
diff --git a/src/fs/gnunet-service-fs_lc.h b/src/fs/gnunet-service-fs_lc.h
index 78b23dc40..3bddb8947 100644
--- a/src/fs/gnunet-service-fs_lc.h
+++ b/src/fs/gnunet-service-fs_lc.h
@@ -57,7 +57,7 @@ int
57GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client, 57GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
58 const struct GNUNET_MessageHeader 58 const struct GNUNET_MessageHeader
59 *message, 59 *message,
60 struct GSF_PendingRequest **prptr); 60 struct GSF_PendingRequest **prptr);
61 61
62 62
63/** 63/**
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c
index 200d7a0e4..0a40065cc 100644
--- a/src/fs/gnunet-service-fs_pe.c
+++ b/src/fs/gnunet-service-fs_pe.c
@@ -265,7 +265,7 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp)
265 gettext_noop ("# average retransmission delay (ms)"), 265 gettext_noop ("# average retransmission delay (ms)"),
266 total_delay * 1000LL / plan_count, GNUNET_NO); 266 total_delay * 1000LL / plan_count, GNUNET_NO);
267 prd = GSF_pending_request_get_data_ (rp->prl_head->pr); 267 prd = GSF_pending_request_get_data_ (rp->prl_head->pr);
268 268
269 if (rp->transmission_counter < 8) 269 if (rp->transmission_counter < 8)
270 delay = 270 delay =
271 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 271 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
@@ -283,30 +283,32 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp)
283 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 283 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
284 delay.rel_value + 1); 284 delay.rel_value + 1);
285 /* Add 0.01 to avg_delay to avoid division-by-zero later */ 285 /* Add 0.01 to avg_delay to avoid division-by-zero later */
286 avg_delay = (((avg_delay * (N-1.0)) + delay.rel_value) / N) + 0.01; 286 avg_delay = (((avg_delay * (N - 1.0)) + delay.rel_value) / N) + 0.01;
287 287
288 /* 288 /*
289 For the priority, we need to consider a few basic rules: 289 * For the priority, we need to consider a few basic rules:
290 1) if we just started requesting (delay is small), we should 290 * 1) if we just started requesting (delay is small), we should
291 virtually always have a priority of zero. 291 * virtually always have a priority of zero.
292 2) for requests with average latency, our priority should match 292 * 2) for requests with average latency, our priority should match
293 the average priority observed on the network 293 * the average priority observed on the network
294 3) even the longest-running requests should not be WAY out of 294 * 3) even the longest-running requests should not be WAY out of
295 the observed average (thus we bound by a factor of 2) 295 * the observed average (thus we bound by a factor of 2)
296 4) we add +1 to the observed average priority to avoid everyone 296 * 4) we add +1 to the observed average priority to avoid everyone
297 staying put at zero (2 * 0 = 0...). 297 * staying put at zero (2 * 0 = 0...).
298 298 *
299 Using the specific calculation below, we get: 299 * Using the specific calculation below, we get:
300 300 *
301 delay = 0 => priority = 0; 301 * delay = 0 => priority = 0;
302 delay = avg delay => priority = running-average-observed-priority; 302 * delay = avg delay => priority = running-average-observed-priority;
303 delay >> avg_delay => priority = 2 * running-average-observed-priority; 303 * delay >> avg_delay => priority = 2 * running-average-observed-priority;
304 304 *
305 which satisfies all of the rules above. 305 * which satisfies all of the rules above.
306 306 *
307 Note: M_PI_4 = PI/4 = arctan(1) 307 * Note: M_PI_4 = PI/4 = arctan(1)
308 */ 308 */
309 rp->priority = round ((GSF_current_priorities + 1.0) * atan (delay.rel_value / avg_delay)) / M_PI_4; 309 rp->priority =
310 round ((GSF_current_priorities +
311 1.0) * atan (delay.rel_value / avg_delay)) / M_PI_4;
310 /* Note: usage of 'round' and 'atan' requires -lm */ 312 /* Note: usage of 'round' and 'atan' requires -lm */
311 313
312 if (rp->transmission_counter != 0) 314 if (rp->transmission_counter != 0)
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index e6add21b9..1bd16c9f1 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -1588,7 +1588,7 @@ GSF_pending_request_init_ ()
1588 } 1588 }
1589 if (GNUNET_OK != 1589 if (GNUNET_OK !=
1590 GNUNET_CONFIGURATION_get_value_size (GSF_cfg, "ats", "WAN_QUOTA_OUT", 1590 GNUNET_CONFIGURATION_get_value_size (GSF_cfg, "ats", "WAN_QUOTA_OUT",
1591 &bps)) 1591 &bps))
1592 { 1592 {
1593 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1593 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1594 _ 1594 _
diff --git a/src/hello/address.c b/src/hello/address.c
index b511ca9df..618aa6e6a 100644
--- a/src/hello/address.c
+++ b/src/hello/address.c
@@ -39,21 +39,20 @@
39 */ 39 */
40struct GNUNET_HELLO_Address * 40struct GNUNET_HELLO_Address *
41GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer, 41GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer,
42 const char *transport_name, 42 const char *transport_name, const void *address,
43 const void *address, 43 size_t address_length)
44 size_t address_length)
45{ 44{
46 struct GNUNET_HELLO_Address *addr; 45 struct GNUNET_HELLO_Address *addr;
47 size_t slen; 46 size_t slen;
48 char *end; 47 char *end;
49 48
50 slen = strlen (transport_name) + 1; 49 slen = strlen (transport_name) + 1;
51 addr = GNUNET_malloc (sizeof (struct GNUNET_HELLO_Address) + 50 addr =
52 address_length + 51 GNUNET_malloc (sizeof (struct GNUNET_HELLO_Address) + address_length +
53 slen); 52 slen);
54 addr->peer = *peer; 53 addr->peer = *peer;
55 addr->address = &addr[1]; 54 addr->address = &addr[1];
56 end = (char*) &addr[1]; 55 end = (char *) &addr[1];
57 memcpy (end, address, address_length); 56 memcpy (end, address, address_length);
58 addr->address_length = address_length; 57 addr->address_length = address_length;
59 addr->transport_name = &end[address_length]; 58 addr->transport_name = &end[address_length];
@@ -69,11 +68,10 @@ GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer,
69 * @return the size 68 * @return the size
70 */ 69 */
71size_t 70size_t
72GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address *address) 71GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address * address)
73{ 72{
74 return sizeof (struct GNUNET_HELLO_Address) + 73 return sizeof (struct GNUNET_HELLO_Address) + address->address_length +
75 address->address_length + 74 strlen (address->transport_name) + 1;
76 strlen(address->transport_name) + 1;
77} 75}
78 76
79 77
@@ -86,10 +84,9 @@ GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address *address)
86struct GNUNET_HELLO_Address * 84struct GNUNET_HELLO_Address *
87GNUNET_HELLO_address_copy (const struct GNUNET_HELLO_Address *address) 85GNUNET_HELLO_address_copy (const struct GNUNET_HELLO_Address *address)
88{ 86{
89 return GNUNET_HELLO_address_allocate (&address->peer, 87 return GNUNET_HELLO_address_allocate (&address->peer, address->transport_name,
90 address->transport_name, 88 address->address,
91 address->address, 89 address->address_length);
92 address->address_length);
93} 90}
94 91
95 92
@@ -103,21 +100,18 @@ GNUNET_HELLO_address_copy (const struct GNUNET_HELLO_Address *address)
103 */ 100 */
104int 101int
105GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1, 102GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1,
106 const struct GNUNET_HELLO_Address *a2) 103 const struct GNUNET_HELLO_Address *a2)
107{ 104{
108 int ret; 105 int ret;
109 106
110 ret = strcmp (a1->transport_name, 107 ret = strcmp (a1->transport_name, a2->transport_name);
111 a2->transport_name);
112 if (0 != ret) 108 if (0 != ret)
113 return ret; 109 return ret;
114 if (a1->address_length < a2->address_length) 110 if (a1->address_length < a2->address_length)
115 return -1; 111 return -1;
116 if (a1->address_length > a2->address_length) 112 if (a1->address_length > a2->address_length)
117 return 1; 113 return 1;
118 return memcmp (a1->address, 114 return memcmp (a1->address, a1->address, a1->address_length);
119 a1->address,
120 a1->address_length);
121} 115}
122 116
123 117
diff --git a/src/hello/hello.c b/src/hello/hello.c
index 9c0c3d4ac..f7d34233c 100644
--- a/src/hello/hello.c
+++ b/src/hello/hello.c
@@ -74,8 +74,7 @@ struct GNUNET_HELLO_Message
74 */ 74 */
75size_t 75size_t
76GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address, 76GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address,
77 struct GNUNET_TIME_Absolute expiration, 77 struct GNUNET_TIME_Absolute expiration, char *target,
78 char *target,
79 size_t max) 78 size_t max)
80{ 79{
81 uint16_t alen; 80 uint16_t alen;
@@ -232,8 +231,8 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
232 wpos = 0; 231 wpos = 0;
233 woff = (ret != NULL) ? (char *) &ret[1] : NULL; 232 woff = (ret != NULL) ? (char *) &ret[1] : NULL;
234 GNUNET_CRYPTO_hash (&msg->publicKey, 233 GNUNET_CRYPTO_hash (&msg->publicKey,
235 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 234 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
236 &address.peer.hashPubKey); 235 &address.peer.hashPubKey);
237 while (insize > 0) 236 while (insize > 0)
238 { 237 {
239 esize = get_hello_address_size (inptr, insize, &alen); 238 esize = get_hello_address_size (inptr, insize, &alen);
@@ -280,14 +279,12 @@ struct ExpireContext
280 279
281 280
282static int 281static int
283get_match_exp (void *cls, 282get_match_exp (void *cls, const struct GNUNET_HELLO_Address *address,
284 const struct GNUNET_HELLO_Address *address,
285 struct GNUNET_TIME_Absolute expiration) 283 struct GNUNET_TIME_Absolute expiration)
286{ 284{
287 struct ExpireContext *ec = cls; 285 struct ExpireContext *ec = cls;
288 286
289 if (0 == GNUNET_HELLO_address_cmp (address, 287 if (0 == GNUNET_HELLO_address_cmp (address, ec->address))
290 ec->address))
291 { 288 {
292 ec->found = GNUNET_YES; 289 ec->found = GNUNET_YES;
293 ec->expiration = expiration; 290 ec->expiration = expiration;
@@ -311,8 +308,7 @@ struct MergeContext
311 308
312 309
313static int 310static int
314copy_latest (void *cls, 311copy_latest (void *cls, const struct GNUNET_HELLO_Address *address,
315 const struct GNUNET_HELLO_Address *address,
316 struct GNUNET_TIME_Absolute expiration) 312 struct GNUNET_TIME_Absolute expiration)
317{ 313{
318 struct MergeContext *mc = cls; 314 struct MergeContext *mc = cls;
@@ -327,9 +323,8 @@ copy_latest (void *cls,
327 (mc->take_equal == GNUNET_YES))) 323 (mc->take_equal == GNUNET_YES)))
328 { 324 {
329 mc->ret += 325 mc->ret +=
330 GNUNET_HELLO_add_address (address, 326 GNUNET_HELLO_add_address (address, expiration, &mc->buf[mc->ret],
331 expiration, 327 mc->max - mc->ret);
332 &mc->buf[mc->ret], mc->max - mc->ret);
333 } 328 }
334 return GNUNET_OK; 329 return GNUNET_OK;
335} 330}
@@ -388,8 +383,7 @@ struct DeltaContext
388 383
389 384
390static int 385static int
391delta_match (void *cls, 386delta_match (void *cls, const struct GNUNET_HELLO_Address *address,
392 const struct GNUNET_HELLO_Address *address,
393 struct GNUNET_TIME_Absolute expiration) 387 struct GNUNET_TIME_Absolute expiration)
394{ 388{
395 struct DeltaContext *dc = cls; 389 struct DeltaContext *dc = cls;
@@ -547,9 +541,7 @@ find_other_matching (void *cls, const struct GNUNET_HELLO_Address *address,
547 541
548 if (expiration.abs_value < ec->expiration_limit.abs_value) 542 if (expiration.abs_value < ec->expiration_limit.abs_value)
549 return GNUNET_YES; 543 return GNUNET_YES;
550 if (0 == 544 if (0 == GNUNET_HELLO_address_cmp (address, ec->address))
551 GNUNET_HELLO_address_cmp (address,
552 ec->address))
553 { 545 {
554 ec->found = GNUNET_YES; 546 ec->found = GNUNET_YES;
555 if (expiration.abs_value < ec->expiration.abs_value) 547 if (expiration.abs_value < ec->expiration.abs_value)
diff --git a/src/hello/test_hello.c b/src/hello/test_hello.c
index ca69dfc18..eb15668f4 100644
--- a/src/hello/test_hello.c
+++ b/src/hello/test_hello.c
@@ -47,8 +47,8 @@ my_addr_gen (void *cls, size_t max, void *buf)
47 address.transport_name = "test"; 47 address.transport_name = "test";
48 address.address_length = *i; 48 address.address_length = *i;
49 ret = 49 ret =
50 GNUNET_HELLO_add_address (&address, GNUNET_TIME_absolute_get (), 50 GNUNET_HELLO_add_address (&address, GNUNET_TIME_absolute_get (), buf,
51 buf, max); 51 max);
52 (*i)--; 52 (*i)--;
53 return ret; 53 return ret;
54} 54}
@@ -67,7 +67,9 @@ check_addr (void *cls, const struct GNUNET_HELLO_Address *address,
67 GNUNET_assert (address->address_length > 0); 67 GNUNET_assert (address->address_length > 0);
68 GNUNET_assert (*i & (1 << (address->address_length - 1))); 68 GNUNET_assert (*i & (1 << (address->address_length - 1)));
69 *i -= (1 << (address->address_length - 1)); 69 *i -= (1 << (address->address_length - 1));
70 GNUNET_assert (0 == strncmp ("address_information", address->address, address->address_length)); 70 GNUNET_assert (0 ==
71 strncmp ("address_information", address->address,
72 address->address_length));
71 GNUNET_assert (0 == strcmp ("test", address->transport_name)); 73 GNUNET_assert (0 == strcmp ("test", address->transport_name));
72 return GNUNET_OK; 74 return GNUNET_OK;
73} 75}
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index 8c9be13d4..ecbdd2f70 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -448,7 +448,9 @@ struct Session;
448 * @param ats_count number of performance records in 'ats' 448 * @param ats_count number of performance records in 'ats'
449 */ 449 */
450typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, 450typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls,
451 const struct GNUNET_HELLO_Address *address, 451 const struct
452 GNUNET_HELLO_Address *
453 address,
452 struct Session * session, 454 struct Session * session,
453 struct 455 struct
454 GNUNET_BANDWIDTH_Value32NBO 456 GNUNET_BANDWIDTH_Value32NBO
@@ -504,7 +506,7 @@ GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh,
504 */ 506 */
505void 507void
506GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh, 508GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh,
507 const struct GNUNET_PeerIdentity *peer); 509 const struct GNUNET_PeerIdentity *peer);
508 510
509/** 511/**
510 * We have updated performance statistics for a given address. Note 512 * We have updated performance statistics for a given address. Note
@@ -522,7 +524,7 @@ GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh,
522 */ 524 */
523void 525void
524GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, 526GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
525 const struct GNUNET_HELLO_Address *address, 527 const struct GNUNET_HELLO_Address *address,
526 struct Session *session, 528 struct Session *session,
527 const struct GNUNET_ATS_Information *ats, 529 const struct GNUNET_ATS_Information *ats,
528 uint32_t ats_count); 530 uint32_t ats_count);
@@ -540,8 +542,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh,
540void 542void
541GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh, 543GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh,
542 const struct GNUNET_HELLO_Address *address, 544 const struct GNUNET_HELLO_Address *address,
543 struct Session *session, 545 struct Session *session, int in_use);
544 int in_use);
545 546
546/** 547/**
547 * A session got destroyed, stop including it as a valid address. 548 * A session got destroyed, stop including it as a valid address.
@@ -553,7 +554,7 @@ GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh,
553void 554void
554GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh, 555GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh,
555 const struct GNUNET_HELLO_Address *address, 556 const struct GNUNET_HELLO_Address *address,
556 struct Session *session); 557 struct Session *session);
557 558
558 559
559/* ******************************** Performance API ***************************** */ 560/* ******************************** Performance API ***************************** */
@@ -575,7 +576,9 @@ struct GNUNET_ATS_PerformanceHandle;
575 * @param ats_count number of performance records in 'ats' 576 * @param ats_count number of performance records in 'ats'
576 */ 577 */
577typedef void (*GNUNET_ATS_PeerInformationCallback) (void *cls, 578typedef void (*GNUNET_ATS_PeerInformationCallback) (void *cls,
578 const struct GNUNET_HELLO_Address *address, 579 const struct
580 GNUNET_HELLO_Address *
581 address,
579 struct 582 struct
580 GNUNET_BANDWIDTH_Value32NBO 583 GNUNET_BANDWIDTH_Value32NBO
581 bandwidth_out, 584 bandwidth_out,
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index f4a71dd46..69918c8df 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -1036,10 +1036,10 @@ struct GNUNET_FS_ProgressInfo
1036 */ 1036 */
1037 unsigned int depth; 1037 unsigned int depth;
1038 1038
1039 /** 1039 /**
1040 * How much trust did we offer for downloading this block? 1040 * How much trust did we offer for downloading this block?
1041 */ 1041 */
1042 unsigned int trust_offered; 1042 unsigned int trust_offered;
1043 1043
1044 } progress; 1044 } progress;
1045 1045
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index 09f5f1c7d..ffddb0ba2 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -50,7 +50,7 @@ struct GNUNET_HELLO_Address
50 50
51 /** 51 /**
52 * For which peer is this an address? 52 * For which peer is this an address?
53 */ 53 */
54 struct GNUNET_PeerIdentity peer; 54 struct GNUNET_PeerIdentity peer;
55 55
56 /** 56 /**
@@ -83,9 +83,8 @@ struct GNUNET_HELLO_Address
83 */ 83 */
84struct GNUNET_HELLO_Address * 84struct GNUNET_HELLO_Address *
85GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer, 85GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer,
86 const char *transport_name, 86 const char *transport_name, const void *address,
87 const void *address, 87 size_t address_length);
88 size_t address_length);
89 88
90 89
91/** 90/**
@@ -108,7 +107,7 @@ GNUNET_HELLO_address_copy (const struct GNUNET_HELLO_Address *address);
108 */ 107 */
109int 108int
110GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1, 109GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1,
111 const struct GNUNET_HELLO_Address *a2); 110 const struct GNUNET_HELLO_Address *a2);
112 111
113 112
114/** 113/**
@@ -122,7 +121,7 @@ GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address *address);
122 121
123/** 122/**
124 * Free an address. 123 * Free an address.
125 * 124 *
126 * @param addr address to free 125 * @param addr address to free
127 */ 126 */
128#define GNUNET_HELLO_address_free(addr) GNUNET_free(addr) 127#define GNUNET_HELLO_address_free(addr) GNUNET_free(addr)
@@ -150,8 +149,7 @@ struct GNUNET_HELLO_Message;
150 */ 149 */
151size_t 150size_t
152GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address, 151GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address,
153 struct GNUNET_TIME_Absolute expiration, 152 struct GNUNET_TIME_Absolute expiration, char *target,
154 char *target,
155 size_t max); 153 size_t max);
156 154
157 155
@@ -240,9 +238,11 @@ GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1,
240 * GNUNET_NO to delete it from the HELLO 238 * GNUNET_NO to delete it from the HELLO
241 * GNUNET_SYSERR to stop iterating (but keep current address) 239 * GNUNET_SYSERR to stop iterating (but keep current address)
242 */ 240 */
243typedef int (*GNUNET_HELLO_AddressIterator) (void *cls, 241typedef int (*GNUNET_HELLO_AddressIterator) (void *cls,
244 const struct GNUNET_HELLO_Address *address, 242 const struct GNUNET_HELLO_Address *
245 struct GNUNET_TIME_Absolute expiration); 243 address,
244 struct GNUNET_TIME_Absolute
245 expiration);
246 246
247 247
248/** 248/**
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h
index 12ec3a54e..aed5e3b01 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -153,10 +153,12 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind);
153 */ 153 */
154typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, const char *name, 154typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, const char *name,
155 int isDefault, 155 int isDefault,
156 const struct sockaddr * addr, 156 const struct sockaddr *
157 const struct sockaddr * broadcast_addr, 157 addr,
158 const struct sockaddr * netmask, 158 const struct sockaddr *
159 socklen_t addrlen); 159 broadcast_addr,
160 const struct sockaddr *
161 netmask, socklen_t addrlen);
160 162
161 163
162/** 164/**
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index 24fa124f0..996712730 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -109,7 +109,7 @@ typedef void (*GNUNET_TRANSPORT_NotifyDisconnect) (void *cls,
109 * otherwise 0-terminated printable UTF-8 string 109 * otherwise 0-terminated printable UTF-8 string
110 */ 110 */
111typedef void (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls, 111typedef void (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls,
112 const char *address); 112 const char *address);
113 113
114 114
115/** 115/**
@@ -120,8 +120,12 @@ typedef void (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls,
120 * @param address address, NULL for disconnect notification in monitor mode 120 * @param address address, NULL for disconnect notification in monitor mode
121 */ 121 */
122typedef void (*GNUNET_TRANSPORT_PeerIterateCallback) (void *cls, 122typedef void (*GNUNET_TRANSPORT_PeerIterateCallback) (void *cls,
123 const struct GNUNET_PeerIdentity *peer, 123 const struct
124 const struct GNUNET_HELLO_Address *address); 124 GNUNET_PeerIdentity *
125 peer,
126 const struct
127 GNUNET_HELLO_Address *
128 address);
125 129
126 130
127/** 131/**
@@ -291,12 +295,13 @@ struct GNUNET_TRANSPORT_AddressToStringContext;
291 * @return handle to cancel the operation, NULL on error 295 * @return handle to cancel the operation, NULL on error
292 */ 296 */
293struct GNUNET_TRANSPORT_AddressToStringContext * 297struct GNUNET_TRANSPORT_AddressToStringContext *
294GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cfg, 298GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle
295 const struct GNUNET_HELLO_Address *address, 299 *cfg,
296 int numeric, 300 const struct GNUNET_HELLO_Address *address,
297 struct GNUNET_TIME_Relative timeout, 301 int numeric,
298 GNUNET_TRANSPORT_AddressToStringCallback aluc, 302 struct GNUNET_TIME_Relative timeout,
299 void *aluc_cls); 303 GNUNET_TRANSPORT_AddressToStringCallback
304 aluc, void *aluc_cls);
300 305
301 306
302/** 307/**
@@ -306,8 +311,8 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cf
306 */ 311 */
307void 312void
308GNUNET_TRANSPORT_address_to_string_cancel (struct 313GNUNET_TRANSPORT_address_to_string_cancel (struct
309 GNUNET_TRANSPORT_AddressToStringContext 314 GNUNET_TRANSPORT_AddressToStringContext
310 *alc); 315 *alc);
311 316
312 317
313/** 318/**
@@ -328,12 +333,14 @@ GNUNET_TRANSPORT_address_to_string_cancel (struct
328 * @param peer_address_callback_cls closure for peer_address_callback 333 * @param peer_address_callback_cls closure for peer_address_callback
329 */ 334 */
330struct GNUNET_TRANSPORT_PeerIterateContext * 335struct GNUNET_TRANSPORT_PeerIterateContext *
331GNUNET_TRANSPORT_peer_get_active_addresses (const struct GNUNET_CONFIGURATION_Handle *cfg, 336GNUNET_TRANSPORT_peer_get_active_addresses (const struct
332 const struct GNUNET_PeerIdentity *peer, 337 GNUNET_CONFIGURATION_Handle *cfg,
333 int one_shot, 338 const struct GNUNET_PeerIdentity
334 struct GNUNET_TIME_Relative timeout, 339 *peer, int one_shot,
335 GNUNET_TRANSPORT_PeerIterateCallback peer_address_callback, 340 struct GNUNET_TIME_Relative timeout,
336 void *peer_address_callback_cls); 341 GNUNET_TRANSPORT_PeerIterateCallback
342 peer_address_callback,
343 void *peer_address_callback_cls);
337 344
338 345
339/** 346/**
@@ -343,8 +350,8 @@ GNUNET_TRANSPORT_peer_get_active_addresses (const struct GNUNET_CONFIGURATION_Ha
343 */ 350 */
344void 351void
345GNUNET_TRANSPORT_peer_get_active_addresses_cancel (struct 352GNUNET_TRANSPORT_peer_get_active_addresses_cancel (struct
346 GNUNET_TRANSPORT_PeerIterateContext 353 GNUNET_TRANSPORT_PeerIterateContext
347*alc); 354 *alc);
348 355
349 356
350/** 357/**
diff --git a/src/include/winproc.h b/src/include/winproc.h
index ac4eecdfb..74e41edc9 100644
--- a/src/include/winproc.h
+++ b/src/include/winproc.h
@@ -208,16 +208,16 @@ extern "C"
208#define ENUMNICS3_MASK_OK 0x01 208#define ENUMNICS3_MASK_OK 0x01
209#define ENUMNICS3_BCAST_OK 0x02 209#define ENUMNICS3_BCAST_OK 0x02
210 210
211struct EnumNICs3_results 211 struct EnumNICs3_results
212{ 212 {
213 unsigned char flags; 213 unsigned char flags;
214 int is_default; 214 int is_default;
215 char pretty_name[1001]; 215 char pretty_name[1001];
216 size_t addr_size; 216 size_t addr_size;
217 struct sockaddr address; 217 struct sockaddr address;
218 struct sockaddr mask; 218 struct sockaddr mask;
219 struct sockaddr broadcast; 219 struct sockaddr broadcast;
220}; 220 };
221 221
222 int EnumNICs3 (struct EnumNICs3_results **, int *EnumNICs3_results_count); 222 int EnumNICs3 (struct EnumNICs3_results **, int *EnumNICs3_results_count);
223 void EnumNICs3_free (struct EnumNICs3_results *); 223 void EnumNICs3_free (struct EnumNICs3_results *);
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 8883602ab..564640acd 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -1461,7 +1461,8 @@ peer_info_remove_path (struct MeshPeerInfo *peer, GNUNET_PEER_Id p1,
1461 for (i = 0; i < peer->ntunnels; i++) 1461 for (i = 0; i < peer->ntunnels; i++)
1462 { 1462 {
1463 d = tunnel_notify_connection_broken (peer->tunnels[i], p1, p2); 1463 d = tunnel_notify_connection_broken (peer->tunnels[i], p1, p2);
1464 if (0 == d) continue; 1464 if (0 == d)
1465 continue;
1465 /* TODO 1466 /* TODO
1466 * Problem: one or more peers have been deleted from the tunnel tree. 1467 * Problem: one or more peers have been deleted from the tunnel tree.
1467 * We don't know who they are to try to add them again. 1468 * We don't know who they are to try to add them again.
@@ -1699,7 +1700,7 @@ path_build_from_dht (const struct GNUNET_PeerIdentity *get_path,
1699 1700
1700/** 1701/**
1701 * Adds a path to the peer_infos of all the peers in the path 1702 * Adds a path to the peer_infos of all the peers in the path
1702 * 1703 *
1703 * @param p Path to process. 1704 * @param p Path to process.
1704 * @param confirmed Whether we know if the path works or not. FIXME use 1705 * @param confirmed Whether we know if the path works or not. FIXME use
1705 */ 1706 */
@@ -1709,16 +1710,16 @@ path_add_to_peers (struct MeshPeerPath *p, int confirmed)
1709 unsigned int i; 1710 unsigned int i;
1710 1711
1711 /* TODO: invert and add */ 1712 /* TODO: invert and add */
1712 for (i = 0; i < p->length && p->peers[i] != myid; i++) /* skip'em */; 1713 for (i = 0; i < p->length && p->peers[i] != myid; i++) /* skip'em */ ;
1713 for (i++; i < p->length; i++) 1714 for (i++; i < p->length; i++)
1714 { 1715 {
1715 struct MeshPeerInfo *aux; 1716 struct MeshPeerInfo *aux;
1716 struct MeshPeerPath *copy; 1717 struct MeshPeerPath *copy;
1717 1718
1718 aux = peer_info_get_short(p->peers[i]); 1719 aux = peer_info_get_short (p->peers[i]);
1719 copy = path_duplicate(p); 1720 copy = path_duplicate (p);
1720 copy->length = i + 1; 1721 copy->length = i + 1;
1721 peer_info_add_path(aux, copy, GNUNET_NO); 1722 peer_info_add_path (aux, copy, GNUNET_NO);
1722 } 1723 }
1723} 1724}
1724 1725
@@ -2063,14 +2064,12 @@ tunnel_send_multicast (struct MeshTunnel *t,
2063 mcast = (struct GNUNET_MESH_Multicast *) mdata->data; 2064 mcast = (struct GNUNET_MESH_Multicast *) mdata->data;
2064 mcast->ttl = htonl (ntohl (mcast->ttl) - 1); 2065 mcast->ttl = htonl (ntohl (mcast->ttl) - 1);
2065#if MESH_DEBUG 2066#if MESH_DEBUG
2066 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2067 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: data packet, ttl: %u\n",
2067 "MESH: data packet, ttl: %u\n",
2068 ntohl (mcast->ttl)); 2068 ntohl (mcast->ttl));
2069 } 2069 }
2070 else 2070 else
2071 { 2071 {
2072 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2072 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: not a data packet, no ttl\n");
2073 "MESH: not a data packet, no ttl\n");
2074#endif 2073#endif
2075 } 2074 }
2076 if (NULL != t->client) 2075 if (NULL != t->client)
@@ -2601,7 +2600,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
2601 /* FIXME error. destroy tunnel? leave for timeout? */ 2600 /* FIXME error. destroy tunnel? leave for timeout? */
2602 return 0; 2601 return 0;
2603 } 2602 }
2604 path_add_to_peers(path, GNUNET_NO); 2603 path_add_to_peers (path, GNUNET_NO);
2605 tunnel_add_path (t, path, own_pos); 2604 tunnel_add_path (t, path, own_pos);
2606 if (own_pos == size - 1) 2605 if (own_pos == size - 1)
2607 { 2606 {
@@ -2938,16 +2937,14 @@ handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer,
2938 { 2937 {
2939 /* FIXME: already seen this packet, log dropping */ 2938 /* FIXME: already seen this packet, log dropping */
2940 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2939 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
2941 "MESH: Already seen mid %u, DROPPING!\n", 2940 "MESH: Already seen mid %u, DROPPING!\n", t->mid);
2942 t->mid);
2943 return GNUNET_OK; 2941 return GNUNET_OK;
2944 } 2942 }
2945#if MESH_DEBUG 2943#if MESH_DEBUG
2946 else 2944 else
2947 { 2945 {
2948 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2946 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2949 "MESH: mid %u not seen yet, forwarding\n", 2947 "MESH: mid %u not seen yet, forwarding\n", ntohl (msg->mid));
2950 ntohl (msg->mid));
2951 } 2948 }
2952#endif 2949#endif
2953 t->mid = ntohl (msg->mid); 2950 t->mid = ntohl (msg->mid);
@@ -2960,15 +2957,12 @@ handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer,
2960 send_subscribed_clients (message, &msg[1].header); 2957 send_subscribed_clients (message, &msg[1].header);
2961 } 2958 }
2962#if MESH_DEBUG 2959#if MESH_DEBUG
2963 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2960 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: ttl: %u\n", ntohl (msg->ttl));
2964 "MESH: ttl: %u\n",
2965 ntohl (msg->ttl));
2966#endif 2961#endif
2967 if (ntohl (msg->ttl) == 0) 2962 if (ntohl (msg->ttl) == 0)
2968 { 2963 {
2969 /* FIXME: ttl is 0, log dropping */ 2964 /* FIXME: ttl is 0, log dropping */
2970 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2965 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "MESH: TTL is 0, DROPPING!\n");
2971 "MESH: TTL is 0, DROPPING!\n");
2972 return GNUNET_OK; 2966 return GNUNET_OK;
2973 } 2967 }
2974 tunnel_send_multicast (t, message); 2968 tunnel_send_multicast (t, message);
@@ -3097,11 +3091,11 @@ handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
3097 peer_info = peer_info_get (&msg->peer_id); 3091 peer_info = peer_info_get (&msg->peer_id);
3098 3092
3099 /* Add paths to peers? */ 3093 /* Add paths to peers? */
3100 p = tree_get_path_to_peer(t->tree, peer_info->id); 3094 p = tree_get_path_to_peer (t->tree, peer_info->id);
3101 if (NULL != p) 3095 if (NULL != p)
3102 { 3096 {
3103 path_add_to_peers (p, GNUNET_YES); 3097 path_add_to_peers (p, GNUNET_YES);
3104 path_destroy(p); 3098 path_destroy (p);
3105 } 3099 }
3106 else 3100 else
3107 { 3101 {
@@ -3122,7 +3116,7 @@ handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
3122 GNUNET_DHT_get_stop (t->dht_get_type); 3116 GNUNET_DHT_get_stop (t->dht_get_type);
3123 t->dht_get_type = NULL; 3117 t->dht_get_type = NULL;
3124 } 3118 }
3125 if (tree_get_status(t->tree, peer_info->id) != MESH_PEER_READY) 3119 if (tree_get_status (t->tree, peer_info->id) != MESH_PEER_READY)
3126 { 3120 {
3127 tree_set_status (t->tree, peer_info->id, MESH_PEER_READY); 3121 tree_set_status (t->tree, peer_info->id, MESH_PEER_READY);
3128 send_client_peer_connected (t, peer_info->id); 3122 send_client_peer_connected (t, peer_info->id);
@@ -3308,7 +3302,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3308 3302
3309 p = path_build_from_dht (get_path, get_path_length, put_path, 3303 p = path_build_from_dht (get_path, get_path_length, put_path,
3310 put_path_length); 3304 put_path_length);
3311 path_add_to_peers(p, GNUNET_NO); 3305 path_add_to_peers (p, GNUNET_NO);
3312 for (i = 0; i < path_info->peer->ntunnels; i++) 3306 for (i = 0; i < path_info->peer->ntunnels; i++)
3313 { 3307 {
3314 tunnel_add_peer (path_info->peer->tunnels[i], path_info->peer); 3308 tunnel_add_peer (path_info->peer->tunnels[i], path_info->peer);
@@ -3362,7 +3356,7 @@ dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3362 3356
3363 p = path_build_from_dht (get_path, get_path_length, put_path, 3357 p = path_build_from_dht (get_path, get_path_length, put_path,
3364 put_path_length); 3358 put_path_length);
3365 path_add_to_peers(p, GNUNET_NO); 3359 path_add_to_peers (p, GNUNET_NO);
3366 tunnel_add_peer (t, peer_info); 3360 tunnel_add_peer (t, peer_info);
3367 peer_info_connect (peer_info, t); 3361 peer_info_connect (peer_info, t);
3368} 3362}
diff --git a/src/mesh/mesh_tunnel_tree.c b/src/mesh/mesh_tunnel_tree.c
index 7b04385bc..a7577e36f 100644
--- a/src/mesh/mesh_tunnel_tree.c
+++ b/src/mesh/mesh_tunnel_tree.c
@@ -992,7 +992,7 @@ tree_del_peer (struct MeshTunnelTree *t, GNUNET_PEER_Id peer,
992 * 992 *
993 * @return Number of hops to reach destination, UINT_MAX in case the peer is not 993 * @return Number of hops to reach destination, UINT_MAX in case the peer is not
994 * in the path. 994 * in the path.
995 * 995 *
996 * TODO: adapt to allow any start / root combination 996 * TODO: adapt to allow any start / root combination
997 * TODO: take in account state of the nodes 997 * TODO: take in account state of the nodes
998 */ 998 */
diff --git a/src/mesh/test_mesh_2dtorus.c b/src/mesh/test_mesh_2dtorus.c
index 718ab0864..6d91185cc 100644
--- a/src/mesh/test_mesh_2dtorus.c
+++ b/src/mesh/test_mesh_2dtorus.c
@@ -104,8 +104,7 @@ shutdown_callback (void *cls, const char *emsg)
104 if (emsg != NULL) 104 if (emsg != NULL)
105 { 105 {
106 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 106 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
107 "test: Shutdown of peers failed! (%s)\n", 107 "test: Shutdown of peers failed! (%s)\n", emsg);
108 emsg);
109 ok--; 108 ok--;
110 } 109 }
111#if VERBOSE 110#if VERBOSE
@@ -122,8 +121,7 @@ static void
122shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 121shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
123{ 122{
124#if VERBOSE 123#if VERBOSE
125 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 124 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n");
126 "test: Ending test.\n");
127#endif 125#endif
128 126
129 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); 127 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
@@ -134,8 +132,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
134static void 132static void
135disconnect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 133disconnect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
136{ 134{
137 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 135 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: disconnecting peers\n");
138 "test: disconnecting peers\n");
139 136
140 if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle) 137 if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle)
141 { 138 {
@@ -162,33 +159,26 @@ topo_cb (void *cls, const struct GNUNET_PeerIdentity *first,
162 topo_connections++; 159 topo_connections++;
163 if (NULL != emsg) 160 if (NULL != emsg)
164 { 161 {
165 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 162 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "test: Error by topo %u: %s\n",
166 "test: Error by topo %u: %s\n",
167 topo_connections, emsg); 163 topo_connections, emsg);
168 } 164 }
169 else 165 else
170 { 166 {
171 if (first == NULL || second == NULL) 167 if (first == NULL || second == NULL)
172 { 168 {
173 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 169 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Connection %u NULL\n",
174 "test: Connection %u NULL\n",
175 topo_connections); 170 topo_connections);
176 if (disconnect_task != GNUNET_SCHEDULER_NO_TASK) 171 if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
177 { 172 {
178 GNUNET_SCHEDULER_cancel (disconnect_task); 173 GNUNET_SCHEDULER_cancel (disconnect_task);
179 GNUNET_SCHEDULER_add_now(&disconnect_peers, NULL); 174 GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL);
180 } 175 }
181 return; 176 return;
182 } 177 }
183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 178 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Connection %u ok\n",
184 "test: Connection %u ok\n",
185 topo_connections); 179 topo_connections);
186 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 180 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: %s\n", GNUNET_i2s (first));
187 "test: %s\n", 181 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: %s\n", GNUNET_i2s (second));
188 GNUNET_i2s (first));
189 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
190 "test: %s\n",
191 GNUNET_i2s (second));
192 } 182 }
193} 183}
194 184
@@ -205,8 +195,8 @@ peergroup_ready (void *cls, const char *emsg)
205 { 195 {
206 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 196 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
207 "test: Peergroup callback called with error, aborting test!\n"); 197 "test: Peergroup callback called with error, aborting test!\n");
208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 198 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Error from testing: `%s'\n",
209 "test: Error from testing: `%s'\n", emsg); 199 emsg);
210 ok--; 200 ok--;
211 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); 201 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
212 return; 202 return;
@@ -216,8 +206,7 @@ peergroup_ready (void *cls, const char *emsg)
216 "************************************************************\n"); 206 "************************************************************\n");
217 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
218 "test: Peer Group started successfully!\n"); 208 "test: Peer Group started successfully!\n");
219 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 209 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Have %u connections\n",
220 "test: Have %u connections\n",
221 total_connections); 210 total_connections);
222#endif 211#endif
223 212
@@ -225,8 +214,7 @@ peergroup_ready (void *cls, const char *emsg)
225 if (0 < failed_connections) 214 if (0 < failed_connections)
226 { 215 {
227 ok = GNUNET_SYSERR; 216 ok = GNUNET_SYSERR;
228 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 217 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "test: %u connections have FAILED!\n",
229 "test: %u connections have FAILED!\n",
230 failed_connections); 218 failed_connections);
231 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL); 219 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL);
232 220
@@ -272,12 +260,9 @@ connect_cb (void *cls, const struct GNUNET_PeerIdentity *first,
272 { 260 {
273 failed_connections++; 261 failed_connections++;
274 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 262 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
275 "test: Problem with new connection (%s)\n", 263 "test: Problem with new connection (%s)\n", emsg);
276 emsg); 264 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: (%s)\n", GNUNET_i2s (first));
277 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: (%s)\n", 265 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: (%s)\n", GNUNET_i2s (second));
278 GNUNET_i2s (first));
279 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: (%s)\n",
280 GNUNET_i2s (second));
281 } 266 }
282 267
283} 268}
@@ -310,8 +295,7 @@ run (void *cls, char *const *args, const char *cfgfile,
310 NULL); 295 NULL);
311 296
312#if VERBOSE 297#if VERBOSE
313 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 298 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n");
314 "test: Starting daemons.\n");
315 GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing", 299 GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing",
316 "use_progressbars", "YES"); 300 "use_progressbars", "YES");
317#endif 301#endif
@@ -369,16 +353,14 @@ main (int argc, char *argv[])
369 353
370 354
371 GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, 355 GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2,
372 "test_mesh_2dtorus", 356 "test_mesh_2dtorus", gettext_noop ("Test mesh 2d torus."),
373 gettext_noop ("Test mesh 2d torus."), options, 357 options, &run, NULL);
374 &run, NULL);
375#if REMOVE_DIR 358#if REMOVE_DIR
376 GNUNET_DISK_directory_remove ("/tmp/test_mesh_2dtorus"); 359 GNUNET_DISK_directory_remove ("/tmp/test_mesh_2dtorus");
377#endif 360#endif
378 if (GNUNET_OK != ok) 361 if (GNUNET_OK != ok)
379 { 362 {
380 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 363 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "test: FAILED!\n");
381 "test: FAILED!\n");
382 return 1; 364 return 1;
383 } 365 }
384 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: success\n"); 366 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: success\n");
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c
index 5a83994f3..f273b04ab 100644
--- a/src/mesh/test_mesh_small.c
+++ b/src/mesh/test_mesh_small.c
@@ -767,7 +767,7 @@ run (void *cls, char *const *args, const char *cfgfile,
767 767
768 if (GNUNET_OK != 768 if (GNUNET_OK !=
769 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "test_mesh_small", 769 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "test_mesh_small",
770 "WAIT_TIME", &wait_time)) 770 "WAIT_TIME", &wait_time))
771 { 771 {
772 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 772 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
773 "Option test_mesh_small:wait_time is required!\n"); 773 "Option test_mesh_small:wait_time is required!\n");
diff --git a/src/mesh/test_mesh_small_unicast_far.c b/src/mesh/test_mesh_small_unicast_far.c
index 1708e96cd..ed65da2e4 100644
--- a/src/mesh/test_mesh_small_unicast_far.c
+++ b/src/mesh/test_mesh_small_unicast_far.c
@@ -480,7 +480,7 @@ run (void *cls, char *const *args, const char *cfgfile,
480 480
481 if (GNUNET_OK != 481 if (GNUNET_OK !=
482 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "test_mesh_small", 482 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "test_mesh_small",
483 "WAIT_TIME", &wait_time)) 483 "WAIT_TIME", &wait_time))
484 { 484 {
485 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 485 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
486 "Option test_mesh_small:wait_time is required!\n"); 486 "Option test_mesh_small:wait_time is required!\n");
diff --git a/src/mesh/test_mesh_tree_api.c b/src/mesh/test_mesh_tree_api.c
index ec92a5ece..60e31bdde 100644
--- a/src/mesh/test_mesh_tree_api.c
+++ b/src/mesh/test_mesh_tree_api.c
@@ -78,16 +78,15 @@ test_assert (GNUNET_PEER_Id peer_id, enum MeshPeerState status,
78 if (n->peer != peer_id) 78 if (n->peer != peer_id)
79 { 79 {
80 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 80 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
81 "Retrieved peer has wrong ID! (Got %u, expected %u)\n", 81 "Retrieved peer has wrong ID! (Got %u, expected %u)\n", n->peer,
82 n->peer, peer_id); 82 peer_id);
83 failed++; 83 failed++;
84 } 84 }
85 if (n->status != status) 85 if (n->status != status)
86 { 86 {
87 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 87 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
88 "Retrieved peer has wrong status! (Got %u, expected %u)\n", 88 "Retrieved peer has wrong status! (Got %u, expected %u)\n",
89 n->status, 89 n->status, status);
90 status);
91 failed++; 90 failed++;
92 } 91 }
93 for (c = n->children_head, i = 0; NULL != c; c = c->next, i++) ; 92 for (c = n->children_head, i = 0; NULL != c; c = c->next, i++) ;
@@ -101,7 +100,8 @@ test_assert (GNUNET_PEER_Id peer_id, enum MeshPeerState status,
101 if (0 != first_hop && 100 if (0 != first_hop &&
102 GNUNET_PEER_search (tree_get_first_hop (tree, peer_id)) != first_hop) 101 GNUNET_PEER_search (tree_get_first_hop (tree, peer_id)) != first_hop)
103 { 102 {
104 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Wrong first hop! (Got %u, expected %u)\n", 103 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
104 "Wrong first hop! (Got %u, expected %u)\n",
105 GNUNET_PEER_search (tree_get_first_hop (tree, peer_id)), 105 GNUNET_PEER_search (tree_get_first_hop (tree, peer_id)),
106 first_hop); 106 first_hop);
107 failed++; 107 failed++;
@@ -112,8 +112,8 @@ test_assert (GNUNET_PEER_Id peer_id, enum MeshPeerState status,
112 112
113 GNUNET_PEER_resolve (peer_id, &id); 113 GNUNET_PEER_resolve (peer_id, &id);
114 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 114 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
115 "*** Peer %s (%u) has failed %d checks!\n", 115 "*** Peer %s (%u) has failed %d checks!\n", GNUNET_i2s (&id),
116 GNUNET_i2s (&id), peer_id, failed - pre_failed); 116 peer_id, failed - pre_failed);
117 } 117 }
118} 118}
119 119
@@ -219,41 +219,34 @@ main (int argc, char *argv[])
219 for (i = 1; i < 5; i++) 219 for (i = 1; i < 5; i++)
220 { 220 {
221 path->length = i; 221 path->length = i;
222 if (tree_get_path_cost(tree, path) != 0) 222 if (tree_get_path_cost (tree, path) != 0)
223 { 223 {
224 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 224 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "test: length %u cost failed!\n",
225 "test: length %u cost failed!\n",
226 i); 225 i);
227 failed++; 226 failed++;
228 } 227 }
229 } 228 }
230 path->length++; 229 path->length++;
231 path->peers[4] = 6; 230 path->peers[4] = 6;
232 if (tree_get_path_cost(tree, path) != 1) 231 if (tree_get_path_cost (tree, path) != 1)
233 { 232 {
234 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 233 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "test: length %u cost failed!\n", i);
235 "test: length %u cost failed!\n",
236 i);
237 failed++; 234 failed++;
238 } 235 }
239 path->peers[3] = 7; 236 path->peers[3] = 7;
240 if (tree_get_path_cost(tree, path) != 2) 237 if (tree_get_path_cost (tree, path) != 2)
241 { 238 {
242 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 239 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "test: length %u cost failed!\n", i);
243 "test: length %u cost failed!\n",
244 i);
245 failed++; 240 failed++;
246 } 241 }
247 path->length--; 242 path->length--;
248 if (tree_get_path_cost(tree, path) != 1) 243 if (tree_get_path_cost (tree, path) != 1)
249 { 244 {
250 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 245 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "test: length %u cost failed!\n", i);
251 "test: length %u cost failed!\n",
252 i);
253 failed++; 246 failed++;
254 } 247 }
255 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Deleting third path (5)\n"); 248 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Deleting third path (5)\n");
256 tree_set_status(tree, 5, MESH_PEER_READY); 249 tree_set_status (tree, 5, MESH_PEER_READY);
257 cb_call = 1; 250 cb_call = 1;
258 node = tree_del_path (tree, 5, &cb, NULL); 251 node = tree_del_path (tree, 5, &cb, NULL);
259 tree_debug (tree); 252 tree_debug (tree);
diff --git a/src/nat/nat.c b/src/nat/nat.c
index e199bf2b0..9f8fec9a0 100644
--- a/src/nat/nat.c
+++ b/src/nat/nat.c
@@ -635,12 +635,10 @@ process_hostname_ip (void *cls, const struct sockaddr *addr, socklen_t addrlen)
635 * @return GNUNET_OK to continue iterating 635 * @return GNUNET_OK to continue iterating
636 */ 636 */
637static int 637static int
638process_interfaces(void *cls, const char *name, 638process_interfaces (void *cls, const char *name, int isDefault,
639 int isDefault, 639 const struct sockaddr *addr,
640 const struct sockaddr * addr, 640 const struct sockaddr *broadcast_addr,
641 const struct sockaddr * broadcast_addr, 641 const struct sockaddr *netmask, socklen_t addrlen)
642 const struct sockaddr * netmask,
643 socklen_t addrlen)
644{ 642{
645 struct GNUNET_NAT_Handle *h = cls; 643 struct GNUNET_NAT_Handle *h = cls;
646 const struct sockaddr_in *s4; 644 const struct sockaddr_in *s4;
@@ -655,7 +653,7 @@ process_interfaces(void *cls, const char *name,
655 ip = &s4->sin_addr; 653 ip = &s4->sin_addr;
656 654
657 /* Check if address is in 127.0.0.0/8 */ 655 /* Check if address is in 127.0.0.0/8 */
658 uint32_t address = ntohl ((uint32_t)(s4->sin_addr.s_addr)); 656 uint32_t address = ntohl ((uint32_t) (s4->sin_addr.s_addr));
659 uint32_t value = (address & 0xFF000000) ^ 0x7F000000; 657 uint32_t value = (address & 0xFF000000) ^ 0x7F000000;
660 658
661 if ((h->return_localaddress == GNUNET_NO) && (value == 0)) 659 if ((h->return_localaddress == GNUNET_NO) && (value == 0))
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c
index f7f64ce03..f81f00f6b 100644
--- a/src/nat/test_nat.c
+++ b/src/nat/test_nat.c
@@ -97,12 +97,9 @@ struct addr_cls
97 * @return GNUNET_OK to continue iterating 97 * @return GNUNET_OK to continue iterating
98 */ 98 */
99static int 99static int
100process_if (void *cls, const char *name, 100process_if (void *cls, const char *name, int isDefault,
101 int isDefault, 101 const struct sockaddr *addr, const struct sockaddr *broadcast_addr,
102 const struct sockaddr * addr, 102 const struct sockaddr *netmask, socklen_t addrlen)
103 const struct sockaddr * broadcast_addr,
104 const struct sockaddr * netmask,
105 socklen_t addrlen)
106{ 103{
107 struct addr_cls *data = cls; 104 struct addr_cls *data = cls;
108 105
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c
index 115d7b417..32f650feb 100644
--- a/src/nse/gnunet-nse-profiler.c
+++ b/src/nse/gnunet-nse-profiler.c
@@ -556,7 +556,7 @@ run (void *cls, char *const *args, const char *cfgfile,
556 556
557 if (GNUNET_OK != 557 if (GNUNET_OK !=
558 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "nse-profiler", 558 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "nse-profiler",
559 "WAIT_TIME", &wait_time)) 559 "WAIT_TIME", &wait_time))
560 { 560 {
561 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 561 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
562 "Option nse-profiler:wait_time is required!\n"); 562 "Option nse-profiler:wait_time is required!\n");
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 23144b346..86b75c9c9 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -305,6 +305,7 @@ setup_estimate_message (struct GNUNET_NSE_ClientMessage *em)
305 double variance; 305 double variance;
306 double val; 306 double val;
307 double nsize; 307 double nsize;
308
308#define WEST 1 309#define WEST 1
309 /* Weighted incremental algorithm for stddev according to West (1979) */ 310 /* Weighted incremental algorithm for stddev according to West (1979) */
310#if WEST 311#if WEST
@@ -353,13 +354,13 @@ setup_estimate_message (struct GNUNET_NSE_ClientMessage *em)
353 if (0 != estimate_count) 354 if (0 != estimate_count)
354 { 355 {
355 mean = sum / estimate_count; 356 mean = sum / estimate_count;
356 variance = (vsq - mean * sum) / (estimate_count - 1.0); // terrible for numerical stability... 357 variance = (vsq - mean * sum) / (estimate_count - 1.0); // terrible for numerical stability...
357 } 358 }
358#endif 359#endif
359 if (variance >= 0) 360 if (variance >= 0)
360 std_dev = sqrt (variance); 361 std_dev = sqrt (variance);
361 else 362 else
362 std_dev = variance; /* must be infinity due to estimate_count == 0 */ 363 std_dev = variance; /* must be infinity due to estimate_count == 0 */
363 current_std_dev = std_dev; 364 current_std_dev = std_dev;
364 current_size_estimate = mean; 365 current_size_estimate = mean;
365 366
@@ -564,8 +565,8 @@ transmit_ready (void *cls, size_t size, void *buf)
564 GNUNET_SCHEDULER_add_delayed (get_transmit_delay (0), &transmit_task, 565 GNUNET_SCHEDULER_add_delayed (get_transmit_delay (0), &transmit_task,
565 peer_entry); 566 peer_entry);
566 } 567 }
567 if ( (ntohl (size_estimate_messages[idx].hop_count) == 0) && 568 if ((ntohl (size_estimate_messages[idx].hop_count) == 0) &&
568 (GNUNET_SCHEDULER_NO_TASK != proof_task) ) 569 (GNUNET_SCHEDULER_NO_TASK != proof_task))
569 { 570 {
570 GNUNET_STATISTICS_update (stats, 571 GNUNET_STATISTICS_update (stats,
571 "# flood messages not generated (no proof yet)", 572 "# flood messages not generated (no proof yet)",
@@ -667,8 +668,8 @@ setup_flood_message (unsigned int slot, struct GNUNET_TIME_Absolute ts)
667 fm->proof_of_work = my_proof; 668 fm->proof_of_work = my_proof;
668 if (nse_work_required > 0) 669 if (nse_work_required > 0)
669 GNUNET_assert (GNUNET_OK == 670 GNUNET_assert (GNUNET_OK ==
670 GNUNET_CRYPTO_rsa_sign (my_private_key, &fm->purpose, 671 GNUNET_CRYPTO_rsa_sign (my_private_key, &fm->purpose,
671 &fm->signature)); 672 &fm->signature));
672 else 673 else
673 memset (&fm->signature, 0, sizeof (fm->signature)); 674 memset (&fm->signature, 0, sizeof (fm->signature));
674} 675}
@@ -905,12 +906,12 @@ verify_message_crypto (const struct GNUNET_NSE_FloodMessage *incoming_flood)
905 GNUNET_break_op (0); 906 GNUNET_break_op (0);
906 return GNUNET_NO; 907 return GNUNET_NO;
907 } 908 }
908 if ( (nse_work_required > 0) && 909 if ((nse_work_required > 0) &&
909 (GNUNET_OK != 910 (GNUNET_OK !=
910 GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_NSE_SEND, 911 GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_NSE_SEND,
911 &incoming_flood->purpose, 912 &incoming_flood->purpose,
912 &incoming_flood->signature, 913 &incoming_flood->signature,
913 &incoming_flood->pkey)) ) 914 &incoming_flood->pkey)))
914 { 915 {
915 GNUNET_break_op (0); 916 GNUNET_break_op (0);
916 return GNUNET_NO; 917 return GNUNET_NO;
@@ -1139,8 +1140,9 @@ handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
1139 peer_entry = GNUNET_malloc (sizeof (struct NSEPeerEntry)); 1140 peer_entry = GNUNET_malloc (sizeof (struct NSEPeerEntry));
1140 peer_entry->id = *peer; 1141 peer_entry->id = *peer;
1141 GNUNET_assert (GNUNET_OK == 1142 GNUNET_assert (GNUNET_OK ==
1142 GNUNET_CONTAINER_multihashmap_put (peers, &peer->hashPubKey, peer_entry, 1143 GNUNET_CONTAINER_multihashmap_put (peers, &peer->hashPubKey,
1143 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); 1144 peer_entry,
1145 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
1144 peer_entry->transmit_task = 1146 peer_entry->transmit_task =
1145 GNUNET_SCHEDULER_add_delayed (get_transmit_delay (-1), &transmit_task, 1147 GNUNET_SCHEDULER_add_delayed (get_transmit_delay (-1), &transmit_task,
1146 peer_entry); 1148 peer_entry);
@@ -1267,14 +1269,14 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
1267 (now.abs_value / gnunet_nse_interval.rel_value) * 1269 (now.abs_value / gnunet_nse_interval.rel_value) *
1268 gnunet_nse_interval.rel_value; 1270 gnunet_nse_interval.rel_value;
1269 next_timestamp.abs_value = 1271 next_timestamp.abs_value =
1270 current_timestamp.abs_value + gnunet_nse_interval.rel_value; 1272 current_timestamp.abs_value + gnunet_nse_interval.rel_value;
1271 estimate_index = HISTORY_SIZE - 1; 1273 estimate_index = HISTORY_SIZE - 1;
1272 estimate_count = 0; 1274 estimate_count = 0;
1273 if (GNUNET_YES == check_proof_of_work (&my_public_key, 1275 if (GNUNET_YES == check_proof_of_work (&my_public_key, my_proof))
1274 my_proof))
1275 { 1276 {
1276 prev_time.abs_value = 1277 prev_time.abs_value =
1277 current_timestamp.abs_value - (estimate_index - 1) * gnunet_nse_interval.rel_value; 1278 current_timestamp.abs_value - (estimate_index -
1279 1) * gnunet_nse_interval.rel_value;
1278 setup_flood_message (estimate_index, prev_time); 1280 setup_flood_message (estimate_index, prev_time);
1279 estimate_count++; 1281 estimate_count++;
1280 } 1282 }
@@ -1386,8 +1388,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1386 nc = GNUNET_SERVER_notification_context_create (server, 1); 1388 nc = GNUNET_SERVER_notification_context_create (server, 1);
1387 /* Connect to core service and register core handlers */ 1389 /* Connect to core service and register core handlers */
1388 coreAPI = GNUNET_CORE_connect (cfg, /* Main configuration */ 1390 coreAPI = GNUNET_CORE_connect (cfg, /* Main configuration */
1389 1, 1391 1, NULL, /* Closure passed to functions */
1390 NULL, /* Closure passed to functions */
1391 &core_init, /* Call core_init once connected */ 1392 &core_init, /* Call core_init once connected */
1392 &handle_core_connect, /* Handle connects */ 1393 &handle_core_connect, /* Handle connects */
1393 &handle_core_disconnect, /* Handle disconnects */ 1394 &handle_core_disconnect, /* Handle disconnects */
diff --git a/src/nse/nse_api.c b/src/nse/nse_api.c
index e32c08e4b..db5e9d117 100644
--- a/src/nse/nse_api.c
+++ b/src/nse/nse_api.c
@@ -105,7 +105,7 @@ message_handler (void *cls, const struct GNUNET_MessageHeader *msg)
105 105
106 if (msg == NULL) 106 if (msg == NULL)
107 { 107 {
108 /* Error, timeout, death */ 108 /* Error, timeout, death */
109 GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); 109 GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
110 h->client = NULL; 110 h->client = NULL;
111 h->reconnect_task = 111 h->reconnect_task =
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index d54eb1081..337a9b2ab 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -101,8 +101,7 @@ process_resolved_address (void *cls, const char *address)
101 * @return GNUNET_OK to keep the address and continue 101 * @return GNUNET_OK to keep the address and continue
102 */ 102 */
103static int 103static int
104count_address (void *cls, 104count_address (void *cls, const struct GNUNET_HELLO_Address *address,
105 const struct GNUNET_HELLO_Address *address,
106 struct GNUNET_TIME_Absolute expiration) 105 struct GNUNET_TIME_Absolute expiration)
107{ 106{
108 struct PrintContext *pc = cls; 107 struct PrintContext *pc = cls;
@@ -121,17 +120,15 @@ count_address (void *cls,
121 * @return GNUNET_OK to keep the address and continue 120 * @return GNUNET_OK to keep the address and continue
122 */ 121 */
123static int 122static int
124print_address (void *cls, 123print_address (void *cls, const struct GNUNET_HELLO_Address *address,
125 const struct GNUNET_HELLO_Address *address,
126 struct GNUNET_TIME_Absolute expiration) 124 struct GNUNET_TIME_Absolute expiration)
127{ 125{
128 struct PrintContext *pc = cls; 126 struct PrintContext *pc = cls;
129 GNUNET_TRANSPORT_address_to_string (cfg, 127
130 address, 128 GNUNET_TRANSPORT_address_to_string (cfg, address, no_resolve,
131 no_resolve, 129 GNUNET_TIME_relative_multiply
132 GNUNET_TIME_relative_multiply 130 (GNUNET_TIME_UNIT_SECONDS, 10),
133 (GNUNET_TIME_UNIT_SECONDS, 10), 131 &process_resolved_address, pc);
134 &process_resolved_address, pc);
135 return GNUNET_OK; 132 return GNUNET_OK;
136} 133}
137 134
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c
index fc7cc781f..799fdc6d8 100644
--- a/src/peerinfo/gnunet-service-peerinfo.c
+++ b/src/peerinfo/gnunet-service-peerinfo.c
@@ -122,8 +122,7 @@ make_info_message (const struct HostEntry *he)
122 * @return GNUNET_NO if expiration smaller than the current time 122 * @return GNUNET_NO if expiration smaller than the current time
123 */ 123 */
124static int 124static int
125discard_expired (void *cls, 125discard_expired (void *cls, const struct GNUNET_HELLO_Address *address,
126 const struct GNUNET_HELLO_Address *address,
127 struct GNUNET_TIME_Absolute expiration) 126 struct GNUNET_TIME_Absolute expiration)
128{ 127{
129 const struct GNUNET_TIME_Absolute *now = cls; 128 const struct GNUNET_TIME_Absolute *now = cls;
@@ -131,8 +130,8 @@ discard_expired (void *cls,
131 if (now->abs_value > expiration.abs_value) 130 if (now->abs_value > expiration.abs_value)
132 { 131 {
133 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 132 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
134 _("Removing expired address of transport `%s'\n"), 133 _("Removing expired address of transport `%s'\n"),
135 address->transport_name); 134 address->transport_name);
136 return GNUNET_NO; 135 return GNUNET_NO;
137 } 136 }
138 return GNUNET_OK; 137 return GNUNET_OK;
diff --git a/src/peerinfo/perf_peerinfo_api.c b/src/peerinfo/perf_peerinfo_api.c
index c4e6dcc12..38bbb828f 100755
--- a/src/peerinfo/perf_peerinfo_api.c
+++ b/src/peerinfo/perf_peerinfo_api.c
@@ -50,8 +50,8 @@ static struct GNUNET_PeerIdentity pid;
50 50
51 51
52static int 52static int
53check_it (void *cls, 53check_it (void *cls, const struct GNUNET_HELLO_Address *address,
54 const struct GNUNET_HELLO_Address *address, struct GNUNET_TIME_Absolute expiration) 54 struct GNUNET_TIME_Absolute expiration)
55{ 55{
56#if DEBUG 56#if DEBUG
57 if (addrlen > 0) 57 if (addrlen > 0)
@@ -80,7 +80,7 @@ address_generator (void *cls, size_t max, void *buf)
80 address.address = caddress; 80 address.address = caddress;
81 address.transport_name = "peerinfotest"; 81 address.transport_name = "peerinfotest";
82 ret = 82 ret =
83 GNUNET_HELLO_add_address (&address, 83 GNUNET_HELLO_add_address (&address,
84 GNUNET_TIME_relative_to_absolute 84 GNUNET_TIME_relative_to_absolute
85 (GNUNET_TIME_UNIT_HOURS), buf, max); 85 (GNUNET_TIME_UNIT_HOURS), buf, max);
86 GNUNET_free (caddress); 86 GNUNET_free (caddress);
diff --git a/src/peerinfo/test_peerinfo_api.c b/src/peerinfo/test_peerinfo_api.c
index 607c1fa4e..fbd12c387 100644
--- a/src/peerinfo/test_peerinfo_api.c
+++ b/src/peerinfo/test_peerinfo_api.c
@@ -45,16 +45,17 @@ static struct GNUNET_PEERINFO_Handle *h;
45static unsigned int retries; 45static unsigned int retries;
46 46
47static int 47static int
48check_it (void *cls, 48check_it (void *cls, const struct GNUNET_HELLO_Address *address,
49 const struct GNUNET_HELLO_Address *address, 49 struct GNUNET_TIME_Absolute expiration)
50 struct GNUNET_TIME_Absolute expiration)
51{ 50{
52 unsigned int *agc = cls; 51 unsigned int *agc = cls;
53 52
54 if (address != NULL) 53 if (address != NULL)
55 { 54 {
56 GNUNET_assert (0 == strcmp ("peerinfotest", address->transport_name)); 55 GNUNET_assert (0 == strcmp ("peerinfotest", address->transport_name));
57 GNUNET_assert (0 == strncmp ("Address", address->address, address->address_length)); 56 GNUNET_assert (0 ==
57 strncmp ("Address", address->address,
58 address->address_length));
58 (*agc) -= (1 << (address->address_length - 1)); 59 (*agc) -= (1 << (address->address_length - 1));
59 } 60 }
60 return GNUNET_OK; 61 return GNUNET_OK;
@@ -75,10 +76,9 @@ address_generator (void *cls, size_t max, void *buf)
75 address.transport_name = "peerinfotest"; 76 address.transport_name = "peerinfotest";
76 address.address_length = *agc; 77 address.address_length = *agc;
77 ret = 78 ret =
78 GNUNET_HELLO_add_address (&address, 79 GNUNET_HELLO_add_address (&address,
79 GNUNET_TIME_relative_to_absolute 80 GNUNET_TIME_relative_to_absolute
80 (GNUNET_TIME_UNIT_HOURS), buf, 81 (GNUNET_TIME_UNIT_HOURS), buf, max);
81 max);
82 (*agc)--; 82 (*agc)--;
83 return ret; 83 return ret;
84} 84}
diff --git a/src/testing/test_testing_2dtorus.c b/src/testing/test_testing_2dtorus.c
index f1ddff0ea..7b109bca4 100644
--- a/src/testing/test_testing_2dtorus.c
+++ b/src/testing/test_testing_2dtorus.c
@@ -104,8 +104,7 @@ shutdown_callback (void *cls, const char *emsg)
104 if (emsg != NULL) 104 if (emsg != NULL)
105 { 105 {
106#if VERBOSE 106#if VERBOSE
107 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 107 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Shutdown of peers failed!\n");
108 "test: Shutdown of peers failed!\n");
109#endif 108#endif
110 ok--; 109 ok--;
111 } 110 }
@@ -123,8 +122,7 @@ static void
123shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 122shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
124{ 123{
125#if VERBOSE 124#if VERBOSE
126 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 125 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n");
127 "test: Ending test.\n");
128#endif 126#endif
129 127
130 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); 128 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
@@ -135,8 +133,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
135static void 133static void
136disconnect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 134disconnect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
137{ 135{
138 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 136 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: disconnecting peers\n");
139 "test: disconnecting peers\n");
140 137
141 if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle) 138 if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle)
142 { 139 {
@@ -163,33 +160,26 @@ topo_cb (void *cls, const struct GNUNET_PeerIdentity *first,
163 topo_connections++; 160 topo_connections++;
164 if (NULL != emsg) 161 if (NULL != emsg)
165 { 162 {
166 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 163 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "test: Error by topo %u: %s\n",
167 "test: Error by topo %u: %s\n",
168 topo_connections, emsg); 164 topo_connections, emsg);
169 } 165 }
170 else 166 else
171 { 167 {
172 if (first == NULL || second == NULL) 168 if (first == NULL || second == NULL)
173 { 169 {
174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 170 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Connection %u NULL\n",
175 "test: Connection %u NULL\n",
176 topo_connections); 171 topo_connections);
177 if (disconnect_task != GNUNET_SCHEDULER_NO_TASK) 172 if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
178 { 173 {
179 GNUNET_SCHEDULER_cancel (disconnect_task); 174 GNUNET_SCHEDULER_cancel (disconnect_task);
180 GNUNET_SCHEDULER_add_now(&disconnect_peers, NULL); 175 GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL);
181 } 176 }
182 return; 177 return;
183 } 178 }
184 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 179 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Connection %u ok\n",
185 "test: Connection %u ok\n",
186 topo_connections); 180 topo_connections);
187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 181 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: %s\n", GNUNET_i2s (first));
188 "test: %s\n", 182 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: %s\n", GNUNET_i2s (second));
189 GNUNET_i2s (first));
190 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
191 "test: %s\n",
192 GNUNET_i2s (second));
193 } 183 }
194} 184}
195 185
@@ -206,8 +196,8 @@ peergroup_ready (void *cls, const char *emsg)
206 { 196 {
207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 197 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
208 "test: Peergroup callback called with error, aborting test!\n"); 198 "test: Peergroup callback called with error, aborting test!\n");
209 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 199 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Error from testing: `%s'\n",
210 "test: Error from testing: `%s'\n", emsg); 200 emsg);
211 ok--; 201 ok--;
212 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); 202 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
213 return; 203 return;
@@ -217,8 +207,7 @@ peergroup_ready (void *cls, const char *emsg)
217 "************************************************************\n"); 207 "************************************************************\n");
218 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
219 "test: Peer Group started successfully!\n"); 209 "test: Peer Group started successfully!\n");
220 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 210 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Have %u connections\n",
221 "test: Have %u connections\n",
222 total_connections); 211 total_connections);
223#endif 212#endif
224 213
@@ -226,8 +215,7 @@ peergroup_ready (void *cls, const char *emsg)
226 if (0 < failed_connections) 215 if (0 < failed_connections)
227 { 216 {
228 ok = GNUNET_SYSERR; 217 ok = GNUNET_SYSERR;
229 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 218 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "test: %u connections have FAILED!\n",
230 "test: %u connections have FAILED!\n",
231 failed_connections); 219 failed_connections);
232 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL); 220 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL);
233 221
@@ -273,12 +261,9 @@ connect_cb (void *cls, const struct GNUNET_PeerIdentity *first,
273 { 261 {
274 failed_connections++; 262 failed_connections++;
275 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 263 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
276 "test: Problem with new connection (%s)\n", 264 "test: Problem with new connection (%s)\n", emsg);
277 emsg); 265 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: (%s)\n", GNUNET_i2s (first));
278 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: (%s)\n", 266 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: (%s)\n", GNUNET_i2s (second));
279 GNUNET_i2s (first));
280 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: (%s)\n",
281 GNUNET_i2s (second));
282 } 267 }
283 268
284} 269}
@@ -311,8 +296,7 @@ run (void *cls, char *const *args, const char *cfgfile,
311 NULL); 296 NULL);
312 297
313#if VERBOSE 298#if VERBOSE
314 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 299 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n");
315 "test: Starting daemons.\n");
316 GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing", 300 GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing",
317 "use_progressbars", "YES"); 301 "use_progressbars", "YES");
318#endif 302#endif
@@ -371,15 +355,14 @@ main (int argc, char *argv[])
371 355
372 GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, 356 GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2,
373 "test_testing_2dtorus", 357 "test_testing_2dtorus",
374 gettext_noop ("Test testing 2d torus."), options, 358 gettext_noop ("Test testing 2d torus."), options, &run,
375 &run, NULL); 359 NULL);
376#if REMOVE_DIR 360#if REMOVE_DIR
377 GNUNET_DISK_directory_remove ("/tmp/test_testing_2dtorus"); 361 GNUNET_DISK_directory_remove ("/tmp/test_testing_2dtorus");
378#endif 362#endif
379 if (GNUNET_OK != ok) 363 if (GNUNET_OK != ok)
380 { 364 {
381 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 365 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "test: FAILED!\n");
382 "test: FAILED!\n");
383 return 1; 366 return 1;
384 } 367 }
385 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: success\n"); 368 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: success\n");
diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c
index a27154507..08b1df5b9 100644
--- a/src/testing/test_testing_large_topology.c
+++ b/src/testing/test_testing_large_topology.c
@@ -1045,7 +1045,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1045 1045
1046 if (GNUNET_OK != 1046 if (GNUNET_OK !=
1047 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "SETTLE_TIME", 1047 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "SETTLE_TIME",
1048 &settle_time)) 1048 &settle_time))
1049 { 1049 {
1050 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", 1050 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
1051 "testing", "SETTLE_TIME"); 1051 "testing", "SETTLE_TIME");
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index ba092220a..f60ac3a1a 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -1102,7 +1102,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1102 1102
1103 if (GNUNET_OK != 1103 if (GNUNET_OK !=
1104 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "SETTLE_TIME", 1104 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "SETTLE_TIME",
1105 &settle_time)) 1105 &settle_time))
1106 { 1106 {
1107 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", 1107 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
1108 "testing", "SETTLE_TIME"); 1108 "testing", "SETTLE_TIME");
@@ -1111,7 +1111,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1111 1111
1112 if (GNUNET_OK != 1112 if (GNUNET_OK !=
1113 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT", 1113 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT",
1114 &connect_timeout)) 1114 &connect_timeout))
1115 { 1115 {
1116 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", 1116 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
1117 "testing", "CONNECT_TIMEOUT"); 1117 "testing", "CONNECT_TIMEOUT");
diff --git a/src/testing/test_testing_topology_blacklist.c b/src/testing/test_testing_topology_blacklist.c
index d53fc8cbe..d45d1bbb4 100644
--- a/src/testing/test_testing_topology_blacklist.c
+++ b/src/testing/test_testing_topology_blacklist.c
@@ -486,7 +486,7 @@ run (void *cls, char *const *args, const char *cfgfile,
486 486
487 if (GNUNET_OK != 487 if (GNUNET_OK !=
488 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT", 488 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT",
489 &connect_timeout)) 489 &connect_timeout))
490 { 490 {
491 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", 491 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
492 "testing", "CONNECT_TIMEOUT"); 492 "testing", "CONNECT_TIMEOUT");
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 9ba58de61..d7f6946b0 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -65,8 +65,7 @@ static struct GNUNET_CORE_MessageHandler no_handlers[] = { {NULL, 0, 0} };
65 65
66#if EMPTY_HACK 66#if EMPTY_HACK
67static int 67static int
68test_address (void *cls, 68test_address (void *cls, const struct GNUNET_HELLO_Address *address,
69 const struct GNUNET_HELLO_Address *address,
70 struct GNUNET_TIME_Absolute expiration) 69 struct GNUNET_TIME_Absolute expiration)
71{ 70{
72 int *empty = cls; 71 int *empty = cls;
@@ -108,7 +107,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
108#endif 107#endif
109 GNUNET_assert (daemon->phase == SP_GET_HELLO || 108 GNUNET_assert (daemon->phase == SP_GET_HELLO ||
110 daemon->phase == SP_START_DONE); 109 daemon->phase == SP_START_DONE);
111 daemon->cb = NULL; // FIXME: why??? (see fsm:SP_START_CORE, notify_daemon_started) 110 daemon->cb = NULL; // FIXME: why??? (see fsm:SP_START_CORE, notify_daemon_started)
112 if (daemon->task != GNUNET_SCHEDULER_NO_TASK) /* Assertion here instead? */ 111 if (daemon->task != GNUNET_SCHEDULER_NO_TASK) /* Assertion here instead? */
113 GNUNET_SCHEDULER_cancel (daemon->task); 112 GNUNET_SCHEDULER_cancel (daemon->task);
114 113
@@ -551,9 +550,9 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
551 GNUNET_free_non_null (d->username); 550 GNUNET_free_non_null (d->username);
552 GNUNET_free (d->proc); 551 GNUNET_free (d->proc);
553// GNUNET_free (d); // FIXME (could this leak) 552// GNUNET_free (d); // FIXME (could this leak)
554 d->hostname = NULL; // Quick hack to avoid crashing (testing need to be 553 d->hostname = NULL; // Quick hack to avoid crashing (testing need to be
555 d->cfg = NULL; // overhauled anyway, and the error managing is 554 d->cfg = NULL; // overhauled anyway, and the error managing is
556 // pretty broken anyway. 555 // pretty broken anyway.
557 return; 556 return;
558 } 557 }
559 /* wait some more */ 558 /* wait some more */
@@ -2037,8 +2036,7 @@ reattempt_daemons_connect (void *cls,
2037 if (NULL != ctx->d2->hello) 2036 if (NULL != ctx->d2->hello)
2038 { 2037 {
2039#if DEBUG_TESTING_RECONNECT 2038#if DEBUG_TESTING_RECONNECT
2040 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2039 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "updating %s's HELLO\n",
2041 "updating %s's HELLO\n",
2042 ctx->d2->shortname); 2040 ctx->d2->shortname);
2043#endif 2041#endif
2044 GNUNET_free (ctx->d2->hello); 2042 GNUNET_free (ctx->d2->hello);
@@ -2059,8 +2057,7 @@ reattempt_daemons_connect (void *cls,
2059#if DEBUG_TESTING_RECONNECT 2057#if DEBUG_TESTING_RECONNECT
2060 else 2058 else
2061 { 2059 {
2062 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2060 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "didn't have %s's HELLO\n",
2063 "didn't have %s's HELLO\n",
2064 ctx->d2->shortname); 2061 ctx->d2->shortname);
2065 } 2062 }
2066#endif 2063#endif
@@ -2103,8 +2100,7 @@ reattempt_daemons_connect (void *cls,
2103 if (ctx->send_hello == GNUNET_YES) 2100 if (ctx->send_hello == GNUNET_YES)
2104 { 2101 {
2105#if DEBUG_TESTING_RECONNECT 2102#if DEBUG_TESTING_RECONNECT
2106 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2103 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending %s's HELLO to %s\n",
2107 "Sending %s's HELLO to %s\n",
2108 ctx->d1->shortname, ctx->d2->shortname); 2104 ctx->d1->shortname, ctx->d2->shortname);
2109#endif 2105#endif
2110 ctx->d1th = 2106 ctx->d1th =
@@ -2126,8 +2122,7 @@ reattempt_daemons_connect (void *cls,
2126 else 2122 else
2127 { 2123 {
2128#if DEBUG_TESTING_RECONNECT 2124#if DEBUG_TESTING_RECONNECT
2129 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2125 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Trying to reconnect %s to %s\n",
2130 "Trying to reconnect %s to %s\n",
2131 ctx->d1->shortname, ctx->d2->shortname); 2126 ctx->d1->shortname, ctx->d2->shortname);
2132#endif 2127#endif
2133 GNUNET_TRANSPORT_try_connect (ctx->d1th, &ctx->d2->id); 2128 GNUNET_TRANSPORT_try_connect (ctx->d1th, &ctx->d2->id);
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index f22bb2bff..26aac5e7c 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -5554,7 +5554,7 @@ internal_startup_callback (void *cls, const struct GNUNET_PeerIdentity *id,
5554 * Calls GNUNET_TESTING_daemon_continue_startup to set the daemon's state 5554 * Calls GNUNET_TESTING_daemon_continue_startup to set the daemon's state
5555 * from HOSTKEY_CREATED to TOPOLOGY_SETUP. Makes sure not to saturate a host 5555 * from HOSTKEY_CREATED to TOPOLOGY_SETUP. Makes sure not to saturate a host
5556 * with requests delaying them when needed. 5556 * with requests delaying them when needed.
5557 * 5557 *
5558 * @param cls closure: internal context of the daemon. 5558 * @param cls closure: internal context of the daemon.
5559 * @param tc TaskContext 5559 * @param tc TaskContext
5560 */ 5560 */
@@ -5563,6 +5563,7 @@ internal_continue_startup (void *cls,
5563 const struct GNUNET_SCHEDULER_TaskContext *tc) 5563 const struct GNUNET_SCHEDULER_TaskContext *tc)
5564{ 5564{
5565 struct InternalStartContext *internal_context = cls; 5565 struct InternalStartContext *internal_context = cls;
5566
5566 internal_context->peer->startup_task = GNUNET_SCHEDULER_NO_TASK; 5567 internal_context->peer->startup_task = GNUNET_SCHEDULER_NO_TASK;
5567 5568
5568 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 5569 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
@@ -5586,9 +5587,11 @@ internal_continue_startup (void *cls,
5586 } 5587 }
5587 else 5588 else
5588 { 5589 {
5589 internal_context->peer->startup_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply 5590 internal_context->peer->startup_task =
5590 (GNUNET_TIME_UNIT_MILLISECONDS, 100), 5591 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
5591 &internal_continue_startup, internal_context); 5592 (GNUNET_TIME_UNIT_MILLISECONDS, 100),
5593 &internal_continue_startup,
5594 internal_context);
5592 } 5595 }
5593} 5596}
5594 5597
@@ -5894,16 +5897,18 @@ GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg)
5894 pg->starting = 0; 5897 pg->starting = 0;
5895 for (i = 0; i < pg->total; i++) 5898 for (i = 0; i < pg->total; i++)
5896 { 5899 {
5897 pg->peers[i].startup_task = GNUNET_SCHEDULER_add_now (&internal_continue_startup, 5900 pg->peers[i].startup_task =
5898 &pg->peers[i].internal_context); 5901 GNUNET_SCHEDULER_add_now (&internal_continue_startup,
5902 &pg->peers[i].internal_context);
5899 } 5903 }
5900 } 5904 }
5901#else 5905#else
5902 pg->starting = 0; 5906 pg->starting = 0;
5903 for (i = 0; i < pg->total; i++) 5907 for (i = 0; i < pg->total; i++)
5904 { 5908 {
5905 pg->peers[i].startup_task = GNUNET_SCHEDULER_add_now (&internal_continue_startup, 5909 pg->peers[i].startup_task =
5906 &pg->peers[i].internal_context); 5910 GNUNET_SCHEDULER_add_now (&internal_continue_startup,
5911 &pg->peers[i].internal_context);
5907 } 5912 }
5908#endif 5913#endif
5909} 5914}
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c
index aee9b8a50..1d9d3ba88 100644
--- a/src/testing/testing_peergroup.c
+++ b/src/testing/testing_peergroup.c
@@ -46,7 +46,7 @@ struct PeerGroupStartupContext
46 unsigned int total; 46 unsigned int total;
47 unsigned int peers_left; 47 unsigned int peers_left;
48 unsigned long long max_concurrent_connections; 48 unsigned long long max_concurrent_connections;
49 49
50 /** 50 /**
51 * Maximum attemps to connect two daemons. 51 * Maximum attemps to connect two daemons.
52 */ 52 */
@@ -56,7 +56,7 @@ struct PeerGroupStartupContext
56 * How long to spend trying to establish all the connections? 56 * How long to spend trying to establish all the connections?
57 */ 57 */
58 struct GNUNET_TIME_Relative connect_timeout; 58 struct GNUNET_TIME_Relative connect_timeout;
59 59
60 unsigned long long max_concurrent_ssh; 60 unsigned long long max_concurrent_ssh;
61 struct GNUNET_TIME_Absolute timeout; 61 struct GNUNET_TIME_Absolute timeout;
62 GNUNET_TESTING_NotifyConnection connect_cb; 62 GNUNET_TESTING_NotifyConnection connect_cb;
@@ -508,7 +508,7 @@ internal_peers_started_callback (void *cls,
508 pg_start_ctx->connect_topology, 508 pg_start_ctx->connect_topology,
509 pg_start_ctx->connect_topology_option, 509 pg_start_ctx->connect_topology_option,
510 pg_start_ctx->connect_topology_option_modifier, 510 pg_start_ctx->connect_topology_option_modifier,
511 pg_start_ctx->connect_timeout, 511 pg_start_ctx->connect_timeout,
512 pg_start_ctx->connect_attempts, NULL, 512 pg_start_ctx->connect_attempts, NULL,
513 NULL); 513 NULL);
514 514
@@ -755,9 +755,9 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
755 755
756 if (GNUNET_OK != 756 if (GNUNET_OK !=
757 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT", 757 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "CONNECT_TIMEOUT",
758 &pg_start_ctx->connect_timeout)) 758 &pg_start_ctx->connect_timeout))
759 { 759 {
760 pg_start_ctx->connect_timeout = DEFAULT_CONNECT_TIMEOUT; 760 pg_start_ctx->connect_timeout = DEFAULT_CONNECT_TIMEOUT;
761 } 761 }
762 762
763 if (GNUNET_OK != 763 if (GNUNET_OK !=
@@ -794,17 +794,15 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
794 } 794 }
795 795
796 if (GNUNET_OK != 796 if (GNUNET_OK !=
797 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", 797 GNUNET_CONFIGURATION_get_value_time (cfg, "testing", "PEERGROUP_TIMEOUT",
798 "PEERGROUP_TIMEOUT", 798 &rtimeout))
799 &rtimeout))
800 { 799 {
801 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", 800 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
802 "testing", "PEERGROUP_TIMEOUT"); 801 "testing", "PEERGROUP_TIMEOUT");
803 GNUNET_free (pg_start_ctx); 802 GNUNET_free (pg_start_ctx);
804 return NULL; 803 return NULL;
805 } 804 }
806 pg_start_ctx->timeout = 805 pg_start_ctx->timeout = GNUNET_TIME_relative_to_absolute (rtimeout);
807 GNUNET_TIME_relative_to_absolute (rtimeout);
808 806
809 807
810 /* Read topology related options from the configuration file */ 808 /* Read topology related options from the configuration file */
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index b148f289b..d4d8828d0 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -90,7 +90,7 @@ static void
90transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target, 90transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target,
91 const struct GNUNET_ATS_Information *ats, 91 const struct GNUNET_ATS_Information *ats,
92 uint32_t ats_count, 92 uint32_t ats_count,
93 const struct GNUNET_HELLO_Address *address) 93 const struct GNUNET_HELLO_Address *address)
94{ 94{
95 const struct GNUNET_MessageHeader *hello = cls; 95 const struct GNUNET_MessageHeader *hello = cls;
96 96
@@ -136,7 +136,7 @@ process_payload (const struct GNUNET_PeerIdentity *peer,
136 size_t msg_size = ntohs (message->size); 136 size_t msg_size = ntohs (message->size);
137 size_t size = 137 size_t size =
138 sizeof (struct InboundMessage) + msg_size + 138 sizeof (struct InboundMessage) + msg_size +
139 sizeof (struct GNUNET_ATS_Information) * (ats_count + 1); 139 sizeof (struct GNUNET_ATS_Information) * (ats_count + 1);
140 char buf[size]; 140 char buf[size];
141 struct GNUNET_ATS_Information *ap; 141 struct GNUNET_ATS_Information *ap;
142 142
@@ -168,10 +168,11 @@ process_payload (const struct GNUNET_PeerIdentity *peer,
168 ap = (struct GNUNET_ATS_Information *) &im[1]; 168 ap = (struct GNUNET_ATS_Information *) &im[1];
169 memcpy (ap, ats, ats_count * sizeof (struct GNUNET_ATS_Information)); 169 memcpy (ap, ats, ats_count * sizeof (struct GNUNET_ATS_Information));
170 ap[ats_count].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY); 170 ap[ats_count].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
171 ap[ats_count].value = htonl ((uint32_t) GST_neighbour_get_latency (peer).rel_value); 171 ap[ats_count].value =
172 htonl ((uint32_t) GST_neighbour_get_latency (peer).rel_value);
172 memcpy (&ap[ats_count + 1], message, ntohs (message->size)); 173 memcpy (&ap[ats_count + 1], message, ntohs (message->size));
173 174
174 GNUNET_ATS_address_update (GST_ats, address, session, ap, ats_count +1 ); 175 GNUNET_ATS_address_update (GST_ats, address, session, ap, ats_count + 1);
175 GST_clients_broadcast (&im->header, GNUNET_YES); 176 GST_clients_broadcast (&im->header, GNUNET_YES);
176 177
177 return ret; 178 return ret;
@@ -202,8 +203,7 @@ process_payload (const struct GNUNET_PeerIdentity *peer,
202 * (plugins that do not support this, can ignore the return value) 203 * (plugins that do not support this, can ignore the return value)
203 */ 204 */
204static struct GNUNET_TIME_Relative 205static struct GNUNET_TIME_Relative
205plugin_env_receive_callback (void *cls, 206plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
206 const struct GNUNET_PeerIdentity *peer,
207 const struct GNUNET_MessageHeader *message, 207 const struct GNUNET_MessageHeader *message,
208 const struct GNUNET_ATS_Information *ats, 208 const struct GNUNET_ATS_Information *ats,
209 uint32_t ats_count, struct Session *session, 209 uint32_t ats_count, struct Session *session,
@@ -237,8 +237,8 @@ plugin_env_receive_callback (void *cls,
237#if DEBUG_TRANSPORT 237#if DEBUG_TRANSPORT
238 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 238 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
239 "Processing `%s' from `%s'\n", "PING", 239 "Processing `%s' from `%s'\n", "PING",
240 (sender_address != NULL) ? GST_plugins_a2s (&address) 240 (sender_address !=
241 : "<inbound>"); 241 NULL) ? GST_plugins_a2s (&address) : "<inbound>");
242#endif 242#endif
243 GST_validation_handle_ping (peer, message, &address, session); 243 GST_validation_handle_ping (peer, message, &address, session);
244 break; 244 break;
@@ -246,20 +246,22 @@ plugin_env_receive_callback (void *cls,
246#if DEBUG_TRANSPORT 246#if DEBUG_TRANSPORT
247 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 247 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
248 "Processing `%s' from `%s'\n", "PONG", 248 "Processing `%s' from `%s'\n", "PONG",
249 (sender_address != NULL) ? GST_plugins_a2s (&address) 249 (sender_address !=
250 : "<inbound>"); 250 NULL) ? GST_plugins_a2s (&address) : "<inbound>");
251#endif 251#endif
252 GST_validation_handle_pong (peer, message); 252 GST_validation_handle_pong (peer, message);
253 break; 253 break;
254 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT: 254 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT:
255 GST_neighbours_handle_connect (message, peer, &address, session, ats, ats_count); 255 GST_neighbours_handle_connect (message, peer, &address, session, ats,
256 ats_count);
256 break; 257 break;
257 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT_ACK: 258 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT_ACK:
258 GST_neighbours_handle_connect_ack (message, peer, &address, 259 GST_neighbours_handle_connect_ack (message, peer, &address, session, ats,
259 session, ats, ats_count); 260 ats_count);
260 break; 261 break;
261 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_ACK: 262 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_ACK:
262 GST_neighbours_handle_ack (message, peer, &address, session, ats, ats_count); 263 GST_neighbours_handle_ack (message, peer, &address, session, ats,
264 ats_count);
263 break; 265 break;
264 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT: 266 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT:
265 GST_neighbours_handle_disconnect_message (peer, message); 267 GST_neighbours_handle_disconnect_message (peer, message);
@@ -336,7 +338,7 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
336 const char *transport_name = cls; 338 const char *transport_name = cls;
337 struct GNUNET_HELLO_Address address; 339 struct GNUNET_HELLO_Address address;
338 340
339 GNUNET_assert (strlen(transport_name) > 0); 341 GNUNET_assert (strlen (transport_name) > 0);
340#if DEBUG_TRANSPORT 342#if DEBUG_TRANSPORT
341 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Session %X to peer `%s' ended \n", 343 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Session %X to peer `%s' ended \n",
342 session, GNUNET_i2s (peer)); 344 session, GNUNET_i2s (peer));
@@ -369,8 +371,8 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
369 * @param bandwidth_in assigned inbound bandwidth for the connection, 0 to disconnect from peer 371 * @param bandwidth_in assigned inbound bandwidth for the connection, 0 to disconnect from peer
370 */ 372 */
371static void 373static void
372ats_request_address_change (void *cls, 374ats_request_address_change (void *cls,
373 const struct GNUNET_HELLO_Address *address, 375 const struct GNUNET_HELLO_Address *address,
374 struct Session *session, 376 struct Session *session,
375 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 377 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
376 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 378 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
@@ -392,8 +394,7 @@ ats_request_address_change (void *cls,
392 return; 394 return;
393 } 395 }
394 /* will never return GNUNET_YES since connection is to be established */ 396 /* will never return GNUNET_YES since connection is to be established */
395 GST_neighbours_switch_to_address_3way (&address->peer, 397 GST_neighbours_switch_to_address_3way (&address->peer, address, session, ats,
396 address, session, ats,
397 ats_count, bandwidth_in, 398 ats_count, bandwidth_in,
398 bandwidth_out); 399 bandwidth_out);
399} 400}
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c
index b3edc01db..105f1fcaf 100644
--- a/src/transport/gnunet-service-transport_blacklist.c
+++ b/src/transport/gnunet-service-transport_blacklist.c
@@ -556,7 +556,7 @@ static void
556test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour, 556test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour,
557 const struct GNUNET_ATS_Information *ats, 557 const struct GNUNET_ATS_Information *ats,
558 uint32_t ats_count, 558 uint32_t ats_count,
559 const struct GNUNET_HELLO_Address *address) 559 const struct GNUNET_HELLO_Address *address)
560{ 560{
561 struct TestConnectionContext *tcc = cls; 561 struct TestConnectionContext *tcc = cls;
562 struct GST_BlacklistCheck *bc; 562 struct GST_BlacklistCheck *bc;
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c
index 2aea7aa7e..da6201d97 100644
--- a/src/transport/gnunet-service-transport_clients.c
+++ b/src/transport/gnunet-service-transport_clients.c
@@ -331,8 +331,8 @@ static void
331notify_client_about_neighbour (void *cls, 331notify_client_about_neighbour (void *cls,
332 const struct GNUNET_PeerIdentity *peer, 332 const struct GNUNET_PeerIdentity *peer,
333 const struct GNUNET_ATS_Information *ats, 333 const struct GNUNET_ATS_Information *ats,
334 uint32_t ats_count, 334 uint32_t ats_count,
335 const struct GNUNET_HELLO_Address *address) 335 const struct GNUNET_HELLO_Address *address)
336{ 336{
337 struct TransportClient *tc = cls; 337 struct TransportClient *tc = cls;
338 struct ConnectInfoMessage *cim; 338 struct ConnectInfoMessage *cim;
@@ -633,8 +633,9 @@ transmit_address_to_client (void *cls, const char *buf)
633 * @param message the resolution request 633 * @param message the resolution request
634 */ 634 */
635static void 635static void
636clients_handle_address_to_string (void *cls, struct GNUNET_SERVER_Client *client, 636clients_handle_address_to_string (void *cls,
637 const struct GNUNET_MessageHeader *message) 637 struct GNUNET_SERVER_Client *client,
638 const struct GNUNET_MessageHeader *message)
638{ 639{
639 const struct AddressLookupMessage *alum; 640 const struct AddressLookupMessage *alum;
640 struct GNUNET_TRANSPORT_PluginFunctions *papi; 641 struct GNUNET_TRANSPORT_PluginFunctions *papi;
@@ -699,34 +700,38 @@ clients_handle_address_to_string (void *cls, struct GNUNET_SERVER_Client *client
699 */ 700 */
700static void 701static void
701output_address (void *cls, const struct GNUNET_PeerIdentity *peer, 702output_address (void *cls, const struct GNUNET_PeerIdentity *peer,
702 const struct GNUNET_ATS_Information *ats, uint32_t ats_count, 703 const struct GNUNET_ATS_Information *ats, uint32_t ats_count,
703 const struct GNUNET_HELLO_Address *address) 704 const struct GNUNET_HELLO_Address *address)
704{ 705{
705 struct GNUNET_SERVER_TransmitContext *tc = cls; 706 struct GNUNET_SERVER_TransmitContext *tc = cls;
706 struct AddressIterateResponseMessage *msg; 707 struct AddressIterateResponseMessage *msg;
707 size_t size; 708 size_t size;
708 size_t tlen; 709 size_t tlen;
709 size_t alen; 710 size_t alen;
710 char * addr; 711 char *addr;
711 712
712 tlen = strlen (address->transport_name) + 1; 713 tlen = strlen (address->transport_name) + 1;
713 alen = address->address_length; 714 alen = address->address_length;
714 size = (sizeof (struct AddressIterateResponseMessage) + alen + tlen); 715 size = (sizeof (struct AddressIterateResponseMessage) + alen + tlen);
715 { 716 {
716 char buf[size]; 717 char buf[size];
717 718
718 msg = (struct AddressIterateResponseMessage*) buf; 719 msg = (struct AddressIterateResponseMessage *) buf;
719 msg->reserved = htonl (0); 720 msg->reserved = htonl (0);
720 msg->peer = *peer; 721 msg->peer = *peer;
721 msg->addrlen = htonl (alen); 722 msg->addrlen = htonl (alen);
722 msg->pluginlen = htonl (tlen); 723 msg->pluginlen = htonl (tlen);
723 addr = (char *) &msg[1]; 724 addr = (char *) &msg[1];
724 memcpy (addr,address->address, alen); 725 memcpy (addr, address->address, alen);
725 memcpy (&addr[alen], address->transport_name, tlen); 726 memcpy (&addr[alen], address->transport_name, tlen);
726 GNUNET_SERVER_transmit_context_append_data (tc, 727 GNUNET_SERVER_transmit_context_append_data (tc,
727 &buf[sizeof(struct GNUNET_MessageHeader)], 728 &buf[sizeof
728 size - sizeof (struct GNUNET_MessageHeader), 729 (struct
729 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE); 730 GNUNET_MessageHeader)],
731 size -
732 sizeof (struct
733 GNUNET_MessageHeader),
734 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE);
730 } 735 }
731} 736}
732 737
@@ -746,7 +751,7 @@ clients_handle_address_iterate (void *cls, struct GNUNET_SERVER_Client *client,
746{ 751{
747 static struct GNUNET_PeerIdentity all_zeros; 752 static struct GNUNET_PeerIdentity all_zeros;
748 struct GNUNET_SERVER_TransmitContext *tc; 753 struct GNUNET_SERVER_TransmitContext *tc;
749 struct AddressIterateMessage * msg; 754 struct AddressIterateMessage *msg;
750 struct GNUNET_HELLO_Address *address; 755 struct GNUNET_HELLO_Address *address;
751 756
752 if (ntohs (message->type) != GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE) 757 if (ntohs (message->type) != GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE)
@@ -765,7 +770,7 @@ clients_handle_address_iterate (void *cls, struct GNUNET_SERVER_Client *client,
765 if (GNUNET_YES != ntohl (msg->one_shot)) 770 if (GNUNET_YES != ntohl (msg->one_shot))
766 { 771 {
767 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 772 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
768 "Address monitoring not implemented\n"); 773 "Address monitoring not implemented\n");
769 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 774 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
770 return; 775 return;
771 } 776 }
@@ -779,12 +784,12 @@ clients_handle_address_iterate (void *cls, struct GNUNET_SERVER_Client *client,
779 else 784 else
780 { 785 {
781 /* just return one neighbour */ 786 /* just return one neighbour */
782 address = GST_neighbour_get_current_address(&msg->peer); 787 address = GST_neighbour_get_current_address (&msg->peer);
783 if (address != NULL) 788 if (address != NULL)
784 output_address (tc, &msg->peer, NULL, 0, address); 789 output_address (tc, &msg->peer, NULL, 0, address);
785 } 790 }
786 GNUNET_SERVER_transmit_context_append_data (tc, NULL, 0, 791 GNUNET_SERVER_transmit_context_append_data (tc, NULL, 0,
787 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE); 792 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE);
788 GNUNET_SERVER_transmit_context_run (tc, GNUNET_TIME_UNIT_FOREVER_REL); 793 GNUNET_SERVER_transmit_context_run (tc, GNUNET_TIME_UNIT_FOREVER_REL);
789} 794}
790 795
@@ -809,7 +814,7 @@ GST_clients_start (struct GNUNET_SERVER_Handle *server)
809 sizeof (struct TransportRequestConnectMessage)}, 814 sizeof (struct TransportRequestConnectMessage)},
810 {&clients_handle_address_to_string, NULL, 815 {&clients_handle_address_to_string, NULL,
811 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING, 0}, 816 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING, 0},
812 {&clients_handle_address_iterate, NULL, 817 {&clients_handle_address_iterate, NULL,
813 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE, 818 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE,
814 sizeof (struct AddressIterateMessage)}, 819 sizeof (struct AddressIterateMessage)},
815 {&GST_blacklist_handle_init, NULL, 820 {&GST_blacklist_handle_init, NULL,
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index 8b38a673e..120f17668 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -138,8 +138,8 @@ address_generator (void *cls, size_t max, void *buf)
138 if (NULL == gc->addr_pos) 138 if (NULL == gc->addr_pos)
139 return 0; 139 return 0;
140 ret = 140 ret =
141 GNUNET_HELLO_add_address (gc->addr_pos->address, gc->expiration, 141 GNUNET_HELLO_add_address (gc->addr_pos->address, gc->expiration, buf,
142 buf, max); 142 max);
143 gc->addr_pos = gc->addr_pos->next; 143 gc->addr_pos = gc->addr_pos->next;
144 return ret; 144 return ret;
145} 145}
@@ -251,7 +251,7 @@ GST_hello_get ()
251 */ 251 */
252void 252void
253GST_hello_modify_addresses (int addremove, 253GST_hello_modify_addresses (int addremove,
254 const struct GNUNET_HELLO_Address *address) 254 const struct GNUNET_HELLO_Address *address)
255{ 255{
256 struct OwnAddressList *al; 256 struct OwnAddressList *al;
257 257
@@ -266,10 +266,8 @@ GST_hello_modify_addresses (int addremove,
266 if (GNUNET_NO == addremove) 266 if (GNUNET_NO == addremove)
267 { 267 {
268 for (al = oal_head; al != NULL; al = al->next) 268 for (al = oal_head; al != NULL; al = al->next)
269 if (0 == 269 if (0 == GNUNET_HELLO_address_cmp (address, al->address))
270 GNUNET_HELLO_address_cmp (address, 270 {
271 al->address))
272 {
273 GNUNET_CONTAINER_DLL_remove (oal_head, oal_tail, al); 271 GNUNET_CONTAINER_DLL_remove (oal_head, oal_tail, al);
274 GNUNET_HELLO_address_free (al->address); 272 GNUNET_HELLO_address_free (al->address);
275 GNUNET_free (al); 273 GNUNET_free (al);
@@ -305,8 +303,7 @@ GST_hello_test_address (const struct GNUNET_HELLO_Address *address,
305 struct OwnAddressList *al; 303 struct OwnAddressList *al;
306 304
307 for (al = oal_head; al != NULL; al = al->next) 305 for (al = oal_head; al != NULL; al = al->next)
308 if (0 == GNUNET_HELLO_address_cmp (address, 306 if (0 == GNUNET_HELLO_address_cmp (address, al->address))
309 al->address))
310 { 307 {
311 *sig = &al->pong_signature; 308 *sig = &al->pong_signature;
312 *sig_expiration = &al->pong_sig_expires; 309 *sig_expiration = &al->pong_sig_expires;
diff --git a/src/transport/gnunet-service-transport_hello.h b/src/transport/gnunet-service-transport_hello.h
index 168dd4364..605d19861 100644
--- a/src/transport/gnunet-service-transport_hello.h
+++ b/src/transport/gnunet-service-transport_hello.h
@@ -76,8 +76,8 @@ GST_hello_get (void);
76 * @param address address to add or remove 76 * @param address address to add or remove
77 */ 77 */
78void 78void
79GST_hello_modify_addresses (int addremove, 79GST_hello_modify_addresses (int addremove,
80 const struct GNUNET_HELLO_Address *address); 80 const struct GNUNET_HELLO_Address *address);
81 81
82 82
83/** 83/**
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 3024d8bc1..a0f6e2e42 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -190,22 +190,22 @@ struct MessageQueue
190enum State 190enum State
191{ 191{
192 /** 192 /**
193 * fresh peer or completely disconnected 193 * fresh peer or completely disconnected
194 */ 194 */
195 S_NOT_CONNECTED, 195 S_NOT_CONNECTED,
196 196
197 /** 197 /**
198 * sent CONNECT message to other peer, waiting for CONNECT_ACK 198 * sent CONNECT message to other peer, waiting for CONNECT_ACK
199 */ 199 */
200 S_CONNECT_SENT, 200 S_CONNECT_SENT,
201 201
202 /** 202 /**
203 * received CONNECT message to other peer, sending CONNECT_ACK 203 * received CONNECT message to other peer, sending CONNECT_ACK
204 */ 204 */
205 S_CONNECT_RECV, 205 S_CONNECT_RECV,
206 206
207 /** 207 /**
208 * received ACK or payload 208 * received ACK or payload
209 */ 209 */
210 S_CONNECTED, 210 S_CONNECTED,
211 211
@@ -215,7 +215,7 @@ enum State
215 S_FAST_RECONNECT, 215 S_FAST_RECONNECT,
216 216
217 /** 217 /**
218 * Disconnect in progress 218 * Disconnect in progress
219 */ 219 */
220 S_DISCONNECT 220 S_DISCONNECT
221}; 221};
@@ -452,6 +452,7 @@ static void
452reset_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 452reset_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
453{ 453{
454 struct NeighbourMapEntry *n = cls; 454 struct NeighbourMapEntry *n = cls;
455
455 if (n == NULL) 456 if (n == NULL)
456 return; 457 return;
457 458
@@ -472,7 +473,7 @@ reset_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
472 /* destroying address */ 473 /* destroying address */
473 if (n->address != NULL) 474 if (n->address != NULL)
474 { 475 {
475 GNUNET_assert (strlen(n->address->transport_name) > 0); 476 GNUNET_assert (strlen (n->address->transport_name) > 0);
476 GNUNET_ATS_address_destroyed (GST_ats, n->address, n->session); 477 GNUNET_ATS_address_destroyed (GST_ats, n->address, n->session);
477 } 478 }
478 479
@@ -522,6 +523,7 @@ change (struct NeighbourMapEntry *n, int state, int line)
522 { 523 {
523 char *old = GNUNET_strdup (print_state (n->state)); 524 char *old = GNUNET_strdup (print_state (n->state));
524 char *new = GNUNET_strdup (print_state (state)); 525 char *new = GNUNET_strdup (print_state (state));
526
525 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 527 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
526 "Illegal state transition from `%s' to `%s' in line %u \n", old, 528 "Illegal state transition from `%s' to `%s' in line %u \n", old,
527 new, line); 529 new, line);
@@ -534,6 +536,7 @@ change (struct NeighbourMapEntry *n, int state, int line)
534 { 536 {
535 char *old = GNUNET_strdup (print_state (n->state)); 537 char *old = GNUNET_strdup (print_state (n->state));
536 char *new = GNUNET_strdup (print_state (state)); 538 char *new = GNUNET_strdup (print_state (state));
539
537 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 540 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
538 "State for neighbour `%s' %X changed from `%s' to `%s' in line %u\n", 541 "State for neighbour `%s' %X changed from `%s' to `%s' in line %u\n",
539 GNUNET_i2s (&n->id), n, old, new, line); 542 GNUNET_i2s (&n->id), n, old, new, line);
@@ -551,8 +554,7 @@ change (struct NeighbourMapEntry *n, int state, int line)
551 if (n->state_reset != GNUNET_SCHEDULER_NO_TASK) 554 if (n->state_reset != GNUNET_SCHEDULER_NO_TASK)
552 GNUNET_SCHEDULER_cancel (n->state_reset); 555 GNUNET_SCHEDULER_cancel (n->state_reset);
553 n->state_reset = 556 n->state_reset =
554 GNUNET_SCHEDULER_add_delayed (SETUP_CONNECTION_TIMEOUT, &reset_task, 557 GNUNET_SCHEDULER_add_delayed (SETUP_CONNECTION_TIMEOUT, &reset_task, n);
555 n);
556 break; 558 break;
557 case S_CONNECTED: 559 case S_CONNECTED:
558 case S_NOT_CONNECTED: 560 case S_NOT_CONNECTED:
@@ -562,10 +564,10 @@ change (struct NeighbourMapEntry *n, int state, int line)
562#if DEBUG_TRANSPORT 564#if DEBUG_TRANSPORT
563 char *old = GNUNET_strdup (print_state (n->state)); 565 char *old = GNUNET_strdup (print_state (n->state));
564 char *new = GNUNET_strdup (print_state (state)); 566 char *new = GNUNET_strdup (print_state (state));
567
565 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 568 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
566 "Removed reset task for peer `%s' %s failed in state transition `%s' -> `%s' \n", 569 "Removed reset task for peer `%s' %s failed in state transition `%s' -> `%s' \n",
567 GNUNET_i2s (&n->id), GST_plugins_a2s (n->address), 570 GNUNET_i2s (&n->id), GST_plugins_a2s (n->address), old, new);
568 old, new);
569 GNUNET_free (old); 571 GNUNET_free (old);
570 GNUNET_free (new); 572 GNUNET_free (new);
571#endif 573#endif
@@ -578,7 +580,7 @@ change (struct NeighbourMapEntry *n, int state, int line)
578 default: 580 default:
579 GNUNET_assert (0); 581 GNUNET_assert (0);
580 } 582 }
581 583
582 584
583 585
584 return GNUNET_OK; 586 return GNUNET_OK;
@@ -588,9 +590,8 @@ static ssize_t
588send_with_plugin (const struct GNUNET_PeerIdentity *target, const char *msgbuf, 590send_with_plugin (const struct GNUNET_PeerIdentity *target, const char *msgbuf,
589 size_t msgbuf_size, uint32_t priority, 591 size_t msgbuf_size, uint32_t priority,
590 struct GNUNET_TIME_Relative timeout, struct Session *session, 592 struct GNUNET_TIME_Relative timeout, struct Session *session,
591 const struct GNUNET_HELLO_Address *address, 593 const struct GNUNET_HELLO_Address *address, int force_address,
592 int force_address, GNUNET_TRANSPORT_TransmitContinuation cont, 594 GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls)
593 void *cont_cls)
594{ 595{
595 struct GNUNET_TRANSPORT_PluginFunctions *papi; 596 struct GNUNET_TRANSPORT_PluginFunctions *papi;
596 size_t ret = GNUNET_SYSERR; 597 size_t ret = GNUNET_SYSERR;
@@ -620,8 +621,8 @@ send_with_plugin (const struct GNUNET_PeerIdentity *target, const char *msgbuf,
620 621
621 ret = 622 ret =
622 papi->send (papi->cls, target, msgbuf, msgbuf_size, 0, timeout, session, 623 papi->send (papi->cls, target, msgbuf, msgbuf_size, 0, timeout, session,
623 address->address, 624 address->address, address->address_length, GNUNET_YES, cont,
624 address->address_length, GNUNET_YES, cont, cont_cls); 625 cont_cls);
625 626
626 if (ret == -1) 627 if (ret == -1)
627 { 628 {
@@ -657,7 +658,7 @@ transmit_send_continuation (void *cls,
657 struct NeighbourMapEntry *n; 658 struct NeighbourMapEntry *n;
658 struct NeighbourMapEntry *tmp; 659 struct NeighbourMapEntry *tmp;
659 660
660 tmp = lookup_neighbour(receiver); 661 tmp = lookup_neighbour (receiver);
661 662
662 mq = cls; 663 mq = cls;
663 n = mq->n; 664 n = mq->n;
@@ -720,8 +721,7 @@ try_transmission_to_peer (struct NeighbourMapEntry *n)
720 721
721 if (n->address == NULL) 722 if (n->address == NULL)
722 { 723 {
723 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 724 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "No address for peer `%s'\n",
724 "No address for peer `%s'\n",
725 GNUNET_i2s (&n->id)); 725 GNUNET_i2s (&n->id));
726 transmit_send_continuation (mq, &n->id, GNUNET_SYSERR); 726 transmit_send_continuation (mq, &n->id, GNUNET_SYSERR);
727 GNUNET_assert (n->transmission_task == GNUNET_SCHEDULER_NO_TASK); 727 GNUNET_assert (n->transmission_task == GNUNET_SCHEDULER_NO_TASK);
@@ -740,8 +740,7 @@ try_transmission_to_peer (struct NeighbourMapEntry *n)
740 740
741 if ((n->address->address_length == 0) && (n->session == NULL)) 741 if ((n->address->address_length == 0) && (n->session == NULL))
742 { 742 {
743 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 743 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "No address for peer `%s'\n",
744 "No address for peer `%s'\n",
745 GNUNET_i2s (&n->id)); 744 GNUNET_i2s (&n->id));
746 transmit_send_continuation (mq, &n->id, GNUNET_SYSERR); 745 transmit_send_continuation (mq, &n->id, GNUNET_SYSERR);
747 GNUNET_assert (n->transmission_task == GNUNET_SCHEDULER_NO_TASK); 746 GNUNET_assert (n->transmission_task == GNUNET_SCHEDULER_NO_TASK);
@@ -751,9 +750,8 @@ try_transmission_to_peer (struct NeighbourMapEntry *n)
751 750
752 ret = 751 ret =
753 send_with_plugin (&n->id, mq->message_buf, mq->message_buf_size, 0, 752 send_with_plugin (&n->id, mq->message_buf, mq->message_buf_size, 0,
754 timeout, n->session, n->address, 753 timeout, n->session, n->address, GNUNET_YES,
755 GNUNET_YES, &transmit_send_continuation, 754 &transmit_send_continuation, mq);
756 mq);
757 if (ret == -1) 755 if (ret == -1)
758 { 756 {
759 /* failure, but 'send' would not call continuation in this case, 757 /* failure, but 'send' would not call continuation in this case,
@@ -826,7 +824,8 @@ send_disconnect (const struct GNUNET_PeerIdentity *target,
826#endif 824#endif
827 825
828 disconnect_msg.header.size = htons (sizeof (struct SessionDisconnectMessage)); 826 disconnect_msg.header.size = htons (sizeof (struct SessionDisconnectMessage));
829 disconnect_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT); 827 disconnect_msg.header.type =
828 htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT);
830 disconnect_msg.reserved = htonl (0); 829 disconnect_msg.reserved = htonl (0);
831 disconnect_msg.purpose.size = 830 disconnect_msg.purpose.size =
832 htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose) + 831 htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose) +
@@ -846,8 +845,7 @@ send_disconnect (const struct GNUNET_PeerIdentity *target,
846 send_with_plugin (target, (const char *) &disconnect_msg, 845 send_with_plugin (target, (const char *) &disconnect_msg,
847 sizeof (disconnect_msg), UINT32_MAX, 846 sizeof (disconnect_msg), UINT32_MAX,
848 GNUNET_TIME_UNIT_FOREVER_REL, session, address, 847 GNUNET_TIME_UNIT_FOREVER_REL, session, address,
849 GNUNET_YES, 848 GNUNET_YES, &send_disconnect_cont, NULL);
850 &send_disconnect_cont, NULL);
851 849
852 if (ret == GNUNET_SYSERR) 850 if (ret == GNUNET_SYSERR)
853 return GNUNET_SYSERR; 851 return GNUNET_SYSERR;
@@ -880,9 +878,7 @@ disconnect_neighbour (struct NeighbourMapEntry *n)
880 /* send DISCONNECT MESSAGE */ 878 /* send DISCONNECT MESSAGE */
881 if ((previous_state == S_CONNECTED) || is_connecting (n)) 879 if ((previous_state == S_CONNECTED) || is_connecting (n))
882 { 880 {
883 if (GNUNET_OK == 881 if (GNUNET_OK == send_disconnect (&n->id, n->address, n->session))
884 send_disconnect (&n->id, n->address,
885 n->session))
886 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sent DISCONNECT_MSG to `%s'\n", 882 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sent DISCONNECT_MSG to `%s'\n",
887 GNUNET_i2s (&n->id)); 883 GNUNET_i2s (&n->id));
888 else 884 else
@@ -898,9 +894,7 @@ disconnect_neighbour (struct NeighbourMapEntry *n)
898 GNUNET_assert (NULL != n->address); 894 GNUNET_assert (NULL != n->address);
899 if (n->address_state == USED) 895 if (n->address_state == USED)
900 { 896 {
901 GST_validation_set_address_use (&n->id, 897 GST_validation_set_address_use (&n->id, n->address, n->session,
902 n->address,
903 n->session,
904 GNUNET_NO); 898 GNUNET_NO);
905 899
906 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO); 900 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO);
@@ -911,6 +905,7 @@ disconnect_neighbour (struct NeighbourMapEntry *n)
911 if (n->address != NULL) 905 if (n->address != NULL)
912 { 906 {
913 struct GNUNET_TRANSPORT_PluginFunctions *papi; 907 struct GNUNET_TRANSPORT_PluginFunctions *papi;
908
914 papi = GST_plugins_find (n->address->transport_name); 909 papi = GST_plugins_find (n->address->transport_name);
915 if (papi != NULL) 910 if (papi != NULL)
916 papi->disconnect (papi->cls, &n->id); 911 papi->disconnect (papi->cls, &n->id);
@@ -928,27 +923,27 @@ disconnect_neighbour (struct NeighbourMapEntry *n)
928 n->is_active = NULL; 923 n->is_active = NULL;
929 } 924 }
930 925
931 switch (previous_state) { 926 switch (previous_state)
932 case S_CONNECTED: 927 {
928 case S_CONNECTED:
933// GNUNET_assert (neighbours_connected > 0); 929// GNUNET_assert (neighbours_connected > 0);
934 neighbours_connected--; 930 neighbours_connected--;
935 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->keepalive_task); 931 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->keepalive_task);
936 GNUNET_SCHEDULER_cancel (n->keepalive_task); 932 GNUNET_SCHEDULER_cancel (n->keepalive_task);
937 n->keepalive_task = GNUNET_SCHEDULER_NO_TASK; 933 n->keepalive_task = GNUNET_SCHEDULER_NO_TASK;
938 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), -1, 934 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), -1,
939 GNUNET_NO); 935 GNUNET_NO);
940 disconnect_notify_cb (callback_cls, &n->id); 936 disconnect_notify_cb (callback_cls, &n->id);
941 break; 937 break;
942 case S_FAST_RECONNECT: 938 case S_FAST_RECONNECT:
943 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), -1, 939 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), -1,
944 GNUNET_NO); 940 GNUNET_NO);
945 GNUNET_STATISTICS_update (GST_stats, 941 GNUNET_STATISTICS_update (GST_stats,
946 gettext_noop 942 gettext_noop ("# fast reconnects failed"), 1,
947 ("# fast reconnects failed"), 943 GNUNET_NO);
948 1, GNUNET_NO); 944 disconnect_notify_cb (callback_cls, &n->id);
949 disconnect_notify_cb (callback_cls, &n->id); 945 default:
950 default: 946 break;
951 break;
952 } 947 }
953 948
954 GNUNET_ATS_suggest_address_cancel (GST_ats, &n->id); 949 GNUNET_ATS_suggest_address_cancel (GST_ats, &n->id);
@@ -1030,17 +1025,18 @@ neighbour_keepalive_task (void *cls,
1030 m.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE); 1025 m.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE);
1031 1026
1032 1027
1033 ret = send_with_plugin (&n->id, (const void *) &m, sizeof (m), 1028 ret =
1034 UINT32_MAX /* priority */ , 1029 send_with_plugin (&n->id, (const void *) &m, sizeof (m),
1035 GNUNET_TIME_UNIT_FOREVER_REL, n->session, n->address, 1030 UINT32_MAX /* priority */ ,
1036 GNUNET_YES, NULL, NULL); 1031 GNUNET_TIME_UNIT_FOREVER_REL, n->session, n->address,
1032 GNUNET_YES, NULL, NULL);
1037 1033
1038 n->expect_latency_response = GNUNET_NO; 1034 n->expect_latency_response = GNUNET_NO;
1039 n->keep_alive_sent = GNUNET_TIME_absolute_get_zero(); 1035 n->keep_alive_sent = GNUNET_TIME_absolute_get_zero ();
1040 if (ret != GNUNET_SYSERR) 1036 if (ret != GNUNET_SYSERR)
1041 { 1037 {
1042 n->expect_latency_response = GNUNET_YES; 1038 n->expect_latency_response = GNUNET_YES;
1043 n->keep_alive_sent = GNUNET_TIME_absolute_get(); 1039 n->keep_alive_sent = GNUNET_TIME_absolute_get ();
1044 } 1040 }
1045 1041
1046} 1042}
@@ -1115,19 +1111,22 @@ struct ContinutionContext
1115 struct Session *session; 1111 struct Session *session;
1116}; 1112};
1117 1113
1118static void send_outbound_quota (const struct GNUNET_PeerIdentity *target, struct GNUNET_BANDWIDTH_Value32NBO quota) 1114static void
1115send_outbound_quota (const struct GNUNET_PeerIdentity *target,
1116 struct GNUNET_BANDWIDTH_Value32NBO quota)
1119{ 1117{
1120 struct QuotaSetMessage q_msg; 1118 struct QuotaSetMessage q_msg;
1119
1121#if DEBUG_TRANSPORT 1120#if DEBUG_TRANSPORT
1122 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1121 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1123 "Sending outbound quota of %u Bps for peer `%s' to all clients\n", 1122 "Sending outbound quota of %u Bps for peer `%s' to all clients\n",
1124 ntohl (quota.value__), GNUNET_i2s (target)); 1123 ntohl (quota.value__), GNUNET_i2s (target));
1125#endif 1124#endif
1126 q_msg.header.size = htons (sizeof (struct QuotaSetMessage)); 1125 q_msg.header.size = htons (sizeof (struct QuotaSetMessage));
1127 q_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA); 1126 q_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA);
1128 q_msg.quota = quota; 1127 q_msg.quota = quota;
1129 q_msg.peer = (*target); 1128 q_msg.peer = (*target);
1130 GST_clients_broadcast (&q_msg.header, GNUNET_NO); 1129 GST_clients_broadcast (&q_msg.header, GNUNET_NO);
1131} 1130}
1132 1131
1133/** 1132/**
@@ -1143,17 +1142,15 @@ static void
1143send_connect_continuation (void *cls, const struct GNUNET_PeerIdentity *target, 1142send_connect_continuation (void *cls, const struct GNUNET_PeerIdentity *target,
1144 int success) 1143 int success)
1145{ 1144{
1146 struct ContinutionContext * cc = cls; 1145 struct ContinutionContext *cc = cls;
1147 struct NeighbourMapEntry *n = lookup_neighbour (&cc->address->peer); 1146 struct NeighbourMapEntry *n = lookup_neighbour (&cc->address->peer);
1148 1147
1149 if (GNUNET_YES != success) 1148 if (GNUNET_YES != success)
1150 { 1149 {
1151 GNUNET_assert (strlen(cc->address->transport_name) > 0); 1150 GNUNET_assert (strlen (cc->address->transport_name) > 0);
1152 GNUNET_ATS_address_destroyed (GST_ats, cc->address, cc->session); 1151 GNUNET_ATS_address_destroyed (GST_ats, cc->address, cc->session);
1153 } 1152 }
1154 if ( (NULL == neighbours) || 1153 if ((NULL == neighbours) || (NULL == n) || (n->state == S_DISCONNECT))
1155 (NULL == n) ||
1156 (n->state == S_DISCONNECT))
1157 { 1154 {
1158 GNUNET_HELLO_address_free (cc->address); 1155 GNUNET_HELLO_address_free (cc->address);
1159 GNUNET_free (cc); 1156 GNUNET_free (cc);
@@ -1161,7 +1158,7 @@ send_connect_continuation (void *cls, const struct GNUNET_PeerIdentity *target,
1161 } 1158 }
1162 1159
1163 if ((GNUNET_YES == success) && 1160 if ((GNUNET_YES == success) &&
1164 ((n->state == S_NOT_CONNECTED) || (n->state == S_CONNECT_SENT))) 1161 ((n->state == S_NOT_CONNECTED) || (n->state == S_CONNECT_SENT)))
1165 { 1162 {
1166 change_state (n, S_CONNECT_SENT); 1163 change_state (n, S_CONNECT_SENT);
1167 GNUNET_HELLO_address_free (cc->address); 1164 GNUNET_HELLO_address_free (cc->address);
@@ -1170,21 +1167,19 @@ send_connect_continuation (void *cls, const struct GNUNET_PeerIdentity *target,
1170 } 1167 }
1171 1168
1172 if ((GNUNET_NO == success) && 1169 if ((GNUNET_NO == success) &&
1173 ((n->state == S_NOT_CONNECTED) || (n->state == S_CONNECT_SENT))) 1170 ((n->state == S_NOT_CONNECTED) || (n->state == S_CONNECT_SENT)))
1174 { 1171 {
1175#if DEBUG_TRANSPORT 1172#if DEBUG_TRANSPORT
1176 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1173 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1177 "Failed to send CONNECT_MSG to peer `%4s' with address '%s' session %p, asking ATS for new address \n", 1174 "Failed to send CONNECT_MSG to peer `%4s' with address '%s' session %p, asking ATS for new address \n",
1178 GNUNET_i2s (&n->id), 1175 GNUNET_i2s (&n->id), GST_plugins_a2s (n->address), n->session);
1179 GST_plugins_a2s (n->address),
1180 n->session);
1181#endif 1176#endif
1182 change_state (n, S_NOT_CONNECTED); 1177 change_state (n, S_NOT_CONNECTED);
1183 if (n->ats_suggest != GNUNET_SCHEDULER_NO_TASK) 1178 if (n->ats_suggest != GNUNET_SCHEDULER_NO_TASK)
1184 GNUNET_SCHEDULER_cancel (n->ats_suggest); 1179 GNUNET_SCHEDULER_cancel (n->ats_suggest);
1185 n->ats_suggest = 1180 n->ats_suggest =
1186 GNUNET_SCHEDULER_add_delayed (ATS_RESPONSE_TIMEOUT, &ats_suggest_cancel, 1181 GNUNET_SCHEDULER_add_delayed (ATS_RESPONSE_TIMEOUT, &ats_suggest_cancel,
1187 n); 1182 n);
1188 GNUNET_ATS_suggest_address (GST_ats, &n->id); 1183 GNUNET_ATS_suggest_address (GST_ats, &n->id);
1189 } 1184 }
1190 GNUNET_HELLO_address_free (cc->address); 1185 GNUNET_HELLO_address_free (cc->address);
@@ -1205,7 +1200,7 @@ send_switch_address_continuation (void *cls,
1205 const struct GNUNET_PeerIdentity *target, 1200 const struct GNUNET_PeerIdentity *target,
1206 int success) 1201 int success)
1207{ 1202{
1208 struct ContinutionContext * cc = cls; 1203 struct ContinutionContext *cc = cls;
1209 struct NeighbourMapEntry *n; 1204 struct NeighbourMapEntry *n;
1210 1205
1211 if (neighbours == NULL) 1206 if (neighbours == NULL)
@@ -1215,7 +1210,7 @@ send_switch_address_continuation (void *cls,
1215 return; /* neighbour is going away */ 1210 return; /* neighbour is going away */
1216 } 1211 }
1217 1212
1218 n = lookup_neighbour(&cc->address->peer); 1213 n = lookup_neighbour (&cc->address->peer);
1219 if ((n == NULL) || (is_disconnecting (n))) 1214 if ((n == NULL) || (is_disconnecting (n)))
1220 { 1215 {
1221 GNUNET_HELLO_address_free (cc->address); 1216 GNUNET_HELLO_address_free (cc->address);
@@ -1229,10 +1224,9 @@ send_switch_address_continuation (void *cls,
1229#if DEBUG_TRANSPORT 1224#if DEBUG_TRANSPORT
1230 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1225 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1231 "Failed to switch connected peer `%s' to address '%s' session %X, asking ATS for new address \n", 1226 "Failed to switch connected peer `%s' to address '%s' session %X, asking ATS for new address \n",
1232 GNUNET_i2s (&n->id), 1227 GNUNET_i2s (&n->id), GST_plugins_a2s (n->address), n->session);
1233 GST_plugins_a2s (n->address), n->session);
1234#endif 1228#endif
1235 GNUNET_assert (strlen(cc->address->transport_name) > 0); 1229 GNUNET_assert (strlen (cc->address->transport_name) > 0);
1236 GNUNET_ATS_address_destroyed (GST_ats, cc->address, cc->session); 1230 GNUNET_ATS_address_destroyed (GST_ats, cc->address, cc->session);
1237 1231
1238 if (n->ats_suggest != GNUNET_SCHEDULER_NO_TASK) 1232 if (n->ats_suggest != GNUNET_SCHEDULER_NO_TASK)
@@ -1246,49 +1240,48 @@ send_switch_address_continuation (void *cls,
1246 return; 1240 return;
1247 } 1241 }
1248 /* Tell ATS that switching addresses was successful */ 1242 /* Tell ATS that switching addresses was successful */
1249 switch (n->state) { 1243 switch (n->state)
1250 case S_CONNECTED: 1244 {
1251 if (n->address_state == FRESH) 1245 case S_CONNECTED:
1252 { 1246 if (n->address_state == FRESH)
1253 GST_validation_set_address_use (&n->id, 1247 {
1254 cc->address, 1248 GST_validation_set_address_use (&n->id, cc->address, cc->session,
1255 cc->session, 1249 GNUNET_YES);
1256 GNUNET_YES); 1250 GNUNET_ATS_address_update (GST_ats, cc->address, cc->session, NULL, 0);
1257 GNUNET_ATS_address_update (GST_ats, cc->address, cc->session, NULL, 0); 1251 GNUNET_ATS_address_in_use (GST_ats, cc->address, cc->session, GNUNET_YES);
1258 GNUNET_ATS_address_in_use (GST_ats, cc->address, cc->session, GNUNET_YES); 1252 n->address_state = USED;
1259 n->address_state = USED; 1253 }
1260 } 1254 break;
1261 break; 1255 case S_FAST_RECONNECT:
1262 case S_FAST_RECONNECT:
1263#if DEBUG_TRANSPORT 1256#if DEBUG_TRANSPORT
1264 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1257 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1265 "Successful fast reconnect to peer `%s'\n", GNUNET_i2s (&n->id)); 1258 "Successful fast reconnect to peer `%s'\n",
1259 GNUNET_i2s (&n->id));
1266#endif 1260#endif
1267 change_state (n, S_CONNECTED); 1261 change_state (n, S_CONNECTED);
1268 neighbours_connected++; 1262 neighbours_connected++;
1269 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1, 1263 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1,
1270 GNUNET_NO); 1264 GNUNET_NO);
1271 1265
1272 if (n->address_state == FRESH) 1266 if (n->address_state == FRESH)
1273 { 1267 {
1274 GST_validation_set_address_use (&n->id, 1268 GST_validation_set_address_use (&n->id, cc->address, cc->session,
1275 cc->address, 1269 GNUNET_YES);
1276 cc->session, 1270 GNUNET_ATS_address_update (GST_ats, cc->address, cc->session, NULL, 0);
1277 GNUNET_YES); 1271 GNUNET_ATS_address_in_use (GST_ats, cc->address, cc->session, GNUNET_YES);
1278 GNUNET_ATS_address_update (GST_ats, cc->address, cc->session, NULL, 0); 1272 n->address_state = USED;
1279 GNUNET_ATS_address_in_use (GST_ats, cc->address, cc->session, GNUNET_YES); 1273 }
1280 n->address_state = USED; 1274
1281 } 1275 if (n->keepalive_task == GNUNET_SCHEDULER_NO_TASK)
1282 1276 n->keepalive_task =
1283 if (n->keepalive_task == GNUNET_SCHEDULER_NO_TASK) 1277 GNUNET_SCHEDULER_add_now (&neighbour_keepalive_task, n);
1284 n->keepalive_task = GNUNET_SCHEDULER_add_now (&neighbour_keepalive_task, n); 1278
1285 1279 /* Updating quotas */
1286 /* Updating quotas */ 1280 GST_neighbours_set_incoming_quota (&n->id, n->bandwidth_in);
1287 GST_neighbours_set_incoming_quota (&n->id, n->bandwidth_in); 1281 send_outbound_quota (target, n->bandwidth_out);
1288 send_outbound_quota(target, n->bandwidth_out); 1282
1289 1283 default:
1290 default: 1284 break;
1291 break;
1292 } 1285 }
1293 GNUNET_HELLO_address_free (cc->address); 1286 GNUNET_HELLO_address_free (cc->address);
1294 GNUNET_free (cc); 1287 GNUNET_free (cc);
@@ -1309,7 +1302,7 @@ send_connect_ack_continuation (void *cls,
1309 const struct GNUNET_PeerIdentity *target, 1302 const struct GNUNET_PeerIdentity *target,
1310 int success) 1303 int success)
1311{ 1304{
1312 struct ContinutionContext * cc = cls; 1305 struct ContinutionContext *cc = cls;
1313 struct NeighbourMapEntry *n; 1306 struct NeighbourMapEntry *n;
1314 1307
1315 if (neighbours == NULL) 1308 if (neighbours == NULL)
@@ -1319,7 +1312,7 @@ send_connect_ack_continuation (void *cls,
1319 return; /* neighbour is going away */ 1312 return; /* neighbour is going away */
1320 } 1313 }
1321 1314
1322 n = lookup_neighbour(&cc->address->peer); 1315 n = lookup_neighbour (&cc->address->peer);
1323 if ((n == NULL) || (is_disconnecting (n))) 1316 if ((n == NULL) || (is_disconnecting (n)))
1324 { 1317 {
1325 GNUNET_HELLO_address_free (cc->address); 1318 GNUNET_HELLO_address_free (cc->address);
@@ -1338,12 +1331,10 @@ send_connect_ack_continuation (void *cls,
1338#if DEBUG_TRANSPORT 1331#if DEBUG_TRANSPORT
1339 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1332 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1340 "Failed to send CONNECT_MSG to peer `%4s' with address '%s' session %X, asking ATS for new address \n", 1333 "Failed to send CONNECT_MSG to peer `%4s' with address '%s' session %X, asking ATS for new address \n",
1341 GNUNET_i2s (&n->id), 1334 GNUNET_i2s (&n->id), GST_plugins_a2s (n->address), n->session);
1342 GST_plugins_a2s (n->address),
1343 n->session);
1344#endif 1335#endif
1345 change_state (n, S_NOT_CONNECTED); 1336 change_state (n, S_NOT_CONNECTED);
1346 GNUNET_assert (strlen(cc->address->transport_name) > 0); 1337 GNUNET_assert (strlen (cc->address->transport_name) > 0);
1347 GNUNET_ATS_address_destroyed (GST_ats, cc->address, cc->session); 1338 GNUNET_ATS_address_destroyed (GST_ats, cc->address, cc->session);
1348 1339
1349 if (n->ats_suggest != GNUNET_SCHEDULER_NO_TASK) 1340 if (n->ats_suggest != GNUNET_SCHEDULER_NO_TASK)
@@ -1372,8 +1363,8 @@ send_connect_ack_continuation (void *cls,
1372 */ 1363 */
1373int 1364int
1374GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer, 1365GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1375 const struct GNUNET_HELLO_Address *address, 1366 const struct GNUNET_HELLO_Address
1376 struct Session *session, 1367 *address, struct Session *session,
1377 const struct GNUNET_ATS_Information *ats, 1368 const struct GNUNET_ATS_Information *ats,
1378 uint32_t ats_count, 1369 uint32_t ats_count,
1379 struct GNUNET_BANDWIDTH_Value32NBO 1370 struct GNUNET_BANDWIDTH_Value32NBO
@@ -1383,7 +1374,7 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1383{ 1374{
1384 struct NeighbourMapEntry *n; 1375 struct NeighbourMapEntry *n;
1385 struct SessionConnectMessage connect_msg; 1376 struct SessionConnectMessage connect_msg;
1386 struct ContinutionContext * cc; 1377 struct ContinutionContext *cc;
1387 size_t msg_len; 1378 size_t msg_len;
1388 size_t ret; 1379 size_t ret;
1389 1380
@@ -1401,11 +1392,11 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1401 return GNUNET_NO; 1392 return GNUNET_NO;
1402 } 1393 }
1403 GNUNET_assert (address->transport_name != NULL); 1394 GNUNET_assert (address->transport_name != NULL);
1404 if ( (session == NULL) && (0 == address->address_length) ) 1395 if ((session == NULL) && (0 == address->address_length))
1405 { 1396 {
1406 GNUNET_break_op (0); 1397 GNUNET_break_op (0);
1407 /* FIXME: is this actually possible? When does this happen? */ 1398 /* FIXME: is this actually possible? When does this happen? */
1408 if (strlen(address->transport_name) > 0) 1399 if (strlen (address->transport_name) > 0)
1409 GNUNET_ATS_address_destroyed (GST_ats, address, session); 1400 GNUNET_ATS_address_destroyed (GST_ats, address, session);
1410 GNUNET_ATS_suggest_address (GST_ats, peer); 1401 GNUNET_ATS_suggest_address (GST_ats, peer);
1411 return GNUNET_NO; 1402 return GNUNET_NO;
@@ -1415,10 +1406,8 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1415#if DEBUG_TRANSPORT 1406#if DEBUG_TRANSPORT
1416 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1407 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1417 "ATS tells us to switch to address '%s' session %p for peer `%s' in state `%s'\n", 1408 "ATS tells us to switch to address '%s' session %p for peer `%s' in state `%s'\n",
1418 GST_plugins_a2s (address), 1409 GST_plugins_a2s (address), session, GNUNET_i2s (peer),
1419 session, 1410 print_state (n->state));
1420 GNUNET_i2s (peer),
1421 print_state(n->state));
1422#endif 1411#endif
1423 if (n->ats_suggest != GNUNET_SCHEDULER_NO_TASK) 1412 if (n->ats_suggest != GNUNET_SCHEDULER_NO_TASK)
1424 { 1413 {
@@ -1426,17 +1415,15 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1426 n->ats_suggest = GNUNET_SCHEDULER_NO_TASK; 1415 n->ats_suggest = GNUNET_SCHEDULER_NO_TASK;
1427 } 1416 }
1428 /* do not switch addresses just update quotas */ 1417 /* do not switch addresses just update quotas */
1429 if ( (n->state == S_CONNECTED) && 1418 if ((n->state == S_CONNECTED) && (NULL != n->address) &&
1430 (NULL != n->address) && 1419 (0 == GNUNET_HELLO_address_cmp (address, n->address)) &&
1431 (0 == GNUNET_HELLO_address_cmp (address, 1420 (n->session == session))
1432 n->address)) &&
1433 (n->session == session) )
1434 { 1421 {
1435 n->bandwidth_in = bandwidth_in; 1422 n->bandwidth_in = bandwidth_in;
1436 n->bandwidth_out = bandwidth_out; 1423 n->bandwidth_out = bandwidth_out;
1437 GST_neighbours_set_incoming_quota (&n->id, n->bandwidth_in); 1424 GST_neighbours_set_incoming_quota (&n->id, n->bandwidth_in);
1438 send_outbound_quota(peer, n->bandwidth_out); 1425 send_outbound_quota (peer, n->bandwidth_out);
1439 return GNUNET_NO; 1426 return GNUNET_NO;
1440 } 1427 }
1441 if (n->state == S_CONNECTED) 1428 if (n->state == S_CONNECTED)
1442 { 1429 {
@@ -1444,9 +1431,7 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1444 GNUNET_assert (NULL != n->address); 1431 GNUNET_assert (NULL != n->address);
1445 if (n->address_state == USED) 1432 if (n->address_state == USED)
1446 { 1433 {
1447 GST_validation_set_address_use (&n->id, 1434 GST_validation_set_address_use (&n->id, n->address, n->session,
1448 n->address,
1449 n->session,
1450 GNUNET_NO); 1435 GNUNET_NO);
1451 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO); 1436 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO);
1452 n->address_state = UNUSED; 1437 n->address_state = UNUSED;
@@ -1468,7 +1453,7 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1468 &neighbour_timeout_task, n); 1453 &neighbour_timeout_task, n);
1469 switch (n->state) 1454 switch (n->state)
1470 { 1455 {
1471 case S_NOT_CONNECTED: 1456 case S_NOT_CONNECTED:
1472 case S_CONNECT_SENT: 1457 case S_CONNECT_SENT:
1473 msg_len = sizeof (struct SessionConnectMessage); 1458 msg_len = sizeof (struct SessionConnectMessage);
1474 connect_msg.header.size = htons (msg_len); 1459 connect_msg.header.size = htons (msg_len);
@@ -1478,15 +1463,13 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1478 connect_msg.timestamp = 1463 connect_msg.timestamp =
1479 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); 1464 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
1480 1465
1481 cc = GNUNET_malloc(sizeof (struct ContinutionContext)); 1466 cc = GNUNET_malloc (sizeof (struct ContinutionContext));
1482 cc->session = session; 1467 cc->session = session;
1483 cc->address = GNUNET_HELLO_address_copy (address); 1468 cc->address = GNUNET_HELLO_address_copy (address);
1484 ret = 1469 ret =
1485 send_with_plugin (peer, (const char *) &connect_msg, msg_len, 1470 send_with_plugin (peer, (const char *) &connect_msg, msg_len,
1486 UINT32_MAX, GNUNET_TIME_UNIT_FOREVER_REL, session, 1471 UINT32_MAX, GNUNET_TIME_UNIT_FOREVER_REL, session,
1487 address, GNUNET_YES, 1472 address, GNUNET_YES, &send_connect_continuation, cc);
1488 &send_connect_continuation,
1489 cc);
1490 return GNUNET_NO; 1473 return GNUNET_NO;
1491 case S_CONNECT_RECV: 1474 case S_CONNECT_RECV:
1492 /* We received a CONNECT message and asked ATS for an address */ 1475 /* We received a CONNECT message and asked ATS for an address */
@@ -1497,18 +1480,18 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1497 connect_msg.reserved = htonl (0); 1480 connect_msg.reserved = htonl (0);
1498 connect_msg.timestamp = 1481 connect_msg.timestamp =
1499 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); 1482 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
1500 cc = GNUNET_malloc(sizeof (struct ContinutionContext)); 1483 cc = GNUNET_malloc (sizeof (struct ContinutionContext));
1501 cc->session = session; 1484 cc->session = session;
1502 cc->address = GNUNET_HELLO_address_copy (address); 1485 cc->address = GNUNET_HELLO_address_copy (address);
1503 ret = 1486 ret =
1504 send_with_plugin (&n->id, (const void *) &connect_msg, msg_len, 1487 send_with_plugin (&n->id, (const void *) &connect_msg, msg_len,
1505 UINT32_MAX, GNUNET_TIME_UNIT_FOREVER_REL, session, 1488 UINT32_MAX, GNUNET_TIME_UNIT_FOREVER_REL, session,
1506 address, GNUNET_YES, 1489 address, GNUNET_YES, &send_connect_ack_continuation,
1507 &send_connect_ack_continuation, cc); 1490 cc);
1508 return GNUNET_NO; 1491 return GNUNET_NO;
1509 case S_CONNECTED: 1492 case S_CONNECTED:
1510 case S_FAST_RECONNECT: 1493 case S_FAST_RECONNECT:
1511 /* connected peer is switching addresses or tries fast reconnect*/ 1494 /* connected peer is switching addresses or tries fast reconnect */
1512 msg_len = sizeof (struct SessionConnectMessage); 1495 msg_len = sizeof (struct SessionConnectMessage);
1513 connect_msg.header.size = htons (msg_len); 1496 connect_msg.header.size = htons (msg_len);
1514 connect_msg.header.type = 1497 connect_msg.header.type =
@@ -1516,7 +1499,7 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1516 connect_msg.reserved = htonl (0); 1499 connect_msg.reserved = htonl (0);
1517 connect_msg.timestamp = 1500 connect_msg.timestamp =
1518 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); 1501 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
1519 cc = GNUNET_malloc(sizeof (struct ContinutionContext)); 1502 cc = GNUNET_malloc (sizeof (struct ContinutionContext));
1520 cc->session = session; 1503 cc->session = session;
1521 cc->address = GNUNET_HELLO_address_copy (address); 1504 cc->address = GNUNET_HELLO_address_copy (address);
1522 ret = 1505 ret =
@@ -1528,13 +1511,12 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1528 { 1511 {
1529 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1512 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1530 "Failed to send CONNECT_MESSAGE to `%4s' using address '%s' session %X\n", 1513 "Failed to send CONNECT_MESSAGE to `%4s' using address '%s' session %X\n",
1531 GNUNET_i2s (peer), 1514 GNUNET_i2s (peer), GST_plugins_a2s (address), session);
1532 GST_plugins_a2s (address), session);
1533 } 1515 }
1534 return GNUNET_NO; 1516 return GNUNET_NO;
1535 default: 1517 default:
1536 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1518 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1537 "Invalid connection state to switch addresses %u \n", n->state); 1519 "Invalid connection state to switch addresses %u \n", n->state);
1538 GNUNET_break_op (0); 1520 GNUNET_break_op (0);
1539 return GNUNET_NO; 1521 return GNUNET_NO;
1540 } 1522 }
@@ -1544,7 +1526,7 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
1544/** 1526/**
1545 * Obtain current latency information for the given neighbour. 1527 * Obtain current latency information for the given neighbour.
1546 * 1528 *
1547 * @param peer 1529 * @param peer
1548 * @return observed latency of the address, FOREVER if the address was 1530 * @return observed latency of the address, FOREVER if the address was
1549 * never successfully validated 1531 * never successfully validated
1550 */ 1532 */
@@ -1554,8 +1536,7 @@ GST_neighbour_get_latency (const struct GNUNET_PeerIdentity *peer)
1554 struct NeighbourMapEntry *n; 1536 struct NeighbourMapEntry *n;
1555 1537
1556 n = lookup_neighbour (peer); 1538 n = lookup_neighbour (peer);
1557 if ( (NULL == n) || 1539 if ((NULL == n) || ((n->address == NULL) && (n->session == NULL)))
1558 ( (n->address == NULL) && (n->session == NULL) ) )
1559 return GNUNET_TIME_UNIT_FOREVER_REL; 1540 return GNUNET_TIME_UNIT_FOREVER_REL;
1560 1541
1561 return n->latency; 1542 return n->latency;
@@ -1573,8 +1554,7 @@ GST_neighbour_get_current_address (const struct GNUNET_PeerIdentity *peer)
1573 struct NeighbourMapEntry *n; 1554 struct NeighbourMapEntry *n;
1574 1555
1575 n = lookup_neighbour (peer); 1556 n = lookup_neighbour (peer);
1576 if ( (NULL == n) || 1557 if ((NULL == n) || ((n->address == NULL) && (n->session == NULL)))
1577 ( (n->address == NULL) && (n->session == NULL) ) )
1578 return NULL; 1558 return NULL;
1579 1559
1580 return n->address; 1560 return n->address;
@@ -1600,7 +1580,7 @@ setup_neighbour (const struct GNUNET_PeerIdentity *peer)
1600 n = GNUNET_malloc (sizeof (struct NeighbourMapEntry)); 1580 n = GNUNET_malloc (sizeof (struct NeighbourMapEntry));
1601 n->id = *peer; 1581 n->id = *peer;
1602 n->state = S_NOT_CONNECTED; 1582 n->state = S_NOT_CONNECTED;
1603 n->latency = GNUNET_TIME_relative_get_forever(); 1583 n->latency = GNUNET_TIME_relative_get_forever ();
1604 GNUNET_BANDWIDTH_tracker_init (&n->in_tracker, 1584 GNUNET_BANDWIDTH_tracker_init (&n->in_tracker,
1605 GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT, 1585 GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
1606 MAX_BANDWIDTH_CARRY_S); 1586 MAX_BANDWIDTH_CARRY_S);
@@ -1718,11 +1698,9 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
1718 { 1698 {
1719 if (n->address_state == USED) 1699 if (n->address_state == USED)
1720 { 1700 {
1721 GST_validation_set_address_use (&n->id, 1701 GST_validation_set_address_use (&n->id, n->address, n->session,
1722 n->address,
1723 n->session,
1724 GNUNET_NO); 1702 GNUNET_NO);
1725 GNUNET_ATS_address_in_use (GST_ats,n->address, n->session, GNUNET_NO); 1703 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO);
1726 n->address_state = UNUSED; 1704 n->address_state = UNUSED;
1727 } 1705 }
1728 } 1706 }
@@ -1733,15 +1711,15 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
1733 n->address = NULL; 1711 n->address = NULL;
1734 } 1712 }
1735 n->session = NULL; 1713 n->session = NULL;
1736 1714
1737 /* not connected anymore anyway, shouldn't matter */ 1715 /* not connected anymore anyway, shouldn't matter */
1738 if (S_CONNECTED != n->state) 1716 if (S_CONNECTED != n->state)
1739 return; 1717 return;
1740 1718
1741 /* connected, try fast reconnect */ 1719 /* connected, try fast reconnect */
1742#if DEBUG_TRANSPORT 1720#if DEBUG_TRANSPORT
1743 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1721 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Trying fast reconnect to peer `%s'\n",
1744 "Trying fast reconnect to peer `%s'\n", GNUNET_i2s (peer)); 1722 GNUNET_i2s (peer));
1745#endif 1723#endif
1746 change_state (n, S_FAST_RECONNECT); 1724 change_state (n, S_FAST_RECONNECT);
1747 GNUNET_assert (neighbours_connected > 0); 1725 GNUNET_assert (neighbours_connected > 0);
@@ -1814,7 +1792,7 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, const void *msg,
1814 return; 1792 return;
1815 } 1793 }
1816 1794
1817 if ((n->session == NULL) && (n->address == NULL) ) 1795 if ((n->session == NULL) && (n->address == NULL))
1818 { 1796 {
1819 GNUNET_STATISTICS_update (GST_stats, 1797 GNUNET_STATISTICS_update (GST_stats,
1820 gettext_noop 1798 gettext_noop
@@ -1983,6 +1961,7 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour)
1983 return; 1961 return;
1984 1962
1985 struct GNUNET_MessageHeader m; 1963 struct GNUNET_MessageHeader m;
1964
1986 m.size = htons (sizeof (struct GNUNET_MessageHeader)); 1965 m.size = htons (sizeof (struct GNUNET_MessageHeader));
1987 m.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE); 1966 m.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE);
1988 1967
@@ -2002,11 +1981,11 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour)
2002 */ 1981 */
2003void 1982void
2004GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour, 1983GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour,
2005 const struct GNUNET_ATS_Information * ats, 1984 const struct GNUNET_ATS_Information *ats,
2006 uint32_t ats_count) 1985 uint32_t ats_count)
2007{ 1986{
2008 struct NeighbourMapEntry *n; 1987 struct NeighbourMapEntry *n;
2009 struct GNUNET_ATS_Information * ats_new; 1988 struct GNUNET_ATS_Information *ats_new;
2010 uint32_t latency; 1989 uint32_t latency;
2011 1990
2012 if (neighbours == NULL) 1991 if (neighbours == NULL)
@@ -2034,22 +2013,26 @@ GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour,
2034 } 2013 }
2035 n->expect_latency_response = GNUNET_NO; 2014 n->expect_latency_response = GNUNET_NO;
2036 2015
2037 GNUNET_assert (n->keep_alive_sent.abs_value != GNUNET_TIME_absolute_get_zero().abs_value); 2016 GNUNET_assert (n->keep_alive_sent.abs_value !=
2038 n->latency = GNUNET_TIME_absolute_get_difference(n->keep_alive_sent, GNUNET_TIME_absolute_get()); 2017 GNUNET_TIME_absolute_get_zero ().abs_value);
2018 n->latency =
2019 GNUNET_TIME_absolute_get_difference (n->keep_alive_sent,
2020 GNUNET_TIME_absolute_get ());
2039#if DEBUG_TRANSPORT 2021#if DEBUG_TRANSPORT
2040 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2022 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Latency for peer `%s' is %llu ms\n",
2041 "Latency for peer `%s' is %llu ms\n",
2042 GNUNET_i2s (&n->id), n->latency.rel_value); 2023 GNUNET_i2s (&n->id), n->latency.rel_value);
2043#endif 2024#endif
2044 2025
2045 2026
2046 if (n->latency.rel_value == GNUNET_TIME_relative_get_forever().rel_value) 2027 if (n->latency.rel_value == GNUNET_TIME_relative_get_forever ().rel_value)
2047 { 2028 {
2048 GNUNET_ATS_address_update (GST_ats, n->address, n->session, ats, ats_count); 2029 GNUNET_ATS_address_update (GST_ats, n->address, n->session, ats, ats_count);
2049 } 2030 }
2050 else 2031 else
2051 { 2032 {
2052 ats_new = GNUNET_malloc (sizeof (struct GNUNET_ATS_Information) * (ats_count + 1)); 2033 ats_new =
2034 GNUNET_malloc (sizeof (struct GNUNET_ATS_Information) *
2035 (ats_count + 1));
2053 memcpy (ats_new, ats, sizeof (struct GNUNET_ATS_Information) * ats_count); 2036 memcpy (ats_new, ats, sizeof (struct GNUNET_ATS_Information) * ats_count);
2054 2037
2055 /* add latency */ 2038 /* add latency */
@@ -2060,7 +2043,8 @@ GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour,
2060 latency = n->latency.rel_value; 2043 latency = n->latency.rel_value;
2061 ats_new[ats_count].value = htonl (latency); 2044 ats_new[ats_count].value = htonl (latency);
2062 2045
2063 GNUNET_ATS_address_update (GST_ats, n->address, n->session, ats_new, ats_count + 1); 2046 GNUNET_ATS_address_update (GST_ats, n->address, n->session, ats_new,
2047 ats_count + 1);
2064 GNUNET_free (ats_new); 2048 GNUNET_free (ats_new);
2065 } 2049 }
2066} 2050}
@@ -2314,10 +2298,11 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
2314 { 2298 {
2315 /* we did not send 'CONNECT' -- at least not recently */ 2299 /* we did not send 'CONNECT' -- at least not recently */
2316 GNUNET_STATISTICS_update (GST_stats, 2300 GNUNET_STATISTICS_update (GST_stats,
2317 gettext_noop ("# unexpected CONNECT_ACK messages (no peer)"), 1, 2301 gettext_noop
2318 GNUNET_NO); 2302 ("# unexpected CONNECT_ACK messages (no peer)"),
2303 1, GNUNET_NO);
2319 return; 2304 return;
2320 } 2305 }
2321 2306
2322 /* Additional check 2307 /* Additional check
2323 * 2308 *
@@ -2326,11 +2311,13 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
2326 * We also received an CONNECT message, switched from SENDT to RECV and 2311 * We also received an CONNECT message, switched from SENDT to RECV and
2327 * ATS already suggested us an address after a successful blacklist check 2312 * ATS already suggested us an address after a successful blacklist check
2328 */ 2313 */
2329 if ((n->state != S_CONNECT_SENT) && ((n->state != S_CONNECT_RECV) && (n->address != NULL))) 2314 if ((n->state != S_CONNECT_SENT) &&
2315 ((n->state != S_CONNECT_RECV) && (n->address != NULL)))
2330 { 2316 {
2331 GNUNET_STATISTICS_update (GST_stats, 2317 GNUNET_STATISTICS_update (GST_stats,
2332 gettext_noop ("# unexpected CONNECT_ACK messages"), 1, 2318 gettext_noop
2333 GNUNET_NO); 2319 ("# unexpected CONNECT_ACK messages"), 1,
2320 GNUNET_NO);
2334 return; 2321 return;
2335 } 2322 }
2336 2323
@@ -2347,10 +2334,7 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
2347 GNUNET_assert (NULL != n->address); 2334 GNUNET_assert (NULL != n->address);
2348 if (n->address_state == FRESH) 2335 if (n->address_state == FRESH)
2349 { 2336 {
2350 GST_validation_set_address_use (&n->id, 2337 GST_validation_set_address_use (&n->id, n->address, n->session, GNUNET_YES);
2351 n->address,
2352 n->session,
2353 GNUNET_YES);
2354 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_YES); 2338 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_YES);
2355 n->address_state = USED; 2339 n->address_state = USED;
2356 } 2340 }
@@ -2364,32 +2348,29 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
2364 2348
2365 ret = 2349 ret =
2366 send_with_plugin (&n->id, (const char *) &msg, msg_len, UINT32_MAX, 2350 send_with_plugin (&n->id, (const char *) &msg, msg_len, UINT32_MAX,
2367 GNUNET_TIME_UNIT_FOREVER_REL, n->session, 2351 GNUNET_TIME_UNIT_FOREVER_REL, n->session, n->address,
2368 n->address, GNUNET_YES, NULL, 2352 GNUNET_YES, NULL, NULL);
2369 NULL);
2370 2353
2371 if (ret == GNUNET_SYSERR) 2354 if (ret == GNUNET_SYSERR)
2372 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2355 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2373 "Failed to send SESSION_ACK to `%4s' using address '%s' session %X\n", 2356 "Failed to send SESSION_ACK to `%4s' using address '%s' session %X\n",
2374 GNUNET_i2s (&n->id), 2357 GNUNET_i2s (&n->id), GST_plugins_a2s (n->address), n->session);
2375 GST_plugins_a2s (n->address), n->session);
2376 2358
2377 2359
2378 if (n->keepalive_task == GNUNET_SCHEDULER_NO_TASK) 2360 if (n->keepalive_task == GNUNET_SCHEDULER_NO_TASK)
2379 n->keepalive_task = GNUNET_SCHEDULER_add_now (&neighbour_keepalive_task, n); 2361 n->keepalive_task = GNUNET_SCHEDULER_add_now (&neighbour_keepalive_task, n);
2380 2362
2381 neighbours_connected++; 2363 neighbours_connected++;
2382 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1, 2364 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1,
2383 GNUNET_NO); 2365 GNUNET_NO);
2384#if DEBUG_TRANSPORT 2366#if DEBUG_TRANSPORT
2385 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2367 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2386 "Notify about connect of `%4s' using address '%s' session %X LINE %u\n", 2368 "Notify about connect of `%4s' using address '%s' session %X LINE %u\n",
2387 GNUNET_i2s (&n->id), 2369 GNUNET_i2s (&n->id), GST_plugins_a2s (n->address), n->session,
2388 GST_plugins_a2s (n->address), n->session, 2370 __LINE__);
2389 __LINE__);
2390#endif 2371#endif
2391 connect_notify_cb (callback_cls, &n->id, ats, ats_count); 2372 connect_notify_cb (callback_cls, &n->id, ats, ats_count);
2392 send_outbound_quota(peer, n->bandwidth_out); 2373 send_outbound_quota (peer, n->bandwidth_out);
2393 2374
2394} 2375}
2395 2376
@@ -2398,15 +2379,14 @@ void
2398GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message, 2379GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message,
2399 const struct GNUNET_PeerIdentity *peer, 2380 const struct GNUNET_PeerIdentity *peer,
2400 const struct GNUNET_HELLO_Address *address, 2381 const struct GNUNET_HELLO_Address *address,
2401 struct Session *session, 2382 struct Session *session,
2402 const struct GNUNET_ATS_Information *ats, 2383 const struct GNUNET_ATS_Information *ats,
2403 uint32_t ats_count) 2384 uint32_t ats_count)
2404{ 2385{
2405 struct NeighbourMapEntry *n; 2386 struct NeighbourMapEntry *n;
2406 2387
2407#if DEBUG_TRANSPORT 2388#if DEBUG_TRANSPORT
2408 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2389 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ACK message from peer `%s'\n",
2409 "Received ACK message from peer `%s'\n",
2410 GNUNET_i2s (peer)); 2390 GNUNET_i2s (peer));
2411#endif 2391#endif
2412 2392
@@ -2418,16 +2398,16 @@ GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message,
2418 n = lookup_neighbour (peer); 2398 n = lookup_neighbour (peer);
2419 if (NULL == n) 2399 if (NULL == n)
2420 { 2400 {
2421 send_disconnect (peer, address, 2401 send_disconnect (peer, address, session);
2422 session);
2423 GNUNET_break (0); 2402 GNUNET_break (0);
2424 return; 2403 return;
2425 } 2404 }
2426 if (S_CONNECTED == n->state) 2405 if (S_CONNECTED == n->state)
2427 return; 2406 return;
2428 if (!is_connecting(n)) 2407 if (!is_connecting (n))
2429 { 2408 {
2430 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# unexpected ACK messages"), 1, 2409 GNUNET_STATISTICS_update (GST_stats,
2410 gettext_noop ("# unexpected ACK messages"), 1,
2431 GNUNET_NO); 2411 GNUNET_NO);
2432 return; 2412 return;
2433 } 2413 }
@@ -2441,30 +2421,26 @@ GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message,
2441 GNUNET_assert (n->address != NULL); 2421 GNUNET_assert (n->address != NULL);
2442 if (n->address_state == FRESH) 2422 if (n->address_state == FRESH)
2443 { 2423 {
2444 GST_validation_set_address_use (&n->id, 2424 GST_validation_set_address_use (&n->id, n->address, n->session, GNUNET_YES);
2445 n->address,
2446 n->session,
2447 GNUNET_YES);
2448 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_YES); 2425 GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_YES);
2449 n->address_state = USED; 2426 n->address_state = USED;
2450 } 2427 }
2451 2428
2452 neighbours_connected++; 2429 neighbours_connected++;
2453 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1, 2430 GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1,
2454 GNUNET_NO); 2431 GNUNET_NO);
2455 2432
2456 GST_neighbours_set_incoming_quota (&n->id, n->bandwidth_in); 2433 GST_neighbours_set_incoming_quota (&n->id, n->bandwidth_in);
2457 if (n->keepalive_task == GNUNET_SCHEDULER_NO_TASK) 2434 if (n->keepalive_task == GNUNET_SCHEDULER_NO_TASK)
2458 n->keepalive_task = GNUNET_SCHEDULER_add_now (&neighbour_keepalive_task, n); 2435 n->keepalive_task = GNUNET_SCHEDULER_add_now (&neighbour_keepalive_task, n);
2459#if DEBUG_TRANSPORT 2436#if DEBUG_TRANSPORT
2460 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2437 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2461 "Notify about connect of `%4s' using address '%s' session %X LINE %u\n", 2438 "Notify about connect of `%4s' using address '%s' session %X LINE %u\n",
2462 GNUNET_i2s (&n->id), 2439 GNUNET_i2s (&n->id), GST_plugins_a2s (n->address), n->session,
2463 GST_plugins_a2s (n->address), n->session, 2440 __LINE__);
2464 __LINE__);
2465#endif 2441#endif
2466 connect_notify_cb (callback_cls, &n->id, ats, ats_count); 2442 connect_notify_cb (callback_cls, &n->id, ats, ats_count);
2467 send_outbound_quota(peer, n->bandwidth_out); 2443 send_outbound_quota (peer, n->bandwidth_out);
2468} 2444}
2469 2445
2470struct BlackListCheckContext 2446struct BlackListCheckContext
@@ -2514,15 +2490,11 @@ handle_connect_blacklist_cont (void *cls,
2514 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 2490 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
2515 "transport-ats", 2491 "transport-ats",
2516 "Giving ATS session %p of address `%s' for peer %s\n", 2492 "Giving ATS session %p of address `%s' for peer %s\n",
2517 bcc->session, 2493 bcc->session, GST_plugins_a2s (bcc->address),
2518 GST_plugins_a2s (bcc->address),
2519 GNUNET_i2s (peer)); 2494 GNUNET_i2s (peer));
2520 /* Tell ATS about the session, so ATS can suggest it if it likes it. */ 2495 /* Tell ATS about the session, so ATS can suggest it if it likes it. */
2521 2496
2522 GNUNET_ATS_address_update (GST_ats, 2497 GNUNET_ATS_address_update (GST_ats, bcc->address, bcc->session, bcc->ats,
2523 bcc->address,
2524 bcc->session,
2525 bcc->ats,
2526 bcc->ats_count); 2498 bcc->ats_count);
2527 n->connect_ts = bcc->ts; 2499 n->connect_ts = bcc->ts;
2528 } 2500 }
@@ -2584,10 +2556,10 @@ GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message,
2584 GNUNET_ATS_address_update (GST_ats, address, session, ats, ats_count); 2556 GNUNET_ATS_address_update (GST_ats, address, session, ats, ats_count);
2585 2557
2586 n = lookup_neighbour (peer); 2558 n = lookup_neighbour (peer);
2587 if ( (n != NULL) && (S_CONNECTED == n->state) ) 2559 if ((n != NULL) && (S_CONNECTED == n->state))
2588 { 2560 {
2589 /* connected peer switches addresses */ 2561 /* connected peer switches addresses */
2590 return; 2562 return;
2591 } 2563 }
2592 2564
2593 2565
@@ -2603,9 +2575,10 @@ GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message,
2603 bcc->ats = (struct GNUNET_ATS_Information *) &bcc[1]; 2575 bcc->ats = (struct GNUNET_ATS_Information *) &bcc[1];
2604 memcpy (bcc->ats, ats, sizeof (struct GNUNET_ATS_Information) * ats_count); 2576 memcpy (bcc->ats, ats, sizeof (struct GNUNET_ATS_Information) * ats_count);
2605 bcc->ats[ats_count].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY); 2577 bcc->ats[ats_count].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
2606 bcc->ats[ats_count].value = htonl ((uint32_t) GST_neighbour_get_latency (peer).rel_value); 2578 bcc->ats[ats_count].value =
2607 GST_blacklist_test_allowed (peer, address->transport_name, handle_connect_blacklist_cont, 2579 htonl ((uint32_t) GST_neighbour_get_latency (peer).rel_value);
2608 bcc); 2580 GST_blacklist_test_allowed (peer, address->transport_name,
2581 handle_connect_blacklist_cont, bcc);
2609} 2582}
2610 2583
2611 2584
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h
index e85f1a4d0..5b37ccb6a 100644
--- a/src/transport/gnunet-service-transport_neighbours.h
+++ b/src/transport/gnunet-service-transport_neighbours.h
@@ -134,7 +134,7 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour);
134 */ 134 */
135void 135void
136GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour, 136GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour,
137 const struct GNUNET_ATS_Information * ats, 137 const struct GNUNET_ATS_Information *ats,
138 uint32_t ats_count); 138 uint32_t ats_count);
139 139
140 140
@@ -172,7 +172,8 @@ typedef void (*GST_NeighbourIterator) (void *cls,
172 neighbour, 172 neighbour,
173 const struct GNUNET_ATS_Information * 173 const struct GNUNET_ATS_Information *
174 ats, uint32_t ats_count, 174 ats, uint32_t ats_count,
175 const struct GNUNET_HELLO_Address *address); 175 const struct GNUNET_HELLO_Address *
176 address);
176 177
177 178
178/** 179/**
@@ -213,10 +214,10 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
213 */ 214 */
214int 215int
215GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer, 216GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer,
216 const struct GNUNET_HELLO_Address *address, 217 const struct GNUNET_HELLO_Address
217 struct Session *session, 218 *address, struct Session *session,
218 const struct GNUNET_ATS_Information *ats, 219 const struct GNUNET_ATS_Information *ats,
219 uint32_t ats_count, 220 uint32_t ats_count,
220 struct GNUNET_BANDWIDTH_Value32NBO 221 struct GNUNET_BANDWIDTH_Value32NBO
221 bandwidth_in, 222 bandwidth_in,
222 struct GNUNET_BANDWIDTH_Value32NBO 223 struct GNUNET_BANDWIDTH_Value32NBO
@@ -259,7 +260,7 @@ GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message,
259void 260void
260GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message, 261GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
261 const struct GNUNET_PeerIdentity *peer, 262 const struct GNUNET_PeerIdentity *peer,
262 const struct GNUNET_HELLO_Address *address, 263 const struct GNUNET_HELLO_Address *address,
263 struct Session *session, 264 struct Session *session,
264 const struct GNUNET_ATS_Information *ats, 265 const struct GNUNET_ATS_Information *ats,
265 uint32_t ats_count); 266 uint32_t ats_count);
@@ -268,7 +269,7 @@ void
268GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message, 269GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message,
269 const struct GNUNET_PeerIdentity *peer, 270 const struct GNUNET_PeerIdentity *peer,
270 const struct GNUNET_HELLO_Address *address, 271 const struct GNUNET_HELLO_Address *address,
271 struct Session *session, 272 struct Session *session,
272 const struct GNUNET_ATS_Information *ats, 273 const struct GNUNET_ATS_Information *ats,
273 uint32_t ats_count); 274 uint32_t ats_count);
274 275
@@ -276,7 +277,7 @@ GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message,
276/** 277/**
277 * Obtain current latency information for the given neighbour. 278 * Obtain current latency information for the given neighbour.
278 * 279 *
279 * @param peer 280 * @param peer
280 * @return observed latency of the address, FOREVER if the address was 281 * @return observed latency of the address, FOREVER if the address was
281 * never successfully validated 282 * never successfully validated
282 */ 283 */
diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c
index f14eb57d6..4b3dd455d 100644
--- a/src/transport/gnunet-service-transport_plugins.c
+++ b/src/transport/gnunet-service-transport_plugins.c
@@ -144,7 +144,8 @@ GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
144 if (plug->api == NULL) 144 if (plug->api == NULL)
145 { 145 {
146 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 146 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
147 _("Failed to load transport plugin for `%s'\n"), plug->lib_name); 147 _("Failed to load transport plugin for `%s'\n"),
148 plug->lib_name);
148 GNUNET_CONTAINER_DLL_remove (plugins_head, plugins_tail, plug); 149 GNUNET_CONTAINER_DLL_remove (plugins_head, plugins_tail, plug);
149 GNUNET_free (plug->short_name); 150 GNUNET_free (plug->short_name);
150 GNUNET_free (plug->lib_name); 151 GNUNET_free (plug->lib_name);
@@ -210,16 +211,16 @@ GST_plugins_a2s (const struct GNUNET_HELLO_Address *address)
210 api = GST_plugins_find (address->transport_name); 211 api = GST_plugins_find (address->transport_name);
211 if (NULL == api) 212 if (NULL == api)
212 return "<plugin unknown>"; 213 return "<plugin unknown>";
213 if (0 == address->address_length) 214 if (0 == address->address_length)
214 { 215 {
215 GNUNET_snprintf (unable_to_show, 216 GNUNET_snprintf (unable_to_show, sizeof (unable_to_show),
216 sizeof (unable_to_show), 217 "<unable to stringify %u-byte long address of %s transport>",
217 "<unable to stringify %u-byte long address of %s transport>", 218 (unsigned int) address->address_length,
218 (unsigned int) address->address_length, 219 address->transport_name);
219 address->transport_name);
220 return unable_to_show; 220 return unable_to_show;
221 } 221 }
222 return api->address_to_string (NULL, address->address, address->address_length); 222 return api->address_to_string (NULL, address->address,
223 address->address_length);
223} 224}
224 225
225 226
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 006a318f6..641214b39 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -333,9 +333,7 @@ validation_entry_match (void *cls, const GNUNET_HashCode * key, void *value)
333 struct ValidationEntryMatchContext *vemc = cls; 333 struct ValidationEntryMatchContext *vemc = cls;
334 struct ValidationEntry *ve = value; 334 struct ValidationEntry *ve = value;
335 335
336 if (0 == 336 if (0 == GNUNET_HELLO_address_cmp (ve->address, vemc->address))
337 GNUNET_HELLO_address_cmp (ve->address,
338 vemc->address))
339 { 337 {
340 vemc->ve = ve; 338 vemc->ve = ve;
341 return GNUNET_NO; 339 return GNUNET_NO;
@@ -397,15 +395,13 @@ timeout_hello_validation (void *cls,
397 struct GNUNET_TIME_Relative left; 395 struct GNUNET_TIME_Relative left;
398 396
399 ve->timeout_task = GNUNET_SCHEDULER_NO_TASK; 397 ve->timeout_task = GNUNET_SCHEDULER_NO_TASK;
400 max = GNUNET_TIME_absolute_max (ve->valid_until, 398 max = GNUNET_TIME_absolute_max (ve->valid_until, ve->revalidation_block);
401 ve->revalidation_block);
402 left = GNUNET_TIME_absolute_get_remaining (max); 399 left = GNUNET_TIME_absolute_get_remaining (max);
403 if (left.rel_value > 0) 400 if (left.rel_value > 0)
404 { 401 {
405 /* should wait a bit longer */ 402 /* should wait a bit longer */
406 ve->timeout_task = GNUNET_SCHEDULER_add_delayed (left, 403 ve->timeout_task =
407 &timeout_hello_validation, 404 GNUNET_SCHEDULER_add_delayed (left, &timeout_hello_validation, ve);
408 ve);
409 return; 405 return;
410 } 406 }
411 GNUNET_STATISTICS_update (GST_stats, 407 GNUNET_STATISTICS_update (GST_stats,
@@ -443,10 +439,13 @@ transmit_ping_if_allowed (void *cls, const struct GNUNET_PeerIdentity *pid,
443 slen = strlen (ve->address->transport_name) + 1; 439 slen = strlen (ve->address->transport_name) + 1;
444 hello = GST_hello_get (); 440 hello = GST_hello_get ();
445 hsize = ntohs (hello->size); 441 hsize = ntohs (hello->size);
446 tsize = sizeof (struct TransportPingMessage) + ve->address->address_length + slen + hsize; 442 tsize =
443 sizeof (struct TransportPingMessage) + ve->address->address_length +
444 slen + hsize;
447 445
448 ping.header.size = 446 ping.header.size =
449 htons (sizeof (struct TransportPingMessage) + ve->address->address_length + slen); 447 htons (sizeof (struct TransportPingMessage) +
448 ve->address->address_length + slen);
450 ping.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PING); 449 ping.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PING);
451 ping.challenge = htonl (ve->challenge); 450 ping.challenge = htonl (ve->challenge);
452 ping.target = *pid; 451 ping.target = *pid;
@@ -459,7 +458,9 @@ transmit_ping_if_allowed (void *cls, const struct GNUNET_PeerIdentity *pid,
459 "HELLO", "PING", (unsigned int) tsize); 458 "HELLO", "PING", (unsigned int) tsize);
460 /* message too big (!?), get rid of HELLO */ 459 /* message too big (!?), get rid of HELLO */
461 hsize = 0; 460 hsize = 0;
462 tsize = sizeof (struct TransportPingMessage) + ve->address->address_length + slen + hsize; 461 tsize =
462 sizeof (struct TransportPingMessage) + ve->address->address_length +
463 slen + hsize;
463 } 464 }
464 { 465 {
465 char message_buf[tsize]; 466 char message_buf[tsize];
@@ -481,8 +482,8 @@ transmit_ping_if_allowed (void *cls, const struct GNUNET_PeerIdentity *pid,
481 ret = 482 ret =
482 papi->send (papi->cls, pid, message_buf, tsize, PING_PRIORITY, 483 papi->send (papi->cls, pid, message_buf, tsize, PING_PRIORITY,
483 ACCEPTABLE_PING_DELAY, NULL /* no session */ , 484 ACCEPTABLE_PING_DELAY, NULL /* no session */ ,
484 ve->address->address, ve->address->address_length, 485 ve->address->address, ve->address->address_length,
485 GNUNET_YES, NULL, NULL); 486 GNUNET_YES, NULL, NULL);
486 } 487 }
487 } 488 }
488 if (-1 != ret) 489 if (-1 != ret)
@@ -515,12 +516,11 @@ revalidate_address (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
515 ve->revalidation_task = GNUNET_SCHEDULER_NO_TASK; 516 ve->revalidation_task = GNUNET_SCHEDULER_NO_TASK;
516 delay = GNUNET_TIME_absolute_get_remaining (ve->revalidation_block); 517 delay = GNUNET_TIME_absolute_get_remaining (ve->revalidation_block);
517 /* How long until we can possibly permit the next PING? */ 518 /* How long until we can possibly permit the next PING? */
518 canonical_delay = 519 canonical_delay =
519 (ve->in_use == GNUNET_YES) 520 (ve->in_use ==
520 ? CONNECTED_PING_FREQUENCY 521 GNUNET_YES) ? CONNECTED_PING_FREQUENCY
521 : ( (GNUNET_TIME_absolute_get_remaining (ve->valid_until).rel_value > 0) 522 : ((GNUNET_TIME_absolute_get_remaining (ve->valid_until).rel_value >
522 ? VALIDATED_PING_FREQUENCY 523 0) ? VALIDATED_PING_FREQUENCY : UNVALIDATED_PING_KEEPALIVE);
523 : UNVALIDATED_PING_KEEPALIVE);
524 if (delay.rel_value > canonical_delay.rel_value * 2) 524 if (delay.rel_value > canonical_delay.rel_value * 2)
525 { 525 {
526 /* situation changed, recalculate delay */ 526 /* situation changed, recalculate delay */
@@ -534,28 +534,28 @@ revalidate_address (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
534 GNUNET_SCHEDULER_add_delayed (delay, &revalidate_address, ve); 534 GNUNET_SCHEDULER_add_delayed (delay, &revalidate_address, ve);
535 return; 535 return;
536 } 536 }
537 ve->revalidation_block = 537 ve->revalidation_block = GNUNET_TIME_relative_to_absolute (canonical_delay);
538 GNUNET_TIME_relative_to_absolute (canonical_delay);
539 538
540 /* schedule next PINGing with some extra random delay to avoid synchronous re-validations */ 539 /* schedule next PINGing with some extra random delay to avoid synchronous re-validations */
541 rdelay = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 540 rdelay =
542 canonical_delay.rel_value); 541 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
542 canonical_delay.rel_value);
543 delay = 543 delay =
544 GNUNET_TIME_relative_add (canonical_delay, 544 GNUNET_TIME_relative_add (canonical_delay,
545 GNUNET_TIME_relative_multiply 545 GNUNET_TIME_relative_multiply
546 (GNUNET_TIME_UNIT_MILLISECONDS, rdelay)); 546 (GNUNET_TIME_UNIT_MILLISECONDS, rdelay));
547 ve->revalidation_task = 547 ve->revalidation_task =
548 GNUNET_SCHEDULER_add_delayed (delay, &revalidate_address, ve); 548 GNUNET_SCHEDULER_add_delayed (delay, &revalidate_address, ve);
549 549
550 /* start PINGing by checking blacklist */ 550 /* start PINGing by checking blacklist */
551 GNUNET_STATISTICS_update (GST_stats, 551 GNUNET_STATISTICS_update (GST_stats,
552 gettext_noop ("# address revalidations started"), 1, 552 gettext_noop ("# address revalidations started"), 1,
553 GNUNET_NO); 553 GNUNET_NO);
554 bc = GST_blacklist_test_allowed (&ve->pid, ve->address->transport_name, 554 bc = GST_blacklist_test_allowed (&ve->pid, ve->address->transport_name,
555 &transmit_ping_if_allowed, ve); 555 &transmit_ping_if_allowed, ve);
556 if (NULL != bc) 556 if (NULL != bc)
557 ve->bc = bc; /* only set 'bc' if 'transmit_ping_if_allowed' was not already 557 ve->bc = bc; /* only set 'bc' if 'transmit_ping_if_allowed' was not already
558 called... */ 558 * called... */
559} 559}
560 560
561 561
@@ -592,9 +592,11 @@ find_validation_entry (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
592 ve->latency = GNUNET_TIME_UNIT_FOREVER_REL; 592 ve->latency = GNUNET_TIME_UNIT_FOREVER_REL;
593 ve->challenge = 593 ve->challenge =
594 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX); 594 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX);
595 ve->timeout_task = GNUNET_SCHEDULER_add_delayed (UNVALIDATED_PING_KEEPALIVE, 595 ve->timeout_task =
596 &timeout_hello_validation, ve); 596 GNUNET_SCHEDULER_add_delayed (UNVALIDATED_PING_KEEPALIVE,
597 GNUNET_CONTAINER_multihashmap_put (validation_map, &address->peer.hashPubKey, ve, 597 &timeout_hello_validation, ve);
598 GNUNET_CONTAINER_multihashmap_put (validation_map, &address->peer.hashPubKey,
599 ve,
598 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 600 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
599 ve->expecting_pong = GNUNET_NO; 601 ve->expecting_pong = GNUNET_NO;
600 return ve; 602 return ve;
@@ -611,8 +613,7 @@ find_validation_entry (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
611 * @return GNUNET_OK (keep the address) 613 * @return GNUNET_OK (keep the address)
612 */ 614 */
613static int 615static int
614add_valid_address (void *cls, 616add_valid_address (void *cls, const struct GNUNET_HELLO_Address *address,
615 const struct GNUNET_HELLO_Address *address,
616 struct GNUNET_TIME_Absolute expiration) 617 struct GNUNET_TIME_Absolute expiration)
617{ 618{
618 const struct GNUNET_HELLO_Message *hello = cls; 619 const struct GNUNET_HELLO_Message *hello = cls;
@@ -628,7 +629,7 @@ add_valid_address (void *cls,
628 GNUNET_break (0); 629 GNUNET_break (0);
629 return GNUNET_OK; /* invalid HELLO !? */ 630 return GNUNET_OK; /* invalid HELLO !? */
630 } 631 }
631 if (0 == memcmp(&GST_my_identity, &pid, sizeof (struct GNUNET_PeerIdentity))) 632 if (0 == memcmp (&GST_my_identity, &pid, sizeof (struct GNUNET_PeerIdentity)))
632 { 633 {
633 /* Peerinfo returned own identity, skip validation */ 634 /* Peerinfo returned own identity, skip validation */
634 return GNUNET_OK; 635 return GNUNET_OK;
@@ -639,8 +640,7 @@ add_valid_address (void *cls,
639 640
640 if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task) 641 if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task)
641 ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, ve); 642 ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, ve);
642 GNUNET_ATS_address_update (GST_ats, address, NULL, NULL, 643 GNUNET_ATS_address_update (GST_ats, address, NULL, NULL, 0);
643 0);
644 return GNUNET_OK; 644 return GNUNET_OK;
645} 645}
646 646
@@ -716,8 +716,7 @@ GST_validation_stop ()
716static void 716static void
717multicast_pong (void *cls, 717multicast_pong (void *cls,
718 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded 718 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
719 *public_key, 719 *public_key, struct GNUNET_TIME_Absolute valid_until,
720 struct GNUNET_TIME_Absolute valid_until,
721 struct GNUNET_TIME_Absolute validation_block, 720 struct GNUNET_TIME_Absolute validation_block,
722 const struct GNUNET_HELLO_Address *address) 721 const struct GNUNET_HELLO_Address *address)
723{ 722{
@@ -729,8 +728,7 @@ multicast_pong (void *cls,
729 return; 728 return;
730 (void) papi->send (papi->cls, &address->peer, (const char *) pong, 729 (void) papi->send (papi->cls, &address->peer, (const char *) pong,
731 ntohs (pong->header.size), PONG_PRIORITY, 730 ntohs (pong->header.size), PONG_PRIORITY,
732 ACCEPTABLE_PING_DELAY, NULL, 731 ACCEPTABLE_PING_DELAY, NULL, address->address,
733 address->address,
734 address->address_length, GNUNET_YES, NULL, NULL); 732 address->address_length, GNUNET_YES, NULL, NULL);
735} 733}
736 734
@@ -747,7 +745,7 @@ void
747GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender, 745GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
748 const struct GNUNET_MessageHeader *hdr, 746 const struct GNUNET_MessageHeader *hdr,
749 const struct GNUNET_HELLO_Address *sender_address, 747 const struct GNUNET_HELLO_Address *sender_address,
750 struct Session *session) 748 struct Session *session)
751{ 749{
752 const struct TransportPingMessage *ping; 750 const struct TransportPingMessage *ping;
753 struct TransportPongMessage *pong; 751 struct TransportPongMessage *pong;
@@ -804,8 +802,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
804 address.transport_name = addr; 802 address.transport_name = addr;
805 address.peer = *sender; 803 address.peer = *sender;
806 if (GNUNET_YES != 804 if (GNUNET_YES !=
807 GST_hello_test_address (&address, &sig_cache, 805 GST_hello_test_address (&address, &sig_cache, &sig_cache_exp))
808 &sig_cache_exp))
809 { 806 {
810 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 807 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
811 _ 808 _
@@ -867,10 +864,8 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
867 ret = 864 ret =
868 papi->send (papi->cls, sender, (const char *) pong, 865 papi->send (papi->cls, sender, (const char *) pong,
869 ntohs (pong->header.size), PONG_PRIORITY, 866 ntohs (pong->header.size), PONG_PRIORITY,
870 ACCEPTABLE_PING_DELAY, session, 867 ACCEPTABLE_PING_DELAY, session, sender_address->address,
871 sender_address->address, 868 sender_address->address_length, GNUNET_SYSERR, NULL, NULL);
872 sender_address->address_length,
873 GNUNET_SYSERR, NULL, NULL);
874 if (ret != -1) 869 if (ret != -1)
875 { 870 {
876 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 871 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -922,9 +917,9 @@ struct ValidateAddressContext
922 * @return GNUNET_OK (keep the address) 917 * @return GNUNET_OK (keep the address)
923 */ 918 */
924static int 919static int
925validate_address_iterator (void *cls, 920validate_address_iterator (void *cls,
926 const struct GNUNET_HELLO_Address *address, 921 const struct GNUNET_HELLO_Address *address,
927 struct GNUNET_TIME_Absolute expiration) 922 struct GNUNET_TIME_Absolute expiration)
928{ 923{
929 const struct ValidateAddressContext *vac = cls; 924 const struct ValidateAddressContext *vac = cls;
930 struct ValidationEntry *ve; 925 struct ValidationEntry *ve;
@@ -933,8 +928,7 @@ validate_address_iterator (void *cls,
933 return GNUNET_OK; /* expired */ 928 return GNUNET_OK; /* expired */
934 ve = find_validation_entry (&vac->public_key, address); 929 ve = find_validation_entry (&vac->public_key, address);
935 if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task) 930 if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task)
936 ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, 931 ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, ve);
937 ve);
938 return GNUNET_OK; 932 return GNUNET_OK;
939} 933}
940 934
@@ -956,8 +950,7 @@ add_valid_peer_address (void *cls, size_t max, void *buf)
956 if (GNUNET_YES == ve->copied) 950 if (GNUNET_YES == ve->copied)
957 return 0; /* terminate */ 951 return 0; /* terminate */
958 ve->copied = GNUNET_YES; 952 ve->copied = GNUNET_YES;
959 return GNUNET_HELLO_add_address (ve->address, ve->valid_until, 953 return GNUNET_HELLO_add_address (ve->address, ve->valid_until, buf, max);
960 buf, max);
961} 954}
962 955
963 956
@@ -1056,7 +1049,7 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
1056 struct GNUNET_ATS_Information ats; 1049 struct GNUNET_ATS_Information ats;
1057 1050
1058 ats.type = htonl (GNUNET_ATS_QUALITY_NET_DELAY); 1051 ats.type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
1059 ats.value = htonl ((uint32_t) ve->latency.rel_value); 1052 ats.value = htonl ((uint32_t) ve->latency.rel_value);
1060 GNUNET_ATS_address_update (GST_ats, ve->address, NULL, &ats, 1); 1053 GNUNET_ATS_address_update (GST_ats, ve->address, NULL, &ats, 1);
1061 } 1054 }
1062 /* build HELLO to store in PEERINFO */ 1055 /* build HELLO to store in PEERINFO */
@@ -1102,7 +1095,8 @@ GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello)
1102 GNUNET_free (h); 1095 GNUNET_free (h);
1103 GNUNET_assert (NULL == 1096 GNUNET_assert (NULL ==
1104 GNUNET_HELLO_iterate_addresses (hm, GNUNET_NO, 1097 GNUNET_HELLO_iterate_addresses (hm, GNUNET_NO,
1105 &validate_address_iterator, &vac)); 1098 &validate_address_iterator,
1099 &vac));
1106} 1100}
1107 1101
1108 1102
@@ -1138,8 +1132,8 @@ iterate_addresses (void *cls, const GNUNET_HashCode * key, void *value)
1138 struct IteratorContext *ic = cls; 1132 struct IteratorContext *ic = cls;
1139 struct ValidationEntry *ve = value; 1133 struct ValidationEntry *ve = value;
1140 1134
1141 ic->cb (ic->cb_cls, &ve->public_key, ve->valid_until, 1135 ic->cb (ic->cb_cls, &ve->public_key, ve->valid_until, ve->revalidation_block,
1142 ve->revalidation_block, ve->address); 1136 ve->address);
1143 return GNUNET_OK; 1137 return GNUNET_OK;
1144} 1138}
1145 1139
@@ -1178,16 +1172,15 @@ GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
1178 */ 1172 */
1179void 1173void
1180GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender, 1174GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender,
1181 const struct GNUNET_HELLO_Address *address, 1175 const struct GNUNET_HELLO_Address *address,
1182 struct Session *session, 1176 struct Session *session, int in_use)
1183 int in_use)
1184{ 1177{
1185 struct ValidationEntry *ve; 1178 struct ValidationEntry *ve;
1186 1179
1187 if (NULL != address) 1180 if (NULL != address)
1188 ve = find_validation_entry (NULL, address); 1181 ve = find_validation_entry (NULL, address);
1189 else 1182 else
1190 ve = NULL; /* FIXME: lookup based on session... */ 1183 ve = NULL; /* FIXME: lookup based on session... */
1191 if (NULL == ve) 1184 if (NULL == ve)
1192 { 1185 {
1193 /* this can happen for inbound connections (sender_address_len == 0); */ 1186 /* this can happen for inbound connections (sender_address_len == 0); */
@@ -1195,19 +1188,16 @@ GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender,
1195 } 1188 }
1196 if (ve->in_use == in_use) 1189 if (ve->in_use == in_use)
1197 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1190 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1198 "GST_validation_set_address_use: %s %s: ve->in_use %i <-> in_use %i\n", 1191 "GST_validation_set_address_use: %s %s: ve->in_use %i <-> in_use %i\n",
1199 GNUNET_i2s(sender), 1192 GNUNET_i2s (sender), GST_plugins_a2s (address), ve->in_use,
1200 GST_plugins_a2s(address), 1193 in_use);
1201 ve->in_use, 1194 GNUNET_break (ve->in_use != in_use); /* should be different... */
1202 in_use);
1203 GNUNET_break (ve->in_use != in_use); /* should be different... */
1204 ve->in_use = in_use; 1195 ve->in_use = in_use;
1205 if (in_use == GNUNET_YES) 1196 if (in_use == GNUNET_YES)
1206 { 1197 {
1207 /* from now on, higher frequeny, so reschedule now */ 1198 /* from now on, higher frequeny, so reschedule now */
1208 GNUNET_SCHEDULER_cancel (ve->revalidation_task); 1199 GNUNET_SCHEDULER_cancel (ve->revalidation_task);
1209 ve->revalidation_task = 1200 ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, ve);
1210 GNUNET_SCHEDULER_add_now (&revalidate_address, ve);
1211 } 1201 }
1212} 1202}
1213 1203
@@ -1218,20 +1208,20 @@ GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender,
1218 * 1208 *
1219 * @param sender peer 1209 * @param sender peer
1220 * @param address the address 1210 * @param address the address
1221 * @param session session 1211 * @param session session
1222 * @return observed latency of the address, FOREVER if the address was 1212 * @return observed latency of the address, FOREVER if the address was
1223 * never successfully validated 1213 * never successfully validated
1224 */ 1214 */
1225struct GNUNET_TIME_Relative 1215struct GNUNET_TIME_Relative
1226GST_validation_get_address_latency (const struct GNUNET_PeerIdentity *sender, 1216GST_validation_get_address_latency (const struct GNUNET_PeerIdentity *sender,
1227 const struct GNUNET_HELLO_Address *address, 1217 const struct GNUNET_HELLO_Address *address,
1228 struct Session *session) 1218 struct Session *session)
1229{ 1219{
1230 struct ValidationEntry *ve; 1220 struct ValidationEntry *ve;
1231 1221
1232 if (NULL == address) 1222 if (NULL == address)
1233 { 1223 {
1234 GNUNET_break (0); // FIXME: support having latency only with session... 1224 GNUNET_break (0); // FIXME: support having latency only with session...
1235 return GNUNET_TIME_UNIT_FOREVER_REL; 1225 return GNUNET_TIME_UNIT_FOREVER_REL;
1236 } 1226 }
1237 ve = find_validation_entry (NULL, address); 1227 ve = find_validation_entry (NULL, address);
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index a3692e3cf..f5282d4e9 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -59,16 +59,15 @@ GST_validation_stop (void);
59 */ 59 */
60void 60void
61GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender, 61GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender,
62 const struct GNUNET_HELLO_Address *address, 62 const struct GNUNET_HELLO_Address *address,
63 struct Session *session, 63 struct Session *session, int in_use);
64 int in_use);
65 64
66 65
67/** 66/**
68 * Query validation about the latest observed latency on a given 67 * Query validation about the latest observed latency on a given
69 * address. 68 * address.
70 * 69 *
71 * @param sender peer 70 * @param sender peer
72 * @param address the address 71 * @param address the address
73 * @param session session 72 * @param session session
74 * @return observed latency of the address, FOREVER if the address was 73 * @return observed latency of the address, FOREVER if the address was
@@ -76,8 +75,8 @@ GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender,
76 */ 75 */
77struct GNUNET_TIME_Relative 76struct GNUNET_TIME_Relative
78GST_validation_get_address_latency (const struct GNUNET_PeerIdentity *sender, 77GST_validation_get_address_latency (const struct GNUNET_PeerIdentity *sender,
79 const struct GNUNET_HELLO_Address *address, 78 const struct GNUNET_HELLO_Address *address,
80 struct Session *session); 79 struct Session *session);
81 80
82 81
83/** 82/**
@@ -91,8 +90,8 @@ GST_validation_get_address_latency (const struct GNUNET_PeerIdentity *sender,
91void 90void
92GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender, 91GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
93 const struct GNUNET_MessageHeader *hdr, 92 const struct GNUNET_MessageHeader *hdr,
94 const struct GNUNET_HELLO_Address *sender_address, 93 const struct GNUNET_HELLO_Address *sender_address,
95 struct Session *session); 94 struct Session *session);
96 95
97 96
98/** 97/**
@@ -138,7 +137,8 @@ typedef void (*GST_ValidationAddressCallback) (void *cls,
138 valid_until, 137 valid_until,
139 struct GNUNET_TIME_Absolute 138 struct GNUNET_TIME_Absolute
140 validation_block, 139 validation_block,
141 const struct GNUNET_HELLO_Address *address); 140 const struct GNUNET_HELLO_Address
141 * address);
142 142
143 143
144/** 144/**
diff --git a/src/transport/gnunet-transport-wlan-helper-dummy.c b/src/transport/gnunet-transport-wlan-helper-dummy.c
index b5f2f625a..32d58426c 100644
--- a/src/transport/gnunet-transport-wlan-helper-dummy.c
+++ b/src/transport/gnunet-transport-wlan-helper-dummy.c
@@ -188,19 +188,15 @@ main (int argc, char *argv[])
188 erg = mkfifo (FIFO_FILE1, 0666); 188 erg = mkfifo (FIFO_FILE1, 0666);
189 if (0 != erg) 189 if (0 != erg)
190 { 190 {
191 fprintf (stderr, 191 fprintf (stderr, "Error in mkfifo(%s): %s\n", FIFO_FILE1,
192 "Error in mkfifo(%s): %s\n", 192 strerror (errno));
193 FIFO_FILE1,
194 strerror (errno));
195 //exit(1); 193 //exit(1);
196 } 194 }
197 erg = mkfifo (FIFO_FILE2, 0666); 195 erg = mkfifo (FIFO_FILE2, 0666);
198 if (0 != erg) 196 if (0 != erg)
199 { 197 {
200 fprintf (stderr, 198 fprintf (stderr, "Error in mkfifo(%s): %s\n", FIFO_FILE2,
201 "Error in mkfifo(%s): %s\n", 199 strerror (errno));
202 FIFO_FILE2,
203 strerror (errno));
204 //exit(1); 200 //exit(1);
205 } 201 }
206 202
@@ -256,9 +252,7 @@ main (int argc, char *argv[])
256 252
257 if (fdpin >= FD_SETSIZE) 253 if (fdpin >= FD_SETSIZE)
258 { 254 {
259 fprintf (stderr, 255 fprintf (stderr, "File fdpin number too large (%d > %u)\n", fdpin,
260 "File fdpin number too large (%d > %u)\n",
261 fdpin,
262 (unsigned int) FD_SETSIZE); 256 (unsigned int) FD_SETSIZE);
263 goto end; 257 goto end;
264 } 258 }
@@ -268,9 +262,7 @@ main (int argc, char *argv[])
268 262
269 if (fdpout >= FD_SETSIZE) 263 if (fdpout >= FD_SETSIZE)
270 { 264 {
271 fprintf (stderr, 265 fprintf (stderr, "File fdpout number too large (%d > %u)\n", fdpout,
272 "File fdpout number too large (%d > %u)\n",
273 fdpout,
274 (unsigned int) FD_SETSIZE); 266 (unsigned int) FD_SETSIZE);
275 goto end; 267 goto end;
276 268
@@ -328,13 +320,11 @@ main (int argc, char *argv[])
328 } 320 }
329 321
330 retval = select (maxfd + 1, &rfds, &wfds, NULL, &tv); 322 retval = select (maxfd + 1, &rfds, &wfds, NULL, &tv);
331 if ( (-1 == retval) && (EINTR == errno) ) 323 if ((-1 == retval) && (EINTR == errno))
332 continue; 324 continue;
333 if (0 > retval) 325 if (0 > retval)
334 { 326 {
335 fprintf (stderr, 327 fprintf (stderr, "select failed: %s\n", strerror (errno));
336 "select failed: %s\n",
337 strerror (errno));
338 closeprog = 1; 328 closeprog = 1;
339 break; 329 break;
340 } 330 }
@@ -347,9 +337,8 @@ main (int argc, char *argv[])
347 if (0 > ret) 337 if (0 > ret)
348 { 338 {
349 closeprog = 1; 339 closeprog = 1;
350 fprintf (stderr, 340 fprintf (stderr, "Write ERROR to STDOUT_FILENO: %s\n",
351 "Write ERROR to STDOUT_FILENO: %s\n", 341 strerror (errno));
352 strerror (errno));
353 break; 342 break;
354 } 343 }
355 else 344 else
@@ -373,9 +362,7 @@ main (int argc, char *argv[])
373 if (0 > ret) 362 if (0 > ret)
374 { 363 {
375 closeprog = 1; 364 closeprog = 1;
376 fprintf (stderr, 365 fprintf (stderr, "Write ERROR to fdpout: %s\n", strerror (errno));
377 "Write ERROR to fdpout: %s\n",
378 strerror (errno));
379 } 366 }
380 else 367 else
381 { 368 {
@@ -396,9 +383,8 @@ main (int argc, char *argv[])
396 if (0 > readsize) 383 if (0 > readsize)
397 { 384 {
398 closeprog = 1; 385 closeprog = 1;
399 fprintf (stderr, 386 fprintf (stderr, "Error reading from STDIN_FILENO: %s\n",
400 "Error reading from STDIN_FILENO: %s\n", 387 strerror (errno));
401 strerror (errno));
402 } 388 }
403 else if (0 < readsize) 389 else if (0 < readsize)
404 { 390 {
@@ -419,9 +405,7 @@ main (int argc, char *argv[])
419 if (0 > readsize) 405 if (0 > readsize)
420 { 406 {
421 closeprog = 1; 407 closeprog = 1;
422 fprintf (stderr, 408 fprintf (stderr, "Error reading from fdpin: %s\n", strerror (errno));
423 "Error reading from fdpin: %s\n",
424 strerror (errno));
425 break; 409 break;
426 } 410 }
427 else if (0 < readsize) 411 else if (0 < readsize)
@@ -453,4 +437,3 @@ end:
453 } 437 }
454 return 0; 438 return 0;
455} 439}
456
diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c
index 53e0efedd..ca4542f1a 100644
--- a/src/transport/gnunet-transport-wlan-helper.c
+++ b/src/transport/gnunet-transport-wlan-helper.c
@@ -239,35 +239,35 @@ enum ieee80211_radiotap_type
239}; 239};
240 240
241/* For IEEE80211_RADIOTAP_FLAGS */ 241/* For IEEE80211_RADIOTAP_FLAGS */
242#define IEEE80211_RADIOTAP_F_CFP 0x01 /* sent/received 242#define IEEE80211_RADIOTAP_F_CFP 0x01 /* sent/received
243 * during CFP 243 * during CFP
244 */ 244 */
245#define IEEE80211_RADIOTAP_F_SHORTPRE 0x02 /* sent/received 245#define IEEE80211_RADIOTAP_F_SHORTPRE 0x02 /* sent/received
246 * with short 246 * with short
247 * preamble 247 * preamble
248 */ 248 */
249#define IEEE80211_RADIOTAP_F_WEP 0x04 /* sent/received 249#define IEEE80211_RADIOTAP_F_WEP 0x04 /* sent/received
250 * with WEP encryption 250 * with WEP encryption
251 */ 251 */
252#define IEEE80211_RADIOTAP_F_FRAG 0x08 /* sent/received 252#define IEEE80211_RADIOTAP_F_FRAG 0x08 /* sent/received
253 * with fragmentation 253 * with fragmentation
254 */ 254 */
255#define IEEE80211_RADIOTAP_F_FCS 0x10 /* frame includes FCS */ 255#define IEEE80211_RADIOTAP_F_FCS 0x10 /* frame includes FCS */
256#define IEEE80211_RADIOTAP_F_DATAPAD 0x20 /* frame has padding between 256#define IEEE80211_RADIOTAP_F_DATAPAD 0x20 /* frame has padding between
257 * 802.11 header and payload 257 * 802.11 header and payload
258 * (to 32-bit boundary) 258 * (to 32-bit boundary)
259 */ 259 */
260/* For IEEE80211_RADIOTAP_RX_FLAGS */ 260/* For IEEE80211_RADIOTAP_RX_FLAGS */
261#define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 /* frame failed crc check */ 261#define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 /* frame failed crc check */
262 262
263/* For IEEE80211_RADIOTAP_TX_FLAGS */ 263/* For IEEE80211_RADIOTAP_TX_FLAGS */
264#define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive 264#define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive
265 * retries */ 265 * retries */
266#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ 266#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */
267#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ 267#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
268#define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* frame should not be ACKed */ 268#define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* frame should not be ACKed */
269#define IEEE80211_RADIOTAP_F_TX_NOSEQ 0x0010 /* sequence number handled 269#define IEEE80211_RADIOTAP_F_TX_NOSEQ 0x0010 /* sequence number handled
270 * by userspace */ 270 * by userspace */
271 271
272 272
273/** 273/**
@@ -478,10 +478,9 @@ struct ieee80211_radiotap_iterator
478 * index corresponds to the IEEE80211_RADIOTAP_... defines. 478 * index corresponds to the IEEE80211_RADIOTAP_... defines.
479 */ 479 */
480static int 480static int
481ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator 481ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator *iterator,
482 *iterator, 482 struct ieee80211_radiotap_header
483 struct ieee80211_radiotap_header 483 *radiotap_header, int max_length)
484 *radiotap_header, int max_length)
485{ 484{
486 if (iterator == NULL) 485 if (iterator == NULL)
487 return (-EINVAL); 486 return (-EINVAL);
@@ -503,47 +502,47 @@ ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator
503 iterator->arg_index = 0; 502 iterator->arg_index = 0;
504 iterator->bitmap_shifter = le32toh (radiotap_header->it_present); 503 iterator->bitmap_shifter = le32toh (radiotap_header->it_present);
505 iterator->arg = 504 iterator->arg =
506 ((uint8_t *) radiotap_header) + sizeof (struct ieee80211_radiotap_header); 505 ((uint8_t *) radiotap_header) + sizeof (struct ieee80211_radiotap_header);
507 iterator->this_arg = 0; 506 iterator->this_arg = 0;
508 507
509 /* find payload start allowing for extended bitmap(s) */ 508 /* find payload start allowing for extended bitmap(s) */
510 509
511 if ((iterator->bitmap_shifter & IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK)) 510 if ((iterator->bitmap_shifter & IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK))
511 {
512 while (le32toh (*((uint32_t *) iterator->arg)) &
513 IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK)
512 { 514 {
513 while (le32toh (*((uint32_t *) iterator->arg)) &
514 IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK)
515 {
516 iterator->arg += sizeof (uint32_t);
517
518 /*
519 * check for insanity where the present bitmaps
520 * keep claiming to extend up to or even beyond the
521 * stated radiotap header length
522 */
523
524 if ((((void *) iterator->arg) - ((void *) iterator->rtheader)) >
525 iterator->max_length)
526 return (-EINVAL);
527
528 }
529
530 iterator->arg += sizeof (uint32_t); 515 iterator->arg += sizeof (uint32_t);
531 516
532 /* 517 /*
533 * no need to check again for blowing past stated radiotap 518 * check for insanity where the present bitmaps
534 * header length, becuase ieee80211_radiotap_iterator_next 519 * keep claiming to extend up to or even beyond the
535 * checks it before it is dereferenced 520 * stated radiotap header length
536 */ 521 */
537 522
523 if ((((void *) iterator->arg) - ((void *) iterator->rtheader)) >
524 iterator->max_length)
525 return (-EINVAL);
526
538 } 527 }
539 528
529 iterator->arg += sizeof (uint32_t);
530
531 /*
532 * no need to check again for blowing past stated radiotap
533 * header length, becuase ieee80211_radiotap_iterator_next
534 * checks it before it is dereferenced
535 */
536
537 }
538
540 /* we are all initialized happily */ 539 /* we are all initialized happily */
541 return 0; 540 return 0;
542} 541}
543 542
544 543
545/** 544/**
546 * @brief ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg 545 * @brief ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg
547 * 546 *
548 * This function returns the next radiotap arg index (IEEE80211_RADIOTAP_...) 547 * This function returns the next radiotap arg index (IEEE80211_RADIOTAP_...)
549 * and sets iterator->this_arg to point to the payload for the arg. It takes 548 * and sets iterator->this_arg to point to the payload for the arg. It takes
@@ -556,8 +555,7 @@ ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator
556 * @return next present arg index on success or negative if no more or error 555 * @return next present arg index on success or negative if no more or error
557 */ 556 */
558static int 557static int
559ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator 558ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator *iterator)
560 *iterator)
561{ 559{
562 560
563 /* 561 /*
@@ -594,10 +592,10 @@ ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator
594 [IEEE80211_RADIOTAP_RX_FLAGS] = 0x22, 592 [IEEE80211_RADIOTAP_RX_FLAGS] = 0x22,
595 [IEEE80211_RADIOTAP_RTS_RETRIES] = 0x11, 593 [IEEE80211_RADIOTAP_RTS_RETRIES] = 0x11,
596 [IEEE80211_RADIOTAP_DATA_RETRIES] = 0x11 594 [IEEE80211_RADIOTAP_DATA_RETRIES] = 0x11
597 /* 595 /*
598 * add more here as they are defined in 596 * add more here as they are defined in
599 * include/net/ieee80211_radiotap.h 597 * include/net/ieee80211_radiotap.h
600 */ 598 */
601 }; 599 };
602 600
603 /* 601 /*
@@ -606,92 +604,92 @@ ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator
606 */ 604 */
607 605
608 while (iterator->arg_index < (int) sizeof (rt_sizes)) 606 while (iterator->arg_index < (int) sizeof (rt_sizes))
607 {
608 int hit = 0;
609
610 if (!(iterator->bitmap_shifter & 1))
611 goto next_entry; /* arg not present */
612
613 /*
614 * arg is present, account for alignment padding
615 * 8-bit args can be at any alignment
616 * 16-bit args must start on 16-bit boundary
617 * 32-bit args must start on 32-bit boundary
618 * 64-bit args must start on 64-bit boundary
619 *
620 * note that total arg size can differ from alignment of
621 * elements inside arg, so we use upper nybble of length
622 * table to base alignment on
623 *
624 * also note: these alignments are ** relative to the
625 * start of the radiotap header **. There is no guarantee
626 * that the radiotap header itself is aligned on any
627 * kind of boundary.
628 */
629
630 if ((((void *) iterator->arg) -
631 ((void *) iterator->rtheader)) & ((rt_sizes[iterator->arg_index] >> 4)
632 - 1))
633 iterator->arg_index +=
634 (rt_sizes[iterator->arg_index] >> 4) -
635 ((((void *) iterator->arg) -
636 ((void *) iterator->rtheader)) & ((rt_sizes[iterator->arg_index] >>
637 4) - 1));
638
639 /*
640 * this is what we will return to user, but we need to
641 * move on first so next call has something fresh to test
642 */
643
644 iterator->this_arg_index = iterator->arg_index;
645 iterator->this_arg = iterator->arg;
646 hit = 1;
647
648 /* internally move on the size of this arg */
649
650 iterator->arg += rt_sizes[iterator->arg_index] & 0x0f;
651
652 /*
653 * check for insanity where we are given a bitmap that
654 * claims to have more arg content than the length of the
655 * radiotap section. We will normally end up equalling this
656 * max_length on the last arg, never exceeding it.
657 */
658
659 if ((((void *) iterator->arg) - ((void *) iterator->rtheader)) >
660 iterator->max_length)
661 return (-EINVAL);
662
663next_entry:
664
665 iterator->arg_index++;
666 if (((iterator->arg_index & 31) == 0))
609 { 667 {
610 int hit = 0; 668 /* completed current uint32_t bitmap */
611 669 if (iterator->bitmap_shifter & 1)
612 if (!(iterator->bitmap_shifter & 1)) 670 {
613 goto next_entry; /* arg not present */ 671 /* b31 was set, there is more */
614 672 /* move to next uint32_t bitmap */
615 /* 673 iterator->bitmap_shifter = le32toh (*iterator->next_bitmap);
616 * arg is present, account for alignment padding 674 iterator->next_bitmap++;
617 * 8-bit args can be at any alignment 675 }
618 * 16-bit args must start on 16-bit boundary
619 * 32-bit args must start on 32-bit boundary
620 * 64-bit args must start on 64-bit boundary
621 *
622 * note that total arg size can differ from alignment of
623 * elements inside arg, so we use upper nybble of length
624 * table to base alignment on
625 *
626 * also note: these alignments are ** relative to the
627 * start of the radiotap header **. There is no guarantee
628 * that the radiotap header itself is aligned on any
629 * kind of boundary.
630 */
631
632 if ((((void *) iterator->arg) -
633 ((void *) iterator->rtheader)) & ((rt_sizes[iterator->arg_index] >>
634 4) - 1))
635 iterator->arg_index +=
636 (rt_sizes[iterator->arg_index] >> 4) -
637 ((((void *) iterator->arg) -
638 ((void *) iterator->rtheader)) & ((rt_sizes[iterator->arg_index]
639 >> 4) - 1));
640
641 /*
642 * this is what we will return to user, but we need to
643 * move on first so next call has something fresh to test
644 */
645
646 iterator->this_arg_index = iterator->arg_index;
647 iterator->this_arg = iterator->arg;
648 hit = 1;
649
650 /* internally move on the size of this arg */
651
652 iterator->arg += rt_sizes[iterator->arg_index] & 0x0f;
653
654 /*
655 * check for insanity where we are given a bitmap that
656 * claims to have more arg content than the length of the
657 * radiotap section. We will normally end up equalling this
658 * max_length on the last arg, never exceeding it.
659 */
660
661 if ((((void *) iterator->arg) - ((void *) iterator->rtheader)) >
662 iterator->max_length)
663 return (-EINVAL);
664
665 next_entry:
666
667 iterator->arg_index++;
668 if (((iterator->arg_index & 31) == 0))
669 {
670 /* completed current uint32_t bitmap */
671 if (iterator->bitmap_shifter & 1)
672 {
673 /* b31 was set, there is more */
674 /* move to next uint32_t bitmap */
675 iterator->bitmap_shifter = le32toh (*iterator->next_bitmap);
676 iterator->next_bitmap++;
677 }
678 else
679 {
680 /* no more bitmaps: end */
681 iterator->arg_index = sizeof (rt_sizes);
682 }
683 }
684 else 676 else
685 { /* just try the next bit */ 677 {
686 iterator->bitmap_shifter >>= 1; 678 /* no more bitmaps: end */
687 } 679 iterator->arg_index = sizeof (rt_sizes);
680 }
681 }
682 else
683 { /* just try the next bit */
684 iterator->bitmap_shifter >>= 1;
685 }
688 686
689 /* if we found a valid arg earlier, return it now */ 687 /* if we found a valid arg earlier, return it now */
690 688
691 if (hit) 689 if (hit)
692 return (iterator->this_arg_index); 690 return (iterator->this_arg_index);
693 691
694 } 692 }
695 693
696 /* we don't know how to handle any more args, we're done */ 694 /* we don't know how to handle any more args, we're done */
697 695
@@ -841,7 +839,7 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len)
841 crc = calc_crc_osdep (buf, len); 839 crc = calc_crc_osdep (buf, len);
842 buf += len; 840 buf += len;
843 return (((crc) & 0xFF) == buf[0] && ((crc >> 8) & 0xFF) == buf[1] && 841 return (((crc) & 0xFF) == buf[0] && ((crc >> 8) & 0xFF) == buf[1] &&
844 ((crc >> 16) & 0xFF) == buf[2] && ((crc >> 24) & 0xFF) == buf[3]); 842 ((crc >> 16) & 0xFF) == buf[2] && ((crc >> 24) & 0xFF) == buf[3]);
845} 843}
846 844
847 845
@@ -890,8 +888,8 @@ linux_get_channel (const struct Hardware_Infos *dev)
890 * @return size read from the buffer 888 * @return size read from the buffer
891 */ 889 */
892static ssize_t 890static ssize_t
893linux_read (struct Hardware_Infos *dev, unsigned char *buf, 891linux_read (struct Hardware_Infos *dev, unsigned char *buf, size_t buf_size,
894 size_t buf_size, struct Radiotap_rx *ri) 892 struct Radiotap_rx *ri)
895{ 893{
896 unsigned char tmpbuf[buf_size]; 894 unsigned char tmpbuf[buf_size];
897 ssize_t caplen; 895 ssize_t caplen;
@@ -901,172 +899,170 @@ linux_read (struct Hardware_Infos *dev, unsigned char *buf,
901 899
902 caplen = read (dev->fd_raw, tmpbuf, buf_size); 900 caplen = read (dev->fd_raw, tmpbuf, buf_size);
903 if (0 > caplen) 901 if (0 > caplen)
904 { 902 {
905 if (EAGAIN == errno) 903 if (EAGAIN == errno)
906 return 0; 904 return 0;
907 fprintf (stderr, "Failed to read from RAW socket: %s\n", 905 fprintf (stderr, "Failed to read from RAW socket: %s\n", strerror (errno));
908 strerror (errno)); 906 return -1;
909 return -1; 907 }
910 }
911 908
912 memset (buf, 0, buf_size); 909 memset (buf, 0, buf_size);
913 memset (ri, 0, sizeof (*ri)); 910 memset (ri, 0, sizeof (*ri));
914 911
915 switch (dev->arptype_in) 912 switch (dev->arptype_in)
913 {
914 case ARPHRD_IEEE80211_PRISM:
915 {
916 /* skip the prism header */
917 if (tmpbuf[7] == 0x40)
916 { 918 {
917 case ARPHRD_IEEE80211_PRISM: 919 /* prism54 uses a different format */
918 { 920 ri->ri_power = tmpbuf[0x33];
919 /* skip the prism header */ 921 ri->ri_noise = *(unsigned int *) (tmpbuf + 0x33 + 12);
920 if (tmpbuf[7] == 0x40) 922 ri->ri_rate = (*(unsigned int *) (tmpbuf + 0x33 + 24)) * 500000;
921 { 923 got_signal = 1;
922 /* prism54 uses a different format */ 924 got_noise = 1;
923 ri->ri_power = tmpbuf[0x33]; 925 n = 0x40;
924 ri->ri_noise = *(unsigned int *) (tmpbuf + 0x33 + 12); 926 }
925 ri->ri_rate = (*(unsigned int *) (tmpbuf + 0x33 + 24)) * 500000; 927 else
926 got_signal = 1; 928 {
927 got_noise = 1; 929 ri->ri_mactime = *(uint64_t *) (tmpbuf + 0x5C - 48);
928 n = 0x40; 930 ri->ri_channel = *(unsigned int *) (tmpbuf + 0x5C - 36);
929 } 931 ri->ri_power = *(unsigned int *) (tmpbuf + 0x5C);
930 else 932 ri->ri_noise = *(unsigned int *) (tmpbuf + 0x5C + 12);
931 { 933 ri->ri_rate = (*(unsigned int *) (tmpbuf + 0x5C + 24)) * 500000;
932 ri->ri_mactime = *(uint64_t *) (tmpbuf + 0x5C - 48); 934 got_channel = 1;
933 ri->ri_channel = *(unsigned int *) (tmpbuf + 0x5C - 36); 935 got_signal = 1;
934 ri->ri_power = *(unsigned int *) (tmpbuf + 0x5C); 936 got_noise = 1;
935 ri->ri_noise = *(unsigned int *) (tmpbuf + 0x5C + 12); 937 n = *(int *) (tmpbuf + 4);
936 ri->ri_rate = (*(unsigned int *) (tmpbuf + 0x5C + 24)) * 500000; 938 }
937 got_channel = 1; 939
938 got_signal = 1; 940 if (n < 8 || n >= caplen)
939 got_noise = 1; 941 return (0);
940 n = *(int *) (tmpbuf + 4); 942 }
941 } 943 break;
942
943 if (n < 8 || n >= caplen)
944 return (0);
945 }
946 break;
947 944
948 case ARPHRD_IEEE80211_FULL: 945 case ARPHRD_IEEE80211_FULL:
946 {
947 struct ieee80211_radiotap_iterator iterator;
948 struct ieee80211_radiotap_header *rthdr;
949
950 rthdr = (struct ieee80211_radiotap_header *) tmpbuf;
951
952 if (ieee80211_radiotap_iterator_init (&iterator, rthdr, caplen) < 0)
953 return (0);
954
955 /* go through the radiotap arguments we have been given
956 * by the driver
957 */
958
959 while (ieee80211_radiotap_iterator_next (&iterator) >= 0)
960 {
961
962 switch (iterator.this_arg_index)
949 { 963 {
950 struct ieee80211_radiotap_iterator iterator; 964
951 struct ieee80211_radiotap_header *rthdr; 965 case IEEE80211_RADIOTAP_TSFT:
952 966 ri->ri_mactime = le64toh (*((uint64_t *) iterator.this_arg));
953 rthdr = (struct ieee80211_radiotap_header *) tmpbuf; 967 break;
954 968
955 if (ieee80211_radiotap_iterator_init (&iterator, rthdr, caplen) < 0) 969 case IEEE80211_RADIOTAP_DBM_ANTSIGNAL:
956 return (0); 970 if (!got_signal)
957 971 {
958 /* go through the radiotap arguments we have been given 972 if (*iterator.this_arg < 127)
959 * by the driver 973 ri->ri_power = *iterator.this_arg;
960 */ 974 else
961 975 ri->ri_power = *iterator.this_arg - 255;
962 while (ieee80211_radiotap_iterator_next (&iterator) >= 0) 976
963 { 977 got_signal = 1;
964 978 }
965 switch (iterator.this_arg_index) 979 break;
966 { 980
967 981 case IEEE80211_RADIOTAP_DB_ANTSIGNAL:
968 case IEEE80211_RADIOTAP_TSFT: 982 if (!got_signal)
969 ri->ri_mactime = le64toh (*((uint64_t *) iterator.this_arg)); 983 {
970 break; 984 if (*iterator.this_arg < 127)
971 985 ri->ri_power = *iterator.this_arg;
972 case IEEE80211_RADIOTAP_DBM_ANTSIGNAL: 986 else
973 if (!got_signal) 987 ri->ri_power = *iterator.this_arg - 255;
974 { 988
975 if (*iterator.this_arg < 127) 989 got_signal = 1;
976 ri->ri_power = *iterator.this_arg; 990 }
977 else 991 break;
978 ri->ri_power = *iterator.this_arg - 255; 992
979 993 case IEEE80211_RADIOTAP_DBM_ANTNOISE:
980 got_signal = 1; 994 if (!got_noise)
981 } 995 {
982 break; 996 if (*iterator.this_arg < 127)
983 997 ri->ri_noise = *iterator.this_arg;
984 case IEEE80211_RADIOTAP_DB_ANTSIGNAL: 998 else
985 if (!got_signal) 999 ri->ri_noise = *iterator.this_arg - 255;
986 { 1000
987 if (*iterator.this_arg < 127) 1001 got_noise = 1;
988 ri->ri_power = *iterator.this_arg; 1002 }
989 else 1003 break;
990 ri->ri_power = *iterator.this_arg - 255; 1004
991 1005 case IEEE80211_RADIOTAP_DB_ANTNOISE:
992 got_signal = 1; 1006 if (!got_noise)
993 } 1007 {
994 break; 1008 if (*iterator.this_arg < 127)
995 1009 ri->ri_noise = *iterator.this_arg;
996 case IEEE80211_RADIOTAP_DBM_ANTNOISE: 1010 else
997 if (!got_noise) 1011 ri->ri_noise = *iterator.this_arg - 255;
998 { 1012
999 if (*iterator.this_arg < 127) 1013 got_noise = 1;
1000 ri->ri_noise = *iterator.this_arg; 1014 }
1001 else 1015 break;
1002 ri->ri_noise = *iterator.this_arg - 255; 1016
1003 1017 case IEEE80211_RADIOTAP_ANTENNA:
1004 got_noise = 1; 1018 ri->ri_antenna = *iterator.this_arg;
1005 } 1019 break;
1006 break; 1020
1007 1021 case IEEE80211_RADIOTAP_CHANNEL:
1008 case IEEE80211_RADIOTAP_DB_ANTNOISE: 1022 ri->ri_channel = *iterator.this_arg;
1009 if (!got_noise) 1023 got_channel = 1;
1010 { 1024 break;
1011 if (*iterator.this_arg < 127) 1025
1012 ri->ri_noise = *iterator.this_arg; 1026 case IEEE80211_RADIOTAP_RATE:
1013 else 1027 ri->ri_rate = (*iterator.this_arg) * 500000;
1014 ri->ri_noise = *iterator.this_arg - 255; 1028 break;
1015 1029
1016 got_noise = 1; 1030 case IEEE80211_RADIOTAP_FLAGS:
1017 } 1031 /* is the CRC visible at the end?
1018 break; 1032 * remove
1019 1033 */
1020 case IEEE80211_RADIOTAP_ANTENNA: 1034 if (*iterator.this_arg & IEEE80211_RADIOTAP_F_FCS)
1021 ri->ri_antenna = *iterator.this_arg; 1035 {
1022 break; 1036 fcs_removed = 1;
1023 1037 caplen -= 4;
1024 case IEEE80211_RADIOTAP_CHANNEL: 1038 }
1025 ri->ri_channel = *iterator.this_arg; 1039
1026 got_channel = 1; 1040 if (*iterator.this_arg & IEEE80211_RADIOTAP_F_RX_BADFCS)
1027 break; 1041 return (0);
1028 1042
1029 case IEEE80211_RADIOTAP_RATE: 1043 break;
1030 ri->ri_rate = (*iterator.this_arg) * 500000;
1031 break;
1032
1033 case IEEE80211_RADIOTAP_FLAGS:
1034 /* is the CRC visible at the end?
1035 * remove
1036 */
1037 if (*iterator.this_arg & IEEE80211_RADIOTAP_F_FCS)
1038 {
1039 fcs_removed = 1;
1040 caplen -= 4;
1041 }
1042
1043 if (*iterator.this_arg & IEEE80211_RADIOTAP_F_RX_BADFCS)
1044 return (0);
1045
1046 break;
1047 }
1048 }
1049 n = le16toh (rthdr->it_len);
1050 if (n <= 0 || n >= caplen)
1051 return 0;
1052 } 1044 }
1053 break;
1054 case ARPHRD_IEEE80211:
1055 /* do nothing? */
1056 break;
1057 default:
1058 errno = ENOTSUP;
1059 return -1;
1060 } 1045 }
1046 n = le16toh (rthdr->it_len);
1047 if (n <= 0 || n >= caplen)
1048 return 0;
1049 }
1050 break;
1051 case ARPHRD_IEEE80211:
1052 /* do nothing? */
1053 break;
1054 default:
1055 errno = ENOTSUP;
1056 return -1;
1057 }
1061 1058
1062 caplen -= n; 1059 caplen -= n;
1063 1060
1064 //detect fcs at the end, even if the flag wasn't set and remove it 1061 //detect fcs at the end, even if the flag wasn't set and remove it
1065 if ((0 == fcs_removed) 1062 if ((0 == fcs_removed) && (1 == check_crc_buf_osdep (tmpbuf + n, caplen - 4)))
1066 && (1 == check_crc_buf_osdep (tmpbuf + n, caplen - 4))) 1063 {
1067 { 1064 caplen -= 4;
1068 caplen -= 4; 1065 }
1069 }
1070 memcpy (buf, tmpbuf + n, caplen); 1066 memcpy (buf, tmpbuf + n, caplen);
1071 if (!got_channel) 1067 if (!got_channel)
1072 ri->ri_channel = linux_get_channel (dev); 1068 ri->ri_channel = linux_get_channel (dev);
@@ -1092,12 +1088,11 @@ openraw (struct Hardware_Infos *dev)
1092 memset (&ifr, 0, sizeof (ifr)); 1088 memset (&ifr, 0, sizeof (ifr));
1093 strncpy (ifr.ifr_name, dev->iface, IFNAMSIZ); 1089 strncpy (ifr.ifr_name, dev->iface, IFNAMSIZ);
1094 if (-1 == ioctl (dev->fd_raw, SIOCGIFINDEX, &ifr)) 1090 if (-1 == ioctl (dev->fd_raw, SIOCGIFINDEX, &ifr))
1095 { 1091 {
1096 fprintf (stderr, 1092 fprintf (stderr, "ioctl(SIOCGIFINDEX) on interface `%.*s' failed: %s\n",
1097 "ioctl(SIOCGIFINDEX) on interface `%.*s' failed: %s\n", 1093 IFNAMSIZ, dev->iface, strerror (errno));
1098 IFNAMSIZ, dev->iface, strerror (errno)); 1094 return 1;
1099 return 1; 1095 }
1100 }
1101 1096
1102 /* lookup the hardware type */ 1097 /* lookup the hardware type */
1103 memset (&sll, 0, sizeof (sll)); 1098 memset (&sll, 0, sizeof (sll));
@@ -1105,78 +1100,72 @@ openraw (struct Hardware_Infos *dev)
1105 sll.sll_ifindex = ifr.ifr_ifindex; 1100 sll.sll_ifindex = ifr.ifr_ifindex;
1106 sll.sll_protocol = htons (ETH_P_ALL); 1101 sll.sll_protocol = htons (ETH_P_ALL);
1107 if (-1 == ioctl (dev->fd_raw, SIOCGIFHWADDR, &ifr)) 1102 if (-1 == ioctl (dev->fd_raw, SIOCGIFHWADDR, &ifr))
1108 { 1103 {
1109 fprintf (stderr, 1104 fprintf (stderr, "ioctl(SIOCGIFHWADDR) on interface `%.*s' failed: %s\n",
1110 "ioctl(SIOCGIFHWADDR) on interface `%.*s' failed: %s\n", 1105 IFNAMSIZ, dev->iface, strerror (errno));
1111 IFNAMSIZ, dev->iface, strerror (errno)); 1106 return 1;
1112 return 1; 1107 }
1113 }
1114 1108
1115 /* lookup iw mode */ 1109 /* lookup iw mode */
1116 memset (&wrq, 0, sizeof (struct iwreq)); 1110 memset (&wrq, 0, sizeof (struct iwreq));
1117 strncpy (wrq.ifr_name, dev->iface, IFNAMSIZ); 1111 strncpy (wrq.ifr_name, dev->iface, IFNAMSIZ);
1118 if (-1 == ioctl (dev->fd_raw, SIOCGIWMODE, &wrq)) 1112 if (-1 == ioctl (dev->fd_raw, SIOCGIWMODE, &wrq))
1119 { 1113 {
1120 /* most probably not supported (ie for rtap ipw interface) * 1114 /* most probably not supported (ie for rtap ipw interface) *
1121 * so just assume its correctly set... */ 1115 * so just assume its correctly set... */
1122 wrq.u.mode = IW_MODE_MONITOR; 1116 wrq.u.mode = IW_MODE_MONITOR;
1123 } 1117 }
1124 1118
1125 if (((ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211) && 1119 if (((ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211) &&
1126 (ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_PRISM) && 1120 (ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_PRISM) &&
1127 (ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_FULL)) || 1121 (ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_FULL)) ||
1128 (wrq.u.mode != IW_MODE_MONITOR)) 1122 (wrq.u.mode != IW_MODE_MONITOR))
1129 { 1123 {
1130 fprintf (stderr, 1124 fprintf (stderr, "Error: interface `%.*s' is not in monitor mode\n",
1131 "Error: interface `%.*s' is not in monitor mode\n", 1125 IFNAMSIZ, dev->iface);
1132 IFNAMSIZ, dev->iface); 1126 return 1;
1133 return 1; 1127 }
1134 }
1135 1128
1136 /* Is interface st to up, broadcast & running ? */ 1129 /* Is interface st to up, broadcast & running ? */
1137 if ((ifr.ifr_flags | IFF_UP | IFF_BROADCAST | IFF_RUNNING) != ifr.ifr_flags) 1130 if ((ifr.ifr_flags | IFF_UP | IFF_BROADCAST | IFF_RUNNING) != ifr.ifr_flags)
1131 {
1132 /* Bring interface up */
1133 ifr.ifr_flags |= IFF_UP | IFF_BROADCAST | IFF_RUNNING;
1134
1135 if (-1 == ioctl (dev->fd_raw, SIOCSIFFLAGS, &ifr))
1138 { 1136 {
1139 /* Bring interface up */ 1137 fprintf (stderr, "ioctl(SIOCSIFFLAGS) on interface `%.*s' failed: %s\n",
1140 ifr.ifr_flags |= IFF_UP | IFF_BROADCAST | IFF_RUNNING; 1138 IFNAMSIZ, dev->iface, strerror (errno));
1141 1139 return 1;
1142 if (-1 == ioctl (dev->fd_raw, SIOCSIFFLAGS, &ifr))
1143 {
1144 fprintf (stderr,
1145 "ioctl(SIOCSIFFLAGS) on interface `%.*s' failed: %s\n",
1146 IFNAMSIZ, dev->iface, strerror (errno));
1147 return 1;
1148 }
1149 } 1140 }
1141 }
1150 1142
1151 /* bind the raw socket to the interface */ 1143 /* bind the raw socket to the interface */
1152 if (-1 == bind (dev->fd_raw, (struct sockaddr *) &sll, sizeof (sll))) 1144 if (-1 == bind (dev->fd_raw, (struct sockaddr *) &sll, sizeof (sll)))
1153 { 1145 {
1154 fprintf (stderr, 1146 fprintf (stderr, "Failed to bind interface `%.*s': %s\n", IFNAMSIZ,
1155 "Failed to bind interface `%.*s': %s\n", IFNAMSIZ, 1147 dev->iface, strerror (errno));
1156 dev->iface, strerror (errno)); 1148 return 1;
1157 return 1; 1149 }
1158 }
1159 1150
1160 /* lookup the hardware type */ 1151 /* lookup the hardware type */
1161 if (-1 == ioctl (dev->fd_raw, SIOCGIFHWADDR, &ifr)) 1152 if (-1 == ioctl (dev->fd_raw, SIOCGIFHWADDR, &ifr))
1162 { 1153 {
1163 fprintf (stderr, 1154 fprintf (stderr, "ioctl(SIOCGIFHWADDR) on interface `%.*s' failed: %s\n",
1164 "ioctl(SIOCGIFHWADDR) on interface `%.*s' failed: %s\n", 1155 IFNAMSIZ, dev->iface, strerror (errno));
1165 IFNAMSIZ, dev->iface, strerror (errno)); 1156 return 1;
1166 return 1; 1157 }
1167 }
1168 1158
1169 memcpy (&dev->pl_mac, ifr.ifr_hwaddr.sa_data, MAC_ADDR_SIZE); 1159 memcpy (&dev->pl_mac, ifr.ifr_hwaddr.sa_data, MAC_ADDR_SIZE);
1170 dev->arptype_in = ifr.ifr_hwaddr.sa_family; 1160 dev->arptype_in = ifr.ifr_hwaddr.sa_family;
1171 if ((ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211) && 1161 if ((ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211) &&
1172 (ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_PRISM) && 1162 (ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_PRISM) &&
1173 (ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_FULL)) 1163 (ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_FULL))
1174 { 1164 {
1175 fprintf (stderr, 1165 fprintf (stderr, "Unsupported hardware link type %d on interface `%.*s'\n",
1176 "Unsupported hardware link type %d on interface `%.*s'\n", 1166 ifr.ifr_hwaddr.sa_family, IFNAMSIZ, dev->iface);
1177 ifr.ifr_hwaddr.sa_family, IFNAMSIZ, dev->iface); 1167 return 1;
1178 return 1; 1168 }
1179 }
1180 1169
1181 /* enable promiscuous mode */ 1170 /* enable promiscuous mode */
1182 memset (&mr, 0, sizeof (mr)); 1171 memset (&mr, 0, sizeof (mr));
@@ -1184,13 +1173,12 @@ openraw (struct Hardware_Infos *dev)
1184 mr.mr_type = PACKET_MR_PROMISC; 1173 mr.mr_type = PACKET_MR_PROMISC;
1185 if (0 != 1174 if (0 !=
1186 setsockopt (dev->fd_raw, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mr, 1175 setsockopt (dev->fd_raw, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mr,
1187 sizeof (mr))) 1176 sizeof (mr)))
1188 { 1177 {
1189 fprintf (stderr, 1178 fprintf (stderr, "Failed to enable promiscuous mode on interface `%.*s'\n",
1190 "Failed to enable promiscuous mode on interface `%.*s'\n", 1179 IFNAMSIZ, dev->iface);
1191 IFNAMSIZ, dev->iface); 1180 return 1;
1192 return 1; 1181 }
1193 }
1194 1182
1195 return 0; 1183 return 0;
1196} 1184}
@@ -1211,36 +1199,34 @@ wlaninit (struct Hardware_Infos *dev, const char *iface)
1211 1199
1212 dev->fd_raw = socket (PF_PACKET, SOCK_RAW, htons (ETH_P_ALL)); 1200 dev->fd_raw = socket (PF_PACKET, SOCK_RAW, htons (ETH_P_ALL));
1213 if (0 > dev->fd_raw) 1201 if (0 > dev->fd_raw)
1214 { 1202 {
1215 fprintf (stderr, "Failed to create raw socket: %s\n", strerror (errno)); 1203 fprintf (stderr, "Failed to create raw socket: %s\n", strerror (errno));
1216 return 1; 1204 return 1;
1217 } 1205 }
1218 if (dev->fd_raw >= FD_SETSIZE) 1206 if (dev->fd_raw >= FD_SETSIZE)
1219 { 1207 {
1220 fprintf (stderr, 1208 fprintf (stderr, "File descriptor too large for select (%d > %d)\n",
1221 "File descriptor too large for select (%d > %d)\n", 1209 dev->fd_raw, FD_SETSIZE);
1222 dev->fd_raw, FD_SETSIZE); 1210 close (dev->fd_raw);
1223 close (dev->fd_raw); 1211 return 1;
1224 return 1; 1212 }
1225 }
1226 1213
1227 /* mac80211 stack detection */ 1214 /* mac80211 stack detection */
1228 ret = 1215 ret =
1229 snprintf (strbuf, 1216 snprintf (strbuf, sizeof (strbuf), "/sys/class/net/%s/phy80211/subsystem",
1230 sizeof (strbuf), "/sys/class/net/%s/phy80211/subsystem", iface); 1217 iface);
1231 if ((ret < 0) || (ret >= sizeof (strbuf)) || (0 != stat (strbuf, &sbuf))) 1218 if ((ret < 0) || (ret >= sizeof (strbuf)) || (0 != stat (strbuf, &sbuf)))
1232 { 1219 {
1233 fprintf (stderr, 1220 fprintf (stderr, "Did not find 802.11 interface `%s'. Exiting.\n", iface);
1234 "Did not find 802.11 interface `%s'. Exiting.\n", iface); 1221 close (dev->fd_raw);
1235 close (dev->fd_raw); 1222 return 1;
1236 return 1; 1223 }
1237 }
1238 strncpy (dev->iface, iface, IFNAMSIZ); 1224 strncpy (dev->iface, iface, IFNAMSIZ);
1239 if (0 != openraw (dev)) 1225 if (0 != openraw (dev))
1240 { 1226 {
1241 close (dev->fd_raw); 1227 close (dev->fd_raw);
1242 return 1; 1228 return 1;
1243 } 1229 }
1244 return 0; 1230 return 0;
1245} 1231}
1246 1232
@@ -1254,7 +1240,7 @@ wlaninit (struct Hardware_Infos *dev, const char *iface)
1254 */ 1240 */
1255static int 1241static int
1256mac_test (const struct ieee80211_frame *uint8_taIeeeHeader, 1242mac_test (const struct ieee80211_frame *uint8_taIeeeHeader,
1257 const struct Hardware_Infos *dev) 1243 const struct Hardware_Infos *dev)
1258{ 1244{
1259 if (0 != memcmp (uint8_taIeeeHeader->i_addr3, &mac_bssid, MAC_ADDR_SIZE)) 1245 if (0 != memcmp (uint8_taIeeeHeader->i_addr3, &mac_bssid, MAC_ADDR_SIZE))
1260 return 1; 1246 return 1;
@@ -1273,7 +1259,7 @@ mac_test (const struct ieee80211_frame *uint8_taIeeeHeader,
1273 */ 1259 */
1274static void 1260static void
1275mac_set (struct ieee80211_frame *uint8_taIeeeHeader, 1261mac_set (struct ieee80211_frame *uint8_taIeeeHeader,
1276 const struct Hardware_Infos *dev) 1262 const struct Hardware_Infos *dev)
1277{ 1263{
1278 uint8_taIeeeHeader->i_fc[0] = 0x08; 1264 uint8_taIeeeHeader->i_fc[0] = 0x08;
1279 uint8_taIeeeHeader->i_fc[1] = 0x00; 1265 uint8_taIeeeHeader->i_fc[1] = 0x00;
@@ -1289,8 +1275,7 @@ mac_set (struct ieee80211_frame *uint8_taIeeeHeader,
1289 * @param hdr pointer to the start of the packet 1275 * @param hdr pointer to the start of the packet
1290 */ 1276 */
1291static void 1277static void
1292stdin_send_hw (void *cls, void *client, 1278stdin_send_hw (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1293 const struct GNUNET_MessageHeader *hdr)
1294{ 1279{
1295 struct Hardware_Infos *dev = cls; 1280 struct Hardware_Infos *dev = cls;
1296 struct sendbuf *write_pout = &dev->write_pout; 1281 struct sendbuf *write_pout = &dev->write_pout;
@@ -1305,7 +1290,7 @@ stdin_send_hw (void *cls, void *client,
1305 rtheader.rate = 0x00; 1290 rtheader.rate = 0x00;
1306 rtheader.pad1 = 0x00; 1291 rtheader.pad1 = 0x00;
1307 rtheader.txflags = 1292 rtheader.txflags =
1308 htole16 (IEEE80211_RADIOTAP_F_TX_NOACK | IEEE80211_RADIOTAP_F_TX_NOSEQ); 1293 htole16 (IEEE80211_RADIOTAP_F_TX_NOACK | IEEE80211_RADIOTAP_F_TX_NOSEQ);
1309 1294
1310 /* { 0x00, 0x00, <-- radiotap version 1295 /* { 0x00, 0x00, <-- radiotap version
1311 * 0x0c, 0x00, <- radiotap header length 1296 * 0x0c, 0x00, <- radiotap header length
@@ -1318,24 +1303,23 @@ stdin_send_hw (void *cls, void *client,
1318 sendsize = ntohs (hdr->size); 1303 sendsize = ntohs (hdr->size);
1319 if (sendsize < 1304 if (sendsize <
1320 sizeof (struct Radiotap_Send) + sizeof (struct GNUNET_MessageHeader)) 1305 sizeof (struct Radiotap_Send) + sizeof (struct GNUNET_MessageHeader))
1321 { 1306 {
1322 fprintf (stderr, 1307 fprintf (stderr, "Function stdin_send_hw: malformed packet (too small)\n");
1323 "Function stdin_send_hw: malformed packet (too small)\n"); 1308 exit (1);
1324 exit (1); 1309 }
1325 }
1326 sendsize -= 1310 sendsize -=
1327 sizeof (struct Radiotap_Send) + sizeof (struct GNUNET_MessageHeader); 1311 sizeof (struct Radiotap_Send) + sizeof (struct GNUNET_MessageHeader);
1328 1312
1329 if (MAXLINE < sendsize) 1313 if (MAXLINE < sendsize)
1330 { 1314 {
1331 fprintf (stderr, "Function stdin_send_hw: Packet too big for buffer\n"); 1315 fprintf (stderr, "Function stdin_send_hw: Packet too big for buffer\n");
1332 exit (1); 1316 exit (1);
1333 } 1317 }
1334 if (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs (hdr->type)) 1318 if (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs (hdr->type))
1335 { 1319 {
1336 fprintf (stderr, "Function stdin_send: wrong packet type\n"); 1320 fprintf (stderr, "Function stdin_send: wrong packet type\n");
1337 exit (1); 1321 exit (1);
1338 } 1322 }
1339 1323
1340 rtheader.header.it_len = htole16 (sizeof (rtheader)); 1324 rtheader.header.it_len = htole16 (sizeof (rtheader));
1341 rtheader.rate = header->rate; 1325 rtheader.rate = header->rate;
@@ -1343,8 +1327,7 @@ stdin_send_hw (void *cls, void *client,
1343 memcpy (write_pout->buf + sizeof (rtheader), &header[1], sendsize); 1327 memcpy (write_pout->buf + sizeof (rtheader), &header[1], sendsize);
1344 /* payload contains MAC address, but we don't trust it, so we'll 1328 /* payload contains MAC address, but we don't trust it, so we'll
1345 * overwrite it with OUR MAC address again to prevent mischief */ 1329 * overwrite it with OUR MAC address again to prevent mischief */
1346 wlanheader = 1330 wlanheader = (struct ieee80211_frame *) (write_pout->buf + sizeof (rtheader));
1347 (struct ieee80211_frame *) (write_pout->buf + sizeof (rtheader));
1348 mac_set (wlanheader, dev); 1331 mac_set (wlanheader, dev);
1349 write_pout->size = sendsize + sizeof (rtheader); 1332 write_pout->size = sendsize + sizeof (rtheader);
1350} 1333}
@@ -1372,19 +1355,19 @@ main (int argc, char *argv[])
1372 struct GNUNET_SERVER_MessageStreamTokenizer *stdin_mst; 1355 struct GNUNET_SERVER_MessageStreamTokenizer *stdin_mst;
1373 1356
1374 if (2 != argc) 1357 if (2 != argc)
1375 { 1358 {
1376 fprintf (stderr, 1359 fprintf (stderr,
1377 "You must specify the name of the interface as the first and only argument to this program.\n"); 1360 "You must specify the name of the interface as the first and only argument to this program.\n");
1378 return 1; 1361 return 1;
1379 } 1362 }
1380 if (0 != wlaninit (&dev, argv[1])) 1363 if (0 != wlaninit (&dev, argv[1]))
1381 return 1; 1364 return 1;
1382 uid = getuid (); 1365 uid = getuid ();
1383 if (0 != setresuid (uid, uid, uid)) 1366 if (0 != setresuid (uid, uid, uid))
1384 { 1367 {
1385 fprintf (stderr, "Failed to setresuid: %s\n", strerror (errno)); 1368 fprintf (stderr, "Failed to setresuid: %s\n", strerror (errno));
1386 /* not critical, continue anyway */ 1369 /* not critical, continue anyway */
1387 } 1370 }
1388 1371
1389 dev.write_pout.size = 0; 1372 dev.write_pout.size = 0;
1390 dev.write_pout.pos = 0; 1373 dev.write_pout.pos = 0;
@@ -1396,135 +1379,129 @@ main (int argc, char *argv[])
1396 stdin_open = 1; 1379 stdin_open = 1;
1397 1380
1398 while (1) 1381 while (1)
1382 {
1383 maxfd = -1;
1384 FD_ZERO (&rfds);
1385 if ((0 == dev.write_pout.size) && (1 == stdin_open))
1386 {
1387 FD_SET (STDIN_FILENO, &rfds);
1388 maxfd = MAX (maxfd, STDIN_FILENO);
1389 }
1390 if (0 == write_std.size)
1391 {
1392 FD_SET (dev.fd_raw, &rfds);
1393 maxfd = MAX (maxfd, dev.fd_raw);
1394 }
1395 FD_ZERO (&wfds);
1396 if (0 < write_std.size)
1397 {
1398 FD_SET (STDOUT_FILENO, &wfds);
1399 maxfd = MAX (maxfd, STDOUT_FILENO);
1400 }
1401 if (0 < dev.write_pout.size)
1402 {
1403 FD_SET (dev.fd_raw, &wfds);
1404 maxfd = MAX (maxfd, dev.fd_raw);
1405 }
1406 retval = select (maxfd + 1, &rfds, &wfds, NULL, NULL);
1407 if ((-1 == retval) && (EINTR == errno))
1408 continue;
1409 if (0 > retval)
1410 {
1411 fprintf (stderr, "select failed: %s\n", strerror (errno));
1412 break;
1413 }
1414 if (FD_ISSET (STDOUT_FILENO, &wfds))
1415 {
1416 ret =
1417 write (STDOUT_FILENO, write_std.buf + write_std.pos,
1418 write_std.size - write_std.pos);
1419 if (0 > ret)
1420 {
1421 fprintf (stderr, "Failed to write to STDOUT: %s\n", strerror (errno));
1422 break;
1423 }
1424 write_std.pos += ret;
1425 if (write_std.pos == write_std.size)
1426 {
1427 write_std.pos = 0;
1428 write_std.size = 0;
1429 }
1430 }
1431 if (FD_ISSET (dev.fd_raw, &wfds))
1432 {
1433 ret = write (dev.fd_raw, dev.write_pout.buf, dev.write_pout.size);
1434 if (0 > ret)
1435 {
1436 fprintf (stderr, "Failed to write to WLAN device: %s\n",
1437 strerror (errno));
1438 break;
1439 }
1440 dev.write_pout.pos += ret;
1441 if ((dev.write_pout.pos != dev.write_pout.size) && (ret != 0))
1442 {
1443 /* we should not get partial sends with packet-oriented devices... */
1444 fprintf (stderr, "Write error, partial send: %u/%u\n",
1445 dev.write_pout.pos, dev.write_pout.size);
1446 break;
1447 }
1448 if (dev.write_pout.pos == dev.write_pout.size)
1449 {
1450 dev.write_pout.pos = 0;
1451 dev.write_pout.size = 0;
1452 }
1453 }
1454
1455 if (FD_ISSET (STDIN_FILENO, &rfds))
1399 { 1456 {
1400 maxfd = -1; 1457 ret = read (STDIN_FILENO, readbuf, sizeof (readbuf));
1401 FD_ZERO (&rfds); 1458 if (0 > ret)
1402 if ((0 == dev.write_pout.size) && (1 == stdin_open)) 1459 {
1403 { 1460 fprintf (stderr, "Read error from STDIN: %s\n", strerror (errno));
1404 FD_SET (STDIN_FILENO, &rfds); 1461 break;
1405 maxfd = MAX (maxfd, STDIN_FILENO); 1462 }
1406 } 1463 if (0 == ret)
1407 if (0 == write_std.size) 1464 {
1408 { 1465 /* stop reading... */
1409 FD_SET (dev.fd_raw, &rfds); 1466 stdin_open = 0;
1410 maxfd = MAX (maxfd, dev.fd_raw); 1467 }
1411 } 1468 GNUNET_SERVER_mst_receive (stdin_mst, NULL, readbuf, ret, GNUNET_NO,
1412 FD_ZERO (&wfds); 1469 GNUNET_NO);
1413 if (0 < write_std.size) 1470 }
1414 {
1415 FD_SET (STDOUT_FILENO, &wfds);
1416 maxfd = MAX (maxfd, STDOUT_FILENO);
1417 }
1418 if (0 < dev.write_pout.size)
1419 {
1420 FD_SET (dev.fd_raw, &wfds);
1421 maxfd = MAX (maxfd, dev.fd_raw);
1422 }
1423 retval = select (maxfd + 1, &rfds, &wfds, NULL, NULL);
1424 if ((-1 == retval) && (EINTR == errno))
1425 continue;
1426 if (0 > retval)
1427 {
1428 fprintf (stderr, "select failed: %s\n", strerror (errno));
1429 break;
1430 }
1431 if (FD_ISSET (STDOUT_FILENO, &wfds))
1432 {
1433 ret =
1434 write (STDOUT_FILENO,
1435 write_std.buf + write_std.pos,
1436 write_std.size - write_std.pos);
1437 if (0 > ret)
1438 {
1439 fprintf (stderr,
1440 "Failed to write to STDOUT: %s\n", strerror (errno));
1441 break;
1442 }
1443 write_std.pos += ret;
1444 if (write_std.pos == write_std.size)
1445 {
1446 write_std.pos = 0;
1447 write_std.size = 0;
1448 }
1449 }
1450 if (FD_ISSET (dev.fd_raw, &wfds))
1451 {
1452 ret = write (dev.fd_raw, dev.write_pout.buf, dev.write_pout.size);
1453 if (0 > ret)
1454 {
1455 fprintf (stderr,
1456 "Failed to write to WLAN device: %s\n",
1457 strerror (errno));
1458 break;
1459 }
1460 dev.write_pout.pos += ret;
1461 if ((dev.write_pout.pos != dev.write_pout.size) && (ret != 0))
1462 {
1463 /* we should not get partial sends with packet-oriented devices... */
1464 fprintf (stderr,
1465 "Write error, partial send: %u/%u\n",
1466 dev.write_pout.pos, dev.write_pout.size);
1467 break;
1468 }
1469 if (dev.write_pout.pos == dev.write_pout.size)
1470 {
1471 dev.write_pout.pos = 0;
1472 dev.write_pout.size = 0;
1473 }
1474 }
1475
1476 if (FD_ISSET (STDIN_FILENO, &rfds))
1477 {
1478 ret = read (STDIN_FILENO, readbuf, sizeof (readbuf));
1479 if (0 > ret)
1480 {
1481 fprintf (stderr,
1482 "Read error from STDIN: %s\n", strerror (errno));
1483 break;
1484 }
1485 if (0 == ret)
1486 {
1487 /* stop reading... */
1488 stdin_open = 0;
1489 }
1490 GNUNET_SERVER_mst_receive (stdin_mst, NULL, readbuf, ret, GNUNET_NO,
1491 GNUNET_NO);
1492 }
1493
1494 if (FD_ISSET (dev.fd_raw, &rfds))
1495 {
1496 struct GNUNET_MessageHeader *header;
1497 struct Radiotap_rx *rxinfo;
1498 struct ieee80211_frame *datastart;
1499
1500 header = (struct GNUNET_MessageHeader *) write_std.buf;
1501 rxinfo = (struct Radiotap_rx *) &header[1];
1502 datastart = (struct ieee80211_frame *) &rxinfo[1];
1503 ret =
1504 linux_read (&dev, (unsigned char *) datastart,
1505 sizeof (write_std.buf) - sizeof (struct Radiotap_rx) -
1506 sizeof (struct GNUNET_MessageHeader), rxinfo);
1507 if (0 > ret)
1508 {
1509 fprintf (stderr,
1510 "Read error from raw socket: %s\n", strerror (errno));
1511 break;
1512 }
1513 if ((0 < ret) && (0 == mac_test (datastart, &dev)))
1514 {
1515 write_std.size =
1516 ret + sizeof (struct GNUNET_MessageHeader) +
1517 sizeof (struct Radiotap_rx);
1518 header->size = htons (write_std.size);
1519 header->type = htons (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA);
1520 }
1521 }
1522 1471
1472 if (FD_ISSET (dev.fd_raw, &rfds))
1473 {
1474 struct GNUNET_MessageHeader *header;
1475 struct Radiotap_rx *rxinfo;
1476 struct ieee80211_frame *datastart;
1477
1478 header = (struct GNUNET_MessageHeader *) write_std.buf;
1479 rxinfo = (struct Radiotap_rx *) &header[1];
1480 datastart = (struct ieee80211_frame *) &rxinfo[1];
1481 ret =
1482 linux_read (&dev, (unsigned char *) datastart,
1483 sizeof (write_std.buf) - sizeof (struct Radiotap_rx) -
1484 sizeof (struct GNUNET_MessageHeader), rxinfo);
1485 if (0 > ret)
1486 {
1487 fprintf (stderr, "Read error from raw socket: %s\n", strerror (errno));
1488 break;
1489 }
1490 if ((0 < ret) && (0 == mac_test (datastart, &dev)))
1491 {
1492 write_std.size =
1493 ret + sizeof (struct GNUNET_MessageHeader) +
1494 sizeof (struct Radiotap_rx);
1495 header->size = htons (write_std.size);
1496 header->type = htons (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA);
1497 }
1523 } 1498 }
1499
1500 }
1524 /* Error handling, try to clean up a bit at least */ 1501 /* Error handling, try to clean up a bit at least */
1525 GNUNET_SERVER_mst_destroy (stdin_mst); 1502 GNUNET_SERVER_mst_destroy (stdin_mst);
1526 close (dev.fd_raw); 1503 close (dev.fd_raw);
1527 return 1; /* we never exit 'normally' */ 1504 return 1; /* we never exit 'normally' */
1528} 1505}
1529 1506
1530/* end of gnunet-transport-wlan-helper.c */ 1507/* end of gnunet-transport-wlan-helper.c */
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 66f02b104..c069bfb24 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -437,14 +437,14 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
437 traffic_received += ntohs (message->size); 437 traffic_received += ntohs (message->size);
438} 438}
439 439
440void process_string (void *cls, 440void
441 const char *address) 441process_string (void *cls, const char *address)
442{ 442{
443 struct GNUNET_PeerIdentity * peer = cls; 443 struct GNUNET_PeerIdentity *peer = cls;
444 444
445 if ((address != NULL)) 445 if ((address != NULL))
446 { 446 {
447 fprintf (stdout, _("Peer `%s': %s\n"), GNUNET_i2s(peer), address); 447 fprintf (stdout, _("Peer `%s': %s\n"), GNUNET_i2s (peer), address);
448 } 448 }
449 else 449 else
450 { 450 {
@@ -463,29 +463,25 @@ void process_string (void *cls,
463 * @param addrlen number of bytes in addr 463 * @param addrlen number of bytes in addr
464 */ 464 */
465static void 465static void
466process_address (void *cls, 466process_address (void *cls, const struct GNUNET_PeerIdentity *peer,
467 const struct GNUNET_PeerIdentity *peer, 467 const struct GNUNET_HELLO_Address *address)
468 const struct GNUNET_HELLO_Address *address)
469{ 468{
470 const struct GNUNET_CONFIGURATION_Handle * cfg = cls; 469 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
471 struct GNUNET_PeerIdentity *peercp; 470 struct GNUNET_PeerIdentity *peercp;
472 471
473 if ( (address == NULL) || (peer == NULL) ) 472 if ((address == NULL) || (peer == NULL))
474 { 473 {
475 /* done */ 474 /* done */
476 return; 475 return;
477 } 476 }
478 477
479 peercp = GNUNET_malloc(sizeof (struct GNUNET_PeerIdentity)); 478 peercp = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity));
480 *peercp = *peer; 479 *peercp = *peer;
481 480
482 /* Resolve address to string */ 481 /* Resolve address to string */
483 GNUNET_TRANSPORT_address_to_string (cfg, 482 GNUNET_TRANSPORT_address_to_string (cfg, address, numeric,
484 address, 483 GNUNET_TIME_UNIT_MINUTES, &process_string,
485 numeric, 484 peercp);
486 GNUNET_TIME_UNIT_MINUTES,
487 &process_string,
488 peercp);
489} 485}
490 486
491 487
@@ -542,8 +538,8 @@ run (void *cls, char *const *args, const char *cfgfile,
542 if (iterate_connections) 538 if (iterate_connections)
543 { 539 {
544 GNUNET_TRANSPORT_peer_get_active_addresses (cfg, NULL, GNUNET_YES, 540 GNUNET_TRANSPORT_peer_get_active_addresses (cfg, NULL, GNUNET_YES,
545 GNUNET_TIME_UNIT_MINUTES, 541 GNUNET_TIME_UNIT_MINUTES,
546 &process_address, (void *)cfg); 542 &process_address, (void *) cfg);
547 } 543 }
548} 544}
549 545
@@ -568,9 +564,9 @@ main (int argc, char *const *argv)
568 {'t', "test", NULL, 564 {'t', "test", NULL,
569 gettext_noop ("test transport configuration (involves external server)"), 565 gettext_noop ("test transport configuration (involves external server)"),
570 0, &GNUNET_GETOPT_set_one, &test_configuration}, 566 0, &GNUNET_GETOPT_set_one, &test_configuration},
571 {'n', "numeric", NULL, 567 {'n', "numeric", NULL,
572 gettext_noop ("do not resolve hostnames"), 568 gettext_noop ("do not resolve hostnames"),
573 0, &GNUNET_GETOPT_set_one, &numeric}, 569 0, &GNUNET_GETOPT_set_one, &numeric},
574 GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), 570 GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
575 GNUNET_GETOPT_OPTION_END 571 GNUNET_GETOPT_OPTION_END
576 }; 572 };
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index a6c9190bd..502e26597 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -513,6 +513,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
513 struct Plugin *plugin = cls; 513 struct Plugin *plugin = cls;
514 struct HTTP_Message *msg; 514 struct HTTP_Message *msg;
515 struct Session *s; 515 struct Session *s;
516
516 GNUNET_assert (plugin != NULL); 517 GNUNET_assert (plugin != NULL);
517 518
518 int res = GNUNET_SYSERR; 519 int res = GNUNET_SYSERR;
@@ -563,17 +564,20 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
563 GNUNET_i2s (target)); 564 GNUNET_i2s (target));
564#endif 565#endif
565 int res = GNUNET_OK; 566 int res = GNUNET_OK;
567
566 if (addrlen == sizeof (struct IPv4HttpAddress)) 568 if (addrlen == sizeof (struct IPv4HttpAddress))
567 { 569 {
568 struct IPv4HttpAddress * a4 = (struct IPv4HttpAddress *) addr; 570 struct IPv4HttpAddress *a4 = (struct IPv4HttpAddress *) addr;
569 if ((ntohs(a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO)) 571
570 res = GNUNET_SYSERR; 572 if ((ntohs (a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO))
573 res = GNUNET_SYSERR;
571 } 574 }
572 if (addrlen == sizeof (struct IPv6HttpAddress)) 575 if (addrlen == sizeof (struct IPv6HttpAddress))
573 { 576 {
574 struct IPv6HttpAddress * a6 = (struct IPv6HttpAddress *) addr; 577 struct IPv6HttpAddress *a6 = (struct IPv6HttpAddress *) addr;
575 if ((ntohs(a6->u6_port) == 0) || (plugin->ipv6 == GNUNET_NO)) 578
576 res = GNUNET_SYSERR; 579 if ((ntohs (a6->u6_port) == 0) || (plugin->ipv6 == GNUNET_NO))
580 res = GNUNET_SYSERR;
577 } 581 }
578 if (res == GNUNET_OK) 582 if (res == GNUNET_OK)
579 { 583 {
@@ -606,8 +610,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
606 { 610 {
607#if DEBUG_HTTP 611#if DEBUG_HTTP
608 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 612 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
609 "Using outbound client session %p to send to `%s'\n", 613 "Using outbound client session %p to send to `%s'\n", s,
610 s,
611 GNUNET_i2s (target)); 614 GNUNET_i2s (target));
612#endif 615#endif
613 616
@@ -618,8 +621,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
618 { 621 {
619#if DEBUG_HTTP 622#if DEBUG_HTTP
620 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 623 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
621 "Using inbound server %p session to send to `%s'\n", 624 "Using inbound server %p session to send to `%s'\n", s,
622 s,
623 GNUNET_i2s (target)); 625 GNUNET_i2s (target));
624#endif 626#endif
625 627
@@ -659,16 +661,17 @@ http_plugin_disconnect (void *cls, const struct GNUNET_PeerIdentity *target)
659 GNUNET_assert (GNUNET_OK == server_disconnect (s)); 661 GNUNET_assert (GNUNET_OK == server_disconnect (s));
660 GNUNET_CONTAINER_DLL_remove (plugin->head, plugin->tail, s); 662 GNUNET_CONTAINER_DLL_remove (plugin->head, plugin->tail, s);
661 663
662 struct HTTP_Message * msg = s->msg_head; 664 struct HTTP_Message *msg = s->msg_head;
663 struct HTTP_Message * tmp = s->msg_head; 665 struct HTTP_Message *tmp = s->msg_head;
666
664 while (msg != NULL) 667 while (msg != NULL)
665 { 668 {
666 tmp = msg->next; 669 tmp = msg->next;
667 670
668 GNUNET_CONTAINER_DLL_remove(s->msg_head,s->msg_tail, msg); 671 GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg);
669 if (msg->transmit_cont != NULL) 672 if (msg->transmit_cont != NULL)
670 { 673 {
671 msg->transmit_cont(msg->transmit_cont_cls, target, GNUNET_SYSERR); 674 msg->transmit_cont (msg->transmit_cont_cls, target, GNUNET_SYSERR);
672 } 675 }
673 GNUNET_free (msg); 676 GNUNET_free (msg);
674 msg = tmp; 677 msg = tmp;
@@ -1427,18 +1430,20 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
1427 while (s != NULL) 1430 while (s != NULL)
1428 { 1431 {
1429 struct Session *t = s->next; 1432 struct Session *t = s->next;
1433
1430 GNUNET_CONTAINER_DLL_remove (plugin->head, plugin->tail, s); 1434 GNUNET_CONTAINER_DLL_remove (plugin->head, plugin->tail, s);
1431 1435
1432 struct HTTP_Message * msg = s->msg_head; 1436 struct HTTP_Message *msg = s->msg_head;
1433 struct HTTP_Message * tmp = s->msg_head; 1437 struct HTTP_Message *tmp = s->msg_head;
1438
1434 while (msg != NULL) 1439 while (msg != NULL)
1435 { 1440 {
1436 tmp = msg->next; 1441 tmp = msg->next;
1437 1442
1438 GNUNET_CONTAINER_DLL_remove(s->msg_head,s->msg_tail, msg); 1443 GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg);
1439 if (msg->transmit_cont != NULL) 1444 if (msg->transmit_cont != NULL)
1440 { 1445 {
1441 msg->transmit_cont(msg->transmit_cont_cls, &s->target, GNUNET_SYSERR); 1446 msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_SYSERR);
1442 } 1447 }
1443 GNUNET_free (msg); 1448 GNUNET_free (msg);
1444 msg = tmp; 1449 msg = tmp;
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 159b0853f..2c180c5ff 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -312,6 +312,7 @@ static ssize_t
312server_send_callback (void *cls, uint64_t pos, char *buf, size_t max) 312server_send_callback (void *cls, uint64_t pos, char *buf, size_t max)
313{ 313{
314 struct Session *s = cls; 314 struct Session *s = cls;
315
315#if VERBOSE_SERVER 316#if VERBOSE_SERVER
316 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, s->plugin->name, 317 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, s->plugin->name,
317 "Server: %X can sent maximum %u \n", s, max); 318 "Server: %X can sent maximum %u \n", s, max);
@@ -349,6 +350,7 @@ server_send_callback (void *cls, uint64_t pos, char *buf, size_t max)
349 350
350#if VERBOSE_SERVER 351#if VERBOSE_SERVER
351 struct Plugin *plugin = s->plugin; 352 struct Plugin *plugin = s->plugin;
353
352 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 354 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
353 "Server: %X: sent %u bytes\n", s, bytes_read); 355 "Server: %X: sent %u bytes\n", s, bytes_read);
354#endif 356#endif
@@ -575,7 +577,8 @@ found:
575#endif 577#endif
576 MHD_set_connection_option (mhd_connection, MHD_CONNECTION_OPTION_TIMEOUT, to); 578 MHD_set_connection_option (mhd_connection, MHD_CONNECTION_OPTION_TIMEOUT, to);
577 579
578 struct MHD_Daemon * d = NULL; 580 struct MHD_Daemon *d = NULL;
581
579 if (s->addrlen == sizeof (struct IPv6HttpAddress)) 582 if (s->addrlen == sizeof (struct IPv6HttpAddress))
580 d = plugin->server_v6; 583 d = plugin->server_v6;
581 if (s->addrlen == sizeof (struct IPv4HttpAddress)) 584 if (s->addrlen == sizeof (struct IPv4HttpAddress))
@@ -649,10 +652,10 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
649 if ((sc->session->server_recv == NULL) || (sc->session->server_send == NULL)) 652 if ((sc->session->server_recv == NULL) || (sc->session->server_send == NULL))
650 { 653 {
651#if VERBOSE_SERVER 654#if VERBOSE_SERVER
652 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 655 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
653 "Server: Delayed read from `%s' `%s' since not both semi-connections are connected\n", 656 "Server: Delayed read from `%s' `%s' since not both semi-connections are connected\n",
654 GNUNET_i2s (&s->target), 657 GNUNET_i2s (&s->target),
655 http_plugin_address_to_string (NULL, s->addr, s->addrlen)); 658 http_plugin_address_to_string (NULL, s->addr, s->addrlen));
656#endif 659#endif
657 return MHD_YES; 660 return MHD_YES;
658 } 661 }
@@ -674,7 +677,8 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
674 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 677 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
675 "Server: Peer `%s' PUT on address `%s' connected\n", 678 "Server: Peer `%s' PUT on address `%s' connected\n",
676 GNUNET_i2s (&s->target), 679 GNUNET_i2s (&s->target),
677 http_plugin_address_to_string (NULL, s->addr, s->addrlen)); 680 http_plugin_address_to_string (NULL, s->addr,
681 s->addrlen));
678#endif 682#endif
679 return MHD_YES; 683 return MHD_YES;
680 } 684 }
@@ -686,7 +690,8 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
686 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 690 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
687 "Server: peer `%s' PUT on address `%s' received %u bytes\n", 691 "Server: peer `%s' PUT on address `%s' received %u bytes\n",
688 GNUNET_i2s (&s->target), 692 GNUNET_i2s (&s->target),
689 http_plugin_address_to_string (NULL,s->addr, s->addrlen), 693 http_plugin_address_to_string (NULL, s->addr,
694 s->addrlen),
690 *upload_data_size); 695 *upload_data_size);
691#endif 696#endif
692 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); 697 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
@@ -739,6 +744,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
739 to); 744 to);
740 } 745 }
741 struct MHD_Daemon *d = NULL; 746 struct MHD_Daemon *d = NULL;
747
742 if (s->addrlen == sizeof (struct IPv6HttpAddress)) 748 if (s->addrlen == sizeof (struct IPv6HttpAddress))
743 d = plugin->server_v6; 749 d = plugin->server_v6;
744 if (s->addrlen == sizeof (struct IPv4HttpAddress)) 750 if (s->addrlen == sizeof (struct IPv4HttpAddress))
@@ -839,6 +845,7 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection,
839 plugin->cur_connections--; 845 plugin->cur_connections--;
840 846
841 struct MHD_Daemon *d = NULL; 847 struct MHD_Daemon *d = NULL;
848
842 if (s->addrlen == sizeof (struct IPv6HttpAddress)) 849 if (s->addrlen == sizeof (struct IPv6HttpAddress))
843 d = plugin->server_v6; 850 d = plugin->server_v6;
844 if (s->addrlen == sizeof (struct IPv4HttpAddress)) 851 if (s->addrlen == sizeof (struct IPv4HttpAddress))
@@ -894,11 +901,11 @@ server_send (struct Session *s, struct HTTP_Message *msg)
894 901
895 if (s->addrlen == sizeof (struct IPv4HttpAddress)) 902 if (s->addrlen == sizeof (struct IPv4HttpAddress))
896 { 903 {
897 server_reschedule (s->plugin, s->plugin->server_v4 , GNUNET_YES); 904 server_reschedule (s->plugin, s->plugin->server_v4, GNUNET_YES);
898 } 905 }
899 else if (s->addrlen == sizeof (struct IPv6HttpAddress)) 906 else if (s->addrlen == sizeof (struct IPv6HttpAddress))
900 { 907 {
901 server_reschedule (s->plugin, s->plugin->server_v6 , GNUNET_YES); 908 server_reschedule (s->plugin, s->plugin->server_v6, GNUNET_YES);
902 } 909 }
903 else 910 else
904 return GNUNET_SYSERR; 911 return GNUNET_SYSERR;
@@ -926,7 +933,7 @@ server_v4_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
926 return; 933 return;
927#if VERBOSE_SERVER 934#if VERBOSE_SERVER
928 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 935 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
929 "Running IPv4 server\n"); 936 "Running IPv4 server\n");
930#endif 937#endif
931 GNUNET_assert (MHD_YES == MHD_run (plugin->server_v4)); 938 GNUNET_assert (MHD_YES == MHD_run (plugin->server_v4));
932 if (plugin->server_v4 != NULL) 939 if (plugin->server_v4 != NULL)
@@ -954,7 +961,7 @@ server_v6_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
954 return; 961 return;
955#if VERBOSE_SERVER 962#if VERBOSE_SERVER
956 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 963 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
957 "Running IPv6 server\n"); 964 "Running IPv6 server\n");
958#endif 965#endif
959 GNUNET_assert (MHD_YES == MHD_run (plugin->server_v6)); 966 GNUNET_assert (MHD_YES == MHD_run (plugin->server_v6));
960 if (plugin->server_v6 != NULL) 967 if (plugin->server_v6 != NULL)
@@ -1027,8 +1034,8 @@ server_schedule (struct Plugin *plugin, struct MHD_Daemon *daemon_handle,
1027 plugin->server_v4_task = GNUNET_SCHEDULER_NO_TASK; 1034 plugin->server_v4_task = GNUNET_SCHEDULER_NO_TASK;
1028 } 1035 }
1029#if VERBOSE_SERVER 1036#if VERBOSE_SERVER
1030 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 1037 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
1031 "Scheduling IPv4 server task in %llu ms\n", tv); 1038 "Scheduling IPv4 server task in %llu ms\n", tv);
1032#endif 1039#endif
1033 ret = 1040 ret =
1034 GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT, 1041 GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT,
@@ -1043,8 +1050,8 @@ server_schedule (struct Plugin *plugin, struct MHD_Daemon *daemon_handle,
1043 plugin->server_v6_task = GNUNET_SCHEDULER_NO_TASK; 1050 plugin->server_v6_task = GNUNET_SCHEDULER_NO_TASK;
1044 } 1051 }
1045#if VERBOSE_SERVER 1052#if VERBOSE_SERVER
1046 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 1053 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
1047 "Scheduling IPv6 server task in %llu ms\n", tv); 1054 "Scheduling IPv6 server task in %llu ms\n", tv);
1048#endif 1055#endif
1049 ret = 1056 ret =
1050 GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT, 1057 GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT,
@@ -1195,8 +1202,7 @@ server_stop (struct Plugin *plugin)
1195 struct Session *t = NULL; 1202 struct Session *t = NULL;
1196 1203
1197#if VERBOSE_SERVER 1204#if VERBOSE_SERVER
1198 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 1205 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, "server_stop\n");
1199 "server_stop\n");
1200#endif 1206#endif
1201 1207
1202 struct MHD_Daemon *server_v4_tmp = plugin->server_v4; 1208 struct MHD_Daemon *server_v4_tmp = plugin->server_v4;
@@ -1236,16 +1242,17 @@ server_stop (struct Plugin *plugin)
1236 "Deleting semi-sessions %p\n", s); 1242 "Deleting semi-sessions %p\n", s);
1237#endif 1243#endif
1238 t = s->next; 1244 t = s->next;
1239 struct HTTP_Message * msg = s->msg_head; 1245 struct HTTP_Message *msg = s->msg_head;
1240 struct HTTP_Message * tmp = s->msg_head; 1246 struct HTTP_Message *tmp = s->msg_head;
1247
1241 while (msg != NULL) 1248 while (msg != NULL)
1242 { 1249 {
1243 tmp = msg->next; 1250 tmp = msg->next;
1244 1251
1245 GNUNET_CONTAINER_DLL_remove(s->msg_head,s->msg_tail, msg); 1252 GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg);
1246 if (msg->transmit_cont != NULL) 1253 if (msg->transmit_cont != NULL)
1247 { 1254 {
1248 msg->transmit_cont(msg->transmit_cont_cls, &s->target, GNUNET_SYSERR); 1255 msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_SYSERR);
1249 } 1256 }
1250 GNUNET_free (msg); 1257 GNUNET_free (msg);
1251 msg = tmp; 1258 msg = tmp;
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index a0d5072b8..1ef0bca98 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -267,7 +267,7 @@ struct BroadcastAddress
267 struct BroadcastAddress *next; 267 struct BroadcastAddress *next;
268 struct BroadcastAddress *prev; 268 struct BroadcastAddress *prev;
269 269
270 void * addr; 270 void *addr;
271 socklen_t addrlen; 271 socklen_t addrlen;
272}; 272};
273 273
@@ -540,8 +540,11 @@ destroy_session (void *cls, const GNUNET_HashCode * key, void *value)
540 struct Session *peer_session = value; 540 struct Session *peer_session = value;
541 541
542 GNUNET_assert (GNUNET_YES == 542 GNUNET_assert (GNUNET_YES ==
543 GNUNET_CONTAINER_multihashmap_remove (peer_session->plugin->sessions, 543 GNUNET_CONTAINER_multihashmap_remove (peer_session->
544 &peer_session->target.hashPubKey, peer_session)); 544 plugin->sessions,
545 &peer_session->
546 target.hashPubKey,
547 peer_session));
545 if (peer_session->frag != NULL) 548 if (peer_session->frag != NULL)
546 GNUNET_FRAGMENT_context_destroy (peer_session->frag); 549 GNUNET_FRAGMENT_context_destroy (peer_session->frag);
547 if (GNUNET_SCHEDULER_NO_TASK != peer_session->delayed_cont_task) 550 if (GNUNET_SCHEDULER_NO_TASK != peer_session->delayed_cont_task)
@@ -568,7 +571,8 @@ destroy_inbound_session (void *cls, const GNUNET_HashCode * key, void *value)
568 GNUNET_SCHEDULER_cancel (s->invalidation_task); 571 GNUNET_SCHEDULER_cancel (s->invalidation_task);
569 if (GNUNET_SCHEDULER_NO_TASK != s->delayed_cont_task) 572 if (GNUNET_SCHEDULER_NO_TASK != s->delayed_cont_task)
570 GNUNET_SCHEDULER_cancel (s->delayed_cont_task); 573 GNUNET_SCHEDULER_cancel (s->delayed_cont_task);
571 GNUNET_CONTAINER_multihashmap_remove (s->plugin->inbound_sessions, &s->target.hashPubKey, s); 574 GNUNET_CONTAINER_multihashmap_remove (s->plugin->inbound_sessions,
575 &s->target.hashPubKey, s);
572 GNUNET_free (s); 576 GNUNET_free (s);
573 return GNUNET_OK; 577 return GNUNET_OK;
574} 578}
@@ -1300,42 +1304,46 @@ udp_read (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *rsock)
1300 switch (ntohs (msg->type)) 1304 switch (ntohs (msg->type))
1301 { 1305 {
1302 case GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON: 1306 case GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON:
1307 {
1308 if (fromlen == sizeof (struct sockaddr_in))
1303 { 1309 {
1304 if (fromlen == sizeof (struct sockaddr_in)) 1310 LOG (GNUNET_ERROR_TYPE_DEBUG,
1305 { 1311 "Received IPv4 HELLO beacon broadcast with %i bytes from address %s\n",
1306 LOG (GNUNET_ERROR_TYPE_DEBUG, "Received IPv4 HELLO beacon broadcast with %i bytes from address %s\n", 1312 ret, GNUNET_a2s ((const struct sockaddr *) &addr, fromlen));
1307 ret, GNUNET_a2s((const struct sockaddr *) &addr, fromlen)); 1313
1308 1314 struct Mstv4Context *mc;
1309 struct Mstv4Context *mc; 1315
1310 mc = GNUNET_malloc (sizeof (struct Mstv4Context)); 1316 mc = GNUNET_malloc (sizeof (struct Mstv4Context));
1311 struct sockaddr_in *av4 = (struct sockaddr_in *) &addr; 1317 struct sockaddr_in *av4 = (struct sockaddr_in *) &addr;
1312 1318
1313 mc->addr.ipv4_addr = av4->sin_addr.s_addr; 1319 mc->addr.ipv4_addr = av4->sin_addr.s_addr;
1314 mc->addr.u4_port = av4->sin_port; 1320 mc->addr.u4_port = av4->sin_port;
1315 if (GNUNET_OK != 1321 if (GNUNET_OK !=
1316 GNUNET_SERVER_mst_receive (plugin->broadcast_ipv4_mst, mc, buf, ret, GNUNET_NO, 1322 GNUNET_SERVER_mst_receive (plugin->broadcast_ipv4_mst, mc, buf, ret,
1317 GNUNET_NO)) 1323 GNUNET_NO, GNUNET_NO))
1318 GNUNET_free (mc); 1324 GNUNET_free (mc);
1319 } 1325 }
1320 else if (fromlen == sizeof (struct sockaddr_in6)) 1326 else if (fromlen == sizeof (struct sockaddr_in6))
1321 { 1327 {
1322 LOG (GNUNET_ERROR_TYPE_DEBUG, "Received IPv6 HELLO beacon broadcast with %i bytes from address %s\n", 1328 LOG (GNUNET_ERROR_TYPE_DEBUG,
1323 ret, GNUNET_a2s((const struct sockaddr *) &addr, fromlen)); 1329 "Received IPv6 HELLO beacon broadcast with %i bytes from address %s\n",
1330 ret, GNUNET_a2s ((const struct sockaddr *) &addr, fromlen));
1324 1331
1325 struct Mstv6Context *mc; 1332 struct Mstv6Context *mc;
1326 mc = GNUNET_malloc (sizeof (struct Mstv6Context));
1327 struct sockaddr_in6 *av6 = (struct sockaddr_in6 *) &addr;
1328 1333
1329 mc->addr.ipv6_addr = av6->sin6_addr; 1334 mc = GNUNET_malloc (sizeof (struct Mstv6Context));
1330 mc->addr.u6_port = av6->sin6_port; 1335 struct sockaddr_in6 *av6 = (struct sockaddr_in6 *) &addr;
1331 1336
1332 if (GNUNET_OK != 1337 mc->addr.ipv6_addr = av6->sin6_addr;
1333 GNUNET_SERVER_mst_receive (plugin->broadcast_ipv6_mst, mc, buf, ret, GNUNET_NO, 1338 mc->addr.u6_port = av6->sin6_port;
1334 GNUNET_NO)) 1339
1335 GNUNET_free (mc); 1340 if (GNUNET_OK !=
1336 } 1341 GNUNET_SERVER_mst_receive (plugin->broadcast_ipv6_mst, mc, buf, ret,
1337 return; 1342 GNUNET_NO, GNUNET_NO))
1343 GNUNET_free (mc);
1338 } 1344 }
1345 return;
1346 }
1339 case GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE: 1347 case GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE:
1340 if (ntohs (msg->size) < sizeof (struct UDPMessage)) 1348 if (ntohs (msg->size) < sizeof (struct UDPMessage))
1341 { 1349 {
@@ -1489,7 +1497,7 @@ udp_plugin_select (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1489 1497
1490void 1498void
1491broadcast_ipv4_mst_cb (void *cls, void *client, 1499broadcast_ipv4_mst_cb (void *cls, void *client,
1492 const struct GNUNET_MessageHeader *message) 1500 const struct GNUNET_MessageHeader *message)
1493{ 1501{
1494 struct Plugin *plugin = cls; 1502 struct Plugin *plugin = cls;
1495 struct Mstv4Context *mc = client; 1503 struct Mstv4Context *mc = client;
@@ -1517,15 +1525,16 @@ broadcast_ipv4_mst_cb (void *cls, void *client,
1517 (const char *) &mc->addr, sizeof (mc->addr)); 1525 (const char *) &mc->addr, sizeof (mc->addr));
1518 1526
1519 GNUNET_STATISTICS_update (plugin->env->stats, 1527 GNUNET_STATISTICS_update (plugin->env->stats,
1520 _("# IPv4 broadcast HELLO beacons received via udp"), 1, 1528 _
1521 GNUNET_NO); 1529 ("# IPv4 broadcast HELLO beacons received via udp"),
1530 1, GNUNET_NO);
1522 GNUNET_free (mc); 1531 GNUNET_free (mc);
1523} 1532}
1524 1533
1525 1534
1526void 1535void
1527broadcast_ipv6_mst_cb (void *cls, void *client, 1536broadcast_ipv6_mst_cb (void *cls, void *client,
1528 const struct GNUNET_MessageHeader *message) 1537 const struct GNUNET_MessageHeader *message)
1529{ 1538{
1530 1539
1531 struct Plugin *plugin = cls; 1540 struct Plugin *plugin = cls;
@@ -1554,14 +1563,16 @@ broadcast_ipv6_mst_cb (void *cls, void *client,
1554 (const char *) &mc->addr, sizeof (mc->addr)); 1563 (const char *) &mc->addr, sizeof (mc->addr));
1555 1564
1556 GNUNET_STATISTICS_update (plugin->env->stats, 1565 GNUNET_STATISTICS_update (plugin->env->stats,
1557 _("# IPv6 multicast HELLO beacons received via udp"), 1, 1566 _
1558 GNUNET_NO); 1567 ("# IPv6 multicast HELLO beacons received via udp"),
1568 1, GNUNET_NO);
1559 GNUNET_free (mc); 1569 GNUNET_free (mc);
1560} 1570}
1561 1571
1562 1572
1563static void 1573static void
1564udp_ipv4_broadcast_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 1574udp_ipv4_broadcast_send (void *cls,
1575 const struct GNUNET_SCHEDULER_TaskContext *tc)
1565{ 1576{
1566 struct Plugin *plugin = cls; 1577 struct Plugin *plugin = cls;
1567 int sent; 1578 int sent;
@@ -1571,7 +1582,7 @@ udp_ipv4_broadcast_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *t
1571 1582
1572 const struct GNUNET_MessageHeader *hello; 1583 const struct GNUNET_MessageHeader *hello;
1573 struct UDP_Beacon_Message *msg; 1584 struct UDP_Beacon_Message *msg;
1574 struct BroadcastAddress * baddr; 1585 struct BroadcastAddress *baddr;
1575 1586
1576 plugin->send_ipv4_broadcast_task = GNUNET_SCHEDULER_NO_TASK; 1587 plugin->send_ipv4_broadcast_task = GNUNET_SCHEDULER_NO_TASK;
1577 1588
@@ -1594,18 +1605,21 @@ udp_ipv4_broadcast_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *t
1594 /* just IPv4 */ 1605 /* just IPv4 */
1595 while ((baddr != NULL) && (baddr->addrlen == sizeof (struct sockaddr_in))) 1606 while ((baddr != NULL) && (baddr->addrlen == sizeof (struct sockaddr_in)))
1596 { 1607 {
1597 struct sockaddr_in * addr = (struct sockaddr_in * ) baddr->addr; 1608 struct sockaddr_in *addr = (struct sockaddr_in *) baddr->addr;
1609
1598 addr->sin_port = htons (plugin->port); 1610 addr->sin_port = htons (plugin->port);
1599 1611
1600 sent = GNUNET_NETWORK_socket_sendto (plugin->sockv4, msg, msg_size, 1612 sent =
1601 (const struct sockaddr *) addr, 1613 GNUNET_NETWORK_socket_sendto (plugin->sockv4, msg, msg_size,
1602 baddr->addrlen); 1614 (const struct sockaddr *) addr,
1615 baddr->addrlen);
1603 if (sent == GNUNET_SYSERR) 1616 if (sent == GNUNET_SYSERR)
1604 GNUNET_log_strerror(GNUNET_ERROR_TYPE_ERROR, "sendto"); 1617 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "sendto");
1605 else 1618 else
1606 LOG (GNUNET_ERROR_TYPE_DEBUG, "Sent HELLO beacon broadcast with %i bytes to address %s\n", 1619 LOG (GNUNET_ERROR_TYPE_DEBUG,
1607 sent, GNUNET_a2s(baddr->addr, baddr->addrlen)); 1620 "Sent HELLO beacon broadcast with %i bytes to address %s\n", sent,
1608 baddr = baddr->next; 1621 GNUNET_a2s (baddr->addr, baddr->addrlen));
1622 baddr = baddr->next;
1609 } 1623 }
1610 1624
1611 plugin->send_ipv4_broadcast_task = 1625 plugin->send_ipv4_broadcast_task =
@@ -1614,7 +1628,8 @@ udp_ipv4_broadcast_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *t
1614} 1628}
1615 1629
1616static void 1630static void
1617udp_ipv6_broadcast_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 1631udp_ipv6_broadcast_send (void *cls,
1632 const struct GNUNET_SCHEDULER_TaskContext *tc)
1618{ 1633{
1619 struct Plugin *plugin = cls; 1634 struct Plugin *plugin = cls;
1620 int sent; 1635 int sent;
@@ -1642,14 +1657,19 @@ udp_ipv6_broadcast_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *t
1642 memcpy (&msg[1], hello, hello_size); 1657 memcpy (&msg[1], hello, hello_size);
1643 sent = 0; 1658 sent = 0;
1644 1659
1645 sent = GNUNET_NETWORK_socket_sendto (plugin->sockv6, msg, msg_size, 1660 sent =
1646 (const struct sockaddr *) &plugin->ipv6_multicast_address, 1661 GNUNET_NETWORK_socket_sendto (plugin->sockv6, msg, msg_size,
1647 sizeof(struct sockaddr_in6)); 1662 (const struct sockaddr *)
1663 &plugin->ipv6_multicast_address,
1664 sizeof (struct sockaddr_in6));
1648 if (sent == GNUNET_SYSERR) 1665 if (sent == GNUNET_SYSERR)
1649 GNUNET_log_strerror(GNUNET_ERROR_TYPE_ERROR, "sendto"); 1666 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "sendto");
1650 else 1667 else
1651 LOG (GNUNET_ERROR_TYPE_DEBUG, "Sending IPv6 HELLO beacon broadcast with %i bytes to address %s\n", 1668 LOG (GNUNET_ERROR_TYPE_DEBUG,
1652 sent, GNUNET_a2s((const struct sockaddr *) &plugin->ipv6_multicast_address, sizeof(struct sockaddr_in6))); 1669 "Sending IPv6 HELLO beacon broadcast with %i bytes to address %s\n",
1670 sent,
1671 GNUNET_a2s ((const struct sockaddr *) &plugin->ipv6_multicast_address,
1672 sizeof (struct sockaddr_in6)));
1653 1673
1654 1674
1655 1675
@@ -1953,33 +1973,33 @@ udp_nat_port_map_callback (void *cls, int add_remove,
1953 1973
1954 1974
1955static int 1975static int
1956iface_proc (void *cls, const char *name, 1976iface_proc (void *cls, const char *name, int isDefault,
1957 int isDefault, 1977 const struct sockaddr *addr, const struct sockaddr *broadcast_addr,
1958 const struct sockaddr * addr, 1978 const struct sockaddr *netmask, socklen_t addrlen)
1959 const struct sockaddr * broadcast_addr,
1960 const struct sockaddr * netmask,
1961 socklen_t addrlen)
1962{ 1979{
1963 struct Plugin *plugin = cls; 1980 struct Plugin *plugin = cls;
1964 1981
1965 if (addr != NULL) 1982 if (addr != NULL)
1966 { 1983 {
1967 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "address %s for interface %s %p\n ", 1984 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "address %s for interface %s %p\n ",
1968 GNUNET_a2s(addr,addrlen), name, addr); 1985 GNUNET_a2s (addr, addrlen), name, addr);
1969 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "broadcast address %s for interface %s %p\n ", 1986 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1970 GNUNET_a2s(broadcast_addr,addrlen), name, broadcast_addr); 1987 "broadcast address %s for interface %s %p\n ",
1988 GNUNET_a2s (broadcast_addr, addrlen), name, broadcast_addr);
1971 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "netmask %s for interface %s %p\n ", 1989 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "netmask %s for interface %s %p\n ",
1972 GNUNET_a2s(netmask,addrlen), name, netmask); 1990 GNUNET_a2s (netmask, addrlen), name, netmask);
1973 1991
1974 1992
1975 /* Collecting broadcast addresses*/ 1993 /* Collecting broadcast addresses */
1976 if (broadcast_addr != NULL) 1994 if (broadcast_addr != NULL)
1977 { 1995 {
1978 struct BroadcastAddress * ba = GNUNET_malloc(sizeof (struct BroadcastAddress)); 1996 struct BroadcastAddress *ba =
1979 ba->addr = GNUNET_malloc(addrlen); 1997 GNUNET_malloc (sizeof (struct BroadcastAddress));
1980 memcpy(ba->addr, broadcast_addr, addrlen); 1998 ba->addr = GNUNET_malloc (addrlen);
1999 memcpy (ba->addr, broadcast_addr, addrlen);
1981 ba->addrlen = addrlen; 2000 ba->addrlen = addrlen;
1982 GNUNET_CONTAINER_DLL_insert(plugin->ipv4_broadcast_head, plugin->ipv4_broadcast_tail, ba); 2001 GNUNET_CONTAINER_DLL_insert (plugin->ipv4_broadcast_head,
2002 plugin->ipv4_broadcast_tail, ba);
1983 } 2003 }
1984 } 2004 }
1985 return GNUNET_OK; 2005 return GNUNET_OK;
@@ -2225,73 +2245,80 @@ libgnunet_plugin_transport_udp_init (void *cls)
2225 { 2245 {
2226 /* create IPv4 broadcast socket */ 2246 /* create IPv4 broadcast socket */
2227 plugin->broadcast_ipv4 = GNUNET_NO; 2247 plugin->broadcast_ipv4 = GNUNET_NO;
2228 if (plugin->sockv4 != NULL) 2248 if (plugin->sockv4 != NULL)
2229 { 2249 {
2230 int yes = 1; 2250 int yes = 1;
2231 2251
2232 if (GNUNET_NETWORK_socket_setsockopt 2252 if (GNUNET_NETWORK_socket_setsockopt
2233 (plugin->sockv4, SOL_SOCKET, SO_BROADCAST, &yes, sizeof (int)) != GNUNET_OK) 2253 (plugin->sockv4, SOL_SOCKET, SO_BROADCAST, &yes,
2234 { 2254 sizeof (int)) != GNUNET_OK)
2235 LOG (GNUNET_ERROR_TYPE_WARNING, 2255 {
2236 _ 2256 LOG (GNUNET_ERROR_TYPE_WARNING,
2237 ("Failed to set IPv4 broadcast option for broadcast socket on port %d\n"), 2257 _
2238 ntohs (serverAddrv4.sin_port)); 2258 ("Failed to set IPv4 broadcast option for broadcast socket on port %d\n"),
2239 } 2259 ntohs (serverAddrv4.sin_port));
2240 else 2260 }
2241 { 2261 else
2242 GNUNET_OS_network_interfaces_list(iface_proc, plugin); 2262 {
2243 plugin->send_ipv4_broadcast_task = 2263 GNUNET_OS_network_interfaces_list (iface_proc, plugin);
2264 plugin->send_ipv4_broadcast_task =
2244 GNUNET_SCHEDULER_add_now (&udp_ipv4_broadcast_send, plugin); 2265 GNUNET_SCHEDULER_add_now (&udp_ipv4_broadcast_send, plugin);
2245 2266
2246 plugin->broadcast_ipv4_mst = 2267 plugin->broadcast_ipv4_mst =
2247 GNUNET_SERVER_mst_create (broadcast_ipv4_mst_cb, plugin); 2268 GNUNET_SERVER_mst_create (broadcast_ipv4_mst_cb, plugin);
2248 2269
2249 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv4 Broadcasting running\n"); 2270 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv4 Broadcasting running\n");
2250 plugin->broadcast_ipv4 = GNUNET_YES; 2271 plugin->broadcast_ipv4 = GNUNET_YES;
2251 }
2252 } 2272 }
2273 }
2253 2274
2254 plugin->broadcast_ipv6 = GNUNET_NO; 2275 plugin->broadcast_ipv6 = GNUNET_NO;
2255 if (plugin->sockv6 != NULL) 2276 if (plugin->sockv6 != NULL)
2277 {
2278 memset (&plugin->ipv6_multicast_address, 0, sizeof (struct sockaddr_in6));
2279 GNUNET_assert (1 ==
2280 inet_pton (AF_INET6, "FF05::13B",
2281 &plugin->ipv6_multicast_address.sin6_addr));
2282
2283 plugin->ipv6_multicast_address.sin6_family = AF_INET6;
2284 plugin->ipv6_multicast_address.sin6_port = htons (plugin->port);
2285
2286 plugin->broadcast_ipv6_mst =
2287 GNUNET_SERVER_mst_create (broadcast_ipv6_mst_cb, plugin);
2288
2289 /* Create IPv6 multicast request */
2290 struct ipv6_mreq multicastRequest;
2291
2292 multicastRequest.ipv6mr_multiaddr =
2293 plugin->ipv6_multicast_address.sin6_addr;
2294 /* TODO: 0 selects the "best" interface, tweak to use all interfaces
2295 *
2296 * http://tools.ietf.org/html/rfc2553#section-5.2:
2297 *
2298 * IPV6_JOIN_GROUP
2299 *
2300 * Join a multicast group on a specified local interface. If the
2301 * interface index is specified as 0, the kernel chooses the local
2302 * interface. For example, some kernels look up the multicast
2303 * group in the normal IPv6 routing table and using the resulting
2304 * interface.
2305 * */
2306 multicastRequest.ipv6mr_interface = 0;
2307
2308 /* Join the multicast group */
2309 if (GNUNET_NETWORK_socket_setsockopt
2310 (plugin->sockv6, IPPROTO_IPV6, IPV6_JOIN_GROUP,
2311 (char *) &multicastRequest, sizeof (multicastRequest)) == GNUNET_OK)
2256 { 2312 {
2257 memset (&plugin->ipv6_multicast_address, 0, sizeof (struct sockaddr_in6)); 2313 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting running\n");
2258 GNUNET_assert (1 == inet_pton(AF_INET6, "FF05::13B", &plugin->ipv6_multicast_address.sin6_addr));
2259
2260 plugin->ipv6_multicast_address.sin6_family = AF_INET6;
2261 plugin->ipv6_multicast_address.sin6_port = htons(plugin->port);
2262
2263 plugin->broadcast_ipv6_mst =
2264 GNUNET_SERVER_mst_create (broadcast_ipv6_mst_cb, plugin);
2265
2266 /* Create IPv6 multicast request */
2267 struct ipv6_mreq multicastRequest;
2268 multicastRequest.ipv6mr_multiaddr = plugin->ipv6_multicast_address.sin6_addr;
2269 /* TODO: 0 selects the "best" interface, tweak to use all interfaces
2270 *
2271 * http://tools.ietf.org/html/rfc2553#section-5.2:
2272 *
2273 * IPV6_JOIN_GROUP
2274 *
2275 * Join a multicast group on a specified local interface. If the
2276 * interface index is specified as 0, the kernel chooses the local
2277 * interface. For example, some kernels look up the multicast
2278 * group in the normal IPv6 routing table and using the resulting
2279 * interface.
2280 * */
2281 multicastRequest.ipv6mr_interface = 0;
2282
2283 /* Join the multicast group */
2284 if ( GNUNET_NETWORK_socket_setsockopt( plugin->sockv6, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char*) &multicastRequest, sizeof(multicastRequest)) == GNUNET_OK )
2285 {
2286 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting running\n");
2287 2314
2288 plugin->send_ipv6_broadcast_task = 2315 plugin->send_ipv6_broadcast_task =
2289 GNUNET_SCHEDULER_add_now (&udp_ipv6_broadcast_send, plugin); 2316 GNUNET_SCHEDULER_add_now (&udp_ipv6_broadcast_send, plugin);
2290 plugin->broadcast_ipv6 = GNUNET_YES; 2317 plugin->broadcast_ipv6 = GNUNET_YES;
2291 }
2292 else
2293 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting not running\n");
2294 } 2318 }
2319 else
2320 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 broadcasting not running\n");
2321 }
2295 } 2322 }
2296 2323
2297 if (sockets_created == 0) 2324 if (sockets_created == 0)
@@ -2351,8 +2378,10 @@ libgnunet_plugin_transport_udp_done (void *cls)
2351 2378
2352 while (plugin->ipv4_broadcast_head != NULL) 2379 while (plugin->ipv4_broadcast_head != NULL)
2353 { 2380 {
2354 struct BroadcastAddress * p= plugin->ipv4_broadcast_head; 2381 struct BroadcastAddress *p = plugin->ipv4_broadcast_head;
2355 GNUNET_CONTAINER_DLL_remove(plugin->ipv4_broadcast_head, plugin->ipv4_broadcast_tail, p); 2382
2383 GNUNET_CONTAINER_DLL_remove (plugin->ipv4_broadcast_head,
2384 plugin->ipv4_broadcast_tail, p);
2356 GNUNET_free (p->addr); 2385 GNUNET_free (p->addr);
2357 GNUNET_free (p); 2386 GNUNET_free (p);
2358 } 2387 }
@@ -2362,16 +2391,20 @@ libgnunet_plugin_transport_udp_done (void *cls)
2362 { 2391 {
2363 /* Create IPv6 multicast request */ 2392 /* Create IPv6 multicast request */
2364 struct ipv6_mreq multicastRequest; 2393 struct ipv6_mreq multicastRequest;
2365 multicastRequest.ipv6mr_multiaddr = plugin->ipv6_multicast_address.sin6_addr; 2394
2395 multicastRequest.ipv6mr_multiaddr =
2396 plugin->ipv6_multicast_address.sin6_addr;
2366 multicastRequest.ipv6mr_interface = 0; 2397 multicastRequest.ipv6mr_interface = 0;
2367 2398
2368 /* Join the multicast address */ 2399 /* Join the multicast address */
2369 if ( GNUNET_NETWORK_socket_setsockopt( plugin->sockv6, IPPROTO_IPV6, IPV6_LEAVE_GROUP, (char*) &multicastRequest, sizeof(multicastRequest)) == 0 ) 2400 if (GNUNET_NETWORK_socket_setsockopt
2401 (plugin->sockv6, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
2402 (char *) &multicastRequest, sizeof (multicastRequest)) == 0)
2370 { 2403 {
2371 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 Broadcasting stopped\n"); 2404 LOG (GNUNET_ERROR_TYPE_DEBUG, "IPv6 Broadcasting stopped\n");
2372 } 2405 }
2373 else 2406 else
2374 GNUNET_log_strerror(GNUNET_ERROR_TYPE_ERROR, setsockopt); 2407 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, setsockopt);
2375 2408
2376 if (plugin->send_ipv6_broadcast_task != GNUNET_SCHEDULER_NO_TASK) 2409 if (plugin->send_ipv6_broadcast_task != GNUNET_SCHEDULER_NO_TASK)
2377 { 2410 {
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index c7029a579..bf5411d59 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -355,7 +355,7 @@ struct Sessionqueue
355 struct Sessionqueue *prev; 355 struct Sessionqueue *prev;
356 struct Session *content; 356 struct Session *content;
357#if !HAVE_UNALIGNED_64_ACCESS 357#if !HAVE_UNALIGNED_64_ACCESS
358 void *dummy; /* for alignment, see #1909 */ 358 void *dummy; /* for alignment, see #1909 */
359#endif 359#endif
360}; 360};
361 361
@@ -1066,8 +1066,9 @@ set_next_send (struct Plugin *const plugin)
1066 struct GNUNET_TIME_Relative next_send; 1066 struct GNUNET_TIME_Relative next_send;
1067 1067
1068 //abort if helper is not running 1068 //abort if helper is not running
1069 if (plugin->helper_is_running == GNUNET_NO){ 1069 if (plugin->helper_is_running == GNUNET_NO)
1070 return; 1070 {
1071 return;
1071 } 1072 }
1072 1073
1073 //cancel old task 1074 //cancel old task
@@ -1465,12 +1466,13 @@ wlan_transport_start_wlan_helper (struct Plugin *plugin)
1465 const char *filenameloopback = "gnunet-transport-wlan-helper-dummy"; 1466 const char *filenameloopback = "gnunet-transport-wlan-helper-dummy";
1466 char *absolute_filename = NULL; 1467 char *absolute_filename = NULL;
1467 1468
1468 if (plugin->helper_is_running == GNUNET_YES){ 1469 if (plugin->helper_is_running == GNUNET_YES)
1470 {
1469#if DEBUG_wlan 1471#if DEBUG_wlan
1470 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, 1472 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
1471 "wlan_transport_start_wlan_helper not needed, helper already running!"); 1473 "wlan_transport_start_wlan_helper not needed, helper already running!");
1472#endif 1474#endif
1473 return GNUNET_YES; 1475 return GNUNET_YES;
1474 } 1476 }
1475 1477
1476 plugin->server_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_NO, GNUNET_YES); 1478 plugin->server_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_NO, GNUNET_YES);
@@ -1634,12 +1636,13 @@ wlan_transport_stop_wlan_helper (struct Plugin *plugin)
1634 "Stoping WLAN helper process\n"); 1636 "Stoping WLAN helper process\n");
1635#endif 1637#endif
1636 1638
1637 if (plugin->helper_is_running == GNUNET_NO){ 1639 if (plugin->helper_is_running == GNUNET_NO)
1640 {
1638#if DEBUG_wlan 1641#if DEBUG_wlan
1639 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, 1642 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
1640 "wlan_transport_stop_wlan_helper not needed, helper already stopped!"); 1643 "wlan_transport_stop_wlan_helper not needed, helper already stopped!");
1641#endif 1644#endif
1642 return GNUNET_YES; 1645 return GNUNET_YES;
1643 } 1646 }
1644 1647
1645 if (plugin->server_write_delay_task != GNUNET_SCHEDULER_NO_TASK) 1648 if (plugin->server_write_delay_task != GNUNET_SCHEDULER_NO_TASK)
@@ -2604,13 +2607,15 @@ wlan_data_message_handler (void *cls, const struct GNUNET_MessageHeader *hdr)
2604 temp_hdr = (const struct GNUNET_MessageHeader *) &wlanheader[1]; 2607 temp_hdr = (const struct GNUNET_MessageHeader *) &wlanheader[1];
2605 crc = ntohl (wlanheader->crc); 2608 crc = ntohl (wlanheader->crc);
2606 wlanheader->crc = 0; 2609 wlanheader->crc = 0;
2607 if (GNUNET_CRYPTO_crc32_n ((char *) wlanheader, ntohs (wlanheader->header.size)) != crc) 2610 if (GNUNET_CRYPTO_crc32_n
2611 ((char *) wlanheader, ntohs (wlanheader->header.size)) != crc)
2608 { 2612 {
2609 //wrong crc, dispose message 2613 //wrong crc, dispose message
2610 GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, PLUGIN_LOG_NAME, 2614 GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, PLUGIN_LOG_NAME,
2611 "Wlan message header crc was wrong: %u != %u\n", 2615 "Wlan message header crc was wrong: %u != %u\n",
2612 GNUNET_CRYPTO_crc32_n ((char *) wlanheader, 2616 GNUNET_CRYPTO_crc32_n ((char *) wlanheader,
2613 ntohs (wlanheader->header.size)), crc); 2617 ntohs (wlanheader->header.size)),
2618 crc);
2614 hexdump ((void *) hdr, ntohs (hdr->size)); 2619 hexdump ((void *) hdr, ntohs (hdr->size));
2615 return; 2620 return;
2616 } 2621 }
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 52051954b..1742dd0d3 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -484,8 +484,7 @@ generate_config (char *cfg_file, unsigned long long quota_in,
484 GNUNET_asprintf (&fname, "q_in_%llu_q_out_%llu_%s", quota_in, quota_out, 484 GNUNET_asprintf (&fname, "q_in_%llu_q_out_%llu_%s", quota_in, quota_out,
485 cfg_file); 485 cfg_file);
486 GNUNET_CONFIGURATION_set_value_string (cfg, "PATHS", "DEFAULTCONFIG", fname); 486 GNUNET_CONFIGURATION_set_value_string (cfg, "PATHS", "DEFAULTCONFIG", fname);
487 GNUNET_CONFIGURATION_set_value_number (cfg, "ats", "WAN_QUOTA_IN", 487 GNUNET_CONFIGURATION_set_value_number (cfg, "ats", "WAN_QUOTA_IN", quota_in);
488 quota_in);
489 GNUNET_CONFIGURATION_set_value_number (cfg, "ats", "WAN_QUOTA_OUT", 488 GNUNET_CONFIGURATION_set_value_number (cfg, "ats", "WAN_QUOTA_OUT",
490 quota_out); 489 quota_out);
491 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_write (cfg, fname)); 490 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_write (cfg, fname));
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c
index aa6f98027..20005deab 100644
--- a/src/transport/test_transport_api_bidirectional_connect.c
+++ b/src/transport/test_transport_api_bidirectional_connect.c
@@ -312,10 +312,12 @@ start_cb (struct PeerContext *p, void *cls)
312 "Test tries to connect peer %u (`%s') <-> peer %u (`%s')\n", 312 "Test tries to connect peer %u (`%s') <-> peer %u (`%s')\n",
313 p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); 313 p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id));
314 314
315 cc1 = GNUNET_TRANSPORT_TESTING_connect_peers (tth, p2, p1, &testing_connect_cb, 315 cc1 =
316 NULL); 316 GNUNET_TRANSPORT_TESTING_connect_peers (tth, p2, p1, &testing_connect_cb,
317 cc2 = GNUNET_TRANSPORT_TESTING_connect_peers (tth, p1, p2, &testing_connect_cb, 317 NULL);
318 NULL); 318 cc2 =
319 GNUNET_TRANSPORT_TESTING_connect_peers (tth, p1, p2, &testing_connect_cb,
320 NULL);
319} 321}
320 322
321static void 323static void
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c
index 7dd9bd913..026ed085a 100644
--- a/src/transport/test_transport_api_disconnect.c
+++ b/src/transport/test_transport_api_disconnect.c
@@ -128,7 +128,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
128 128
129 if (cc != NULL) 129 if (cc != NULL)
130 { 130 {
131 GNUNET_TRANSPORT_TESTING_connect_peers_cancel(tth, cc); 131 GNUNET_TRANSPORT_TESTING_connect_peers_cancel (tth, cc);
132 cc = NULL; 132 cc = NULL;
133 } 133 }
134 134
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c
index 87383bbac..61423a7ee 100644
--- a/src/transport/test_transport_api_restart_1peer.c
+++ b/src/transport/test_transport_api_restart_1peer.c
@@ -155,10 +155,12 @@ static void
155reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 155reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
156{ 156{
157 struct PeerContext *p = cls; 157 struct PeerContext *p = cls;
158
158 reconnect_task = GNUNET_SCHEDULER_NO_TASK; 159 reconnect_task = GNUNET_SCHEDULER_NO_TASK;
159 160
160 GNUNET_TRANSPORT_try_connect (p->th, &p2->id); 161 GNUNET_TRANSPORT_try_connect (p->th, &p2->id);
161 reconnect_task = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, &reconnect, p); 162 reconnect_task =
163 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect, p);
162} 164}
163 165
164static void 166static void
@@ -166,20 +168,17 @@ restart_cb (struct PeerContext *p, void *cls)
166{ 168{
167 169
168 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 170 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
169 "Restarted peer %u (`%4s'), issuing reconnect\n", 171 "Restarted peer %u (`%4s'), issuing reconnect\n", p->no,
170 p->no,
171 GNUNET_i2s (&p->id)); 172 GNUNET_i2s (&p->id));
172 173
173 reconnect_task = GNUNET_SCHEDULER_add_now(&reconnect, p); 174 reconnect_task = GNUNET_SCHEDULER_add_now (&reconnect, p);
174} 175}
175 176
176static 177static void
177void restart (struct PeerContext *p , char * cfg_file) 178restart (struct PeerContext *p, char *cfg_file)
178{ 179{
179 GNUNET_assert (p != NULL); 180 GNUNET_assert (p != NULL);
180 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 181 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Restarting peer %u (`%4s')\n", p->no,
181 "Restarting peer %u (`%4s')\n",
182 p->no,
183 GNUNET_i2s (&p->id)); 182 GNUNET_i2s (&p->id));
184 GNUNET_TRANSPORT_TESTING_restart_peer (tth, p, cfg_file, &restart_cb, p); 183 GNUNET_TRANSPORT_TESTING_restart_peer (tth, p, cfg_file, &restart_cb, p);
185 return; 184 return;
@@ -200,6 +199,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
200 GNUNET_assert (t != NULL); 199 GNUNET_assert (t != NULL);
201 200
202 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); 201 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
202
203 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 203 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
204 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", 204 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n",
205 p->no, ps, ntohs (message->type), ntohs (message->size), t->no, 205 p->no, ps, ntohs (message->type), ntohs (message->size), t->no,
@@ -217,8 +217,8 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
217 } 217 }
218 else 218 else
219 { 219 {
220 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 220 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
221 "Restarted peers connected, stopping test...\n"); 221 "Restarted peers connected, stopping test...\n");
222 ok = 0; 222 ok = 0;
223 end (); 223 end ();
224 } 224 }
@@ -329,6 +329,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
329 329
330 330
331 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); 331 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
332
332 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 333 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
333 "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, 334 "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps,
334 GNUNET_i2s (peer)); 335 GNUNET_i2s (peer));
@@ -368,6 +369,7 @@ start_cb (struct PeerContext *p, void *cls)
368 return; 369 return;
369 370
370 char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); 371 char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
372
371 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 373 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
372 "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", 374 "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n",
373 p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); 375 p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id));
@@ -451,8 +453,8 @@ main (int argc, char *argv[])
451 tth = GNUNET_TRANSPORT_TESTING_init (); 453 tth = GNUNET_TRANSPORT_TESTING_init ();
452 454
453 455
454 GNUNET_asprintf(&cfg_file_p1,"test_transport_api_tcp_peer1.conf"); 456 GNUNET_asprintf (&cfg_file_p1, "test_transport_api_tcp_peer1.conf");
455 GNUNET_asprintf(&cfg_file_p2,"test_transport_api_tcp_peer2.conf"); 457 GNUNET_asprintf (&cfg_file_p2, "test_transport_api_tcp_peer2.conf");
456 458
457 459
458 ret = check (); 460 ret = check ();
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c
index 44a41614f..67cc90f0e 100644
--- a/src/transport/test_transport_api_restart_2peers.c
+++ b/src/transport/test_transport_api_restart_2peers.c
@@ -155,36 +155,36 @@ static void
155reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 155reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
156{ 156{
157 struct PeerContext *p = cls; 157 struct PeerContext *p = cls;
158
158 reconnect_task = GNUNET_SCHEDULER_NO_TASK; 159 reconnect_task = GNUNET_SCHEDULER_NO_TASK;
159 160
160 GNUNET_TRANSPORT_try_connect (p1->th, &p2->id); 161 GNUNET_TRANSPORT_try_connect (p1->th, &p2->id);
161 reconnect_task = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, &reconnect, p); 162 reconnect_task =
163 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect, p);
162} 164}
163 165
164static void 166static void
165restart_cb (struct PeerContext *p, void *cls) 167restart_cb (struct PeerContext *p, void *cls)
166{ 168{
167 static int c; 169 static int c;
170
168 c++; 171 c++;
169 172
170 if (c != 2) 173 if (c != 2)
171 return; 174 return;
172 175
173 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 176 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
174 "Restarted peer %u (`%4s'), issuing reconnect\n", 177 "Restarted peer %u (`%4s'), issuing reconnect\n", p->no,
175 p->no,
176 GNUNET_i2s (&p->id)); 178 GNUNET_i2s (&p->id));
177 179
178 reconnect_task = GNUNET_SCHEDULER_add_now(&reconnect, p); 180 reconnect_task = GNUNET_SCHEDULER_add_now (&reconnect, p);
179} 181}
180 182
181static 183static void
182void restart (struct PeerContext *p , char * cfg_file) 184restart (struct PeerContext *p, char *cfg_file)
183{ 185{
184 GNUNET_assert (p != NULL); 186 GNUNET_assert (p != NULL);
185 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Restarting peer %u (`%4s')\n", p->no,
186 "Restarting peer %u (`%4s')\n",
187 p->no,
188 GNUNET_i2s (&p->id)); 188 GNUNET_i2s (&p->id));
189 GNUNET_TRANSPORT_TESTING_restart_peer (tth, p, cfg_file, &restart_cb, p); 189 GNUNET_TRANSPORT_TESTING_restart_peer (tth, p, cfg_file, &restart_cb, p);
190 return; 190 return;
@@ -205,6 +205,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
205 GNUNET_assert (t != NULL); 205 GNUNET_assert (t != NULL);
206 206
207 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); 207 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
208
208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 209 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
209 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", 210 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n",
210 p->no, ps, ntohs (message->type), ntohs (message->size), t->no, 211 p->no, ps, ntohs (message->type), ntohs (message->size), t->no,
@@ -223,8 +224,8 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
223 } 224 }
224 else 225 else
225 { 226 {
226 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
227 "Restarted peers connected, stopping test...\n"); 228 "Restarted peers connected, stopping test...\n");
228 ok = 0; 229 ok = 0;
229 end (); 230 end ();
230 } 231 }
@@ -335,6 +336,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
335 336
336 337
337 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); 338 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
339
338 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 340 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
339 "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps, 341 "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps,
340 GNUNET_i2s (peer)); 342 GNUNET_i2s (peer));
@@ -374,6 +376,7 @@ start_cb (struct PeerContext *p, void *cls)
374 return; 376 return;
375 377
376 char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); 378 char *sender_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
379
377 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 380 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
378 "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n", 381 "Test tries to connect peer %u (`%s') -> peer %u (`%s')\n",
379 p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id)); 382 p1->no, sender_c, p2->no, GNUNET_i2s (&p2->id));
@@ -457,8 +460,8 @@ main (int argc, char *argv[])
457 tth = GNUNET_TRANSPORT_TESTING_init (); 460 tth = GNUNET_TRANSPORT_TESTING_init ();
458 461
459 462
460 GNUNET_asprintf(&cfg_file_p1,"test_transport_api_tcp_peer1.conf"); 463 GNUNET_asprintf (&cfg_file_p1, "test_transport_api_tcp_peer1.conf");
461 GNUNET_asprintf(&cfg_file_p2,"test_transport_api_tcp_peer2.conf"); 464 GNUNET_asprintf (&cfg_file_p2, "test_transport_api_tcp_peer2.conf");
462 465
463 466
464 ret = check (); 467 ret = check ();
@@ -472,4 +475,5 @@ main (int argc, char *argv[])
472 475
473 return ret; 476 return ret;
474} 477}
478
475/* end of test_transport_api_restart_2peers.c */ 479/* end of test_transport_api_restart_2peers.c */
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index 90defae02..e52b20f7c 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -229,10 +229,9 @@ get_size (unsigned int iter)
229 229
230#ifndef LINUX 230#ifndef LINUX
231 /* FreeBSD/OSX etc. Unix DGRAMs do not work 231 /* FreeBSD/OSX etc. Unix DGRAMs do not work
232 with large messages */ 232 * with large messages */
233 if (0 == strcmp ("unix", 233 if (0 == strcmp ("unix", test_plugin))
234 test_plugin)) 234 return sizeof (struct TestMessage) + (ret % 1024);
235 return sizeof (struct TestMessage) + (ret % 1024);
236#endif 235#endif
237 return sizeof (struct TestMessage) + (ret % 60000); 236 return sizeof (struct TestMessage) + (ret % 60000);
238} 237}
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index e45953239..9f7a99a7b 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -284,22 +284,22 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct GNUNET_TRANSPORT_TESTING_handle
284 p->cfg = GNUNET_CONFIGURATION_create (); 284 p->cfg = GNUNET_CONFIGURATION_create ();
285 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); 285 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
286 286
287 if (GNUNET_CONFIGURATION_have_value (p-> 287 if (GNUNET_CONFIGURATION_have_value (p->cfg, "PATHS", "SERVICEHOME"))
288 cfg, "PATHS", "SERVICEHOME"))
289 GNUNET_assert (GNUNET_OK == 288 GNUNET_assert (GNUNET_OK ==
290 GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", 289 GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS",
291 "SERVICEHOME", 290 "SERVICEHOME",
292 &p->servicehome)); 291 &p->servicehome));
293 292
294 if (NULL != p->servicehome) 293 if (NULL != p->servicehome)
295 GNUNET_DISK_directory_remove (p->servicehome); 294 GNUNET_DISK_directory_remove (p->servicehome);
296 295
297 hostkey = get_host_key(tth); 296 hostkey = get_host_key (tth);
298 if (hostkey != NULL) 297 if (hostkey != NULL)
299 { 298 {
300 299
301 GNUNET_asprintf (&p->hostkeyfile, "%s/.hostkey", p->servicehome); 300 GNUNET_asprintf (&p->hostkeyfile, "%s/.hostkey", p->servicehome);
302 GNUNET_assert(GNUNET_OK == GNUNET_DISK_directory_create_for_file (p->hostkeyfile)); 301 GNUNET_assert (GNUNET_OK ==
302 GNUNET_DISK_directory_create_for_file (p->hostkeyfile));
303 fn = GNUNET_DISK_file_open (p->hostkeyfile, 303 fn = GNUNET_DISK_file_open (p->hostkeyfile,
304 GNUNET_DISK_OPEN_READWRITE | 304 GNUNET_DISK_OPEN_READWRITE |
305 GNUNET_DISK_OPEN_CREATE, 305 GNUNET_DISK_OPEN_CREATE,
@@ -355,11 +355,11 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct GNUNET_TRANSPORT_TESTING_handle
355* @return GNUNET_OK in success otherwise GNUNET_SYSERR 355* @return GNUNET_OK in success otherwise GNUNET_SYSERR
356*/ 356*/
357int 357int
358GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_handle *tth, 358GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_handle
359 struct PeerContext *p, 359 *tth, struct PeerContext *p,
360 const char *cfgname, 360 const char *cfgname,
361 GNUNET_TRANSPORT_TESTING_start_cb restart_cb, 361 GNUNET_TRANSPORT_TESTING_start_cb
362 void *cb_cls) 362 restart_cb, void *cb_cls)
363{ 363{
364 struct GNUNET_DISK_FileHandle *fn; 364 struct GNUNET_DISK_FileHandle *fn;
365 365
@@ -370,9 +370,8 @@ GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_handle *t
370 370
371 /* shutdown */ 371 /* shutdown */
372#if VERBOSE 372#if VERBOSE
373 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing", 373 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
374 "Stopping peer %u (`%s')\n", p->no, 374 "Stopping peer %u (`%s')\n", p->no, GNUNET_i2s (&p->id));
375 GNUNET_i2s (&p->id));
376#endif 375#endif
377 if (p->ghh != NULL) 376 if (p->ghh != NULL)
378 GNUNET_TRANSPORT_get_hello_cancel (p->ghh); 377 GNUNET_TRANSPORT_get_hello_cancel (p->ghh);
@@ -400,48 +399,48 @@ GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_handle *t
400 399
401 /* start */ 400 /* start */
402#if VERBOSE 401#if VERBOSE
403 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing", 402 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
404 "Restarting peer %u (`%s')\n", p->no, 403 "Restarting peer %u (`%s')\n", p->no, GNUNET_i2s (&p->id));
405 GNUNET_i2s (&p->id));
406#endif 404#endif
407 405
408 sleep (5); // YUCK! 406 sleep (5); // YUCK!
409 407
410 if (GNUNET_DISK_file_test (cfgname) == GNUNET_NO) 408 if (GNUNET_DISK_file_test (cfgname) == GNUNET_NO)
411 { 409 {
412 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "transport-testing", 410 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "transport-testing",
413 "File not found: `%s' \n", cfgname); 411 "File not found: `%s' \n", cfgname);
414 goto fail; 412 goto fail;
415 } 413 }
416 414
417 p->cfg = GNUNET_CONFIGURATION_create (); 415 p->cfg = GNUNET_CONFIGURATION_create ();
418 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); 416 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
419 417
420 if (! GNUNET_CONFIGURATION_have_value (p->cfg, "PATHS", "SERVICEHOME")) 418 if (!GNUNET_CONFIGURATION_have_value (p->cfg, "PATHS", "SERVICEHOME"))
421 goto fail; 419 goto fail;
422 420
423 fn = GNUNET_DISK_file_open (p->hostkeyfile, 421 fn = GNUNET_DISK_file_open (p->hostkeyfile,
424 GNUNET_DISK_OPEN_READWRITE | 422 GNUNET_DISK_OPEN_READWRITE |
425 GNUNET_DISK_OPEN_CREATE, 423 GNUNET_DISK_OPEN_CREATE,
426 GNUNET_DISK_PERM_USER_READ | 424 GNUNET_DISK_PERM_USER_READ |
427 GNUNET_DISK_PERM_USER_WRITE); 425 GNUNET_DISK_PERM_USER_WRITE);
428 if (fn == NULL) 426 if (fn == NULL)
429 goto fail; 427 goto fail;
430 if (GNUNET_OK != GNUNET_DISK_file_close (fn)) 428 if (GNUNET_OK != GNUNET_DISK_file_close (fn))
431 goto fail; 429 goto fail;
432 430
433 p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", 431 p->arm_proc =
434 "gnunet-service-arm", "-c", cfgname, 432 GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
435 #if VERBOSE_PEERS 433 "gnunet-service-arm", "-c", cfgname,
436 "-L", "DEBUG", 434#if VERBOSE_PEERS
437 #else 435 "-L", "DEBUG",
438 "-L", "ERROR", 436#else
439 #endif 437 "-L", "ERROR",
440 NULL); 438#endif
439 NULL);
441 440
442 p->th = 441 p->th =
443 GNUNET_TRANSPORT_connect (p->cfg, NULL, p, &notify_receive, 442 GNUNET_TRANSPORT_connect (p->cfg, NULL, p, &notify_receive,
444 &notify_connect, &notify_disconnect); 443 &notify_connect, &notify_disconnect);
445 GNUNET_assert (p->th != NULL); 444 GNUNET_assert (p->th != NULL);
446 445
447 p->start_cb = restart_cb; 446 p->start_cb = restart_cb;
@@ -451,11 +450,11 @@ GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_handle *t
451 GNUNET_assert (p->ghh != NULL); 450 GNUNET_assert (p->ghh != NULL);
452 return GNUNET_OK; 451 return GNUNET_OK;
453 452
454 fail: 453fail:
455 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing", 454 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
456 "Restarting peer %u (`%s') failed, removing peer\n", p->no, 455 "Restarting peer %u (`%s') failed, removing peer\n", p->no,
457 GNUNET_i2s (&p->id)); 456 GNUNET_i2s (&p->id));
458 GNUNET_TRANSPORT_TESTING_stop_peer (tth,p); 457 GNUNET_TRANSPORT_TESTING_stop_peer (tth, p);
459 return GNUNET_SYSERR; 458 return GNUNET_SYSERR;
460} 459}
461 460
@@ -643,11 +642,11 @@ GNUNET_TRANSPORT_TESTING_init ()
643 /* prepare hostkeys */ 642 /* prepare hostkeys */
644 tth = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_TESTING_handle)); 643 tth = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_TESTING_handle));
645 tth->hostkey_data = NULL; 644 tth->hostkey_data = NULL;
646 const char * hostkeys_file = "../../contrib/testing_hostkeys.dat"; 645 const char *hostkeys_file = "../../contrib/testing_hostkeys.dat";
646
647 if (GNUNET_YES != GNUNET_DISK_file_test (hostkeys_file)) 647 if (GNUNET_YES != GNUNET_DISK_file_test (hostkeys_file))
648 { 648 {
649 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 649 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Could not read hostkeys file!\n"));
650 _("Could not read hostkeys file!\n"));
651 } 650 }
652 else 651 else
653 { 652 {
@@ -656,8 +655,7 @@ GNUNET_TRANSPORT_TESTING_init ()
656 GNUNET_DISK_PERM_NONE); 655 GNUNET_DISK_PERM_NONE);
657 if (NULL == fd) 656 if (NULL == fd)
658 { 657 {
659 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", 658 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", hostkeys_file);
660 hostkeys_file);
661 GNUNET_free (tth); 659 GNUNET_free (tth);
662 return NULL; 660 return NULL;
663 } 661 }
@@ -668,7 +666,7 @@ GNUNET_TRANSPORT_TESTING_init ()
668 if (0 != (fs % HOSTKEYFILESIZE)) 666 if (0 != (fs % HOSTKEYFILESIZE))
669 { 667 {
670 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "transport-testing", 668 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "transport-testing",
671 "File size %llu seems incorrect for hostkeys...\n", fs); 669 "File size %llu seems incorrect for hostkeys...\n", fs);
672 } 670 }
673 else 671 else
674 { 672 {
@@ -676,7 +674,7 @@ GNUNET_TRANSPORT_TESTING_init ()
676 tth->hostkey_data = GNUNET_malloc_large (fs); 674 tth->hostkey_data = GNUNET_malloc_large (fs);
677 GNUNET_assert (fs == GNUNET_DISK_file_read (fd, tth->hostkey_data, fs)); 675 GNUNET_assert (fs == GNUNET_DISK_file_read (fd, tth->hostkey_data, fs));
678 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing", 676 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
679 "Read %llu hostkeys from file\n", total_hostkeys); 677 "Read %llu hostkeys from file\n", total_hostkeys);
680 tth->hostkeys_total = total_hostkeys; 678 tth->hostkeys_total = total_hostkeys;
681 } 679 }
682 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd)); 680 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd));
diff --git a/src/transport/transport-testing.h b/src/transport/transport-testing.h
index 883c68837..c77d79381 100644
--- a/src/transport/transport-testing.h
+++ b/src/transport/transport-testing.h
@@ -169,11 +169,11 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct GNUNET_TRANSPORT_TESTING_handle *tth,
169* @return GNUNET_OK in success otherwise GNUNET_SYSERR 169* @return GNUNET_OK in success otherwise GNUNET_SYSERR
170*/ 170*/
171int 171int
172GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_handle *tth, 172GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_handle
173 struct PeerContext *p, 173 *tth, struct PeerContext *p,
174 const char *cfgname, 174 const char *cfgname,
175 GNUNET_TRANSPORT_TESTING_start_cb start_cb, 175 GNUNET_TRANSPORT_TESTING_start_cb
176 void *cb_cls); 176 start_cb, void *cb_cls);
177 177
178/** 178/**
179 * Connect the given peers and call the callback when both peers report the 179 * Connect the given peers and call the callback when both peers report the
diff --git a/src/transport/transport.h b/src/transport/transport.h
index bfcf9fe6e..d2792b92d 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -401,7 +401,7 @@ struct AddressIterateResponseMessage
401 * length of the plugin name 401 * length of the plugin name
402 */ 402 */
403 uint32_t pluginlen GNUNET_PACKED; 403 uint32_t pluginlen GNUNET_PACKED;
404 404
405}; 405};
406 406
407 407
diff --git a/src/transport/transport_api_address_lookup.c b/src/transport/transport_api_address_lookup.c
index 7cd61e896..9ae9b4031 100644
--- a/src/transport/transport_api_address_lookup.c
+++ b/src/transport/transport_api_address_lookup.c
@@ -93,7 +93,8 @@ peer_address_response_processor (void *cls,
93 return; 93 return;
94 } 94 }
95 size = ntohs (msg->size); 95 size = ntohs (msg->size);
96 GNUNET_break (ntohs (msg->type) == GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE); 96 GNUNET_break (ntohs (msg->type) ==
97 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE);
97 if (size == sizeof (struct GNUNET_MessageHeader)) 98 if (size == sizeof (struct GNUNET_MessageHeader))
98 { 99 {
99 /* done! */ 100 /* done! */
@@ -102,8 +103,11 @@ peer_address_response_processor (void *cls,
102 return; 103 return;
103 } 104 }
104 105
105 if ( (size < sizeof (struct GNUNET_MessageHeader) + sizeof (struct AddressIterateResponseMessage)) || 106 if ((size <
106 (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE) ) 107 sizeof (struct GNUNET_MessageHeader) +
108 sizeof (struct AddressIterateResponseMessage)) ||
109 (ntohs (msg->type) !=
110 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE))
107 { 111 {
108 GNUNET_break (0); 112 GNUNET_break (0);
109 pal_ctx->cb (pal_ctx->cb_cls, NULL, NULL); 113 pal_ctx->cb (pal_ctx->cb_cls, NULL, NULL);
@@ -112,8 +116,8 @@ peer_address_response_processor (void *cls,
112 } 116 }
113 117
114 air_msg = (struct AddressIterateResponseMessage *) msg; 118 air_msg = (struct AddressIterateResponseMessage *) msg;
115 tlen = ntohl(air_msg->pluginlen); 119 tlen = ntohl (air_msg->pluginlen);
116 alen = ntohl(air_msg->addrlen); 120 alen = ntohl (air_msg->addrlen);
117 121
118 if (size != sizeof (struct AddressIterateResponseMessage) + tlen + alen) 122 if (size != sizeof (struct AddressIterateResponseMessage) + tlen + alen)
119 { 123 {
@@ -126,7 +130,7 @@ peer_address_response_processor (void *cls,
126 addr = (const char *) &air_msg[1]; 130 addr = (const char *) &air_msg[1];
127 transport_name = &addr[alen]; 131 transport_name = &addr[alen];
128 132
129 if (transport_name[tlen-1] != '\0') 133 if (transport_name[tlen - 1] != '\0')
130 { 134 {
131 GNUNET_break_op (0); 135 GNUNET_break_op (0);
132 pal_ctx->cb (pal_ctx->cb_cls, NULL, NULL); 136 pal_ctx->cb (pal_ctx->cb_cls, NULL, NULL);
@@ -135,13 +139,14 @@ peer_address_response_processor (void *cls,
135 } 139 }
136 140
137 /* expect more replies */ 141 /* expect more replies */
138 GNUNET_CLIENT_receive (pal_ctx->client, 142 GNUNET_CLIENT_receive (pal_ctx->client, &peer_address_response_processor,
139 &peer_address_response_processor, pal_ctx, 143 pal_ctx,
140 GNUNET_TIME_absolute_get_remaining (pal_ctx->timeout)); 144 GNUNET_TIME_absolute_get_remaining (pal_ctx->timeout));
141 145
142 /* notify client */ 146 /* notify client */
143 address = GNUNET_HELLO_address_allocate (&air_msg->peer, 147 address =
144 transport_name, addr, alen); 148 GNUNET_HELLO_address_allocate (&air_msg->peer, transport_name, addr,
149 alen);
145 pal_ctx->cb (pal_ctx->cb_cls, &air_msg->peer, address); 150 pal_ctx->cb (pal_ctx->cb_cls, &air_msg->peer, address);
146 GNUNET_HELLO_address_free (address); 151 GNUNET_HELLO_address_free (address);
147} 152}
@@ -165,11 +170,13 @@ peer_address_response_processor (void *cls,
165 * @param peer_address_callback_cls closure for peer_address_callback 170 * @param peer_address_callback_cls closure for peer_address_callback
166 */ 171 */
167struct GNUNET_TRANSPORT_PeerIterateContext * 172struct GNUNET_TRANSPORT_PeerIterateContext *
168GNUNET_TRANSPORT_peer_get_active_addresses (const struct GNUNET_CONFIGURATION_Handle *cfg, 173GNUNET_TRANSPORT_peer_get_active_addresses (const struct
169 const struct GNUNET_PeerIdentity *peer, 174 GNUNET_CONFIGURATION_Handle *cfg,
170 int one_shot, 175 const struct GNUNET_PeerIdentity
176 *peer, int one_shot,
171 struct GNUNET_TIME_Relative timeout, 177 struct GNUNET_TIME_Relative timeout,
172 GNUNET_TRANSPORT_PeerIterateCallback peer_address_callback, 178 GNUNET_TRANSPORT_PeerIterateCallback
179 peer_address_callback,
173 void *peer_address_callback_cls) 180 void *peer_address_callback_cls)
174{ 181{
175 struct GNUNET_TRANSPORT_PeerIterateContext *pal_ctx; 182 struct GNUNET_TRANSPORT_PeerIterateContext *pal_ctx;
@@ -180,7 +187,7 @@ GNUNET_TRANSPORT_peer_get_active_addresses (const struct GNUNET_CONFIGURATION_Ha
180 if (GNUNET_YES != one_shot) 187 if (GNUNET_YES != one_shot)
181 { 188 {
182 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 189 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
183 "Address monitoring not implemented\n"); 190 "Address monitoring not implemented\n");
184 return NULL; 191 return NULL;
185 } 192 }
186 client = GNUNET_CLIENT_connect ("transport", cfg); 193 client = GNUNET_CLIENT_connect ("transport", cfg);
@@ -192,7 +199,7 @@ GNUNET_TRANSPORT_peer_get_active_addresses (const struct GNUNET_CONFIGURATION_Ha
192 msg.one_shot = htonl (one_shot); 199 msg.one_shot = htonl (one_shot);
193 msg.timeout = GNUNET_TIME_absolute_hton (abs_timeout); 200 msg.timeout = GNUNET_TIME_absolute_hton (abs_timeout);
194 if (peer == NULL) 201 if (peer == NULL)
195 memset (&msg.peer, 0 , sizeof (struct GNUNET_PeerIdentity)); 202 memset (&msg.peer, 0, sizeof (struct GNUNET_PeerIdentity));
196 else 203 else
197 msg.peer = *peer; 204 msg.peer = *peer;
198 pal_ctx = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PeerIterateContext)); 205 pal_ctx = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PeerIterateContext));
@@ -216,8 +223,8 @@ GNUNET_TRANSPORT_peer_get_active_addresses (const struct GNUNET_CONFIGURATION_Ha
216 */ 223 */
217void 224void
218GNUNET_TRANSPORT_peer_get_active_addresses_cancel (struct 225GNUNET_TRANSPORT_peer_get_active_addresses_cancel (struct
219 GNUNET_TRANSPORT_PeerIterateContext 226 GNUNET_TRANSPORT_PeerIterateContext
220 *alc) 227 *alc)
221{ 228{
222 GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO); 229 GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO);
223 GNUNET_free (alc); 230 GNUNET_free (alc);
diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c
index 5c44c288b..4d809530a 100644
--- a/src/transport/transport_api_address_to_string.c
+++ b/src/transport/transport_api_address_to_string.c
@@ -76,7 +76,7 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg)
76 return; 76 return;
77 } 77 }
78 GNUNET_break (ntohs (msg->type) == 78 GNUNET_break (ntohs (msg->type) ==
79 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY); 79 GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY);
80 size = ntohs (msg->size); 80 size = ntohs (msg->size);
81 if (size == sizeof (struct GNUNET_MessageHeader)) 81 if (size == sizeof (struct GNUNET_MessageHeader))
82 { 82 {
@@ -116,12 +116,13 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg)
116 * @return handle to cancel the operation, NULL on error 116 * @return handle to cancel the operation, NULL on error
117 */ 117 */
118struct GNUNET_TRANSPORT_AddressToStringContext * 118struct GNUNET_TRANSPORT_AddressToStringContext *
119GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cfg, 119GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle
120 const struct GNUNET_HELLO_Address *address, 120 *cfg,
121 int numeric, 121 const struct GNUNET_HELLO_Address *address,
122 struct GNUNET_TIME_Relative timeout, 122 int numeric,
123 GNUNET_TRANSPORT_AddressToStringCallback aluc, 123 struct GNUNET_TIME_Relative timeout,
124 void *aluc_cls) 124 GNUNET_TRANSPORT_AddressToStringCallback
125 aluc, void *aluc_cls)
125{ 126{
126 size_t len; 127 size_t len;
127 size_t alen; 128 size_t alen;
@@ -145,8 +146,7 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cf
145 if (client == NULL) 146 if (client == NULL)
146 return NULL; 147 return NULL;
147#if DEBUG_TRANSPORT 148#if DEBUG_TRANSPORT
148 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 149 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "GNUNET_TRANSPORT_address_to_string\n");
149 "GNUNET_TRANSPORT_address_to_string\n");
150#endif 150#endif
151 msg = GNUNET_malloc (len); 151 msg = GNUNET_malloc (len);
152 msg->header.size = htons (len); 152 msg->header.size = htons (len);
@@ -180,8 +180,8 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cf
180 */ 180 */
181void 181void
182GNUNET_TRANSPORT_address_to_string_cancel (struct 182GNUNET_TRANSPORT_address_to_string_cancel (struct
183 GNUNET_TRANSPORT_AddressToStringContext 183 GNUNET_TRANSPORT_AddressToStringContext
184 *alc) 184 *alc)
185{ 185{
186 GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO); 186 GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO);
187 GNUNET_free (alc); 187 GNUNET_free (alc);
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index ded410e3d..22901bf26 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -268,9 +268,9 @@ void
268GNUNET_abort () 268GNUNET_abort ()
269{ 269{
270#if WINDOWS 270#if WINDOWS
271 DebugBreak(); 271 DebugBreak ();
272#endif 272#endif
273 abort(); 273 abort ();
274} 274}
275 275
276 276
@@ -292,6 +292,7 @@ add_definition (char *component, char *file, char *function, int from_line,
292{ 292{
293 struct LogDef n; 293 struct LogDef n;
294 int r; 294 int r;
295
295 if (logdefs_size == logdefs_len) 296 if (logdefs_size == logdefs_len)
296 resize_logdefs (); 297 resize_logdefs ();
297 memset (&n, 0, sizeof (n)); 298 memset (&n, 0, sizeof (n));
@@ -299,27 +300,26 @@ add_definition (char *component, char *file, char *function, int from_line,
299 component = (char *) ".*"; 300 component = (char *) ".*";
300 r = regcomp (&n.component_regex, (const char *) component, REG_NOSUB); 301 r = regcomp (&n.component_regex, (const char *) component, REG_NOSUB);
301 if (r != 0) 302 if (r != 0)
302 { 303 {
303 return r; 304 return r;
304 } 305 }
305 if (strlen (file) == 0) 306 if (strlen (file) == 0)
306 file = (char *) ".*"; 307 file = (char *) ".*";
307 r = regcomp (&n.file_regex, (const char *) file, REG_NOSUB); 308 r = regcomp (&n.file_regex, (const char *) file, REG_NOSUB);
308 if (r != 0) 309 if (r != 0)
309 { 310 {
310 regfree (&n.component_regex); 311 regfree (&n.component_regex);
311 return r; 312 return r;
312 } 313 }
313 if ( (NULL == function) || 314 if ((NULL == function) || (strlen (function) == 0))
314 (strlen (function) == 0))
315 function = (char *) ".*"; 315 function = (char *) ".*";
316 r = regcomp (&n.function_regex, (const char *) function, REG_NOSUB); 316 r = regcomp (&n.function_regex, (const char *) function, REG_NOSUB);
317 if (r != 0) 317 if (r != 0)
318 { 318 {
319 regfree (&n.component_regex); 319 regfree (&n.component_regex);
320 regfree (&n.file_regex); 320 regfree (&n.file_regex);
321 return r; 321 return r;
322 } 322 }
323 n.from_line = from_line; 323 n.from_line = from_line;
324 n.to_line = to_line; 324 n.to_line = to_line;
325 n.level = level; 325 n.level = level;
@@ -364,16 +364,16 @@ GNUNET_get_log_call_status (int caller_level, const char *comp,
364 force_only = min_level >= 0; 364 force_only = min_level >= 0;
365 for (i = 0; i < logdefs_len; i++) 365 for (i = 0; i < logdefs_len; i++)
366 { 366 {
367 ld = &logdefs[i]; 367 ld = &logdefs[i];
368 if ((!force_only || ld->force) && 368 if ((!force_only || ld->force) &&
369 (line >= ld->from_line && line <= ld->to_line) && 369 (line >= ld->from_line && line <= ld->to_line) &&
370 (regexec (&ld->component_regex, comp, 0, NULL, 0) == 0) && 370 (regexec (&ld->component_regex, comp, 0, NULL, 0) == 0) &&
371 (regexec (&ld->file_regex, file, 0, NULL, 0) == 0) && 371 (regexec (&ld->file_regex, file, 0, NULL, 0) == 0) &&
372 (regexec (&ld->function_regex, function, 0, NULL, 0) == 0)) 372 (regexec (&ld->function_regex, function, 0, NULL, 0) == 0))
373 { 373 {
374 /* We're finished */ 374 /* We're finished */
375 return caller_level <= ld->level; 375 return caller_level <= ld->level;
376 } 376 }
377 } 377 }
378 /* No matches - use global level, if defined */ 378 /* No matches - use global level, if defined */
379 if (min_level >= 0) 379 if (min_level >= 0)
@@ -434,83 +434,83 @@ parse_definitions (const char *constname, int force)
434 to_line = INT_MAX; 434 to_line = INT_MAX;
435 for (p = def, state = 0, start = def; keep_looking; p++) 435 for (p = def, state = 0, start = def; keep_looking; p++)
436 { 436 {
437 switch (p[0]) 437 switch (p[0])
438 { 438 {
439 case ';': /* found a field separator */ 439 case ';': /* found a field separator */
440 p[0] = '\0'; 440 p[0] = '\0';
441 switch (state) 441 switch (state)
442 { 442 {
443 case 0: /* within a component name */ 443 case 0: /* within a component name */
444 comp = start; 444 comp = start;
445 break; 445 break;
446 case 1: /* within a file name */ 446 case 1: /* within a file name */
447 file = start; 447 file = start;
448 break; 448 break;
449 case 2: /* within a function name */ 449 case 2: /* within a function name */
450 /* after a file name there must be a function name */ 450 /* after a file name there must be a function name */
451 function = start; 451 function = start;
452 break; 452 break;
453 case 3: /* within a from-to line range */ 453 case 3: /* within a from-to line range */
454 if (strlen (start) > 0) 454 if (strlen (start) > 0)
455 { 455 {
456 errno = 0; 456 errno = 0;
457 from_line = strtol (start, &t, 10); 457 from_line = strtol (start, &t, 10);
458 if (errno != 0 || from_line < 0) 458 if (errno != 0 || from_line < 0)
459 { 459 {
460 free (def); 460 free (def);
461 return counter; 461 return counter;
462 } 462 }
463 if (t < p && t[0] == '-') 463 if (t < p && t[0] == '-')
464 { 464 {
465 errno = 0; 465 errno = 0;
466 start = t + 1; 466 start = t + 1;
467 to_line = strtol (start, &t, 10); 467 to_line = strtol (start, &t, 10);
468 if (errno != 0 || to_line < 0 || t != p) 468 if (errno != 0 || to_line < 0 || t != p)
469 { 469 {
470 free (def); 470 free (def);
471 return counter; 471 return counter;
472 } 472 }
473 } 473 }
474 else /* one number means "match this line only" */ 474 else /* one number means "match this line only" */
475 to_line = from_line; 475 to_line = from_line;
476 } 476 }
477 else /* default to 0-max */ 477 else /* default to 0-max */
478 { 478 {
479 from_line = 0; 479 from_line = 0;
480 to_line = INT_MAX; 480 to_line = INT_MAX;
481 } 481 }
482 break; 482 break;
483 } 483 }
484 start = p + 1; 484 start = p + 1;
485 state += 1; 485 state += 1;
486 break; 486 break;
487 case '\0': /* found EOL */ 487 case '\0': /* found EOL */
488 keep_looking = 0; 488 keep_looking = 0;
489 /* fall through to '/' */ 489 /* fall through to '/' */
490 case '/': /* found a definition separator */ 490 case '/': /* found a definition separator */
491 switch (state) 491 switch (state)
492 { 492 {
493 case 4: /* within a log level */ 493 case 4: /* within a log level */
494 p[0] = '\0'; 494 p[0] = '\0';
495 state = 0; 495 state = 0;
496 level = get_type ((const char *) start); 496 level = get_type ((const char *) start);
497 if (level == GNUNET_ERROR_TYPE_INVALID 497 if (level == GNUNET_ERROR_TYPE_INVALID ||
498 || level == GNUNET_ERROR_TYPE_UNSPECIFIED 498 level == GNUNET_ERROR_TYPE_UNSPECIFIED ||
499 || 0 != add_definition (comp, file, function, from_line, 499 0 != add_definition (comp, file, function, from_line, to_line,
500 to_line, level, force)) 500 level, force))
501 { 501 {
502 free (def); 502 free (def);
503 return counter; 503 return counter;
504 } 504 }
505 counter += 1; 505 counter += 1;
506 start = p + 1; 506 start = p + 1;
507 break; 507 break;
508 default: 508 default:
509 break; 509 break;
510 } 510 }
511 default: 511 default:
512 break; 512 break;
513 } 513 }
514 } 514 }
515 free (def); 515 free (def);
516 return counter; 516 return counter;
@@ -560,8 +560,7 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
560 component_nopid = GNUNET_strdup (comp); 560 component_nopid = GNUNET_strdup (comp);
561 561
562 env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); 562 env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
563 if ( (env_logfile != NULL) && 563 if ((env_logfile != NULL) && (strlen (env_logfile) > 0))
564 (strlen (env_logfile) > 0) )
565 logfile = env_logfile; 564 logfile = env_logfile;
566 565
567 if (logfile == NULL) 566 if (logfile == NULL)
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c
index a1485029e..ff20646f7 100644
--- a/src/util/crypto_random.c
+++ b/src/util/crypto_random.c
@@ -38,10 +38,10 @@
38/* The code is derived from glibc, obviously */ 38/* The code is derived from glibc, obviously */
39#if MINGW 39#if MINGW
40#ifdef RANDOM 40#ifdef RANDOM
41# undef RANDOM 41#undef RANDOM
42#endif 42#endif
43#ifdef SRANDOM 43#ifdef SRANDOM
44# undef SRANDOM 44#undef SRANDOM
45#endif 45#endif
46#define RANDOM() glibc_weak_rand32() 46#define RANDOM() glibc_weak_rand32()
47#define SRANDOM(s) glibc_weak_srand32(s) 47#define SRANDOM(s) glibc_weak_srand32(s)
@@ -57,6 +57,7 @@ int32_t
57glibc_weak_rand32 () 57glibc_weak_rand32 ()
58{ 58{
59 int32_t val = glibc_weak_rand32_state; 59 int32_t val = glibc_weak_rand32_state;
60
60 val = ((glibc_weak_rand32_state * 1103515245) + 12345) & 0x7fffffff; 61 val = ((glibc_weak_rand32_state * 1103515245) + 12345) & 0x7fffffff;
61 glibc_weak_rand32_state = val; 62 glibc_weak_rand32_state = val;
62 return val; 63 return val;
@@ -314,7 +315,8 @@ void __attribute__ ((constructor)) GNUNET_CRYPTO_random_init ()
314 gcry_set_progress_handler (&entropy_generator, NULL); 315 gcry_set_progress_handler (&entropy_generator, NULL);
315 atexit (&killfind); 316 atexit (&killfind);
316 GNUNET_CRYPTO_seed_weak_random (time (NULL) ^ 317 GNUNET_CRYPTO_seed_weak_random (time (NULL) ^
317 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX)); 318 GNUNET_CRYPTO_random_u32
319 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX));
318} 320}
319 321
320 322
diff --git a/src/util/getopt.c b/src/util/getopt.c
index 6c63cb339..08c133423 100644
--- a/src/util/getopt.c
+++ b/src/util/getopt.c
@@ -257,8 +257,8 @@ extern pid_t __libc_pid;
257/* Make sure the environment variable bash 2.0 puts in the environment 257/* Make sure the environment variable bash 2.0 puts in the environment
258 is valid for the getopt call we must make sure that the ARGV passed 258 is valid for the getopt call we must make sure that the ARGV passed
259 to getopt is that one passed to the process. */ 259 to getopt is that one passed to the process. */
260static void 260static void GNUNET_UNUSED
261 GNUNET_UNUSED store_args_and_env (int argc, char *const *argv) 261store_args_and_env (int argc, char *const *argv)
262{ 262{
263 /* XXX This is no good solution. We should rather copy the args so 263 /* XXX This is no good solution. We should rather copy the args so
264 * that we can compare them later. But we must not use malloc(3). */ 264 * that we can compare them later. But we must not use malloc(3). */
diff --git a/src/util/os_network.c b/src/util/os_network.c
index a4758496e..b25e9d00b 100644
--- a/src/util/os_network.c
+++ b/src/util/os_network.c
@@ -58,12 +58,13 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
58 58
59 for (i = 0; i < results_count; i++) 59 for (i = 0; i < results_count; i++)
60 { 60 {
61 if (GNUNET_OK != proc (proc_cls, results[i].pretty_name, 61 if (GNUNET_OK !=
62 results[i].is_default, 62 proc (proc_cls, results[i].pretty_name, results[i].is_default,
63 &results[i].address, 63 &results[i].address,
64 results[i].flags & ENUMNICS3_MASK_OK ? &results[i].mask : NULL, 64 results[i].flags & ENUMNICS3_MASK_OK ? &results[i].mask : NULL,
65 results[i].flags & ENUMNICS3_BCAST_OK ? &results[i].broadcast : NULL, 65 results[i].
66 results[i].addr_size)) 66 flags & ENUMNICS3_BCAST_OK ? &results[i].broadcast : NULL,
67 results[i].addr_size))
67 break; 68 break;
68 } 69 }
69 EnumNICs3_free (results); 70 EnumNICs3_free (results);
@@ -92,10 +93,8 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
92 if (GNUNET_OK != 93 if (GNUNET_OK !=
93 proc (proc_cls, ifa_ptr->ifa_name, 94 proc (proc_cls, ifa_ptr->ifa_name,
94 0 == strcmp (ifa_ptr->ifa_name, GNUNET_DEFAULT_INTERFACE), 95 0 == strcmp (ifa_ptr->ifa_name, GNUNET_DEFAULT_INTERFACE),
95 ifa_ptr->ifa_addr, 96 ifa_ptr->ifa_addr, ifa_ptr->ifa_broadaddr,
96 ifa_ptr->ifa_broadaddr, 97 ifa_ptr->ifa_netmask, alen))
97 ifa_ptr->ifa_netmask,
98 alen))
99 break; 98 break;
100 } 99 }
101 } 100 }
@@ -169,9 +168,7 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
169 proc (proc_cls, ifc, 0 == strcmp (ifc, GNUNET_DEFAULT_INTERFACE), 168 proc (proc_cls, ifc, 0 == strcmp (ifc, GNUNET_DEFAULT_INTERFACE),
170 (const struct sockaddr *) &a4, 169 (const struct sockaddr *) &a4,
171 /* TODO broadcast and netmask */ 170 /* TODO broadcast and netmask */
172 NULL, 171 NULL, NULL, sizeof (a4)))
173 NULL,
174 sizeof (a4)))
175 break; 172 break;
176 continue; 173 continue;
177 } 174 }
@@ -188,9 +185,7 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
188 proc (proc_cls, ifc, 0 == strcmp (ifc, GNUNET_DEFAULT_INTERFACE), 185 proc (proc_cls, ifc, 0 == strcmp (ifc, GNUNET_DEFAULT_INTERFACE),
189 (const struct sockaddr *) &a6, 186 (const struct sockaddr *) &a6,
190 /* TODO broadcast and netmask */ 187 /* TODO broadcast and netmask */
191 NULL, 188 NULL, NULL, sizeof (a6)))
192 NULL,
193 sizeof (a6)))
194 break; 189 break;
195 continue; 190 continue;
196 } 191 }
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index d4a11fc8a..1acc9a6d6 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -676,7 +676,7 @@ run_ready (struct GNUNET_NETWORK_FDSet *rs, struct GNUNET_NETWORK_FDSet *ws)
676 if (((tc.reason & GNUNET_SCHEDULER_REASON_WRITE_READY) != 0) && 676 if (((tc.reason & GNUNET_SCHEDULER_REASON_WRITE_READY) != 0) &&
677 (pos->write_fd != -1) && 677 (pos->write_fd != -1) &&
678 (!GNUNET_NETWORK_fdset_test_native (ws, pos->write_fd))) 678 (!GNUNET_NETWORK_fdset_test_native (ws, pos->write_fd)))
679 GNUNET_abort (); // added to ready in previous select loop! 679 GNUNET_abort (); // added to ready in previous select loop!
680#if DEBUG_TASKS 680#if DEBUG_TASKS
681 LOG (GNUNET_ERROR_TYPE_DEBUG, "Running task: %llu / %p\n", pos->id, 681 LOG (GNUNET_ERROR_TYPE_DEBUG, "Running task: %llu / %p\n", pos->id,
682 pos->callback_cls); 682 pos->callback_cls);
@@ -726,9 +726,9 @@ sighandler_shutdown ()
726 static char c; 726 static char c;
727 int old_errno = errno; /* backup errno */ 727 int old_errno = errno; /* backup errno */
728 728
729 if (getpid() != my_pid) 729 if (getpid () != my_pid)
730 exit(1); /* we have fork'ed since the signal handler was created, 730 exit (1); /* we have fork'ed since the signal handler was created,
731 ignore the signal, see https://gnunet.org/vfork discussion */ 731 * ignore the signal, see https://gnunet.org/vfork discussion */
732 GNUNET_DISK_file_write (GNUNET_DISK_pipe_handle 732 GNUNET_DISK_file_write (GNUNET_DISK_pipe_handle
733 (shutdown_pipe_handle, GNUNET_DISK_PIPE_END_WRITE), 733 (shutdown_pipe_handle, GNUNET_DISK_PIPE_END_WRITE),
734 &c, sizeof (c)); 734 &c, sizeof (c));
diff --git a/src/util/service.c b/src/util/service.c
index b5711972b..91fc460e2 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -1566,12 +1566,12 @@ GNUNET_SERVICE_run (int argc, char *const *argv, const char *serviceName,
1566 LOG (GNUNET_ERROR_TYPE_DEBUG, 1566 LOG (GNUNET_ERROR_TYPE_DEBUG,
1567 "Service `%s' runs with configuration from `%s'\n", serviceName, cfg_fn); 1567 "Service `%s' runs with configuration from `%s'\n", serviceName, cfg_fn);
1568#endif 1568#endif
1569 if ( (GNUNET_OK == 1569 if ((GNUNET_OK ==
1570 GNUNET_CONFIGURATION_get_value_number (sctx.cfg, "TESTING", "SKEW_OFFSET", 1570 GNUNET_CONFIGURATION_get_value_number (sctx.cfg, "TESTING",
1571 &skew_offset)) && 1571 "SKEW_OFFSET", &skew_offset)) &&
1572 (GNUNET_OK == 1572 (GNUNET_OK ==
1573 GNUNET_CONFIGURATION_get_value_number (sctx.cfg, "TESTING", 1573 GNUNET_CONFIGURATION_get_value_number (sctx.cfg, "TESTING",
1574 "SKEW_VARIANCE", &skew_variance)) ) 1574 "SKEW_VARIANCE", &skew_variance)))
1575 { 1575 {
1576 clock_offset = skew_offset - skew_variance; 1576 clock_offset = skew_offset - skew_variance;
1577 GNUNET_TIME_set_offset (clock_offset); 1577 GNUNET_TIME_set_offset (clock_offset);
diff --git a/src/util/strings.c b/src/util/strings.c
index 58a4847bc..2b5538b35 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -237,7 +237,7 @@ GNUNET_STRINGS_fancy_size_to_bytes (const char *fancy_size,
237 last = 0; 237 last = 0;
238 if (1 != sscanf (tok, "%llu", &last)) 238 if (1 != sscanf (tok, "%llu", &last))
239 { 239 {
240 GNUNET_free (in); 240 GNUNET_free (in);
241 return GNUNET_SYSERR; /* expected number */ 241 return GNUNET_SYSERR; /* expected number */
242 } 242 }
243 } 243 }
@@ -316,7 +316,7 @@ GNUNET_STRINGS_fancy_time_to_relative (const char *fancy_size,
316 last = 0; 316 last = 0;
317 if (1 != sscanf (tok, "%llu", &last)) 317 if (1 != sscanf (tok, "%llu", &last))
318 { 318 {
319 GNUNET_free (in); 319 GNUNET_free (in);
320 return GNUNET_SYSERR; /* expected number */ 320 return GNUNET_SYSERR; /* expected number */
321 } 321 }
322 } 322 }
diff --git a/src/util/test_bio.c b/src/util/test_bio.c
index 19f78b6b7..9b18258fb 100644
--- a/src/util/test_bio.c
+++ b/src/util/test_bio.c
@@ -195,7 +195,7 @@ test_bigmeta_rw ()
195static int 195static int
196test_directory_r () 196test_directory_r ()
197{ 197{
198#if LINUX 198#if LINUX
199 char *msg; 199 char *msg;
200 char readResult[200]; 200 char readResult[200];
201 struct GNUNET_BIO_ReadHandle *fileR; 201 struct GNUNET_BIO_ReadHandle *fileR;
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c
index 79b888c56..9b5b1228a 100644
--- a/src/util/test_common_logging_runtime_loglevels.c
+++ b/src/util/test_common_logging_runtime_loglevels.c
@@ -314,14 +314,13 @@ runone ()
314 break; 314 break;
315 } 315 }
316 316
317 proc = 317 proc = GNUNET_OS_start_process (NULL, pipe_stdout,
318 GNUNET_OS_start_process (NULL, pipe_stdout,
319#if MINGW 318#if MINGW
320 "test_common_logging_dummy", 319 "test_common_logging_dummy",
321#else 320#else
322 "./test_common_logging_dummy", 321 "./test_common_logging_dummy",
323#endif 322#endif
324 "test_common_logging_dummy", NULL); 323 "test_common_logging_dummy", NULL);
325 putenv ("GNUNET_FORCE_LOG="); 324 putenv ("GNUNET_FORCE_LOG=");
326 putenv ("GNUNET_LOG="); 325 putenv ("GNUNET_LOG=");
327 326
diff --git a/src/util/test_os_network.c b/src/util/test_os_network.c
index ab39e5eda..423e66f63 100644
--- a/src/util/test_os_network.c
+++ b/src/util/test_os_network.c
@@ -34,11 +34,8 @@
34 * (success). 34 * (success).
35 */ 35 */
36static int 36static int
37proc (void *cls, const char *name, 37proc (void *cls, const char *name, int isDefault, const struct sockaddr *addr,
38 int isDefault, 38 const struct sockaddr *broadcast_addr, const struct sockaddr *netmask,
39 const struct sockaddr * addr,
40 const struct sockaddr * broadcast_addr,
41 const struct sockaddr * netmask,
42 socklen_t addrlen) 39 socklen_t addrlen)
43{ 40{
44 int *ok = cls; 41 int *ok = cls;
diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c
index e7d904120..2e8061024 100644
--- a/src/vpn/gnunet-daemon-exit.c
+++ b/src/vpn/gnunet-daemon-exit.c
@@ -170,8 +170,8 @@ struct tunnel_state
170 * Function that frees everything from a hashmap 170 * Function that frees everything from a hashmap
171 */ 171 */
172static int 172static int
173free_iterate (void *cls GNUNET_UNUSED, const GNUNET_HashCode * hash 173free_iterate (void *cls GNUNET_UNUSED,
174 GNUNET_UNUSED, void *value) 174 const GNUNET_HashCode * hash GNUNET_UNUSED, void *value)
175{ 175{
176 GNUNET_free (value); 176 GNUNET_free (value);
177 return GNUNET_YES; 177 return GNUNET_YES;
@@ -181,8 +181,7 @@ free_iterate (void *cls GNUNET_UNUSED, const GNUNET_HashCode * hash
181 * Function scheduled as very last function, cleans up after us 181 * Function scheduled as very last function, cleans up after us
182 */ 182 */
183static void 183static void
184cleanup (void *cls 184cleanup (void *cls GNUNET_UNUSED,
185 GNUNET_UNUSED,
186 const struct GNUNET_SCHEDULER_TaskContext *tskctx) 185 const struct GNUNET_SCHEDULER_TaskContext *tskctx)
187{ 186{
188 GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); 187 GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
@@ -199,11 +198,9 @@ cleanup (void *cls
199} 198}
200 199
201static void * 200static void *
202new_tunnel (void *cls 201new_tunnel (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
203 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, 202 const struct GNUNET_PeerIdentity *initiator GNUNET_UNUSED,
204 const struct GNUNET_PeerIdentity *initiator 203 const struct GNUNET_ATS_Information *ats GNUNET_UNUSED)
205 GNUNET_UNUSED, const struct GNUNET_ATS_Information *ats
206 GNUNET_UNUSED)
207{ 204{
208 struct tunnel_state *s = GNUNET_malloc (sizeof *s); 205 struct tunnel_state *s = GNUNET_malloc (sizeof *s);
209 206
@@ -214,8 +211,7 @@ new_tunnel (void *cls
214} 211}
215 212
216static void 213static void
217clean_tunnel (void *cls 214clean_tunnel (void *cls GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
218 GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
219 void *tunnel_ctx) 215 void *tunnel_ctx)
220{ 216{
221 GNUNET_free (tunnel_ctx); 217 GNUNET_free (tunnel_ctx);
@@ -531,8 +527,7 @@ tcp_from_helper (struct tcp_pkt *tcp, unsigned char *dadr, size_t addrlen,
531 * Receive packets from the helper-process 527 * Receive packets from the helper-process
532 */ 528 */
533static void 529static void
534message_token (void *cls GNUNET_UNUSED, void *client 530message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
535 GNUNET_UNUSED,
536 const struct GNUNET_MessageHeader *message) 531 const struct GNUNET_MessageHeader *message)
537{ 532{
538 GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); 533 GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER);
@@ -1038,15 +1033,11 @@ prepare_ipv6_packet (size_t len, uint16_t pktlen, void *payload,
1038 * The messages are one GNUNET_HashCode for the service followed by a struct tcp_pkt 1033 * The messages are one GNUNET_HashCode for the service followed by a struct tcp_pkt
1039 */ 1034 */
1040static int 1035static int
1041receive_tcp_service (void *cls 1036receive_tcp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
1042 GNUNET_UNUSED, 1037 void **tunnel_ctx GNUNET_UNUSED,
1043 struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx 1038 const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED,
1044 GNUNET_UNUSED,
1045 const struct GNUNET_PeerIdentity *sender
1046 GNUNET_UNUSED,
1047 const struct GNUNET_MessageHeader *message, 1039 const struct GNUNET_MessageHeader *message,
1048 const struct GNUNET_ATS_Information *atsi 1040 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
1049 GNUNET_UNUSED)
1050{ 1041{
1051 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); 1042 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n");
1052 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); 1043 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
@@ -1144,15 +1135,11 @@ receive_tcp_service (void *cls
1144} 1135}
1145 1136
1146static int 1137static int
1147receive_tcp_remote (void *cls 1138receive_tcp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
1148 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, 1139 void **tunnel_ctx GNUNET_UNUSED,
1149 void **tunnel_ctx 1140 const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED,
1150 GNUNET_UNUSED,
1151 const struct GNUNET_PeerIdentity *sender
1152 GNUNET_UNUSED,
1153 const struct GNUNET_MessageHeader *message, 1141 const struct GNUNET_MessageHeader *message,
1154 const struct GNUNET_ATS_Information *atsi 1142 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
1155 GNUNET_UNUSED)
1156{ 1143{
1157 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); 1144 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
1158 struct tcp_pkt *pkt = (struct tcp_pkt *) (desc + 1); 1145 struct tcp_pkt *pkt = (struct tcp_pkt *) (desc + 1);
@@ -1220,15 +1207,11 @@ receive_tcp_remote (void *cls
1220} 1207}
1221 1208
1222static int 1209static int
1223receive_udp_remote (void *cls 1210receive_udp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
1224 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, 1211 void **tunnel_ctx GNUNET_UNUSED,
1225 void **tunnel_ctx 1212 const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED,
1226 GNUNET_UNUSED,
1227 const struct GNUNET_PeerIdentity *sender
1228 GNUNET_UNUSED,
1229 const struct GNUNET_MessageHeader *message, 1213 const struct GNUNET_MessageHeader *message,
1230 const struct GNUNET_ATS_Information *atsi 1214 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
1231 GNUNET_UNUSED)
1232{ 1215{
1233 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); 1216 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
1234 struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); 1217 struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
@@ -1300,14 +1283,11 @@ receive_udp_remote (void *cls
1300 * The messages are one GNUNET_HashCode for the service, followed by a struct udp_pkt 1283 * The messages are one GNUNET_HashCode for the service, followed by a struct udp_pkt
1301 */ 1284 */
1302static int 1285static int
1303receive_udp_service (void *cls 1286receive_udp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
1304 GNUNET_UNUSED, 1287 void **tunnel_ctx,
1305 struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, 1288 const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED,
1306 const struct GNUNET_PeerIdentity *sender
1307 GNUNET_UNUSED,
1308 const struct GNUNET_MessageHeader *message, 1289 const struct GNUNET_MessageHeader *message,
1309 const struct GNUNET_ATS_Information *atsi 1290 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
1310 GNUNET_UNUSED)
1311{ 1291{
1312 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); 1292 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
1313 struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); 1293 struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
@@ -1463,8 +1443,9 @@ connect_to_mesh ()
1463 * @param cfg_ configuration 1443 * @param cfg_ configuration
1464 */ 1444 */
1465static void 1445static void
1466run (void *cls, char *const *args GNUNET_UNUSED, const char *cfgfile 1446run (void *cls, char *const *args GNUNET_UNUSED,
1467 GNUNET_UNUSED, const struct GNUNET_CONFIGURATION_Handle *cfg_) 1447 const char *cfgfile GNUNET_UNUSED,
1448 const struct GNUNET_CONFIGURATION_Handle *cfg_)
1468{ 1449{
1469 cfg = cfg_; 1450 cfg = cfg_;
1470 1451
diff --git a/src/vpn/gnunet-daemon-vpn-dns.c b/src/vpn/gnunet-daemon-vpn-dns.c
index 0e4c88a29..bd65e373f 100644
--- a/src/vpn/gnunet-daemon-vpn-dns.c
+++ b/src/vpn/gnunet-daemon-vpn-dns.c
@@ -127,8 +127,7 @@ send_query (void *cls GNUNET_UNUSED, size_t size, void *buf)
127 * Connect to the service-dns 127 * Connect to the service-dns
128 */ 128 */
129void 129void
130connect_to_service_dns (void *cls 130connect_to_service_dns (void *cls GNUNET_UNUSED,
131 GNUNET_UNUSED,
132 const struct GNUNET_SCHEDULER_TaskContext *tc) 131 const struct GNUNET_SCHEDULER_TaskContext *tc)
133{ 132{
134 conn_task = GNUNET_SCHEDULER_NO_TASK; 133 conn_task = GNUNET_SCHEDULER_NO_TASK;
@@ -169,8 +168,7 @@ connect_to_service_dns (void *cls
169 * handle it 168 * handle it
170 */ 169 */
171void 170void
172dns_answer_handler (void *cls 171dns_answer_handler (void *cls GNUNET_UNUSED,
173 GNUNET_UNUSED,
174 const struct GNUNET_MessageHeader *msg) 172 const struct GNUNET_MessageHeader *msg)
175{ 173{
176 /* the service disconnected, reconnect after short wait */ 174 /* the service disconnected, reconnect after short wait */
diff --git a/src/vpn/gnunet-daemon-vpn-helper.c b/src/vpn/gnunet-daemon-vpn-helper.c
index 1ffb0f7d8..41910a701 100644
--- a/src/vpn/gnunet-daemon-vpn-helper.c
+++ b/src/vpn/gnunet-daemon-vpn-helper.c
@@ -168,8 +168,7 @@ initialize_tunnel_state (int addrlen, struct GNUNET_MESH_TransmitHandle *th)
168 * Send an dns-answer-packet to the helper 168 * Send an dns-answer-packet to the helper
169 */ 169 */
170void 170void
171helper_write (void *cls 171helper_write (void *cls GNUNET_UNUSED,
172 GNUNET_UNUSED,
173 const struct GNUNET_SCHEDULER_TaskContext *tsdkctx) 172 const struct GNUNET_SCHEDULER_TaskContext *tsdkctx)
174{ 173{
175 if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) 174 if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)
@@ -297,7 +296,7 @@ helper_write (void *cls
297 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Wrong addrlen = %d\n", 296 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Wrong addrlen = %d\n",
298 ans->pkt.addrlen); 297 ans->pkt.addrlen);
299 GNUNET_assert (0); 298 GNUNET_assert (0);
300 return; /* convince compiler that we're done here */ 299 return; /* convince compiler that we're done here */
301 } 300 }
302 301
303 GNUNET_CONTAINER_DLL_remove (answer_proc_head, answer_proc_tail, ans); 302 GNUNET_CONTAINER_DLL_remove (answer_proc_head, answer_proc_tail, ans);
@@ -321,8 +320,7 @@ helper_write (void *cls
321 * Receive packets from the helper-process 320 * Receive packets from the helper-process
322 */ 321 */
323void 322void
324message_token (void *cls GNUNET_UNUSED, void *client 323message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
325 GNUNET_UNUSED,
326 const struct GNUNET_MessageHeader *message) 324 const struct GNUNET_MessageHeader *message)
327{ 325{
328 GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); 326 GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER);
@@ -402,7 +400,7 @@ message_token (void *cls GNUNET_UNUSED, void *client
402 htons (sizeof (struct GNUNET_MessageHeader) + 400 htons (sizeof (struct GNUNET_MessageHeader) +
403 sizeof (GNUNET_HashCode) + ntohs (pkt6->ip6_hdr.paylgth)); 401 sizeof (GNUNET_HashCode) + ntohs (pkt6->ip6_hdr.paylgth));
404 402
405 GNUNET_MESH_ApplicationType app_type = 0; /* fix compiler uninitialized warning... */ 403 GNUNET_MESH_ApplicationType app_type = 0; /* fix compiler uninitialized warning... */
406 404
407 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "me->addrlen is %d\n", 405 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "me->addrlen is %d\n",
408 me->addrlen); 406 me->addrlen);
diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c
index 376d3574e..6b65b709e 100644
--- a/src/vpn/gnunet-daemon-vpn.c
+++ b/src/vpn/gnunet-daemon-vpn.c
@@ -78,8 +78,7 @@ GNUNET_SCHEDULER_TaskIdentifier shs_task;
78 *{{{ 78 *{{{
79 */ 79 */
80static void 80static void
81cleanup (void *cls 81cleanup (void *cls GNUNET_UNUSED,
82 GNUNET_UNUSED,
83 const struct GNUNET_SCHEDULER_TaskContext *tskctx) 82 const struct GNUNET_SCHEDULER_TaskContext *tskctx)
84{ 83{
85 GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); 84 GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
@@ -168,8 +167,7 @@ address4_mapping_exists (uint32_t addr)
168} 167}
169 168
170static void 169static void
171collect_mappings (void *cls 170collect_mappings (void *cls GNUNET_UNUSED,
172 GNUNET_UNUSED,
173 const struct GNUNET_SCHEDULER_TaskContext *tc) 171 const struct GNUNET_SCHEDULER_TaskContext *tc)
174{ 172{
175 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 173 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
@@ -335,8 +333,7 @@ port_in_ports (uint64_t ports, uint16_t port)
335 333
336void 334void
337send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer, 335send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
338 const struct GNUNET_ATS_Information *atsi 336 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
339 GNUNET_UNUSED)
340{ 337{
341 /* peer == NULL means that all peers in this request are connected */ 338 /* peer == NULL means that all peers in this request are connected */
342 if (peer == NULL) 339 if (peer == NULL)
@@ -856,12 +853,10 @@ add_additional_port (struct map_entry *me, uint16_t port)
856} 853}
857 854
858static int 855static int
859receive_udp_back (void *cls 856receive_udp_back (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
860 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
861 void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender, 857 void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender,
862 const struct GNUNET_MessageHeader *message, 858 const struct GNUNET_MessageHeader *message,
863 const struct GNUNET_ATS_Information *atsi 859 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
864 GNUNET_UNUSED)
865{ 860{
866 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); 861 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
867 struct remote_addr *s = (struct remote_addr *) desc; 862 struct remote_addr *s = (struct remote_addr *) desc;
@@ -1033,13 +1028,11 @@ receive_udp_back (void *cls
1033} 1028}
1034 1029
1035static int 1030static int
1036receive_tcp_back (void *cls 1031receive_tcp_back (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
1037 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, 1032 void **tunnel_ctx,
1038 void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender 1033 const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED,
1039 GNUNET_UNUSED,
1040 const struct GNUNET_MessageHeader *message, 1034 const struct GNUNET_MessageHeader *message,
1041 const struct GNUNET_ATS_Information *atsi 1035 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
1042 GNUNET_UNUSED)
1043{ 1036{
1044 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); 1037 GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
1045 struct remote_addr *s = (struct remote_addr *) desc; 1038 struct remote_addr *s = (struct remote_addr *) desc;
@@ -1245,8 +1238,9 @@ cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, void *tunnel_ctx)
1245 * @param cfg_ configuration 1238 * @param cfg_ configuration
1246 */ 1239 */
1247static void 1240static void
1248run (void *cls, char *const *args GNUNET_UNUSED, const char *cfgfile 1241run (void *cls, char *const *args GNUNET_UNUSED,
1249 GNUNET_UNUSED, const struct GNUNET_CONFIGURATION_Handle *cfg_) 1242 const char *cfgfile GNUNET_UNUSED,
1243 const struct GNUNET_CONFIGURATION_Handle *cfg_)
1250{ 1244{
1251 static const struct GNUNET_MESH_MessageHandler handlers[] = { 1245 static const struct GNUNET_MESH_MessageHandler handlers[] = {
1252 {receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK, 0}, 1246 {receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK, 0},
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c
index e44405a8e..6ef621c26 100644
--- a/src/vpn/gnunet-service-dns.c
+++ b/src/vpn/gnunet-service-dns.c
@@ -167,8 +167,7 @@ client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
167 * Hijack all outgoing DNS-Traffic but for traffic leaving "our" port. 167 * Hijack all outgoing DNS-Traffic but for traffic leaving "our" port.
168 */ 168 */
169static void 169static void
170hijack (void *cls 170hijack (void *cls GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc)
171 GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc)
172{ 171{
173 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 172 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
174 return; 173 return;
@@ -207,11 +206,9 @@ hijack (void *cls
207} 206}
208 207
209static void * 208static void *
210new_tunnel (void *cls 209new_tunnel (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
211 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, 210 const struct GNUNET_PeerIdentity *initiator GNUNET_UNUSED,
212 const struct GNUNET_PeerIdentity *initiator 211 const struct GNUNET_ATS_Information *ats GNUNET_UNUSED)
213 GNUNET_UNUSED, const struct GNUNET_ATS_Information *ats
214 GNUNET_UNUSED)
215{ 212{
216 struct tunnel_state *s = GNUNET_malloc (sizeof *s); 213 struct tunnel_state *s = GNUNET_malloc (sizeof *s);
217 214
@@ -222,8 +219,7 @@ new_tunnel (void *cls
222} 219}
223 220
224static void 221static void
225clean_tunnel (void *cls 222clean_tunnel (void *cls GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
226 GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
227 void *tunnel_ctx) 223 void *tunnel_ctx)
228{ 224{
229 GNUNET_free (tunnel_ctx); 225 GNUNET_free (tunnel_ctx);
@@ -386,8 +382,7 @@ mesh_send (void *cls, size_t size, void *buf)
386 382
387void 383void
388mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 384mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
389 const struct GNUNET_ATS_Information *atsi 385 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
390 GNUNET_UNUSED)
391{ 386{
392 if (NULL == peer) 387 if (NULL == peer)
393 return; 388 return;
@@ -447,15 +442,11 @@ send_mesh_query (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
447} 442}
448 443
449static int 444static int
450receive_mesh_query (void *cls 445receive_mesh_query (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
451 GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, 446 void **ctx GNUNET_UNUSED,
452 void **ctx 447 const struct GNUNET_PeerIdentity *sender GNUNET_UNUSED,
453 GNUNET_UNUSED,
454 const struct GNUNET_PeerIdentity *sender
455 GNUNET_UNUSED,
456 const struct GNUNET_MessageHeader *message, 448 const struct GNUNET_MessageHeader *message,
457 const struct GNUNET_ATS_Information *atsi 449 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
458 GNUNET_UNUSED)
459{ 450{
460 struct dns_pkt *dns = (struct dns_pkt *) (message + 1); 451 struct dns_pkt *dns = (struct dns_pkt *) (message + 1);
461 452
@@ -500,14 +491,11 @@ receive_mesh_query (void *cls
500} 491}
501 492
502static int 493static int
503receive_mesh_answer (void *cls 494receive_mesh_answer (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
504 GNUNET_UNUSED, 495 void **ctx GNUNET_UNUSED,
505 struct GNUNET_MESH_Tunnel *tunnel, void **ctx
506 GNUNET_UNUSED,
507 const struct GNUNET_PeerIdentity *sender, 496 const struct GNUNET_PeerIdentity *sender,
508 const struct GNUNET_MessageHeader *message, 497 const struct GNUNET_MessageHeader *message,
509 const struct GNUNET_ATS_Information *atsi 498 const struct GNUNET_ATS_Information *atsi GNUNET_UNUSED)
510 GNUNET_UNUSED)
511{ 499{
512 /* TODo: size check */ 500 /* TODo: size check */
513 struct dns_pkt *dns = (struct dns_pkt *) (message + 1); 501 struct dns_pkt *dns = (struct dns_pkt *) (message + 1);
@@ -749,16 +737,13 @@ send_rev_query (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
749 * Receive a block from the dht. 737 * Receive a block from the dht.
750 */ 738 */
751static void 739static void
752receive_dht (void *cls, struct GNUNET_TIME_Absolute exp 740receive_dht (void *cls, struct GNUNET_TIME_Absolute exp GNUNET_UNUSED,
753 GNUNET_UNUSED, const GNUNET_HashCode * key 741 const GNUNET_HashCode * key GNUNET_UNUSED,
754 GNUNET_UNUSED, 742 const struct GNUNET_PeerIdentity *get_path GNUNET_UNUSED,
755 const struct GNUNET_PeerIdentity *get_path 743 unsigned int get_path_length GNUNET_UNUSED,
756 GNUNET_UNUSED, unsigned int get_path_length 744 const struct GNUNET_PeerIdentity *put_path GNUNET_UNUSED,
757 GNUNET_UNUSED, 745 unsigned int put_path_length GNUNET_UNUSED,
758 const struct GNUNET_PeerIdentity *put_path 746 enum GNUNET_BLOCK_Type type, size_t size, const void *data)
759 GNUNET_UNUSED, unsigned int put_path_length
760 GNUNET_UNUSED, enum GNUNET_BLOCK_Type type, size_t size,
761 const void *data)
762{ 747{
763 748
764 unsigned short id = ((struct receive_dht_cls *) cls)->id; 749 unsigned short id = ((struct receive_dht_cls *) cls)->id;
@@ -868,8 +853,7 @@ receive_dht (void *cls, struct GNUNET_TIME_Absolute exp
868 * This receives a GNUNET_MESSAGE_TYPE_REHIJACK and rehijacks the DNS 853 * This receives a GNUNET_MESSAGE_TYPE_REHIJACK and rehijacks the DNS
869 */ 854 */
870static void 855static void
871rehijack (void *cls 856rehijack (void *cls GNUNET_UNUSED, struct GNUNET_SERVER_Client *client,
872 GNUNET_UNUSED, struct GNUNET_SERVER_Client *client,
873 const struct GNUNET_MessageHeader *message GNUNET_UNUSED) 857 const struct GNUNET_MessageHeader *message GNUNET_UNUSED)
874{ 858{
875 unhijack (dnsoutport); 859 unhijack (dnsoutport);
@@ -882,8 +866,7 @@ rehijack (void *cls
882 * This receives the dns-payload from the daemon-vpn and sends it on over the udp-socket 866 * This receives the dns-payload from the daemon-vpn and sends it on over the udp-socket
883 */ 867 */
884static void 868static void
885receive_query (void *cls 869receive_query (void *cls GNUNET_UNUSED, struct GNUNET_SERVER_Client *client,
886 GNUNET_UNUSED, struct GNUNET_SERVER_Client *client,
887 const struct GNUNET_MessageHeader *message) 870 const struct GNUNET_MessageHeader *message)
888{ 871{
889 struct query_packet *pkt = (struct query_packet *) message; 872 struct query_packet *pkt = (struct query_packet *) message;
@@ -1231,8 +1214,7 @@ handle_response (struct dns_pkt *dns, struct sockaddr *addr, socklen_t addrlen,
1231 * Read a response-packet of the UDP-Socket 1214 * Read a response-packet of the UDP-Socket
1232 */ 1215 */
1233static void 1216static void
1234read_response6 (void *cls 1217read_response6 (void *cls GNUNET_UNUSED,
1235 GNUNET_UNUSED,
1236 const struct GNUNET_SCHEDULER_TaskContext *tc) 1218 const struct GNUNET_SCHEDULER_TaskContext *tc)
1237{ 1219{
1238 struct sockaddr_in6 addr; 1220 struct sockaddr_in6 addr;
@@ -1281,8 +1263,7 @@ read_response6 (void *cls
1281 * Read a response-packet of the UDP-Socket 1263 * Read a response-packet of the UDP-Socket
1282 */ 1264 */
1283static void 1265static void
1284read_response (void *cls 1266read_response (void *cls GNUNET_UNUSED,
1285 GNUNET_UNUSED,
1286 const struct GNUNET_SCHEDULER_TaskContext *tc) 1267 const struct GNUNET_SCHEDULER_TaskContext *tc)
1287{ 1268{
1288 struct sockaddr_in addr; 1269 struct sockaddr_in addr;
@@ -1438,8 +1419,7 @@ handle_response (struct dns_pkt *dns, struct sockaddr *addr, socklen_t addrlen,
1438 * @param tc unused 1419 * @param tc unused
1439 */ 1420 */
1440static void 1421static void
1441cleanup_task (void *cls 1422cleanup_task (void *cls GNUNET_UNUSED,
1442 GNUNET_UNUSED,
1443 const struct GNUNET_SCHEDULER_TaskContext *tc) 1423 const struct GNUNET_SCHEDULER_TaskContext *tc)
1444{ 1424{
1445 GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); 1425 GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
@@ -1665,8 +1645,7 @@ publish_iterate (void *cls GNUNET_UNUSED, const char *section)
1665 * Publish a DNS-record in the DHT. 1645 * Publish a DNS-record in the DHT.
1666 */ 1646 */
1667static void 1647static void
1668publish_names (void *cls 1648publish_names (void *cls GNUNET_UNUSED,
1669 GNUNET_UNUSED,
1670 const struct GNUNET_SCHEDULER_TaskContext *tc) 1649 const struct GNUNET_SCHEDULER_TaskContext *tc)
1671{ 1650{
1672 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 1651 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))