gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit f2d31fb82a314dcf6819dd494ff4a11e4f871c4e
parent 9f5ea1f7f809d73cbeb7ce5538550c42e978d340
Author: Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>
Date:   Mon,  8 Jan 2018 10:49:06 +0100

Merge remote-tracking branch 'origin/master' into identity_oidc

Diffstat:
A.mailmap | 26++++++++++++++++++++++++++
MAUTHORS | 2++
DDockerfile | 63---------------------------------------------------------------
MMakefile.am | 3++-
MREADME | 9+++++++--
AREADME.1st | 255+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mconfigure.ac | 17++++++++++-------
Acontrib/Dockerfile | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdocker-entrypoint.sh -> contrib/docker-entrypoint.sh | 0
Mcontrib/packages/guix/README | 47++++++++++++++++++++++++++++++++++++-----------
Mcontrib/packages/guix/gnunet-doc.scm | 2+-
Mcontrib/packages/guix/gnunet.scm | 2+-
Mcontrib/packages/guix/guix-env.scm | 2+-
Mdoc/Makefile.am | 4+---
Adoc/documentation/.gitignore | 2++
Mdoc/documentation/Makefile.am | 79++++++++++++++++++++++++++++++++++++++++---------------------------------------
Mdoc/documentation/README.txt | 46+++++-----------------------------------------
Mdoc/documentation/chapters/contributing.texi | 14+-------------
Mdoc/documentation/chapters/developer.texi | 22++++++++++------------
Mdoc/documentation/chapters/installation.texi | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
Mdoc/documentation/chapters/philosophy.texi | 137+++++++++++++++++++++++++++++++++++++++++--------------------------------------
Mdoc/documentation/chapters/user.texi | 6+++++-
Mdoc/documentation/gnunet-c-tutorial.texi | 2++
Mdoc/documentation/gnunet.texi | 27++++++++++++++++-----------
Mdoc/documentation/index.html | 14++++++++------
Mdoc/doxygen/Makefile.am | 3+++
Mpo/POTFILES.in | 122++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mpo/de.po | 1732+++++++++++++++++++++++++++++++++++++------------------------------------------
Mpo/es.po | 1748+++++++++++++++++++++++++++++++++++++------------------------------------------
Mpo/fr.po | 1611+++++++++++++++++++++++++++++++++++++------------------------------------------
Mpo/sv.po | 1708++++++++++++++++++++++++++++++++++++-------------------------------------------
Mpo/vi.po | 1694++++++++++++++++++++++++++++++++++++-------------------------------------------
Mpo/zh_CN.po | 1612++++++++++++++++++++++++++++++++++++-------------------------------------------
Msrc/Makefile.am | 16++++++----------
Asrc/abe/Makefile.am | 47+++++++++++++++++++++++++++++++++++++++++++++++
Asrc/abe/abe.c | 499+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/abe/test_cpabe.c | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/arm/gnunet-service-arm.c | 3+--
Msrc/auction/Makefile.am | 5+++++
Msrc/cadet/cadet_api.c | 127+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
Msrc/cadet/cadet_test_lib.c | 1+
Msrc/cadet/gnunet-cadet.c | 1+
Msrc/cadet/gnunet-service-cadet_core.c | 42+++++++++++++++++++++++++++++++++++++++---
Msrc/cadet/gnunet-service-cadet_paths.c | 169++++++++++++++++++++++++++++++++++---------------------------------------------
Msrc/cadet/gnunet-service-cadet_peer.c | 2+-
Msrc/cadet/gnunet-service-cadet_tunnels.c | 4+++-
Msrc/cadet/test_cadet.c | 133+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
Msrc/conversation/gnunet-helper-audio-playback-gst.c | 5+++++
Msrc/conversation/gnunet-helper-audio-playback.c | 5+++++
Msrc/conversation/gnunet_gst.c | 5+++++
Msrc/conversation/microphone.c | 4+++-
Msrc/core/gnunet-service-core.c | 3+++
Msrc/core/gnunet-service-core_kx.c | 5++++-
Msrc/core/gnunet-service-core_sessions.c | 19++++---------------
Msrc/credential/credential.h | 2+-
Msrc/credential/credential_api.c | 18++++++++----------
Msrc/credential/credential_misc.c | 4++--
Msrc/credential/credential_serialization.c | 14+++++---------
Msrc/credential/gnunet-credential.c | 23++++++++---------------
Msrc/credential/gnunet-service-credential.c | 130++++++++++++++++++-------------------------------------------------------------
Msrc/credential/plugin_gnsrecord_credential.c | 12+++++++++++-
Msrc/credential/plugin_rest_credential.c | 59++++++++++++++++-------------------------------------------
Msrc/credential/test_credential_verify_simple.sh | 8+++++---
Msrc/curl/curl.c | 3++-
Msrc/datacache/plugin_datacache_postgres.c | 8++++++++
Msrc/dht/Makefile.am | 1+
Msrc/dht/gnunet-service-dht.c | 1-
Msrc/dns/dnsparser.c | 28++++++++++++++++++++++------
Msrc/fs/fs_dirmetascan.c | 32+++++++++++++++++++++++---------
Msrc/fs/fs_download.c | 3++-
Msrc/fs/fs_search.c | 19++++++++++++++++---
Msrc/fs/fs_uri.c | 25++++++++++++++++++-------
Msrc/fs/gnunet-download.c | 145++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
Msrc/fs/test_fs_download_persistence.c | 1-
Msrc/fs/test_fs_publish_persistence.c | 1-
Msrc/gns/gnunet-dns2gns.c | 45+++++++++++++++++++++++++++++++--------------
Msrc/gns/gnunet-service-gns_resolver.c | 66++++++++++++++++++++++++++++++++++++++++++++++--------------------
Msrc/hello/hello.c | 7+++++++
Msrc/identity-attribute/identity_attribute.c | 8++++----
Msrc/identity-attribute/identity_attribute.h | 4++--
Msrc/identity-attribute/plugin_identity_attribute_gnuid.c | 2+-
Msrc/identity-provider/Makefile.am | 1+
Msrc/identity-provider/gnunet-idp.c | 5++---
Msrc/identity-provider/gnunet-service-identity-provider.c | 310++++++++++++++++++++++++++++++-------------------------------------------------
Msrc/identity-provider/identity_provider.h | 8++++----
Msrc/identity-provider/identity_provider_api.c | 41+++++++++++++++++++++--------------------
Msrc/identity-provider/plugin_gnsrecord_identity_provider.c | 4++--
Msrc/identity-provider/plugin_identity_provider_sqlite.c | 4++--
Msrc/identity-provider/plugin_rest_identity_provider.c | 11-----------
Msrc/identity/plugin_rest_identity.c | 11++++++-----
Msrc/include/Makefile.am | 7+++++++
Asrc/include/gnunet_abe_lib.h | 193+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/include/gnunet_common.h | 15++++++++++++---
Msrc/include/gnunet_credential_service.h | 33++++++++-------------------------
Msrc/include/gnunet_crypto_lib.h | 82-------------------------------------------------------------------------------
Msrc/include/gnunet_fs_service.h | 3++-
Msrc/include/gnunet_identity_attribute_lib.h | 2+-
Msrc/include/gnunet_identity_provider_service.h | 19++++++++++---------
Msrc/include/gnunet_mst_lib.h | 4+++-
Msrc/include/gnunet_network_lib.h | 8++++----
Msrc/include/gnunet_protocols.h | 30+++++++++++++++++++-----------
Msrc/include/gnunet_rest_lib.h | 6+++---
Msrc/include/gnunet_rest_plugin.h | 2+-
Msrc/include/gnunet_scheduler_lib.h | 44++++++++++++++++++++++++++------------------
Msrc/include/gnunet_service_lib.h | 7++++++-
Msrc/include/gnunet_set_service.h | 3+++
Msrc/jsonapi/Makefile.am | 2+-
Msrc/jsonapi/test_jsonapi.c | 36+++++++++++++++++++-----------------
Msrc/multicast/Makefile.am | 2+-
Msrc/multicast/gnunet-service-multicast.c | 249++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
Msrc/multicast/multicast_api.c | 51++++++++++++++++++++++++---------------------------
Msrc/multicast/test_multicast_multipeer.c | 312++++++++++++++++++++++++++++++++++++++++---------------------------------------
Msrc/nat/gnunet-nat.c | 12+++++++++---
Msrc/nse/gnunet-nse-profiler.c | 19+++++++++++++------
Msrc/peerinfo/gnunet-service-peerinfo.c | 71++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
Msrc/psyc/gnunet-service-psyc.c | 131++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
Msrc/psyc/psyc_api.c | 103++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
Msrc/psyc/test_psyc.c | 28+++++++++++++++++++++-------
Msrc/psyc/test_psyc.conf | 16++++++++++++++++
Msrc/psycstore/psycstore_api.c | 13++++++++-----
Msrc/regex/regex_internal_dht.c | 29++++++++++++++++++-----------
Msrc/regex/regex_test_lib.c | 23++++++++++++++---------
Msrc/rest/Makefile.am | 2++
Msrc/revocation/gnunet-service-revocation.c | 9++++++---
Msrc/rps/.gitignore | 12++++++++++++
Msrc/rps/Makefile.am | 15+++++----------
Msrc/rps/gnunet-service-rps.c | 1798+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Dsrc/rps/gnunet-service-rps_peers.c | 1694-------------------------------------------------------------------------------
Dsrc/rps/gnunet-service-rps_peers.h | 437-------------------------------------------------------------------------------
Msrc/rps/rps.h | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/rps/test_rps.c | 298+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
Msrc/rps/test_rps.conf | 38+++++++++++++++++++++++++++++++-------
Dsrc/rps/test_service_rps_peers.c | 137-------------------------------------------------------------------------------
Msrc/set/Makefile.am | 2+-
Msrc/set/gnunet-service-set_union.c | 13+++++++------
Msrc/set/set_api.c | 5++++-
Msrc/social/gnunet-service-social.c | 845+++++++++++++++++++++++++++++++++++++++++++------------------------------------
Msrc/social/gnunet-social.c | 26+++++++++++++-------------
Msrc/social/social_api.c | 292++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
Msrc/social/test_social.c | 268++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Msrc/social/test_social.conf | 19+++++++++++++++++++
Msrc/statistics/gnunet-service-statistics.c | 4+++-
Msrc/testbed/Makefile.am | 2+-
Msrc/testbed/gnunet-daemon-testbed-blacklist.c | 4+++-
Msrc/testbed/gnunet-daemon-testbed-underlay.c | 6++++--
Msrc/testbed/gnunet-helper-testbed.c | 7++++---
Msrc/testbed/gnunet-service-testbed_oc.c | 15++++++++++-----
Msrc/testbed/gnunet-testbed-profiler.c | 15++++++++-------
Msrc/transport/Makefile.am | 9++++++---
Msrc/transport/gnunet-helper-transport-wlan-dummy.c | 6++++++
Msrc/transport/gnunet-service-transport.c | 4+++-
Msrc/transport/gnunet-service-transport_ats.c | 10+++-------
Msrc/transport/gnunet-service-transport_neighbours.c | 54+++++++++++++++++++++++++++++++++++++++++++-----------
Msrc/transport/gnunet-service-transport_validation.c | 13+++++++++++++
Msrc/transport/plugin_transport_http_server.c | 2+-
Msrc/transport/plugin_transport_tcp.c | 17+++++++++--------
Msrc/transport/plugin_transport_udp.c | 11++++++-----
Msrc/transport/tcp_connection_legacy.c | 9++++++---
Msrc/transport/tcp_server_legacy.c | 24++++++++++++++----------
Msrc/util/Makefile.am | 23-----------------------
Msrc/util/bio.c | 69+++++++++++++++++++++++++++++++++++++++++++++++++++------------------
Msrc/util/client.c | 44++++++++++++++++++++++++++++++++++++++------
Msrc/util/common_allocation.c | 32++++++++++++++++++++++++--------
Msrc/util/common_logging.c | 54++++++++++++++++++++++++++++++++++--------------------
Msrc/util/configuration.c | 39++++++++++++++++++++++++++++-----------
Msrc/util/container_bloomfilter.c | 60++++++++++++++++++++++++++++++++++++------------------------
Msrc/util/crypto_ecc.c | 4++--
Msrc/util/crypto_ecc_dlog.c | 1+
Msrc/util/crypto_ecc_setup.c | 98+++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
Msrc/util/crypto_hash.c | 6+++---
Msrc/util/crypto_hash_file.c | 16+++++++++++-----
Msrc/util/disk.c | 27++++++++++++++++++++++-----
Msrc/util/getopt_helpers.c | 79+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
Msrc/util/gnunet-config.c | 61++++++++++++++++++++++++++++++++++++-------------------------
Msrc/util/gnunet-ecc.c | 35+++++++++++++++++++++++++++--------
Msrc/util/gnunet-resolver.c | 30++++++++++++++++++++++++------
Msrc/util/gnunet-service-resolver.c | 10++++++++--
Msrc/util/mq.c | 22++++++++++++++++++++++
Msrc/util/mst.c | 27++++++++++++++++++++++-----
Msrc/util/network.c | 94++++++++++++++++++++++++++++++++++++++++---------------------------------------
Msrc/util/os_installation.c | 23++++++++++++++++-------
Msrc/util/os_priority.c | 1+
Msrc/util/peer.c | 3++-
Msrc/util/program.c | 13++++++++++++-
Msrc/util/resolver_api.c | 24+++++++++++++++++-------
Msrc/util/scheduler.c | 1565++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Msrc/util/service.c | 35+++++++++++++++++++++++++++++++++--
Msrc/util/speedup.c | 1+
Msrc/util/strings.c | 10++++++----
Dsrc/util/test_crypto_abe.c | 86-------------------------------------------------------------------------------
Msrc/util/test_service.c | 39++++++++++++++++++++++++++++++++++++---
Msrc/util/time.c | 2+-
Msrc/vpn/gnunet-helper-vpn.c | 1+
Msrc/vpn/gnunet-service-vpn.c | 3+++
194 files changed, 12563 insertions(+), 11227 deletions(-)

diff --git a/.mailmap b/.mailmap @@ -0,0 +1,26 @@ +Bart Polot <bart.polot+gnunet@gmail.com> +Bart Polot <bart.polot+gnunet@gmail.com> <bart.polot+voyager@gmail.com> +Bart Polot <bart.polot+gnunet@gmail.com> <bart@net.in.tum.de> +Carlo von lynX <lynX@time.to.get.psyced.org> +Carlo von lynX <lynX@time.to.get.psyced.org> psyc://loupsycedyglgamf.onion/~lynX <BM-NB7xa9gEpmJgYp9PVnEdACiZcGmmEJcY> +Carlo von lynX <lynX@time.to.get.psyced.org> psyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet> +David Barksdale <amatus@amat.us> <amatus.amongus@gmail.com> +David Barksdale <amatus@amat.us> +David Barksdale <amatus@amat.us> <amatus@amatus.name> +Jeffrey Burdges <burdges@gnunet.org> Jeff Burdges <burdges@gnunet.org> +Jeffrey Burdges <burdges@gnunet.org> +Руслан Ижбулатов <lrn1986@gmail.com> +Руслан Ижбулатов <lrn1986@gmail.com> LRN <lrn1986@gmail.com> +Martin Schanzenbach <martin.schanzenbach@aisec.fraunhofer.de> Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> +Martin Schanzenbach <martin.schanzenbach@aisec.fraunhofer.de> Schanzenbach, Martin <mschanzenbach@posteo.de> +Martin Schanzenbach <martin.schanzenbach@aisec.fraunhofer.de> Martin Schanzenbach <mschanzenbach@posteo.de> +ng0 <ng0@n0.is> +ng0 <ng0@n0.is> <contact.ng0@cryptolab.net> +ng0 <ng0@n0.is> <ng0@infotropique.org> +ng0 <ng0@n0.is> N. 'ng0' Gillmann <ngillmann@runbox.com> +ng0 <ng0@n0.is> <ng0@we.make.ritual.n0.is> +t3sserakt <t3ss@posteo.de> +t3sserakt <t3ss@posteo.de> <t3sserakt@posteo.de> +tg(x) <*@tg-x.net> +tg(x) <*@tg-x.net> Gabor X Toth <*@tg-x.net> + diff --git a/AUTHORS b/AUTHORS @@ -33,6 +33,7 @@ Contributions also came from: Adam Warrington [ UPnP ] Adriano Peluso [ Documentation export to Texinfo ] Alex Harper [ OS X CPU load ] +Amirouche Boubekki <amirouche@hypermove.net> Andrew McDonald <andrew@mcdonald.org.uk> [ SHA-512] Andy Green <andy@warmcat.com> Antti Salonen @@ -87,6 +88,7 @@ Uli Luckas <luckas@musoft.de> Vasil Dimov <vd@datamax.bg> Vitaly Minko <vitaly.minko@gmail.com> Werner Koch <libgcrypt@g10code.com> [original code of libgcrypt] +xrs <xrs@mail36.net> [ multicast ] Translations (webpage, documentation, as far as known): Chinese : Di Ma diff --git a/Dockerfile b/Dockerfile @@ -1,63 +0,0 @@ -from fedora:26 - -# Install the required build tools -RUN dnf -y update && dnf -y install which git automake texinfo gettext-devel autoconf libtool libtool-ltdl-devel libidn-devel libunistring-devel glpk libextractor-devel libmicrohttpd-devel gnutls libgcrypt-devel jansson-devel sqlite-devel npm - -WORKDIR /usr/src - -# Install gnurl from source at version gnurl-7.54.0 -RUN git clone https://git.taler.net/gnurl.git --branch gnurl-7.54.0 -WORKDIR /usr/src/gnurl -RUN autoreconf -i -RUN ./configure --enable-ipv6 --with-gnutls --without-libssh2 \ ---without-libmetalink --without-winidn --without-librtmp \ ---without-nghttp2 --without-nss --without-cyassl \ ---without-polarssl --without-ssl --without-winssl \ ---without-darwinssl --disable-sspi --disable-ntlm-wb --disable-ldap \ ---disable-rtsp --disable-dict --disable-telnet --disable-tftp \ ---disable-pop3 --disable-imap --disable-smtp --disable-gopher \ ---disable-file --disable-ftp --disable-smb -RUN make install -WORKDIR /usr/src - -RUN dnf -y install wget flex bison - -# Install libpbc -RUN wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz -RUN tar xvzpf pbc-0.5.14.tar.gz -WORKDIR /usr/src/pbc-0.5.14 -RUN ./configure --prefix=/usr -RUN make install -WORKDIR /usr/src - -RUN dnf -y install glib2-devel - -# Install libbswabe -RUN git clone https://github.com/schanzen/libgabe.git -WORKDIR /usr/src/libgabe -RUN ./configure --prefix=/usr -RUN make install - -# Install WebUI -WORKDIR /usr/src/ -RUN git clone https://github.com/schanzen/gnunet-webui.git -WORKDIR /usr/src/gnunet-webui -RUN git checkout gnuidentity - -RUN mkdir /usr/src/gnunet -WORKDIR /usr/src/gnunet -ADD . . -ARG NUM_JOBS -RUN ./bootstrap -RUN ./configure --prefix=/usr/local -RUN make -j$NUM_JOBS -RUN make install - -RUN groupadd gnunetdns -RUN adduser --system -m --home-dir /var/lib/gnunet gnunet -RUN chown gnunet:gnunet /var/lib/gnunet -RUN echo '[arm]\nSYSTEM_ONLY = YES\nUSER_ONLY = NO\n' > /etc/gnunet.conf - -ADD docker-entrypoint.sh . - -CMD ["sh", "docker-entrypoint.sh"] diff --git a/Makefile.am b/Makefile.am @@ -15,7 +15,8 @@ EXTRA_DIST = \ ABOUT-NLS \ config.rpath \ install-sh \ - acinclude.m4 + acinclude.m4 \ + README.1st gnunetincludedir = $(includedir)/gnunet gnunetinclude_HEADERS = gnunet_config.h diff --git a/README b/README @@ -15,8 +15,11 @@ GNU package (http://www.gnu.org/). This is an ALPHA release. There are known and significant bugs as well as many missing features in this release. +GNUnet is free software released under the GNU General Public License +(v3 or later). For details see the COPYING file in this directory. + Additional documentation about GNUnet can be found at -https://gnunet.org/. +https://gnunet.org/ and in the doc/ folder. Dependencies: @@ -63,6 +66,8 @@ How to install? The fastest way is to use a binary package if it is available for your system. For a more detailed description, read the installation instructions on the webpage at https://gnunet.org/installation. +Generic installation instructions are in the INSTALL file in this +directory. Note that some functions of GNUnet require "root" access. GNUnet will install (tiny) SUID binaries for those functions is you run "make @@ -300,7 +305,7 @@ Stay tuned * https://gnunet.org/ * https://gnunet.org/bugs/ -* https://gnunet.org/svn/ +* https://gnunet.org/git/ * http://www.gnu.org/software/gnunet/ * http://mail.gnu.org/mailman/listinfo/gnunet-developers * http://mail.gnu.org/mailman/listinfo/help-gnunet diff --git a/README.1st b/README.1st @@ -0,0 +1,255 @@ +WARNING! +======= + +The following is a list of issues with GNUnet 0.11.0 that will need +to be addressed before we might consider GNUnet deployable to larger +audiences. Please keep this in mind when trying out GNUnet 0.11.0! + +GNUnet may however work fine for applications that aren't impeded by +these known deficiencies. Help would of course be welcome to reduce +this list, so an estimate of how much work is needed and the main +impact are given with each item. + + +ats: +* We currently select one transport per peer, but we should allow the +use of multiple channels concurrently (i.e. UDP + TCP at the same +time). Neither ATS nor transport support this today, and this requires +a major change in the ATS plugins and the ATS API and the overall +ATS/transport logic. [6-12 PM, robustness, performance] + +* The current proportional ATS heuristic does not devalue increasing +the number of connections once we have reached saturation point, +possibly resulting in an excessive number of connections. +[1-3 PM, performance] + +* The mlp/ril ATS heuristics are highly unstable and keep crashing or +worse, and have horrific code quality. [3-12 PM, stability, +performance] + + +transport: [12-48 PM overall] +* We should move plugins into separate processes to break an overly +complicated subsystem into more manageable bits. [maintainability] + +* Transport plugins are currently expected to be bi-directional; the +API should be changed to make them uni-directional, so we could have +say UDP for sending but receive via say SMTP, simply because NAT +punching and other transports (especially SAT) simply are not +bi-directional. Fragmentation and ACKs should then not be done in UDP +plugin but at transport level. This should result in significantly: +- better NAT traversal +- faster transports (especially with the multi-transport of ATS) +- simplified transport plugins +[stability, robustness, performance] + +* Transport currently does not encrypt. This has the disadvantage that +TCP/UDP traffic is easily identified as "GNUnet"-traffic. It would be +better to_also use a simple cipher (ECDHE+AEAD) in a plugin-specific +way (i.e. HTTPS is fine already) to minimize information leakage, even +if for efficiency that cipher is is not replay-protected at this level +(and leave true replay-protected OTR to CORE). [privacy, censorship-resistance] + +* transport's 'manipulation' functions should be moved into +a plugin-proxy, simplifying the code. This may have +modest implications for testbed due to the API change. +[maintainability, security] + +* testcases are plenty but insufficiently systematic, the changes +described above should also enable us to create more systematic tests. +[maintainability, correctness] + + +hello: +* The current code may leak LAN IPs (in particular IPv6 with +MAC) globally. We have started to put in some provisions to tag +addresses as loopback/LAN/WAN, but need to systematically ensure +that addresses are only propagated in a useful scope and avoid +leaking "sensitive" address data globally. +[3-6 PM, privacy] + + +core: +* core needs to be able to communicate to other peers whether this +peer is high-bandwidth or on battery and thus either great for +relaying or really bad for relaying. Higher-level subsystems +could then bias their peer selection to more capable peers -- +this is key for going on battery-operated systems. +[1-3 PM, performance] + +* we currently use timestamps (based on roughly-synchronized clocks), +challenge-response AND sequence numbers to protect against +replay-protection. This is overkill, and the use of timestamps +causes issues on OpenWRT where RTCs are often unavailable. We +might want to increase the nonce for challenges and get rid of +the roughly-synchronized clocks assumption, at least for CORE +(we can't avoid it for NSE). [1-3 PM, usability] + +* once transport encrypts (ECDH+AES), we should simplify CORE level +encryption to use ECDH+Twofish(+SHA512) instead of the current +ECDH+AES+Twofish double-encryption. + +* Mobile peers currently allow adversaries to track their users as the +peer's identity does not change with locations. We need a mechanism to +notify a mobile peer about a location change and then systematically +change the public key we use depending on our location. [6-12 PM, +privacy] + +* Core should support protocol versioning for higher-level services +[3 PM] + + +cadet: +* needs more systematic testing, ideally with a mock up of DHT +and core. [6-12 PM, correctness] + +* flow and congestion control implementation remains incomplete; +should borrow more from net2o [3-6 PM, performance] + +* Various optimizations, such as key material pre-computation +and avoiding unnecessary DHT queries should be implemented. +[3-9 PM, performance] + +* Once transport/core use AES/Twofish for encryption, we should +switch CADET to use KECCAK-AEAD. + +* Generally needs more benchmarking to identify performance +bottlenecks tune accordingly. [3-12 PM, performance] + + +nat: +* many known NAT traversal methods are not yet supported +[6-12 PM, connectivity, usability] + + +dv: +* dv is still not working, but currently based on SET and we +should simplify the design to not use SET. [3-6 PM, connectivity, +correctness] + + +util: +* Event loop instantiations for various event loops (like glib, +libev, libevent, etc.) should be created (and tested). This +allows applications to be built with GNUnet using those various +styles of event loop handling. General support for abstracting +the event loop is new in 0.11.0, we just need to make broader use +of it. [1-3 PM, performance, usability] + +* gnunet-service-resolver should use asynchronous DNS queries if +available. This will ensure that name resolution is not super-slow +when GNUnet makes various parallel DNS queries (rare, but DNS +queries can happen to resolve peer IP addresses for visualization). +[1 PM, performance, usability] + + +dht: +* various minor tweaks should be explored, but first we need to +define and find a good benchmark to see where our performance +bottlenecks really are today; datacache (IO subsystem) might +be one of them. Here, picking appropriate transaction scopes +and isolation levels should be an easy way to boost performance, +but we also need more benchmarking logic. [3-12 PM, performance] + + +set: +* Current implementation is not yet Byzantine fault-tolerant +against stuffing attack. [1-3 PM, fault-tolerance] + + +topology: +* quite a few different functions are squished together in one +subsystem here, will require some changes to address changes +to transport and hello discussed above [1-3 PM, correctness] + +* there are more robust known ways for maintaining a random mesh, we +might want to explore using those [3-6 PM, robustness] + + +fs: +* The service should be split into two, one for user-specific and one +for system-specific components [3-6 PM, security, usability] + +* Currently, data and files are stored in a disassociated way, +resulting in search results that then fail to download; need OR/RPS +(see below) before we can think about fixing this properly. [6-18 PM, +usability] + +* datastore (IO subsystem) is bad at keeping the database within the + quota set by the user. [1-3 PM, correctness] + + +conversation: +* dropping 'silence' on large-buffers during replay should be +used to avoid accumulating latency (standard VoIP technique, +crucial to get it to work for real calls) [1-3 PM, usability] + +* needs ring tones [1 PM, usability] + + +gns: +* should support hijacking arbitrary gtlds [1 PM, usability] + +* should import ".fr" ccTLD and ensure implementation performs [3-6 PM] + + +multicast: +* implementation currently "trivial" (aka doing round-robin, not multicast) + and under-tested + +* still uses old NTR-style API, needs to transition to MQ API [DONE] + + +psyc: +* implementation under-tested, database performance likely in +need for optimization [3-12 PM] + + +social: +* code in need for clean up and more systematic testing [6-12 PM] + + +rps: +* Open research, still experimental. [3-24 PM] + + +xolotl/lake/or: +* Open research, still non-existent. Symmetric cipher should +be CHACHA. [48-120 PM] + + +No serious problems are known in: +* statistics +* nse +* curl +* revocation +* scalarproduct +* tun +* testbed +* block +* fragmentation +* consensus +* secretsharing +* pt +* vpn +* gns +* gnsrecord +* arm +* dns +* exit +* identity +* json +* sq +* my +* namecache +* namestore +* testing +* hostlist +* zonemaster + + +We reserve judgement (due to lack of data) on: +* identity-provider +* rest + + diff --git a/configure.ac b/configure.ac @@ -1,5 +1,5 @@ # This file is part of GNUnet. -# (C) 2001--2017 GNUnet e.V. +# (C) 2001--2018 GNUnet e.V. # # GNUnet is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published @@ -22,7 +22,7 @@ # AC_PREREQ(2.61) # Checks for programs. -AC_INIT([gnunet], [0.10.1], [bug-gnunet@gnu.org]) +AC_INIT([gnunet], [0.11.0], [bug-gnunet@gnu.org]) AC_CANONICAL_TARGET AC_CANONICAL_HOST @@ -446,7 +446,7 @@ AC_CHECK_LIB(ogg, ogg_stream_flush_fill, ogg=0) -PKG_CHECK_MODULES([GLIB], [glib-2.0]) +PKG_CHECK_MODULES([GLIB], [glib-2.0], # check for pbc library pbc=0 AC_CHECK_HEADER([pbc/pbc.h],pbc=1) @@ -465,8 +465,12 @@ then else AC_DEFINE([HAVE_ABE],[0],[Lacking ABE library]) fi - - +, +# glib-2 not found + AM_CONDITIONAL(HAVE_PBC, [0]) + AM_CONDITIONAL(HAVE_ABE, [0]) + AC_DEFINE([HAVE_PBC],[0],[Lacking glib library]) +) gst=0 PKG_CHECK_MODULES( @@ -1580,8 +1584,6 @@ src/dht/Makefile src/dht/dht.conf src/dns/Makefile src/dns/dns.conf -src/dv/Makefile -src/dv/dv.conf src/exit/Makefile src/fragmentation/Makefile src/fs/Makefile @@ -1660,6 +1662,7 @@ src/vpn/vpn.conf src/zonemaster/Makefile src/zonemaster/zonemaster.conf src/rest/Makefile +src/abe/Makefile src/identity-attribute/Makefile src/identity-provider/Makefile pkgconfig/Makefile diff --git a/contrib/Dockerfile b/contrib/Dockerfile @@ -0,0 +1,56 @@ +from fedora:26 + +# Install the required build tools +RUN dnf -y update && dnf -y install which git automake texinfo gettext-devel autoconf libtool libtool-ltdl-devel libidn-devel libunistring-devel glpk libextractor-devel libmicrohttpd-devel gnutls libgcrypt-devel jansson-devel sqlite-devel npm + +WORKDIR /usr/src + +# Install gnurl from source at version gnurl-7.54.0 +RUN git clone https://git.taler.net/gnurl.git --branch gnurl-7.57.0 +WORKDIR /usr/src/gnurl +RUN autoreconf -i +RUN ./configure --disable-ntlm-wb +RUN make install +WORKDIR /usr/src + +RUN dnf -y install wget flex bison + +# Install libpbc +RUN wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz +RUN tar xvzpf pbc-0.5.14.tar.gz +WORKDIR /usr/src/pbc-0.5.14 +RUN ./configure --prefix=/usr +RUN make install +WORKDIR /usr/src + +RUN dnf -y install glib2-devel + +# Install libbswabe +RUN git clone https://github.com/schanzen/libgabe.git +WORKDIR /usr/src/libgabe +RUN ./configure --prefix=/usr +RUN make install + +# Install WebUI +WORKDIR /usr/src/ +RUN git clone https://github.com/schanzen/gnunet-webui.git +WORKDIR /usr/src/gnunet-webui +RUN git checkout gnuidentity + +RUN mkdir /usr/src/gnunet +WORKDIR /usr/src/gnunet +ADD . . +ARG NUM_JOBS +RUN ./bootstrap +RUN ./configure --prefix=/usr/local +RUN make -j$NUM_JOBS +RUN make install + +RUN groupadd gnunetdns +RUN adduser --system -m --home-dir /var/lib/gnunet gnunet +RUN chown gnunet:gnunet /var/lib/gnunet +RUN echo '[arm]\nSYSTEM_ONLY = YES\nUSER_ONLY = NO\n' > /etc/gnunet.conf + +ADD docker-entrypoint.sh . + +CMD ["sh", "docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/contrib/docker-entrypoint.sh diff --git a/contrib/packages/guix/README b/contrib/packages/guix/README @@ -1,39 +1,64 @@ package definitions for GNU Guix --------------------------------- +About +----- + +This directory contains various files to work with GNUnet using Guix: + +* A folder intended to be used with GUIX_PACKAGE_PATH ("packages") +* gnunet-doc.scm: A file to ease the building of the docgen script output +* gnunet.scm: A file to build gnunet with all tests +* guix-env.scm + +The workflow has to be documented and will make its way into the GNUnet +Documentation eventually. For now, all uses of guix environment, guix package, +etc apply. +Example invocation: + guix environment --ad-hoc --container --network --fallback -K -l contrib/packages/guix/gnunet.scm +which is worth improving, but essentially takes you into an container environment +with gnunet from HEAD, under the condition that it builds. This won't include an editor, +so you want to run + guix environment --ad-hoc emacs --container --network --fallback -K -l contrib/packages/guix/gnunet.scm +(untested). You get the idea that this folder is a historical mess and should be cleaned up +and properly documented. + Usage ----- -Just point Guix towards the root of this source tree: +Just point Guix towards the root of this source tree. +Assuming that your gnunet checkout is in $HOME/src/gnunet: + + export GUIX_PACKAGE_PATH=$HOME/src/gnunet/contrib/packages/guix/packages -export GUIX_PACKAGE_PATH=/path/to/packages or (if you are in the root of the gnunet git repository): -guix package -L contrib/packages/guix/packages -i package-name + + guix package -L contrib/packages/guix/packages -i package-name The packages in this repository will take precedence over those in the official distribution. + To make use of the packages in your GuixSD config file: Be sure to have GUIX_PACKAGE_PATH for your shell exported, -for bash this could be achieved like this: +for Bash this could be achieved like this: -export GUIX_PACKAGE_PATH="/full/path/to/gnunet/contrib/packages/guix/directory" + export GUIX_PACKAGE_PATH="/full/path/to/gnunet/contrib/packages/guix/directory" -In the section of your systems "config.scm", you should find -something like this: +In the section of your systems "config.scm", you should find something like this: -(use-modules (gnu) (gnu system nss)) + (use-modules (gnu) (gnu system nss)) Now to make use of "gnunetg" as an systemwide installed package we change this to: -(use-modules (gnu) (gnu system nss) - (gnunet packages gnunet)) + (use-modules (gnu) (gnu system nss) + (gnunet packages gnunet)) and do the usual thing: - save - guix system build /etc/config.scm - sudo -E guix system reconfigure /etc/config.scm -The "-E" in "sudo -E" is important! +The "-E" in "sudo -E" is important to keep the environment variables (GUIX_PACKAGE_PATH). diff --git a/contrib/packages/guix/gnunet-doc.scm b/contrib/packages/guix/gnunet-doc.scm @@ -141,7 +141,7 @@ (for-each (lambda (f) (chmod f #o755)) (find-files "po" "")) (zero? (system* "sh" "bootstrap")))) - (replace 'build + (add-after 'build 'run-gendocs (lambda _ (chdir "doc/documentation") ;;(zero? (system* "make" "dev-build")))) diff --git a/contrib/packages/guix/gnunet.scm b/contrib/packages/guix/gnunet.scm @@ -107,7 +107,7 @@ ("mysql" ,mysql) ("zlib" ,zlib) ("perl" ,perl) - ("python" ,python) ; tests and gnunet-qr + ("python-2" ,python-2) ; tests and gnunet-qr ("jansson" ,jansson) ("nss" ,nss) ("glib" ,glib "bin") diff --git a/contrib/packages/guix/guix-env.scm b/contrib/packages/guix/guix-env.scm @@ -129,7 +129,7 @@ ("mysql" ,mysql) ("zlib" ,zlib) ("perl" ,perl) - ("python" ,python) ; tests and gnunet-qr + ("python-2" ,python-2) ; tests and gnunet-qr ("jansson" ,jansson) ("nss" ,nss) ("glib" ,glib "bin") diff --git a/doc/Makefile.am b/doc/Makefile.am @@ -2,6 +2,4 @@ SUBDIRS = man doxygen documentation EXTRA_DIST = \ - outdated-and-old-installation-instructions.txt \ - gnunet-c-tutorial-v1.pdf \ - README.txt + outdated-and-old-installation-instructions.txt diff --git a/doc/documentation/.gitignore b/doc/documentation/.gitignore @@ -0,0 +1,2 @@ +stamp-1 +version2.texi diff --git a/doc/documentation/Makefile.am b/doc/documentation/Makefile.am @@ -76,34 +76,35 @@ dist_infoimage_DATA = \ # $(top_srcdir)/%D%/images/coreutils-size-map.eps # dvi-local: ps-local + gnunet_tutorial_examples = \ - 001.c \ - 002.c \ - 003.c \ - 004.c \ - 005.c \ - 006.c \ - 007.c \ - 008.c \ - 009.c \ - 010.c \ - 011.c \ - 012.c \ - 013.c \ - 013.1.c \ - 014.c \ - 015.c \ - 016.c \ - 017.c \ - 018.c \ - 019.c \ - 020.c \ - 021.c \ - 022.c \ - 023.c \ - 024.c \ - 025.c \ - 026.c + tutorial-examples/001.c \ + tutorial-examples/002.c \ + tutorial-examples/003.c \ + tutorial-examples/004.c \ + tutorial-examples/005.c \ + tutorial-examples/006.c \ + tutorial-examples/007.c \ + tutorial-examples/008.c \ + tutorial-examples/009.c \ + tutorial-examples/010.c \ + tutorial-examples/011.c \ + tutorial-examples/012.c \ + tutorial-examples/013.c \ + tutorial-examples/013.1.c \ + tutorial-examples/014.c \ + tutorial-examples/015.c \ + tutorial-examples/016.c \ + tutorial-examples/017.c \ + tutorial-examples/018.c \ + tutorial-examples/019.c \ + tutorial-examples/020.c \ + tutorial-examples/021.c \ + tutorial-examples/022.c \ + tutorial-examples/023.c \ + tutorial-examples/024.c \ + tutorial-examples/025.c \ + tutorial-examples/026.c info_TEXINFOS = \ gnunet.texi \ @@ -202,18 +203,18 @@ dev-build: version.texi version2.texi # TODO: Add more to clean. clean: - @rm gnunet.pdf - @rm gnunet.html - @rm gnunet.info - @rm gnunet.info-1 - @rm gnunet.info-2 - @rm gnunet.info-3 - @rm gnunet-c-tutorial.pdf - @rm gnunet-c-tutorial.info - @rm gnunet-c-tutorial.html - @rm -r gnunet.t2p - @rm -r gnunet-c-tutorial.t2p - @rm -r manual + @rm -f gnunet.pdf + @rm -f gnunet.html + @rm -f gnunet.info + @rm -f gnunet.info-1 + @rm -f gnunet.info-2 + @rm -f gnunet.info-3 + @rm -f gnunet-c-tutorial.pdf + @rm -f gnunet-c-tutorial.info + @rm -f gnunet-c-tutorial.html + @rm -fr gnunet.t2p + @rm -fr gnunet-c-tutorial.t2p + @rm -fr manual # CLEANFILES = \ # gnunet.log \ diff --git a/doc/documentation/README.txt b/doc/documentation/README.txt @@ -1,44 +1,3 @@ -To be moved to an appropriate section of "how to write documentation" or -"how to contribute to the documentation": - -1. When writing documentation, please use gender-neutral wording when - referring to people, such as singular “they”, “their”, “them”, and - so forth. -> https://en.wikipedia.org/wiki/Singular_they - -2. Keep line length below 74 characters. - - Expection by texi2pdf output so far: URLs will break - (inserted whitespace) when they contain linebreaks - within the @url{} / @uref{}. - -3. Do not use tab characters (see chapter 2.1 texinfo manual) - -4. Use neutral language and third person perspective in the text - -4.1 So, when you refer to a user in general or addressing the user, - refer to (1). -4.1.1 Unsolved exceptions for canonical reasons: - When refering to Alice, use "she". - When refering to Bob, use "he". - These are long established examples and they - should either be replaced (avoid Alice and Bob - examples when you can) or followed. - -5. Use 2 spaces between sentences, so instead of: - - We do this and the other thing. This is done by foo. - - Write: - - We do this and the other thing. This is done by foo. - -6. Use @footnote{} instead of putting an @*ref{} to the footnote on a - collected footnote-page. - In a 200+ pages handbook it's better to have footnotes accessible - without having to skip over to the end. - -6.1 Avoid unnecessary footnotes, keep the text self-explanatory and - in a simple language where possible/necessary. - * Completion Levels: ** chapters/philosophy: around 100% fixed after initial export. @@ -46,7 +5,12 @@ To be moved to an appropriate section of "how to write documentation" or * What's left to do - Which Texlive modules are needed? Decrease the size. + - distro specific, or can we set requirements? - Update the content of gnunet documentation. +- XXX: images are only generated for the html documentation + with gendoc.sh … FIXME! +- XXX: png,dot, and svg images MUST be converted to eps by the + build system. Right now they aren't, as a result: No images. * How to use (hack) on this diff --git a/doc/documentation/chapters/contributing.texi b/doc/documentation/chapters/contributing.texi @@ -65,16 +65,7 @@ URLs break in the PDF output when they contain linebreaks. @item Do not use tab characters (see chapter 2.1 texinfo manual) -@item Use neutral language and third person perspective in the text - -@item So, when you refer to a user in general or addressing the user, -refer to (1). -@itemize @bullet -@item Unsolved exceptions for canonical reasons: When refering to Alice, -use "she". When refering to Bob, use "he". These are long established -examples and they should either be replaced (avoid Alice and Bob -examples when you can) or followed. -@end itemize +@item Write texts in the third person perspective. @c FIXME: This is questionable, it feels like bike shed painging to do @c this for several k lines. It only helps to jump between sentences in @@ -96,7 +87,4 @@ footnote on a collected footnote-page. In a 200+ pages handbook it's better to have footnotes accessible without having to skip over to the end. -@item Avoid unnecessary footnotes, keep the text self-explanatory and -in a simple language where possible/necessary. - @end itemize diff --git a/doc/documentation/chapters/developer.texi b/doc/documentation/chapters/developer.texi @@ -94,6 +94,7 @@ following links: @c ** FIXME: Link to files in source, not online. @c ** FIXME: Where is the Java tutorial? @itemize @bullet +@c broken link @item @uref{https://gnunet.org/git/gnunet.git/plain/doc/gnunet-c-tutorial.pdf, GNUnet C tutorial} @item GNUnet Java tutorial @end itemize @@ -273,7 +274,7 @@ library is a wapper around block plugins which provide the necessary functions for each block type. @item @file{statistics/} --- statistics service The statistics service enables associating -values (of type uint64_t) with a componenet name and a string. The main +values (of type uint64_t) with a component name and a string. The main uses is debugging (counting events), performance tracking and user entertainment (what did my peer do today?). @item @file{arm/} --- Automatic Restart Manager (ARM) @@ -460,7 +461,7 @@ stacked together to construct complex buildings and it is generally easy to swap one block for a different one that has the same shape. GNUnet's architecture is based on LEGOs: -@c images here +@c @image{images/service_lego_block,5in,,picture of a LEGO block stack - 3 APIs as connectors upon Network Protocol on top of a Service} This chapter documents the GNUnet LEGO system, also known as GNUnet's system architecture. @@ -1388,7 +1389,7 @@ Note that the substitution placemark is replaced only when the corresponding field is available and only once. Specifying @example -%u@atchar{}%h +%u@@%h @end example doesn't work either. If you want to user username substitutions for @@ -2450,7 +2451,7 @@ memcpy (tbuf, nameTrans, strlen (nameTrans) + 1); Note that, here the functions @code{htonl}, @code{htons} and @code{GNUNET_TIME_absolute_hton} are applied to convert little endian -into big endian, about the usage of the big/small edian order and the +into big endian, about the usage of the big/small endian order and the corresponding conversion function please refer to Introduction of Big Endian and Little Endian. @@ -7027,6 +7028,7 @@ bandwidth consumption. @c %**end of header +@c inconsistent use of ``must'' above it's written ``MUST'' In contrast to GET operations, developers @strong{must} manually re-run PUT operations periodically (if they intend the content to continue to be available). Content stored in the DHT expires or might be lost due to @@ -7055,7 +7057,7 @@ Using the monitoring API, applications can choose to monitor these requests, possibly limiting themselves to requests for a particular block type. -The monitoring API is not only usefu only for diagnostics, it can also be +The monitoring API is not only useful for diagnostics, it can also be used to trigger application operations based on PUT operations. For example, an application may use PUTs to distribute work requests to other peers. @@ -7149,7 +7151,7 @@ already knows more than about a thousand blocks may need to send several of these messages. Naturally, the client should transmit these messages as quickly as possible after the original GET request such that the DHT can filter those results in the network early on. Naturally, as -these messages are send after the original request, it is conceivalbe +these messages are sent after the original request, it is conceivalbe that the DHT service may return blocks that match those already known to the client anyway. @@ -7240,7 +7242,7 @@ A peer can search the DHT by sending @code{struct PeerGetMessage}s of type @code{GNUNET_MESSAGE_TYPE_DHT_P2P_GET} to other peers. In addition to the usual information about the request (type, routing options, desired replication level for the request, the key and the extended query), a GET -request also again contains a hop counter, a Bloom filter over the peers +request also contains a hop counter, a Bloom filter over the peers that have processed the request already and depending on the routing options the full path traversed by the GET. Finally, a GET request includes a variable-size second Bloom filter and a @@ -8093,11 +8095,7 @@ eliminate the need to first create a directory. Collections are also advertised using @code{KSBlock}s. -@table @asis -@item Attachment Size -@item ecrs.pdf 270.68 KB -@item https://gnunet.org/sites/default/files/ecrs.pdf -@end table +@c https://gnunet.org/sites/default/files/ecrs.pdf @node File-sharing persistence directory structure @subsection File-sharing persistence directory structure diff --git a/doc/documentation/chapters/installation.texi b/doc/documentation/chapters/installation.texi @@ -122,6 +122,8 @@ optional (for @command{gnunet-gtk}) optional (for @command{gnunet-gtk}) @item libqrencode @geq{} 3.0, optional (for @command{gnunet-namestore-gtk}) +@item libpbc @geq{} 0.5.14, optional for Attribute-Based Encryption and Identity Provider functionality +@item libgabe (https://github.com/schanzen/libgabe), optional for Attribute-Based Encryption and Identity Provider functionality @end itemize @node Internal dependencies @@ -671,6 +673,7 @@ sources might differ in ways that are only minimal different @node generic source installation - nettle @subsection generic source installation - nettle + @example $ wget http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz $ tar xf nettle-2.7.1.tar.gz @@ -681,6 +684,7 @@ $ sudo make install ; cd .. @node generic source installation - ldns @subsection generic source installation - ldns + @example $ wget https://www.nlnetlabs.nl/downloads/ldns/ldns-1.6.16.tar.gz $ tar xf ldns-1.6.16.tar.gz @@ -691,6 +695,7 @@ $ sudo make install ; cd .. @node generic source installation - libunbound/unbound @subsection generic source installation - libunbound/unbound + @example $ wget https://unbound.net/downloads/unbound-1.4.21.tar.gz $ tar xf unbound-1.4.21.tar.gz @@ -701,6 +706,7 @@ $ sudo make install ; cd .. @node generic source installation - libav @subsection generic source installation - libav + @example $ wget https://libav.org/releases/libav-9.10.tar.xz $ cd libav-0.9 ; ./configure --enable-shared; @@ -709,6 +715,7 @@ $ make; sudo make install; cd .. @node generic source installation - libextractor @subsection generic source installation - libextractor + @example $ wget https://ftp.gnu.org/gnu/libextractor/libextractor-1.3.tar.gz $ tar xvf libextractor-1.3.tar.gz @@ -718,6 +725,7 @@ $ make ; sudo make install; cd .. @node generic source installation - libgpg-error @subsection generic source installation - libgpg-error + @example $ wget https://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.12.tar.bz2 $ tar xvf libgpg-error-1.12.tar.bz2 @@ -736,19 +744,36 @@ $ make ; sudo make install ; cd .. @node generic source installation - gnutls @subsection generic source installation - gnutls + @example $ wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.7.tar.xz $ tar xvf gnutls-3.2.7.tar.xz -$ cd gnutls-3.2.7 ; ./configure; -$ make ; sudo make install ; cd .. +$ cd gnutls-3.2.7 @end example @noindent -If you want a GnuTLS with DANE functionality, you have to compile -it against libunbound. +If you want a GnuTLS with DANE functionality (recommended for GNUnet), +you have to compile it against libunbound. Assuming that libunbound +is installed on your system: + +@example +$ ./configure --enable-libdane +@end example + +@noindent +Note that the build system of GnuTLS should pick up libunbound without +the explicit mention of @code{--enable-libdane}. +If you don't want libdane support you should pass @code{--disable-libdane} +instead. + +@example +$ ./configure +$ make ; sudo make install ; cd .. +@end example @node generic source installation - libmicrohttpd @subsection generic source installation - libmicrohttpd + @example $ wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.33.tar.gz $ tar xvf libmicrohttpd-0.9.33.tar.gz @@ -759,20 +784,34 @@ $ make ; sudo make install ; cd .. @node generic source installation - libgnurl @subsection generic source installation - libgnurl +Example installation of libgnurl version 7.57.0 from source. + @example -$ wget https://gnunet.org/sites/default/files/gnurl-7.34.0.tar.bz2 -$ tar xvf gnurl-7.34.0.tar.bz2 -$ cd gnurl-7.34.0 -$ ./configure --enable-ipv6 --with-gnutls=/usr/local --without-libssh2 \ - --without-libmetalink --without-winidn --without-librtmp \ - --without-nghttp2 --without-nss --without-cyassl --without-polarssl \ - --without-ssl --without-winssl --without-darwinssl --disable-sspi \ - --disable-ntlm-wb --disable-ldap --disable-rtsp --disable-dict \ - --disable-telnet --disable-tftp --disable-pop3 --disable-imap \ - --disable-smtp --disable-gopher --disable-file --disable-ftp +$ wget https://ftp.gnu.org/gnu/gnunet/gnurl-7.57.0.tar.xz +$ wget https://ftp.gnu.org/gnu/gnunet/gnurl-7.57.0.tar.xz.sig +$ gpg --verify gnurl-7.57.0.tar.xz.sig +@end example + +@noindent +If that command fails because you do not have the required public key, +then run this command to import it: + +@example +$ gpg --keyserver pgp.mit.edu --recv-keys A88C8ADD129828D7EAC02E52E22F9BBFEE348588 +@end example + +@noindent +and rerun the gpg --verify command. + +@example +$ tar xvf gnurl-7.57.0.tar.xz +$ cd gnurl-7.57.0 +$ ./configure --disable-ntlm-wb $ make ; sudo make install; cd .. @end example +You have now build and installed libgnurl from source. + @menu * Fixing libgnurl build issues:: @end menu diff --git a/doc/documentation/chapters/philosophy.texi b/doc/documentation/chapters/philosophy.texi @@ -6,18 +6,20 @@ @c for secushare, showing some of the relations and functionalities @c of GNUnet. The foremost goal of the GNUnet project is to become a widely used, -reliable, open, non-discriminating, egalitarian, unfettered and +reliable, open, non-discriminating, egalitarian, unconstrained and censorship-resistant system of free information exchange. We value free speech above state secrets, law-enforcement or intellectual property. GNUnet is supposed to be an anarchistic network, where the only -limitation for peers is that they must contribute enough back to -the network such that their resource consumption does not have -a significant impact on other users. +limitation for participants (devices or people making use of the +network, in the following sometimes called peers) is +that they must contribute enough back to the network such that +their resource consumption does not have a significant impact +on other users. GNUnet should be more than just another file-sharing network. The plan is to offer many other services and in particular to serve as a development platform for the next generation of -decentralized Internet protocols. +Internet Protocols. @menu * Design Goals:: @@ -40,13 +42,17 @@ These are the core GNUnet design goals, in order of relative importance: @c To footnote or not to footnote, that's the question. @footnote{This means that you you have the four essential freedoms: to run the program, to study and change the program in source code form, -to redistribute exact copies, and to distribute modified versions.} +to redistribute exact copies, and to distribute modified versions. +Refer to @uref{https://www.gnu.org/philosophy/free-sw.html, https://www.gnu.org/philosophy/free-sw.html}} @item GNUnet must only disclose the minimal amount of information necessary. -@item GNUnet must be decentralised and survive Byzantine failures in any -position in the network. -@item GNUnet must make it explicit to the user which entities must be -trustworthy when establishing secured communications. +@c TODO: Explain 'fully' in the terminology section. +@item GNUnet must be fully distributed and survive +@uref{https://en.wikipedia.org/wiki/Byzantine_fault_tolerance, Byzantine failures} +@footnote{@uref{https://en.wikipedia.org/wiki/Byzantine_fault_tolerance, https://en.wikipedia.org/wiki/Byzantine_fault_tolerance}} +at any position in the network. +@item GNUnet must make it explicit to the user which entities are +considered to be trustworthy when establishing secured communications. @item GNUnet must use compartmentalization to protect sensitive information. @item GNUnet must be open and permit new peers to join. @@ -73,17 +79,17 @@ find out what is happening on the network or to disrupt operations. @section Versatility We call GNUnet a peer-to-peer framework because we want to support many -different forms of peer-to-peer applications. GNUnet uses a plugin +different forms of peer-to-peer applications. GNUnet uses a plugin architecture to make the system extensible and to encourage code reuse. While the first versions of the system only supported anonymous file-sharing, other applications are being worked on and more will hopefully follow in the future. A powerful synergy regarding anonymity services is created by a large community utilizing many diverse applications over the same software -infrastructure. The reason is that link encryption hides the specifics -of the traffic for non-participating observers. This way, anonymity can +infrastructure. The reason is that link encryption hides the specifics +of the traffic for non-participating observers. This way, anonymity can get stronger with additional (GNUnet) traffic, even if the additional -traffic is not related to anonymous communication. Increasing anonymity +traffic is not related to anonymous communication. Increasing anonymity is the primary reason why GNUnet is developed to become a peer-to-peer framework where many applications share the lower layers of an increasingly complex protocol stack. @@ -96,22 +102,22 @@ and a few shared libraries. @section Practicality GNUnet allows participants to trade various amounts of security in -exchange for increased efficiency. However, it is not possible for any +exchange for increased efficiency. However, it is not possible for any user's security and efficiency requirements to compromise the security and efficiency of any other user. -For GNUnet, efficiency is not paramount. If there is a more secure and +For GNUnet, efficiency is not paramount. If there were a more secure and still practical approach, we would choose to take the more secure alternative. @command{telnet} is more efficient than @command{ssh}, yet it is obsolete. -Hardware gets faster, and code can be optimized. Fixing security issues +Hardware gets faster, and code can be optimized. Fixing security issues as an afterthought is much harder. While security is paramount, practicability is still a requirement. The most secure system is always the one that nobody can use. Similarly, any anonymous system that is extremely inefficient will only find few users. -However, good anonymity requires a large and diverse user base. Since +However, good anonymity requires a large and diverse user base. Since individual security requirements may vary, the only good solution here is to allow individuals to trade-off security and efficiency. The primary challenge in allowing this is to ensure that the economic @@ -154,34 +160,32 @@ The second part describes concepts specific to anonymous file-sharing. @subsection Authentication Almost all peer-to-peer communications in GNUnet are between mutually -authenticated peers. The authentication works by using ECDHE, that is a +authenticated peers. The authentication works by using ECDHE, that is a DH (Diffie---Hellman) key exchange using ephemeral eliptic curve -cryptography. The ephemeral ECC (Eliptic Curve Cryptography) keys are +cryptography. The ephemeral ECC (Eliptic Curve Cryptography) keys are signed using ECDSA (@uref{http://en.wikipedia.org/wiki/ECDSA, ECDSA}). The shared secret from ECDHE is used to create a pair of session keys -@c FIXME: LOng word for HKDF +@c FIXME: LOng word for HKDF. More FIXMEs: Explain MITM etc. (using HKDF) which are then used to encrypt the communication between the two peers using both 256-bit AES (Advanced Encryption Standard) and 256-bit Twofish (with independently derived secret keys). As only the two participating hosts know the shared secret, this authenticates each packet -without requiring signatures each time. GNUnet uses SHA-512 +without requiring signatures each time. GNUnet uses SHA-512 (Secure Hash Algorithm) hash codes to verify the integrity of messages. -In GNUnet, the identity of a host is its public key. For that reason, -@c FIXME: is it clear to the average reader what a man-in-the-middle -@c attack is? +In GNUnet, the identity of a host is its public key. For that reason, man-in-the-middle attacks will not break the authentication or accounting -goals. Essentially, for GNUnet, the IP of the host has nothing to do with -the identity of the host. As the public key is the only thing that truly +goals. Essentially, for GNUnet, the IP of the host has nothing to do with +the identity of the host. As the public key is the only thing that truly matters, faking an IP, a port or any other property of the underlying -transport protocol is irrelevant. In fact, GNUnet peers can use +transport protocol is irrelevant. In fact, GNUnet peers can use multiple IPs (IPv4 and IPv6) on multiple ports --- or even not use the IP protocol at all (by running directly on layer 2). @c NOTE: For consistency we will use @code{HELLO}s throughout this Manual. GNUnet uses a special type of message to communicate a binding between -public (ECC) keys to their current network address. These messages are +public (ECC) keys to their current network address. These messages are commonly called @code{HELLO}s or peer advertisements. They contain the public key of the peer and its current network addresses for various transport services. @@ -191,7 +195,7 @@ peers. For the UDP and TCP transport services, a network address is an IP and a port. GNUnet can also use other transports (HTTP, HTTPS, WLAN, etc.) which use -various other forms of addresses. Note that any node can have many +various other forms of addresses. Note that any node can have many different active transport services at the same time, and each of these can have a different addresses. Binding messages expire after at most a week (the timeout can be @@ -202,7 +206,7 @@ outdated advertisements. A Transport Layer Abstraction for Peer-to-Peer Networks Proceedings of the 3rd International Symposium on Cluster Computing and the Grid (GRID 2003), 2003. -(@uref{https://gnunet.org/git/bibliography.git/plain/docs/transport.pdf, pdf})} +(@uref{https://gnunet.org/git/bibliography.git/plain/docs/transport.pdf, https://gnunet.org/git/bibliography.git/plain/docs/transport.pdf})} @cindex Accounting to Encourage Resource Sharing @node Accounting to Encourage Resource Sharing @@ -218,27 +222,26 @@ with queries that are, in the worst case, multiplied by the network. In order to ensure that freeloaders or attackers have a minimal impact on the network, GNUnet's file-sharing implementation tries to distinguish -good (contributing) nodes from malicious (freeloading) nodes. In GNUnet, +good (contributing) nodes from malicious (freeloading) nodes. In GNUnet, every file-sharing node keeps track of the behavior of every other node it -has been in contact with. Many requests (depending on the application) +has been in contact with. Many requests (depending on the application) are transmitted with a priority (or importance) level. That priority is used to establish how important the sender believes -this request is. If a peer responds to an important request, the +this request is. If a peer responds to an important request, the recipient will increase its trust in the responder: the responder contributed resources. If a peer is too busy to answer all requests, it needs to prioritize. -@c FIXME: 'peers to not take' -> 'peers do not take' would make more sense -For that, peers to not take the priorities of the requests received at +For that, peers do not take the priorities of the requests received at face value. First, they check how much they trust the sender, and depending on that amount of trust they assign the request a (possibly lower) effective -priority. Then, they drop the requests with the lowest effective priority -to satisfy their resource constraints. This way, GNUnet's economic model +priority. Then, they drop the requests with the lowest effective priority +to satisfy their resource constraints. This way, GNUnet's economic model ensures that nodes that are not currently considered to have a surplus in contributions will not be served if the network load is high. @footnote{Christian Grothoff. An Excess-Based Economic Model for Resource Allocation in Peer-to-Peer Networks. Wirtschaftsinformatik, June 2003. -(@uref{https://gnunet.org/git/bibliography.git/plain/docs/ebe.pdf, pdf})} +(@uref{https://gnunet.org/git/bibliography.git/plain/docs/ebe.pdf, https://gnunet.org/git/bibliography.git/plain/docs/ebe.pdf})} @c 2009? @cindex Confidentiality @@ -246,7 +249,7 @@ Allocation in Peer-to-Peer Networks. Wirtschaftsinformatik, June 2003. @subsection Confidentiality Adversaries outside of GNUnet are not supposed to know what kind of -actions a peer is involved in. Only the specific neighbor of a peer that +actions a peer is involved in. Only the specific neighbor of a peer that is the corresponding sender or recipient of a message may know its contents, and even then application protocols may place further restrictions on that knowledge. @@ -254,7 +257,7 @@ In order to ensure confidentiality, GNUnet uses link encryption, that is each message exchanged between two peers is encrypted using a pair of keys only known to these two peers. Encrypting traffic like this makes any kind of traffic analysis much -harder. Naturally, for some applications, it may still be desirable if +harder. Naturally, for some applications, it may still be desirable if even neighbors cannot determine the concrete contents of a message. In GNUnet, this problem is addressed by the specific application-level protocols (see for example, deniability and anonymity in anonymous file @@ -269,13 +272,13 @@ sharing). @end menu Providing anonymity for users is the central goal for the anonymous -file-sharing application. Many other design decisions follow in the +file-sharing application. Many other design decisions follow in the footsteps of this requirement. -Anonymity is never absolute. While there are various +Anonymity is never absolute. While there are various scientific metrics@footnote{Claudia Díaz, Stefaan Seys, Joris Claessens, and Bart Preneel. Towards measuring anonymity. 2002. -(@uref{https://gnunet.org/git/bibliography.git/plain/docs/article-89.pdf, pdf})} +(@uref{https://gnunet.org/git/bibliography.git/plain/docs/article-89.pdf, https://gnunet.org/git/bibliography.git/plain/docs/article-89.pdf})} that can help quantify the level of anonymity that a given mechanism provides, there is no such thing as complete anonymity. GNUnet's file-sharing implementation allows users to select for each @@ -287,7 +290,7 @@ given in scientific metrics@footnote{likewise}, it is probably the best metric available to a peer with a purely local view of the world that does not rely on unreliable external information. The default anonymity level is 1, which uses anonymous routing but -imposes no minimal requirements on cover traffic. It is possible +imposes no minimal requirements on cover traffic. It is possible to forego anonymity when this is not required. The anonymity level of 0 allows GNUnet to use more efficient, non-anonymous routing. @@ -297,12 +300,12 @@ allows GNUnet to use more efficient, non-anonymous routing. Contrary to other designs, we do not believe that users achieve strong anonymity just because their requests are obfuscated by a couple of -indirections. This is not sufficient if the adversary uses traffic +indirections. This is not sufficient if the adversary uses traffic analysis. The threat model used for anonymous file sharing in GNUnet assumes that the adversary is quite powerful. In particular, we assume that the adversary can see all the traffic on -the Internet. And while we assume that the adversary +the Internet. And while we assume that the adversary can not break our encryption, we assume that the adversary has many participating nodes in the network and that it can thus see many of the node-to-node interactions since it controls some of the nodes. @@ -312,10 +315,10 @@ anonymous if they can hide their actions in the traffic created by other users. Hiding actions in the traffic of other users requires participating in the traffic, bringing back the traditional technique of using indirection and -source rewriting. Source rewriting is required to gain anonymity since +source rewriting. Source rewriting is required to gain anonymity since otherwise an adversary could tell if a message originated from a host by -looking at the source address. If all packets look like they originate -from a node, the adversary can not tell which ones originate from that +looking at the source address. If all packets look like they originate +from one node, the adversary can not tell which ones originate from that node and which ones were routed. Note that in this mindset, any node can decide to break the source-rewriting paradigm without violating the protocol, as this @@ -336,14 +339,14 @@ This increases the efficiency of the network as we can indirect less under higher load.@footnote{Krista Bennett and Christian Grothoff. GAP --- practical anonymous networking. In Proceedings of Designing Privacy Enhancing Technologies, 2003. -(@uref{https://gnunet.org/git/bibliography.git/plain/docs/aff.pdf, pdf})} +(@uref{https://gnunet.org/git/bibliography.git/plain/docs/aff.pdf, https://gnunet.org/git/bibliography.git/plain/docs/aff.pdf})} @cindex Deniability @node Deniability @subsection Deniability Even if the user that downloads data and the server that provides data are -anonymous, the intermediaries may still be targets. In particular, if the +anonymous, the intermediaries may still be targets. In particular, if the intermediaries can find out which queries or which content they are processing, a strong adversary could try to force them to censor certain materials. @@ -362,14 +365,14 @@ by @command{gnunet-publish}, @command{gnunet-download}, and Jussi T. Lindgren. An Encoding for Censorship-Resistant Sharing. 2009. -(@uref{https://gnunet.org/git/bibliography.git/plain/docs/ecrs.pdf, pdf})} +(@uref{https://gnunet.org/git/bibliography.git/plain/docs/ecrs.pdf, https://gnunet.org/git/bibliography.git/plain/docs/ecrs.pdf})} @cindex Peer Identities @node Peer Identities @subsection Peer Identities Peer identities are used to identify peers in the network and are unique -for each peer. The identity for a peer is simply its public key, which is +for each peer. The identity for a peer is simply its public key, which is generated along with a private key the peer is started for the first time. While the identity is binary data, it is often expressed as ASCII string. For example, the following is a peer identity as you might see it in @@ -392,21 +395,22 @@ GNS@footnote{Matthias Wachs, Martin Schanzenbach, and Christian Grothoff. A Censorship-Resistant, Privacy-Enhancing and Fully Decentralized Name System. In proceedings of 13th International Conference on Cryptology and Network Security (CANS 2014). 2014. -@uref{https://gnunet.org/git/bibliography.git/plain/docs/gns2014wachs.pdf, pdf}} +@uref{https://gnunet.org/git/bibliography.git/plain/docs/gns2014wachs.pdf, https://gnunet.org/git/bibliography.git/plain/docs/gns2014wachs.pdf}} zones are similar to those of DNS zones, but instead of a hierarchy of authorities to governing their use, GNS zones are controlled by a private key. When you create a record in a DNS zone, that information stored in your -nameserver. Anyone trying to resolve your domain then gets pointed +nameserver. Anyone trying to resolve your domain then gets pointed (hopefully) by the centralised authority to your nameserver. -Whereas GNS, being decentralised by design, stores that information in -DHT. The validity of the records is assured cryptographically, by +Whereas GNS, being fully decentralized by design, stores that information +in DHT. The validity of the records is assured cryptographically, by signing them with the private key of the respective zone. -Anyone trying to resolve records in a zone your domain can then verify the -signature on the records they get from the DHT and be assured that they -are indeed from the respective zone. To make this work, there is a 1:1 -correspondence between zones and their public-private key pairs. +Anyone trying to resolve records in a zone of your domain can then verify +the signature of the records they get from the DHT and be assured that +they are indeed from the respective zone. +To make this work, there is a 1:1 correspondence between zones and +their public-private key pairs. So when we talk about the owner of a GNS zone, that's really the owner of the private key. And a user accessing a zone needs to somehow specify the corresponding @@ -416,8 +420,9 @@ public key first. @node Egos @subsection Egos -Egos are your "identities" in GNUnet. Any user can assume multiple -identities, for example to separate their activities online. Egos can -correspond to pseudonyms or real-world identities. Technically, an +@c what is the difference between peer identity and egos? It seems +@c like both are linked to public-private key pair. +Egos are your "identities" in GNUnet. Any user can assume multiple +identities, for example to separate their activities online. Egos can +correspond to pseudonyms or real-world identities. Technically, an ego is first of all a public-private key pair. - diff --git a/doc/documentation/chapters/user.texi b/doc/documentation/chapters/user.texi @@ -1183,6 +1183,8 @@ shared under the keyword "Das Kapital". Search results are printed by gnunet-search like this: +@c it will be better the avoid the ellipsis altogether because I don't +@c understand the explanation below that @example $ gnunet-download -o "COPYING" --- gnunet://fs/chk/N8...C92.17992 => The GNU Public License <= (mimetype: text/plain) @@ -1192,6 +1194,7 @@ $ gnunet-download -o "COPYING" --- gnunet://fs/chk/N8...C92.17992 The first line is the command you would have to enter to download the file. The argument passed to @code{-o} is the suggested filename (you may change it to whatever you like). +@c except it's triple dash in the above example --- The @code{--} is followed by key for decrypting the file, the query for searching the file, a checksum (in hexadecimal) finally the size of the file in bytes. @@ -1235,6 +1238,7 @@ GNUnet's file-encoding mechanism will ensure file integrity, even if the existing file was not downloaded from GNUnet in the first place. You may want to use the @command{-V} switch (must be added before +@c Same as above it's triple dash the @command{--}) to turn on verbose reporting. In this case, @command{gnunet-download} will print the current number of bytes downloaded whenever new data was received. @@ -1301,7 +1305,7 @@ unavailable. @c %**end of header Each namespace is associated with meta-data that describes -the namespace. This meta data is provided by the user at +the namespace. This meta-data is provided by the user at the time that the namespace is advertised. Advertisements are published under keywords so that they can be found using normal keyword-searches. This way, users can learn about new diff --git a/doc/documentation/gnunet-c-tutorial.texi b/doc/documentation/gnunet-c-tutorial.texi @@ -244,6 +244,7 @@ $ wget $GNUPGFTP/libgpg-error/libgpg-error-1.27.tar.bz2 $ tar xf libgpg-error-1.27.tar.bz2 $ cd libgpg-error-1.27 $ ./configure +$ make $ sudo make install $ cd .. @end example @@ -254,6 +255,7 @@ $ wget $GNUPGFTP/libgcrypt/libgcrypt-1.7.6.tar.bz2 $ tar xf libgcrypt-1.7.6.tar.bz2 $ cd libgcrypt-1.7.6 $ ./configure +$ make $ sudo make install $ cd .. @end example diff --git a/doc/documentation/gnunet.texi b/doc/documentation/gnunet.texi @@ -6,7 +6,9 @@ @documentencoding UTF-8 @settitle GNUnet Reference Manual @exampleindent 2 -@urefbreakstyle before +@c It seems as if this breaks some old garbage version of +@c texinfo running on some systems. FIXME!!! +@c @urefbreakstyle before @c %**end of header @include version.texi @@ -71,10 +73,10 @@ This document is the Reference Manual for GNUnet version @value{VERSION}. @menu * Philosophy:: About GNUnet -* Vocabulary:: Vocabulary +@c * Vocabulary:: Vocabulary * GNUnet Installation Handbook:: How to install GNUnet * Using GNUnet:: Using GNUnet -* Configuration Handbook:: Configuring GNUnet +@c * Configuration Handbook:: Configuring GNUnet * GNUnet Contributors Handbook:: Contributing to GNUnet * GNUnet Developer Handbook:: Developing GNUnet * GNU Free Documentation License:: The license of this manual @@ -103,11 +105,11 @@ Philosophy * Backup of Identities and Egos:: * Revocation:: -Vocabulary - -* Definitions abbreviations and acronyms:: -* Words and characters:: -* Technical Assumptions:: +@c Vocabulary +@c +@c * Definitions abbreviations and acronyms:: +@c * Words and characters:: +@c * Technical Assumptions:: GNUnet Installation Handbook @@ -136,7 +138,7 @@ Using GNUnet * The GNU Name System:: * Using the Virtual Public Network:: -Configuration Handbook +@c Configuration Handbook GNUnet Contributors Handbook @@ -191,7 +193,8 @@ GNUnet Developer Handbook @include chapters/philosophy.texi @c ********************************************************************* -@include chapters/vocabulary.texi +@c WIP: +@c @include chapters/vocabulary.texi @c ********************************************************************* @include chapters/installation.texi @@ -201,12 +204,14 @@ GNUnet Developer Handbook @include chapters/user.texi @c ********************************************************************* -@include chapters/configuration.texi +@c WIP: +@c @include chapters/configuration.texi @include chapters/contributing.texi @c ********************************************************************* @include chapters/developer.texi +@c For now in its own Book: @c @include gnunet-c-tutorial.texi @c ********************************************************************* diff --git a/doc/documentation/index.html b/doc/documentation/index.html @@ -1,12 +1,14 @@ <title>GNUnet - GNUnet Manuals and Handbooks</title> <h2>GNUnet - GNUnet Manuals and Handbooks</h2> -<address>GNUnet e.V.</address> -<address>Fakultät für Informatik -- I8</address> -<address>Technische Universität München</address> -<address>Boltzmannstraße 3</address> -<address>85748 Garching</address> -<address>GERMANY</address> +<blockquote><address> +GNUnet e.V.<br/> +Fakultät für Informatik -- I8<br/> +Technische Universität München<br/> +Boltzmannstraße 3<br/> +85748 Garching<br/> +GERMANY<br/> +</address></blockquote> <p>The following handbooks and manuals are available:</p> diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am @@ -13,3 +13,6 @@ fast: gnunet.doxy clean: rm -rf html + +EXTRA_DIST = \ + gnunet.doxy diff --git a/po/POTFILES.in b/po/POTFILES.in @@ -1,23 +1,16 @@ +src/abe/abe.c src/arm/arm_api.c src/arm/arm_monitor_api.c src/arm/gnunet-arm.c src/arm/gnunet-service-arm.c src/arm/mockup-service.c -src/ats-tests/ats-testing-experiment.c -src/ats-tests/ats-testing-log.c -src/ats-tests/ats-testing-preferences.c -src/ats-tests/ats-testing-traffic.c -src/ats-tests/ats-testing.c -src/ats-tests/gnunet-ats-sim.c -src/ats-tests/gnunet-solver-eval.c -src/ats-tool/gnunet-ats.c src/ats/ats_api_connectivity.c src/ats/ats_api_performance.c src/ats/ats_api_scanner.c src/ats/ats_api_scheduling.c src/ats/gnunet-ats-solver-eval.c -src/ats/gnunet-service-ats.c src/ats/gnunet-service-ats_addresses.c +src/ats/gnunet-service-ats.c src/ats/gnunet-service-ats_connectivity.c src/ats/gnunet-service-ats_normalization.c src/ats/gnunet-service-ats_performance.c @@ -28,6 +21,14 @@ src/ats/gnunet-service-ats_scheduling.c src/ats/plugin_ats_mlp.c src/ats/plugin_ats_proportional.c src/ats/plugin_ats_ril.c +src/ats-tests/ats-testing.c +src/ats-tests/ats-testing-experiment.c +src/ats-tests/ats-testing-log.c +src/ats-tests/ats-testing-preferences.c +src/ats-tests/ats-testing-traffic.c +src/ats-tests/gnunet-ats-sim.c +src/ats-tests/gnunet-solver-eval.c +src/ats-tool/gnunet-ats.c src/auction/gnunet-auction-create.c src/auction/gnunet-auction-info.c src/auction/gnunet-auction-join.c @@ -39,8 +40,8 @@ src/block/plugin_block_test.c src/cadet/cadet_api.c src/cadet/cadet_test_lib.c src/cadet/desirability_table.c -src/cadet/gnunet-cadet-profiler.c src/cadet/gnunet-cadet.c +src/cadet/gnunet-cadet-profiler.c src/cadet/gnunet-service-cadet.c src/cadet/gnunet-service-cadet_channel.c src/cadet/gnunet-service-cadet_connection.c @@ -56,15 +57,15 @@ src/consensus/gnunet-service-consensus.c src/consensus/plugin_block_consensus.c src/conversation/conversation_api.c src/conversation/conversation_api_call.c -src/conversation/gnunet-conversation-test.c src/conversation/gnunet-conversation.c -src/conversation/gnunet-helper-audio-playback-gst.c +src/conversation/gnunet-conversation-test.c +src/conversation/gnunet_gst.c +src/conversation/gnunet_gst_test.c src/conversation/gnunet-helper-audio-playback.c -src/conversation/gnunet-helper-audio-record-gst.c +src/conversation/gnunet-helper-audio-playback-gst.c src/conversation/gnunet-helper-audio-record.c +src/conversation/gnunet-helper-audio-record-gst.c src/conversation/gnunet-service-conversation.c -src/conversation/gnunet_gst.c -src/conversation/gnunet_gst_test.c src/conversation/microphone.c src/conversation/plugin_gnsrecord_conversation.c src/conversation/speaker.c @@ -101,6 +102,7 @@ src/dht/dht_api.c src/dht/dht_test_lib.c src/dht/gnunet-dht-get.c src/dht/gnunet-dht-monitor.c +src/dht/gnunet_dht_profiler.c src/dht/gnunet-dht-put.c src/dht/gnunet-service-dht.c src/dht/gnunet-service-dht_clients.c @@ -109,7 +111,6 @@ src/dht/gnunet-service-dht_hello.c src/dht/gnunet-service-dht_neighbours.c src/dht/gnunet-service-dht_nse.c src/dht/gnunet-service-dht_routing.c -src/dht/gnunet_dht_profiler.c src/dht/plugin_block_dht.c src/dns/dns_api.c src/dns/dnsparser.c @@ -124,8 +125,8 @@ src/dv/gnunet-dv.c src/dv/gnunet-service-dv.c src/dv/plugin_transport_dv.c src/exit/gnunet-daemon-exit.c -src/exit/gnunet-helper-exit-windows.c src/exit/gnunet-helper-exit.c +src/exit/gnunet-helper-exit-windows.c src/fragmentation/defragmentation.c src/fragmentation/fragmentation.c src/fs/fs_api.c @@ -150,8 +151,8 @@ src/fs/gnunet-auto-share.c src/fs/gnunet-daemon-fsprofiler.c src/fs/gnunet-directory.c src/fs/gnunet-download.c -src/fs/gnunet-fs-profiler.c src/fs/gnunet-fs.c +src/fs/gnunet-fs-profiler.c src/fs/gnunet-helper-fs-publish.c src/fs/gnunet-publish.c src/fs/gnunet-search.c @@ -169,10 +170,10 @@ src/fs/plugin_block_fs.c src/gns/gns_api.c src/gns/gnunet-bcd.c src/gns/gnunet-dns2gns.c +src/gns/gnunet-gns.c src/gns/gnunet-gns-helper-service-w32.c src/gns/gnunet-gns-import.c src/gns/gnunet-gns-proxy.c -src/gns/gnunet-gns.c src/gns/gnunet-service-gns.c src/gns/gnunet-service-gns_interceptor.c src/gns/gnunet-service-gns_resolver.c @@ -181,15 +182,15 @@ src/gns/nss/nss_gns_query.c src/gns/plugin_block_gns.c src/gns/plugin_gnsrecord_gns.c src/gns/plugin_rest_gns.c -src/gns/w32nsp-install.c -src/gns/w32nsp-resolve.c -src/gns/w32nsp-uninstall.c -src/gns/w32nsp.c src/gnsrecord/gnsrecord.c src/gnsrecord/gnsrecord_crypto.c src/gnsrecord/gnsrecord_misc.c src/gnsrecord/gnsrecord_serialization.c src/gnsrecord/plugin_gnsrecord_dns.c +src/gns/w32nsp.c +src/gns/w32nsp-install.c +src/gns/w32nsp-resolve.c +src/gns/w32nsp-uninstall.c src/hello/address.c src/hello/gnunet-hello.c src/hello/hello.c @@ -198,6 +199,11 @@ src/hostlist/gnunet-daemon-hostlist_client.c src/hostlist/gnunet-daemon-hostlist_server.c src/identity-attribute/identity_attribute.c src/identity-attribute/plugin_identity_attribute_gnuid.c +src/identity/gnunet-identity.c +src/identity/gnunet-service-identity.c +src/identity/identity_api.c +src/identity/identity_api_lookup.c +src/identity/plugin_rest_identity.c src/identity-provider/gnunet-idp.c src/identity-provider/gnunet-service-identity-provider.c src/identity-provider/identity_provider_api.c @@ -205,20 +211,15 @@ src/identity-provider/jwt.c src/identity-provider/plugin_gnsrecord_identity_provider.c src/identity-provider/plugin_identity_provider_sqlite.c src/identity-provider/plugin_rest_identity_provider.c -src/identity/gnunet-identity.c -src/identity/gnunet-service-identity.c -src/identity/identity_api.c -src/identity/identity_api_lookup.c -src/identity/plugin_rest_identity.c -src/json/json.c -src/json/json_generator.c -src/json/json_helper.c -src/json/json_mhd.c src/jsonapi/jsonapi.c src/jsonapi/jsonapi_document.c src/jsonapi/jsonapi_error.c src/jsonapi/jsonapi_relationship.c src/jsonapi/jsonapi_resource.c +src/json/json.c +src/json/json_generator.c +src/json/json_helper.c +src/json/json_mhd.c src/multicast/gnunet-multicast.c src/multicast/gnunet-service-multicast.c src/multicast/multicast_api.c @@ -232,8 +233,8 @@ src/namecache/namecache_api.c src/namecache/plugin_namecache_flat.c src/namecache/plugin_namecache_postgres.c src/namecache/plugin_namecache_sqlite.c -src/namestore/gnunet-namestore-fcfsd.c src/namestore/gnunet-namestore.c +src/namestore/gnunet-namestore-fcfsd.c src/namestore/gnunet-service-namestore.c src/namestore/namestore_api.c src/namestore/namestore_api_monitor.c @@ -248,10 +249,10 @@ src/nat-auto/gnunet-service-nat-auto.c src/nat-auto/gnunet-service-nat-auto_legacy.c src/nat-auto/nat_auto_api.c src/nat-auto/nat_auto_api_test.c -src/nat/gnunet-helper-nat-client-windows.c src/nat/gnunet-helper-nat-client.c -src/nat/gnunet-helper-nat-server-windows.c +src/nat/gnunet-helper-nat-client-windows.c src/nat/gnunet-helper-nat-server.c +src/nat/gnunet-helper-nat-server-windows.c src/nat/gnunet-nat.c src/nat/gnunet-service-nat.c src/nat/gnunet-service-nat_externalip.c @@ -260,15 +261,15 @@ src/nat/gnunet-service-nat_mini.c src/nat/gnunet-service-nat_stun.c src/nat/nat_api.c src/nat/nat_api_stun.c -src/nse/gnunet-nse-profiler.c src/nse/gnunet-nse.c +src/nse/gnunet-nse-profiler.c src/nse/gnunet-service-nse.c src/nse/nse_api.c -src/peerinfo-tool/gnunet-peerinfo.c -src/peerinfo-tool/gnunet-peerinfo_plugins.c src/peerinfo/gnunet-service-peerinfo.c src/peerinfo/peerinfo_api.c src/peerinfo/peerinfo_api_notify.c +src/peerinfo-tool/gnunet-peerinfo.c +src/peerinfo-tool/gnunet-peerinfo_plugins.c src/peerstore/gnunet-peerstore.c src/peerstore/gnunet-service-peerstore.c src/peerstore/peerstore_api.c @@ -316,17 +317,16 @@ src/revocation/revocation_api.c src/rps/gnunet-rps.c src/rps/gnunet-service-rps.c src/rps/gnunet-service-rps_custommap.c -src/rps/gnunet-service-rps_peers.c src/rps/gnunet-service-rps_sampler.c src/rps/gnunet-service-rps_sampler_elem.c src/rps/gnunet-service-rps_view.c -src/rps/rps-test_util.c src/rps/rps_api.c +src/rps/rps-test_util.c src/scalarproduct/gnunet-scalarproduct.c -src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c -src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c src/scalarproduct/gnunet-service-scalarproduct_alice.c src/scalarproduct/gnunet-service-scalarproduct_bob.c +src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c +src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c src/scalarproduct/scalarproduct_api.c src/secretsharing/gnunet-secretsharing-profiler.c src/secretsharing/gnunet-service-secretsharing.c @@ -353,16 +353,15 @@ src/statistics/gnunet-statistics.c src/statistics/statistics_api.c src/template/gnunet-service-template.c src/template/gnunet-template.c -src/testbed-logger/gnunet-service-testbed-logger.c -src/testbed-logger/testbed_logger_api.c src/testbed/generate-underlay-topology.c src/testbed/gnunet-daemon-latency-logger.c src/testbed/gnunet-daemon-testbed-blacklist.c src/testbed/gnunet-daemon-testbed-underlay.c src/testbed/gnunet-helper-testbed.c +src/testbed/gnunet_mpi_test.c src/testbed/gnunet-service-test-barriers.c -src/testbed/gnunet-service-testbed.c src/testbed/gnunet-service-testbed_barriers.c +src/testbed/gnunet-service-testbed.c src/testbed/gnunet-service-testbed_cache.c src/testbed/gnunet-service-testbed_connectionpool.c src/testbed/gnunet-service-testbed_cpustatus.c @@ -370,19 +369,20 @@ src/testbed/gnunet-service-testbed_links.c src/testbed/gnunet-service-testbed_meminfo.c src/testbed/gnunet-service-testbed_oc.c src/testbed/gnunet-service-testbed_peers.c -src/testbed/gnunet-testbed-profiler.c -src/testbed/gnunet_mpi_test.c src/testbed/gnunet_testbed_mpi_spawn.c -src/testbed/testbed_api.c +src/testbed/gnunet-testbed-profiler.c +src/testbed-logger/gnunet-service-testbed-logger.c +src/testbed-logger/testbed_logger_api.c src/testbed/testbed_api_barriers.c +src/testbed/testbed_api.c src/testbed/testbed_api_hosts.c src/testbed/testbed_api_operations.c src/testbed/testbed_api_peers.c src/testbed/testbed_api_sd.c src/testbed/testbed_api_services.c src/testbed/testbed_api_statistics.c -src/testbed/testbed_api_test.c src/testbed/testbed_api_testbed.c +src/testbed/testbed_api_test.c src/testbed/testbed_api_topology.c src/testbed/testbed_api_underlay.c src/testing/gnunet-testing.c @@ -391,39 +391,34 @@ src/testing/testing.c src/topology/friends.c src/topology/gnunet-daemon-topology.c src/transport/gnunet-helper-transport-bluetooth.c -src/transport/gnunet-helper-transport-wlan-dummy.c src/transport/gnunet-helper-transport-wlan.c -src/transport/gnunet-service-transport.c +src/transport/gnunet-helper-transport-wlan-dummy.c src/transport/gnunet-service-transport_ats.c +src/transport/gnunet-service-transport.c src/transport/gnunet-service-transport_hello.c src/transport/gnunet-service-transport_manipulation.c src/transport/gnunet-service-transport_neighbours.c src/transport/gnunet-service-transport_plugins.c src/transport/gnunet-service-transport_validation.c +src/transport/gnunet-transport.c src/transport/gnunet-transport-certificate-creation.c src/transport/gnunet-transport-profiler.c src/transport/gnunet-transport-wlan-receiver.c src/transport/gnunet-transport-wlan-sender.c -src/transport/gnunet-transport.c src/transport/plugin_transport_http_client.c src/transport/plugin_transport_http_common.c src/transport/plugin_transport_http_server.c src/transport/plugin_transport_smtp.c src/transport/plugin_transport_tcp.c src/transport/plugin_transport_template.c -src/transport/plugin_transport_udp.c src/transport/plugin_transport_udp_broadcasting.c +src/transport/plugin_transport_udp.c src/transport/plugin_transport_unix.c src/transport/plugin_transport_wlan.c src/transport/tcp_connection_legacy.c src/transport/tcp_server_legacy.c src/transport/tcp_server_mst_legacy.c src/transport/tcp_service_legacy.c -src/transport/transport-testing-filenames.c -src/transport/transport-testing-loggers.c -src/transport/transport-testing-main.c -src/transport/transport-testing-send.c -src/transport/transport-testing.c src/transport/transport_api_address_to_string.c src/transport/transport_api_blacklist.c src/transport/transport_api_core.c @@ -432,6 +427,11 @@ src/transport/transport_api_manipulation.c src/transport/transport_api_monitor_peers.c src/transport/transport_api_monitor_plugins.c src/transport/transport_api_offer_hello.c +src/transport/transport-testing.c +src/transport/transport-testing-filenames.c +src/transport/transport-testing-loggers.c +src/transport/transport-testing-main.c +src/transport/transport-testing-send.c src/tun/regex.c src/tun/tun.c src/util/bandwidth.c @@ -445,8 +445,8 @@ src/util/configuration_loader.c src/util/container_bloomfilter.c src/util/container_heap.c src/util/container_meta_data.c -src/util/container_multihashmap.c src/util/container_multihashmap32.c +src/util/container_multihashmap.c src/util/container_multipeermap.c src/util/container_multishortmap.c src/util/crypto_abe.c @@ -466,8 +466,8 @@ src/util/crypto_symmetric.c src/util/disk.c src/util/getopt.c src/util/getopt_helpers.c -src/util/gnunet-config-diff.c src/util/gnunet-config.c +src/util/gnunet-config-diff.c src/util/gnunet-ecc.c src/util/gnunet-helper-w32-console.c src/util/gnunet-resolver.c @@ -498,8 +498,8 @@ src/util/time.c src/util/w32cat.c src/util/win.c src/util/winproc.c -src/vpn/gnunet-helper-vpn-windows.c src/vpn/gnunet-helper-vpn.c +src/vpn/gnunet-helper-vpn-windows.c src/vpn/gnunet-service-vpn.c src/vpn/gnunet-vpn.c src/vpn/vpn_api.c diff --git a/po/de.po b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: gnunet 0.10.1\n" "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" -"POT-Creation-Date: 2017-10-20 15:14+0000\n" +"POT-Creation-Date: 2018-01-02 02:33+0100\n" "PO-Revision-Date: 2015-03-08 16:16+0100\n" "Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n" "Language-Team: German <translation-team-de@lists.sourceforge.net>\n" @@ -244,14 +244,14 @@ msgid "Require valid port number for service `%s' in configuration!\n" msgstr "" #: src/arm/gnunet-service-arm.c:430 src/transport/plugin_transport_tcp.c:1176 -#: src/transport/tcp_service_legacy.c:613 src/util/client.c:480 +#: src/transport/tcp_service_legacy.c:613 src/util/client.c:505 #: src/util/service.c:682 #, c-format msgid "UNIXPATH `%s' too long, maximum length is %llu\n" msgstr "" #: src/arm/gnunet-service-arm.c:434 src/transport/plugin_transport_tcp.c:1180 -#: src/transport/tcp_service_legacy.c:617 src/util/client.c:485 +#: src/transport/tcp_service_legacy.c:617 src/util/client.c:510 #: src/util/service.c:687 #, c-format msgid "Using `%s' instead\n" @@ -353,14 +353,131 @@ msgstr "" msgid "Initiating shutdown as requested by client.\n" msgstr "" -#: src/ats-tests/ats-testing-log.c:837 -msgid "Stop logging\n" -msgstr "Protokollierung stoppen\n" +#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 +#, c-format +msgid "" +"Could not load quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" -#: src/ats-tests/ats-testing-log.c:892 +#: src/ats/gnunet-ats-solver-eval.c:2799 +#, c-format +msgid "" +"No outbound quota configured for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:2840 +#, c-format +msgid "" +"No outbound quota configure for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3294 src/ats-tests/gnunet-solver-eval.c:939 +msgid "solver to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3299 src/ats-tests/gnunet-solver-eval.c:945 +#: src/ats-tests/gnunet-solver-eval.c:950 +msgid "experiment to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3306 +msgid "print logging" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3311 +msgid "save logging to disk" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3316 +msgid "disable normalization" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:304 +#, c-format +msgid "" +"Could not load %s quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:314 +#, c-format +msgid "%s quota configured for network `%s' is %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:359 +#, c-format +msgid "" +"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:451 #, fuzzy, c-format -msgid "Start logging `%s'\n" -msgstr "Collection `%s' begonnen.\n" +msgid "Failed to initialize solver `%s'!\n" +msgstr "SQLite Datenbank konnte nicht initialisiert werden.\n" + +#: src/ats/plugin_ats_mlp.c:1274 +msgid "Problem size too large, cannot allocate memory!\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1869 +#, fuzzy, c-format +msgid "Adding address for peer `%s' multiple times\n" +msgstr "Adresse des Knotens `%s' konnte nicht ermittelt werden.\n" + +#: src/ats/plugin_ats_mlp.c:1913 +#, fuzzy, c-format +msgid "Updating address property for peer `%s' %p not added before\n" +msgstr "Adresse des Knotens `%s' konnte nicht ermittelt werden.\n" + +#: src/ats/plugin_ats_mlp.c:2475 +msgid "" +"MLP solver is not optimizing for anything, changing to feasibility check\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 +#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 +#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 +#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 +#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 +#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 +#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 +#, fuzzy, c-format +msgid "Invalid %s configuration %f \n" +msgstr "Konfiguration konnte nicht aus %s geladen werden\n" + +#: src/ats/plugin_ats_mlp.c:2670 +#, c-format +msgid "" +"Adjusting inconsistent outbound quota configuration for network `%s', is " +"%llu must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2679 +#, c-format +msgid "" +"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " +"must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2689 +#, c-format +msgid "" +"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2698 +#, c-format +msgid "" +"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_proportional.c:1164 +#, fuzzy, c-format +msgid "Invalid %s configuration %f\n" +msgstr " gconfig\tGTK Konfiguration\n" #: src/ats-tests/ats-testing.c:422 #, c-format @@ -372,6 +489,15 @@ msgstr "" msgid "Failed to connect master peer [%u] with slave [%u]\n" msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" +#: src/ats-tests/ats-testing-log.c:837 +msgid "Stop logging\n" +msgstr "Protokollierung stoppen\n" + +#: src/ats-tests/ats-testing-log.c:892 +#, fuzzy, c-format +msgid "Start logging `%s'\n" +msgstr "Collection `%s' begonnen.\n" + #: src/ats-tests/gnunet-ats-sim.c:90 #, c-format msgid "" @@ -379,15 +505,6 @@ msgid "" "= %u KiB/s\n" msgstr "" -#: src/ats-tests/gnunet-solver-eval.c:939 src/ats/gnunet-ats-solver-eval.c:3294 -msgid "solver to use" -msgstr "" - -#: src/ats-tests/gnunet-solver-eval.c:945 -#: src/ats-tests/gnunet-solver-eval.c:950 src/ats/gnunet-ats-solver-eval.c:3299 -msgid "experiment to use" -msgstr "" - #: src/ats-tool/gnunet-ats.c:307 #, c-format msgid "%u address resolutions had a timeout\n" @@ -505,123 +622,6 @@ msgstr "" msgid "Print information about ATS state" msgstr "Informationen über andere GNUnet Knoten ausgeben." -#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 -#, c-format -msgid "" -"Could not load quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2799 -#, c-format -msgid "" -"No outbound quota configured for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2840 -#, c-format -msgid "" -"No outbound quota configure for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3306 -msgid "print logging" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3311 -msgid "save logging to disk" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3316 -msgid "disable normalization" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:304 -#, c-format -msgid "" -"Could not load %s quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:314 -#, c-format -msgid "%s quota configured for network `%s' is %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:359 -#, c-format -msgid "" -"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:451 -#, fuzzy, c-format -msgid "Failed to initialize solver `%s'!\n" -msgstr "SQLite Datenbank konnte nicht initialisiert werden.\n" - -#: src/ats/plugin_ats_mlp.c:1274 -msgid "Problem size too large, cannot allocate memory!\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1869 -#, fuzzy, c-format -msgid "Adding address for peer `%s' multiple times\n" -msgstr "Adresse des Knotens `%s' konnte nicht ermittelt werden.\n" - -#: src/ats/plugin_ats_mlp.c:1913 -#, fuzzy, c-format -msgid "Updating address property for peer `%s' %p not added before\n" -msgstr "Adresse des Knotens `%s' konnte nicht ermittelt werden.\n" - -#: src/ats/plugin_ats_mlp.c:2475 -msgid "" -"MLP solver is not optimizing for anything, changing to feasibility check\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 -#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 -#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 -#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 -#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 -#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 -#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 -#, fuzzy, c-format -msgid "Invalid %s configuration %f \n" -msgstr "Konfiguration konnte nicht aus %s geladen werden\n" - -#: src/ats/plugin_ats_mlp.c:2670 -#, c-format -msgid "" -"Adjusting inconsistent outbound quota configuration for network `%s', is " -"%llu must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2679 -#, c-format -msgid "" -"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " -"must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2689 -#, c-format -msgid "" -"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2698 -#, c-format -msgid "" -"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_proportional.c:1164 -#, fuzzy, c-format -msgid "Invalid %s configuration %f\n" -msgstr " gconfig\tGTK Konfiguration\n" - #: src/auction/gnunet-auction-create.c:163 msgid "description of the item to be sold" msgstr "" @@ -668,58 +668,58 @@ msgstr "Hilfetext" msgid "Invalid peer ID `%s'\n" msgstr "Ungültige Antwort auf `%s'.\n" -#: src/cadet/gnunet-cadet.c:702 +#: src/cadet/gnunet-cadet.c:703 #, fuzzy, c-format msgid "Invalid tunnel owner `%s'\n" msgstr "Ungültiger Parameter: `%s'\n" -#: src/cadet/gnunet-cadet.c:775 +#: src/cadet/gnunet-cadet.c:776 msgid "Extra arguments are not applicable in combination with this option.\n" msgstr "" -#: src/cadet/gnunet-cadet.c:866 +#: src/cadet/gnunet-cadet.c:867 #, fuzzy, c-format msgid "Invalid target `%s'\n" msgstr "Ungültiger Parameter: `%s'\n" -#: src/cadet/gnunet-cadet.c:903 +#: src/cadet/gnunet-cadet.c:904 #, fuzzy msgid "No action requested\n" msgstr " Verbindung fehlgeschlagen\n" -#: src/cadet/gnunet-cadet.c:928 +#: src/cadet/gnunet-cadet.c:929 #, fuzzy msgid "Provide information about a particular connection" msgstr "Informationen über andere GNUnet Knoten ausgeben." -#: src/cadet/gnunet-cadet.c:933 +#: src/cadet/gnunet-cadet.c:934 msgid "Activate echo mode" msgstr "" -#: src/cadet/gnunet-cadet.c:938 +#: src/cadet/gnunet-cadet.c:939 msgid "Dump debug information to STDERR" msgstr "" -#: src/cadet/gnunet-cadet.c:944 +#: src/cadet/gnunet-cadet.c:945 msgid "Listen for connections using a shared secret among sender and recipient" msgstr "" -#: src/cadet/gnunet-cadet.c:951 +#: src/cadet/gnunet-cadet.c:952 #, fuzzy msgid "Provide information about a patricular peer" msgstr "Informationen über andere GNUnet Knoten ausgeben." -#: src/cadet/gnunet-cadet.c:957 +#: src/cadet/gnunet-cadet.c:958 #, fuzzy msgid "Provide information about all peers" msgstr "Informationen über andere GNUnet Knoten ausgeben." -#: src/cadet/gnunet-cadet.c:963 +#: src/cadet/gnunet-cadet.c:964 #, fuzzy msgid "Provide information about a particular tunnel" msgstr "Informationen über andere GNUnet Knoten ausgeben." -#: src/cadet/gnunet-cadet.c:969 +#: src/cadet/gnunet-cadet.c:970 #, fuzzy msgid "Provide information about all tunnels" msgstr "Informationen über andere GNUnet Knoten ausgeben." @@ -767,28 +767,6 @@ msgstr "Ausführlicherer Modus (empfangene Werte ausgeben)" msgid "Connection to conversation service lost, trying to reconnect\n" msgstr "" -#: src/conversation/gnunet-conversation-test.c:119 -#, c-format -msgid "" -"\n" -"End of transmission. Have a GNU day.\n" -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:145 -#, c-format -msgid "" -"\n" -"We are now playing your recording back. If you can hear it, your audio " -"settings are working..." -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:210 -#, c-format -msgid "" -"We will now be recording you for %s. After that time, the recording will be " -"played back to you..." -msgstr "" - #: src/conversation/gnunet-conversation.c:269 #, c-format msgid "Incoming call from `%s'. Please /accept %u or /cancel %u the call.\n" @@ -1046,8 +1024,30 @@ msgstr "" msgid "Enables having a conversation with other GNUnet users." msgstr "" -#: src/conversation/gnunet-helper-audio-playback-gst.c:356 +#: src/conversation/gnunet-conversation-test.c:119 +#, c-format +msgid "" +"\n" +"End of transmission. Have a GNU day.\n" +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:145 +#, c-format +msgid "" +"\n" +"We are now playing your recording back. If you can hear it, your audio " +"settings are working..." +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:210 +#, c-format +msgid "" +"We will now be recording you for %s. After that time, the recording will be " +"played back to you..." +msgstr "" + #: src/conversation/gnunet_gst.c:622 +#: src/conversation/gnunet-helper-audio-playback-gst.c:361 #, c-format msgid "Read error from STDIN: %d %s\n" msgstr "Fehler beim Lesen aus STDIN: %d %s\n" @@ -1057,60 +1057,60 @@ msgstr "Fehler beim Lesen aus STDIN: %d %s\n" msgid "pa_stream_write() failed: %s\n" msgstr "pa_stream_write() fehlgeschlagen: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:607 +#: src/conversation/gnunet-helper-audio-playback.c:612 msgid "gnunet-helper-audio-playback - Got signal, exiting\n" msgstr "gnunet-helper-audio-playback - Signal erhalten, wird abgebrochen\n" -#: src/conversation/gnunet-helper-audio-playback.c:632 +#: src/conversation/gnunet-helper-audio-playback.c:637 #: src/conversation/gnunet-helper-audio-record.c:545 #, fuzzy msgid "Connection established.\n" msgstr " Verbindung fehlgeschlagen\n" -#: src/conversation/gnunet-helper-audio-playback.c:637 +#: src/conversation/gnunet-helper-audio-playback.c:642 #: src/conversation/gnunet-helper-audio-record.c:550 #, c-format msgid "pa_stream_new() failed: %s\n" msgstr "pa_stream_new() fehlgeschlagen: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:651 +#: src/conversation/gnunet-helper-audio-playback.c:656 #, c-format msgid "pa_stream_connect_playback() failed: %s\n" msgstr "pa_stream_connect_playback() fehlgeschlagen: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:664 +#: src/conversation/gnunet-helper-audio-playback.c:669 #: src/conversation/gnunet-helper-audio-record.c:576 #, c-format msgid "Connection failure: %s\n" msgstr "Verbindung fehlgeschlagen: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:685 +#: src/conversation/gnunet-helper-audio-playback.c:690 #: src/conversation/gnunet-helper-audio-record.c:599 msgid "Wrong Spec\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:691 +#: src/conversation/gnunet-helper-audio-playback.c:696 #: src/conversation/gnunet-helper-audio-record.c:605 msgid "pa_mainloop_new() failed.\n" msgstr "pa_mainloop_new() fehlgeschlagen.\n" -#: src/conversation/gnunet-helper-audio-playback.c:705 +#: src/conversation/gnunet-helper-audio-playback.c:710 #: src/conversation/gnunet-helper-audio-record.c:620 msgid "pa_context_new() failed.\n" msgstr "pa_context_new() fehlgeschlagen.\n" -#: src/conversation/gnunet-helper-audio-playback.c:712 +#: src/conversation/gnunet-helper-audio-playback.c:717 #: src/conversation/gnunet-helper-audio-record.c:626 #, c-format msgid "pa_context_connect() failed: %s\n" msgstr "pa_context_connect() fehlgeschlagen: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:718 +#: src/conversation/gnunet-helper-audio-playback.c:723 #: src/conversation/gnunet-helper-audio-record.c:632 msgid "pa_mainloop_run() failed.\n" msgstr "pa_mainloop_run() fehlgeschlagen.\n" -#: src/conversation/gnunet-helper-audio-playback.c:790 +#: src/conversation/gnunet-helper-audio-playback.c:795 #, c-format msgid "Read error from STDIN: %s\n" msgstr "Fehler beim Lesen aus STDIN: %s\n" @@ -1177,7 +1177,7 @@ msgstr "UDP-Sockets können nicht geöffnet werden\n" msgid "Could not open line, port %s already in use!\n" msgstr "Verbindung zum %s-Dienst ist fehlgeschlagen!\n" -#: src/conversation/microphone.c:119 +#: src/conversation/microphone.c:121 msgid "Could not start record audio helper\n" msgstr "" @@ -1265,25 +1265,25 @@ msgstr "# gap Anfragen verworfen: Kollision in RT" msgid "# dequeuing CAR (duplicate request)" msgstr "" -#: src/core/gnunet-service-core.c:440 +#: src/core/gnunet-service-core.c:443 #, fuzzy, c-format msgid "# bytes of messages of type %u received" msgstr "# Bytes Rauschen empfangen" -#: src/core/gnunet-service-core.c:538 +#: src/core/gnunet-service-core.c:541 msgid "# messages discarded (session disconnected)" msgstr "" -#: src/core/gnunet-service-core.c:876 +#: src/core/gnunet-service-core.c:879 #, fuzzy, c-format msgid "# messages of type %u discarded (client busy)" msgstr "# Bytes Rauschen empfangen" -#: src/core/gnunet-service-core.c:985 +#: src/core/gnunet-service-core.c:988 msgid "Core service is lacking HOSTKEY configuration setting. Exiting.\n" msgstr "" -#: src/core/gnunet-service-core.c:1006 +#: src/core/gnunet-service-core.c:1009 #, fuzzy, c-format msgid "Core service of `%s' ready.\n" msgstr "Dienst »%s« wird neu gestartet.\n" @@ -1296,305 +1296,175 @@ msgstr "# Bytes verschlüsselt" msgid "# bytes decrypted" msgstr "# Bytes entschlüsselt" -#: src/core/gnunet-service-core_kx.c:725 +#: src/core/gnunet-service-core_kx.c:728 msgid "# PAYLOAD dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:775 +#: src/core/gnunet-service-core_kx.c:778 msgid "# key exchanges initiated" msgstr "" -#: src/core/gnunet-service-core_kx.c:837 +#: src/core/gnunet-service-core_kx.c:840 msgid "# key exchanges stopped" msgstr "" -#: src/core/gnunet-service-core_kx.c:871 +#: src/core/gnunet-service-core_kx.c:874 #, fuzzy msgid "# PING messages transmitted" msgstr "# PING Nachrichten erstellt" -#: src/core/gnunet-service-core_kx.c:938 +#: src/core/gnunet-service-core_kx.c:941 msgid "# old ephemeral keys ignored" msgstr "" -#: src/core/gnunet-service-core_kx.c:945 +#: src/core/gnunet-service-core_kx.c:948 #, fuzzy msgid "# ephemeral keys received" msgstr "# verschlüsselter PONG Nachrichten empfangen" -#: src/core/gnunet-service-core_kx.c:984 +#: src/core/gnunet-service-core_kx.c:987 #, c-format msgid "" "Ephemeral key message from peer `%s' rejected as its validity range does not " "match our system time (%llu not in [%llu,%llu]).\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:995 +#: src/core/gnunet-service-core_kx.c:998 #, fuzzy msgid "# EPHEMERAL_KEY messages received" msgstr "# verschlüsselter PONG Nachrichten empfangen" -#: src/core/gnunet-service-core_kx.c:1091 -#: src/transport/gnunet-service-transport_validation.c:1119 +#: src/core/gnunet-service-core_kx.c:1094 +#: src/transport/gnunet-service-transport_validation.c:1128 #, fuzzy msgid "# PING messages received" msgstr "# PING Nachrichten erstellt" -#: src/core/gnunet-service-core_kx.c:1100 +#: src/core/gnunet-service-core_kx.c:1103 #, fuzzy msgid "# PING messages dropped (out of order)" msgstr "# PING Nachrichten erstellt" -#: src/core/gnunet-service-core_kx.c:1158 +#: src/core/gnunet-service-core_kx.c:1161 #, fuzzy msgid "# PONG messages created" msgstr "# PING Nachrichten erstellt" -#: src/core/gnunet-service-core_kx.c:1184 +#: src/core/gnunet-service-core_kx.c:1187 msgid "# sessions terminated by timeout" msgstr "" -#: src/core/gnunet-service-core_kx.c:1197 +#: src/core/gnunet-service-core_kx.c:1200 #, fuzzy msgid "# keepalive messages sent" msgstr "# Klartext PING Nachrichten gesendet" -#: src/core/gnunet-service-core_kx.c:1261 -#: src/transport/gnunet-service-transport_validation.c:1442 +#: src/core/gnunet-service-core_kx.c:1264 +#: src/transport/gnunet-service-transport_validation.c:1461 #, fuzzy msgid "# PONG messages received" msgstr "# verschlüsselter PONG Nachrichten empfangen" -#: src/core/gnunet-service-core_kx.c:1268 +#: src/core/gnunet-service-core_kx.c:1271 msgid "# PONG messages dropped (connection down)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1273 +#: src/core/gnunet-service-core_kx.c:1276 #, fuzzy msgid "# PONG messages dropped (out of order)" msgstr "# PING Nachrichten erstellt" -#: src/core/gnunet-service-core_kx.c:1308 +#: src/core/gnunet-service-core_kx.c:1311 #, fuzzy msgid "# PONG messages decrypted" msgstr "# PING Nachrichten erstellt" -#: src/core/gnunet-service-core_kx.c:1346 +#: src/core/gnunet-service-core_kx.c:1349 #, fuzzy msgid "# session keys confirmed via PONG" msgstr "# Knotenankündigungen empfangen" -#: src/core/gnunet-service-core_kx.c:1357 +#: src/core/gnunet-service-core_kx.c:1360 #, fuzzy msgid "# timeouts prevented via PONG" msgstr "# Bytes empfangen über TCP" -#: src/core/gnunet-service-core_kx.c:1364 +#: src/core/gnunet-service-core_kx.c:1367 #, fuzzy -msgid "# rekey operations confirmed via PONG" -msgstr "# Knotenankündigungen empfangen" - -#: src/core/gnunet-service-core_kx.c:1518 -msgid "# DATA message dropped (out of order)" -msgstr "" - -#: src/core/gnunet-service-core_kx.c:1526 -#, c-format -msgid "" -"Session to peer `%s' went down due to key expiration (should not happen)\n" -msgstr "" - -#: src/core/gnunet-service-core_kx.c:1529 -msgid "# sessions terminated by key expiration" -msgstr "" - -#: src/core/gnunet-service-core_kx.c:1590 -#: src/core/gnunet-service-core_kx.c:1616 -#, fuzzy -msgid "# bytes dropped (duplicates)" -msgstr "# Bytes verworfen von TCP (ausgehend)" - -#: src/core/gnunet-service-core_kx.c:1603 -#, fuzzy -msgid "# bytes dropped (out of sequence)" -msgstr "# Bytes verworfen von TCP (ausgehend)" - -#: src/core/gnunet-service-core_kx.c:1645 -#, fuzzy -msgid "# bytes dropped (ancient message)" -msgstr "# Bytes verworfen von TCP (ausgehend)" - -#: src/core/gnunet-service-core_kx.c:1653 -#, fuzzy -msgid "# bytes of payload decrypted" -msgstr "# Bytes entschlüsselt" - -#: src/core/gnunet-service-core_sessions.c:266 -#: src/core/gnunet-service-core_sessions.c:356 -#: src/dht/gnunet-service-dht_neighbours.c:733 -#: src/dht/gnunet-service-dht_neighbours.c:795 -#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1520 -#: src/topology/gnunet-daemon-topology.c:612 -#: src/topology/gnunet-daemon-topology.c:714 -#: src/transport/gnunet-service-transport_neighbours.c:719 -#: src/transport/gnunet-service-transport_neighbours.c:727 -msgid "# peers connected" -msgstr "# verbundener Knoten" - -#: src/core/gnunet-service-core_sessions.c:302 -#, fuzzy -msgid "# type map refreshes sent" -msgstr "# p2p Trace-Antworten gesendet" - -#: src/core/gnunet-service-core_sessions.c:422 -#, fuzzy -msgid "# outdated typemap confirmations received" -msgstr "# Bytes empfangen über TCP" - -#: src/core/gnunet-service-core_sessions.c:439 -#, fuzzy -msgid "# valid typemap confirmations received" -msgstr "# Bytes empfangen über TCP" - -#: src/core/gnunet-service-core_typemap.c:169 -#: src/core/gnunet-service-core_typemap.c:181 -#, fuzzy -msgid "# type maps received" -msgstr "# Bytes empfangen über TCP" - -#: src/core/gnunet-service-core_typemap.c:212 -msgid "# updates to my type map" -msgstr "" - -#: src/credential/credential_misc.c:88 -#, fuzzy, c-format -msgid "Unable to parse CRED record string `%s'\n" -msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" - -#: src/credential/gnunet-credential.c:278 src/namestore/gnunet-namestore.c:776 -#: src/namestore/plugin_rest_namestore.c:1009 -#, fuzzy, c-format -msgid "Ego `%s' not known to identity service\n" -msgstr "`%s': unbekannter Dienst: %s\n" - -#: src/credential/gnunet-credential.c:294 -#: src/credential/gnunet-credential.c:446 -#, c-format -msgid "Issuer public key `%s' is not well-formed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:375 -#: src/credential/gnunet-credential.c:435 -#, fuzzy, c-format -msgid "Issuer public key not well-formed\n" -msgstr "Ungültiger Parameter: `%s'\n" - -#: src/credential/gnunet-credential.c:386 -#: src/credential/gnunet-credential.c:455 -#, fuzzy, c-format -msgid "Failed to connect to CREDENTIAL\n" -msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" - -#: src/credential/gnunet-credential.c:392 -#, c-format -msgid "You must provide issuer the attribute\n" -msgstr "" - -#: src/credential/gnunet-credential.c:399 -#, fuzzy, c-format -msgid "ego required\n" -msgstr "Gültiger Typ ist erforderlich\n" - -#: src/credential/gnunet-credential.c:415 -#, c-format -msgid "Subject public key needed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:426 -#, c-format -msgid "Subject public key `%s' is not well-formed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:461 -#, c-format -msgid "You must provide issuer and subject attributes\n" -msgstr "" - -#: src/credential/gnunet-credential.c:511 -#, fuzzy, c-format -msgid "Issuer ego required\n" -msgstr "Gültiger Typ ist erforderlich\n" - -#: src/credential/gnunet-credential.c:523 -#, c-format -msgid "Please specify name to lookup, subject key and issuer key!\n" -msgstr "" - -#: src/credential/gnunet-credential.c:543 -msgid "create credential" -msgstr "" - -#: src/credential/gnunet-credential.c:547 -msgid "verify credential against attribute" -msgstr "" - -#: src/credential/gnunet-credential.c:552 -#, fuzzy -msgid "The public key of the subject to lookup the credential for" -msgstr "Die Priorität des Inhalts angeben" +msgid "# rekey operations confirmed via PONG" +msgstr "# Knotenankündigungen empfangen" -#: src/credential/gnunet-credential.c:557 -msgid "The name of the credential presented by the subject" +#: src/core/gnunet-service-core_kx.c:1521 +msgid "# DATA message dropped (out of order)" msgstr "" -#: src/credential/gnunet-credential.c:562 -msgid "The public key of the authority to verify the credential against" +#: src/core/gnunet-service-core_kx.c:1529 +#, c-format +msgid "" +"Session to peer `%s' went down due to key expiration (should not happen)\n" msgstr "" -#: src/credential/gnunet-credential.c:567 -msgid "The ego to use" +#: src/core/gnunet-service-core_kx.c:1532 +msgid "# sessions terminated by key expiration" msgstr "" -#: src/credential/gnunet-credential.c:572 -msgid "The issuer attribute to verify against or to issue" -msgstr "" +#: src/core/gnunet-service-core_kx.c:1593 +#: src/core/gnunet-service-core_kx.c:1619 +#, fuzzy +msgid "# bytes dropped (duplicates)" +msgstr "# Bytes verworfen von TCP (ausgehend)" -#: src/credential/gnunet-credential.c:577 -msgid "The time to live for the credential" -msgstr "" +#: src/core/gnunet-service-core_kx.c:1606 +#, fuzzy +msgid "# bytes dropped (out of sequence)" +msgstr "# Bytes verworfen von TCP (ausgehend)" -#: src/credential/gnunet-credential.c:581 -msgid "collect credentials" -msgstr "" +#: src/core/gnunet-service-core_kx.c:1648 +#, fuzzy +msgid "# bytes dropped (ancient message)" +msgstr "# Bytes verworfen von TCP (ausgehend)" -#: src/credential/gnunet-credential.c:595 +#: src/core/gnunet-service-core_kx.c:1656 #, fuzzy -msgid "GNUnet credential resolver tool" -msgstr "GNUnet Netzwerk Topologie tracen." +msgid "# bytes of payload decrypted" +msgstr "# Bytes entschlüsselt" -#: src/credential/gnunet-service-credential.c:1204 -#: src/gns/gnunet-gns-helper-service-w32.c:727 src/gns/gnunet-gns.c:355 -#, fuzzy, c-format -msgid "Failed to connect to GNS\n" -msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" +#: src/core/gnunet-service-core_sessions.c:260 +#: src/core/gnunet-service-core_sessions.c:350 +#: src/dht/gnunet-service-dht_neighbours.c:733 +#: src/dht/gnunet-service-dht_neighbours.c:795 +#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1520 +#: src/topology/gnunet-daemon-topology.c:612 +#: src/topology/gnunet-daemon-topology.c:714 +#: src/transport/gnunet-service-transport_neighbours.c:719 +#: src/transport/gnunet-service-transport_neighbours.c:727 +msgid "# peers connected" +msgstr "# verbundener Knoten" -#: src/credential/gnunet-service-credential.c:1210 -#: src/namestore/gnunet-namestore-fcfsd.c:1034 -#: src/namestore/gnunet-namestore.c:802 -#: src/namestore/plugin_rest_namestore.c:1022 -#, fuzzy, c-format -msgid "Failed to connect to namestore\n" -msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" +#: src/core/gnunet-service-core_sessions.c:296 +#, fuzzy +msgid "# type map refreshes sent" +msgstr "# p2p Trace-Antworten gesendet" -#: src/credential/plugin_gnsrecord_credential.c:186 -#, fuzzy, c-format -msgid "Unable to parse ATTR record string `%s'\n" -msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" +#: src/core/gnunet-service-core_sessions.c:416 +#, fuzzy +msgid "# outdated typemap confirmations received" +msgstr "# Bytes empfangen über TCP" -#: src/credential/plugin_rest_credential.c:1155 src/gns/plugin_rest_gns.c:668 +#: src/core/gnunet-service-core_sessions.c:433 #, fuzzy -msgid "GNS REST API initialized\n" -msgstr " Verbindung fehlgeschlagen\n" +msgid "# valid typemap confirmations received" +msgstr "# Bytes empfangen über TCP" + +#: src/core/gnunet-service-core_typemap.c:169 +#: src/core/gnunet-service-core_typemap.c:181 +#, fuzzy +msgid "# type maps received" +msgstr "# Bytes empfangen über TCP" + +#: src/core/gnunet-service-core_typemap.c:212 +msgid "# updates to my type map" +msgstr "" #: src/datacache/datacache.c:119 src/datacache/datacache.c:294 #: src/datastore/gnunet-service-datastore.c:757 @@ -1641,9 +1511,8 @@ msgstr "" #: src/datacache/plugin_datacache_sqlite.c:122 #: src/datastore/plugin_datastore_mysql.c:892 #: src/datastore/plugin_datastore_sqlite.c:58 -#: src/datastore/plugin_datastore_sqlite.c:66 -#: src/identity-provider/plugin_identity_provider_sqlite.c:52 src/my/my.c:80 -#: src/my/my.c:92 src/mysql/mysql.c:42 src/mysql/mysql.c:49 +#: src/datastore/plugin_datastore_sqlite.c:66 src/my/my.c:80 src/my/my.c:92 +#: src/mysql/mysql.c:42 src/mysql/mysql.c:49 #: src/namecache/plugin_namecache_sqlite.c:53 #: src/namestore/plugin_namestore_sqlite.c:53 #: src/peerstore/plugin_peerstore_sqlite.c:52 @@ -1661,7 +1530,6 @@ msgstr "»%s« schlug bei %s:%d mit dem Fehler %s fehl\n" #: src/datacache/plugin_datacache_sqlite.c:817 #: src/datastore/plugin_datastore_sqlite.c:456 -#: src/identity-provider/plugin_identity_provider_sqlite.c:336 #: src/namecache/plugin_namecache_sqlite.c:296 #: src/namestore/plugin_namestore_sqlite.c:355 msgid "Tried to close sqlite without finalizing all prepared statements.\n" @@ -1686,7 +1554,7 @@ msgstr "" msgid "# queue entries created" msgstr "# PING Nachrichten erstellt" -#: src/datastore/datastore_api.c:740 +#: src/datastore/datastore_api.c:760 msgid "# status messages received" msgstr "# empfangene Statusmeldungen" @@ -1694,38 +1562,38 @@ msgstr "# empfangene Statusmeldungen" msgid "# Results received" msgstr "# empfangene Ergebnisse" -#: src/datastore/datastore_api.c:941 +#: src/datastore/datastore_api.c:920 msgid "# datastore connections (re)created" msgstr "" -#: src/datastore/datastore_api.c:1055 +#: src/datastore/datastore_api.c:1034 #, fuzzy msgid "# PUT requests executed" msgstr "# dht Anfragen weitergeleitet" -#: src/datastore/datastore_api.c:1116 +#: src/datastore/datastore_api.c:1095 #, fuzzy msgid "# RESERVE requests executed" msgstr "# dht Anfragen weitergeleitet" -#: src/datastore/datastore_api.c:1181 +#: src/datastore/datastore_api.c:1160 msgid "# RELEASE RESERVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1259 +#: src/datastore/datastore_api.c:1238 #, fuzzy msgid "# REMOVE requests executed" msgstr "# dht Anfragen weitergeleitet" -#: src/datastore/datastore_api.c:1319 +#: src/datastore/datastore_api.c:1298 msgid "# GET REPLICATION requests executed" msgstr "" -#: src/datastore/datastore_api.c:1381 +#: src/datastore/datastore_api.c:1360 msgid "# GET ZERO ANONYMITY requests executed" msgstr "" -#: src/datastore/datastore_api.c:1462 +#: src/datastore/datastore_api.c:1441 msgid "# GET requests executed" msgstr "# ausgeführte GET-Anfragen" @@ -2002,7 +1870,6 @@ msgid "`%s' failed at %s:%u with error: %s" msgstr "`%s' schlug bei %s:%d mit dem Fehler %s fehl\n" #: src/datastore/plugin_datastore_sqlite.c:271 -#: src/identity-provider/plugin_identity_provider_sqlite.c:212 #: src/namecache/plugin_namecache_sqlite.c:194 #: src/namestore/plugin_namestore_sqlite.c:222 #: src/peerstore/plugin_peerstore_sqlite.c:535 @@ -2027,7 +1894,6 @@ msgid "" msgstr "" #: src/datastore/plugin_datastore_sqlite.c:1337 -#: src/identity-provider/plugin_identity_provider_sqlite.c:711 #: src/namecache/plugin_namecache_sqlite.c:603 #: src/namestore/plugin_namestore_sqlite.c:802 msgid "Sqlite database running\n" @@ -2094,6 +1960,51 @@ msgstr "" msgid "Prints all packets that go through the DHT." msgstr "" +#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:253 +#, c-format +msgid "Exiting as the number of peers is %u\n" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1188 +#, fuzzy +msgid "number of peers to start" +msgstr "Anzahl an Durchläufen" + +#: src/dht/gnunet_dht_profiler.c:1194 +msgid "" +"maximum number of times we try to search for successor circle formation (0 " +"for R5N)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 +#: src/testbed/gnunet-testbed-profiler.c:304 +msgid "name of the file with the login information for the testbed" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1206 +msgid "delay between rounds for collecting statistics (default: 30 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1212 +msgid "delay to start doing PUTs (default: 1 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1218 +msgid "delay to start doing GETs (default: 5 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1223 +msgid "replication degree for DHT PUTs" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1230 +msgid "timeout for DHT PUT and GET requests (default: 1 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1248 +msgid "Measure quality and performance of the DHT service." +msgstr "" + #: src/dht/gnunet-dht-put.c:120 msgid "PUT request sent with key" msgstr "" @@ -2360,51 +2271,6 @@ msgstr "" msgid "# DHT requests combined" msgstr "# dht Anfragen weitergeleitet" -#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:255 -#, c-format -msgid "Exiting as the number of peers is %u\n" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1188 -#, fuzzy -msgid "number of peers to start" -msgstr "Anzahl an Durchläufen" - -#: src/dht/gnunet_dht_profiler.c:1194 -msgid "" -"maximum number of times we try to search for successor circle formation (0 " -"for R5N)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 -#: src/testbed/gnunet-testbed-profiler.c:305 -msgid "name of the file with the login information for the testbed" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1206 -msgid "delay between rounds for collecting statistics (default: 30 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1212 -msgid "delay to start doing PUTs (default: 1 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1218 -msgid "delay to start doing GETs (default: 5 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1223 -msgid "replication degree for DHT PUTs" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1230 -msgid "timeout for DHT PUT and GET requests (default: 1 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1248 -msgid "Measure quality and performance of the DHT service." -msgstr "" - #: src/dht/plugin_block_dht.c:187 #, fuzzy, c-format msgid "Block not of type %u\n" @@ -2949,7 +2815,7 @@ msgstr "Fehler beim Empfangen der Antwort von gnunetd auf die `%s' Nachricht\n" msgid "Failed to not connect to `%s' service.\n" msgstr "`%s' Dienst konnte nicht initialisiert werden.\n" -#: src/fs/fs_misc.c:126 +#: src/fs/fs_misc.c:128 #, fuzzy, c-format msgid "Did not find mime type `%s' in extension list.\n" msgstr "Knoten `%s' konnte nicht in der Routing Tabelle gefunden werden!\n" @@ -3389,6 +3255,15 @@ msgid "" "chk/...)" msgstr "" +#: src/fs/gnunet-fs.c:119 +msgid "print a list of all indexed files" +msgstr "" + +#: src/fs/gnunet-fs.c:130 +#, fuzzy +msgid "Special file-sharing operations" +msgstr "Alle Optionen anzeigen" + #: src/fs/gnunet-fs-profiler.c:211 msgid "run the experiment with COUNT peers" msgstr "" @@ -3405,15 +3280,6 @@ msgstr "" msgid "run a testbed to measure file-sharing performance" msgstr "" -#: src/fs/gnunet-fs.c:119 -msgid "print a list of all indexed files" -msgstr "" - -#: src/fs/gnunet-fs.c:130 -#, fuzzy -msgid "Special file-sharing operations" -msgstr "Alle Optionen anzeigen" - #: src/fs/gnunet-publish.c:219 src/fs/gnunet-publish.c:231 #, c-format msgid "Publishing `%s' at %llu/%llu (%s remaining)\n" @@ -4113,11 +3979,22 @@ msgstr "" msgid "GNUnet DNS-to-GNS proxy (a DNS server)" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:602 -msgid "Not ready to process requests, lacking ego data\n" +#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 +#, c-format +msgid "Invalid typename specified, assuming `ANY'\n" +msgstr "" + +#: src/gns/gnunet-gns.c:252 +#, c-format +msgid "Please specify name to lookup!\n" +msgstr "" + +#: src/gns/gnunet-gns.c:276 +#, c-format +msgid "Ego for `%s' not found, cannot perform lookup.\n" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:701 src/gns/gnunet-gns.c:315 +#: src/gns/gnunet-gns.c:315 src/gns/gnunet-gns-helper-service-w32.c:701 #: src/gns/plugin_rest_gns.c:422 #, c-format msgid "" @@ -4125,6 +4002,50 @@ msgid "" "gns-import.sh?\n" msgstr "" +#: src/gns/gnunet-gns.c:355 src/gns/gnunet-gns-helper-service-w32.c:727 +#, fuzzy, c-format +msgid "Failed to connect to GNS\n" +msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" + +#: src/gns/gnunet-gns.c:374 +#, c-format +msgid "Public key `%s' is not well-formed\n" +msgstr "" + +#: src/gns/gnunet-gns.c:428 +msgid "Lookup a record for the given name" +msgstr "" + +#: src/gns/gnunet-gns.c:434 +#, fuzzy +msgid "Specify the type of the record to lookup" +msgstr "Die Priorität des Inhalts angeben" + +#: src/gns/gnunet-gns.c:440 +msgid "Specify timeout for the lookup" +msgstr "" + +#: src/gns/gnunet-gns.c:445 +msgid "No unneeded output" +msgstr "" + +#: src/gns/gnunet-gns.c:451 +msgid "Specify the public key of the zone to lookup the record in" +msgstr "" + +#: src/gns/gnunet-gns.c:457 +msgid "Specify the name of the ego of the zone to lookup the record in" +msgstr "" + +#: src/gns/gnunet-gns.c:476 +#, fuzzy +msgid "GNUnet GNS resolver tool" +msgstr "GNUnet Netzwerk Topologie tracen." + +#: src/gns/gnunet-gns-helper-service-w32.c:602 +msgid "Not ready to process requests, lacking ego data\n" +msgstr "" + #: src/gns/gnunet-gns-helper-service-w32.c:739 #, fuzzy, c-format msgid "Failed to connect to identity service\n" @@ -4149,162 +4070,112 @@ msgstr "" msgid "%s failed at %s:%d: `%s'\n" msgstr "»%s« schlug fehl bei %s:%d mit dem Fehler: »%s«.\n" -#: src/gns/gnunet-gns-proxy.c:878 +#: src/gns/gnunet-gns-proxy.c:887 #, c-format msgid "Unsupported CURL SSL backend %d\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:901 +#: src/gns/gnunet-gns-proxy.c:910 #, fuzzy, c-format msgid "Failed to fetch CN from cert: %s\n" msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n" -#: src/gns/gnunet-gns-proxy.c:924 +#: src/gns/gnunet-gns-proxy.c:933 #, fuzzy, c-format msgid "Failed to initialize DANE: %s\n" msgstr "SQLite Datenbank konnte nicht initialisiert werden.\n" -#: src/gns/gnunet-gns-proxy.c:937 +#: src/gns/gnunet-gns-proxy.c:946 #, fuzzy, c-format msgid "Failed to parse DANE record: %s\n" msgstr "Dateiformat fehlerhaft (kein GNUnet Verzeichnis?)\n" -#: src/gns/gnunet-gns-proxy.c:952 +#: src/gns/gnunet-gns-proxy.c:961 #, fuzzy, c-format msgid "Failed to verify TLS connection using DANE: %s\n" msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" -#: src/gns/gnunet-gns-proxy.c:962 +#: src/gns/gnunet-gns-proxy.c:971 #, c-format msgid "Failed DANE verification failed with GnuTLS verify status code: %u\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:986 +#: src/gns/gnunet-gns-proxy.c:995 #, c-format msgid "SSL certificate subject name (%s) does not match `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1095 +#: src/gns/gnunet-gns-proxy.c:1104 #, c-format msgid "Cookie domain `%s' supplied by server is invalid\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1699 +#: src/gns/gnunet-gns-proxy.c:1709 #, fuzzy, c-format msgid "Unsupported HTTP method `%s'\n" msgstr "Kommando `%s' wird nicht unterstützt. Vorgang wird abgebrochen.\n" -#: src/gns/gnunet-gns-proxy.c:2162 +#: src/gns/gnunet-gns-proxy.c:2172 #, fuzzy, c-format msgid "Unable to import private key from file `%s'\n" msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" -#: src/gns/gnunet-gns-proxy.c:2192 +#: src/gns/gnunet-gns-proxy.c:2202 #, fuzzy, c-format msgid "Unable to import certificate %s\n" msgstr "SQLite Datenbank konnte nicht initialisiert werden: %s.\n" -#: src/gns/gnunet-gns-proxy.c:2365 +#: src/gns/gnunet-gns-proxy.c:2375 #, fuzzy, c-format msgid "Failed to start HTTPS server for `%s'\n" msgstr "Der Transportdienst auf Port %d konnte nicht gestartet werden.\n" -#: src/gns/gnunet-gns-proxy.c:2384 src/rest/gnunet-rest-server.c:533 +#: src/gns/gnunet-gns-proxy.c:2394 src/rest/gnunet-rest-server.c:533 #, fuzzy msgid "Failed to pass client to MHD\n" msgstr "Fehler beim Starten der Collection.\n" -#: src/gns/gnunet-gns-proxy.c:2704 +#: src/gns/gnunet-gns-proxy.c:2716 #, c-format msgid "Unsupported socks version %d\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2733 +#: src/gns/gnunet-gns-proxy.c:2745 #, fuzzy, c-format msgid "Unsupported socks command %d\n" msgstr "Kommando `%s' wird nicht unterstützt. Vorgang wird abgebrochen.\n" -#: src/gns/gnunet-gns-proxy.c:2751 src/gns/gnunet-gns-proxy.c:2780 +#: src/gns/gnunet-gns-proxy.c:2763 src/gns/gnunet-gns-proxy.c:2792 msgid "SSL connection to plain IPv4 address requested\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2830 -#, c-format -msgid "Unsupported socks address type %d\n" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3165 src/gns/gnunet-service-gns.c:403 -#, c-format -msgid "No ego configured for `%s`\n" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3226 -#, fuzzy, c-format -msgid "Failed to load SSL/TLS key and certificate from `%s'\n" -msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n" - -#: src/gns/gnunet-gns-proxy.c:3269 -msgid "listen on specified port (default: 7777)" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3275 -msgid "pem file to use as CA" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3300 -msgid "GNUnet GNS proxy" -msgstr "" - -#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 -#, c-format -msgid "Invalid typename specified, assuming `ANY'\n" -msgstr "" - -#: src/gns/gnunet-gns.c:252 -#, c-format -msgid "Please specify name to lookup!\n" -msgstr "" - -#: src/gns/gnunet-gns.c:276 +#: src/gns/gnunet-gns-proxy.c:2842 #, c-format -msgid "Ego for `%s' not found, cannot perform lookup.\n" +msgid "Unsupported socks address type %d\n" msgstr "" -#: src/gns/gnunet-gns.c:374 +#: src/gns/gnunet-gns-proxy.c:3177 src/gns/gnunet-service-gns.c:403 #, c-format -msgid "Public key `%s' is not well-formed\n" -msgstr "" - -#: src/gns/gnunet-gns.c:428 -msgid "Lookup a record for the given name" +msgid "No ego configured for `%s`\n" msgstr "" -#: src/gns/gnunet-gns.c:434 -#, fuzzy -msgid "Specify the type of the record to lookup" -msgstr "Die Priorität des Inhalts angeben" - -#: src/gns/gnunet-gns.c:440 -msgid "Specify timeout for the lookup" -msgstr "" +#: src/gns/gnunet-gns-proxy.c:3238 +#, fuzzy, c-format +msgid "Failed to load SSL/TLS key and certificate from `%s'\n" +msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n" -#: src/gns/gnunet-gns.c:445 -msgid "No unneeded output" +#: src/gns/gnunet-gns-proxy.c:3281 +msgid "listen on specified port (default: 7777)" msgstr "" -#: src/gns/gnunet-gns.c:451 -msgid "Specify the public key of the zone to lookup the record in" +#: src/gns/gnunet-gns-proxy.c:3287 +msgid "pem file to use as CA" msgstr "" -#: src/gns/gnunet-gns.c:457 -msgid "Specify the name of the ego of the zone to lookup the record in" +#: src/gns/gnunet-gns-proxy.c:3312 +msgid "GNUnet GNS proxy" msgstr "" -#: src/gns/gnunet-gns.c:476 -#, fuzzy -msgid "GNUnet GNS resolver tool" -msgstr "GNUnet Netzwerk Topologie tracen." - #: src/gns/gnunet-service-gns.c:442 #, fuzzy msgid "Failed to connect to the namecache!\n" @@ -4370,35 +4241,45 @@ msgstr "" msgid "Hostname `%s' is not well-formed, resolution fails\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:179 +#: src/gns/plugin_gnsrecord_gns.c:203 #, c-format msgid "Unable to parse PKEY record `%s'\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:208 +#: src/gns/plugin_gnsrecord_gns.c:232 #, fuzzy, c-format msgid "Unable to parse GNS2DNS record `%s'\n" msgstr "Dateiformat fehlerhaft (kein GNUnet Verzeichnis?)\n" -#: src/gns/plugin_gnsrecord_gns.c:229 +#: src/gns/plugin_gnsrecord_gns.c:253 #, c-format msgid "Failed to serialize GNS2DNS record with value `%s'\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:252 +#: src/gns/plugin_gnsrecord_gns.c:276 #, fuzzy, c-format msgid "Unable to parse VPN record string `%s'\n" msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" -#: src/gns/plugin_gnsrecord_gns.c:288 +#: src/gns/plugin_gnsrecord_gns.c:312 #, fuzzy, c-format msgid "Unable to parse BOX record string `%s'\n" msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" +#: src/gns/plugin_gnsrecord_gns.c:360 +#, fuzzy, c-format +msgid "Unable to parse REVERSE record string `%s'\n" +msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" + #: src/gns/plugin_rest_gns.c:384 msgid "Ego for not found, cannot perform lookup.\n" msgstr "" +#: src/gns/plugin_rest_gns.c:668 +#, fuzzy +msgid "GNS REST API initialized\n" +msgstr " Verbindung fehlgeschlagen\n" + #: src/gnsrecord/plugin_gnsrecord_dns.c:359 #, c-format msgid "Unable to parse IPv4 address `%s'\n" @@ -4506,34 +4387,34 @@ msgstr "PID konnte nicht in Datei `%s' geschrieben werden: %s.\n" msgid "Modified %u addresses, wrote %u bytes\n" msgstr "" -#: src/hello/hello.c:1103 +#: src/hello/hello.c:1110 msgid "Failed to parse HELLO message: missing expiration time\n" msgstr "" -#: src/hello/hello.c:1112 +#: src/hello/hello.c:1119 msgid "Failed to parse HELLO message: invalid expiration time\n" msgstr "" -#: src/hello/hello.c:1122 +#: src/hello/hello.c:1129 #, fuzzy msgid "Failed to parse HELLO message: malformed\n" msgstr "Fehler beim Senden der `%s' Nachricht an gnunetd\n" -#: src/hello/hello.c:1133 +#: src/hello/hello.c:1140 msgid "Failed to parse HELLO message: missing transport plugin\n" msgstr "" -#: src/hello/hello.c:1151 +#: src/hello/hello.c:1158 #, fuzzy, c-format msgid "Plugin `%s' not found, skipping address\n" msgstr "Kommando `%s' wurde nicht gefunden!\n" -#: src/hello/hello.c:1159 +#: src/hello/hello.c:1166 #, c-format msgid "Plugin `%s' does not support URIs yet\n" msgstr "" -#: src/hello/hello.c:1174 +#: src/hello/hello.c:1181 #, fuzzy, c-format msgid "Failed to parse `%s' as an address for plugin `%s'\n" msgstr "Fehler beim Aktualisieren der Daten des Moduls `%s'\n" @@ -4787,7 +4668,7 @@ msgid "# hostlist advertisements send" msgstr "# Bekanntmachungen von anderen übertragen" #: src/hostlist/gnunet-daemon-hostlist_server.c:679 -#: src/transport/gnunet-service-transport.c:2803 +#: src/transport/gnunet-service-transport.c:2815 #, fuzzy msgid "Could not access PEERINFO service. Exiting.\n" msgstr "Auf die Namespace Informationen konnte nicht zugegriffen werden.\n" @@ -4830,53 +4711,6 @@ msgstr "»%s« ist keine gültige IP-Adresse.\n" msgid "Could not start hostlist HTTP server on port %u\n" msgstr "Der Transportdienst auf Port %d konnte nicht gestartet werden.\n" -#: src/identity-provider/gnunet-idp.c:348 -#, fuzzy -msgid "Ego is required\n" -msgstr "Option `%s' macht keinen Sinn ohne die Option `%s'.\n" - -#: src/identity-provider/gnunet-idp.c:370 -msgid "Add attribute" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:376 -msgid "Attribute value" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:381 -msgid "Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:386 -msgid "Audience (relying party)" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:390 -msgid "List attributes for Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:395 -msgid "Issue a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:400 -msgid "Consume a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:405 -msgid "Revoke a ticket" -msgstr "" - -#: src/identity-provider/identity_provider_api.c:429 -#, fuzzy -msgid "failed to store record\n" -msgstr "Zustellung der Nachricht `%s' fehlgeschlagen.\n" - -#: src/identity-provider/plugin_rest_identity_provider.c:1175 -#, fuzzy -msgid "Identity Provider REST API initialized\n" -msgstr " Verbindung fehlgeschlagen\n" - #: src/identity/gnunet-identity.c:179 #, fuzzy, c-format msgid "Failed to create ego: %s\n" @@ -4964,10 +4798,33 @@ msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" msgid "Failed to create directory `%s' for storing egos\n" msgstr "Dateiformat fehlerhaft (kein GNUnet Verzeichnis?)\n" -#: src/identity/plugin_rest_identity.c:964 +#: src/identity/plugin_rest_identity.c:967 msgid "Identity REST API initialized\n" msgstr "" +#: src/identity-provider/gnunet-identity-token.c:66 +#, fuzzy +msgid "Option `-t' is required\n" +msgstr "Option `%s' macht keinen Sinn ohne die Option `%s'.\n" + +#: src/identity-provider/gnunet-identity-token.c:77 +#, fuzzy, c-format +msgid "Token `%s' is malformed\n" +msgstr "Schlüssel »%s« ist gültig\n" + +#: src/identity-provider/gnunet-identity-token.c:166 +msgid "GNUid token" +msgstr "" + +#: src/identity-provider/gnunet-identity-token.c:171 +msgid "Print token contents" +msgstr "" + +#: src/identity-provider/plugin_rest_identity_provider.c:1166 +#, fuzzy +msgid "Identity Token REST API initialized\n" +msgstr " Verbindung fehlgeschlagen\n" + #: src/json/json.c:119 #, fuzzy, c-format msgid "Failed to parse JSON in option `%s': %s (%s)\n" @@ -5069,79 +4926,19 @@ msgstr "Zustellung der Nachricht `%s' fehlgeschlagen.\n" msgid "flat plugin running\n" msgstr "Sqlite-Datenbank läuft\n" -#: src/namestore/gnunet-namestore-fcfsd.c:508 -#, fuzzy, c-format -msgid "Unsupported form value `%s'\n" -msgstr "Kommando `%s' wird nicht unterstützt. Vorgang wird abgebrochen.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:535 -#, fuzzy, c-format -msgid "Failed to create record for domain `%s': %s\n" -msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:555 -msgid "Error when mapping zone to name\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:585 -#, c-format -msgid "Found existing name `%s' for the given key\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:662 -#, c-format -msgid "Found %u existing records for domain `%s'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:718 -#, fuzzy, c-format -msgid "Failed to create page for `%s'\n" -msgstr "Fehler beim Aktualisieren der Daten des Moduls `%s'\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:734 -#, fuzzy, c-format -msgid "Failed to setup post processor for `%s'\n" -msgstr "Fehler beim Aktualisieren der Daten des Moduls `%s'\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:770 -msgid "Domain name must not contain `.'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:778 -msgid "Domain name must not contain `+'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:974 -msgid "No ego configured for `fcfsd` subsystem\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:1000 -#, fuzzy -msgid "Failed to start HTTP server\n" -msgstr "Fehler beim Senden einer `%s' Anfrage an den SMTP Server.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1042 -#, fuzzy -msgid "Failed to connect to identity\n" -msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1074 -msgid "GNU Name System First Come First Serve name registration service" -msgstr "" - #: src/namestore/gnunet-namestore.c:301 #, c-format msgid "Adding record failed: %s\n" msgstr "" #: src/namestore/gnunet-namestore.c:330 -#: src/namestore/plugin_rest_namestore.c:567 +#: src/namestore/plugin_rest_namestore.c:562 #, c-format msgid "Deleting record failed, record does not exist%s%s\n" msgstr "" #: src/namestore/gnunet-namestore.c:337 -#: src/namestore/plugin_rest_namestore.c:576 +#: src/namestore/plugin_rest_namestore.c:571 #, c-format msgid "Deleting record failed%s%s\n" msgstr "" @@ -5159,7 +4956,7 @@ msgid "Records already exist under `%s', cannot add `%s' record.\n" msgstr "" #: src/namestore/gnunet-namestore.c:698 -#: src/namestore/plugin_rest_namestore.c:602 +#: src/namestore/plugin_rest_namestore.c:597 #, c-format msgid "There are no records under label `%s' that could be deleted.\n" msgstr "" @@ -5170,11 +4967,24 @@ msgid "" "There are no records under label `%s' that match the request for deletion.\n" msgstr "" +#: src/namestore/gnunet-namestore.c:776 +#: src/namestore/plugin_rest_namestore.c:1004 +#, fuzzy, c-format +msgid "Ego `%s' not known to identity service\n" +msgstr "`%s': unbekannter Dienst: %s\n" + #: src/namestore/gnunet-namestore.c:791 #, c-format msgid "No options given\n" msgstr "" +#: src/namestore/gnunet-namestore.c:802 +#: src/namestore/gnunet-namestore-fcfsd.c:1034 +#: src/namestore/plugin_rest_namestore.c:1017 +#, fuzzy +msgid "Failed to connect to namestore\n" +msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" + #: src/namestore/gnunet-namestore.c:810 src/namestore/gnunet-namestore.c:819 #: src/namestore/gnunet-namestore.c:838 src/namestore/gnunet-namestore.c:861 #: src/namestore/gnunet-namestore.c:915 @@ -5188,14 +4998,14 @@ msgid "add" msgstr "" #: src/namestore/gnunet-namestore.c:829 -#: src/namestore/plugin_rest_namestore.c:676 +#: src/namestore/plugin_rest_namestore.c:671 #, fuzzy, c-format msgid "Unsupported type `%s'\n" msgstr "Kommando `%s' wird nicht unterstützt. Vorgang wird abgebrochen.\n" #: src/namestore/gnunet-namestore.c:851 -#: src/namestore/plugin_rest_namestore.c:694 -#: src/namestore/plugin_rest_namestore.c:734 +#: src/namestore/plugin_rest_namestore.c:689 +#: src/namestore/plugin_rest_namestore.c:729 #, fuzzy, c-format msgid "Value `%s' invalid for record type `%s'\n" msgstr "%s: Symbolwert `%s' ist ungültig für %s\n" @@ -5225,13 +5035,13 @@ msgid "Invalid nick `%s'\n" msgstr "Ungültiger Parameter: `%s'\n" #: src/namestore/gnunet-namestore.c:1051 -#: src/namestore/plugin_rest_namestore.c:1052 +#: src/namestore/plugin_rest_namestore.c:1047 #, c-format msgid "No default ego configured in identity service\n" msgstr "" #: src/namestore/gnunet-namestore.c:1108 -#: src/namestore/plugin_rest_namestore.c:1148 +#: src/namestore/plugin_rest_namestore.c:1143 #, fuzzy, c-format msgid "Cannot connect to identity service\n" msgstr "Verbindung zu %u.%u.%u.%u:%u fehlgeschlagen: %s\n" @@ -5291,6 +5101,66 @@ msgstr "" msgid "name of the ego controlling the zone" msgstr "" +#: src/namestore/gnunet-namestore-fcfsd.c:508 +#, fuzzy, c-format +msgid "Unsupported form value `%s'\n" +msgstr "Kommando `%s' wird nicht unterstützt. Vorgang wird abgebrochen.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:535 +#, fuzzy, c-format +msgid "Failed to create record for domain `%s': %s\n" +msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:555 +msgid "Error when mapping zone to name\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:585 +#, c-format +msgid "Found existing name `%s' for the given key\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:662 +#, c-format +msgid "Found %u existing records for domain `%s'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:718 +#, fuzzy, c-format +msgid "Failed to create page for `%s'\n" +msgstr "Fehler beim Aktualisieren der Daten des Moduls `%s'\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:734 +#, fuzzy, c-format +msgid "Failed to setup post processor for `%s'\n" +msgstr "Fehler beim Aktualisieren der Daten des Moduls `%s'\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:770 +msgid "Domain name must not contain `.'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:778 +msgid "Domain name must not contain `+'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:974 +msgid "No ego configured for `fcfsd` subsystem\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:1000 +#, fuzzy +msgid "Failed to start HTTP server\n" +msgstr "Fehler beim Senden einer `%s' Anfrage an den SMTP Server.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1042 +#, fuzzy +msgid "Failed to connect to identity\n" +msgstr "Es konnte keine Verbindung mit gnunetd hergestellt werden.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1074 +msgid "GNU Name System First Come First Serve name registration service" +msgstr "" + #: src/namestore/gnunet-service-namestore.c:615 #, c-format msgid "Failed to replicate block in namecache: %s\n" @@ -5305,7 +5175,7 @@ msgstr "" msgid "flat file database running\n" msgstr "Sqlite-Datenbank läuft\n" -#: src/namestore/plugin_rest_namestore.c:1193 +#: src/namestore/plugin_rest_namestore.c:1188 #, fuzzy msgid "Namestore REST API initialized\n" msgstr " Verbindung fehlgeschlagen\n" @@ -5590,43 +5460,100 @@ msgstr "Fehler beim Starten der Collection.\n" msgid "`external-ip' command not found\n" msgstr "Kommando `%s' wurde nicht gefunden!\n" -#: src/nat/gnunet-service-nat_mini.c:656 -#, fuzzy -msgid "`upnpc' command not found\n" -msgstr "Kommando `%s' wurde nicht gefunden!\n" +#: src/nat/gnunet-service-nat_mini.c:656 +#, fuzzy +msgid "`upnpc' command not found\n" +msgstr "Kommando `%s' wurde nicht gefunden!\n" + +#: src/nse/gnunet-nse.c:122 +msgid "Show network size estimates from NSE service." +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:842 +msgid "limit to the number of connections to NSE services, 0 for none" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:847 +msgid "name of the file for writing connection information and statistics" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:859 +msgid "name of the file for writing the main results" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:866 +msgid "Number of peers to run in each round, separated by commas" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:877 +msgid "delay between rounds" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:886 +msgid "Measure quality and performance of the NSE service." +msgstr "" + +#: src/nse/gnunet-service-nse.c:1534 +#: src/revocation/gnunet-service-revocation.c:840 src/util/gnunet-scrypt.c:276 +msgid "Value is too large.\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:178 +#, fuzzy, c-format +msgid "Removing expired address of transport `%s'\n" +msgstr "Verfügbare(r) Transport(e): %s\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:310 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s': %s\n" +msgstr "Datei wurde als `%s' gespeichert.\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:331 +#: src/peerinfo/gnunet-service-peerinfo.c:362 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s'\n" +msgstr "Datei wurde als `%s' gespeichert.\n" -#: src/nse/gnunet-nse-profiler.c:842 -msgid "limit to the number of connections to NSE services, 0 for none" +#: src/peerinfo/gnunet-service-peerinfo.c:446 +msgid "# peers known" msgstr "" -#: src/nse/gnunet-nse-profiler.c:847 -msgid "name of the file for writing connection information and statistics" +#: src/peerinfo/gnunet-service-peerinfo.c:489 +#, c-format +msgid "" +"File `%s' in directory `%s' does not match naming convention. Removed.\n" msgstr "" +"Die Datei »%s« im Verzeichnis »%s« entspricht nicht der Namenskonvention. " +"Die Datei wurde entfernt.\n" -#: src/nse/gnunet-nse-profiler.c:859 -msgid "name of the file for writing the main results" -msgstr "" +#: src/peerinfo/gnunet-service-peerinfo.c:655 +#, fuzzy, c-format +msgid "Scanning directory `%s'\n" +msgstr "==> Verzeichnis `%s':\n" -#: src/nse/gnunet-nse-profiler.c:866 -msgid "Number of peers to run in each round, separated by commas" -msgstr "" +#: src/peerinfo/gnunet-service-peerinfo.c:663 +#, fuzzy, c-format +msgid "Still no peers found in `%s'!\n" +msgstr "Dienst `%s' konnte nicht ordentlich entladen werden!\n" -#: src/nse/gnunet-nse-profiler.c:877 -msgid "delay between rounds" -msgstr "" +#: src/peerinfo/gnunet-service-peerinfo.c:1080 +#, fuzzy, c-format +msgid "Cleaning up directory `%s'\n" +msgstr "==> Verzeichnis `%s':\n" -#: src/nse/gnunet-nse-profiler.c:886 -msgid "Measure quality and performance of the NSE service." +#: src/peerinfo/gnunet-service-peerinfo.c:1409 +#, c-format +msgid "Importing HELLOs from `%s'\n" msgstr "" -#: src/nse/gnunet-nse.c:122 -msgid "Show network size estimates from NSE service." +#: src/peerinfo/gnunet-service-peerinfo.c:1422 +msgid "Skipping import of included HELLOs\n" msgstr "" -#: src/nse/gnunet-service-nse.c:1534 -#: src/revocation/gnunet-service-revocation.c:838 src/util/gnunet-scrypt.c:276 -msgid "Value is too large.\n" -msgstr "" +#: src/peerinfo/peerinfo_api.c:220 +#, fuzzy +msgid "Failed to receive response from `PEERINFO' service." +msgstr "Fehler beim Empfangen der Antwort von gnunetd auf die `%s' Nachricht\n" #: src/peerinfo-tool/gnunet-peerinfo.c:239 #, fuzzy, c-format @@ -5718,63 +5645,6 @@ msgstr "Teste Transport(e) %s\n" msgid "Failed to load transport plugin for `%s'\n" msgstr "Anwendung `%s' konnte nicht initialisiert werden.\n" -#: src/peerinfo/gnunet-service-peerinfo.c:178 -#, fuzzy, c-format -msgid "Removing expired address of transport `%s'\n" -msgstr "Verfügbare(r) Transport(e): %s\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:310 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s': %s\n" -msgstr "Datei wurde als `%s' gespeichert.\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:331 -#: src/peerinfo/gnunet-service-peerinfo.c:362 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s'\n" -msgstr "Datei wurde als `%s' gespeichert.\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:446 -msgid "# peers known" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:489 -#, c-format -msgid "" -"File `%s' in directory `%s' does not match naming convention. Removed.\n" -msgstr "" -"Die Datei »%s« im Verzeichnis »%s« entspricht nicht der Namenskonvention. " -"Die Datei wurde entfernt.\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:655 -#, fuzzy, c-format -msgid "Scanning directory `%s'\n" -msgstr "==> Verzeichnis `%s':\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:663 -#, fuzzy, c-format -msgid "Still no peers found in `%s'!\n" -msgstr "Dienst `%s' konnte nicht ordentlich entladen werden!\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1076 -#, fuzzy, c-format -msgid "Cleaning up directory `%s'\n" -msgstr "==> Verzeichnis `%s':\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1405 -#, c-format -msgid "Importing HELLOs from `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1418 -msgid "Skipping import of included HELLOs\n" -msgstr "" - -#: src/peerinfo/peerinfo_api.c:220 -#, fuzzy -msgid "Failed to receive response from `PEERINFO' service." -msgstr "Fehler beim Empfangen der Antwort von gnunetd auf die `%s' Nachricht\n" - #: src/peerstore/gnunet-peerstore.c:91 msgid "peerstore" msgstr "" @@ -6215,12 +6085,12 @@ msgstr " Verbindung fehlgeschlagen\n" msgid "# revocation set unions completed" msgstr "# Klartext PONG Nachrichten empfangen" -#: src/revocation/gnunet-service-revocation.c:524 -#: src/revocation/gnunet-service-revocation.c:771 +#: src/revocation/gnunet-service-revocation.c:525 +#: src/revocation/gnunet-service-revocation.c:773 msgid "SET service crashed, terminating revocation service\n" msgstr "" -#: src/revocation/gnunet-service-revocation.c:862 +#: src/revocation/gnunet-service-revocation.c:864 #, fuzzy msgid "Could not open revocation database file!" msgstr "Knoten `%s' konnte nicht in der Routing Tabelle gefunden werden!\n" @@ -6284,10 +6154,10 @@ msgstr "" msgid "Calculate the Vectorproduct with a GNUnet peer." msgstr "" -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #: src/scalarproduct/gnunet-service-scalarproduct_alice.c:1401 #: src/scalarproduct/gnunet-service-scalarproduct_bob.c:1345 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #, fuzzy msgid "Connect to CADET failed\n" msgstr " Verbindung fehlgeschlagen\n" @@ -6504,7 +6374,7 @@ msgstr "" msgid "Wrote %llu bytes of statistics to `%s'\n" msgstr "Dateien aus dem GNUnet herunterladen." -#: src/statistics/gnunet-service-statistics.c:1084 +#: src/statistics/gnunet-service-statistics.c:1086 #, fuzzy, c-format msgid "Loading %llu bytes of statistics from `%s'\n" msgstr "Dateien aus dem GNUnet herunterladen." @@ -6632,7 +6502,7 @@ msgid "Invalid argument `%s'; expecting unsigned int\n" msgstr "Ungültiger Parameter für `%s' bei %s:%d.\n" #: src/testbed/generate-underlay-topology.c:342 -#: src/testbed/gnunet-testbed-profiler.c:284 +#: src/testbed/gnunet-testbed-profiler.c:283 msgid "create COUNT number of peers" msgstr "" @@ -6670,13 +6540,13 @@ msgid "" "deployments" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:231 src/testing/list-keys.c:46 -#: src/testing/testing.c:288 src/util/gnunet-ecc.c:301 +#: src/testbed/gnunet-daemon-testbed-underlay.c:233 src/testing/list-keys.c:46 +#: src/testing/testing.c:288 src/util/gnunet-ecc.c:306 #, c-format msgid "Incorrect hostkey file format: %s\n" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:469 +#: src/testbed/gnunet-daemon-testbed-underlay.c:471 msgid "Daemon to restrict underlay network in testbed deployments" msgstr "" @@ -6741,17 +6611,6 @@ msgstr "" msgid "%.s Unknown result code." msgstr "" -#: src/testbed/gnunet-testbed-profiler.c:290 -msgid "tolerate COUNT number of continious timeout failures" -msgstr "" - -#: src/testbed/gnunet-testbed-profiler.c:295 -msgid "" -"run profiler in non-interactive mode where upon testbed setup the profiler " -"does not wait for a keystroke but continues to run until a termination " -"signal is received" -msgstr "" - #: src/testbed/gnunet_testbed_mpi_spawn.c:118 #, fuzzy msgid "Waiting for child to exit.\n" @@ -6764,6 +6623,17 @@ msgstr "" msgid "Spawning process `%s'\n" msgstr "Ungültige Antwort auf `%s'.\n" +#: src/testbed/gnunet-testbed-profiler.c:289 +msgid "tolerate COUNT number of continious timeout failures" +msgstr "" + +#: src/testbed/gnunet-testbed-profiler.c:294 +msgid "" +"run profiler in non-interactive mode where upon testbed setup the profiler " +"does not wait for a keystroke but continues to run until a termination " +"signal is received" +msgstr "" + #: src/testbed/testbed_api.c:410 #, fuzzy, c-format msgid "Adding host %u failed with error: %s\n" @@ -7056,54 +6926,54 @@ msgstr "# HELLO-Meldungen empfangen" msgid "GNUnet topology control" msgstr "" +#: src/transport/gnunet-service-transport_ats.c:141 +msgid "# Addresses given to ATS" +msgstr "" + #: src/transport/gnunet-service-transport.c:448 msgid "# messages dropped due to slow client" msgstr "" -#: src/transport/gnunet-service-transport.c:809 +#: src/transport/gnunet-service-transport.c:818 msgid "# bytes payload dropped (other peer was not connected)" msgstr "" -#: src/transport/gnunet-service-transport.c:1539 +#: src/transport/gnunet-service-transport.c:1551 msgid "# bytes payload discarded due to not connected peer" msgstr "" -#: src/transport/gnunet-service-transport.c:1699 +#: src/transport/gnunet-service-transport.c:1711 msgid "# bytes total received" msgstr "# Bytes insgesamt empfangen" -#: src/transport/gnunet-service-transport.c:1796 +#: src/transport/gnunet-service-transport.c:1808 msgid "# bytes payload received" msgstr "# Bytes Nutzdaten empfangen" -#: src/transport/gnunet-service-transport.c:2113 -#: src/transport/gnunet-service-transport.c:2585 +#: src/transport/gnunet-service-transport.c:2125 +#: src/transport/gnunet-service-transport.c:2597 msgid "# disconnects due to blacklist" msgstr "" -#: src/transport/gnunet-service-transport.c:2589 +#: src/transport/gnunet-service-transport.c:2601 #, fuzzy, c-format msgid "Disallowing connection to peer `%s' on transport %s\n" msgstr "Anwendung `%s' konnte nicht initialisiert werden.\n" -#: src/transport/gnunet-service-transport.c:2697 +#: src/transport/gnunet-service-transport.c:2709 #, c-format msgid "Adding blacklisting entry for peer `%s'\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2706 +#: src/transport/gnunet-service-transport.c:2718 #, c-format msgid "Adding blacklisting entry for peer `%s':`%s'\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2771 +#: src/transport/gnunet-service-transport.c:2783 msgid "Transport service is lacking key configuration settings. Exiting.\n" msgstr "" -#: src/transport/gnunet-service-transport_ats.c:141 -msgid "# Addresses given to ATS" -msgstr "" - #: src/transport/gnunet-service-transport_hello.c:195 msgid "# refreshed my HELLO" msgstr "" @@ -7241,74 +7111,74 @@ msgstr "# PING Nachrichten erstellt" msgid "SYN request from peer `%s' ignored due impending shutdown\n" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:2620 +#: src/transport/gnunet-service-transport_neighbours.c:2623 msgid "# Attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3102 +#: src/transport/gnunet-service-transport_neighbours.c:3105 #, fuzzy msgid "# SYN_ACK messages received" msgstr "# SESSION_ACK-Meldungen empfangen" -#: src/transport/gnunet-service-transport_neighbours.c:3110 +#: src/transport/gnunet-service-transport_neighbours.c:3113 #, fuzzy msgid "# unexpected SYN_ACK messages (no peer)" msgstr "# verschlüsselter PONG Nachrichten gesendet" -#: src/transport/gnunet-service-transport_neighbours.c:3128 -#: src/transport/gnunet-service-transport_neighbours.c:3152 +#: src/transport/gnunet-service-transport_neighbours.c:3131 +#: src/transport/gnunet-service-transport_neighbours.c:3155 #, fuzzy msgid "# unexpected SYN_ACK messages (not ready)" msgstr "# verschlüsselter PONG Nachrichten gesendet" -#: src/transport/gnunet-service-transport_neighbours.c:3164 +#: src/transport/gnunet-service-transport_neighbours.c:3167 #, fuzzy msgid "# unexpected SYN_ACK messages (waiting on ATS)" msgstr "# verschlüsselter PONG Nachrichten gesendet" -#: src/transport/gnunet-service-transport_neighbours.c:3189 +#: src/transport/gnunet-service-transport_neighbours.c:3192 msgid "# Successful attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3202 +#: src/transport/gnunet-service-transport_neighbours.c:3205 #, fuzzy msgid "# unexpected SYN_ACK messages (disconnecting)" msgstr "# verschlüsselter PONG Nachrichten gesendet" -#: src/transport/gnunet-service-transport_neighbours.c:3374 +#: src/transport/gnunet-service-transport_neighbours.c:3377 #, fuzzy msgid "# ACK messages received" msgstr "# CONNECT_ACK-Meldungen empfangen" -#: src/transport/gnunet-service-transport_neighbours.c:3410 +#: src/transport/gnunet-service-transport_neighbours.c:3413 #, fuzzy msgid "# unexpected ACK messages" msgstr "# verschlüsselter PONG Nachrichten gesendet" -#: src/transport/gnunet-service-transport_neighbours.c:3498 +#: src/transport/gnunet-service-transport_neighbours.c:3501 #, fuzzy msgid "# quota messages ignored (malformed)" msgstr "# gap Anfragen verworfen: Kollision in RT" -#: src/transport/gnunet-service-transport_neighbours.c:3505 +#: src/transport/gnunet-service-transport_neighbours.c:3508 #, fuzzy msgid "# QUOTA messages received" msgstr "# verschlüsselter PONG Nachrichten empfangen" -#: src/transport/gnunet-service-transport_neighbours.c:3545 +#: src/transport/gnunet-service-transport_neighbours.c:3548 msgid "# disconnect messages ignored (malformed)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3552 +#: src/transport/gnunet-service-transport_neighbours.c:3555 #, fuzzy msgid "# DISCONNECT messages received" msgstr "# verschlüsselter PONG Nachrichten empfangen" -#: src/transport/gnunet-service-transport_neighbours.c:3563 +#: src/transport/gnunet-service-transport_neighbours.c:3566 msgid "# disconnect messages ignored (timestamp)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3697 +#: src/transport/gnunet-service-transport_neighbours.c:3700 msgid "# disconnected from peer upon explicit request" msgstr "" @@ -7342,8 +7212,8 @@ msgstr "" #: src/transport/gnunet-service-transport_validation.c:491 #: src/transport/gnunet-service-transport_validation.c:677 -#: src/transport/gnunet-service-transport_validation.c:988 -#: src/transport/gnunet-service-transport_validation.c:1590 +#: src/transport/gnunet-service-transport_validation.c:997 +#: src/transport/gnunet-service-transport_validation.c:1609 #, fuzzy msgid "# validations running" msgstr "Sqlite-Datenbank läuft\n" @@ -7370,98 +7240,61 @@ msgstr "" msgid "# address revalidations started" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1114 +#: src/transport/gnunet-service-transport_validation.c:1123 #, fuzzy msgid "# PING message for different peer received" msgstr "# PING Nachrichten erstellt" -#: src/transport/gnunet-service-transport_validation.c:1165 +#: src/transport/gnunet-service-transport_validation.c:1174 #, c-format msgid "Plugin `%s' not available, cannot confirm having this address\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1178 +#: src/transport/gnunet-service-transport_validation.c:1187 msgid "# failed address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1181 +#: src/transport/gnunet-service-transport_validation.c:1190 #, c-format msgid "Address `%s' is not one of my addresses, not confirming PING\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1189 +#: src/transport/gnunet-service-transport_validation.c:1198 msgid "# successful address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1202 +#: src/transport/gnunet-service-transport_validation.c:1211 #, c-format msgid "" "Not confirming PING from peer `%s' with address `%s' since I cannot confirm " "having this address.\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1257 +#: src/transport/gnunet-service-transport_validation.c:1266 #, c-format msgid "Failed to create PONG signature for peer `%s'\n" msgstr "PONG-Signatur für Knoten »%s« konnte nicht erstellt werden\n" -#: src/transport/gnunet-service-transport_validation.c:1308 +#: src/transport/gnunet-service-transport_validation.c:1317 msgid "# PONGs unicast via reliable transport" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1317 +#: src/transport/gnunet-service-transport_validation.c:1326 msgid "# PONGs multicast to all available addresses" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1480 +#: src/transport/gnunet-service-transport_validation.c:1499 msgid "# PONGs dropped, no matching pending validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1498 +#: src/transport/gnunet-service-transport_validation.c:1517 msgid "# PONGs dropped, signature expired" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1553 +#: src/transport/gnunet-service-transport_validation.c:1572 msgid "# validations succeeded" msgstr "" -#: src/transport/gnunet-transport-profiler.c:219 -#, c-format -msgid "%llu B in %llu ms == %.2f KB/s!\n" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:617 -msgid "send data to peer" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:621 -#, fuzzy -msgid "receive data from peer" -msgstr "# Bytes des Typs %d empfangen" - -#: src/transport/gnunet-transport-profiler.c:626 -msgid "iterations" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:631 -#, fuzzy -msgid "number of messages to send" -msgstr "Anzahl an Durchläufen" - -#: src/transport/gnunet-transport-profiler.c:636 -msgid "message size to use" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:641 -#: src/transport/gnunet-transport.c:1462 -msgid "peer identity" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:652 -#: src/transport/gnunet-transport.c:1482 -msgid "Direct access to transport service." -msgstr "Direkter Zugriff auf den Transportdienst" - #: src/transport/gnunet-transport.c:413 #, c-format msgid "Transmitted %llu bytes/s (%llu bytes in %s)\n" @@ -7594,6 +7427,11 @@ msgstr "" msgid "do not resolve hostnames" msgstr "Keine Rechnernamen auflösen" +#: src/transport/gnunet-transport.c:1462 +#: src/transport/gnunet-transport-profiler.c:641 +msgid "peer identity" +msgstr "" + #: src/transport/gnunet-transport.c:1466 msgid "monitor plugin sessions" msgstr "" @@ -7602,6 +7440,38 @@ msgstr "" msgid "send data for benchmarking to the other peer (until CTRL-C)" msgstr "" +#: src/transport/gnunet-transport.c:1482 +#: src/transport/gnunet-transport-profiler.c:652 +msgid "Direct access to transport service." +msgstr "Direkter Zugriff auf den Transportdienst" + +#: src/transport/gnunet-transport-profiler.c:219 +#, c-format +msgid "%llu B in %llu ms == %.2f KB/s!\n" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:617 +msgid "send data to peer" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:621 +#, fuzzy +msgid "receive data from peer" +msgstr "# Bytes des Typs %d empfangen" + +#: src/transport/gnunet-transport-profiler.c:626 +msgid "iterations" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:631 +#, fuzzy +msgid "number of messages to send" +msgstr "Anzahl an Durchläufen" + +#: src/transport/gnunet-transport-profiler.c:636 +msgid "message size to use" +msgstr "" + #: src/transport/plugin_transport_http_client.c:1474 #: src/transport/plugin_transport_http_server.c:2312 #: src/transport/plugin_transport_http_server.c:3526 @@ -7874,6 +7744,21 @@ msgstr "" msgid "TCP transport advertises itself as being on port %llu\n" msgstr "" +#: src/transport/plugin_transport_udp_broadcasting.c:168 +#, fuzzy +msgid "# Multicast HELLO beacons received via UDP" +msgstr "# Bytes empfangen über TCP" + +#: src/transport/plugin_transport_udp_broadcasting.c:548 +msgid "" +"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" +msgstr "" + +#: src/transport/plugin_transport_udp_broadcasting.c:565 +#, fuzzy, c-format +msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" +msgstr "Der Transportdienst auf Port %d konnte nicht gestartet werden.\n" + #: src/transport/plugin_transport_udp.c:3366 #, c-format msgid "" @@ -7921,21 +7806,6 @@ msgstr "»%s« ist keine gültige IP-Adresse.\n" msgid "Failed to create UDP network sockets\n" msgstr "UDP-Sockets können nicht geöffnet werden\n" -#: src/transport/plugin_transport_udp_broadcasting.c:168 -#, fuzzy -msgid "# Multicast HELLO beacons received via UDP" -msgstr "# Bytes empfangen über TCP" - -#: src/transport/plugin_transport_udp_broadcasting.c:548 -msgid "" -"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" -msgstr "" - -#: src/transport/plugin_transport_udp_broadcasting.c:565 -#, fuzzy, c-format -msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" -msgstr "Der Transportdienst auf Port %d konnte nicht gestartet werden.\n" - #: src/transport/plugin_transport_unix.c:1403 #, c-format msgid "Cannot create path to `%s'\n" @@ -8049,7 +7919,7 @@ msgid "" "`GNUNET_SERVER_receive_done' after %s\n" msgstr "" -#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2336 +#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2346 #, c-format msgid "Unknown address family %d\n" msgstr "" @@ -8125,19 +7995,19 @@ msgstr "Benutzer/Gruppe kann nicht zu »%s« geändert werden: %s\n" msgid "do daemonize (detach from terminal)" msgstr "" -#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:244 +#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:255 #: src/util/service.c:1790 #, fuzzy, c-format msgid "Malformed configuration file `%s', exit ...\n" msgstr "Konfigurationsdatei `%s' wurde erzeugt.\n" -#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:261 +#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:272 #: src/util/service.c:1801 #, fuzzy msgid "Malformed configuration, exit ...\n" msgstr "GNUnet Konfiguration" -#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:256 +#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:267 #: src/util/service.c:1807 #, fuzzy, c-format msgid "Could not access configuration file `%s'\n" @@ -8177,7 +8047,7 @@ msgstr "" msgid "Metadata `%s' failed to deserialize" msgstr "" -#: src/util/client.c:882 +#: src/util/client.c:911 #, c-format msgid "Need a non-empty hostname for service `%s'.\n" msgstr "" @@ -8279,22 +8149,22 @@ msgid "" "%llu)\n" msgstr "" -#: src/util/crypto_ecc.c:777 +#: src/util/crypto_ecc.c:810 #, fuzzy, c-format msgid "ECC signing failed at %s:%d: %s\n" msgstr "`%s' schlug fehl bei %s:%d mit dem Fehler: `%s'.\n" -#: src/util/crypto_ecc.c:827 +#: src/util/crypto_ecc.c:860 #, fuzzy, c-format msgid "EdDSA signing failed at %s:%d: %s\n" msgstr "`%s' schlug fehl bei %s:%d mit dem Fehler: `%s'.\n" -#: src/util/crypto_ecc.c:901 +#: src/util/crypto_ecc.c:934 #, fuzzy, c-format msgid "ECDSA signature verification failed at %s:%d: %s\n" msgstr "RSA Signaturüberprüfung fehlgeschlagen bei %s:%d: %s\n" -#: src/util/crypto_ecc.c:958 +#: src/util/crypto_ecc.c:991 #, fuzzy, c-format msgid "EdDSA signature verification failed at %s:%d: %s\n" msgstr "RSA Signaturüberprüfung fehlgeschlagen bei %s:%d: %s\n" @@ -8518,22 +8388,22 @@ msgstr "" msgid "Manipulate GNUnet configuration files" msgstr "GNUnet-Konfigurationsdateien bearbeiten" -#: src/util/gnunet-ecc.c:89 +#: src/util/gnunet-ecc.c:94 #, c-format msgid "Failed to open `%s': %s\n" msgstr "»%s« kann nicht geöffnet werden: %s\n" -#: src/util/gnunet-ecc.c:125 +#: src/util/gnunet-ecc.c:130 #, c-format msgid "Generating %u keys like %s, please wait" msgstr "" -#: src/util/gnunet-ecc.c:138 +#: src/util/gnunet-ecc.c:143 #, c-format msgid "Generating %u keys, please wait" msgstr "" -#: src/util/gnunet-ecc.c:179 +#: src/util/gnunet-ecc.c:184 #, c-format msgid "" "\n" @@ -8542,7 +8412,7 @@ msgstr "" "\n" "Schreiben in »%s« nicht möglich: %s\n" -#: src/util/gnunet-ecc.c:189 +#: src/util/gnunet-ecc.c:194 #, c-format msgid "" "\n" @@ -8551,57 +8421,61 @@ msgstr "" "\n" "Abgeschlossen!\n" -#: src/util/gnunet-ecc.c:192 +#: src/util/gnunet-ecc.c:197 #, c-format msgid "" "\n" "Error, %u keys not generated\n" msgstr "" -#: src/util/gnunet-ecc.c:283 +#: src/util/gnunet-ecc.c:288 #, fuzzy, c-format msgid "Hostkeys file `%s' not found\n" msgstr "Kommando `%s' wurde nicht gefunden!\n" -#: src/util/gnunet-ecc.c:294 +#: src/util/gnunet-ecc.c:299 #, c-format msgid "Hostkeys file `%s' is empty\n" msgstr "" -#: src/util/gnunet-ecc.c:316 +#: src/util/gnunet-ecc.c:321 #, fuzzy, c-format msgid "Could not read hostkey file: %s\n" msgstr "PID konnte nicht in Datei `%s' geschrieben werden: %s.\n" -#: src/util/gnunet-ecc.c:367 +#: src/util/gnunet-ecc.c:372 msgid "No hostkey file specified on command line\n" msgstr "" -#: src/util/gnunet-ecc.c:425 +#: src/util/gnunet-ecc.c:437 msgid "list keys included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:430 +#: src/util/gnunet-ecc.c:442 msgid "number of keys to list included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:435 +#: src/util/gnunet-ecc.c:447 msgid "create COUNT public-private key pairs (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:439 +#: src/util/gnunet-ecc.c:451 msgid "print the public key in ASCII format" msgstr "" -#: src/util/gnunet-ecc.c:443 +#: src/util/gnunet-ecc.c:455 +msgid "print the private key in ASCII format" +msgstr "" + +#: src/util/gnunet-ecc.c:459 msgid "print the public key in HEX format" msgstr "" -#: src/util/gnunet-ecc.c:447 +#: src/util/gnunet-ecc.c:463 msgid "print examples of ECC operations (used for compatibility testing)" msgstr "" -#: src/util/gnunet-ecc.c:463 +#: src/util/gnunet-ecc.c:479 msgid "Manipulate GNUnet private ECC key files" msgstr "" @@ -8762,23 +8636,23 @@ msgstr "" "Sie müssen für `%s' in der Sektion `%s' der Konfigurationsdatei eine " "positive Zahl angeben.\n" -#: src/util/resolver_api.c:826 +#: src/util/resolver_api.c:827 #, fuzzy, c-format msgid "Timeout trying to resolve hostname `%s'.\n" msgstr "Fehler beim Lesen der Freunde-Liste von `%s'\n" -#: src/util/resolver_api.c:839 +#: src/util/resolver_api.c:840 #, c-format msgid "Timeout trying to resolve IP address `%s'.\n" msgstr "" -#: src/util/resolver_api.c:1023 +#: src/util/resolver_api.c:1024 #, fuzzy msgid "Resolver not configured correctly.\n" msgstr "Standarddienst »%s« ist nicht korrekt eingerichtet!\n" -#: src/util/resolver_api.c:1109 src/util/resolver_api.c:1132 -#: src/util/resolver_api.c:1146 +#: src/util/resolver_api.c:1110 src/util/resolver_api.c:1133 +#: src/util/resolver_api.c:1147 #, fuzzy, c-format msgid "Could not resolve our FQDN: %s\n" msgstr "`%s' konnte nicht aufgelöst werden: %s\n" @@ -8788,7 +8662,7 @@ msgid "" "Could not bind to any of the ports I was supposed to, refusing to run!\n" msgstr "" -#: src/util/service.c:2081 +#: src/util/service.c:2091 #, c-format msgid "" "Processing code for message of type %u did not call " @@ -8971,65 +8845,65 @@ msgstr "" msgid "# ICMPv6 packets dropped (not allowed)" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2232 +#: src/vpn/gnunet-service-vpn.c:2235 #, fuzzy msgid "# Packets received from TUN interface" msgstr "" "Die Formatüberprüfung des Pakets, das von %s:%d (UDP6) empfangen wurde, " "schlug fehl." -#: src/vpn/gnunet-service-vpn.c:2265 src/vpn/gnunet-service-vpn.c:2301 +#: src/vpn/gnunet-service-vpn.c:2268 src/vpn/gnunet-service-vpn.c:2304 #, c-format msgid "Packet received for unmapped destination `%s' (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2311 +#: src/vpn/gnunet-service-vpn.c:2314 msgid "Received IPv4 packet with options (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2325 +#: src/vpn/gnunet-service-vpn.c:2328 #, c-format msgid "Received packet of unknown protocol %d from TUN (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2364 +#: src/vpn/gnunet-service-vpn.c:2367 msgid "Failed to find unallocated IPv4 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2419 +#: src/vpn/gnunet-service-vpn.c:2422 #, fuzzy msgid "Failed to find unallocated IPv6 address in VPN's range\n" msgstr "Die öffentliche IPv6-Adresse konnte nicht ermittelt werden!\n" -#: src/vpn/gnunet-service-vpn.c:2461 src/vpn/gnunet-service-vpn.c:2683 +#: src/vpn/gnunet-service-vpn.c:2464 src/vpn/gnunet-service-vpn.c:2686 msgid "# Active destinations" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2732 +#: src/vpn/gnunet-service-vpn.c:2735 msgid "Failed to allocate IP address for new destination\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2995 +#: src/vpn/gnunet-service-vpn.c:2998 msgid "Must specify valid IPv6 address" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3019 +#: src/vpn/gnunet-service-vpn.c:3022 msgid "Must specify valid IPv6 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3027 +#: src/vpn/gnunet-service-vpn.c:3030 msgid "IPv6 support disabled as this system does not support IPv6\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3040 +#: src/vpn/gnunet-service-vpn.c:3043 msgid "Must specify valid IPv4 address" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3053 +#: src/vpn/gnunet-service-vpn.c:3056 msgid "Must specify valid IPv4 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3063 +#: src/vpn/gnunet-service-vpn.c:3066 msgid "IPv4 support disabled as this system does not support IPv4\n" msgstr "" @@ -9120,10 +8994,6 @@ msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" msgstr "`%s' schlug bei Datei `%s' fehl. Ort: %s:%d. Fehler: %s\n" #, fuzzy -#~ msgid "Token `%s' is malformed\n" -#~ msgstr "Schlüssel »%s« ist gültig\n" - -#, fuzzy #~ msgid "Failed to create indices\n" #~ msgstr "Zustellung der Nachricht `%s' fehlgeschlagen.\n" @@ -9163,6 +9033,10 @@ msgstr "`%s' schlug bei Datei `%s' fehl. Ort: %s:%d. Fehler: %s\n" #~ msgstr "Ausführliche Ausgabe" #, fuzzy +#~ msgid "Specify the public key of the zone to reverse lookup a name for" +#~ msgstr "Die Priorität des Inhalts angeben" + +#, fuzzy #~ msgid "# UPDATE requests executed" #~ msgstr "# dht Anfragen weitergeleitet" diff --git a/po/es.po b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnunet 0.9.5a\n" "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" -"POT-Creation-Date: 2017-10-20 15:14+0000\n" +"POT-Creation-Date: 2018-01-02 02:33+0100\n" "PO-Revision-Date: 2013-02-23 17:50+0100\n" "Last-Translator: Miguel Ángel Arruga Vivas <rosen644835@gmail.com>\n" "Language-Team: Spanish <es@li.org>\n" @@ -255,7 +255,7 @@ msgstr "" "configuración!\n" #: src/arm/gnunet-service-arm.c:430 src/transport/plugin_transport_tcp.c:1176 -#: src/transport/tcp_service_legacy.c:613 src/util/client.c:480 +#: src/transport/tcp_service_legacy.c:613 src/util/client.c:505 #: src/util/service.c:682 #, c-format msgid "UNIXPATH `%s' too long, maximum length is %llu\n" @@ -263,7 +263,7 @@ msgstr "" "La ruta tipo UNIX «%s» es demasiado larga, la longitud máxima es %llu\n" #: src/arm/gnunet-service-arm.c:434 src/transport/plugin_transport_tcp.c:1180 -#: src/transport/tcp_service_legacy.c:617 src/util/client.c:485 +#: src/transport/tcp_service_legacy.c:617 src/util/client.c:510 #: src/util/service.c:687 #, c-format msgid "Using `%s' instead\n" @@ -376,15 +376,151 @@ msgstr "El servicio «%s» finalizó con estado %s/%d, se reiniciará en %llu ms msgid "Initiating shutdown as requested by client.\n" msgstr "Iniciando apagado bajo petición del cliente.\n" -#: src/ats-tests/ats-testing-log.c:837 -msgid "Stop logging\n" +#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 +#, c-format +msgid "" +"Could not load quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" msgstr "" +"No se pudieron cargar las cuotas para la red «%s»: «%s», asignando el ancho " +"de banda predeterminado %llu\n" -#: src/ats-tests/ats-testing-log.c:892 -#, fuzzy, c-format -msgid "Start logging `%s'\n" +#: src/ats/gnunet-ats-solver-eval.c:2799 +#, c-format +msgid "" +"No outbound quota configured for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" +"No hay configurada una cuota de salida para la red «%s», asignando el ancho " +"de banda predeterminado %llu\n" + +#: src/ats/gnunet-ats-solver-eval.c:2840 +#, c-format +msgid "" +"No outbound quota configure for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" +"No hay configurada una cuota de salida para la red «%s», asignando el ancho " +"de banda predeterminado %llu\n" + +#: src/ats/gnunet-ats-solver-eval.c:3294 src/ats-tests/gnunet-solver-eval.c:939 +#, fuzzy +msgid "solver to use" +msgstr "valor a establecer" + +#: src/ats/gnunet-ats-solver-eval.c:3299 src/ats-tests/gnunet-solver-eval.c:945 +#: src/ats-tests/gnunet-solver-eval.c:950 +msgid "experiment to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3306 +#, fuzzy +msgid "print logging" msgstr "Iniciando descarga «%s».\n" +#: src/ats/gnunet-ats-solver-eval.c:3311 +msgid "save logging to disk" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3316 +msgid "disable normalization" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:304 +#, fuzzy, c-format +msgid "" +"Could not load %s quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" +"No se pudieron cargar las cuotas para la red «%s»: «%s», asignando el ancho " +"de banda predeterminado %llu\n" + +# Miguel: "Inbound" lo he traducido como entrada en todo el texto. +#: src/ats/gnunet-service-ats_plugins.c:314 +#, fuzzy, c-format +msgid "%s quota configured for network `%s' is %llu\n" +msgstr "La cuota de entrada configurada para la red «%s» es %llu\n" + +#: src/ats/gnunet-service-ats_plugins.c:359 +#, fuzzy, c-format +msgid "" +"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" +msgstr "" +"No hay configurada una cuota de salida para la red «%s», asignando el ancho " +"de banda predeterminado %llu\n" + +#: src/ats/gnunet-service-ats_plugins.c:451 +#, fuzzy, c-format +msgid "Failed to initialize solver `%s'!\n" +msgstr "¡No se puede inicializar el resolvedor!\n" + +#: src/ats/plugin_ats_mlp.c:1274 +msgid "Problem size too large, cannot allocate memory!\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1869 +#, fuzzy, c-format +msgid "Adding address for peer `%s' multiple times\n" +msgstr "Añadiendo «%s» sin direcciones para el par «%s»\n" + +#: src/ats/plugin_ats_mlp.c:1913 +#, fuzzy, c-format +msgid "Updating address property for peer `%s' %p not added before\n" +msgstr "Añadiendo «%s» sin direcciones para el par «%s»\n" + +#: src/ats/plugin_ats_mlp.c:2475 +msgid "" +"MLP solver is not optimizing for anything, changing to feasibility check\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 +#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 +#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 +#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 +#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 +#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 +#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 +#, fuzzy, c-format +msgid "Invalid %s configuration %f \n" +msgstr "Se produjo un fallo al cargar la configuración de %s\n" + +#: src/ats/plugin_ats_mlp.c:2670 +#, fuzzy, c-format +msgid "" +"Adjusting inconsistent outbound quota configuration for network `%s', is " +"%llu must be at least %llu\n" +msgstr "" +"No hay configurada una cuota de salida para la red «%s», asignando el ancho " +"de banda predeterminado %llu\n" + +#: src/ats/plugin_ats_mlp.c:2679 +#, fuzzy, c-format +msgid "" +"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " +"must be at least %llu\n" +msgstr "" +"No hay configuración de cuota de entrada para la red '%s', asignando el " +"ancho de banda predeterminado (%llu)\n" + +# Miguel: "Outbound" lo he traducido como salida en todo el texto. +#: src/ats/plugin_ats_mlp.c:2689 +#, fuzzy, c-format +msgid "" +"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" +msgstr "La cuota de salida configurada para la red «%s» es %llu\n" + +# Miguel: "Outbound" lo he traducido como salida en todo el texto. +#: src/ats/plugin_ats_mlp.c:2698 +#, fuzzy, c-format +msgid "" +"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" +msgstr "La cuota de salida configurada para la red «%s» es %llu\n" + +#: src/ats/plugin_ats_proportional.c:1164 +#, fuzzy, c-format +msgid "Invalid %s configuration %f\n" +msgstr "Se produjo un fallo al cargar la configuración de %s\n" + #: src/ats-tests/ats-testing.c:422 #, c-format msgid "Connected master [%u] with slave [%u]\n" @@ -395,6 +531,15 @@ msgstr "" msgid "Failed to connect master peer [%u] with slave [%u]\n" msgstr "Fallo al conectar a gnunetd.\n" +#: src/ats-tests/ats-testing-log.c:837 +msgid "Stop logging\n" +msgstr "" + +#: src/ats-tests/ats-testing-log.c:892 +#, fuzzy, c-format +msgid "Start logging `%s'\n" +msgstr "Iniciando descarga «%s».\n" + #: src/ats-tests/gnunet-ats-sim.c:90 #, c-format msgid "" @@ -402,16 +547,6 @@ msgid "" "= %u KiB/s\n" msgstr "" -#: src/ats-tests/gnunet-solver-eval.c:939 src/ats/gnunet-ats-solver-eval.c:3294 -#, fuzzy -msgid "solver to use" -msgstr "valor a establecer" - -#: src/ats-tests/gnunet-solver-eval.c:945 -#: src/ats-tests/gnunet-solver-eval.c:950 src/ats/gnunet-ats-solver-eval.c:3299 -msgid "experiment to use" -msgstr "" - # Miguel: ¿Como podría traducir "resolutions" y "resolve"? # Son difíciles de no calcar, puesto que no conozco como expresar # el concepto de obtener una dirección a partir de un nombre @@ -546,141 +681,6 @@ msgstr "salida prolija (incluye las propiedades de direcciones del ATS)" msgid "Print information about ATS state" msgstr "Imprime información acerca del estado del ATS" -#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 -#, c-format -msgid "" -"Could not load quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" -"No se pudieron cargar las cuotas para la red «%s»: «%s», asignando el ancho " -"de banda predeterminado %llu\n" - -#: src/ats/gnunet-ats-solver-eval.c:2799 -#, c-format -msgid "" -"No outbound quota configured for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" -"No hay configurada una cuota de salida para la red «%s», asignando el ancho " -"de banda predeterminado %llu\n" - -#: src/ats/gnunet-ats-solver-eval.c:2840 -#, c-format -msgid "" -"No outbound quota configure for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" -"No hay configurada una cuota de salida para la red «%s», asignando el ancho " -"de banda predeterminado %llu\n" - -#: src/ats/gnunet-ats-solver-eval.c:3306 -#, fuzzy -msgid "print logging" -msgstr "Iniciando descarga «%s».\n" - -#: src/ats/gnunet-ats-solver-eval.c:3311 -msgid "save logging to disk" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3316 -msgid "disable normalization" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:304 -#, fuzzy, c-format -msgid "" -"Could not load %s quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" -"No se pudieron cargar las cuotas para la red «%s»: «%s», asignando el ancho " -"de banda predeterminado %llu\n" - -# Miguel: "Inbound" lo he traducido como entrada en todo el texto. -#: src/ats/gnunet-service-ats_plugins.c:314 -#, fuzzy, c-format -msgid "%s quota configured for network `%s' is %llu\n" -msgstr "La cuota de entrada configurada para la red «%s» es %llu\n" - -#: src/ats/gnunet-service-ats_plugins.c:359 -#, fuzzy, c-format -msgid "" -"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" -msgstr "" -"No hay configurada una cuota de salida para la red «%s», asignando el ancho " -"de banda predeterminado %llu\n" - -#: src/ats/gnunet-service-ats_plugins.c:451 -#, fuzzy, c-format -msgid "Failed to initialize solver `%s'!\n" -msgstr "¡No se puede inicializar el resolvedor!\n" - -#: src/ats/plugin_ats_mlp.c:1274 -msgid "Problem size too large, cannot allocate memory!\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1869 -#, fuzzy, c-format -msgid "Adding address for peer `%s' multiple times\n" -msgstr "Añadiendo «%s» sin direcciones para el par «%s»\n" - -#: src/ats/plugin_ats_mlp.c:1913 -#, fuzzy, c-format -msgid "Updating address property for peer `%s' %p not added before\n" -msgstr "Añadiendo «%s» sin direcciones para el par «%s»\n" - -#: src/ats/plugin_ats_mlp.c:2475 -msgid "" -"MLP solver is not optimizing for anything, changing to feasibility check\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 -#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 -#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 -#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 -#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 -#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 -#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 -#, fuzzy, c-format -msgid "Invalid %s configuration %f \n" -msgstr "Se produjo un fallo al cargar la configuración de %s\n" - -#: src/ats/plugin_ats_mlp.c:2670 -#, fuzzy, c-format -msgid "" -"Adjusting inconsistent outbound quota configuration for network `%s', is " -"%llu must be at least %llu\n" -msgstr "" -"No hay configurada una cuota de salida para la red «%s», asignando el ancho " -"de banda predeterminado %llu\n" - -#: src/ats/plugin_ats_mlp.c:2679 -#, fuzzy, c-format -msgid "" -"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " -"must be at least %llu\n" -msgstr "" -"No hay configuración de cuota de entrada para la red '%s', asignando el " -"ancho de banda predeterminado (%llu)\n" - -# Miguel: "Outbound" lo he traducido como salida en todo el texto. -#: src/ats/plugin_ats_mlp.c:2689 -#, fuzzy, c-format -msgid "" -"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" -msgstr "La cuota de salida configurada para la red «%s» es %llu\n" - -# Miguel: "Outbound" lo he traducido como salida en todo el texto. -#: src/ats/plugin_ats_mlp.c:2698 -#, fuzzy, c-format -msgid "" -"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" -msgstr "La cuota de salida configurada para la red «%s» es %llu\n" - -#: src/ats/plugin_ats_proportional.c:1164 -#, fuzzy, c-format -msgid "Invalid %s configuration %f\n" -msgstr "Se produjo un fallo al cargar la configuración de %s\n" - #: src/auction/gnunet-auction-create.c:163 msgid "description of the item to be sold" msgstr "" @@ -728,58 +728,58 @@ msgstr "texto de ayuda" msgid "Invalid peer ID `%s'\n" msgstr "URI no válida: «%s»\n" -#: src/cadet/gnunet-cadet.c:702 +#: src/cadet/gnunet-cadet.c:703 #, fuzzy, c-format msgid "Invalid tunnel owner `%s'\n" msgstr "Formato de tiempo no válido «%s»\n" -#: src/cadet/gnunet-cadet.c:775 +#: src/cadet/gnunet-cadet.c:776 msgid "Extra arguments are not applicable in combination with this option.\n" msgstr "" -#: src/cadet/gnunet-cadet.c:866 +#: src/cadet/gnunet-cadet.c:867 #, fuzzy, c-format msgid "Invalid target `%s'\n" msgstr "Parámetro no válido «%s»\n" -#: src/cadet/gnunet-cadet.c:903 +#: src/cadet/gnunet-cadet.c:904 #, fuzzy msgid "No action requested\n" msgstr "Colección detenida.\n" -#: src/cadet/gnunet-cadet.c:928 +#: src/cadet/gnunet-cadet.c:929 #, fuzzy msgid "Provide information about a particular connection" msgstr "proveer información acerca de un túnel en particular" -#: src/cadet/gnunet-cadet.c:933 +#: src/cadet/gnunet-cadet.c:934 msgid "Activate echo mode" msgstr "" -#: src/cadet/gnunet-cadet.c:938 +#: src/cadet/gnunet-cadet.c:939 msgid "Dump debug information to STDERR" msgstr "" -#: src/cadet/gnunet-cadet.c:944 +#: src/cadet/gnunet-cadet.c:945 msgid "Listen for connections using a shared secret among sender and recipient" msgstr "" -#: src/cadet/gnunet-cadet.c:951 +#: src/cadet/gnunet-cadet.c:952 #, fuzzy msgid "Provide information about a patricular peer" msgstr "proveer información acerca de un túnel en particular" -#: src/cadet/gnunet-cadet.c:957 +#: src/cadet/gnunet-cadet.c:958 #, fuzzy msgid "Provide information about all peers" msgstr "proveer información acerca de un túnel en particular" -#: src/cadet/gnunet-cadet.c:963 +#: src/cadet/gnunet-cadet.c:964 #, fuzzy msgid "Provide information about a particular tunnel" msgstr "proveer información acerca de un túnel en particular" -#: src/cadet/gnunet-cadet.c:969 +#: src/cadet/gnunet-cadet.c:970 #, fuzzy msgid "Provide information about all tunnels" msgstr "proveer información acerca de un túnel en particular" @@ -832,28 +832,6 @@ msgid "Connection to conversation service lost, trying to reconnect\n" msgstr "" "El cliente se desconectó del servicio principal, tratando de reconectar.\n" -#: src/conversation/gnunet-conversation-test.c:119 -#, c-format -msgid "" -"\n" -"End of transmission. Have a GNU day.\n" -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:145 -#, c-format -msgid "" -"\n" -"We are now playing your recording back. If you can hear it, your audio " -"settings are working..." -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:210 -#, c-format -msgid "" -"We will now be recording you for %s. After that time, the recording will be " -"played back to you..." -msgstr "" - #: src/conversation/gnunet-conversation.c:269 #, c-format msgid "Incoming call from `%s'. Please /accept %u or /cancel %u the call.\n" @@ -1112,8 +1090,30 @@ msgstr "" msgid "Enables having a conversation with other GNUnet users." msgstr "" -#: src/conversation/gnunet-helper-audio-playback-gst.c:356 +#: src/conversation/gnunet-conversation-test.c:119 +#, c-format +msgid "" +"\n" +"End of transmission. Have a GNU day.\n" +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:145 +#, c-format +msgid "" +"\n" +"We are now playing your recording back. If you can hear it, your audio " +"settings are working..." +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:210 +#, c-format +msgid "" +"We will now be recording you for %s. After that time, the recording will be " +"played back to you..." +msgstr "" + #: src/conversation/gnunet_gst.c:622 +#: src/conversation/gnunet-helper-audio-playback-gst.c:361 #, c-format msgid "Read error from STDIN: %d %s\n" msgstr "" @@ -1123,64 +1123,64 @@ msgstr "" msgid "pa_stream_write() failed: %s\n" msgstr "stadísticas (%s) falló: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:607 +#: src/conversation/gnunet-helper-audio-playback.c:612 msgid "gnunet-helper-audio-playback - Got signal, exiting\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:632 +#: src/conversation/gnunet-helper-audio-playback.c:637 #: src/conversation/gnunet-helper-audio-record.c:545 #, fuzzy msgid "Connection established.\n" msgstr "Colección detenida.\n" -#: src/conversation/gnunet-helper-audio-playback.c:637 +#: src/conversation/gnunet-helper-audio-playback.c:642 #: src/conversation/gnunet-helper-audio-record.c:550 #, fuzzy, c-format msgid "pa_stream_new() failed: %s\n" msgstr "stadísticas (%s) falló: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:651 +#: src/conversation/gnunet-helper-audio-playback.c:656 #, c-format msgid "pa_stream_connect_playback() failed: %s\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:664 +#: src/conversation/gnunet-helper-audio-playback.c:669 #: src/conversation/gnunet-helper-audio-record.c:576 #, fuzzy, c-format msgid "Connection failure: %s\n" msgstr "'%s' falló en %s: %d con error: '%s'.\n" -#: src/conversation/gnunet-helper-audio-playback.c:685 +#: src/conversation/gnunet-helper-audio-playback.c:690 #: src/conversation/gnunet-helper-audio-record.c:599 #, fuzzy msgid "Wrong Spec\n" msgstr "Servicio principal (CORE) erróneo\n" -#: src/conversation/gnunet-helper-audio-playback.c:691 +#: src/conversation/gnunet-helper-audio-playback.c:696 #: src/conversation/gnunet-helper-audio-record.c:605 #, fuzzy msgid "pa_mainloop_new() failed.\n" msgstr "La operación ha fallado.\n" -#: src/conversation/gnunet-helper-audio-playback.c:705 +#: src/conversation/gnunet-helper-audio-playback.c:710 #: src/conversation/gnunet-helper-audio-record.c:620 #, fuzzy msgid "pa_context_new() failed.\n" msgstr "La operación ha fallado.\n" -#: src/conversation/gnunet-helper-audio-playback.c:712 +#: src/conversation/gnunet-helper-audio-playback.c:717 #: src/conversation/gnunet-helper-audio-record.c:626 #, fuzzy, c-format msgid "pa_context_connect() failed: %s\n" msgstr "# reconexiones rápidas fallidas" -#: src/conversation/gnunet-helper-audio-playback.c:718 +#: src/conversation/gnunet-helper-audio-playback.c:723 #: src/conversation/gnunet-helper-audio-record.c:632 #, fuzzy msgid "pa_mainloop_run() failed.\n" msgstr "La operación ha fallado.\n" -#: src/conversation/gnunet-helper-audio-playback.c:790 +#: src/conversation/gnunet-helper-audio-playback.c:795 #, c-format msgid "Read error from STDIN: %s\n" msgstr "" @@ -1250,7 +1250,7 @@ msgstr "" msgid "Could not open line, port %s already in use!\n" msgstr "¡No se pudo conectar al servicio %s!\n" -#: src/conversation/microphone.c:119 +#: src/conversation/microphone.c:121 #, fuzzy msgid "Could not start record audio helper\n" msgstr "No se pudo empezar la operación de desindexado.\n" @@ -1343,27 +1343,27 @@ msgstr "# peticiones de envío descartadas (desconectado)" msgid "# dequeuing CAR (duplicate request)" msgstr "" -#: src/core/gnunet-service-core.c:440 +#: src/core/gnunet-service-core.c:443 #, c-format msgid "# bytes of messages of type %u received" msgstr "# bytes de mensajes del tipo %u recibidos" -#: src/core/gnunet-service-core.c:538 +#: src/core/gnunet-service-core.c:541 msgid "# messages discarded (session disconnected)" msgstr "# mensajes descartados (sesión desconectada)" -#: src/core/gnunet-service-core.c:876 +#: src/core/gnunet-service-core.c:879 #, fuzzy, c-format msgid "# messages of type %u discarded (client busy)" msgstr "# bytes de mensajes del tipo %u recibidos" -#: src/core/gnunet-service-core.c:985 +#: src/core/gnunet-service-core.c:988 msgid "Core service is lacking HOSTKEY configuration setting. Exiting.\n" msgstr "" "Al servicio principal le falta la configuración de la clave de máquina " "(HOSTKEY). Saliendo.\n" -#: src/core/gnunet-service-core.c:1006 +#: src/core/gnunet-service-core.c:1009 #, fuzzy, c-format msgid "Core service of `%s' ready.\n" msgstr "El servicio principal de «%4s» está listo.\n" @@ -1376,298 +1376,166 @@ msgstr "# bytes cifrados" msgid "# bytes decrypted" msgstr "# bytes descifrados" -#: src/core/gnunet-service-core_kx.c:725 +#: src/core/gnunet-service-core_kx.c:728 #, fuzzy msgid "# PAYLOAD dropped (out of order)" msgstr "# bytes omitidos (fuera de secuencia)" -#: src/core/gnunet-service-core_kx.c:775 +#: src/core/gnunet-service-core_kx.c:778 msgid "# key exchanges initiated" msgstr "# intercambio de claves iniciados" -#: src/core/gnunet-service-core_kx.c:837 +#: src/core/gnunet-service-core_kx.c:840 msgid "# key exchanges stopped" msgstr "# intercambio de claves parados" -#: src/core/gnunet-service-core_kx.c:871 +#: src/core/gnunet-service-core_kx.c:874 #, fuzzy msgid "# PING messages transmitted" msgstr "# mensajes PONG creados" -#: src/core/gnunet-service-core_kx.c:938 +#: src/core/gnunet-service-core_kx.c:941 msgid "# old ephemeral keys ignored" msgstr "" -#: src/core/gnunet-service-core_kx.c:945 +#: src/core/gnunet-service-core_kx.c:948 #, fuzzy msgid "# ephemeral keys received" msgstr "# mapas de tipos recibidos" -#: src/core/gnunet-service-core_kx.c:984 +#: src/core/gnunet-service-core_kx.c:987 #, c-format msgid "" "Ephemeral key message from peer `%s' rejected as its validity range does not " "match our system time (%llu not in [%llu,%llu]).\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:995 +#: src/core/gnunet-service-core_kx.c:998 #, fuzzy msgid "# EPHEMERAL_KEY messages received" msgstr "# mensajes «SET_KEY» descifrados" -#: src/core/gnunet-service-core_kx.c:1091 -#: src/transport/gnunet-service-transport_validation.c:1119 +#: src/core/gnunet-service-core_kx.c:1094 +#: src/transport/gnunet-service-transport_validation.c:1128 msgid "# PING messages received" msgstr "# mensajes PING recibidos" -#: src/core/gnunet-service-core_kx.c:1100 +#: src/core/gnunet-service-core_kx.c:1103 #, fuzzy msgid "# PING messages dropped (out of order)" msgstr "# Mensajes P2P omitidos debido a saturación de la cola" -#: src/core/gnunet-service-core_kx.c:1158 +#: src/core/gnunet-service-core_kx.c:1161 msgid "# PONG messages created" msgstr "# mensajes PONG creados" -#: src/core/gnunet-service-core_kx.c:1184 +#: src/core/gnunet-service-core_kx.c:1187 msgid "# sessions terminated by timeout" msgstr "# sesiones terminadas por plazo de expiración" -#: src/core/gnunet-service-core_kx.c:1197 +#: src/core/gnunet-service-core_kx.c:1200 msgid "# keepalive messages sent" msgstr "# mensajes «keepalive» enviados" -#: src/core/gnunet-service-core_kx.c:1261 -#: src/transport/gnunet-service-transport_validation.c:1442 +#: src/core/gnunet-service-core_kx.c:1264 +#: src/transport/gnunet-service-transport_validation.c:1461 msgid "# PONG messages received" msgstr "# mensajes PONG recibidos" -#: src/core/gnunet-service-core_kx.c:1268 +#: src/core/gnunet-service-core_kx.c:1271 #, fuzzy msgid "# PONG messages dropped (connection down)" msgstr "# mensajes PONG recibidos" -#: src/core/gnunet-service-core_kx.c:1273 +#: src/core/gnunet-service-core_kx.c:1276 #, fuzzy msgid "# PONG messages dropped (out of order)" msgstr "# Mensajes P2P omitidos debido a saturación de la cola" -#: src/core/gnunet-service-core_kx.c:1308 +#: src/core/gnunet-service-core_kx.c:1311 msgid "# PONG messages decrypted" msgstr "# mensajes PONG descifrados" -#: src/core/gnunet-service-core_kx.c:1346 +#: src/core/gnunet-service-core_kx.c:1349 msgid "# session keys confirmed via PONG" msgstr "# claves de sesión confirmadas vía PONG" -#: src/core/gnunet-service-core_kx.c:1357 +#: src/core/gnunet-service-core_kx.c:1360 #, fuzzy msgid "# timeouts prevented via PONG" msgstr "# bytes recibidos vía TCP" -#: src/core/gnunet-service-core_kx.c:1364 +#: src/core/gnunet-service-core_kx.c:1367 msgid "# rekey operations confirmed via PONG" msgstr "# operaciones de cambio de clave confirmadas vía PONG" -#: src/core/gnunet-service-core_kx.c:1518 +#: src/core/gnunet-service-core_kx.c:1521 #, fuzzy msgid "# DATA message dropped (out of order)" msgstr "# bytes omitidos (fuera de secuencia)" -#: src/core/gnunet-service-core_kx.c:1526 +#: src/core/gnunet-service-core_kx.c:1529 #, c-format msgid "" "Session to peer `%s' went down due to key expiration (should not happen)\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:1529 +#: src/core/gnunet-service-core_kx.c:1532 #, fuzzy msgid "# sessions terminated by key expiration" msgstr "# sesiones terminadas por plazo de expiración" -#: src/core/gnunet-service-core_kx.c:1590 -#: src/core/gnunet-service-core_kx.c:1616 +#: src/core/gnunet-service-core_kx.c:1593 +#: src/core/gnunet-service-core_kx.c:1619 msgid "# bytes dropped (duplicates)" msgstr "# bytes omitidos (duplicados)" -#: src/core/gnunet-service-core_kx.c:1603 +#: src/core/gnunet-service-core_kx.c:1606 msgid "# bytes dropped (out of sequence)" msgstr "# bytes omitidos (fuera de secuencia)" -#: src/core/gnunet-service-core_kx.c:1645 +#: src/core/gnunet-service-core_kx.c:1648 msgid "# bytes dropped (ancient message)" msgstr "# bytes omitidos (mensaje antiguo)" -#: src/core/gnunet-service-core_kx.c:1653 -msgid "# bytes of payload decrypted" -msgstr "# bytes de «payload» descifrados" - -#: src/core/gnunet-service-core_sessions.c:266 -#: src/core/gnunet-service-core_sessions.c:356 -#: src/dht/gnunet-service-dht_neighbours.c:733 -#: src/dht/gnunet-service-dht_neighbours.c:795 -#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1520 -#: src/topology/gnunet-daemon-topology.c:612 -#: src/topology/gnunet-daemon-topology.c:714 -#: src/transport/gnunet-service-transport_neighbours.c:719 -#: src/transport/gnunet-service-transport_neighbours.c:727 -msgid "# peers connected" -msgstr "# pares conectados" - -#: src/core/gnunet-service-core_sessions.c:302 -msgid "# type map refreshes sent" -msgstr "# envíos de refrescos del mapa de tipos" - -#: src/core/gnunet-service-core_sessions.c:422 -#, fuzzy -msgid "# outdated typemap confirmations received" -msgstr "Se produjo un fallo al encolar una confirmación de recepción\n" - -#: src/core/gnunet-service-core_sessions.c:439 -#, fuzzy -msgid "# valid typemap confirmations received" -msgstr "Se produjo un fallo al encolar una confirmación de recepción\n" - -#: src/core/gnunet-service-core_typemap.c:169 -#: src/core/gnunet-service-core_typemap.c:181 -msgid "# type maps received" -msgstr "# mapas de tipos recibidos" - -#: src/core/gnunet-service-core_typemap.c:212 -msgid "# updates to my type map" -msgstr "# actualizaciones de mi mapa de tipos" - -#: src/credential/credential_misc.c:88 -#, fuzzy, c-format -msgid "Unable to parse CRED record string `%s'\n" -msgstr "No se pudo procesar la cadena de registro VPN «%s»\n" - -#: src/credential/gnunet-credential.c:278 src/namestore/gnunet-namestore.c:776 -#: src/namestore/plugin_rest_namestore.c:1009 -#, fuzzy, c-format -msgid "Ego `%s' not known to identity service\n" -msgstr "'%s': servicio desconocido: %s\n" - -#: src/credential/gnunet-credential.c:294 -#: src/credential/gnunet-credential.c:446 -#, fuzzy, c-format -msgid "Issuer public key `%s' is not well-formed\n" -msgstr "El bloque del tipo %u está mal formado\n" - -#: src/credential/gnunet-credential.c:375 -#: src/credential/gnunet-credential.c:435 -#, fuzzy, c-format -msgid "Issuer public key not well-formed\n" -msgstr "El bloque del tipo %u está mal formado\n" - -#: src/credential/gnunet-credential.c:386 -#: src/credential/gnunet-credential.c:455 -#, fuzzy, c-format -msgid "Failed to connect to CREDENTIAL\n" -msgstr "Se produjo un fallo al conectar con GNS\n" - -#: src/credential/gnunet-credential.c:392 -#, c-format -msgid "You must provide issuer the attribute\n" -msgstr "" - -#: src/credential/gnunet-credential.c:399 -#, fuzzy, c-format -msgid "ego required\n" -msgstr "Tipo requerido\n" - -#: src/credential/gnunet-credential.c:415 -#, c-format -msgid "Subject public key needed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:426 -#, fuzzy, c-format -msgid "Subject public key `%s' is not well-formed\n" -msgstr "El bloque del tipo %u está mal formado\n" - -#: src/credential/gnunet-credential.c:461 -#, c-format -msgid "You must provide issuer and subject attributes\n" -msgstr "" - -#: src/credential/gnunet-credential.c:511 -#, fuzzy, c-format -msgid "Issuer ego required\n" -msgstr "Tipo requerido\n" - -#: src/credential/gnunet-credential.c:523 -#, c-format -msgid "Please specify name to lookup, subject key and issuer key!\n" -msgstr "" - -#: src/credential/gnunet-credential.c:543 -msgid "create credential" -msgstr "" - -#: src/credential/gnunet-credential.c:547 -msgid "verify credential against attribute" -msgstr "" - -#: src/credential/gnunet-credential.c:552 -#, fuzzy -msgid "The public key of the subject to lookup the credential for" -msgstr "Especificar el tipo del registro a buscar" - -#: src/credential/gnunet-credential.c:557 -msgid "The name of the credential presented by the subject" -msgstr "" - -#: src/credential/gnunet-credential.c:562 -#, fuzzy -msgid "The public key of the authority to verify the credential against" -msgstr "Especificar el tipo del registro a buscar" - -#: src/credential/gnunet-credential.c:567 -#, fuzzy -msgid "The ego to use" -msgstr "tamaño del mensaje" - -#: src/credential/gnunet-credential.c:572 -msgid "The issuer attribute to verify against or to issue" -msgstr "" +#: src/core/gnunet-service-core_kx.c:1656 +msgid "# bytes of payload decrypted" +msgstr "# bytes de «payload» descifrados" -#: src/credential/gnunet-credential.c:577 -msgid "The time to live for the credential" -msgstr "" +#: src/core/gnunet-service-core_sessions.c:260 +#: src/core/gnunet-service-core_sessions.c:350 +#: src/dht/gnunet-service-dht_neighbours.c:733 +#: src/dht/gnunet-service-dht_neighbours.c:795 +#: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1520 +#: src/topology/gnunet-daemon-topology.c:612 +#: src/topology/gnunet-daemon-topology.c:714 +#: src/transport/gnunet-service-transport_neighbours.c:719 +#: src/transport/gnunet-service-transport_neighbours.c:727 +msgid "# peers connected" +msgstr "# pares conectados" -#: src/credential/gnunet-credential.c:581 -msgid "collect credentials" -msgstr "" +#: src/core/gnunet-service-core_sessions.c:296 +msgid "# type map refreshes sent" +msgstr "# envíos de refrescos del mapa de tipos" -#: src/credential/gnunet-credential.c:595 +#: src/core/gnunet-service-core_sessions.c:416 #, fuzzy -msgid "GNUnet credential resolver tool" -msgstr "Herramienta de acceso GNUnet GNS" - -#: src/credential/gnunet-service-credential.c:1204 -#: src/gns/gnunet-gns-helper-service-w32.c:727 src/gns/gnunet-gns.c:355 -#, c-format -msgid "Failed to connect to GNS\n" -msgstr "Se produjo un fallo al conectar con GNS\n" +msgid "# outdated typemap confirmations received" +msgstr "Se produjo un fallo al encolar una confirmación de recepción\n" -#: src/credential/gnunet-service-credential.c:1210 -#: src/namestore/gnunet-namestore-fcfsd.c:1034 -#: src/namestore/gnunet-namestore.c:802 -#: src/namestore/plugin_rest_namestore.c:1022 -#, c-format -msgid "Failed to connect to namestore\n" -msgstr "Se produjo un fallo al conectar con el almacén de nombres\n" +#: src/core/gnunet-service-core_sessions.c:433 +#, fuzzy +msgid "# valid typemap confirmations received" +msgstr "Se produjo un fallo al encolar una confirmación de recepción\n" -#: src/credential/plugin_gnsrecord_credential.c:186 -#, fuzzy, c-format -msgid "Unable to parse ATTR record string `%s'\n" -msgstr "No se pudo procesar la cadena de registro TLSA «%s»\n" +#: src/core/gnunet-service-core_typemap.c:169 +#: src/core/gnunet-service-core_typemap.c:181 +msgid "# type maps received" +msgstr "# mapas de tipos recibidos" -#: src/credential/plugin_rest_credential.c:1155 src/gns/plugin_rest_gns.c:668 -#, fuzzy -msgid "GNS REST API initialized\n" -msgstr "Conexión fallida\n" +#: src/core/gnunet-service-core_typemap.c:212 +msgid "# updates to my type map" +msgstr "# actualizaciones de mi mapa de tipos" #: src/datacache/datacache.c:119 src/datacache/datacache.c:294 #: src/datastore/gnunet-service-datastore.c:757 @@ -1715,9 +1583,8 @@ msgstr "Caché de datos de montículo (heap) ejecutándose\n" #: src/datacache/plugin_datacache_sqlite.c:122 #: src/datastore/plugin_datastore_mysql.c:892 #: src/datastore/plugin_datastore_sqlite.c:58 -#: src/datastore/plugin_datastore_sqlite.c:66 -#: src/identity-provider/plugin_identity_provider_sqlite.c:52 src/my/my.c:80 -#: src/my/my.c:92 src/mysql/mysql.c:42 src/mysql/mysql.c:49 +#: src/datastore/plugin_datastore_sqlite.c:66 src/my/my.c:80 src/my/my.c:92 +#: src/mysql/mysql.c:42 src/mysql/mysql.c:49 #: src/namecache/plugin_namecache_sqlite.c:53 #: src/namestore/plugin_namestore_sqlite.c:53 #: src/peerstore/plugin_peerstore_sqlite.c:52 @@ -1735,7 +1602,6 @@ msgstr "«%s» falló en %s: %d con el error: %s\n" #: src/datacache/plugin_datacache_sqlite.c:817 #: src/datastore/plugin_datastore_sqlite.c:456 -#: src/identity-provider/plugin_identity_provider_sqlite.c:336 #: src/namecache/plugin_namecache_sqlite.c:296 #: src/namestore/plugin_namestore_sqlite.c:355 msgid "Tried to close sqlite without finalizing all prepared statements.\n" @@ -1760,7 +1626,7 @@ msgstr "# desbordamientos de la cola" msgid "# queue entries created" msgstr "# entradas creadas en la cola" -#: src/datastore/datastore_api.c:740 +#: src/datastore/datastore_api.c:760 msgid "# status messages received" msgstr "# mensajes de estado recibidos" @@ -1768,35 +1634,35 @@ msgstr "# mensajes de estado recibidos" msgid "# Results received" msgstr "# Resultados recibidos" -#: src/datastore/datastore_api.c:941 +#: src/datastore/datastore_api.c:920 msgid "# datastore connections (re)created" msgstr "# conexiones a almacenes de datos (re)creadas" -#: src/datastore/datastore_api.c:1055 +#: src/datastore/datastore_api.c:1034 msgid "# PUT requests executed" msgstr "# peticiones «PUT» ejecutadas" -#: src/datastore/datastore_api.c:1116 +#: src/datastore/datastore_api.c:1095 msgid "# RESERVE requests executed" msgstr "# peticiones «RESERVE» ejecutadas" -#: src/datastore/datastore_api.c:1181 +#: src/datastore/datastore_api.c:1160 msgid "# RELEASE RESERVE requests executed" msgstr "# Peticiones «RELEASE RESERVE» ejecutadas" -#: src/datastore/datastore_api.c:1259 +#: src/datastore/datastore_api.c:1238 msgid "# REMOVE requests executed" msgstr "# peticiones «REMOVE» ejecutadas" -#: src/datastore/datastore_api.c:1319 +#: src/datastore/datastore_api.c:1298 msgid "# GET REPLICATION requests executed" msgstr "# peticiones «GET REPLICATION» ejecutadas" -#: src/datastore/datastore_api.c:1381 +#: src/datastore/datastore_api.c:1360 msgid "# GET ZERO ANONYMITY requests executed" msgstr "# peticiones «GET ZERO ANONYMITY» ejecutadas" -#: src/datastore/datastore_api.c:1462 +#: src/datastore/datastore_api.c:1441 msgid "# GET requests executed" msgstr "# peticiones «GET» ejecutadas" @@ -2083,7 +1949,6 @@ msgid "`%s' failed at %s:%u with error: %s" msgstr "«%s» falló en %s:%u con el error: %s" #: src/datastore/plugin_datastore_sqlite.c:271 -#: src/identity-provider/plugin_identity_provider_sqlite.c:212 #: src/namecache/plugin_namecache_sqlite.c:194 #: src/namestore/plugin_namestore_sqlite.c:222 #: src/peerstore/plugin_peerstore_sqlite.c:535 @@ -2113,7 +1978,6 @@ msgstr "" "páginas de %llu bytes de tamaño)\n" #: src/datastore/plugin_datastore_sqlite.c:1337 -#: src/identity-provider/plugin_identity_provider_sqlite.c:711 #: src/namecache/plugin_namecache_sqlite.c:603 #: src/namestore/plugin_namestore_sqlite.c:802 msgid "Sqlite database running\n" @@ -2183,6 +2047,53 @@ msgstr "ser prolijo (imprime información de progreso)" msgid "Prints all packets that go through the DHT." msgstr "Imprime todos los paquetes que pasan por la DHT." +#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:253 +#, fuzzy, c-format +msgid "Exiting as the number of peers is %u\n" +msgstr "El número máximo de conexiones es %u\n" + +#: src/dht/gnunet_dht_profiler.c:1188 +msgid "number of peers to start" +msgstr "número de pares para empezar" + +#: src/dht/gnunet_dht_profiler.c:1194 +msgid "" +"maximum number of times we try to search for successor circle formation (0 " +"for R5N)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 +#: src/testbed/gnunet-testbed-profiler.c:304 +msgid "name of the file with the login information for the testbed" +msgstr "" +"nombre del fichero con la información de acceso usada para la batería de " +"pruebas" + +#: src/dht/gnunet_dht_profiler.c:1206 +msgid "delay between rounds for collecting statistics (default: 30 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1212 +msgid "delay to start doing PUTs (default: 1 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1218 +msgid "delay to start doing GETs (default: 5 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1223 +msgid "replication degree for DHT PUTs" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1230 +msgid "timeout for DHT PUT and GET requests (default: 1 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1248 +#, fuzzy +msgid "Measure quality and performance of the DHT service." +msgstr "Medir la calidad y rendimiento del servicio NSE." + #: src/dht/gnunet-dht-put.c:120 msgid "PUT request sent with key" msgstr "Petición «PUT» enviada con clave" @@ -2449,53 +2360,6 @@ msgstr "# Entradas añadidas a la tabla de encaminamiento" msgid "# DHT requests combined" msgstr "# Peticiones a la DHT combinadas" -#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:255 -#, fuzzy, c-format -msgid "Exiting as the number of peers is %u\n" -msgstr "El número máximo de conexiones es %u\n" - -#: src/dht/gnunet_dht_profiler.c:1188 -msgid "number of peers to start" -msgstr "número de pares para empezar" - -#: src/dht/gnunet_dht_profiler.c:1194 -msgid "" -"maximum number of times we try to search for successor circle formation (0 " -"for R5N)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 -#: src/testbed/gnunet-testbed-profiler.c:305 -msgid "name of the file with the login information for the testbed" -msgstr "" -"nombre del fichero con la información de acceso usada para la batería de " -"pruebas" - -#: src/dht/gnunet_dht_profiler.c:1206 -msgid "delay between rounds for collecting statistics (default: 30 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1212 -msgid "delay to start doing PUTs (default: 1 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1218 -msgid "delay to start doing GETs (default: 5 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1223 -msgid "replication degree for DHT PUTs" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1230 -msgid "timeout for DHT PUT and GET requests (default: 1 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1248 -#, fuzzy -msgid "Measure quality and performance of the DHT service." -msgstr "Medir la calidad y rendimiento del servicio NSE." - #: src/dht/plugin_block_dht.c:187 #, c-format msgid "Block not of type %u\n" @@ -3069,7 +2933,7 @@ msgstr "" msgid "Failed to not connect to `%s' service.\n" msgstr "Se produjo un fallo al conectar con el servicio «%s».\n" -#: src/fs/fs_misc.c:126 +#: src/fs/fs_misc.c:128 #, c-format msgid "Did not find mime type `%s' in extension list.\n" msgstr "No se encontró el tipo MIME «%s» en la lista de extensiones.\n" @@ -3518,6 +3382,14 @@ msgstr "" "Descargar ficheros de GNUnet usando una URI GNUnet CHK o LOC (gnunet://fs/" "chk/...)" +#: src/fs/gnunet-fs.c:119 +msgid "print a list of all indexed files" +msgstr "imprimir una lista de todos los ficheros indexados" + +#: src/fs/gnunet-fs.c:130 +msgid "Special file-sharing operations" +msgstr "Operaciones especiales de compartición de ficheros" + #: src/fs/gnunet-fs-profiler.c:211 msgid "run the experiment with COUNT peers" msgstr "ejecuta el experimento con «COUNT» pares" @@ -3538,14 +3410,6 @@ msgstr "" "ejecuta una batería de pruebas para medir el rendimiento de la compartición " "de ficheros" -#: src/fs/gnunet-fs.c:119 -msgid "print a list of all indexed files" -msgstr "imprimir una lista de todos los ficheros indexados" - -#: src/fs/gnunet-fs.c:130 -msgid "Special file-sharing operations" -msgstr "Operaciones especiales de compartición de ficheros" - #: src/fs/gnunet-publish.c:219 src/fs/gnunet-publish.c:231 #, c-format msgid "Publishing `%s' at %llu/%llu (%s remaining)\n" @@ -4242,11 +4106,22 @@ msgstr "" msgid "GNUnet DNS-to-GNS proxy (a DNS server)" msgstr "Pasarela GNUnet DNS-a-GNS (un servidor DNS)" -#: src/gns/gnunet-gns-helper-service-w32.c:602 -msgid "Not ready to process requests, lacking ego data\n" +#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 +#, c-format +msgid "Invalid typename specified, assuming `ANY'\n" +msgstr "" + +#: src/gns/gnunet-gns.c:252 +#, c-format +msgid "Please specify name to lookup!\n" +msgstr "" + +#: src/gns/gnunet-gns.c:276 +#, c-format +msgid "Ego for `%s' not found, cannot perform lookup.\n" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:701 src/gns/gnunet-gns.c:315 +#: src/gns/gnunet-gns.c:315 src/gns/gnunet-gns-helper-service-w32.c:701 #: src/gns/plugin_rest_gns.c:422 #, c-format msgid "" @@ -4254,6 +4129,52 @@ msgid "" "gns-import.sh?\n" msgstr "" +#: src/gns/gnunet-gns.c:355 src/gns/gnunet-gns-helper-service-w32.c:727 +#, c-format +msgid "Failed to connect to GNS\n" +msgstr "Se produjo un fallo al conectar con GNS\n" + +#: src/gns/gnunet-gns.c:374 +#, c-format +msgid "Public key `%s' is not well-formed\n" +msgstr "" + +#: src/gns/gnunet-gns.c:428 +msgid "Lookup a record for the given name" +msgstr "Buscar el registro para el nombre dado" + +#: src/gns/gnunet-gns.c:434 +msgid "Specify the type of the record to lookup" +msgstr "Especificar el tipo del registro a buscar" + +#: src/gns/gnunet-gns.c:440 +#, fuzzy +msgid "Specify timeout for the lookup" +msgstr "Especificar el tipo del registro a buscar" + +#: src/gns/gnunet-gns.c:445 +msgid "No unneeded output" +msgstr "Sin salida innecesaria" + +#: src/gns/gnunet-gns.c:451 +#, fuzzy +msgid "Specify the public key of the zone to lookup the record in" +msgstr "Especificar el tipo del registro a buscar" + +#: src/gns/gnunet-gns.c:457 +#, fuzzy +msgid "Specify the name of the ego of the zone to lookup the record in" +msgstr "Especificar el tipo del registro a buscar" + +#: src/gns/gnunet-gns.c:476 +#, fuzzy +msgid "GNUnet GNS resolver tool" +msgstr "Herramienta de acceso GNUnet GNS" + +#: src/gns/gnunet-gns-helper-service-w32.c:602 +msgid "Not ready to process requests, lacking ego data\n" +msgstr "" + #: src/gns/gnunet-gns-helper-service-w32.c:739 #, fuzzy, c-format msgid "Failed to connect to identity service\n" @@ -4278,164 +4199,112 @@ msgstr "" msgid "%s failed at %s:%d: `%s'\n" msgstr "%s falló en %s:%d: «%s».\n" -#: src/gns/gnunet-gns-proxy.c:878 +#: src/gns/gnunet-gns-proxy.c:887 #, fuzzy, c-format msgid "Unsupported CURL SSL backend %d\n" msgstr "Tipo de bloque %u no soportado\n" -#: src/gns/gnunet-gns-proxy.c:901 +#: src/gns/gnunet-gns-proxy.c:910 #, fuzzy, c-format msgid "Failed to fetch CN from cert: %s\n" msgstr "Se produjo un fallo al mandar la petición DNS a %s\n" -#: src/gns/gnunet-gns-proxy.c:924 +#: src/gns/gnunet-gns-proxy.c:933 #, fuzzy, c-format msgid "Failed to initialize DANE: %s\n" msgstr "¡No se puede inicializar el resolvedor!\n" -#: src/gns/gnunet-gns-proxy.c:937 +#: src/gns/gnunet-gns-proxy.c:946 #, fuzzy, c-format msgid "Failed to parse DANE record: %s\n" msgstr "Se produjo un fallo al procesar la petición DNS. Omitiendo.\n" -#: src/gns/gnunet-gns-proxy.c:952 +#: src/gns/gnunet-gns-proxy.c:961 #, fuzzy, c-format msgid "Failed to verify TLS connection using DANE: %s\n" msgstr "Se produjo un fallo al borrar el fichero de configuración %s\n" -#: src/gns/gnunet-gns-proxy.c:962 +#: src/gns/gnunet-gns-proxy.c:971 #, c-format msgid "Failed DANE verification failed with GnuTLS verify status code: %u\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:986 +#: src/gns/gnunet-gns-proxy.c:995 #, c-format msgid "SSL certificate subject name (%s) does not match `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1095 +#: src/gns/gnunet-gns-proxy.c:1104 #, c-format msgid "Cookie domain `%s' supplied by server is invalid\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1699 +#: src/gns/gnunet-gns-proxy.c:1709 #, fuzzy, c-format msgid "Unsupported HTTP method `%s'\n" msgstr "Tipo no soportado «%s»\n" -#: src/gns/gnunet-gns-proxy.c:2162 +#: src/gns/gnunet-gns-proxy.c:2172 #, c-format msgid "Unable to import private key from file `%s'\n" msgstr "No se pudo importar la clave privada del fichero «%s»\n" -#: src/gns/gnunet-gns-proxy.c:2192 +#: src/gns/gnunet-gns-proxy.c:2202 #, c-format msgid "Unable to import certificate %s\n" msgstr "No se pudo importar el certificado %s\n" -#: src/gns/gnunet-gns-proxy.c:2365 +#: src/gns/gnunet-gns-proxy.c:2375 #, fuzzy, c-format msgid "Failed to start HTTPS server for `%s'\n" msgstr "Se produjo un fallo al iniciar el servidor HTTP\n" -#: src/gns/gnunet-gns-proxy.c:2384 src/rest/gnunet-rest-server.c:533 +#: src/gns/gnunet-gns-proxy.c:2394 src/rest/gnunet-rest-server.c:533 #, fuzzy msgid "Failed to pass client to MHD\n" msgstr "Se produjo un fallo al conectar con GNS\n" -#: src/gns/gnunet-gns-proxy.c:2704 +#: src/gns/gnunet-gns-proxy.c:2716 #, fuzzy, c-format msgid "Unsupported socks version %d\n" msgstr "Tipo de bloque %u no soportado\n" -#: src/gns/gnunet-gns-proxy.c:2733 +#: src/gns/gnunet-gns-proxy.c:2745 #, fuzzy, c-format msgid "Unsupported socks command %d\n" msgstr "Tipo de bloque %u no soportado\n" -#: src/gns/gnunet-gns-proxy.c:2751 src/gns/gnunet-gns-proxy.c:2780 +#: src/gns/gnunet-gns-proxy.c:2763 src/gns/gnunet-gns-proxy.c:2792 msgid "SSL connection to plain IPv4 address requested\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2830 +#: src/gns/gnunet-gns-proxy.c:2842 #, fuzzy, c-format msgid "Unsupported socks address type %d\n" -msgstr "Tipo de bloque %u no soportado\n" - -#: src/gns/gnunet-gns-proxy.c:3165 src/gns/gnunet-service-gns.c:403 -#, fuzzy, c-format -msgid "No ego configured for `%s`\n" -msgstr "" -"Ningún puerto fue configurado para el módulo «%s», no se puede probar\n" - -#: src/gns/gnunet-gns-proxy.c:3226 -#, fuzzy, c-format -msgid "Failed to load SSL/TLS key and certificate from `%s'\n" -msgstr "Se produjo un fallo al leer la lista de amigos de «%s»\n" - -#: src/gns/gnunet-gns-proxy.c:3269 -msgid "listen on specified port (default: 7777)" -msgstr "escuchar en el puerto especificado (predeterminado: 7777)" - -#: src/gns/gnunet-gns-proxy.c:3275 -msgid "pem file to use as CA" -msgstr "fichero pem para usar como autoridad de certificación (CA)" - -#: src/gns/gnunet-gns-proxy.c:3300 -msgid "GNUnet GNS proxy" -msgstr "Proxy GNUnet GNS" - -#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 -#, c-format -msgid "Invalid typename specified, assuming `ANY'\n" -msgstr "" - -#: src/gns/gnunet-gns.c:252 -#, c-format -msgid "Please specify name to lookup!\n" -msgstr "" - -#: src/gns/gnunet-gns.c:276 -#, c-format -msgid "Ego for `%s' not found, cannot perform lookup.\n" -msgstr "" - -#: src/gns/gnunet-gns.c:374 -#, c-format -msgid "Public key `%s' is not well-formed\n" -msgstr "" - -#: src/gns/gnunet-gns.c:428 -msgid "Lookup a record for the given name" -msgstr "Buscar el registro para el nombre dado" - -#: src/gns/gnunet-gns.c:434 -msgid "Specify the type of the record to lookup" -msgstr "Especificar el tipo del registro a buscar" +msgstr "Tipo de bloque %u no soportado\n" -#: src/gns/gnunet-gns.c:440 -#, fuzzy -msgid "Specify timeout for the lookup" -msgstr "Especificar el tipo del registro a buscar" +#: src/gns/gnunet-gns-proxy.c:3177 src/gns/gnunet-service-gns.c:403 +#, fuzzy, c-format +msgid "No ego configured for `%s`\n" +msgstr "" +"Ningún puerto fue configurado para el módulo «%s», no se puede probar\n" -#: src/gns/gnunet-gns.c:445 -msgid "No unneeded output" -msgstr "Sin salida innecesaria" +#: src/gns/gnunet-gns-proxy.c:3238 +#, fuzzy, c-format +msgid "Failed to load SSL/TLS key and certificate from `%s'\n" +msgstr "Se produjo un fallo al leer la lista de amigos de «%s»\n" -#: src/gns/gnunet-gns.c:451 -#, fuzzy -msgid "Specify the public key of the zone to lookup the record in" -msgstr "Especificar el tipo del registro a buscar" +#: src/gns/gnunet-gns-proxy.c:3281 +msgid "listen on specified port (default: 7777)" +msgstr "escuchar en el puerto especificado (predeterminado: 7777)" -#: src/gns/gnunet-gns.c:457 -#, fuzzy -msgid "Specify the name of the ego of the zone to lookup the record in" -msgstr "Especificar el tipo del registro a buscar" +#: src/gns/gnunet-gns-proxy.c:3287 +msgid "pem file to use as CA" +msgstr "fichero pem para usar como autoridad de certificación (CA)" -#: src/gns/gnunet-gns.c:476 -#, fuzzy -msgid "GNUnet GNS resolver tool" -msgstr "Herramienta de acceso GNUnet GNS" +#: src/gns/gnunet-gns-proxy.c:3312 +msgid "GNUnet GNS proxy" +msgstr "Proxy GNUnet GNS" #: src/gns/gnunet-service-gns.c:442 #, fuzzy @@ -4501,37 +4370,47 @@ msgstr "" msgid "Hostname `%s' is not well-formed, resolution fails\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:179 +#: src/gns/plugin_gnsrecord_gns.c:203 #, c-format msgid "Unable to parse PKEY record `%s'\n" msgstr "No se pudo procesar el registro PKEY «%s»\n" -#: src/gns/plugin_gnsrecord_gns.c:208 +#: src/gns/plugin_gnsrecord_gns.c:232 #, fuzzy, c-format msgid "Unable to parse GNS2DNS record `%s'\n" msgstr "No se pudo procesar el registro SOA «%s»\n" -#: src/gns/plugin_gnsrecord_gns.c:229 +#: src/gns/plugin_gnsrecord_gns.c:253 #, fuzzy, c-format msgid "Failed to serialize GNS2DNS record with value `%s'\n" msgstr "" "Se produjo un fallo al escribir el directorio con los resultados de búsqueda " "de «%s»\n" -#: src/gns/plugin_gnsrecord_gns.c:252 +#: src/gns/plugin_gnsrecord_gns.c:276 #, c-format msgid "Unable to parse VPN record string `%s'\n" msgstr "No se pudo procesar la cadena de registro VPN «%s»\n" -#: src/gns/plugin_gnsrecord_gns.c:288 +#: src/gns/plugin_gnsrecord_gns.c:312 #, fuzzy, c-format msgid "Unable to parse BOX record string `%s'\n" msgstr "No se pudo procesar la cadena de registro VPN «%s»\n" +#: src/gns/plugin_gnsrecord_gns.c:360 +#, fuzzy, c-format +msgid "Unable to parse REVERSE record string `%s'\n" +msgstr "No se pudo procesar la cadena de registro VPN «%s»\n" + #: src/gns/plugin_rest_gns.c:384 msgid "Ego for not found, cannot perform lookup.\n" msgstr "" +#: src/gns/plugin_rest_gns.c:668 +#, fuzzy +msgid "GNS REST API initialized\n" +msgstr "Conexión fallida\n" + #: src/gnsrecord/plugin_gnsrecord_dns.c:359 #, c-format msgid "Unable to parse IPv4 address `%s'\n" @@ -4649,39 +4528,39 @@ msgstr "Error escribiendo «HELLO» al fichero «%s»: %s\n" msgid "Modified %u addresses, wrote %u bytes\n" msgstr "" -#: src/hello/hello.c:1103 +#: src/hello/hello.c:1110 msgid "Failed to parse HELLO message: missing expiration time\n" msgstr "" "Se produjo un fallo al procesar un mensaje «HELLO»: falta el tiempo de " "expiración\n" -#: src/hello/hello.c:1112 +#: src/hello/hello.c:1119 msgid "Failed to parse HELLO message: invalid expiration time\n" msgstr "" "Se produjo un fallo al procesar un mensaje «HELLO»: tiempo de expiración no " "válido\n" -#: src/hello/hello.c:1122 +#: src/hello/hello.c:1129 msgid "Failed to parse HELLO message: malformed\n" msgstr "Se produjo un fallo al procesar un mensaje «HELLO»: mal formado\n" -#: src/hello/hello.c:1133 +#: src/hello/hello.c:1140 msgid "Failed to parse HELLO message: missing transport plugin\n" msgstr "" "Se produjo un fallo al procesar un mensaje «HELLO»: falta el módulo de " "transporte\n" -#: src/hello/hello.c:1151 +#: src/hello/hello.c:1158 #, fuzzy, c-format msgid "Plugin `%s' not found, skipping address\n" msgstr "Módulo «%s» no encontrado\n" -#: src/hello/hello.c:1159 +#: src/hello/hello.c:1166 #, c-format msgid "Plugin `%s' does not support URIs yet\n" msgstr "El módulo «%s» no soporta URI todavía\n" -#: src/hello/hello.c:1174 +#: src/hello/hello.c:1181 #, c-format msgid "Failed to parse `%s' as an address for plugin `%s'\n" msgstr "" @@ -4947,7 +4826,7 @@ msgid "# hostlist advertisements send" msgstr "# anuncios de listas de máquinas enviados" #: src/hostlist/gnunet-daemon-hostlist_server.c:679 -#: src/transport/gnunet-service-transport.c:2803 +#: src/transport/gnunet-service-transport.c:2815 msgid "Could not access PEERINFO service. Exiting.\n" msgstr "" "No se pudo acceder al servicio de información de pares (PEERINFO). " @@ -4994,53 +4873,6 @@ msgid "Could not start hostlist HTTP server on port %u\n" msgstr "" "No se pudo arrancar un servidor de listas de máquinas HTTP en el puerto %u\n" -#: src/identity-provider/gnunet-idp.c:348 -#, fuzzy -msgid "Ego is required\n" -msgstr "Las opción «%s» o «%s» es necesaria.\n" - -#: src/identity-provider/gnunet-idp.c:370 -msgid "Add attribute" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:376 -msgid "Attribute value" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:381 -msgid "Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:386 -msgid "Audience (relying party)" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:390 -msgid "List attributes for Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:395 -msgid "Issue a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:400 -msgid "Consume a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:405 -msgid "Revoke a ticket" -msgstr "" - -#: src/identity-provider/identity_provider_api.c:429 -#, fuzzy -msgid "failed to store record\n" -msgstr "El almacén de nombres no pudo añadir el registro\n" - -#: src/identity-provider/plugin_rest_identity_provider.c:1175 -#, fuzzy -msgid "Identity Provider REST API initialized\n" -msgstr "Conexión fallida\n" - #: src/identity/gnunet-identity.c:179 #, fuzzy, c-format msgid "Failed to create ego: %s\n" @@ -5135,11 +4967,34 @@ msgstr "Se produjo un fallo al borrar el fichero de configuración %s\n" msgid "Failed to create directory `%s' for storing egos\n" msgstr "Se produjo un fallo al leer el directorio «%s»\n" -#: src/identity/plugin_rest_identity.c:964 +#: src/identity/plugin_rest_identity.c:967 #, fuzzy msgid "Identity REST API initialized\n" msgstr "Conexión fallida\n" +#: src/identity-provider/gnunet-identity-token.c:66 +#, fuzzy +msgid "Option `-t' is required\n" +msgstr "Las opción «%s» o «%s» es necesaria.\n" + +#: src/identity-provider/gnunet-identity-token.c:77 +#, fuzzy, c-format +msgid "Token `%s' is malformed\n" +msgstr "El bloque del tipo %u está mal formado\n" + +#: src/identity-provider/gnunet-identity-token.c:166 +msgid "GNUid token" +msgstr "" + +#: src/identity-provider/gnunet-identity-token.c:171 +msgid "Print token contents" +msgstr "" + +#: src/identity-provider/plugin_rest_identity_provider.c:1166 +#, fuzzy +msgid "Identity Token REST API initialized\n" +msgstr "Conexión fallida\n" + #: src/json/json.c:119 #, fuzzy, c-format msgid "Failed to parse JSON in option `%s': %s (%s)\n" @@ -5242,80 +5097,19 @@ msgstr "Se produjo un fallo al crear los índices\n" msgid "flat plugin running\n" msgstr "Base de datos sqlite ejecutándose\n" -# form?? -#: src/namestore/gnunet-namestore-fcfsd.c:508 -#, c-format -msgid "Unsupported form value `%s'\n" -msgstr "Forma de valor no soportada «%s»\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:535 -#, c-format -msgid "Failed to create record for domain `%s': %s\n" -msgstr "Se produjo un fallo al crear un registro para el dominio «%s»: %s\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:555 -msgid "Error when mapping zone to name\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:585 -#, c-format -msgid "Found existing name `%s' for the given key\n" -msgstr "Encontrado nombre «%s» para la clave dada\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:662 -#, c-format -msgid "Found %u existing records for domain `%s'\n" -msgstr "Encontrados %u registros para el dominio «%s»\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:718 -#, c-format -msgid "Failed to create page for `%s'\n" -msgstr "Se produjo un fallo al crear la página para «%s»\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:734 -#, c-format -msgid "Failed to setup post processor for `%s'\n" -msgstr "Se produjo un fallo al configurar el post-procesador para «%s»\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:770 -msgid "Domain name must not contain `.'\n" -msgstr "El nombre de dominio no puede contener «.»\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:778 -msgid "Domain name must not contain `+'\n" -msgstr "El nombre de dominio no puede contener «+»\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:974 -msgid "No ego configured for `fcfsd` subsystem\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:1000 -msgid "Failed to start HTTP server\n" -msgstr "Se produjo un fallo al iniciar el servidor HTTP\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1042 -#, fuzzy -msgid "Failed to connect to identity\n" -msgstr "Se produjo un fallo al conectar con GNS\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1074 -#, fuzzy -msgid "GNU Name System First Come First Serve name registration service" -msgstr "Servicio de registro GNUnet GNS primero en llegar, primero en servirse" - #: src/namestore/gnunet-namestore.c:301 #, c-format msgid "Adding record failed: %s\n" msgstr "No se pudo añadir el registro: %s\n" #: src/namestore/gnunet-namestore.c:330 -#: src/namestore/plugin_rest_namestore.c:567 +#: src/namestore/plugin_rest_namestore.c:562 #, fuzzy, c-format msgid "Deleting record failed, record does not exist%s%s\n" msgstr "No se pudo borrar el registro: %s\n" #: src/namestore/gnunet-namestore.c:337 -#: src/namestore/plugin_rest_namestore.c:576 +#: src/namestore/plugin_rest_namestore.c:571 #, fuzzy, c-format msgid "Deleting record failed%s%s\n" msgstr "No se pudo borrar el registro: %s\n" @@ -5333,7 +5127,7 @@ msgid "Records already exist under `%s', cannot add `%s' record.\n" msgstr "" #: src/namestore/gnunet-namestore.c:698 -#: src/namestore/plugin_rest_namestore.c:602 +#: src/namestore/plugin_rest_namestore.c:597 #, c-format msgid "There are no records under label `%s' that could be deleted.\n" msgstr "" @@ -5344,11 +5138,23 @@ msgid "" "There are no records under label `%s' that match the request for deletion.\n" msgstr "" +#: src/namestore/gnunet-namestore.c:776 +#: src/namestore/plugin_rest_namestore.c:1004 +#, fuzzy, c-format +msgid "Ego `%s' not known to identity service\n" +msgstr "'%s': servicio desconocido: %s\n" + #: src/namestore/gnunet-namestore.c:791 #, c-format msgid "No options given\n" msgstr "No se han proporcionado opciones\n" +#: src/namestore/gnunet-namestore.c:802 +#: src/namestore/gnunet-namestore-fcfsd.c:1034 +#: src/namestore/plugin_rest_namestore.c:1017 +msgid "Failed to connect to namestore\n" +msgstr "Se produjo un fallo al conectar con el almacén de nombres\n" + #: src/namestore/gnunet-namestore.c:810 src/namestore/gnunet-namestore.c:819 #: src/namestore/gnunet-namestore.c:838 src/namestore/gnunet-namestore.c:861 #: src/namestore/gnunet-namestore.c:915 @@ -5362,14 +5168,14 @@ msgid "add" msgstr "añadir" #: src/namestore/gnunet-namestore.c:829 -#: src/namestore/plugin_rest_namestore.c:676 +#: src/namestore/plugin_rest_namestore.c:671 #, c-format msgid "Unsupported type `%s'\n" msgstr "Tipo no soportado «%s»\n" #: src/namestore/gnunet-namestore.c:851 -#: src/namestore/plugin_rest_namestore.c:694 -#: src/namestore/plugin_rest_namestore.c:734 +#: src/namestore/plugin_rest_namestore.c:689 +#: src/namestore/plugin_rest_namestore.c:729 #, c-format msgid "Value `%s' invalid for record type `%s'\n" msgstr "Valor «%s» no válido para el tipo de registro «%s»\n" @@ -5399,13 +5205,13 @@ msgid "Invalid nick `%s'\n" msgstr "URI no válida: «%s»\n" #: src/namestore/gnunet-namestore.c:1051 -#: src/namestore/plugin_rest_namestore.c:1052 +#: src/namestore/plugin_rest_namestore.c:1047 #, fuzzy, c-format msgid "No default ego configured in identity service\n" msgstr "'%s': servicio desconocido: %s\n" #: src/namestore/gnunet-namestore.c:1108 -#: src/namestore/plugin_rest_namestore.c:1148 +#: src/namestore/plugin_rest_namestore.c:1143 #, fuzzy, c-format msgid "Cannot connect to identity service\n" msgstr "¡No se pudo conectar al servicio %s!\n" @@ -5471,6 +5277,67 @@ msgstr "" msgid "name of the ego controlling the zone" msgstr "nombre de la sección a la que acceder" +# form?? +#: src/namestore/gnunet-namestore-fcfsd.c:508 +#, c-format +msgid "Unsupported form value `%s'\n" +msgstr "Forma de valor no soportada «%s»\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:535 +#, c-format +msgid "Failed to create record for domain `%s': %s\n" +msgstr "Se produjo un fallo al crear un registro para el dominio «%s»: %s\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:555 +msgid "Error when mapping zone to name\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:585 +#, c-format +msgid "Found existing name `%s' for the given key\n" +msgstr "Encontrado nombre «%s» para la clave dada\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:662 +#, c-format +msgid "Found %u existing records for domain `%s'\n" +msgstr "Encontrados %u registros para el dominio «%s»\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:718 +#, c-format +msgid "Failed to create page for `%s'\n" +msgstr "Se produjo un fallo al crear la página para «%s»\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:734 +#, c-format +msgid "Failed to setup post processor for `%s'\n" +msgstr "Se produjo un fallo al configurar el post-procesador para «%s»\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:770 +msgid "Domain name must not contain `.'\n" +msgstr "El nombre de dominio no puede contener «.»\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:778 +msgid "Domain name must not contain `+'\n" +msgstr "El nombre de dominio no puede contener «+»\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:974 +msgid "No ego configured for `fcfsd` subsystem\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:1000 +msgid "Failed to start HTTP server\n" +msgstr "Se produjo un fallo al iniciar el servidor HTTP\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1042 +#, fuzzy +msgid "Failed to connect to identity\n" +msgstr "Se produjo un fallo al conectar con GNS\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1074 +#, fuzzy +msgid "GNU Name System First Come First Serve name registration service" +msgstr "Servicio de registro GNUnet GNS primero en llegar, primero en servirse" + #: src/namestore/gnunet-service-namestore.c:615 #, fuzzy, c-format msgid "Failed to replicate block in namecache: %s\n" @@ -5486,7 +5353,7 @@ msgstr "El almacén de nombres no pudo añadir el registro\n" msgid "flat file database running\n" msgstr "Base de datos de plantilla ejecutándose\n" -#: src/namestore/plugin_rest_namestore.c:1193 +#: src/namestore/plugin_rest_namestore.c:1188 #, fuzzy msgid "Namestore REST API initialized\n" msgstr "Conexión fallida\n" @@ -5786,6 +5653,11 @@ msgstr "comando «external-ip» no encontrado\n" msgid "`upnpc' command not found\n" msgstr "comando «upnpc» no encontrado\n" +#: src/nse/gnunet-nse.c:122 +#, fuzzy +msgid "Show network size estimates from NSE service." +msgstr "# Estimaciones del tamaño de red recibidas" + #: src/nse/gnunet-nse-profiler.c:842 msgid "limit to the number of connections to NSE services, 0 for none" msgstr "límite al número de conexiones a servicios NSE, 0 para ilimitadas" @@ -5793,33 +5665,87 @@ msgstr "límite al número de conexiones a servicios NSE, 0 para ilimitadas" #: src/nse/gnunet-nse-profiler.c:847 msgid "name of the file for writing connection information and statistics" msgstr "" -"nombre del fichero para escribir información y estadísticas de la conexión" +"nombre del fichero para escribir información y estadísticas de la conexión" + +#: src/nse/gnunet-nse-profiler.c:859 +msgid "name of the file for writing the main results" +msgstr "nombre del fichero en el que escribir los resultados principales" + +#: src/nse/gnunet-nse-profiler.c:866 +msgid "Number of peers to run in each round, separated by commas" +msgstr "Número de pares a ejecutar en cada ronda, separados por comas" + +#: src/nse/gnunet-nse-profiler.c:877 +msgid "delay between rounds" +msgstr "retraso entre rondas" + +#: src/nse/gnunet-nse-profiler.c:886 +msgid "Measure quality and performance of the NSE service." +msgstr "Medir la calidad y rendimiento del servicio NSE." + +#: src/nse/gnunet-service-nse.c:1534 +#: src/revocation/gnunet-service-revocation.c:840 src/util/gnunet-scrypt.c:276 +msgid "Value is too large.\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:178 +#, c-format +msgid "Removing expired address of transport `%s'\n" +msgstr "Eliminando dirección de transporte «%s»\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:310 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s': %s\n" +msgstr "Se produjo un fallo al procesar «HELLO» en el fichero «%s»\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:331 +#: src/peerinfo/gnunet-service-peerinfo.c:362 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s'\n" +msgstr "Se produjo un fallo al procesar «HELLO» en el fichero «%s»\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:446 +msgid "# peers known" +msgstr "# pares conocidos" + +#: src/peerinfo/gnunet-service-peerinfo.c:489 +#, c-format +msgid "" +"File `%s' in directory `%s' does not match naming convention. Removed.\n" +msgstr "" +"El fichero «%s» en el directorio «%s» no sigue la convención de nombres. " +"Eliminado.\n" -#: src/nse/gnunet-nse-profiler.c:859 -msgid "name of the file for writing the main results" -msgstr "nombre del fichero en el que escribir los resultados principales" +#: src/peerinfo/gnunet-service-peerinfo.c:655 +#, fuzzy, c-format +msgid "Scanning directory `%s'\n" +msgstr "Escaneando directorio «%s».\n" -#: src/nse/gnunet-nse-profiler.c:866 -msgid "Number of peers to run in each round, separated by commas" -msgstr "Número de pares a ejecutar en cada ronda, separados por comas" +#: src/peerinfo/gnunet-service-peerinfo.c:663 +#, c-format +msgid "Still no peers found in `%s'!\n" +msgstr "¡Aún no se han encontrado pares en «%s»!\n" -#: src/nse/gnunet-nse-profiler.c:877 -msgid "delay between rounds" -msgstr "retraso entre rondas" +#: src/peerinfo/gnunet-service-peerinfo.c:1080 +#, fuzzy, c-format +msgid "Cleaning up directory `%s'\n" +msgstr "Escaneando directorio «%s».\n" -#: src/nse/gnunet-nse-profiler.c:886 -msgid "Measure quality and performance of the NSE service." -msgstr "Medir la calidad y rendimiento del servicio NSE." +#: src/peerinfo/gnunet-service-peerinfo.c:1409 +#, c-format +msgid "Importing HELLOs from `%s'\n" +msgstr "Importando HELLO de «%s»\n" -#: src/nse/gnunet-nse.c:122 -#, fuzzy -msgid "Show network size estimates from NSE service." -msgstr "# Estimaciones del tamaño de red recibidas" +#: src/peerinfo/gnunet-service-peerinfo.c:1422 +msgid "Skipping import of included HELLOs\n" +msgstr "" -#: src/nse/gnunet-service-nse.c:1534 -#: src/revocation/gnunet-service-revocation.c:838 src/util/gnunet-scrypt.c:276 -msgid "Value is too large.\n" +# Miguel: "Failed to receive" también aquí está traducido como +# "no se obtuvo respuesta" por claridad. +#: src/peerinfo/peerinfo_api.c:220 +msgid "Failed to receive response from `PEERINFO' service." msgstr "" +"No se obtuvo respuesta del servicio de información de pares (PEERINFO)." #: src/peerinfo-tool/gnunet-peerinfo.c:239 #, fuzzy, c-format @@ -5910,65 +5836,6 @@ msgstr "Cargando el módulo de transporte «%s»\n" msgid "Failed to load transport plugin for `%s'\n" msgstr "Se produjo un fallo al cargar el módulo del transporte para «%s»\n" -#: src/peerinfo/gnunet-service-peerinfo.c:178 -#, c-format -msgid "Removing expired address of transport `%s'\n" -msgstr "Eliminando dirección de transporte «%s»\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:310 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s': %s\n" -msgstr "Se produjo un fallo al procesar «HELLO» en el fichero «%s»\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:331 -#: src/peerinfo/gnunet-service-peerinfo.c:362 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s'\n" -msgstr "Se produjo un fallo al procesar «HELLO» en el fichero «%s»\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:446 -msgid "# peers known" -msgstr "# pares conocidos" - -#: src/peerinfo/gnunet-service-peerinfo.c:489 -#, c-format -msgid "" -"File `%s' in directory `%s' does not match naming convention. Removed.\n" -msgstr "" -"El fichero «%s» en el directorio «%s» no sigue la convención de nombres. " -"Eliminado.\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:655 -#, fuzzy, c-format -msgid "Scanning directory `%s'\n" -msgstr "Escaneando directorio «%s».\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:663 -#, c-format -msgid "Still no peers found in `%s'!\n" -msgstr "¡Aún no se han encontrado pares en «%s»!\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1076 -#, fuzzy, c-format -msgid "Cleaning up directory `%s'\n" -msgstr "Escaneando directorio «%s».\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1405 -#, c-format -msgid "Importing HELLOs from `%s'\n" -msgstr "Importando HELLO de «%s»\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1418 -msgid "Skipping import of included HELLOs\n" -msgstr "" - -# Miguel: "Failed to receive" también aquí está traducido como -# "no se obtuvo respuesta" por claridad. -#: src/peerinfo/peerinfo_api.c:220 -msgid "Failed to receive response from `PEERINFO' service." -msgstr "" -"No se obtuvo respuesta del servicio de información de pares (PEERINFO)." - #: src/peerstore/gnunet-peerstore.c:91 msgid "peerstore" msgstr "" @@ -6422,12 +6289,12 @@ msgstr "# sesiones wlan creadas" msgid "# revocation set unions completed" msgstr "# transmisiones de fragmentos completadas" -#: src/revocation/gnunet-service-revocation.c:524 -#: src/revocation/gnunet-service-revocation.c:771 +#: src/revocation/gnunet-service-revocation.c:525 +#: src/revocation/gnunet-service-revocation.c:773 msgid "SET service crashed, terminating revocation service\n" msgstr "" -#: src/revocation/gnunet-service-revocation.c:862 +#: src/revocation/gnunet-service-revocation.c:864 #, fuzzy msgid "Could not open revocation database file!" msgstr "No se pudo conectar con el almacén de datos." @@ -6491,10 +6358,10 @@ msgstr "" msgid "Calculate the Vectorproduct with a GNUnet peer." msgstr "" -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #: src/scalarproduct/gnunet-service-scalarproduct_alice.c:1401 #: src/scalarproduct/gnunet-service-scalarproduct_bob.c:1345 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #, fuzzy msgid "Connect to CADET failed\n" msgstr "Conexión fallida (¿bug?)\n" @@ -6714,7 +6581,7 @@ msgstr "«%s» falló al resolver el método «%s» con error: %s\n" msgid "Wrote %llu bytes of statistics to `%s'\n" msgstr "Escritos %llu bytes de estadísticas a «%s»\n" -#: src/statistics/gnunet-service-statistics.c:1084 +#: src/statistics/gnunet-service-statistics.c:1086 #, c-format msgid "Loading %llu bytes of statistics from `%s'\n" msgstr "Cargando %llu bytes de estadísticas de «%s»\n" @@ -6843,7 +6710,7 @@ msgid "Invalid argument `%s'; expecting unsigned int\n" msgstr "Argumento no válido para '%s' en %s:%d.\n" #: src/testbed/generate-underlay-topology.c:342 -#: src/testbed/gnunet-testbed-profiler.c:284 +#: src/testbed/gnunet-testbed-profiler.c:283 msgid "create COUNT number of peers" msgstr "crea «COUNT» número de pares" @@ -6881,13 +6748,13 @@ msgid "" "deployments" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:231 src/testing/list-keys.c:46 -#: src/testing/testing.c:288 src/util/gnunet-ecc.c:301 +#: src/testbed/gnunet-daemon-testbed-underlay.c:233 src/testing/list-keys.c:46 +#: src/testing/testing.c:288 src/util/gnunet-ecc.c:306 #, c-format msgid "Incorrect hostkey file format: %s\n" msgstr "El fichero de máquinas no tiene el formato correcto: %s\n" -#: src/testbed/gnunet-daemon-testbed-underlay.c:469 +#: src/testbed/gnunet-daemon-testbed-underlay.c:471 msgid "Daemon to restrict underlay network in testbed deployments" msgstr "" @@ -6956,17 +6823,6 @@ msgstr "Petición ignorada porque el ARM se está apagando.\n" msgid "%.s Unknown result code." msgstr "Código de respuesta del ARM desconocido.\n" -#: src/testbed/gnunet-testbed-profiler.c:290 -msgid "tolerate COUNT number of continious timeout failures" -msgstr "tolerar un número «COUNT» de continuas expiraciones de plazo" - -#: src/testbed/gnunet-testbed-profiler.c:295 -msgid "" -"run profiler in non-interactive mode where upon testbed setup the profiler " -"does not wait for a keystroke but continues to run until a termination " -"signal is received" -msgstr "" - #: src/testbed/gnunet_testbed_mpi_spawn.c:118 #, fuzzy msgid "Waiting for child to exit.\n" @@ -6977,6 +6833,17 @@ msgstr "Esperando a los pares para conectar (%u ciclos restantes)...\n" msgid "Spawning process `%s'\n" msgstr "Iniciando el proceso auxiliar (HELPER) «%s»\n" +#: src/testbed/gnunet-testbed-profiler.c:289 +msgid "tolerate COUNT number of continious timeout failures" +msgstr "tolerar un número «COUNT» de continuas expiraciones de plazo" + +#: src/testbed/gnunet-testbed-profiler.c:294 +msgid "" +"run profiler in non-interactive mode where upon testbed setup the profiler " +"does not wait for a keystroke but continues to run until a termination " +"signal is received" +msgstr "" + #: src/testbed/testbed_api.c:410 #, c-format msgid "Adding host %u failed with error: %s\n" @@ -7297,58 +7164,58 @@ msgstr "# mensajes «HELLO» recibidos" msgid "GNUnet topology control" msgstr "" +#: src/transport/gnunet-service-transport_ats.c:141 +msgid "# Addresses given to ATS" +msgstr "" + #: src/transport/gnunet-service-transport.c:448 msgid "# messages dropped due to slow client" msgstr "# mensajes omitidos debido a un cliente lento" -#: src/transport/gnunet-service-transport.c:809 +#: src/transport/gnunet-service-transport.c:818 msgid "# bytes payload dropped (other peer was not connected)" msgstr "# bytes de «payload» omitidos (el otro par no estaba conectado)" -#: src/transport/gnunet-service-transport.c:1539 +#: src/transport/gnunet-service-transport.c:1551 #, fuzzy msgid "# bytes payload discarded due to not connected peer" msgstr "# bytes de «payload» descartados debido a par no conectado" -#: src/transport/gnunet-service-transport.c:1699 +#: src/transport/gnunet-service-transport.c:1711 msgid "# bytes total received" msgstr "# total de bytes recibidos" -#: src/transport/gnunet-service-transport.c:1796 +#: src/transport/gnunet-service-transport.c:1808 msgid "# bytes payload received" msgstr "# bytes de «payload» recibidos" -#: src/transport/gnunet-service-transport.c:2113 -#: src/transport/gnunet-service-transport.c:2585 +#: src/transport/gnunet-service-transport.c:2125 +#: src/transport/gnunet-service-transport.c:2597 msgid "# disconnects due to blacklist" msgstr "# desconexiones debido a la lista negra" -#: src/transport/gnunet-service-transport.c:2589 +#: src/transport/gnunet-service-transport.c:2601 #, fuzzy, c-format msgid "Disallowing connection to peer `%s' on transport %s\n" msgstr "Se produjo un fallo al cargar el módulo del transporte para «%s»\n" -#: src/transport/gnunet-service-transport.c:2697 +#: src/transport/gnunet-service-transport.c:2709 #, fuzzy, c-format msgid "Adding blacklisting entry for peer `%s'\n" msgstr "Añadiendo «%s» sin direcciones para el par «%s»\n" -#: src/transport/gnunet-service-transport.c:2706 +#: src/transport/gnunet-service-transport.c:2718 #, c-format msgid "Adding blacklisting entry for peer `%s':`%s'\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2771 +#: src/transport/gnunet-service-transport.c:2783 #, fuzzy msgid "Transport service is lacking key configuration settings. Exiting.\n" msgstr "" "El servicio de transporte carece de opciones de configuración de clave. " "Saliendo.\n" -#: src/transport/gnunet-service-transport_ats.c:141 -msgid "# Addresses given to ATS" -msgstr "" - #: src/transport/gnunet-service-transport_hello.c:195 msgid "# refreshed my HELLO" msgstr "# refrescos de mi «HELLO»" @@ -7494,75 +7361,75 @@ msgstr "# mensajes PING recibidos" msgid "SYN request from peer `%s' ignored due impending shutdown\n" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:2620 +#: src/transport/gnunet-service-transport_neighbours.c:2623 msgid "# Attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3102 +#: src/transport/gnunet-service-transport_neighbours.c:3105 #, fuzzy msgid "# SYN_ACK messages received" msgstr "# mensajes SET QUOTA recibidos" -#: src/transport/gnunet-service-transport_neighbours.c:3110 +#: src/transport/gnunet-service-transport_neighbours.c:3113 #, fuzzy msgid "# unexpected SYN_ACK messages (no peer)" msgstr "# Mensajes «CONNECT_ACK» inesperados (sin par)" -#: src/transport/gnunet-service-transport_neighbours.c:3128 -#: src/transport/gnunet-service-transport_neighbours.c:3152 +#: src/transport/gnunet-service-transport_neighbours.c:3131 +#: src/transport/gnunet-service-transport_neighbours.c:3155 #, fuzzy msgid "# unexpected SYN_ACK messages (not ready)" msgstr "# Mensajes «CONNECT_ACK» inesperados (no estaba preparado)" -#: src/transport/gnunet-service-transport_neighbours.c:3164 +#: src/transport/gnunet-service-transport_neighbours.c:3167 #, fuzzy msgid "# unexpected SYN_ACK messages (waiting on ATS)" msgstr "# Mensajes «CONNECT_ACK» inesperados (esperando en el ATS)" -#: src/transport/gnunet-service-transport_neighbours.c:3189 +#: src/transport/gnunet-service-transport_neighbours.c:3192 msgid "# Successful attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3202 +#: src/transport/gnunet-service-transport_neighbours.c:3205 #, fuzzy msgid "# unexpected SYN_ACK messages (disconnecting)" msgstr "# Mensajes «CONNECT_ACK» inesperados (desconectando)" -#: src/transport/gnunet-service-transport_neighbours.c:3374 +#: src/transport/gnunet-service-transport_neighbours.c:3377 #, fuzzy msgid "# ACK messages received" msgstr "# mensajes «REQUEST CONNECT» recibidos" -#: src/transport/gnunet-service-transport_neighbours.c:3410 +#: src/transport/gnunet-service-transport_neighbours.c:3413 #, fuzzy msgid "# unexpected ACK messages" msgstr "# Mensajes «SESSION ACK» inesperados" -#: src/transport/gnunet-service-transport_neighbours.c:3498 +#: src/transport/gnunet-service-transport_neighbours.c:3501 #, fuzzy msgid "# quota messages ignored (malformed)" msgstr "# mensajes de desconexión ignorados (formato antiguo)" -#: src/transport/gnunet-service-transport_neighbours.c:3505 +#: src/transport/gnunet-service-transport_neighbours.c:3508 #, fuzzy msgid "# QUOTA messages received" msgstr "# Mensajes «GAP PUT» recibidos" -#: src/transport/gnunet-service-transport_neighbours.c:3545 +#: src/transport/gnunet-service-transport_neighbours.c:3548 #, fuzzy msgid "# disconnect messages ignored (malformed)" msgstr "# mensajes de desconexión ignorados (formato antiguo)" -#: src/transport/gnunet-service-transport_neighbours.c:3552 +#: src/transport/gnunet-service-transport_neighbours.c:3555 #, fuzzy msgid "# DISCONNECT messages received" msgstr "# mensajes «REQUEST CONNECT» recibidos" -#: src/transport/gnunet-service-transport_neighbours.c:3563 +#: src/transport/gnunet-service-transport_neighbours.c:3566 msgid "# disconnect messages ignored (timestamp)" msgstr "# mensajes de desconexión ignorados (marca temporal)" -#: src/transport/gnunet-service-transport_neighbours.c:3697 +#: src/transport/gnunet-service-transport_neighbours.c:3700 msgid "# disconnected from peer upon explicit request" msgstr "# desconexiones del par debido a una petición explícita" @@ -7597,8 +7464,8 @@ msgstr "# revalidaciones de direcciones iniciadas" #: src/transport/gnunet-service-transport_validation.c:491 #: src/transport/gnunet-service-transport_validation.c:677 -#: src/transport/gnunet-service-transport_validation.c:988 -#: src/transport/gnunet-service-transport_validation.c:1590 +#: src/transport/gnunet-service-transport_validation.c:997 +#: src/transport/gnunet-service-transport_validation.c:1609 #, fuzzy msgid "# validations running" msgstr "Base de datos sqlite ejecutándose\n" @@ -7626,31 +7493,31 @@ msgstr "" msgid "# address revalidations started" msgstr "# revalidaciones de direcciones iniciadas" -#: src/transport/gnunet-service-transport_validation.c:1114 +#: src/transport/gnunet-service-transport_validation.c:1123 msgid "# PING message for different peer received" msgstr "# Mensajes PING recibidos para un par diferente" -#: src/transport/gnunet-service-transport_validation.c:1165 +#: src/transport/gnunet-service-transport_validation.c:1174 #, fuzzy, c-format msgid "Plugin `%s' not available, cannot confirm having this address\n" msgstr "" "No confirmando el PING con dirección «%s» ya que no puedo confirmar tener " "esa dirección.\n" -#: src/transport/gnunet-service-transport_validation.c:1178 +#: src/transport/gnunet-service-transport_validation.c:1187 msgid "# failed address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1181 +#: src/transport/gnunet-service-transport_validation.c:1190 #, c-format msgid "Address `%s' is not one of my addresses, not confirming PING\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1189 +#: src/transport/gnunet-service-transport_validation.c:1198 msgid "# successful address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1202 +#: src/transport/gnunet-service-transport_validation.c:1211 #, fuzzy, c-format msgid "" "Not confirming PING from peer `%s' with address `%s' since I cannot confirm " @@ -7659,71 +7526,32 @@ msgstr "" "No confirmando el PING con dirección «%s» ya que no puedo confirmar tener " "esa dirección.\n" -#: src/transport/gnunet-service-transport_validation.c:1257 +#: src/transport/gnunet-service-transport_validation.c:1266 #, fuzzy, c-format msgid "Failed to create PONG signature for peer `%s'\n" msgstr "Se produjo un fallo al crear la página para «%s»\n" -#: src/transport/gnunet-service-transport_validation.c:1308 +#: src/transport/gnunet-service-transport_validation.c:1317 msgid "# PONGs unicast via reliable transport" msgstr "# unicast de PONG vía transporte confiable" -#: src/transport/gnunet-service-transport_validation.c:1317 +#: src/transport/gnunet-service-transport_validation.c:1326 msgid "# PONGs multicast to all available addresses" msgstr "# multicast de PONG a todas las direcciones disponibles" -#: src/transport/gnunet-service-transport_validation.c:1480 +#: src/transport/gnunet-service-transport_validation.c:1499 msgid "# PONGs dropped, no matching pending validation" msgstr "# PONG omitidos, no hay una validación pendiente coincidente" -#: src/transport/gnunet-service-transport_validation.c:1498 +#: src/transport/gnunet-service-transport_validation.c:1517 msgid "# PONGs dropped, signature expired" msgstr "# Mensajes PONG omitidos, firma expirada" -#: src/transport/gnunet-service-transport_validation.c:1553 +#: src/transport/gnunet-service-transport_validation.c:1572 #, fuzzy msgid "# validations succeeded" msgstr "# revalidaciones de direcciones iniciadas" -#: src/transport/gnunet-transport-profiler.c:219 -#, c-format -msgid "%llu B in %llu ms == %.2f KB/s!\n" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:617 -msgid "send data to peer" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:621 -#, fuzzy -msgid "receive data from peer" -msgstr "# respuestas recibidas de otros pares" - -#: src/transport/gnunet-transport-profiler.c:626 -#, fuzzy -msgid "iterations" -msgstr "Otras configuraciones" - -#: src/transport/gnunet-transport-profiler.c:631 -#, fuzzy -msgid "number of messages to send" -msgstr "número de mensajes a usar por iteración" - -#: src/transport/gnunet-transport-profiler.c:636 -#, fuzzy -msgid "message size to use" -msgstr "tamaño del mensaje" - -#: src/transport/gnunet-transport-profiler.c:641 -#: src/transport/gnunet-transport.c:1462 -msgid "peer identity" -msgstr "identidad del par" - -#: src/transport/gnunet-transport-profiler.c:652 -#: src/transport/gnunet-transport.c:1482 -msgid "Direct access to transport service." -msgstr "Acceso directo al servicio de transporte." - #: src/transport/gnunet-transport.c:413 #, c-format msgid "Transmitted %llu bytes/s (%llu bytes in %s)\n" @@ -7867,6 +7695,11 @@ msgstr "" msgid "do not resolve hostnames" msgstr "no resolver nombres de máquinas" +#: src/transport/gnunet-transport.c:1462 +#: src/transport/gnunet-transport-profiler.c:641 +msgid "peer identity" +msgstr "identidad del par" + #: src/transport/gnunet-transport.c:1466 #, fuzzy msgid "monitor plugin sessions" @@ -7876,6 +7709,40 @@ msgstr "# sesiones wlan pendientes" msgid "send data for benchmarking to the other peer (until CTRL-C)" msgstr "enviar data para prueba a otro par (hasta CTRL-C)" +#: src/transport/gnunet-transport.c:1482 +#: src/transport/gnunet-transport-profiler.c:652 +msgid "Direct access to transport service." +msgstr "Acceso directo al servicio de transporte." + +#: src/transport/gnunet-transport-profiler.c:219 +#, c-format +msgid "%llu B in %llu ms == %.2f KB/s!\n" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:617 +msgid "send data to peer" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:621 +#, fuzzy +msgid "receive data from peer" +msgstr "# respuestas recibidas de otros pares" + +#: src/transport/gnunet-transport-profiler.c:626 +#, fuzzy +msgid "iterations" +msgstr "Otras configuraciones" + +#: src/transport/gnunet-transport-profiler.c:631 +#, fuzzy +msgid "number of messages to send" +msgstr "número de mensajes a usar por iteración" + +#: src/transport/gnunet-transport-profiler.c:636 +#, fuzzy +msgid "message size to use" +msgstr "tamaño del mensaje" + #: src/transport/plugin_transport_http_client.c:1474 #: src/transport/plugin_transport_http_server.c:2312 #: src/transport/plugin_transport_http_server.c:3526 @@ -8160,6 +8027,23 @@ msgstr "Transporte TCP no escuchando en ningún puerto (únicamente cliente)\n" msgid "TCP transport advertises itself as being on port %llu\n" msgstr "El transporte TCP anuncia que está en el puerto %llu\n" +#: src/transport/plugin_transport_udp_broadcasting.c:168 +#, fuzzy +msgid "# Multicast HELLO beacons received via UDP" +msgstr "# beacons HELLO multicast IPv6 recibidos vía UDP" + +#: src/transport/plugin_transport_udp_broadcasting.c:548 +msgid "" +"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" +msgstr "" + +#: src/transport/plugin_transport_udp_broadcasting.c:565 +#, c-format +msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" +msgstr "" +"Se produjo un fallo al establecer la opción de «broadcast» IPv4 para el " +"«socket» en el puerto %d\n" + #: src/transport/plugin_transport_udp.c:3366 #, c-format msgid "" @@ -8214,23 +8098,6 @@ msgstr "«%s» no es una dirección IP válida.\n" msgid "Failed to create UDP network sockets\n" msgstr "Se produjo un fallo al crear una nueva firma" -#: src/transport/plugin_transport_udp_broadcasting.c:168 -#, fuzzy -msgid "# Multicast HELLO beacons received via UDP" -msgstr "# beacons HELLO multicast IPv6 recibidos vía UDP" - -#: src/transport/plugin_transport_udp_broadcasting.c:548 -msgid "" -"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" -msgstr "" - -#: src/transport/plugin_transport_udp_broadcasting.c:565 -#, c-format -msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" -msgstr "" -"Se produjo un fallo al establecer la opción de «broadcast» IPv4 para el " -"«socket» en el puerto %d\n" - #: src/transport/plugin_transport_unix.c:1403 #, fuzzy, c-format msgid "Cannot create path to `%s'\n" @@ -8350,7 +8217,7 @@ msgstr "" "El código de procesado para el mensaje del tipo %u no llamó a " "«GNUNET_SERVER_receive_done» después de %s\n" -#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2336 +#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2346 #, c-format msgid "Unknown address family %d\n" msgstr "Familia de direcciones %d desconocida\n" @@ -8431,19 +8298,19 @@ msgstr "Imposible cambiar el usuario/grupo a «%s»: %s\n" msgid "do daemonize (detach from terminal)" msgstr "demonizar (desasociar del terminal)" -#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:244 +#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:255 #: src/util/service.c:1790 #, fuzzy, c-format msgid "Malformed configuration file `%s', exit ...\n" msgstr "Se produjo un fallo al borrar el fichero de configuración %s\n" -#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:261 +#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:272 #: src/util/service.c:1801 #, fuzzy msgid "Malformed configuration, exit ...\n" msgstr "Se produjo un fallo al borrar el fichero de configuración %s\n" -#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:256 +#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:267 #: src/util/service.c:1807 #, c-format msgid "Could not access configuration file `%s'\n" @@ -8483,7 +8350,7 @@ msgstr "Los metadatos serializados «%s» son mayores de lo permitido (%u>%u)" msgid "Metadata `%s' failed to deserialize" msgstr "Se produjo un fallo al deserializar los metadatos «%s»" -#: src/util/client.c:882 +#: src/util/client.c:911 #, c-format msgid "Need a non-empty hostname for service `%s'.\n" msgstr "Se necesita un nombre de máquina no vacío para el servicio «%s».\n" @@ -8587,22 +8454,22 @@ msgstr "" "El tamaño del fichero en disco es incorrecto para este «Bloom " "filter» (esperado %llu, tiene %llu)\n" -#: src/util/crypto_ecc.c:777 +#: src/util/crypto_ecc.c:810 #, c-format msgid "ECC signing failed at %s:%d: %s\n" msgstr "El firmado ECC falló en %s:%d: %s\n" -#: src/util/crypto_ecc.c:827 +#: src/util/crypto_ecc.c:860 #, fuzzy, c-format msgid "EdDSA signing failed at %s:%d: %s\n" msgstr "El firmado ECC falló en %s:%d: %s\n" -#: src/util/crypto_ecc.c:901 +#: src/util/crypto_ecc.c:934 #, fuzzy, c-format msgid "ECDSA signature verification failed at %s:%d: %s\n" msgstr "La verificación de la firma RSA fallo en %s:%d: %s\n" -#: src/util/crypto_ecc.c:958 +#: src/util/crypto_ecc.c:991 #, fuzzy, c-format msgid "EdDSA signature verification failed at %s:%d: %s\n" msgstr "La verificación de la firma RSA fallo en %s:%d: %s\n" @@ -8830,22 +8697,22 @@ msgstr "" msgid "Manipulate GNUnet configuration files" msgstr "Manipular ficheros de configuración de GNUnet" -#: src/util/gnunet-ecc.c:89 +#: src/util/gnunet-ecc.c:94 #, c-format msgid "Failed to open `%s': %s\n" msgstr "Se produjo un fallo al abrir «%s»: %s\n" -#: src/util/gnunet-ecc.c:125 +#: src/util/gnunet-ecc.c:130 #, fuzzy, c-format msgid "Generating %u keys like %s, please wait" msgstr "Generando %u claves, por favor, espere" -#: src/util/gnunet-ecc.c:138 +#: src/util/gnunet-ecc.c:143 #, c-format msgid "Generating %u keys, please wait" msgstr "Generando %u claves, por favor, espere" -#: src/util/gnunet-ecc.c:179 +#: src/util/gnunet-ecc.c:184 #, c-format msgid "" "\n" @@ -8854,65 +8721,70 @@ msgstr "" "\n" "Se produjo un fallo al escribir en «%s»: %s\n" -#: src/util/gnunet-ecc.c:189 +#: src/util/gnunet-ecc.c:194 #, fuzzy, c-format msgid "" "\n" "Finished!\n" msgstr "¡Finalizado!\n" -#: src/util/gnunet-ecc.c:192 +#: src/util/gnunet-ecc.c:197 #, c-format msgid "" "\n" "Error, %u keys not generated\n" msgstr "" -#: src/util/gnunet-ecc.c:283 +#: src/util/gnunet-ecc.c:288 #, fuzzy, c-format msgid "Hostkeys file `%s' not found\n" msgstr "El fichero de máquinas %s no fue encontrado\n" -#: src/util/gnunet-ecc.c:294 +#: src/util/gnunet-ecc.c:299 #, fuzzy, c-format msgid "Hostkeys file `%s' is empty\n" msgstr "El archivo de amigos «%s» está vacío.\n" -#: src/util/gnunet-ecc.c:316 +#: src/util/gnunet-ecc.c:321 #, fuzzy, c-format msgid "Could not read hostkey file: %s\n" msgstr "¡No se puede leer el fichero de claves de máquina!\n" -#: src/util/gnunet-ecc.c:367 +#: src/util/gnunet-ecc.c:372 msgid "No hostkey file specified on command line\n" msgstr "No se ha especificado la clave de máquina en la línea de comandos\n" -#: src/util/gnunet-ecc.c:425 +#: src/util/gnunet-ecc.c:437 msgid "list keys included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:430 +#: src/util/gnunet-ecc.c:442 msgid "number of keys to list included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:435 +#: src/util/gnunet-ecc.c:447 msgid "create COUNT public-private key pairs (for testing)" msgstr "crea «COUNT» pares de claves pública-privada (para pruebas)" -#: src/util/gnunet-ecc.c:439 +#: src/util/gnunet-ecc.c:451 msgid "print the public key in ASCII format" msgstr "imprime la clave pública en formato ASCII" -#: src/util/gnunet-ecc.c:443 +#: src/util/gnunet-ecc.c:455 +#, fuzzy +msgid "print the private key in ASCII format" +msgstr "imprime la clave pública en formato ASCII" + +#: src/util/gnunet-ecc.c:459 #, fuzzy msgid "print the public key in HEX format" msgstr "imprime la clave pública en formato ASCII" -#: src/util/gnunet-ecc.c:447 +#: src/util/gnunet-ecc.c:463 msgid "print examples of ECC operations (used for compatibility testing)" msgstr "" -#: src/util/gnunet-ecc.c:463 +#: src/util/gnunet-ecc.c:479 msgid "Manipulate GNUnet private ECC key files" msgstr "Manipular los ficheros de clave privada ECC de GNUnet" @@ -9078,12 +8950,12 @@ msgstr "" "¡Se debe especificar «%s» o una dirección numérica IP para «%s» de «%s» en " "la configuración!\n" -#: src/util/resolver_api.c:826 +#: src/util/resolver_api.c:827 #, c-format msgid "Timeout trying to resolve hostname `%s'.\n" msgstr "Expiración de plazo intentando resolver el nombre de máquina «%s».\n" -#: src/util/resolver_api.c:839 +#: src/util/resolver_api.c:840 #, c-format msgid "Timeout trying to resolve IP address `%s'.\n" msgstr "Expiración de plazo intentando resolver la dirección IP «%s».\n" @@ -9091,13 +8963,13 @@ msgstr "Expiración de plazo intentando resolver la dirección IP «%s».\n" # Miguel: He traducido "default" por "predeterminado", la locución # "por defecto" no tiene sentido en sitios como este y he tratado # de ser consistente. -#: src/util/resolver_api.c:1023 +#: src/util/resolver_api.c:1024 #, fuzzy msgid "Resolver not configured correctly.\n" msgstr "¡El servicio predeterminado «%s» no está configurado correctamente!\n" -#: src/util/resolver_api.c:1109 src/util/resolver_api.c:1132 -#: src/util/resolver_api.c:1146 +#: src/util/resolver_api.c:1110 src/util/resolver_api.c:1133 +#: src/util/resolver_api.c:1147 #, fuzzy, c-format msgid "Could not resolve our FQDN: %s\n" msgstr "" @@ -9108,7 +8980,7 @@ msgid "" "Could not bind to any of the ports I was supposed to, refusing to run!\n" msgstr "" -#: src/util/service.c:2081 +#: src/util/service.c:2091 #, fuzzy, c-format msgid "" "Processing code for message of type %u did not call " @@ -9300,65 +9172,65 @@ msgstr "# Paquetes ICMPv4 omitidos (no permitido)" msgid "# ICMPv6 packets dropped (not allowed)" msgstr "# Paquetes ICMPv6 omitidos (no permitido)" -#: src/vpn/gnunet-service-vpn.c:2232 +#: src/vpn/gnunet-service-vpn.c:2235 msgid "# Packets received from TUN interface" msgstr "# Paquetes recibidos de la interfaz TUN" -#: src/vpn/gnunet-service-vpn.c:2265 src/vpn/gnunet-service-vpn.c:2301 +#: src/vpn/gnunet-service-vpn.c:2268 src/vpn/gnunet-service-vpn.c:2304 #, c-format msgid "Packet received for unmapped destination `%s' (dropping it)\n" msgstr "Paquete recibido para el destino «%s» no mapeado (omitiéndolo)\n" -#: src/vpn/gnunet-service-vpn.c:2311 +#: src/vpn/gnunet-service-vpn.c:2314 msgid "Received IPv4 packet with options (dropping it)\n" msgstr "Recibido paquete IPv4 con opciones (omitiéndolo)\n" -#: src/vpn/gnunet-service-vpn.c:2325 +#: src/vpn/gnunet-service-vpn.c:2328 #, c-format msgid "Received packet of unknown protocol %d from TUN (dropping it)\n" msgstr "Recibido paquete de protocolo %d desconocido desde TUN (omitiéndolo)\n" -#: src/vpn/gnunet-service-vpn.c:2364 +#: src/vpn/gnunet-service-vpn.c:2367 msgid "Failed to find unallocated IPv4 address in VPN's range\n" msgstr "No se encontraron direcciones IPv4 libres en el rango de la VPN\n" -#: src/vpn/gnunet-service-vpn.c:2419 +#: src/vpn/gnunet-service-vpn.c:2422 msgid "Failed to find unallocated IPv6 address in VPN's range\n" msgstr "No se encontraron direcciones IPv6 libres en el rango de la VPN\n" -#: src/vpn/gnunet-service-vpn.c:2461 src/vpn/gnunet-service-vpn.c:2683 +#: src/vpn/gnunet-service-vpn.c:2464 src/vpn/gnunet-service-vpn.c:2686 msgid "# Active destinations" msgstr "# Destinos activos" -#: src/vpn/gnunet-service-vpn.c:2732 +#: src/vpn/gnunet-service-vpn.c:2735 msgid "Failed to allocate IP address for new destination\n" msgstr "" "Se produjo un fallo al alojar las direcciones IP para el nuevo destino\n" -#: src/vpn/gnunet-service-vpn.c:2995 +#: src/vpn/gnunet-service-vpn.c:2998 #, fuzzy msgid "Must specify valid IPv6 address" msgstr "«%s» no es una dirección IP válida.\n" -#: src/vpn/gnunet-service-vpn.c:3019 +#: src/vpn/gnunet-service-vpn.c:3022 msgid "Must specify valid IPv6 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3027 +#: src/vpn/gnunet-service-vpn.c:3030 msgid "IPv6 support disabled as this system does not support IPv6\n" msgstr "" "El soporte de IPv6 se deshabilita porque este sistema no soporta IPv6\n" -#: src/vpn/gnunet-service-vpn.c:3040 +#: src/vpn/gnunet-service-vpn.c:3043 #, fuzzy msgid "Must specify valid IPv4 address" msgstr "«%s» no es una dirección IP válida.\n" -#: src/vpn/gnunet-service-vpn.c:3053 +#: src/vpn/gnunet-service-vpn.c:3056 msgid "Must specify valid IPv4 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3063 +#: src/vpn/gnunet-service-vpn.c:3066 msgid "IPv4 support disabled as this system does not support IPv4\n" msgstr "" "El soporte de IPv4 se deshabilita porque este sistema no soporta IPv4\n" @@ -9448,10 +9320,6 @@ msgstr "Violación externa del protocolo detectada en %s:%d.\n" msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" msgstr "«%s» falló en el fichero «%s» en %s:%d con el error: %s\n" -#, fuzzy -#~ msgid "Token `%s' is malformed\n" -#~ msgstr "El bloque del tipo %u está mal formado\n" - #~ msgid "Failed to create indices\n" #~ msgstr "Se produjo un fallo al crear los índices\n" diff --git a/po/fr.po b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnunet 0.10.1\n" "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" -"POT-Creation-Date: 2017-10-20 15:14+0000\n" +"POT-Creation-Date: 2018-01-02 02:33+0100\n" "PO-Revision-Date: 2015-12-24 01:20+0100\n" "Last-Translator: Stéphane Aulery <lkppo@free.fr>\n" "Language-Team: French <traduc@traduc.org>\n" @@ -239,14 +239,14 @@ msgid "Require valid port number for service `%s' in configuration!\n" msgstr "" #: src/arm/gnunet-service-arm.c:430 src/transport/plugin_transport_tcp.c:1176 -#: src/transport/tcp_service_legacy.c:613 src/util/client.c:480 +#: src/transport/tcp_service_legacy.c:613 src/util/client.c:505 #: src/util/service.c:682 #, c-format msgid "UNIXPATH `%s' too long, maximum length is %llu\n" msgstr "" #: src/arm/gnunet-service-arm.c:434 src/transport/plugin_transport_tcp.c:1180 -#: src/transport/tcp_service_legacy.c:617 src/util/client.c:485 +#: src/transport/tcp_service_legacy.c:617 src/util/client.c:510 #: src/util/service.c:687 #, c-format msgid "Using `%s' instead\n" @@ -348,14 +348,131 @@ msgstr "" msgid "Initiating shutdown as requested by client.\n" msgstr "" -#: src/ats-tests/ats-testing-log.c:837 -msgid "Stop logging\n" -msgstr "Arrêter la journalisation\n" +#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 +#, c-format +msgid "" +"Could not load quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" -#: src/ats-tests/ats-testing-log.c:892 +#: src/ats/gnunet-ats-solver-eval.c:2799 #, c-format -msgid "Start logging `%s'\n" -msgstr "Démarrer la journalisation « %s »\n" +msgid "" +"No outbound quota configured for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:2840 +#, c-format +msgid "" +"No outbound quota configure for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3294 src/ats-tests/gnunet-solver-eval.c:939 +msgid "solver to use" +msgstr "solveur utilisé" + +#: src/ats/gnunet-ats-solver-eval.c:3299 src/ats-tests/gnunet-solver-eval.c:945 +#: src/ats-tests/gnunet-solver-eval.c:950 +msgid "experiment to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3306 +msgid "print logging" +msgstr "afficher le journal" + +#: src/ats/gnunet-ats-solver-eval.c:3311 +msgid "save logging to disk" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3316 +msgid "disable normalization" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:304 +#, c-format +msgid "" +"Could not load %s quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:314 +#, c-format +msgid "%s quota configured for network `%s' is %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:359 +#, c-format +msgid "" +"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:451 +#, c-format +msgid "Failed to initialize solver `%s'!\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1274 +msgid "Problem size too large, cannot allocate memory!\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1869 +#, c-format +msgid "Adding address for peer `%s' multiple times\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1913 +#, c-format +msgid "Updating address property for peer `%s' %p not added before\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2475 +msgid "" +"MLP solver is not optimizing for anything, changing to feasibility check\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 +#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 +#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 +#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 +#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 +#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 +#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 +#, fuzzy, c-format +msgid "Invalid %s configuration %f \n" +msgstr "fornat invalide : « %s »\n" + +#: src/ats/plugin_ats_mlp.c:2670 +#, c-format +msgid "" +"Adjusting inconsistent outbound quota configuration for network `%s', is " +"%llu must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2679 +#, c-format +msgid "" +"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " +"must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2689 +#, c-format +msgid "" +"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2698 +#, c-format +msgid "" +"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_proportional.c:1164 +#, fuzzy, c-format +msgid "Invalid %s configuration %f\n" +msgstr "fornat invalide : « %s »\n" #: src/ats-tests/ats-testing.c:422 #, c-format @@ -367,6 +484,15 @@ msgstr "" msgid "Failed to connect master peer [%u] with slave [%u]\n" msgstr "" +#: src/ats-tests/ats-testing-log.c:837 +msgid "Stop logging\n" +msgstr "Arrêter la journalisation\n" + +#: src/ats-tests/ats-testing-log.c:892 +#, c-format +msgid "Start logging `%s'\n" +msgstr "Démarrer la journalisation « %s »\n" + #: src/ats-tests/gnunet-ats-sim.c:90 #, c-format msgid "" @@ -374,15 +500,6 @@ msgid "" "= %u KiB/s\n" msgstr "" -#: src/ats-tests/gnunet-solver-eval.c:939 src/ats/gnunet-ats-solver-eval.c:3294 -msgid "solver to use" -msgstr "solveur utilisé" - -#: src/ats-tests/gnunet-solver-eval.c:945 -#: src/ats-tests/gnunet-solver-eval.c:950 src/ats/gnunet-ats-solver-eval.c:3299 -msgid "experiment to use" -msgstr "" - #: src/ats-tool/gnunet-ats.c:307 #, c-format msgid "%u address resolutions had a timeout\n" @@ -498,123 +615,6 @@ msgstr "" msgid "Print information about ATS state" msgstr "" -#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 -#, c-format -msgid "" -"Could not load quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2799 -#, c-format -msgid "" -"No outbound quota configured for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2840 -#, c-format -msgid "" -"No outbound quota configure for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3306 -msgid "print logging" -msgstr "afficher le journal" - -#: src/ats/gnunet-ats-solver-eval.c:3311 -msgid "save logging to disk" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3316 -msgid "disable normalization" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:304 -#, c-format -msgid "" -"Could not load %s quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:314 -#, c-format -msgid "%s quota configured for network `%s' is %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:359 -#, c-format -msgid "" -"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:451 -#, c-format -msgid "Failed to initialize solver `%s'!\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1274 -msgid "Problem size too large, cannot allocate memory!\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1869 -#, c-format -msgid "Adding address for peer `%s' multiple times\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1913 -#, c-format -msgid "Updating address property for peer `%s' %p not added before\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2475 -msgid "" -"MLP solver is not optimizing for anything, changing to feasibility check\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 -#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 -#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 -#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 -#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 -#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 -#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 -#, fuzzy, c-format -msgid "Invalid %s configuration %f \n" -msgstr "fornat invalide : « %s »\n" - -#: src/ats/plugin_ats_mlp.c:2670 -#, c-format -msgid "" -"Adjusting inconsistent outbound quota configuration for network `%s', is " -"%llu must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2679 -#, c-format -msgid "" -"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " -"must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2689 -#, c-format -msgid "" -"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2698 -#, c-format -msgid "" -"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_proportional.c:1164 -#, fuzzy, c-format -msgid "Invalid %s configuration %f\n" -msgstr "fornat invalide : « %s »\n" - #: src/auction/gnunet-auction-create.c:163 msgid "description of the item to be sold" msgstr "" @@ -661,53 +661,53 @@ msgstr "" msgid "Invalid peer ID `%s'\n" msgstr "" -#: src/cadet/gnunet-cadet.c:702 +#: src/cadet/gnunet-cadet.c:703 #, c-format msgid "Invalid tunnel owner `%s'\n" msgstr "" -#: src/cadet/gnunet-cadet.c:775 +#: src/cadet/gnunet-cadet.c:776 msgid "Extra arguments are not applicable in combination with this option.\n" msgstr "" -#: src/cadet/gnunet-cadet.c:866 +#: src/cadet/gnunet-cadet.c:867 #, c-format msgid "Invalid target `%s'\n" msgstr "" -#: src/cadet/gnunet-cadet.c:903 +#: src/cadet/gnunet-cadet.c:904 msgid "No action requested\n" msgstr "" -#: src/cadet/gnunet-cadet.c:928 +#: src/cadet/gnunet-cadet.c:929 msgid "Provide information about a particular connection" msgstr "" -#: src/cadet/gnunet-cadet.c:933 +#: src/cadet/gnunet-cadet.c:934 msgid "Activate echo mode" msgstr "" -#: src/cadet/gnunet-cadet.c:938 +#: src/cadet/gnunet-cadet.c:939 msgid "Dump debug information to STDERR" msgstr "" -#: src/cadet/gnunet-cadet.c:944 +#: src/cadet/gnunet-cadet.c:945 msgid "Listen for connections using a shared secret among sender and recipient" msgstr "" -#: src/cadet/gnunet-cadet.c:951 +#: src/cadet/gnunet-cadet.c:952 msgid "Provide information about a patricular peer" msgstr "" -#: src/cadet/gnunet-cadet.c:957 +#: src/cadet/gnunet-cadet.c:958 msgid "Provide information about all peers" msgstr "" -#: src/cadet/gnunet-cadet.c:963 +#: src/cadet/gnunet-cadet.c:964 msgid "Provide information about a particular tunnel" msgstr "" -#: src/cadet/gnunet-cadet.c:969 +#: src/cadet/gnunet-cadet.c:970 msgid "Provide information about all tunnels" msgstr "" @@ -753,28 +753,6 @@ msgstr "" msgid "Connection to conversation service lost, trying to reconnect\n" msgstr "" -#: src/conversation/gnunet-conversation-test.c:119 -#, c-format -msgid "" -"\n" -"End of transmission. Have a GNU day.\n" -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:145 -#, c-format -msgid "" -"\n" -"We are now playing your recording back. If you can hear it, your audio " -"settings are working..." -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:210 -#, c-format -msgid "" -"We will now be recording you for %s. After that time, the recording will be " -"played back to you..." -msgstr "" - #: src/conversation/gnunet-conversation.c:269 #, c-format msgid "Incoming call from `%s'. Please /accept %u or /cancel %u the call.\n" @@ -1020,16 +998,38 @@ msgstr "" msgid "sets the NAME of the ego to use for the phone (and name resolution)" msgstr "" -#: src/conversation/gnunet-conversation.c:1279 -msgid "sets the LINE to use for the phone" +#: src/conversation/gnunet-conversation.c:1279 +msgid "sets the LINE to use for the phone" +msgstr "" + +#: src/conversation/gnunet-conversation.c:1306 +msgid "Enables having a conversation with other GNUnet users." +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:119 +#, c-format +msgid "" +"\n" +"End of transmission. Have a GNU day.\n" +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:145 +#, c-format +msgid "" +"\n" +"We are now playing your recording back. If you can hear it, your audio " +"settings are working..." msgstr "" -#: src/conversation/gnunet-conversation.c:1306 -msgid "Enables having a conversation with other GNUnet users." +#: src/conversation/gnunet-conversation-test.c:210 +#, c-format +msgid "" +"We will now be recording you for %s. After that time, the recording will be " +"played back to you..." msgstr "" -#: src/conversation/gnunet-helper-audio-playback-gst.c:356 #: src/conversation/gnunet_gst.c:622 +#: src/conversation/gnunet-helper-audio-playback-gst.c:361 #, c-format msgid "Read error from STDIN: %d %s\n" msgstr "" @@ -1039,59 +1039,59 @@ msgstr "" msgid "pa_stream_write() failed: %s\n" msgstr "pa_stream_write() échoué : %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:607 +#: src/conversation/gnunet-helper-audio-playback.c:612 msgid "gnunet-helper-audio-playback - Got signal, exiting\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:632 +#: src/conversation/gnunet-helper-audio-playback.c:637 #: src/conversation/gnunet-helper-audio-record.c:545 msgid "Connection established.\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:637 +#: src/conversation/gnunet-helper-audio-playback.c:642 #: src/conversation/gnunet-helper-audio-record.c:550 #, c-format msgid "pa_stream_new() failed: %s\n" msgstr "pa_stream_new() échoué : %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:651 +#: src/conversation/gnunet-helper-audio-playback.c:656 #, c-format msgid "pa_stream_connect_playback() failed: %s\n" msgstr "pa_stream_connect_playback() échoué : %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:664 +#: src/conversation/gnunet-helper-audio-playback.c:669 #: src/conversation/gnunet-helper-audio-record.c:576 #, c-format msgid "Connection failure: %s\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:685 +#: src/conversation/gnunet-helper-audio-playback.c:690 #: src/conversation/gnunet-helper-audio-record.c:599 msgid "Wrong Spec\n" msgstr "Spécification incorrecte\n" -#: src/conversation/gnunet-helper-audio-playback.c:691 +#: src/conversation/gnunet-helper-audio-playback.c:696 #: src/conversation/gnunet-helper-audio-record.c:605 msgid "pa_mainloop_new() failed.\n" msgstr "pa_mainloop_new() échoué.\n" -#: src/conversation/gnunet-helper-audio-playback.c:705 +#: src/conversation/gnunet-helper-audio-playback.c:710 #: src/conversation/gnunet-helper-audio-record.c:620 msgid "pa_context_new() failed.\n" msgstr "pa_context_new() échoué.\n" -#: src/conversation/gnunet-helper-audio-playback.c:712 +#: src/conversation/gnunet-helper-audio-playback.c:717 #: src/conversation/gnunet-helper-audio-record.c:626 #, c-format msgid "pa_context_connect() failed: %s\n" msgstr "pa_context_connect() échoué : %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:718 +#: src/conversation/gnunet-helper-audio-playback.c:723 #: src/conversation/gnunet-helper-audio-record.c:632 msgid "pa_mainloop_run() failed.\n" msgstr "pa_mainloop_run() échoué.\n" -#: src/conversation/gnunet-helper-audio-playback.c:790 +#: src/conversation/gnunet-helper-audio-playback.c:795 #, c-format msgid "Read error from STDIN: %s\n" msgstr "" @@ -1158,7 +1158,7 @@ msgstr "" msgid "Could not open line, port %s already in use!\n" msgstr "" -#: src/conversation/microphone.c:119 +#: src/conversation/microphone.c:121 msgid "Could not start record audio helper\n" msgstr "" @@ -1241,25 +1241,25 @@ msgstr "" msgid "# dequeuing CAR (duplicate request)" msgstr "" -#: src/core/gnunet-service-core.c:440 +#: src/core/gnunet-service-core.c:443 #, c-format msgid "# bytes of messages of type %u received" msgstr "" -#: src/core/gnunet-service-core.c:538 +#: src/core/gnunet-service-core.c:541 msgid "# messages discarded (session disconnected)" msgstr "" -#: src/core/gnunet-service-core.c:876 +#: src/core/gnunet-service-core.c:879 #, c-format msgid "# messages of type %u discarded (client busy)" msgstr "" -#: src/core/gnunet-service-core.c:985 +#: src/core/gnunet-service-core.c:988 msgid "Core service is lacking HOSTKEY configuration setting. Exiting.\n" msgstr "" -#: src/core/gnunet-service-core.c:1006 +#: src/core/gnunet-service-core.c:1009 #, c-format msgid "Core service of `%s' ready.\n" msgstr "" @@ -1272,124 +1272,124 @@ msgstr "" msgid "# bytes decrypted" msgstr "" -#: src/core/gnunet-service-core_kx.c:725 +#: src/core/gnunet-service-core_kx.c:728 msgid "# PAYLOAD dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:775 +#: src/core/gnunet-service-core_kx.c:778 msgid "# key exchanges initiated" msgstr "" -#: src/core/gnunet-service-core_kx.c:837 +#: src/core/gnunet-service-core_kx.c:840 msgid "# key exchanges stopped" msgstr "" -#: src/core/gnunet-service-core_kx.c:871 +#: src/core/gnunet-service-core_kx.c:874 msgid "# PING messages transmitted" msgstr "" -#: src/core/gnunet-service-core_kx.c:938 +#: src/core/gnunet-service-core_kx.c:941 msgid "# old ephemeral keys ignored" msgstr "" -#: src/core/gnunet-service-core_kx.c:945 +#: src/core/gnunet-service-core_kx.c:948 msgid "# ephemeral keys received" msgstr "" -#: src/core/gnunet-service-core_kx.c:984 +#: src/core/gnunet-service-core_kx.c:987 #, c-format msgid "" "Ephemeral key message from peer `%s' rejected as its validity range does not " "match our system time (%llu not in [%llu,%llu]).\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:995 +#: src/core/gnunet-service-core_kx.c:998 msgid "# EPHEMERAL_KEY messages received" msgstr "" -#: src/core/gnunet-service-core_kx.c:1091 -#: src/transport/gnunet-service-transport_validation.c:1119 +#: src/core/gnunet-service-core_kx.c:1094 +#: src/transport/gnunet-service-transport_validation.c:1128 msgid "# PING messages received" msgstr "" -#: src/core/gnunet-service-core_kx.c:1100 +#: src/core/gnunet-service-core_kx.c:1103 msgid "# PING messages dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1158 +#: src/core/gnunet-service-core_kx.c:1161 msgid "# PONG messages created" msgstr "" -#: src/core/gnunet-service-core_kx.c:1184 +#: src/core/gnunet-service-core_kx.c:1187 msgid "# sessions terminated by timeout" msgstr "" -#: src/core/gnunet-service-core_kx.c:1197 +#: src/core/gnunet-service-core_kx.c:1200 msgid "# keepalive messages sent" msgstr "" -#: src/core/gnunet-service-core_kx.c:1261 -#: src/transport/gnunet-service-transport_validation.c:1442 +#: src/core/gnunet-service-core_kx.c:1264 +#: src/transport/gnunet-service-transport_validation.c:1461 msgid "# PONG messages received" msgstr "" -#: src/core/gnunet-service-core_kx.c:1268 +#: src/core/gnunet-service-core_kx.c:1271 msgid "# PONG messages dropped (connection down)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1273 +#: src/core/gnunet-service-core_kx.c:1276 msgid "# PONG messages dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1308 +#: src/core/gnunet-service-core_kx.c:1311 msgid "# PONG messages decrypted" msgstr "" -#: src/core/gnunet-service-core_kx.c:1346 +#: src/core/gnunet-service-core_kx.c:1349 msgid "# session keys confirmed via PONG" msgstr "" -#: src/core/gnunet-service-core_kx.c:1357 +#: src/core/gnunet-service-core_kx.c:1360 msgid "# timeouts prevented via PONG" msgstr "" -#: src/core/gnunet-service-core_kx.c:1364 +#: src/core/gnunet-service-core_kx.c:1367 msgid "# rekey operations confirmed via PONG" msgstr "" -#: src/core/gnunet-service-core_kx.c:1518 +#: src/core/gnunet-service-core_kx.c:1521 msgid "# DATA message dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1526 +#: src/core/gnunet-service-core_kx.c:1529 #, c-format msgid "" "Session to peer `%s' went down due to key expiration (should not happen)\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:1529 +#: src/core/gnunet-service-core_kx.c:1532 msgid "# sessions terminated by key expiration" msgstr "" -#: src/core/gnunet-service-core_kx.c:1590 -#: src/core/gnunet-service-core_kx.c:1616 +#: src/core/gnunet-service-core_kx.c:1593 +#: src/core/gnunet-service-core_kx.c:1619 msgid "# bytes dropped (duplicates)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1603 +#: src/core/gnunet-service-core_kx.c:1606 msgid "# bytes dropped (out of sequence)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1645 +#: src/core/gnunet-service-core_kx.c:1648 msgid "# bytes dropped (ancient message)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1653 +#: src/core/gnunet-service-core_kx.c:1656 msgid "# bytes of payload decrypted" msgstr "" -#: src/core/gnunet-service-core_sessions.c:266 -#: src/core/gnunet-service-core_sessions.c:356 +#: src/core/gnunet-service-core_sessions.c:260 +#: src/core/gnunet-service-core_sessions.c:350 #: src/dht/gnunet-service-dht_neighbours.c:733 #: src/dht/gnunet-service-dht_neighbours.c:795 #: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1520 @@ -1400,15 +1400,15 @@ msgstr "" msgid "# peers connected" msgstr "" -#: src/core/gnunet-service-core_sessions.c:302 +#: src/core/gnunet-service-core_sessions.c:296 msgid "# type map refreshes sent" msgstr "" -#: src/core/gnunet-service-core_sessions.c:422 +#: src/core/gnunet-service-core_sessions.c:416 msgid "# outdated typemap confirmations received" msgstr "" -#: src/core/gnunet-service-core_sessions.c:439 +#: src/core/gnunet-service-core_sessions.c:433 msgid "# valid typemap confirmations received" msgstr "" @@ -1421,133 +1421,6 @@ msgstr "" msgid "# updates to my type map" msgstr "" -#: src/credential/credential_misc.c:88 -#, c-format -msgid "Unable to parse CRED record string `%s'\n" -msgstr "" - -#: src/credential/gnunet-credential.c:278 src/namestore/gnunet-namestore.c:776 -#: src/namestore/plugin_rest_namestore.c:1009 -#, c-format -msgid "Ego `%s' not known to identity service\n" -msgstr "" - -#: src/credential/gnunet-credential.c:294 -#: src/credential/gnunet-credential.c:446 -#, c-format -msgid "Issuer public key `%s' is not well-formed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:375 -#: src/credential/gnunet-credential.c:435 -#, c-format -msgid "Issuer public key not well-formed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:386 -#: src/credential/gnunet-credential.c:455 -#, fuzzy, c-format -msgid "Failed to connect to CREDENTIAL\n" -msgstr "Impossible d’ouvrir « %s ».\n" - -#: src/credential/gnunet-credential.c:392 -#, c-format -msgid "You must provide issuer the attribute\n" -msgstr "" - -#: src/credential/gnunet-credential.c:399 -#, c-format -msgid "ego required\n" -msgstr "" - -#: src/credential/gnunet-credential.c:415 -#, c-format -msgid "Subject public key needed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:426 -#, c-format -msgid "Subject public key `%s' is not well-formed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:461 -#, c-format -msgid "You must provide issuer and subject attributes\n" -msgstr "" - -#: src/credential/gnunet-credential.c:511 -#, c-format -msgid "Issuer ego required\n" -msgstr "" - -#: src/credential/gnunet-credential.c:523 -#, c-format -msgid "Please specify name to lookup, subject key and issuer key!\n" -msgstr "" - -#: src/credential/gnunet-credential.c:543 -msgid "create credential" -msgstr "" - -#: src/credential/gnunet-credential.c:547 -msgid "verify credential against attribute" -msgstr "" - -#: src/credential/gnunet-credential.c:552 -msgid "The public key of the subject to lookup the credential for" -msgstr "" - -#: src/credential/gnunet-credential.c:557 -msgid "The name of the credential presented by the subject" -msgstr "" - -#: src/credential/gnunet-credential.c:562 -msgid "The public key of the authority to verify the credential against" -msgstr "" - -#: src/credential/gnunet-credential.c:567 -msgid "The ego to use" -msgstr "" - -#: src/credential/gnunet-credential.c:572 -msgid "The issuer attribute to verify against or to issue" -msgstr "" - -#: src/credential/gnunet-credential.c:577 -msgid "The time to live for the credential" -msgstr "" - -#: src/credential/gnunet-credential.c:581 -msgid "collect credentials" -msgstr "" - -#: src/credential/gnunet-credential.c:595 -msgid "GNUnet credential resolver tool" -msgstr "" - -#: src/credential/gnunet-service-credential.c:1204 -#: src/gns/gnunet-gns-helper-service-w32.c:727 src/gns/gnunet-gns.c:355 -#, c-format -msgid "Failed to connect to GNS\n" -msgstr "" - -#: src/credential/gnunet-service-credential.c:1210 -#: src/namestore/gnunet-namestore-fcfsd.c:1034 -#: src/namestore/gnunet-namestore.c:802 -#: src/namestore/plugin_rest_namestore.c:1022 -#, c-format -msgid "Failed to connect to namestore\n" -msgstr "" - -#: src/credential/plugin_gnsrecord_credential.c:186 -#, fuzzy, c-format -msgid "Unable to parse ATTR record string `%s'\n" -msgstr "Résolution de « %s » échouée\n" - -#: src/credential/plugin_rest_credential.c:1155 src/gns/plugin_rest_gns.c:668 -msgid "GNS REST API initialized\n" -msgstr "" - #: src/datacache/datacache.c:119 src/datacache/datacache.c:294 #: src/datastore/gnunet-service-datastore.c:757 msgid "# bytes stored" @@ -1591,9 +1464,8 @@ msgstr "" #: src/datacache/plugin_datacache_sqlite.c:122 #: src/datastore/plugin_datastore_mysql.c:892 #: src/datastore/plugin_datastore_sqlite.c:58 -#: src/datastore/plugin_datastore_sqlite.c:66 -#: src/identity-provider/plugin_identity_provider_sqlite.c:52 src/my/my.c:80 -#: src/my/my.c:92 src/mysql/mysql.c:42 src/mysql/mysql.c:49 +#: src/datastore/plugin_datastore_sqlite.c:66 src/my/my.c:80 src/my/my.c:92 +#: src/mysql/mysql.c:42 src/mysql/mysql.c:49 #: src/namecache/plugin_namecache_sqlite.c:53 #: src/namestore/plugin_namestore_sqlite.c:53 #: src/peerstore/plugin_peerstore_sqlite.c:52 @@ -1611,7 +1483,6 @@ msgstr "" #: src/datacache/plugin_datacache_sqlite.c:817 #: src/datastore/plugin_datastore_sqlite.c:456 -#: src/identity-provider/plugin_identity_provider_sqlite.c:336 #: src/namecache/plugin_namecache_sqlite.c:296 #: src/namestore/plugin_namestore_sqlite.c:355 msgid "Tried to close sqlite without finalizing all prepared statements.\n" @@ -1635,7 +1506,7 @@ msgstr "" msgid "# queue entries created" msgstr "" -#: src/datastore/datastore_api.c:740 +#: src/datastore/datastore_api.c:760 msgid "# status messages received" msgstr "" @@ -1643,35 +1514,35 @@ msgstr "" msgid "# Results received" msgstr "" -#: src/datastore/datastore_api.c:941 +#: src/datastore/datastore_api.c:920 msgid "# datastore connections (re)created" msgstr "" -#: src/datastore/datastore_api.c:1055 +#: src/datastore/datastore_api.c:1034 msgid "# PUT requests executed" msgstr "" -#: src/datastore/datastore_api.c:1116 +#: src/datastore/datastore_api.c:1095 msgid "# RESERVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1181 +#: src/datastore/datastore_api.c:1160 msgid "# RELEASE RESERVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1259 +#: src/datastore/datastore_api.c:1238 msgid "# REMOVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1319 +#: src/datastore/datastore_api.c:1298 msgid "# GET REPLICATION requests executed" msgstr "" -#: src/datastore/datastore_api.c:1381 +#: src/datastore/datastore_api.c:1360 msgid "# GET ZERO ANONYMITY requests executed" msgstr "" -#: src/datastore/datastore_api.c:1462 +#: src/datastore/datastore_api.c:1441 msgid "# GET requests executed" msgstr "" @@ -1936,7 +1807,6 @@ msgid "`%s' failed at %s:%u with error: %s" msgstr "" #: src/datastore/plugin_datastore_sqlite.c:271 -#: src/identity-provider/plugin_identity_provider_sqlite.c:212 #: src/namecache/plugin_namecache_sqlite.c:194 #: src/namestore/plugin_namestore_sqlite.c:222 #: src/peerstore/plugin_peerstore_sqlite.c:535 @@ -1961,7 +1831,6 @@ msgid "" msgstr "" #: src/datastore/plugin_datastore_sqlite.c:1337 -#: src/identity-provider/plugin_identity_provider_sqlite.c:711 #: src/namecache/plugin_namecache_sqlite.c:603 #: src/namestore/plugin_namestore_sqlite.c:802 msgid "Sqlite database running\n" @@ -2030,6 +1899,51 @@ msgstr "" msgid "Prints all packets that go through the DHT." msgstr "" +#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:253 +#, c-format +msgid "Exiting as the number of peers is %u\n" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1188 +#, fuzzy +msgid "number of peers to start" +msgstr "nombre de valeurs" + +#: src/dht/gnunet_dht_profiler.c:1194 +msgid "" +"maximum number of times we try to search for successor circle formation (0 " +"for R5N)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 +#: src/testbed/gnunet-testbed-profiler.c:304 +msgid "name of the file with the login information for the testbed" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1206 +msgid "delay between rounds for collecting statistics (default: 30 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1212 +msgid "delay to start doing PUTs (default: 1 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1218 +msgid "delay to start doing GETs (default: 5 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1223 +msgid "replication degree for DHT PUTs" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1230 +msgid "timeout for DHT PUT and GET requests (default: 1 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1248 +msgid "Measure quality and performance of the DHT service." +msgstr "" + #: src/dht/gnunet-dht-put.c:120 msgid "PUT request sent with key" msgstr "" @@ -2279,51 +2193,6 @@ msgstr "" msgid "# DHT requests combined" msgstr "" -#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:255 -#, c-format -msgid "Exiting as the number of peers is %u\n" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1188 -#, fuzzy -msgid "number of peers to start" -msgstr "nombre de valeurs" - -#: src/dht/gnunet_dht_profiler.c:1194 -msgid "" -"maximum number of times we try to search for successor circle formation (0 " -"for R5N)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 -#: src/testbed/gnunet-testbed-profiler.c:305 -msgid "name of the file with the login information for the testbed" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1206 -msgid "delay between rounds for collecting statistics (default: 30 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1212 -msgid "delay to start doing PUTs (default: 1 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1218 -msgid "delay to start doing GETs (default: 5 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1223 -msgid "replication degree for DHT PUTs" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1230 -msgid "timeout for DHT PUT and GET requests (default: 1 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1248 -msgid "Measure quality and performance of the DHT service." -msgstr "" - #: src/dht/plugin_block_dht.c:187 #, c-format msgid "Block not of type %u\n" @@ -2841,7 +2710,7 @@ msgstr "Dernier message reçu de %s\n" msgid "Failed to not connect to `%s' service.\n" msgstr "" -#: src/fs/fs_misc.c:126 +#: src/fs/fs_misc.c:128 #, c-format msgid "Did not find mime type `%s' in extension list.\n" msgstr "" @@ -3257,6 +3126,14 @@ msgid "" "chk/...)" msgstr "" +#: src/fs/gnunet-fs.c:119 +msgid "print a list of all indexed files" +msgstr "" + +#: src/fs/gnunet-fs.c:130 +msgid "Special file-sharing operations" +msgstr "" + #: src/fs/gnunet-fs-profiler.c:211 msgid "run the experiment with COUNT peers" msgstr "" @@ -3273,14 +3150,6 @@ msgstr "" msgid "run a testbed to measure file-sharing performance" msgstr "" -#: src/fs/gnunet-fs.c:119 -msgid "print a list of all indexed files" -msgstr "" - -#: src/fs/gnunet-fs.c:130 -msgid "Special file-sharing operations" -msgstr "" - #: src/fs/gnunet-publish.c:219 src/fs/gnunet-publish.c:231 #, c-format msgid "Publishing `%s' at %llu/%llu (%s remaining)\n" @@ -3890,54 +3759,107 @@ msgstr "" msgid "Received unsupported DNS request from %s\n" msgstr "" -#: src/gns/gnunet-dns2gns.c:711 -msgid "No ego configured for `dns2gns` subsystem\n" +#: src/gns/gnunet-dns2gns.c:711 +msgid "No ego configured for `dns2gns` subsystem\n" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:739 +msgid "No DNS server specified!\n" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:760 +msgid "No valid GNS zone specified!\n" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:784 +msgid "IP of recursive DNS resolver to use (required)" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:790 +msgid "Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:796 +msgid "Authoritative DNS suffix to use (optional); default: zkey.eu" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:802 +msgid "UDP port to listen on for inbound DNS requests; default: 2853" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:808 +msgid "Public key of the GNS zone to use (overrides default)" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:826 +msgid "GNUnet DNS-to-GNS proxy (a DNS server)" +msgstr "" + +#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 +#, c-format +msgid "Invalid typename specified, assuming `ANY'\n" +msgstr "" + +#: src/gns/gnunet-gns.c:252 +#, c-format +msgid "Please specify name to lookup!\n" +msgstr "" + +#: src/gns/gnunet-gns.c:276 +#, c-format +msgid "Ego for `%s' not found, cannot perform lookup.\n" +msgstr "" + +#: src/gns/gnunet-gns.c:315 src/gns/gnunet-gns-helper-service-w32.c:701 +#: src/gns/plugin_rest_gns.c:422 +#, c-format +msgid "" +"Ego for `gns-master' not found, cannot perform lookup. Did you run gnunet-" +"gns-import.sh?\n" +msgstr "" + +#: src/gns/gnunet-gns.c:355 src/gns/gnunet-gns-helper-service-w32.c:727 +#, c-format +msgid "Failed to connect to GNS\n" msgstr "" -#: src/gns/gnunet-dns2gns.c:739 -msgid "No DNS server specified!\n" +#: src/gns/gnunet-gns.c:374 +#, c-format +msgid "Public key `%s' is not well-formed\n" msgstr "" -#: src/gns/gnunet-dns2gns.c:760 -msgid "No valid GNS zone specified!\n" +#: src/gns/gnunet-gns.c:428 +msgid "Lookup a record for the given name" msgstr "" -#: src/gns/gnunet-dns2gns.c:784 -msgid "IP of recursive DNS resolver to use (required)" +#: src/gns/gnunet-gns.c:434 +msgid "Specify the type of the record to lookup" msgstr "" -#: src/gns/gnunet-dns2gns.c:790 -msgid "Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu" +#: src/gns/gnunet-gns.c:440 +msgid "Specify timeout for the lookup" msgstr "" -#: src/gns/gnunet-dns2gns.c:796 -msgid "Authoritative DNS suffix to use (optional); default: zkey.eu" +#: src/gns/gnunet-gns.c:445 +msgid "No unneeded output" msgstr "" -#: src/gns/gnunet-dns2gns.c:802 -msgid "UDP port to listen on for inbound DNS requests; default: 2853" +#: src/gns/gnunet-gns.c:451 +msgid "Specify the public key of the zone to lookup the record in" msgstr "" -#: src/gns/gnunet-dns2gns.c:808 -msgid "Public key of the GNS zone to use (overrides default)" +#: src/gns/gnunet-gns.c:457 +msgid "Specify the name of the ego of the zone to lookup the record in" msgstr "" -#: src/gns/gnunet-dns2gns.c:826 -msgid "GNUnet DNS-to-GNS proxy (a DNS server)" +#: src/gns/gnunet-gns.c:476 +msgid "GNUnet GNS resolver tool" msgstr "" #: src/gns/gnunet-gns-helper-service-w32.c:602 msgid "Not ready to process requests, lacking ego data\n" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:701 src/gns/gnunet-gns.c:315 -#: src/gns/plugin_rest_gns.c:422 -#, c-format -msgid "" -"Ego for `gns-master' not found, cannot perform lookup. Did you run gnunet-" -"gns-import.sh?\n" -msgstr "" - #: src/gns/gnunet-gns-helper-service-w32.c:739 #, c-format msgid "Failed to connect to identity service\n" @@ -3962,159 +3884,111 @@ msgstr "" msgid "%s failed at %s:%d: `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:878 +#: src/gns/gnunet-gns-proxy.c:887 #, c-format msgid "Unsupported CURL SSL backend %d\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:901 +#: src/gns/gnunet-gns-proxy.c:910 #, c-format msgid "Failed to fetch CN from cert: %s\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:924 +#: src/gns/gnunet-gns-proxy.c:933 #, c-format msgid "Failed to initialize DANE: %s\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:937 +#: src/gns/gnunet-gns-proxy.c:946 #, c-format msgid "Failed to parse DANE record: %s\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:952 +#: src/gns/gnunet-gns-proxy.c:961 #, c-format msgid "Failed to verify TLS connection using DANE: %s\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:962 +#: src/gns/gnunet-gns-proxy.c:971 #, c-format msgid "Failed DANE verification failed with GnuTLS verify status code: %u\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:986 +#: src/gns/gnunet-gns-proxy.c:995 #, c-format msgid "SSL certificate subject name (%s) does not match `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1095 +#: src/gns/gnunet-gns-proxy.c:1104 #, c-format msgid "Cookie domain `%s' supplied by server is invalid\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1699 +#: src/gns/gnunet-gns-proxy.c:1709 #, c-format msgid "Unsupported HTTP method `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2162 +#: src/gns/gnunet-gns-proxy.c:2172 #, c-format msgid "Unable to import private key from file `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2192 +#: src/gns/gnunet-gns-proxy.c:2202 #, c-format msgid "Unable to import certificate %s\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2365 +#: src/gns/gnunet-gns-proxy.c:2375 #, c-format msgid "Failed to start HTTPS server for `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2384 src/rest/gnunet-rest-server.c:533 +#: src/gns/gnunet-gns-proxy.c:2394 src/rest/gnunet-rest-server.c:533 msgid "Failed to pass client to MHD\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2704 +#: src/gns/gnunet-gns-proxy.c:2716 #, c-format msgid "Unsupported socks version %d\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2733 +#: src/gns/gnunet-gns-proxy.c:2745 #, c-format msgid "Unsupported socks command %d\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2751 src/gns/gnunet-gns-proxy.c:2780 +#: src/gns/gnunet-gns-proxy.c:2763 src/gns/gnunet-gns-proxy.c:2792 msgid "SSL connection to plain IPv4 address requested\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2830 +#: src/gns/gnunet-gns-proxy.c:2842 #, c-format msgid "Unsupported socks address type %d\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3165 src/gns/gnunet-service-gns.c:403 +#: src/gns/gnunet-gns-proxy.c:3177 src/gns/gnunet-service-gns.c:403 #, c-format msgid "No ego configured for `%s`\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3226 +#: src/gns/gnunet-gns-proxy.c:3238 #, c-format msgid "Failed to load SSL/TLS key and certificate from `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3269 +#: src/gns/gnunet-gns-proxy.c:3281 msgid "listen on specified port (default: 7777)" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3275 +#: src/gns/gnunet-gns-proxy.c:3287 msgid "pem file to use as CA" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3300 +#: src/gns/gnunet-gns-proxy.c:3312 msgid "GNUnet GNS proxy" msgstr "" -#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 -#, c-format -msgid "Invalid typename specified, assuming `ANY'\n" -msgstr "" - -#: src/gns/gnunet-gns.c:252 -#, c-format -msgid "Please specify name to lookup!\n" -msgstr "" - -#: src/gns/gnunet-gns.c:276 -#, c-format -msgid "Ego for `%s' not found, cannot perform lookup.\n" -msgstr "" - -#: src/gns/gnunet-gns.c:374 -#, c-format -msgid "Public key `%s' is not well-formed\n" -msgstr "" - -#: src/gns/gnunet-gns.c:428 -msgid "Lookup a record for the given name" -msgstr "" - -#: src/gns/gnunet-gns.c:434 -msgid "Specify the type of the record to lookup" -msgstr "" - -#: src/gns/gnunet-gns.c:440 -msgid "Specify timeout for the lookup" -msgstr "" - -#: src/gns/gnunet-gns.c:445 -msgid "No unneeded output" -msgstr "" - -#: src/gns/gnunet-gns.c:451 -msgid "Specify the public key of the zone to lookup the record in" -msgstr "" - -#: src/gns/gnunet-gns.c:457 -msgid "Specify the name of the ego of the zone to lookup the record in" -msgstr "" - -#: src/gns/gnunet-gns.c:476 -msgid "GNUnet GNS resolver tool" -msgstr "" - #: src/gns/gnunet-service-gns.c:442 msgid "Failed to connect to the namecache!\n" msgstr "" @@ -4175,35 +4049,44 @@ msgstr "" msgid "Hostname `%s' is not well-formed, resolution fails\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:179 +#: src/gns/plugin_gnsrecord_gns.c:203 #, c-format msgid "Unable to parse PKEY record `%s'\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:208 +#: src/gns/plugin_gnsrecord_gns.c:232 #, c-format msgid "Unable to parse GNS2DNS record `%s'\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:229 +#: src/gns/plugin_gnsrecord_gns.c:253 #, c-format msgid "Failed to serialize GNS2DNS record with value `%s'\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:252 +#: src/gns/plugin_gnsrecord_gns.c:276 #, c-format msgid "Unable to parse VPN record string `%s'\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:288 +#: src/gns/plugin_gnsrecord_gns.c:312 #, c-format msgid "Unable to parse BOX record string `%s'\n" msgstr "" +#: src/gns/plugin_gnsrecord_gns.c:360 +#, c-format +msgid "Unable to parse REVERSE record string `%s'\n" +msgstr "" + #: src/gns/plugin_rest_gns.c:384 msgid "Ego for not found, cannot perform lookup.\n" msgstr "" +#: src/gns/plugin_rest_gns.c:668 +msgid "GNS REST API initialized\n" +msgstr "" + #: src/gnsrecord/plugin_gnsrecord_dns.c:359 #, c-format msgid "Unable to parse IPv4 address `%s'\n" @@ -4309,33 +4192,33 @@ msgstr "" msgid "Modified %u addresses, wrote %u bytes\n" msgstr "" -#: src/hello/hello.c:1103 +#: src/hello/hello.c:1110 msgid "Failed to parse HELLO message: missing expiration time\n" msgstr "" -#: src/hello/hello.c:1112 +#: src/hello/hello.c:1119 msgid "Failed to parse HELLO message: invalid expiration time\n" msgstr "" -#: src/hello/hello.c:1122 +#: src/hello/hello.c:1129 msgid "Failed to parse HELLO message: malformed\n" msgstr "" -#: src/hello/hello.c:1133 +#: src/hello/hello.c:1140 msgid "Failed to parse HELLO message: missing transport plugin\n" msgstr "" -#: src/hello/hello.c:1151 +#: src/hello/hello.c:1158 #, fuzzy, c-format msgid "Plugin `%s' not found, skipping address\n" msgstr "Extension « %s » introuvable\n" -#: src/hello/hello.c:1159 +#: src/hello/hello.c:1166 #, c-format msgid "Plugin `%s' does not support URIs yet\n" msgstr "" -#: src/hello/hello.c:1174 +#: src/hello/hello.c:1181 #, c-format msgid "Failed to parse `%s' as an address for plugin `%s'\n" msgstr "" @@ -4581,7 +4464,7 @@ msgid "# hostlist advertisements send" msgstr "" #: src/hostlist/gnunet-daemon-hostlist_server.c:679 -#: src/transport/gnunet-service-transport.c:2803 +#: src/transport/gnunet-service-transport.c:2815 msgid "Could not access PEERINFO service. Exiting.\n" msgstr "" @@ -4623,51 +4506,6 @@ msgstr "" msgid "Could not start hostlist HTTP server on port %u\n" msgstr "" -#: src/identity-provider/gnunet-idp.c:348 -msgid "Ego is required\n" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:370 -msgid "Add attribute" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:376 -msgid "Attribute value" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:381 -msgid "Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:386 -msgid "Audience (relying party)" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:390 -msgid "List attributes for Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:395 -msgid "Issue a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:400 -msgid "Consume a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:405 -msgid "Revoke a ticket" -msgstr "" - -#: src/identity-provider/identity_provider_api.c:429 -#, fuzzy -msgid "failed to store record\n" -msgstr "Échec du démarrage de %s\n" - -#: src/identity-provider/plugin_rest_identity_provider.c:1175 -msgid "Identity Provider REST API initialized\n" -msgstr "" - #: src/identity/gnunet-identity.c:179 #, c-format msgid "Failed to create ego: %s\n" @@ -4755,10 +4593,31 @@ msgstr "" msgid "Failed to create directory `%s' for storing egos\n" msgstr "" -#: src/identity/plugin_rest_identity.c:964 +#: src/identity/plugin_rest_identity.c:967 msgid "Identity REST API initialized\n" msgstr "" +#: src/identity-provider/gnunet-identity-token.c:66 +msgid "Option `-t' is required\n" +msgstr "" + +#: src/identity-provider/gnunet-identity-token.c:77 +#, c-format +msgid "Token `%s' is malformed\n" +msgstr "" + +#: src/identity-provider/gnunet-identity-token.c:166 +msgid "GNUid token" +msgstr "" + +#: src/identity-provider/gnunet-identity-token.c:171 +msgid "Print token contents" +msgstr "" + +#: src/identity-provider/plugin_rest_identity_provider.c:1166 +msgid "Identity Token REST API initialized\n" +msgstr "" + #: src/json/json.c:119 #, fuzzy, c-format msgid "Failed to parse JSON in option `%s': %s (%s)\n" @@ -4856,77 +4715,19 @@ msgstr "Résolution de « %s » échouée\n" msgid "flat plugin running\n" msgstr "" -#: src/namestore/gnunet-namestore-fcfsd.c:508 -#, c-format -msgid "Unsupported form value `%s'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:535 -#, c-format -msgid "Failed to create record for domain `%s': %s\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:555 -msgid "Error when mapping zone to name\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:585 -#, c-format -msgid "Found existing name `%s' for the given key\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:662 -#, c-format -msgid "Found %u existing records for domain `%s'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:718 -#, c-format -msgid "Failed to create page for `%s'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:734 -#, c-format -msgid "Failed to setup post processor for `%s'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:770 -msgid "Domain name must not contain `.'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:778 -msgid "Domain name must not contain `+'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:974 -msgid "No ego configured for `fcfsd` subsystem\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:1000 -msgid "Failed to start HTTP server\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:1042 -msgid "Failed to connect to identity\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:1074 -msgid "GNU Name System First Come First Serve name registration service" -msgstr "" - #: src/namestore/gnunet-namestore.c:301 #, c-format msgid "Adding record failed: %s\n" msgstr "" #: src/namestore/gnunet-namestore.c:330 -#: src/namestore/plugin_rest_namestore.c:567 +#: src/namestore/plugin_rest_namestore.c:562 #, c-format msgid "Deleting record failed, record does not exist%s%s\n" msgstr "" #: src/namestore/gnunet-namestore.c:337 -#: src/namestore/plugin_rest_namestore.c:576 +#: src/namestore/plugin_rest_namestore.c:571 #, c-format msgid "Deleting record failed%s%s\n" msgstr "" @@ -4944,7 +4745,7 @@ msgid "Records already exist under `%s', cannot add `%s' record.\n" msgstr "" #: src/namestore/gnunet-namestore.c:698 -#: src/namestore/plugin_rest_namestore.c:602 +#: src/namestore/plugin_rest_namestore.c:597 #, c-format msgid "There are no records under label `%s' that could be deleted.\n" msgstr "" @@ -4955,11 +4756,23 @@ msgid "" "There are no records under label `%s' that match the request for deletion.\n" msgstr "" +#: src/namestore/gnunet-namestore.c:776 +#: src/namestore/plugin_rest_namestore.c:1004 +#, c-format +msgid "Ego `%s' not known to identity service\n" +msgstr "" + #: src/namestore/gnunet-namestore.c:791 #, c-format msgid "No options given\n" msgstr "" +#: src/namestore/gnunet-namestore.c:802 +#: src/namestore/gnunet-namestore-fcfsd.c:1034 +#: src/namestore/plugin_rest_namestore.c:1017 +msgid "Failed to connect to namestore\n" +msgstr "" + #: src/namestore/gnunet-namestore.c:810 src/namestore/gnunet-namestore.c:819 #: src/namestore/gnunet-namestore.c:838 src/namestore/gnunet-namestore.c:861 #: src/namestore/gnunet-namestore.c:915 @@ -4973,14 +4786,14 @@ msgid "add" msgstr "ajouter" #: src/namestore/gnunet-namestore.c:829 -#: src/namestore/plugin_rest_namestore.c:676 +#: src/namestore/plugin_rest_namestore.c:671 #, c-format msgid "Unsupported type `%s'\n" msgstr "" #: src/namestore/gnunet-namestore.c:851 -#: src/namestore/plugin_rest_namestore.c:694 -#: src/namestore/plugin_rest_namestore.c:734 +#: src/namestore/plugin_rest_namestore.c:689 +#: src/namestore/plugin_rest_namestore.c:729 #, c-format msgid "Value `%s' invalid for record type `%s'\n" msgstr "" @@ -5010,13 +4823,13 @@ msgid "Invalid nick `%s'\n" msgstr "" #: src/namestore/gnunet-namestore.c:1051 -#: src/namestore/plugin_rest_namestore.c:1052 +#: src/namestore/plugin_rest_namestore.c:1047 #, c-format msgid "No default ego configured in identity service\n" msgstr "" #: src/namestore/gnunet-namestore.c:1108 -#: src/namestore/plugin_rest_namestore.c:1148 +#: src/namestore/plugin_rest_namestore.c:1143 #, c-format msgid "Cannot connect to identity service\n" msgstr "" @@ -5072,8 +4885,66 @@ msgid "" "expired" msgstr "" -#: src/namestore/gnunet-namestore.c:1212 -msgid "name of the ego controlling the zone" +#: src/namestore/gnunet-namestore.c:1212 +msgid "name of the ego controlling the zone" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:508 +#, c-format +msgid "Unsupported form value `%s'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:535 +#, c-format +msgid "Failed to create record for domain `%s': %s\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:555 +msgid "Error when mapping zone to name\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:585 +#, c-format +msgid "Found existing name `%s' for the given key\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:662 +#, c-format +msgid "Found %u existing records for domain `%s'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:718 +#, c-format +msgid "Failed to create page for `%s'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:734 +#, c-format +msgid "Failed to setup post processor for `%s'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:770 +msgid "Domain name must not contain `.'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:778 +msgid "Domain name must not contain `+'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:974 +msgid "No ego configured for `fcfsd` subsystem\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:1000 +msgid "Failed to start HTTP server\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:1042 +msgid "Failed to connect to identity\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:1074 +msgid "GNU Name System First Come First Serve name registration service" msgstr "" #: src/namestore/gnunet-service-namestore.c:615 @@ -5089,7 +4960,7 @@ msgstr "" msgid "flat file database running\n" msgstr "" -#: src/namestore/plugin_rest_namestore.c:1193 +#: src/namestore/plugin_rest_namestore.c:1188 msgid "Namestore REST API initialized\n" msgstr "" @@ -5364,6 +5235,10 @@ msgstr "" msgid "`upnpc' command not found\n" msgstr "" +#: src/nse/gnunet-nse.c:122 +msgid "Show network size estimates from NSE service." +msgstr "" + #: src/nse/gnunet-nse-profiler.c:842 msgid "limit to the number of connections to NSE services, 0 for none" msgstr "" @@ -5388,15 +5263,65 @@ msgstr "" msgid "Measure quality and performance of the NSE service." msgstr "" -#: src/nse/gnunet-nse.c:122 -msgid "Show network size estimates from NSE service." -msgstr "" - #: src/nse/gnunet-service-nse.c:1534 -#: src/revocation/gnunet-service-revocation.c:838 src/util/gnunet-scrypt.c:276 +#: src/revocation/gnunet-service-revocation.c:840 src/util/gnunet-scrypt.c:276 msgid "Value is too large.\n" msgstr "" +#: src/peerinfo/gnunet-service-peerinfo.c:178 +#, c-format +msgid "Removing expired address of transport `%s'\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:310 +#, c-format +msgid "Failed to parse HELLO in file `%s': %s\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:331 +#: src/peerinfo/gnunet-service-peerinfo.c:362 +#, c-format +msgid "Failed to parse HELLO in file `%s'\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:446 +msgid "# peers known" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:489 +#, c-format +msgid "" +"File `%s' in directory `%s' does not match naming convention. Removed.\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:655 +#, c-format +msgid "Scanning directory `%s'\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:663 +#, c-format +msgid "Still no peers found in `%s'!\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:1080 +#, c-format +msgid "Cleaning up directory `%s'\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:1409 +#, c-format +msgid "Importing HELLOs from `%s'\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:1422 +msgid "Skipping import of included HELLOs\n" +msgstr "" + +#: src/peerinfo/peerinfo_api.c:220 +msgid "Failed to receive response from `PEERINFO' service." +msgstr "" + #: src/peerinfo-tool/gnunet-peerinfo.c:239 #, c-format msgid "%sPeer `%s'\n" @@ -5486,60 +5411,6 @@ msgstr "" msgid "Failed to load transport plugin for `%s'\n" msgstr "" -#: src/peerinfo/gnunet-service-peerinfo.c:178 -#, c-format -msgid "Removing expired address of transport `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:310 -#, c-format -msgid "Failed to parse HELLO in file `%s': %s\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:331 -#: src/peerinfo/gnunet-service-peerinfo.c:362 -#, c-format -msgid "Failed to parse HELLO in file `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:446 -msgid "# peers known" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:489 -#, c-format -msgid "" -"File `%s' in directory `%s' does not match naming convention. Removed.\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:655 -#, c-format -msgid "Scanning directory `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:663 -#, c-format -msgid "Still no peers found in `%s'!\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1076 -#, c-format -msgid "Cleaning up directory `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1405 -#, c-format -msgid "Importing HELLOs from `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1418 -msgid "Skipping import of included HELLOs\n" -msgstr "" - -#: src/peerinfo/peerinfo_api.c:220 -msgid "Failed to receive response from `PEERINFO' service." -msgstr "" - #: src/peerstore/gnunet-peerstore.c:91 msgid "peerstore" msgstr "" @@ -5954,12 +5825,12 @@ msgstr "" msgid "# revocation set unions completed" msgstr "" -#: src/revocation/gnunet-service-revocation.c:524 -#: src/revocation/gnunet-service-revocation.c:771 +#: src/revocation/gnunet-service-revocation.c:525 +#: src/revocation/gnunet-service-revocation.c:773 msgid "SET service crashed, terminating revocation service\n" msgstr "" -#: src/revocation/gnunet-service-revocation.c:862 +#: src/revocation/gnunet-service-revocation.c:864 msgid "Could not open revocation database file!" msgstr "" @@ -6021,10 +5892,10 @@ msgstr "" msgid "Calculate the Vectorproduct with a GNUnet peer." msgstr "" -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #: src/scalarproduct/gnunet-service-scalarproduct_alice.c:1401 #: src/scalarproduct/gnunet-service-scalarproduct_bob.c:1345 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 msgid "Connect to CADET failed\n" msgstr "" @@ -6235,7 +6106,7 @@ msgstr "Échec du démarrage de %s\n" msgid "Wrote %llu bytes of statistics to `%s'\n" msgstr "" -#: src/statistics/gnunet-service-statistics.c:1084 +#: src/statistics/gnunet-service-statistics.c:1086 #, c-format msgid "Loading %llu bytes of statistics from `%s'\n" msgstr "" @@ -6361,7 +6232,7 @@ msgid "Invalid argument `%s'; expecting unsigned int\n" msgstr "" #: src/testbed/generate-underlay-topology.c:342 -#: src/testbed/gnunet-testbed-profiler.c:284 +#: src/testbed/gnunet-testbed-profiler.c:283 msgid "create COUNT number of peers" msgstr "" @@ -6399,13 +6270,13 @@ msgid "" "deployments" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:231 src/testing/list-keys.c:46 -#: src/testing/testing.c:288 src/util/gnunet-ecc.c:301 +#: src/testbed/gnunet-daemon-testbed-underlay.c:233 src/testing/list-keys.c:46 +#: src/testing/testing.c:288 src/util/gnunet-ecc.c:306 #, c-format msgid "Incorrect hostkey file format: %s\n" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:469 +#: src/testbed/gnunet-daemon-testbed-underlay.c:471 msgid "Daemon to restrict underlay network in testbed deployments" msgstr "" @@ -6470,17 +6341,6 @@ msgstr "" msgid "%.s Unknown result code." msgstr "%.s Code d'erreur inconnu" -#: src/testbed/gnunet-testbed-profiler.c:290 -msgid "tolerate COUNT number of continious timeout failures" -msgstr "" - -#: src/testbed/gnunet-testbed-profiler.c:295 -msgid "" -"run profiler in non-interactive mode where upon testbed setup the profiler " -"does not wait for a keystroke but continues to run until a termination " -"signal is received" -msgstr "" - #: src/testbed/gnunet_testbed_mpi_spawn.c:118 msgid "Waiting for child to exit.\n" msgstr "" @@ -6490,6 +6350,17 @@ msgstr "" msgid "Spawning process `%s'\n" msgstr "" +#: src/testbed/gnunet-testbed-profiler.c:289 +msgid "tolerate COUNT number of continious timeout failures" +msgstr "" + +#: src/testbed/gnunet-testbed-profiler.c:294 +msgid "" +"run profiler in non-interactive mode where upon testbed setup the profiler " +"does not wait for a keystroke but continues to run until a termination " +"signal is received" +msgstr "" + #: src/testbed/testbed_api.c:410 #, c-format msgid "Adding host %u failed with error: %s\n" @@ -6777,54 +6648,54 @@ msgstr "" msgid "GNUnet topology control" msgstr "" +#: src/transport/gnunet-service-transport_ats.c:141 +msgid "# Addresses given to ATS" +msgstr "" + #: src/transport/gnunet-service-transport.c:448 msgid "# messages dropped due to slow client" msgstr "" -#: src/transport/gnunet-service-transport.c:809 +#: src/transport/gnunet-service-transport.c:818 msgid "# bytes payload dropped (other peer was not connected)" msgstr "" -#: src/transport/gnunet-service-transport.c:1539 +#: src/transport/gnunet-service-transport.c:1551 msgid "# bytes payload discarded due to not connected peer" msgstr "" -#: src/transport/gnunet-service-transport.c:1699 +#: src/transport/gnunet-service-transport.c:1711 msgid "# bytes total received" msgstr "" -#: src/transport/gnunet-service-transport.c:1796 +#: src/transport/gnunet-service-transport.c:1808 msgid "# bytes payload received" msgstr "" -#: src/transport/gnunet-service-transport.c:2113 -#: src/transport/gnunet-service-transport.c:2585 +#: src/transport/gnunet-service-transport.c:2125 +#: src/transport/gnunet-service-transport.c:2597 msgid "# disconnects due to blacklist" msgstr "" -#: src/transport/gnunet-service-transport.c:2589 +#: src/transport/gnunet-service-transport.c:2601 #, c-format msgid "Disallowing connection to peer `%s' on transport %s\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2697 +#: src/transport/gnunet-service-transport.c:2709 #, c-format msgid "Adding blacklisting entry for peer `%s'\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2706 +#: src/transport/gnunet-service-transport.c:2718 #, c-format msgid "Adding blacklisting entry for peer `%s':`%s'\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2771 +#: src/transport/gnunet-service-transport.c:2783 msgid "Transport service is lacking key configuration settings. Exiting.\n" msgstr "" -#: src/transport/gnunet-service-transport_ats.c:141 -msgid "# Addresses given to ATS" -msgstr "" - #: src/transport/gnunet-service-transport_hello.c:195 msgid "# refreshed my HELLO" msgstr "" @@ -6956,64 +6827,64 @@ msgstr "" msgid "SYN request from peer `%s' ignored due impending shutdown\n" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:2620 +#: src/transport/gnunet-service-transport_neighbours.c:2623 msgid "# Attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3102 +#: src/transport/gnunet-service-transport_neighbours.c:3105 msgid "# SYN_ACK messages received" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3110 +#: src/transport/gnunet-service-transport_neighbours.c:3113 msgid "# unexpected SYN_ACK messages (no peer)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3128 -#: src/transport/gnunet-service-transport_neighbours.c:3152 +#: src/transport/gnunet-service-transport_neighbours.c:3131 +#: src/transport/gnunet-service-transport_neighbours.c:3155 msgid "# unexpected SYN_ACK messages (not ready)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3164 +#: src/transport/gnunet-service-transport_neighbours.c:3167 msgid "# unexpected SYN_ACK messages (waiting on ATS)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3189 +#: src/transport/gnunet-service-transport_neighbours.c:3192 msgid "# Successful attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3202 +#: src/transport/gnunet-service-transport_neighbours.c:3205 msgid "# unexpected SYN_ACK messages (disconnecting)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3374 +#: src/transport/gnunet-service-transport_neighbours.c:3377 msgid "# ACK messages received" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3410 +#: src/transport/gnunet-service-transport_neighbours.c:3413 msgid "# unexpected ACK messages" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3498 +#: src/transport/gnunet-service-transport_neighbours.c:3501 msgid "# quota messages ignored (malformed)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3505 +#: src/transport/gnunet-service-transport_neighbours.c:3508 msgid "# QUOTA messages received" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3545 +#: src/transport/gnunet-service-transport_neighbours.c:3548 msgid "# disconnect messages ignored (malformed)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3552 +#: src/transport/gnunet-service-transport_neighbours.c:3555 msgid "# DISCONNECT messages received" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3563 +#: src/transport/gnunet-service-transport_neighbours.c:3566 msgid "# disconnect messages ignored (timestamp)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3697 +#: src/transport/gnunet-service-transport_neighbours.c:3700 msgid "# disconnected from peer upon explicit request" msgstr "" @@ -7047,8 +6918,8 @@ msgstr "" #: src/transport/gnunet-service-transport_validation.c:491 #: src/transport/gnunet-service-transport_validation.c:677 -#: src/transport/gnunet-service-transport_validation.c:988 -#: src/transport/gnunet-service-transport_validation.c:1590 +#: src/transport/gnunet-service-transport_validation.c:997 +#: src/transport/gnunet-service-transport_validation.c:1609 msgid "# validations running" msgstr "" @@ -7072,96 +6943,60 @@ msgstr "" msgid "# address revalidations started" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1114 +#: src/transport/gnunet-service-transport_validation.c:1123 msgid "# PING message for different peer received" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1165 +#: src/transport/gnunet-service-transport_validation.c:1174 #, c-format msgid "Plugin `%s' not available, cannot confirm having this address\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1178 +#: src/transport/gnunet-service-transport_validation.c:1187 msgid "# failed address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1181 +#: src/transport/gnunet-service-transport_validation.c:1190 #, c-format msgid "Address `%s' is not one of my addresses, not confirming PING\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1189 +#: src/transport/gnunet-service-transport_validation.c:1198 msgid "# successful address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1202 +#: src/transport/gnunet-service-transport_validation.c:1211 #, c-format msgid "" "Not confirming PING from peer `%s' with address `%s' since I cannot confirm " "having this address.\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1257 +#: src/transport/gnunet-service-transport_validation.c:1266 #, c-format msgid "Failed to create PONG signature for peer `%s'\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1308 +#: src/transport/gnunet-service-transport_validation.c:1317 msgid "# PONGs unicast via reliable transport" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1317 +#: src/transport/gnunet-service-transport_validation.c:1326 msgid "# PONGs multicast to all available addresses" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1480 +#: src/transport/gnunet-service-transport_validation.c:1499 msgid "# PONGs dropped, no matching pending validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1498 +#: src/transport/gnunet-service-transport_validation.c:1517 msgid "# PONGs dropped, signature expired" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1553 +#: src/transport/gnunet-service-transport_validation.c:1572 msgid "# validations succeeded" msgstr "" -#: src/transport/gnunet-transport-profiler.c:219 -#, c-format -msgid "%llu B in %llu ms == %.2f KB/s!\n" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:617 -msgid "send data to peer" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:621 -msgid "receive data from peer" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:626 -msgid "iterations" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:631 -#, fuzzy -msgid "number of messages to send" -msgstr "nombre de valeurs" - -#: src/transport/gnunet-transport-profiler.c:636 -msgid "message size to use" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:641 -#: src/transport/gnunet-transport.c:1462 -msgid "peer identity" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:652 -#: src/transport/gnunet-transport.c:1482 -msgid "Direct access to transport service." -msgstr "" - #: src/transport/gnunet-transport.c:413 #, c-format msgid "Transmitted %llu bytes/s (%llu bytes in %s)\n" @@ -7290,6 +7125,11 @@ msgstr "" msgid "do not resolve hostnames" msgstr "" +#: src/transport/gnunet-transport.c:1462 +#: src/transport/gnunet-transport-profiler.c:641 +msgid "peer identity" +msgstr "" + #: src/transport/gnunet-transport.c:1466 msgid "monitor plugin sessions" msgstr "" @@ -7298,6 +7138,37 @@ msgstr "" msgid "send data for benchmarking to the other peer (until CTRL-C)" msgstr "" +#: src/transport/gnunet-transport.c:1482 +#: src/transport/gnunet-transport-profiler.c:652 +msgid "Direct access to transport service." +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:219 +#, c-format +msgid "%llu B in %llu ms == %.2f KB/s!\n" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:617 +msgid "send data to peer" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:621 +msgid "receive data from peer" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:626 +msgid "iterations" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:631 +#, fuzzy +msgid "number of messages to send" +msgstr "nombre de valeurs" + +#: src/transport/gnunet-transport-profiler.c:636 +msgid "message size to use" +msgstr "" + #: src/transport/plugin_transport_http_client.c:1474 #: src/transport/plugin_transport_http_server.c:2312 #: src/transport/plugin_transport_http_server.c:3526 @@ -7563,6 +7434,20 @@ msgstr "" msgid "TCP transport advertises itself as being on port %llu\n" msgstr "" +#: src/transport/plugin_transport_udp_broadcasting.c:168 +msgid "# Multicast HELLO beacons received via UDP" +msgstr "" + +#: src/transport/plugin_transport_udp_broadcasting.c:548 +msgid "" +"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" +msgstr "" + +#: src/transport/plugin_transport_udp_broadcasting.c:565 +#, c-format +msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" +msgstr "" + #: src/transport/plugin_transport_udp.c:3366 #, c-format msgid "" @@ -7609,20 +7494,6 @@ msgstr "adresse invalide" msgid "Failed to create UDP network sockets\n" msgstr "" -#: src/transport/plugin_transport_udp_broadcasting.c:168 -msgid "# Multicast HELLO beacons received via UDP" -msgstr "" - -#: src/transport/plugin_transport_udp_broadcasting.c:548 -msgid "" -"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" -msgstr "" - -#: src/transport/plugin_transport_udp_broadcasting.c:565 -#, c-format -msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" -msgstr "" - #: src/transport/plugin_transport_unix.c:1403 #, c-format msgid "Cannot create path to `%s'\n" @@ -7727,7 +7598,7 @@ msgid "" "`GNUNET_SERVER_receive_done' after %s\n" msgstr "" -#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2336 +#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2346 #, c-format msgid "Unknown address family %d\n" msgstr "" @@ -7803,18 +7674,18 @@ msgstr "" msgid "do daemonize (detach from terminal)" msgstr "" -#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:244 +#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:255 #: src/util/service.c:1790 #, c-format msgid "Malformed configuration file `%s', exit ...\n" msgstr "" -#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:261 +#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:272 #: src/util/service.c:1801 msgid "Malformed configuration, exit ...\n" msgstr "" -#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:256 +#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:267 #: src/util/service.c:1807 #, c-format msgid "Could not access configuration file `%s'\n" @@ -7854,7 +7725,7 @@ msgstr "" msgid "Metadata `%s' failed to deserialize" msgstr "" -#: src/util/client.c:882 +#: src/util/client.c:911 #, c-format msgid "Need a non-empty hostname for service `%s'.\n" msgstr "" @@ -7952,22 +7823,22 @@ msgid "" "%llu)\n" msgstr "" -#: src/util/crypto_ecc.c:777 +#: src/util/crypto_ecc.c:810 #, c-format msgid "ECC signing failed at %s:%d: %s\n" msgstr "" -#: src/util/crypto_ecc.c:827 +#: src/util/crypto_ecc.c:860 #, c-format msgid "EdDSA signing failed at %s:%d: %s\n" msgstr "" -#: src/util/crypto_ecc.c:901 +#: src/util/crypto_ecc.c:934 #, c-format msgid "ECDSA signature verification failed at %s:%d: %s\n" msgstr "" -#: src/util/crypto_ecc.c:958 +#: src/util/crypto_ecc.c:991 #, c-format msgid "EdDSA signature verification failed at %s:%d: %s\n" msgstr "" @@ -8184,29 +8055,29 @@ msgstr "" msgid "Manipulate GNUnet configuration files" msgstr "" -#: src/util/gnunet-ecc.c:89 +#: src/util/gnunet-ecc.c:94 #, c-format msgid "Failed to open `%s': %s\n" msgstr "" -#: src/util/gnunet-ecc.c:125 +#: src/util/gnunet-ecc.c:130 #, c-format msgid "Generating %u keys like %s, please wait" msgstr "" -#: src/util/gnunet-ecc.c:138 +#: src/util/gnunet-ecc.c:143 #, c-format msgid "Generating %u keys, please wait" msgstr "" -#: src/util/gnunet-ecc.c:179 +#: src/util/gnunet-ecc.c:184 #, c-format msgid "" "\n" "Failed to write to `%s': %s\n" msgstr "" -#: src/util/gnunet-ecc.c:189 +#: src/util/gnunet-ecc.c:194 #, c-format msgid "" "\n" @@ -8215,57 +8086,61 @@ msgstr "" "\n" "Terminé !\n" -#: src/util/gnunet-ecc.c:192 +#: src/util/gnunet-ecc.c:197 #, c-format msgid "" "\n" "Error, %u keys not generated\n" msgstr "" -#: src/util/gnunet-ecc.c:283 +#: src/util/gnunet-ecc.c:288 #, c-format msgid "Hostkeys file `%s' not found\n" msgstr "" -#: src/util/gnunet-ecc.c:294 +#: src/util/gnunet-ecc.c:299 #, c-format msgid "Hostkeys file `%s' is empty\n" msgstr "" -#: src/util/gnunet-ecc.c:316 +#: src/util/gnunet-ecc.c:321 #, c-format msgid "Could not read hostkey file: %s\n" msgstr "" -#: src/util/gnunet-ecc.c:367 +#: src/util/gnunet-ecc.c:372 msgid "No hostkey file specified on command line\n" msgstr "" -#: src/util/gnunet-ecc.c:425 +#: src/util/gnunet-ecc.c:437 msgid "list keys included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:430 +#: src/util/gnunet-ecc.c:442 msgid "number of keys to list included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:435 +#: src/util/gnunet-ecc.c:447 msgid "create COUNT public-private key pairs (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:439 +#: src/util/gnunet-ecc.c:451 msgid "print the public key in ASCII format" msgstr "" -#: src/util/gnunet-ecc.c:443 +#: src/util/gnunet-ecc.c:455 +msgid "print the private key in ASCII format" +msgstr "" + +#: src/util/gnunet-ecc.c:459 msgid "print the public key in HEX format" msgstr "" -#: src/util/gnunet-ecc.c:447 +#: src/util/gnunet-ecc.c:463 msgid "print examples of ECC operations (used for compatibility testing)" msgstr "" -#: src/util/gnunet-ecc.c:463 +#: src/util/gnunet-ecc.c:479 msgid "Manipulate GNUnet private ECC key files" msgstr "" @@ -8422,22 +8297,22 @@ msgid "" "resolution will be unavailable.\n" msgstr "" -#: src/util/resolver_api.c:826 +#: src/util/resolver_api.c:827 #, c-format msgid "Timeout trying to resolve hostname `%s'.\n" msgstr "" -#: src/util/resolver_api.c:839 +#: src/util/resolver_api.c:840 #, c-format msgid "Timeout trying to resolve IP address `%s'.\n" msgstr "" -#: src/util/resolver_api.c:1023 +#: src/util/resolver_api.c:1024 msgid "Resolver not configured correctly.\n" msgstr "" -#: src/util/resolver_api.c:1109 src/util/resolver_api.c:1132 -#: src/util/resolver_api.c:1146 +#: src/util/resolver_api.c:1110 src/util/resolver_api.c:1133 +#: src/util/resolver_api.c:1147 #, fuzzy, c-format msgid "Could not resolve our FQDN: %s\n" msgstr "Résolution de « %s » échouée : %s\n" @@ -8447,7 +8322,7 @@ msgid "" "Could not bind to any of the ports I was supposed to, refusing to run!\n" msgstr "" -#: src/util/service.c:2081 +#: src/util/service.c:2091 #, c-format msgid "" "Processing code for message of type %u did not call " @@ -8624,61 +8499,61 @@ msgstr "" msgid "# ICMPv6 packets dropped (not allowed)" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2232 +#: src/vpn/gnunet-service-vpn.c:2235 msgid "# Packets received from TUN interface" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2265 src/vpn/gnunet-service-vpn.c:2301 +#: src/vpn/gnunet-service-vpn.c:2268 src/vpn/gnunet-service-vpn.c:2304 #, c-format msgid "Packet received for unmapped destination `%s' (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2311 +#: src/vpn/gnunet-service-vpn.c:2314 msgid "Received IPv4 packet with options (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2325 +#: src/vpn/gnunet-service-vpn.c:2328 #, c-format msgid "Received packet of unknown protocol %d from TUN (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2364 +#: src/vpn/gnunet-service-vpn.c:2367 msgid "Failed to find unallocated IPv4 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2419 +#: src/vpn/gnunet-service-vpn.c:2422 msgid "Failed to find unallocated IPv6 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2461 src/vpn/gnunet-service-vpn.c:2683 +#: src/vpn/gnunet-service-vpn.c:2464 src/vpn/gnunet-service-vpn.c:2686 msgid "# Active destinations" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2732 +#: src/vpn/gnunet-service-vpn.c:2735 msgid "Failed to allocate IP address for new destination\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2995 +#: src/vpn/gnunet-service-vpn.c:2998 msgid "Must specify valid IPv6 address" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3019 +#: src/vpn/gnunet-service-vpn.c:3022 msgid "Must specify valid IPv6 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3027 +#: src/vpn/gnunet-service-vpn.c:3030 msgid "IPv6 support disabled as this system does not support IPv6\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3040 +#: src/vpn/gnunet-service-vpn.c:3043 msgid "Must specify valid IPv4 address" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3053 +#: src/vpn/gnunet-service-vpn.c:3056 msgid "Must specify valid IPv4 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3063 +#: src/vpn/gnunet-service-vpn.c:3066 msgid "IPv4 support disabled as this system does not support IPv4\n" msgstr "" @@ -8848,6 +8723,10 @@ msgstr "" #~ msgid "Failed to start resolver!\n" #~ msgstr "Échec du démarrage de %s\n" +#, fuzzy +#~ msgid "Failed to start NAT test for plugin `%s'\n" +#~ msgstr "Résolution de « %s » échouée\n" + #~ msgid "Benchmarking done\n" #~ msgstr "Benchmark terminé\n" diff --git a/po/sv.po b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GNUnet 0.7.0b\n" "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" -"POT-Creation-Date: 2017-10-20 15:14+0000\n" +"POT-Creation-Date: 2018-01-02 02:33+0100\n" "PO-Revision-Date: 2006-01-21 17:16+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" @@ -245,14 +245,14 @@ msgid "Require valid port number for service `%s' in configuration!\n" msgstr "" #: src/arm/gnunet-service-arm.c:430 src/transport/plugin_transport_tcp.c:1176 -#: src/transport/tcp_service_legacy.c:613 src/util/client.c:480 +#: src/transport/tcp_service_legacy.c:613 src/util/client.c:505 #: src/util/service.c:682 #, c-format msgid "UNIXPATH `%s' too long, maximum length is %llu\n" msgstr "" #: src/arm/gnunet-service-arm.c:434 src/transport/plugin_transport_tcp.c:1180 -#: src/transport/tcp_service_legacy.c:617 src/util/client.c:485 +#: src/transport/tcp_service_legacy.c:617 src/util/client.c:510 #: src/util/service.c:687 #, fuzzy, c-format msgid "Using `%s' instead\n" @@ -355,15 +355,133 @@ msgstr "" msgid "Initiating shutdown as requested by client.\n" msgstr "" -#: src/ats-tests/ats-testing-log.c:837 -msgid "Stop logging\n" +#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 +#, c-format +msgid "" +"Could not load quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" msgstr "" -#: src/ats-tests/ats-testing-log.c:892 -#, fuzzy, c-format -msgid "Start logging `%s'\n" +#: src/ats/gnunet-ats-solver-eval.c:2799 +#, c-format +msgid "" +"No outbound quota configured for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:2840 +#, c-format +msgid "" +"No outbound quota configure for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3294 src/ats-tests/gnunet-solver-eval.c:939 +msgid "solver to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3299 src/ats-tests/gnunet-solver-eval.c:945 +#: src/ats-tests/gnunet-solver-eval.c:950 +msgid "experiment to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3306 +#, fuzzy +msgid "print logging" msgstr "Startade samling \"%s\".\n" +#: src/ats/gnunet-ats-solver-eval.c:3311 +msgid "save logging to disk" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3316 +msgid "disable normalization" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:304 +#, c-format +msgid "" +"Could not load %s quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:314 +#, c-format +msgid "%s quota configured for network `%s' is %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:359 +#, c-format +msgid "" +"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:451 +#, fuzzy, c-format +msgid "Failed to initialize solver `%s'!\n" +msgstr "Kunde inte initiera SQLite.\n" + +#: src/ats/plugin_ats_mlp.c:1274 +msgid "Problem size too large, cannot allocate memory!\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1869 +#, fuzzy, c-format +msgid "Adding address for peer `%s' multiple times\n" +msgstr "Motpart \"%s\" med pålitlighet %8u och adress \"%s\"\n" + +#: src/ats/plugin_ats_mlp.c:1913 +#, fuzzy, c-format +msgid "Updating address property for peer `%s' %p not added before\n" +msgstr "Motpart \"%s\" med pålitlighet %8u och adress \"%s\"\n" + +#: src/ats/plugin_ats_mlp.c:2475 +msgid "" +"MLP solver is not optimizing for anything, changing to feasibility check\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 +#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 +#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 +#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 +#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 +#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 +#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 +#, fuzzy, c-format +msgid "Invalid %s configuration %f \n" +msgstr "Kunde inte spara konfigurationsfil \"%s\":" + +#: src/ats/plugin_ats_mlp.c:2670 +#, c-format +msgid "" +"Adjusting inconsistent outbound quota configuration for network `%s', is " +"%llu must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2679 +#, c-format +msgid "" +"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " +"must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2689 +#, c-format +msgid "" +"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2698 +#, c-format +msgid "" +"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_proportional.c:1164 +#, fuzzy, c-format +msgid "Invalid %s configuration %f\n" +msgstr "Kunde inte spara konfigurationsfil \"%s\":" + #: src/ats-tests/ats-testing.c:422 #, c-format msgid "Connected master [%u] with slave [%u]\n" @@ -374,6 +492,15 @@ msgstr "" msgid "Failed to connect master peer [%u] with slave [%u]\n" msgstr "Misslyckades att ansluta till gnunetd.\n" +#: src/ats-tests/ats-testing-log.c:837 +msgid "Stop logging\n" +msgstr "" + +#: src/ats-tests/ats-testing-log.c:892 +#, fuzzy, c-format +msgid "Start logging `%s'\n" +msgstr "Startade samling \"%s\".\n" + #: src/ats-tests/gnunet-ats-sim.c:90 #, c-format msgid "" @@ -381,15 +508,6 @@ msgid "" "= %u KiB/s\n" msgstr "" -#: src/ats-tests/gnunet-solver-eval.c:939 src/ats/gnunet-ats-solver-eval.c:3294 -msgid "solver to use" -msgstr "" - -#: src/ats-tests/gnunet-solver-eval.c:945 -#: src/ats-tests/gnunet-solver-eval.c:950 src/ats/gnunet-ats-solver-eval.c:3299 -msgid "experiment to use" -msgstr "" - #: src/ats-tool/gnunet-ats.c:307 #, c-format msgid "%u address resolutions had a timeout\n" @@ -511,124 +629,6 @@ msgstr "" msgid "Print information about ATS state" msgstr "Skriv ut information om GNUnets motparter." -#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 -#, c-format -msgid "" -"Could not load quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2799 -#, c-format -msgid "" -"No outbound quota configured for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2840 -#, c-format -msgid "" -"No outbound quota configure for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3306 -#, fuzzy -msgid "print logging" -msgstr "Startade samling \"%s\".\n" - -#: src/ats/gnunet-ats-solver-eval.c:3311 -msgid "save logging to disk" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3316 -msgid "disable normalization" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:304 -#, c-format -msgid "" -"Could not load %s quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:314 -#, c-format -msgid "%s quota configured for network `%s' is %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:359 -#, c-format -msgid "" -"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:451 -#, fuzzy, c-format -msgid "Failed to initialize solver `%s'!\n" -msgstr "Kunde inte initiera SQLite.\n" - -#: src/ats/plugin_ats_mlp.c:1274 -msgid "Problem size too large, cannot allocate memory!\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1869 -#, fuzzy, c-format -msgid "Adding address for peer `%s' multiple times\n" -msgstr "Motpart \"%s\" med pålitlighet %8u och adress \"%s\"\n" - -#: src/ats/plugin_ats_mlp.c:1913 -#, fuzzy, c-format -msgid "Updating address property for peer `%s' %p not added before\n" -msgstr "Motpart \"%s\" med pålitlighet %8u och adress \"%s\"\n" - -#: src/ats/plugin_ats_mlp.c:2475 -msgid "" -"MLP solver is not optimizing for anything, changing to feasibility check\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 -#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 -#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 -#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 -#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 -#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 -#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 -#, fuzzy, c-format -msgid "Invalid %s configuration %f \n" -msgstr "Kunde inte spara konfigurationsfil \"%s\":" - -#: src/ats/plugin_ats_mlp.c:2670 -#, c-format -msgid "" -"Adjusting inconsistent outbound quota configuration for network `%s', is " -"%llu must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2679 -#, c-format -msgid "" -"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " -"must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2689 -#, c-format -msgid "" -"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2698 -#, c-format -msgid "" -"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_proportional.c:1164 -#, fuzzy, c-format -msgid "Invalid %s configuration %f\n" -msgstr "Kunde inte spara konfigurationsfil \"%s\":" - #: src/auction/gnunet-auction-create.c:163 msgid "description of the item to be sold" msgstr "" @@ -676,58 +676,58 @@ msgstr "hjälptext för -t" msgid "Invalid peer ID `%s'\n" msgstr "Ogiltiga argument: " -#: src/cadet/gnunet-cadet.c:702 +#: src/cadet/gnunet-cadet.c:703 #, fuzzy, c-format msgid "Invalid tunnel owner `%s'\n" msgstr "Ogiltigt format för IP: \"%s\"\n" -#: src/cadet/gnunet-cadet.c:775 +#: src/cadet/gnunet-cadet.c:776 msgid "Extra arguments are not applicable in combination with this option.\n" msgstr "" -#: src/cadet/gnunet-cadet.c:866 +#: src/cadet/gnunet-cadet.c:867 #, fuzzy, c-format msgid "Invalid target `%s'\n" msgstr "Ogiltigt argument: \"%s\"\n" -#: src/cadet/gnunet-cadet.c:903 +#: src/cadet/gnunet-cadet.c:904 #, fuzzy msgid "No action requested\n" msgstr "Samling stoppad.\n" -#: src/cadet/gnunet-cadet.c:928 +#: src/cadet/gnunet-cadet.c:929 #, fuzzy msgid "Provide information about a particular connection" msgstr "Skriv ut information om GNUnets motparter." -#: src/cadet/gnunet-cadet.c:933 +#: src/cadet/gnunet-cadet.c:934 msgid "Activate echo mode" msgstr "" -#: src/cadet/gnunet-cadet.c:938 +#: src/cadet/gnunet-cadet.c:939 msgid "Dump debug information to STDERR" msgstr "" -#: src/cadet/gnunet-cadet.c:944 +#: src/cadet/gnunet-cadet.c:945 msgid "Listen for connections using a shared secret among sender and recipient" msgstr "" -#: src/cadet/gnunet-cadet.c:951 +#: src/cadet/gnunet-cadet.c:952 #, fuzzy msgid "Provide information about a patricular peer" msgstr "Skriv ut information om GNUnets motparter." -#: src/cadet/gnunet-cadet.c:957 +#: src/cadet/gnunet-cadet.c:958 #, fuzzy msgid "Provide information about all peers" msgstr "Skriv ut information om GNUnets motparter." -#: src/cadet/gnunet-cadet.c:963 +#: src/cadet/gnunet-cadet.c:964 #, fuzzy msgid "Provide information about a particular tunnel" msgstr "Skriv ut information om GNUnets motparter." -#: src/cadet/gnunet-cadet.c:969 +#: src/cadet/gnunet-cadet.c:970 #, fuzzy msgid "Provide information about all tunnels" msgstr "Skriv ut information om GNUnets motparter." @@ -777,28 +777,6 @@ msgstr "" msgid "Connection to conversation service lost, trying to reconnect\n" msgstr "" -#: src/conversation/gnunet-conversation-test.c:119 -#, c-format -msgid "" -"\n" -"End of transmission. Have a GNU day.\n" -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:145 -#, c-format -msgid "" -"\n" -"We are now playing your recording back. If you can hear it, your audio " -"settings are working..." -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:210 -#, c-format -msgid "" -"We will now be recording you for %s. After that time, the recording will be " -"played back to you..." -msgstr "" - #: src/conversation/gnunet-conversation.c:269 #, c-format msgid "Incoming call from `%s'. Please /accept %u or /cancel %u the call.\n" @@ -1056,8 +1034,30 @@ msgstr "" msgid "Enables having a conversation with other GNUnet users." msgstr "" -#: src/conversation/gnunet-helper-audio-playback-gst.c:356 +#: src/conversation/gnunet-conversation-test.c:119 +#, c-format +msgid "" +"\n" +"End of transmission. Have a GNU day.\n" +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:145 +#, c-format +msgid "" +"\n" +"We are now playing your recording back. If you can hear it, your audio " +"settings are working..." +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:210 +#, c-format +msgid "" +"We will now be recording you for %s. After that time, the recording will be " +"played back to you..." +msgstr "" + #: src/conversation/gnunet_gst.c:622 +#: src/conversation/gnunet-helper-audio-playback-gst.c:361 #, c-format msgid "Read error from STDIN: %d %s\n" msgstr "" @@ -1067,63 +1067,63 @@ msgstr "" msgid "pa_stream_write() failed: %s\n" msgstr "\"%s\" %s misslyckades: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:607 +#: src/conversation/gnunet-helper-audio-playback.c:612 msgid "gnunet-helper-audio-playback - Got signal, exiting\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:632 +#: src/conversation/gnunet-helper-audio-playback.c:637 #: src/conversation/gnunet-helper-audio-record.c:545 #, fuzzy msgid "Connection established.\n" msgstr "Samling stoppad.\n" -#: src/conversation/gnunet-helper-audio-playback.c:637 +#: src/conversation/gnunet-helper-audio-playback.c:642 #: src/conversation/gnunet-helper-audio-record.c:550 #, fuzzy, c-format msgid "pa_stream_new() failed: %s\n" msgstr "\"%s\" %s misslyckades: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:651 +#: src/conversation/gnunet-helper-audio-playback.c:656 #, c-format msgid "pa_stream_connect_playback() failed: %s\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:664 +#: src/conversation/gnunet-helper-audio-playback.c:669 #: src/conversation/gnunet-helper-audio-record.c:576 #, fuzzy, c-format msgid "Connection failure: %s\n" msgstr " Anslutning misslyckades (fel?)\n" -#: src/conversation/gnunet-helper-audio-playback.c:685 +#: src/conversation/gnunet-helper-audio-playback.c:690 #: src/conversation/gnunet-helper-audio-record.c:599 msgid "Wrong Spec\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:691 +#: src/conversation/gnunet-helper-audio-playback.c:696 #: src/conversation/gnunet-helper-audio-record.c:605 #, fuzzy msgid "pa_mainloop_new() failed.\n" msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" -#: src/conversation/gnunet-helper-audio-playback.c:705 +#: src/conversation/gnunet-helper-audio-playback.c:710 #: src/conversation/gnunet-helper-audio-record.c:620 #, fuzzy msgid "pa_context_new() failed.\n" msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" -#: src/conversation/gnunet-helper-audio-playback.c:712 +#: src/conversation/gnunet-helper-audio-playback.c:717 #: src/conversation/gnunet-helper-audio-record.c:626 #, fuzzy, c-format msgid "pa_context_connect() failed: %s\n" msgstr "# av anslutna parter" -#: src/conversation/gnunet-helper-audio-playback.c:718 +#: src/conversation/gnunet-helper-audio-playback.c:723 #: src/conversation/gnunet-helper-audio-record.c:632 #, fuzzy msgid "pa_mainloop_run() failed.\n" msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" -#: src/conversation/gnunet-helper-audio-playback.c:790 +#: src/conversation/gnunet-helper-audio-playback.c:795 #, c-format msgid "Read error from STDIN: %s\n" msgstr "" @@ -1194,7 +1194,7 @@ msgstr "Misslyckades att läsa kompislista från \"%s\"\n" msgid "Could not open line, port %s already in use!\n" msgstr "Kunde inte ansluta till gnunetd.\n" -#: src/conversation/microphone.c:119 +#: src/conversation/microphone.c:121 #, fuzzy msgid "Could not start record audio helper\n" msgstr "Kunde inte komma åt namnrymdsinformation.\n" @@ -1285,27 +1285,27 @@ msgstr "" msgid "# dequeuing CAR (duplicate request)" msgstr "" -#: src/core/gnunet-service-core.c:440 +#: src/core/gnunet-service-core.c:443 #, fuzzy, c-format msgid "# bytes of messages of type %u received" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/core/gnunet-service-core.c:538 +#: src/core/gnunet-service-core.c:541 #, fuzzy msgid "# messages discarded (session disconnected)" msgstr "Nätverksannonsering avstängd i konfigurationen!\n" -#: src/core/gnunet-service-core.c:876 +#: src/core/gnunet-service-core.c:879 #, fuzzy, c-format msgid "# messages of type %u discarded (client busy)" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/core/gnunet-service-core.c:985 +#: src/core/gnunet-service-core.c:988 #, fuzzy msgid "Core service is lacking HOSTKEY configuration setting. Exiting.\n" msgstr "GNUnet-konfiguration" -#: src/core/gnunet-service-core.c:1006 +#: src/core/gnunet-service-core.c:1009 #, fuzzy, c-format msgid "Core service of `%s' ready.\n" msgstr "\"%s\" är inte en fil.\n" @@ -1318,312 +1318,180 @@ msgstr "# byte krypterade" msgid "# bytes decrypted" msgstr "# byte dekrypterade" -#: src/core/gnunet-service-core_kx.c:725 +#: src/core/gnunet-service-core_kx.c:728 #, fuzzy msgid "# PAYLOAD dropped (out of order)" msgstr "# byte kastade via UDP (utgående)" -#: src/core/gnunet-service-core_kx.c:775 +#: src/core/gnunet-service-core_kx.c:778 msgid "# key exchanges initiated" msgstr "" -#: src/core/gnunet-service-core_kx.c:837 +#: src/core/gnunet-service-core_kx.c:840 msgid "# key exchanges stopped" msgstr "" -#: src/core/gnunet-service-core_kx.c:871 +#: src/core/gnunet-service-core_kx.c:874 #, fuzzy msgid "# PING messages transmitted" msgstr "# PING-meddelanden skapade" -#: src/core/gnunet-service-core_kx.c:938 +#: src/core/gnunet-service-core_kx.c:941 msgid "# old ephemeral keys ignored" msgstr "" -#: src/core/gnunet-service-core_kx.c:945 +#: src/core/gnunet-service-core_kx.c:948 #, fuzzy msgid "# ephemeral keys received" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/core/gnunet-service-core_kx.c:984 +#: src/core/gnunet-service-core_kx.c:987 #, c-format msgid "" "Ephemeral key message from peer `%s' rejected as its validity range does not " "match our system time (%llu not in [%llu,%llu]).\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:995 +#: src/core/gnunet-service-core_kx.c:998 #, fuzzy msgid "# EPHEMERAL_KEY messages received" msgstr "# PING-meddelanden skapade" -#: src/core/gnunet-service-core_kx.c:1091 -#: src/transport/gnunet-service-transport_validation.c:1119 +#: src/core/gnunet-service-core_kx.c:1094 +#: src/transport/gnunet-service-transport_validation.c:1128 #, fuzzy msgid "# PING messages received" msgstr "# PING-meddelanden skapade" -#: src/core/gnunet-service-core_kx.c:1100 +#: src/core/gnunet-service-core_kx.c:1103 #, fuzzy msgid "# PING messages dropped (out of order)" msgstr "Nätverksannonsering avstängd i konfigurationen!\n" -#: src/core/gnunet-service-core_kx.c:1158 +#: src/core/gnunet-service-core_kx.c:1161 #, fuzzy msgid "# PONG messages created" msgstr "# PING-meddelanden skapade" -#: src/core/gnunet-service-core_kx.c:1184 +#: src/core/gnunet-service-core_kx.c:1187 #, fuzzy msgid "# sessions terminated by timeout" msgstr "# byte kastade via TCP (utgående)" -#: src/core/gnunet-service-core_kx.c:1197 +#: src/core/gnunet-service-core_kx.c:1200 #, fuzzy msgid "# keepalive messages sent" msgstr "# PING-meddelanden i klartext skickade" -#: src/core/gnunet-service-core_kx.c:1261 -#: src/transport/gnunet-service-transport_validation.c:1442 +#: src/core/gnunet-service-core_kx.c:1264 +#: src/transport/gnunet-service-transport_validation.c:1461 #, fuzzy msgid "# PONG messages received" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/core/gnunet-service-core_kx.c:1268 +#: src/core/gnunet-service-core_kx.c:1271 #, fuzzy msgid "# PONG messages dropped (connection down)" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/core/gnunet-service-core_kx.c:1273 +#: src/core/gnunet-service-core_kx.c:1276 #, fuzzy msgid "# PONG messages dropped (out of order)" msgstr "Nätverksannonsering avstängd i konfigurationen!\n" -#: src/core/gnunet-service-core_kx.c:1308 +#: src/core/gnunet-service-core_kx.c:1311 #, fuzzy msgid "# PONG messages decrypted" msgstr "# PING-meddelanden skapade" -#: src/core/gnunet-service-core_kx.c:1346 +#: src/core/gnunet-service-core_kx.c:1349 #, fuzzy msgid "# session keys confirmed via PONG" msgstr "# sessionnycklar vägrade" -#: src/core/gnunet-service-core_kx.c:1357 +#: src/core/gnunet-service-core_kx.c:1360 #, fuzzy msgid "# timeouts prevented via PONG" msgstr "# byte mottogs via TCP" -#: src/core/gnunet-service-core_kx.c:1364 +#: src/core/gnunet-service-core_kx.c:1367 #, fuzzy msgid "# rekey operations confirmed via PONG" msgstr "# sessionnycklar vägrade" -#: src/core/gnunet-service-core_kx.c:1518 +#: src/core/gnunet-service-core_kx.c:1521 #, fuzzy msgid "# DATA message dropped (out of order)" msgstr "# byte kastade via UDP (utgående)" -#: src/core/gnunet-service-core_kx.c:1526 +#: src/core/gnunet-service-core_kx.c:1529 #, c-format msgid "" "Session to peer `%s' went down due to key expiration (should not happen)\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:1529 +#: src/core/gnunet-service-core_kx.c:1532 #, fuzzy msgid "# sessions terminated by key expiration" msgstr "# byte kastade via TCP (utgående)" -#: src/core/gnunet-service-core_kx.c:1590 -#: src/core/gnunet-service-core_kx.c:1616 +#: src/core/gnunet-service-core_kx.c:1593 +#: src/core/gnunet-service-core_kx.c:1619 #, fuzzy msgid "# bytes dropped (duplicates)" msgstr "# byte kastade via UDP (utgående)" -#: src/core/gnunet-service-core_kx.c:1603 +#: src/core/gnunet-service-core_kx.c:1606 #, fuzzy msgid "# bytes dropped (out of sequence)" msgstr "# byte kastade via UDP (utgående)" -#: src/core/gnunet-service-core_kx.c:1645 +#: src/core/gnunet-service-core_kx.c:1648 #, fuzzy msgid "# bytes dropped (ancient message)" msgstr "# byte kastade via UDP (utgående)" -#: src/core/gnunet-service-core_kx.c:1653 +#: src/core/gnunet-service-core_kx.c:1656 #, fuzzy msgid "# bytes of payload decrypted" msgstr "# byte dekrypterade" -#: src/core/gnunet-service-core_sessions.c:266 -#: src/core/gnunet-service-core_sessions.c:356 +#: src/core/gnunet-service-core_sessions.c:260 +#: src/core/gnunet-service-core_sessions.c:350 #: src/dht/gnunet-service-dht_neighbours.c:733 #: src/dht/gnunet-service-dht_neighbours.c:795 #: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1520 #: src/topology/gnunet-daemon-topology.c:612 -#: src/topology/gnunet-daemon-topology.c:714 -#: src/transport/gnunet-service-transport_neighbours.c:719 -#: src/transport/gnunet-service-transport_neighbours.c:727 -#, fuzzy -msgid "# peers connected" -msgstr "# av anslutna parter" - -#: src/core/gnunet-service-core_sessions.c:302 -msgid "# type map refreshes sent" -msgstr "" - -#: src/core/gnunet-service-core_sessions.c:422 -#, fuzzy -msgid "# outdated typemap confirmations received" -msgstr "Kunde inte spara konfiguration!" - -#: src/core/gnunet-service-core_sessions.c:439 -#, fuzzy -msgid "# valid typemap confirmations received" -msgstr "Kunde inte spara konfiguration!" - -#: src/core/gnunet-service-core_typemap.c:169 -#: src/core/gnunet-service-core_typemap.c:181 -#, fuzzy -msgid "# type maps received" -msgstr "# krypterade PONG-meddelanden mottagna" - -#: src/core/gnunet-service-core_typemap.c:212 -msgid "# updates to my type map" -msgstr "" - -#: src/credential/credential_misc.c:88 -#, fuzzy, c-format -msgid "Unable to parse CRED record string `%s'\n" -msgstr "Misslyckades att läsa kompislista från \"%s\"\n" - -#: src/credential/gnunet-credential.c:278 src/namestore/gnunet-namestore.c:776 -#: src/namestore/plugin_rest_namestore.c:1009 -#, fuzzy, c-format -msgid "Ego `%s' not known to identity service\n" -msgstr "\"%s\": okänd tjänst: %s\n" - -#: src/credential/gnunet-credential.c:294 -#: src/credential/gnunet-credential.c:446 -#, fuzzy, c-format -msgid "Issuer public key `%s' is not well-formed\n" -msgstr "Ogiltigt argument: \"%s\"\n" - -#: src/credential/gnunet-credential.c:375 -#: src/credential/gnunet-credential.c:435 -#, fuzzy, c-format -msgid "Issuer public key not well-formed\n" -msgstr "Ogiltigt argument: \"%s\"\n" - -#: src/credential/gnunet-credential.c:386 -#: src/credential/gnunet-credential.c:455 -#, fuzzy, c-format -msgid "Failed to connect to CREDENTIAL\n" -msgstr "Misslyckades att ansluta till gnunetd.\n" - -#: src/credential/gnunet-credential.c:392 -#, c-format -msgid "You must provide issuer the attribute\n" -msgstr "" - -#: src/credential/gnunet-credential.c:399 -#, c-format -msgid "ego required\n" -msgstr "" - -#: src/credential/gnunet-credential.c:415 -#, c-format -msgid "Subject public key needed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:426 -#, fuzzy, c-format -msgid "Subject public key `%s' is not well-formed\n" -msgstr "Ogiltigt argument: \"%s\"\n" - -#: src/credential/gnunet-credential.c:461 -#, c-format -msgid "You must provide issuer and subject attributes\n" -msgstr "" - -#: src/credential/gnunet-credential.c:511 -#, c-format -msgid "Issuer ego required\n" -msgstr "" - -#: src/credential/gnunet-credential.c:523 -#, c-format -msgid "Please specify name to lookup, subject key and issuer key!\n" -msgstr "" - -#: src/credential/gnunet-credential.c:543 -msgid "create credential" -msgstr "" - -#: src/credential/gnunet-credential.c:547 -msgid "verify credential against attribute" -msgstr "" - -#: src/credential/gnunet-credential.c:552 -#, fuzzy -msgid "The public key of the subject to lookup the credential for" -msgstr "ange prioritet för innehållet" - -#: src/credential/gnunet-credential.c:557 -msgid "The name of the credential presented by the subject" -msgstr "" - -#: src/credential/gnunet-credential.c:562 -#, fuzzy -msgid "The public key of the authority to verify the credential against" -msgstr "ange prioritet för innehållet" - -#: src/credential/gnunet-credential.c:567 -#, fuzzy -msgid "The ego to use" -msgstr "meddelandestorlek" - -#: src/credential/gnunet-credential.c:572 -msgid "The issuer attribute to verify against or to issue" -msgstr "" - -#: src/credential/gnunet-credential.c:577 -msgid "The time to live for the credential" -msgstr "" +#: src/topology/gnunet-daemon-topology.c:714 +#: src/transport/gnunet-service-transport_neighbours.c:719 +#: src/transport/gnunet-service-transport_neighbours.c:727 +#, fuzzy +msgid "# peers connected" +msgstr "# av anslutna parter" -#: src/credential/gnunet-credential.c:581 -msgid "collect credentials" +#: src/core/gnunet-service-core_sessions.c:296 +msgid "# type map refreshes sent" msgstr "" -#: src/credential/gnunet-credential.c:595 +#: src/core/gnunet-service-core_sessions.c:416 #, fuzzy -msgid "GNUnet credential resolver tool" -msgstr "Spåra GNUnets nätverkstopologi." - -#: src/credential/gnunet-service-credential.c:1204 -#: src/gns/gnunet-gns-helper-service-w32.c:727 src/gns/gnunet-gns.c:355 -#, fuzzy, c-format -msgid "Failed to connect to GNS\n" -msgstr "Misslyckades att ansluta till gnunetd.\n" - -#: src/credential/gnunet-service-credential.c:1210 -#: src/namestore/gnunet-namestore-fcfsd.c:1034 -#: src/namestore/gnunet-namestore.c:802 -#: src/namestore/plugin_rest_namestore.c:1022 -#, fuzzy, c-format -msgid "Failed to connect to namestore\n" -msgstr "Misslyckades att ansluta till gnunetd.\n" +msgid "# outdated typemap confirmations received" +msgstr "Kunde inte spara konfiguration!" -#: src/credential/plugin_gnsrecord_credential.c:186 -#, fuzzy, c-format -msgid "Unable to parse ATTR record string `%s'\n" -msgstr "Misslyckades att läsa kompislista från \"%s\"\n" +#: src/core/gnunet-service-core_sessions.c:433 +#, fuzzy +msgid "# valid typemap confirmations received" +msgstr "Kunde inte spara konfiguration!" -#: src/credential/plugin_rest_credential.c:1155 src/gns/plugin_rest_gns.c:668 +#: src/core/gnunet-service-core_typemap.c:169 +#: src/core/gnunet-service-core_typemap.c:181 #, fuzzy -msgid "GNS REST API initialized\n" -msgstr " Anslutning misslyckades\n" +msgid "# type maps received" +msgstr "# krypterade PONG-meddelanden mottagna" + +#: src/core/gnunet-service-core_typemap.c:212 +msgid "# updates to my type map" +msgstr "" #: src/datacache/datacache.c:119 src/datacache/datacache.c:294 #: src/datastore/gnunet-service-datastore.c:757 @@ -1673,9 +1541,8 @@ msgstr "" #: src/datacache/plugin_datacache_sqlite.c:122 #: src/datastore/plugin_datastore_mysql.c:892 #: src/datastore/plugin_datastore_sqlite.c:58 -#: src/datastore/plugin_datastore_sqlite.c:66 -#: src/identity-provider/plugin_identity_provider_sqlite.c:52 src/my/my.c:80 -#: src/my/my.c:92 src/mysql/mysql.c:42 src/mysql/mysql.c:49 +#: src/datastore/plugin_datastore_sqlite.c:66 src/my/my.c:80 src/my/my.c:92 +#: src/mysql/mysql.c:42 src/mysql/mysql.c:49 #: src/namecache/plugin_namecache_sqlite.c:53 #: src/namestore/plugin_namestore_sqlite.c:53 #: src/peerstore/plugin_peerstore_sqlite.c:52 @@ -1693,7 +1560,6 @@ msgstr "\"%s\" misslyckades vid %s:%d med fel: %s\n" #: src/datacache/plugin_datacache_sqlite.c:817 #: src/datastore/plugin_datastore_sqlite.c:456 -#: src/identity-provider/plugin_identity_provider_sqlite.c:336 #: src/namecache/plugin_namecache_sqlite.c:296 #: src/namestore/plugin_namestore_sqlite.c:355 msgid "Tried to close sqlite without finalizing all prepared statements.\n" @@ -1718,7 +1584,7 @@ msgstr "" msgid "# queue entries created" msgstr "# PING-meddelanden skapade" -#: src/datastore/datastore_api.c:740 +#: src/datastore/datastore_api.c:760 #, fuzzy msgid "# status messages received" msgstr "# krypterade PONG-meddelanden mottagna" @@ -1728,36 +1594,36 @@ msgstr "# krypterade PONG-meddelanden mottagna" msgid "# Results received" msgstr "# byte mottogs via TCP" -#: src/datastore/datastore_api.c:941 +#: src/datastore/datastore_api.c:920 #, fuzzy msgid "# datastore connections (re)created" msgstr "Nätverksanslutning" -#: src/datastore/datastore_api.c:1055 +#: src/datastore/datastore_api.c:1034 msgid "# PUT requests executed" msgstr "" -#: src/datastore/datastore_api.c:1116 +#: src/datastore/datastore_api.c:1095 msgid "# RESERVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1181 +#: src/datastore/datastore_api.c:1160 msgid "# RELEASE RESERVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1259 +#: src/datastore/datastore_api.c:1238 msgid "# REMOVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1319 +#: src/datastore/datastore_api.c:1298 msgid "# GET REPLICATION requests executed" msgstr "" -#: src/datastore/datastore_api.c:1381 +#: src/datastore/datastore_api.c:1360 msgid "# GET ZERO ANONYMITY requests executed" msgstr "" -#: src/datastore/datastore_api.c:1462 +#: src/datastore/datastore_api.c:1441 msgid "# GET requests executed" msgstr "" @@ -2036,7 +1902,6 @@ msgid "`%s' failed at %s:%u with error: %s" msgstr "\"%s\" misslyckades vid %s:%d med fel: %s\n" #: src/datastore/plugin_datastore_sqlite.c:271 -#: src/identity-provider/plugin_identity_provider_sqlite.c:212 #: src/namecache/plugin_namecache_sqlite.c:194 #: src/namestore/plugin_namestore_sqlite.c:222 #: src/peerstore/plugin_peerstore_sqlite.c:535 @@ -2061,7 +1926,6 @@ msgid "" msgstr "" #: src/datastore/plugin_datastore_sqlite.c:1337 -#: src/identity-provider/plugin_identity_provider_sqlite.c:711 #: src/namecache/plugin_namecache_sqlite.c:603 #: src/namestore/plugin_namestore_sqlite.c:802 msgid "Sqlite database running\n" @@ -2129,6 +1993,52 @@ msgstr "" msgid "Prints all packets that go through the DHT." msgstr "" +#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:253 +#, fuzzy, c-format +msgid "Exiting as the number of peers is %u\n" +msgstr "Maximalt antal chattklienter uppnått.\n" + +#: src/dht/gnunet_dht_profiler.c:1188 +#, fuzzy +msgid "number of peers to start" +msgstr "antal iterationer" + +#: src/dht/gnunet_dht_profiler.c:1194 +msgid "" +"maximum number of times we try to search for successor circle formation (0 " +"for R5N)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 +#: src/testbed/gnunet-testbed-profiler.c:304 +msgid "name of the file with the login information for the testbed" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1206 +msgid "delay between rounds for collecting statistics (default: 30 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1212 +msgid "delay to start doing PUTs (default: 1 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1218 +msgid "delay to start doing GETs (default: 5 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1223 +msgid "replication degree for DHT PUTs" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1230 +msgid "timeout for DHT PUT and GET requests (default: 1 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1248 +#, fuzzy +msgid "Measure quality and performance of the DHT service." +msgstr "Kan inte tillgå tjänsten" + #: src/dht/gnunet-dht-put.c:120 #, fuzzy msgid "PUT request sent with key" @@ -2405,52 +2315,6 @@ msgstr "" msgid "# DHT requests combined" msgstr "# byte mottogs via TCP" -#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:255 -#, fuzzy, c-format -msgid "Exiting as the number of peers is %u\n" -msgstr "Maximalt antal chattklienter uppnått.\n" - -#: src/dht/gnunet_dht_profiler.c:1188 -#, fuzzy -msgid "number of peers to start" -msgstr "antal iterationer" - -#: src/dht/gnunet_dht_profiler.c:1194 -msgid "" -"maximum number of times we try to search for successor circle formation (0 " -"for R5N)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 -#: src/testbed/gnunet-testbed-profiler.c:305 -msgid "name of the file with the login information for the testbed" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1206 -msgid "delay between rounds for collecting statistics (default: 30 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1212 -msgid "delay to start doing PUTs (default: 1 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1218 -msgid "delay to start doing GETs (default: 5 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1223 -msgid "replication degree for DHT PUTs" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1230 -msgid "timeout for DHT PUT and GET requests (default: 1 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1248 -#, fuzzy -msgid "Measure quality and performance of the DHT service." -msgstr "Kan inte tillgå tjänsten" - #: src/dht/plugin_block_dht.c:187 #, fuzzy, c-format msgid "Block not of type %u\n" @@ -2996,7 +2860,7 @@ msgstr "Misslyckades att ta emot svar till \"%s\" meddelande från gnunetd\n" msgid "Failed to not connect to `%s' service.\n" msgstr "Misslyckades att initiera tjänsten \"%s\".\n" -#: src/fs/fs_misc.c:126 +#: src/fs/fs_misc.c:128 #, fuzzy, c-format msgid "Did not find mime type `%s' in extension list.\n" msgstr "Kunde inte hitta motpart \"%s\" i routingtabell!\n" @@ -3437,6 +3301,15 @@ msgid "" "chk/...)" msgstr "" +#: src/fs/gnunet-fs.c:119 +msgid "print a list of all indexed files" +msgstr "" + +#: src/fs/gnunet-fs.c:130 +#, fuzzy +msgid "Special file-sharing operations" +msgstr "Visa alla alternativ" + #: src/fs/gnunet-fs-profiler.c:211 msgid "run the experiment with COUNT peers" msgstr "" @@ -3453,15 +3326,6 @@ msgstr "" msgid "run a testbed to measure file-sharing performance" msgstr "" -#: src/fs/gnunet-fs.c:119 -msgid "print a list of all indexed files" -msgstr "" - -#: src/fs/gnunet-fs.c:130 -#, fuzzy -msgid "Special file-sharing operations" -msgstr "Visa alla alternativ" - #: src/fs/gnunet-publish.c:219 src/fs/gnunet-publish.c:231 #, c-format msgid "Publishing `%s' at %llu/%llu (%s remaining)\n" @@ -4149,11 +4013,22 @@ msgstr "" msgid "GNUnet DNS-to-GNS proxy (a DNS server)" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:602 -msgid "Not ready to process requests, lacking ego data\n" +#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 +#, c-format +msgid "Invalid typename specified, assuming `ANY'\n" +msgstr "" + +#: src/gns/gnunet-gns.c:252 +#, c-format +msgid "Please specify name to lookup!\n" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:701 src/gns/gnunet-gns.c:315 +#: src/gns/gnunet-gns.c:276 +#, c-format +msgid "Ego for `%s' not found, cannot perform lookup.\n" +msgstr "" + +#: src/gns/gnunet-gns.c:315 src/gns/gnunet-gns-helper-service-w32.c:701 #: src/gns/plugin_rest_gns.c:422 #, c-format msgid "" @@ -4161,6 +4036,53 @@ msgid "" "gns-import.sh?\n" msgstr "" +#: src/gns/gnunet-gns.c:355 src/gns/gnunet-gns-helper-service-w32.c:727 +#, fuzzy, c-format +msgid "Failed to connect to GNS\n" +msgstr "Misslyckades att ansluta till gnunetd.\n" + +#: src/gns/gnunet-gns.c:374 +#, c-format +msgid "Public key `%s' is not well-formed\n" +msgstr "" + +#: src/gns/gnunet-gns.c:428 +msgid "Lookup a record for the given name" +msgstr "" + +#: src/gns/gnunet-gns.c:434 +#, fuzzy +msgid "Specify the type of the record to lookup" +msgstr "ange prioritet för innehållet" + +#: src/gns/gnunet-gns.c:440 +#, fuzzy +msgid "Specify timeout for the lookup" +msgstr "ange prioritet för innehållet" + +#: src/gns/gnunet-gns.c:445 +msgid "No unneeded output" +msgstr "" + +#: src/gns/gnunet-gns.c:451 +#, fuzzy +msgid "Specify the public key of the zone to lookup the record in" +msgstr "ange prioritet för innehållet" + +#: src/gns/gnunet-gns.c:457 +#, fuzzy +msgid "Specify the name of the ego of the zone to lookup the record in" +msgstr "ange prioritet för innehållet" + +#: src/gns/gnunet-gns.c:476 +#, fuzzy +msgid "GNUnet GNS resolver tool" +msgstr "Spåra GNUnets nätverkstopologi." + +#: src/gns/gnunet-gns-helper-service-w32.c:602 +msgid "Not ready to process requests, lacking ego data\n" +msgstr "" + #: src/gns/gnunet-gns-helper-service-w32.c:739 #, fuzzy, c-format msgid "Failed to connect to identity service\n" @@ -4185,164 +4107,111 @@ msgstr "" msgid "%s failed at %s:%d: `%s'\n" msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" -#: src/gns/gnunet-gns-proxy.c:878 +#: src/gns/gnunet-gns-proxy.c:887 #, fuzzy, c-format msgid "Unsupported CURL SSL backend %d\n" msgstr "Kommando \"%s\" stöds ej. Avbryter.\n" -#: src/gns/gnunet-gns-proxy.c:901 +#: src/gns/gnunet-gns-proxy.c:910 #, fuzzy, c-format msgid "Failed to fetch CN from cert: %s\n" msgstr "Misslyckades att skicka HTTP-begäran till värd \"%s\": %s\n" -#: src/gns/gnunet-gns-proxy.c:924 +#: src/gns/gnunet-gns-proxy.c:933 #, fuzzy, c-format msgid "Failed to initialize DANE: %s\n" msgstr "Kunde inte initiera SQLite.\n" -#: src/gns/gnunet-gns-proxy.c:937 +#: src/gns/gnunet-gns-proxy.c:946 #, fuzzy, c-format msgid "Failed to parse DANE record: %s\n" msgstr "Misslyckades att skicka HTTP-begäran till värd \"%s\": %s\n" -#: src/gns/gnunet-gns-proxy.c:952 +#: src/gns/gnunet-gns-proxy.c:961 #, fuzzy, c-format msgid "Failed to verify TLS connection using DANE: %s\n" msgstr "Kunde inte spara konfigurationsfil \"%s\":" -#: src/gns/gnunet-gns-proxy.c:962 +#: src/gns/gnunet-gns-proxy.c:971 #, c-format msgid "Failed DANE verification failed with GnuTLS verify status code: %u\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:986 +#: src/gns/gnunet-gns-proxy.c:995 #, c-format msgid "SSL certificate subject name (%s) does not match `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1095 +#: src/gns/gnunet-gns-proxy.c:1104 #, c-format msgid "Cookie domain `%s' supplied by server is invalid\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1699 +#: src/gns/gnunet-gns-proxy.c:1709 #, fuzzy, c-format msgid "Unsupported HTTP method `%s'\n" msgstr "Kommando \"%s\" stöds ej. Avbryter.\n" -#: src/gns/gnunet-gns-proxy.c:2162 +#: src/gns/gnunet-gns-proxy.c:2172 #, fuzzy, c-format msgid "Unable to import private key from file `%s'\n" msgstr "Kunde inte skapa användarkonto:" -#: src/gns/gnunet-gns-proxy.c:2192 +#: src/gns/gnunet-gns-proxy.c:2202 #, fuzzy, c-format msgid "Unable to import certificate %s\n" msgstr "Kunde inte spara konfigurationsfil \"%s\":" -#: src/gns/gnunet-gns-proxy.c:2365 +#: src/gns/gnunet-gns-proxy.c:2375 #, fuzzy, c-format msgid "Failed to start HTTPS server for `%s'\n" msgstr "Misslyckades att starta samling.\n" -#: src/gns/gnunet-gns-proxy.c:2384 src/rest/gnunet-rest-server.c:533 +#: src/gns/gnunet-gns-proxy.c:2394 src/rest/gnunet-rest-server.c:533 #, fuzzy msgid "Failed to pass client to MHD\n" msgstr "Misslyckades att ansluta till gnunetd.\n" -#: src/gns/gnunet-gns-proxy.c:2704 +#: src/gns/gnunet-gns-proxy.c:2716 #, fuzzy, c-format msgid "Unsupported socks version %d\n" msgstr "Kommando \"%s\" stöds ej. Avbryter.\n" -#: src/gns/gnunet-gns-proxy.c:2733 +#: src/gns/gnunet-gns-proxy.c:2745 #, fuzzy, c-format msgid "Unsupported socks command %d\n" msgstr "Kommando \"%s\" stöds ej. Avbryter.\n" -#: src/gns/gnunet-gns-proxy.c:2751 src/gns/gnunet-gns-proxy.c:2780 +#: src/gns/gnunet-gns-proxy.c:2763 src/gns/gnunet-gns-proxy.c:2792 msgid "SSL connection to plain IPv4 address requested\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2830 +#: src/gns/gnunet-gns-proxy.c:2842 #, fuzzy, c-format msgid "Unsupported socks address type %d\n" msgstr "Kommando \"%s\" stöds ej. Avbryter.\n" -#: src/gns/gnunet-gns-proxy.c:3165 src/gns/gnunet-service-gns.c:403 -#, c-format -msgid "No ego configured for `%s`\n" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3226 -#, fuzzy, c-format -msgid "Failed to load SSL/TLS key and certificate from `%s'\n" -msgstr "Misslyckades att läsa kompislista från \"%s\"\n" - -#: src/gns/gnunet-gns-proxy.c:3269 -msgid "listen on specified port (default: 7777)" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3275 -msgid "pem file to use as CA" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3300 -msgid "GNUnet GNS proxy" -msgstr "" - -#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 -#, c-format -msgid "Invalid typename specified, assuming `ANY'\n" -msgstr "" - -#: src/gns/gnunet-gns.c:252 -#, c-format -msgid "Please specify name to lookup!\n" -msgstr "" - -#: src/gns/gnunet-gns.c:276 -#, c-format -msgid "Ego for `%s' not found, cannot perform lookup.\n" -msgstr "" - -#: src/gns/gnunet-gns.c:374 -#, c-format -msgid "Public key `%s' is not well-formed\n" -msgstr "" - -#: src/gns/gnunet-gns.c:428 -msgid "Lookup a record for the given name" -msgstr "" - -#: src/gns/gnunet-gns.c:434 -#, fuzzy -msgid "Specify the type of the record to lookup" -msgstr "ange prioritet för innehållet" - -#: src/gns/gnunet-gns.c:440 -#, fuzzy -msgid "Specify timeout for the lookup" -msgstr "ange prioritet för innehållet" - -#: src/gns/gnunet-gns.c:445 -msgid "No unneeded output" +#: src/gns/gnunet-gns-proxy.c:3177 src/gns/gnunet-service-gns.c:403 +#, c-format +msgid "No ego configured for `%s`\n" msgstr "" -#: src/gns/gnunet-gns.c:451 -#, fuzzy -msgid "Specify the public key of the zone to lookup the record in" -msgstr "ange prioritet för innehållet" +#: src/gns/gnunet-gns-proxy.c:3238 +#, fuzzy, c-format +msgid "Failed to load SSL/TLS key and certificate from `%s'\n" +msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/gns/gnunet-gns.c:457 -#, fuzzy -msgid "Specify the name of the ego of the zone to lookup the record in" -msgstr "ange prioritet för innehållet" +#: src/gns/gnunet-gns-proxy.c:3281 +msgid "listen on specified port (default: 7777)" +msgstr "" -#: src/gns/gnunet-gns.c:476 -#, fuzzy -msgid "GNUnet GNS resolver tool" -msgstr "Spåra GNUnets nätverkstopologi." +#: src/gns/gnunet-gns-proxy.c:3287 +msgid "pem file to use as CA" +msgstr "" + +#: src/gns/gnunet-gns-proxy.c:3312 +msgid "GNUnet GNS proxy" +msgstr "" #: src/gns/gnunet-service-gns.c:442 #, fuzzy @@ -4408,35 +4277,45 @@ msgstr "" msgid "Hostname `%s' is not well-formed, resolution fails\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:179 +#: src/gns/plugin_gnsrecord_gns.c:203 #, fuzzy, c-format msgid "Unable to parse PKEY record `%s'\n" msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/gns/plugin_gnsrecord_gns.c:208 +#: src/gns/plugin_gnsrecord_gns.c:232 #, fuzzy, c-format msgid "Unable to parse GNS2DNS record `%s'\n" msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/gns/plugin_gnsrecord_gns.c:229 +#: src/gns/plugin_gnsrecord_gns.c:253 #, fuzzy, c-format msgid "Failed to serialize GNS2DNS record with value `%s'\n" msgstr "Kunde inte tolka konfigurationsfil \"%s\".\n" -#: src/gns/plugin_gnsrecord_gns.c:252 +#: src/gns/plugin_gnsrecord_gns.c:276 #, fuzzy, c-format msgid "Unable to parse VPN record string `%s'\n" msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/gns/plugin_gnsrecord_gns.c:288 +#: src/gns/plugin_gnsrecord_gns.c:312 #, fuzzy, c-format msgid "Unable to parse BOX record string `%s'\n" msgstr "Misslyckades att läsa kompislista från \"%s\"\n" +#: src/gns/plugin_gnsrecord_gns.c:360 +#, fuzzy, c-format +msgid "Unable to parse REVERSE record string `%s'\n" +msgstr "Misslyckades att läsa kompislista från \"%s\"\n" + #: src/gns/plugin_rest_gns.c:384 msgid "Ego for not found, cannot perform lookup.\n" msgstr "" +#: src/gns/plugin_rest_gns.c:668 +#, fuzzy +msgid "GNS REST API initialized\n" +msgstr " Anslutning misslyckades\n" + #: src/gnsrecord/plugin_gnsrecord_dns.c:359 #, fuzzy, c-format msgid "Unable to parse IPv4 address `%s'\n" @@ -4542,37 +4421,37 @@ msgstr "Fel vid skapandet av användare" msgid "Modified %u addresses, wrote %u bytes\n" msgstr "" -#: src/hello/hello.c:1103 +#: src/hello/hello.c:1110 #, fuzzy msgid "Failed to parse HELLO message: missing expiration time\n" msgstr "Kunde inte spara konfiguration!" -#: src/hello/hello.c:1112 +#: src/hello/hello.c:1119 #, fuzzy msgid "Failed to parse HELLO message: invalid expiration time\n" msgstr "Kunde inte spara konfiguration!" -#: src/hello/hello.c:1122 +#: src/hello/hello.c:1129 #, fuzzy msgid "Failed to parse HELLO message: malformed\n" msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/hello/hello.c:1133 +#: src/hello/hello.c:1140 #, fuzzy msgid "Failed to parse HELLO message: missing transport plugin\n" msgstr "Kunde inte slå upp \"%s\": %s\n" -#: src/hello/hello.c:1151 +#: src/hello/hello.c:1158 #, c-format msgid "Plugin `%s' not found, skipping address\n" msgstr "" -#: src/hello/hello.c:1159 +#: src/hello/hello.c:1166 #, c-format msgid "Plugin `%s' does not support URIs yet\n" msgstr "" -#: src/hello/hello.c:1174 +#: src/hello/hello.c:1181 #, fuzzy, c-format msgid "Failed to parse `%s' as an address for plugin `%s'\n" msgstr "Misslyckades att binda till UDP-port %d.\n" @@ -4822,7 +4701,7 @@ msgid "# hostlist advertisements send" msgstr "" #: src/hostlist/gnunet-daemon-hostlist_server.c:679 -#: src/transport/gnunet-service-transport.c:2803 +#: src/transport/gnunet-service-transport.c:2815 #, fuzzy msgid "Could not access PEERINFO service. Exiting.\n" msgstr "Kunde inte komma åt namnrymdsinformation.\n" @@ -4867,53 +4746,6 @@ msgstr "\"%s\" är inte tillgänglig." msgid "Could not start hostlist HTTP server on port %u\n" msgstr "" -#: src/identity-provider/gnunet-idp.c:348 -#, fuzzy -msgid "Ego is required\n" -msgstr "%s: flagga \"%s\" är tvetydig\n" - -#: src/identity-provider/gnunet-idp.c:370 -msgid "Add attribute" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:376 -msgid "Attribute value" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:381 -msgid "Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:386 -msgid "Audience (relying party)" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:390 -msgid "List attributes for Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:395 -msgid "Issue a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:400 -msgid "Consume a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:405 -msgid "Revoke a ticket" -msgstr "" - -#: src/identity-provider/identity_provider_api.c:429 -#, fuzzy -msgid "failed to store record\n" -msgstr "Misslyckades att starta samling.\n" - -#: src/identity-provider/plugin_rest_identity_provider.c:1175 -#, fuzzy -msgid "Identity Provider REST API initialized\n" -msgstr " Anslutning misslyckades\n" - #: src/identity/gnunet-identity.c:179 #, fuzzy, c-format msgid "Failed to create ego: %s\n" @@ -5001,11 +4833,34 @@ msgstr "Kunde inte spara konfigurationsfil \"%s\":" msgid "Failed to create directory `%s' for storing egos\n" msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/identity/plugin_rest_identity.c:964 +#: src/identity/plugin_rest_identity.c:967 #, fuzzy msgid "Identity REST API initialized\n" msgstr " Anslutning misslyckades\n" +#: src/identity-provider/gnunet-identity-token.c:66 +#, fuzzy +msgid "Option `-t' is required\n" +msgstr "%s: flagga \"%s\" är tvetydig\n" + +#: src/identity-provider/gnunet-identity-token.c:77 +#, fuzzy, c-format +msgid "Token `%s' is malformed\n" +msgstr "Ogiltigt argument: \"%s\"\n" + +#: src/identity-provider/gnunet-identity-token.c:166 +msgid "GNUid token" +msgstr "" + +#: src/identity-provider/gnunet-identity-token.c:171 +msgid "Print token contents" +msgstr "" + +#: src/identity-provider/plugin_rest_identity_provider.c:1166 +#, fuzzy +msgid "Identity Token REST API initialized\n" +msgstr " Anslutning misslyckades\n" + #: src/json/json.c:119 #, fuzzy, c-format msgid "Failed to parse JSON in option `%s': %s (%s)\n" @@ -5106,66 +4961,6 @@ msgstr "Kunde inte skapa namnrymd \"%s\" (existerar?).\n" msgid "flat plugin running\n" msgstr "" -#: src/namestore/gnunet-namestore-fcfsd.c:508 -#, fuzzy, c-format -msgid "Unsupported form value `%s'\n" -msgstr "Kommando \"%s\" stöds ej. Avbryter.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:535 -#, fuzzy, c-format -msgid "Failed to create record for domain `%s': %s\n" -msgstr "Kunde inte tolka konfigurationsfil \"%s\".\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:555 -msgid "Error when mapping zone to name\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:585 -#, c-format -msgid "Found existing name `%s' for the given key\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:662 -#, c-format -msgid "Found %u existing records for domain `%s'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:718 -#, fuzzy, c-format -msgid "Failed to create page for `%s'\n" -msgstr "Kunde inte skapa namnrymd \"%s\" (existerar?).\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:734 -#, fuzzy, c-format -msgid "Failed to setup post processor for `%s'\n" -msgstr "Misslyckades att läsa kompislista från \"%s\"\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:770 -msgid "Domain name must not contain `.'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:778 -msgid "Domain name must not contain `+'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:974 -msgid "No ego configured for `fcfsd` subsystem\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:1000 -#, fuzzy -msgid "Failed to start HTTP server\n" -msgstr "Misslyckades att starta samling.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1042 -#, fuzzy -msgid "Failed to connect to identity\n" -msgstr "Misslyckades att ansluta till gnunetd.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1074 -msgid "GNU Name System First Come First Serve name registration service" -msgstr "" - #: src/namestore/gnunet-namestore.c:301 #, fuzzy, c-format msgid "Adding record failed: %s\n" @@ -5174,7 +4969,7 @@ msgstr "" "Fel vid uppladdning av fil: %s\n" #: src/namestore/gnunet-namestore.c:330 -#: src/namestore/plugin_rest_namestore.c:567 +#: src/namestore/plugin_rest_namestore.c:562 #, fuzzy, c-format msgid "Deleting record failed, record does not exist%s%s\n" msgstr "" @@ -5182,7 +4977,7 @@ msgstr "" "Fel vid uppladdning av fil: %s\n" #: src/namestore/gnunet-namestore.c:337 -#: src/namestore/plugin_rest_namestore.c:576 +#: src/namestore/plugin_rest_namestore.c:571 #, fuzzy, c-format msgid "Deleting record failed%s%s\n" msgstr "" @@ -5202,7 +4997,7 @@ msgid "Records already exist under `%s', cannot add `%s' record.\n" msgstr "" #: src/namestore/gnunet-namestore.c:698 -#: src/namestore/plugin_rest_namestore.c:602 +#: src/namestore/plugin_rest_namestore.c:597 #, c-format msgid "There are no records under label `%s' that could be deleted.\n" msgstr "" @@ -5213,11 +5008,24 @@ msgid "" "There are no records under label `%s' that match the request for deletion.\n" msgstr "" +#: src/namestore/gnunet-namestore.c:776 +#: src/namestore/plugin_rest_namestore.c:1004 +#, fuzzy, c-format +msgid "Ego `%s' not known to identity service\n" +msgstr "\"%s\": okänd tjänst: %s\n" + #: src/namestore/gnunet-namestore.c:791 #, c-format msgid "No options given\n" msgstr "" +#: src/namestore/gnunet-namestore.c:802 +#: src/namestore/gnunet-namestore-fcfsd.c:1034 +#: src/namestore/plugin_rest_namestore.c:1017 +#, fuzzy +msgid "Failed to connect to namestore\n" +msgstr "Misslyckades att ansluta till gnunetd.\n" + #: src/namestore/gnunet-namestore.c:810 src/namestore/gnunet-namestore.c:819 #: src/namestore/gnunet-namestore.c:838 src/namestore/gnunet-namestore.c:861 #: src/namestore/gnunet-namestore.c:915 @@ -5231,14 +5039,14 @@ msgid "add" msgstr "" #: src/namestore/gnunet-namestore.c:829 -#: src/namestore/plugin_rest_namestore.c:676 +#: src/namestore/plugin_rest_namestore.c:671 #, fuzzy, c-format msgid "Unsupported type `%s'\n" msgstr "Kommando \"%s\" stöds ej. Avbryter.\n" #: src/namestore/gnunet-namestore.c:851 -#: src/namestore/plugin_rest_namestore.c:694 -#: src/namestore/plugin_rest_namestore.c:734 +#: src/namestore/plugin_rest_namestore.c:689 +#: src/namestore/plugin_rest_namestore.c:729 #, fuzzy, c-format msgid "Value `%s' invalid for record type `%s'\n" msgstr "%s: symbolvärde \"%s\" ogiltigt för %s\n" @@ -5268,13 +5076,13 @@ msgid "Invalid nick `%s'\n" msgstr "Ogiltiga argument: " #: src/namestore/gnunet-namestore.c:1051 -#: src/namestore/plugin_rest_namestore.c:1052 +#: src/namestore/plugin_rest_namestore.c:1047 #, fuzzy, c-format msgid "No default ego configured in identity service\n" msgstr "\"%s\": okänd tjänst: %s\n" #: src/namestore/gnunet-namestore.c:1108 -#: src/namestore/plugin_rest_namestore.c:1148 +#: src/namestore/plugin_rest_namestore.c:1143 #, fuzzy, c-format msgid "Cannot connect to identity service\n" msgstr "Kunde inte ansluta till gnunetd.\n" @@ -5338,6 +5146,66 @@ msgstr "" msgid "name of the ego controlling the zone" msgstr "Visa värde av alternativet" +#: src/namestore/gnunet-namestore-fcfsd.c:508 +#, fuzzy, c-format +msgid "Unsupported form value `%s'\n" +msgstr "Kommando \"%s\" stöds ej. Avbryter.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:535 +#, fuzzy, c-format +msgid "Failed to create record for domain `%s': %s\n" +msgstr "Kunde inte tolka konfigurationsfil \"%s\".\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:555 +msgid "Error when mapping zone to name\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:585 +#, c-format +msgid "Found existing name `%s' for the given key\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:662 +#, c-format +msgid "Found %u existing records for domain `%s'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:718 +#, fuzzy, c-format +msgid "Failed to create page for `%s'\n" +msgstr "Kunde inte skapa namnrymd \"%s\" (existerar?).\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:734 +#, fuzzy, c-format +msgid "Failed to setup post processor for `%s'\n" +msgstr "Misslyckades att läsa kompislista från \"%s\"\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:770 +msgid "Domain name must not contain `.'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:778 +msgid "Domain name must not contain `+'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:974 +msgid "No ego configured for `fcfsd` subsystem\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:1000 +#, fuzzy +msgid "Failed to start HTTP server\n" +msgstr "Misslyckades att starta samling.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1042 +#, fuzzy +msgid "Failed to connect to identity\n" +msgstr "Misslyckades att ansluta till gnunetd.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1074 +msgid "GNU Name System First Come First Serve name registration service" +msgstr "" + #: src/namestore/gnunet-service-namestore.c:615 #, fuzzy, c-format msgid "Failed to replicate block in namecache: %s\n" @@ -5351,7 +5219,7 @@ msgstr "" msgid "flat file database running\n" msgstr "" -#: src/namestore/plugin_rest_namestore.c:1193 +#: src/namestore/plugin_rest_namestore.c:1188 #, fuzzy msgid "Namestore REST API initialized\n" msgstr " Anslutning misslyckades\n" @@ -5634,49 +5502,104 @@ msgstr "" msgid "Failed to start %s\n" msgstr "Misslyckades att starta samling.\n" -#: src/nat/gnunet-service-nat_mini.c:196 -msgid "`external-ip' command not found\n" +#: src/nat/gnunet-service-nat_mini.c:196 +msgid "`external-ip' command not found\n" +msgstr "" + +#: src/nat/gnunet-service-nat_mini.c:656 +msgid "`upnpc' command not found\n" +msgstr "" + +#: src/nse/gnunet-nse.c:122 +#, fuzzy +msgid "Show network size estimates from NSE service." +msgstr "# byte mottogs via TCP" + +#: src/nse/gnunet-nse-profiler.c:842 +#, fuzzy +msgid "limit to the number of connections to NSE services, 0 for none" +msgstr "Misslyckades att ansluta till gnunetd.\n" + +#: src/nse/gnunet-nse-profiler.c:847 +msgid "name of the file for writing connection information and statistics" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:859 +msgid "name of the file for writing the main results" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:866 +msgid "Number of peers to run in each round, separated by commas" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:877 +msgid "delay between rounds" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:886 +#, fuzzy +msgid "Measure quality and performance of the NSE service." +msgstr "Kan inte tillgå tjänsten" + +#: src/nse/gnunet-service-nse.c:1534 +#: src/revocation/gnunet-service-revocation.c:840 src/util/gnunet-scrypt.c:276 +msgid "Value is too large.\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:178 +#, fuzzy, c-format +msgid "Removing expired address of transport `%s'\n" +msgstr "Tillgängliga transport(er): %s\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:310 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s': %s\n" +msgstr "Misslyckades att läsa kompislista från \"%s\"\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:331 +#: src/peerinfo/gnunet-service-peerinfo.c:362 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s'\n" +msgstr "Misslyckades att läsa kompislista från \"%s\"\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:446 +msgid "# peers known" msgstr "" -#: src/nat/gnunet-service-nat_mini.c:656 -msgid "`upnpc' command not found\n" +#: src/peerinfo/gnunet-service-peerinfo.c:489 +#, c-format +msgid "" +"File `%s' in directory `%s' does not match naming convention. Removed.\n" msgstr "" -#: src/nse/gnunet-nse-profiler.c:842 -#, fuzzy -msgid "limit to the number of connections to NSE services, 0 for none" -msgstr "Misslyckades att ansluta till gnunetd.\n" +#: src/peerinfo/gnunet-service-peerinfo.c:655 +#, fuzzy, c-format +msgid "Scanning directory `%s'\n" +msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/nse/gnunet-nse-profiler.c:847 -msgid "name of the file for writing connection information and statistics" +#: src/peerinfo/gnunet-service-peerinfo.c:663 +#, c-format +msgid "Still no peers found in `%s'!\n" msgstr "" -#: src/nse/gnunet-nse-profiler.c:859 -msgid "name of the file for writing the main results" -msgstr "" +#: src/peerinfo/gnunet-service-peerinfo.c:1080 +#, fuzzy, c-format +msgid "Cleaning up directory `%s'\n" +msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/nse/gnunet-nse-profiler.c:866 -msgid "Number of peers to run in each round, separated by commas" +#: src/peerinfo/gnunet-service-peerinfo.c:1409 +#, c-format +msgid "Importing HELLOs from `%s'\n" msgstr "" -#: src/nse/gnunet-nse-profiler.c:877 -msgid "delay between rounds" +#: src/peerinfo/gnunet-service-peerinfo.c:1422 +msgid "Skipping import of included HELLOs\n" msgstr "" -#: src/nse/gnunet-nse-profiler.c:886 -#, fuzzy -msgid "Measure quality and performance of the NSE service." -msgstr "Kan inte tillgå tjänsten" - -#: src/nse/gnunet-nse.c:122 +#: src/peerinfo/peerinfo_api.c:220 #, fuzzy -msgid "Show network size estimates from NSE service." -msgstr "# byte mottogs via TCP" - -#: src/nse/gnunet-service-nse.c:1534 -#: src/revocation/gnunet-service-revocation.c:838 src/util/gnunet-scrypt.c:276 -msgid "Value is too large.\n" -msgstr "" +msgid "Failed to receive response from `PEERINFO' service." +msgstr "Misslyckades att ta emot svar till \"%s\" meddelande från gnunetd\n" #: src/peerinfo-tool/gnunet-peerinfo.c:239 #, fuzzy, c-format @@ -5768,61 +5691,6 @@ msgstr "Testar transport(er) %s\n" msgid "Failed to load transport plugin for `%s'\n" msgstr "Kunde inte slå upp \"%s\": %s\n" -#: src/peerinfo/gnunet-service-peerinfo.c:178 -#, fuzzy, c-format -msgid "Removing expired address of transport `%s'\n" -msgstr "Tillgängliga transport(er): %s\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:310 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s': %s\n" -msgstr "Misslyckades att läsa kompislista från \"%s\"\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:331 -#: src/peerinfo/gnunet-service-peerinfo.c:362 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s'\n" -msgstr "Misslyckades att läsa kompislista från \"%s\"\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:446 -msgid "# peers known" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:489 -#, c-format -msgid "" -"File `%s' in directory `%s' does not match naming convention. Removed.\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:655 -#, fuzzy, c-format -msgid "Scanning directory `%s'\n" -msgstr "Misslyckades att läsa kompislista från \"%s\"\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:663 -#, c-format -msgid "Still no peers found in `%s'!\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1076 -#, fuzzy, c-format -msgid "Cleaning up directory `%s'\n" -msgstr "Misslyckades att läsa kompislista från \"%s\"\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1405 -#, c-format -msgid "Importing HELLOs from `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1418 -msgid "Skipping import of included HELLOs\n" -msgstr "" - -#: src/peerinfo/peerinfo_api.c:220 -#, fuzzy -msgid "Failed to receive response from `PEERINFO' service." -msgstr "Misslyckades att ta emot svar till \"%s\" meddelande från gnunetd\n" - #: src/peerstore/gnunet-peerstore.c:91 msgid "peerstore" msgstr "" @@ -6274,12 +6142,12 @@ msgstr "# sessionsnycklar accepterade" msgid "# revocation set unions completed" msgstr "# klartext PONG-meddelanden mottagna" -#: src/revocation/gnunet-service-revocation.c:524 -#: src/revocation/gnunet-service-revocation.c:771 +#: src/revocation/gnunet-service-revocation.c:525 +#: src/revocation/gnunet-service-revocation.c:773 msgid "SET service crashed, terminating revocation service\n" msgstr "" -#: src/revocation/gnunet-service-revocation.c:862 +#: src/revocation/gnunet-service-revocation.c:864 #, fuzzy msgid "Could not open revocation database file!" msgstr "Kunde inte ansluta till gnunetd.\n" @@ -6343,10 +6211,10 @@ msgstr "" msgid "Calculate the Vectorproduct with a GNUnet peer." msgstr "" -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #: src/scalarproduct/gnunet-service-scalarproduct_alice.c:1401 #: src/scalarproduct/gnunet-service-scalarproduct_bob.c:1345 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #, fuzzy msgid "Connect to CADET failed\n" msgstr " Anslutning misslyckades (fel?)\n" @@ -6565,7 +6433,7 @@ msgstr "\"%s\" misslyckades för fil \"%s\" vid %s:%d med fel: %s\n" msgid "Wrote %llu bytes of statistics to `%s'\n" msgstr "Ladda ner filer från GNUnet." -#: src/statistics/gnunet-service-statistics.c:1084 +#: src/statistics/gnunet-service-statistics.c:1086 #, fuzzy, c-format msgid "Loading %llu bytes of statistics from `%s'\n" msgstr "Ladda ner filer från GNUnet." @@ -6694,7 +6562,7 @@ msgid "Invalid argument `%s'; expecting unsigned int\n" msgstr "Ogiltigt argument: \"%s\"\n" #: src/testbed/generate-underlay-topology.c:342 -#: src/testbed/gnunet-testbed-profiler.c:284 +#: src/testbed/gnunet-testbed-profiler.c:283 msgid "create COUNT number of peers" msgstr "" @@ -6732,13 +6600,13 @@ msgid "" "deployments" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:231 src/testing/list-keys.c:46 -#: src/testing/testing.c:288 src/util/gnunet-ecc.c:301 +#: src/testbed/gnunet-daemon-testbed-underlay.c:233 src/testing/list-keys.c:46 +#: src/testing/testing.c:288 src/util/gnunet-ecc.c:306 #, c-format msgid "Incorrect hostkey file format: %s\n" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:469 +#: src/testbed/gnunet-daemon-testbed-underlay.c:471 msgid "Daemon to restrict underlay network in testbed deployments" msgstr "" @@ -6803,17 +6671,6 @@ msgstr "" msgid "%.s Unknown result code." msgstr "" -#: src/testbed/gnunet-testbed-profiler.c:290 -msgid "tolerate COUNT number of continious timeout failures" -msgstr "" - -#: src/testbed/gnunet-testbed-profiler.c:295 -msgid "" -"run profiler in non-interactive mode where upon testbed setup the profiler " -"does not wait for a keystroke but continues to run until a termination " -"signal is received" -msgstr "" - #: src/testbed/gnunet_testbed_mpi_spawn.c:118 #, fuzzy msgid "Waiting for child to exit.\n" @@ -6824,6 +6681,17 @@ msgstr "Väntar på att motparter ska ansluta (%u iterationer kvar)...\n" msgid "Spawning process `%s'\n" msgstr "Startade samling \"%s\".\n" +#: src/testbed/gnunet-testbed-profiler.c:289 +msgid "tolerate COUNT number of continious timeout failures" +msgstr "" + +#: src/testbed/gnunet-testbed-profiler.c:294 +msgid "" +"run profiler in non-interactive mode where upon testbed setup the profiler " +"does not wait for a keystroke but continues to run until a termination " +"signal is received" +msgstr "" + #: src/testbed/testbed_api.c:410 #, fuzzy, c-format msgid "Adding host %u failed with error: %s\n" @@ -7120,58 +6988,58 @@ msgstr "# krypterade PONG-meddelanden mottagna" msgid "GNUnet topology control" msgstr "" +#: src/transport/gnunet-service-transport_ats.c:141 +msgid "# Addresses given to ATS" +msgstr "" + #: src/transport/gnunet-service-transport.c:448 msgid "# messages dropped due to slow client" msgstr "" -#: src/transport/gnunet-service-transport.c:809 +#: src/transport/gnunet-service-transport.c:818 msgid "# bytes payload dropped (other peer was not connected)" msgstr "" -#: src/transport/gnunet-service-transport.c:1539 +#: src/transport/gnunet-service-transport.c:1551 #, fuzzy msgid "# bytes payload discarded due to not connected peer" msgstr "Nätverksannonsering avstängd i konfigurationen!\n" -#: src/transport/gnunet-service-transport.c:1699 +#: src/transport/gnunet-service-transport.c:1711 #, fuzzy msgid "# bytes total received" msgstr "# byte krypterade" -#: src/transport/gnunet-service-transport.c:1796 +#: src/transport/gnunet-service-transport.c:1808 #, fuzzy msgid "# bytes payload received" msgstr "# byte dekrypterade" -#: src/transport/gnunet-service-transport.c:2113 -#: src/transport/gnunet-service-transport.c:2585 +#: src/transport/gnunet-service-transport.c:2125 +#: src/transport/gnunet-service-transport.c:2597 msgid "# disconnects due to blacklist" msgstr "" -#: src/transport/gnunet-service-transport.c:2589 +#: src/transport/gnunet-service-transport.c:2601 #, fuzzy, c-format msgid "Disallowing connection to peer `%s' on transport %s\n" msgstr "Kunde inte slå upp \"%s\": %s\n" -#: src/transport/gnunet-service-transport.c:2697 +#: src/transport/gnunet-service-transport.c:2709 #, fuzzy, c-format msgid "Adding blacklisting entry for peer `%s'\n" msgstr "Motpart \"%s\" med pålitlighet %8u och adress \"%s\"\n" -#: src/transport/gnunet-service-transport.c:2706 +#: src/transport/gnunet-service-transport.c:2718 #, c-format msgid "Adding blacklisting entry for peer `%s':`%s'\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2771 +#: src/transport/gnunet-service-transport.c:2783 #, fuzzy msgid "Transport service is lacking key configuration settings. Exiting.\n" msgstr "GNUnet-konfiguration" -#: src/transport/gnunet-service-transport_ats.c:141 -msgid "# Addresses given to ATS" -msgstr "" - #: src/transport/gnunet-service-transport_hello.c:195 msgid "# refreshed my HELLO" msgstr "" @@ -7320,74 +7188,74 @@ msgstr "# PING-meddelanden skapade" msgid "SYN request from peer `%s' ignored due impending shutdown\n" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:2620 +#: src/transport/gnunet-service-transport_neighbours.c:2623 msgid "# Attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3102 +#: src/transport/gnunet-service-transport_neighbours.c:3105 #, fuzzy msgid "# SYN_ACK messages received" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/transport/gnunet-service-transport_neighbours.c:3110 +#: src/transport/gnunet-service-transport_neighbours.c:3113 #, fuzzy msgid "# unexpected SYN_ACK messages (no peer)" msgstr "skicka ANTAL meddelanden" -#: src/transport/gnunet-service-transport_neighbours.c:3128 -#: src/transport/gnunet-service-transport_neighbours.c:3152 +#: src/transport/gnunet-service-transport_neighbours.c:3131 +#: src/transport/gnunet-service-transport_neighbours.c:3155 #, fuzzy msgid "# unexpected SYN_ACK messages (not ready)" msgstr "skicka ANTAL meddelanden" -#: src/transport/gnunet-service-transport_neighbours.c:3164 +#: src/transport/gnunet-service-transport_neighbours.c:3167 #, fuzzy msgid "# unexpected SYN_ACK messages (waiting on ATS)" msgstr "skicka ANTAL meddelanden" -#: src/transport/gnunet-service-transport_neighbours.c:3189 +#: src/transport/gnunet-service-transport_neighbours.c:3192 msgid "# Successful attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3202 +#: src/transport/gnunet-service-transport_neighbours.c:3205 #, fuzzy msgid "# unexpected SYN_ACK messages (disconnecting)" msgstr "skicka ANTAL meddelanden" -#: src/transport/gnunet-service-transport_neighbours.c:3374 +#: src/transport/gnunet-service-transport_neighbours.c:3377 #, fuzzy msgid "# ACK messages received" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/transport/gnunet-service-transport_neighbours.c:3410 +#: src/transport/gnunet-service-transport_neighbours.c:3413 #, fuzzy msgid "# unexpected ACK messages" msgstr "# krypterade PONG-meddelanden skickade" -#: src/transport/gnunet-service-transport_neighbours.c:3498 +#: src/transport/gnunet-service-transport_neighbours.c:3501 #, fuzzy msgid "# quota messages ignored (malformed)" msgstr "# byte mottogs via TCP" -#: src/transport/gnunet-service-transport_neighbours.c:3505 +#: src/transport/gnunet-service-transport_neighbours.c:3508 #, fuzzy msgid "# QUOTA messages received" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/transport/gnunet-service-transport_neighbours.c:3545 +#: src/transport/gnunet-service-transport_neighbours.c:3548 msgid "# disconnect messages ignored (malformed)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3552 +#: src/transport/gnunet-service-transport_neighbours.c:3555 #, fuzzy msgid "# DISCONNECT messages received" msgstr "# krypterade PONG-meddelanden mottagna" -#: src/transport/gnunet-service-transport_neighbours.c:3563 +#: src/transport/gnunet-service-transport_neighbours.c:3566 msgid "# disconnect messages ignored (timestamp)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3697 +#: src/transport/gnunet-service-transport_neighbours.c:3700 #, fuzzy msgid "# disconnected from peer upon explicit request" msgstr "# av anslutna parter" @@ -7422,8 +7290,8 @@ msgstr "" #: src/transport/gnunet-service-transport_validation.c:491 #: src/transport/gnunet-service-transport_validation.c:677 -#: src/transport/gnunet-service-transport_validation.c:988 -#: src/transport/gnunet-service-transport_validation.c:1590 +#: src/transport/gnunet-service-transport_validation.c:997 +#: src/transport/gnunet-service-transport_validation.c:1609 msgid "# validations running" msgstr "" @@ -7448,101 +7316,61 @@ msgstr "" msgid "# address revalidations started" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1114 +#: src/transport/gnunet-service-transport_validation.c:1123 #, fuzzy msgid "# PING message for different peer received" msgstr "# PING-meddelanden skapade" -#: src/transport/gnunet-service-transport_validation.c:1165 +#: src/transport/gnunet-service-transport_validation.c:1174 #, c-format msgid "Plugin `%s' not available, cannot confirm having this address\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1178 +#: src/transport/gnunet-service-transport_validation.c:1187 msgid "# failed address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1181 +#: src/transport/gnunet-service-transport_validation.c:1190 #, c-format msgid "Address `%s' is not one of my addresses, not confirming PING\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1189 +#: src/transport/gnunet-service-transport_validation.c:1198 msgid "# successful address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1202 +#: src/transport/gnunet-service-transport_validation.c:1211 #, c-format msgid "" "Not confirming PING from peer `%s' with address `%s' since I cannot confirm " "having this address.\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1257 +#: src/transport/gnunet-service-transport_validation.c:1266 #, fuzzy, c-format msgid "Failed to create PONG signature for peer `%s'\n" msgstr "Kunde inte skapa namnrymd \"%s\" (existerar?).\n" -#: src/transport/gnunet-service-transport_validation.c:1308 +#: src/transport/gnunet-service-transport_validation.c:1317 msgid "# PONGs unicast via reliable transport" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1317 +#: src/transport/gnunet-service-transport_validation.c:1326 msgid "# PONGs multicast to all available addresses" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1480 +#: src/transport/gnunet-service-transport_validation.c:1499 msgid "# PONGs dropped, no matching pending validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1498 +#: src/transport/gnunet-service-transport_validation.c:1517 msgid "# PONGs dropped, signature expired" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1553 +#: src/transport/gnunet-service-transport_validation.c:1572 msgid "# validations succeeded" msgstr "" -#: src/transport/gnunet-transport-profiler.c:219 -#, c-format -msgid "%llu B in %llu ms == %.2f KB/s!\n" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:617 -msgid "send data to peer" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:621 -#, fuzzy -msgid "receive data from peer" -msgstr "# byte mottagna av typen %d" - -#: src/transport/gnunet-transport-profiler.c:626 -#, fuzzy -msgid "iterations" -msgstr "Visa alla alternativ" - -#: src/transport/gnunet-transport-profiler.c:631 -#, fuzzy -msgid "number of messages to send" -msgstr "antal meddelanden att använda per iteration" - -#: src/transport/gnunet-transport-profiler.c:636 -#, fuzzy -msgid "message size to use" -msgstr "meddelandestorlek" - -#: src/transport/gnunet-transport-profiler.c:641 -#: src/transport/gnunet-transport.c:1462 -msgid "peer identity" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:652 -#: src/transport/gnunet-transport.c:1482 -#, fuzzy -msgid "Direct access to transport service." -msgstr "Misslyckades att ansluta till gnunetd.\n" - #: src/transport/gnunet-transport.c:413 #, fuzzy, c-format msgid "Transmitted %llu bytes/s (%llu bytes in %s)\n" @@ -7682,6 +7510,11 @@ msgstr "Skriv ut information om GNUnets motparter." msgid "do not resolve hostnames" msgstr "Misslyckades att läsa kompislista från \"%s\"\n" +#: src/transport/gnunet-transport.c:1462 +#: src/transport/gnunet-transport-profiler.c:641 +msgid "peer identity" +msgstr "" + #: src/transport/gnunet-transport.c:1466 msgid "monitor plugin sessions" msgstr "" @@ -7690,6 +7523,41 @@ msgstr "" msgid "send data for benchmarking to the other peer (until CTRL-C)" msgstr "" +#: src/transport/gnunet-transport.c:1482 +#: src/transport/gnunet-transport-profiler.c:652 +#, fuzzy +msgid "Direct access to transport service." +msgstr "Misslyckades att ansluta till gnunetd.\n" + +#: src/transport/gnunet-transport-profiler.c:219 +#, c-format +msgid "%llu B in %llu ms == %.2f KB/s!\n" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:617 +msgid "send data to peer" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:621 +#, fuzzy +msgid "receive data from peer" +msgstr "# byte mottagna av typen %d" + +#: src/transport/gnunet-transport-profiler.c:626 +#, fuzzy +msgid "iterations" +msgstr "Visa alla alternativ" + +#: src/transport/gnunet-transport-profiler.c:631 +#, fuzzy +msgid "number of messages to send" +msgstr "antal meddelanden att använda per iteration" + +#: src/transport/gnunet-transport-profiler.c:636 +#, fuzzy +msgid "message size to use" +msgstr "meddelandestorlek" + #: src/transport/plugin_transport_http_client.c:1474 #: src/transport/plugin_transport_http_server.c:2312 #: src/transport/plugin_transport_http_server.c:3526 @@ -7977,6 +7845,21 @@ msgstr "" msgid "TCP transport advertises itself as being on port %llu\n" msgstr "" +#: src/transport/plugin_transport_udp_broadcasting.c:168 +#, fuzzy +msgid "# Multicast HELLO beacons received via UDP" +msgstr "# krypterade PONG-meddelanden mottagna" + +#: src/transport/plugin_transport_udp_broadcasting.c:548 +msgid "" +"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" +msgstr "" + +#: src/transport/plugin_transport_udp_broadcasting.c:565 +#, c-format +msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" +msgstr "" + #: src/transport/plugin_transport_udp.c:3366 #, c-format msgid "" @@ -8025,21 +7908,6 @@ msgstr "\"%s\" är inte tillgänglig." msgid "Failed to create UDP network sockets\n" msgstr "Kunde inte skapa namnrymd \"%s\" (existerar?).\n" -#: src/transport/plugin_transport_udp_broadcasting.c:168 -#, fuzzy -msgid "# Multicast HELLO beacons received via UDP" -msgstr "# krypterade PONG-meddelanden mottagna" - -#: src/transport/plugin_transport_udp_broadcasting.c:548 -msgid "" -"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" -msgstr "" - -#: src/transport/plugin_transport_udp_broadcasting.c:565 -#, c-format -msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" -msgstr "" - #: src/transport/plugin_transport_unix.c:1403 #, fuzzy, c-format msgid "Cannot create path to `%s'\n" @@ -8155,7 +8023,7 @@ msgid "" "`GNUNET_SERVER_receive_done' after %s\n" msgstr "" -#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2336 +#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2346 #, fuzzy, c-format msgid "Unknown address family %d\n" msgstr "Okänd operation \"%s\"\n" @@ -8231,19 +8099,19 @@ msgstr "Kan inte ändra användare/grupp till \"%s\": %s\n" msgid "do daemonize (detach from terminal)" msgstr "" -#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:244 +#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:255 #: src/util/service.c:1790 #, fuzzy, c-format msgid "Malformed configuration file `%s', exit ...\n" msgstr "Kunde inte spara konfigurationsfil \"%s\":" -#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:261 +#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:272 #: src/util/service.c:1801 #, fuzzy msgid "Malformed configuration, exit ...\n" msgstr "Kunde inte spara konfigurationsfil \"%s\":" -#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:256 +#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:267 #: src/util/service.c:1807 #, fuzzy, c-format msgid "Could not access configuration file `%s'\n" @@ -8284,7 +8152,7 @@ msgstr "" msgid "Metadata `%s' failed to deserialize" msgstr "" -#: src/util/client.c:882 +#: src/util/client.c:911 #, c-format msgid "Need a non-empty hostname for service `%s'.\n" msgstr "" @@ -8382,22 +8250,22 @@ msgid "" "%llu)\n" msgstr "" -#: src/util/crypto_ecc.c:777 +#: src/util/crypto_ecc.c:810 #, fuzzy, c-format msgid "ECC signing failed at %s:%d: %s\n" msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" -#: src/util/crypto_ecc.c:827 +#: src/util/crypto_ecc.c:860 #, fuzzy, c-format msgid "EdDSA signing failed at %s:%d: %s\n" msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" -#: src/util/crypto_ecc.c:901 +#: src/util/crypto_ecc.c:934 #, fuzzy, c-format msgid "ECDSA signature verification failed at %s:%d: %s\n" msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" -#: src/util/crypto_ecc.c:958 +#: src/util/crypto_ecc.c:991 #, fuzzy, c-format msgid "EdDSA signature verification failed at %s:%d: %s\n" msgstr "\"%s\" misslyckades vid %s:%d med fel: \"%s\".\n" @@ -8621,86 +8489,90 @@ msgstr "" msgid "Manipulate GNUnet configuration files" msgstr "skriv ut ett värde från konfigurationsfilen till standard ut" -#: src/util/gnunet-ecc.c:89 +#: src/util/gnunet-ecc.c:94 #, fuzzy, c-format msgid "Failed to open `%s': %s\n" msgstr "Misslyckades att leverera \"%s\" meddelande.\n" -#: src/util/gnunet-ecc.c:125 +#: src/util/gnunet-ecc.c:130 #, c-format msgid "Generating %u keys like %s, please wait" msgstr "" -#: src/util/gnunet-ecc.c:138 +#: src/util/gnunet-ecc.c:143 #, c-format msgid "Generating %u keys, please wait" msgstr "" -#: src/util/gnunet-ecc.c:179 +#: src/util/gnunet-ecc.c:184 #, fuzzy, c-format msgid "" "\n" "Failed to write to `%s': %s\n" msgstr "Fel vid %s:%d.\n" -#: src/util/gnunet-ecc.c:189 +#: src/util/gnunet-ecc.c:194 #, fuzzy, c-format msgid "" "\n" "Finished!\n" msgstr "Slutför" -#: src/util/gnunet-ecc.c:192 +#: src/util/gnunet-ecc.c:197 #, c-format msgid "" "\n" "Error, %u keys not generated\n" msgstr "" -#: src/util/gnunet-ecc.c:283 +#: src/util/gnunet-ecc.c:288 #, fuzzy, c-format msgid "Hostkeys file `%s' not found\n" msgstr "\"%s\" misslyckades: tabell hittades inte!\n" -#: src/util/gnunet-ecc.c:294 +#: src/util/gnunet-ecc.c:299 #, fuzzy, c-format msgid "Hostkeys file `%s' is empty\n" msgstr "antal meddelanden att använda per iteration" -#: src/util/gnunet-ecc.c:316 +#: src/util/gnunet-ecc.c:321 #, fuzzy, c-format msgid "Could not read hostkey file: %s\n" msgstr "Kunde inte skapa värdnyckel!\n" -#: src/util/gnunet-ecc.c:367 +#: src/util/gnunet-ecc.c:372 msgid "No hostkey file specified on command line\n" msgstr "" -#: src/util/gnunet-ecc.c:425 +#: src/util/gnunet-ecc.c:437 msgid "list keys included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:430 +#: src/util/gnunet-ecc.c:442 msgid "number of keys to list included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:435 +#: src/util/gnunet-ecc.c:447 msgid "create COUNT public-private key pairs (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:439 +#: src/util/gnunet-ecc.c:451 msgid "print the public key in ASCII format" msgstr "" -#: src/util/gnunet-ecc.c:443 +#: src/util/gnunet-ecc.c:455 +msgid "print the private key in ASCII format" +msgstr "" + +#: src/util/gnunet-ecc.c:459 msgid "print the public key in HEX format" msgstr "" -#: src/util/gnunet-ecc.c:447 +#: src/util/gnunet-ecc.c:463 msgid "print examples of ECC operations (used for compatibility testing)" msgstr "" -#: src/util/gnunet-ecc.c:463 +#: src/util/gnunet-ecc.c:479 #, fuzzy msgid "Manipulate GNUnet private ECC key files" msgstr "skriv ut ett värde från konfigurationsfilen till standard ut" @@ -8863,22 +8735,22 @@ msgstr "" "Du måste ange ett positivt nummer för \"%s\" i konfigurationen i sektion \"%s" "\".\n" -#: src/util/resolver_api.c:826 +#: src/util/resolver_api.c:827 #, fuzzy, c-format msgid "Timeout trying to resolve hostname `%s'.\n" msgstr "Misslyckades att läsa kompislista från \"%s\"\n" -#: src/util/resolver_api.c:839 +#: src/util/resolver_api.c:840 #, c-format msgid "Timeout trying to resolve IP address `%s'.\n" msgstr "" -#: src/util/resolver_api.c:1023 +#: src/util/resolver_api.c:1024 msgid "Resolver not configured correctly.\n" msgstr "" -#: src/util/resolver_api.c:1109 src/util/resolver_api.c:1132 -#: src/util/resolver_api.c:1146 +#: src/util/resolver_api.c:1110 src/util/resolver_api.c:1133 +#: src/util/resolver_api.c:1147 #, fuzzy, c-format msgid "Could not resolve our FQDN: %s\n" msgstr "Kunde inte slå upp \"%s\": %s\n" @@ -8888,7 +8760,7 @@ msgid "" "Could not bind to any of the ports I was supposed to, refusing to run!\n" msgstr "" -#: src/util/service.c:2081 +#: src/util/service.c:2091 #, c-format msgid "" "Processing code for message of type %u did not call " @@ -9074,65 +8946,65 @@ msgstr "" msgid "# ICMPv6 packets dropped (not allowed)" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2232 +#: src/vpn/gnunet-service-vpn.c:2235 #, fuzzy msgid "# Packets received from TUN interface" msgstr "Meddelande mottaget från klient är ogiltig.\n" -#: src/vpn/gnunet-service-vpn.c:2265 src/vpn/gnunet-service-vpn.c:2301 +#: src/vpn/gnunet-service-vpn.c:2268 src/vpn/gnunet-service-vpn.c:2304 #, c-format msgid "Packet received for unmapped destination `%s' (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2311 +#: src/vpn/gnunet-service-vpn.c:2314 msgid "Received IPv4 packet with options (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2325 +#: src/vpn/gnunet-service-vpn.c:2328 #, c-format msgid "Received packet of unknown protocol %d from TUN (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2364 +#: src/vpn/gnunet-service-vpn.c:2367 msgid "Failed to find unallocated IPv4 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2419 +#: src/vpn/gnunet-service-vpn.c:2422 msgid "Failed to find unallocated IPv6 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2461 src/vpn/gnunet-service-vpn.c:2683 +#: src/vpn/gnunet-service-vpn.c:2464 src/vpn/gnunet-service-vpn.c:2686 #, fuzzy msgid "# Active destinations" msgstr "Nätverksanslutning" -#: src/vpn/gnunet-service-vpn.c:2732 +#: src/vpn/gnunet-service-vpn.c:2735 msgid "Failed to allocate IP address for new destination\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2995 +#: src/vpn/gnunet-service-vpn.c:2998 #, fuzzy msgid "Must specify valid IPv6 address" msgstr "\"%s\" är inte tillgänglig." -#: src/vpn/gnunet-service-vpn.c:3019 +#: src/vpn/gnunet-service-vpn.c:3022 msgid "Must specify valid IPv6 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3027 +#: src/vpn/gnunet-service-vpn.c:3030 msgid "IPv6 support disabled as this system does not support IPv6\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3040 +#: src/vpn/gnunet-service-vpn.c:3043 #, fuzzy msgid "Must specify valid IPv4 address" msgstr "\"%s\" är inte tillgänglig." -#: src/vpn/gnunet-service-vpn.c:3053 +#: src/vpn/gnunet-service-vpn.c:3056 msgid "Must specify valid IPv4 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3063 +#: src/vpn/gnunet-service-vpn.c:3066 msgid "IPv4 support disabled as this system does not support IPv4\n" msgstr "" @@ -9226,10 +9098,6 @@ msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" msgstr "\"%s\" misslyckades för fil \"%s\" vid %s:%d med fel: %s\n" #, fuzzy -#~ msgid "Token `%s' is malformed\n" -#~ msgstr "Ogiltigt argument: \"%s\"\n" - -#, fuzzy #~ msgid "Failed to create indices\n" #~ msgstr "Kunde inte skapa namnrymd \"%s\" (existerar?).\n" diff --git a/po/vi.po b/po/vi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gnunet 0.8.0a\n" "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" -"POT-Creation-Date: 2017-10-20 15:14+0000\n" +"POT-Creation-Date: 2018-01-02 02:33+0100\n" "PO-Revision-Date: 2008-09-10 22:05+0930\n" "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" @@ -252,14 +252,14 @@ msgid "Require valid port number for service `%s' in configuration!\n" msgstr "" #: src/arm/gnunet-service-arm.c:430 src/transport/plugin_transport_tcp.c:1176 -#: src/transport/tcp_service_legacy.c:613 src/util/client.c:480 +#: src/transport/tcp_service_legacy.c:613 src/util/client.c:505 #: src/util/service.c:682 #, c-format msgid "UNIXPATH `%s' too long, maximum length is %llu\n" msgstr "" #: src/arm/gnunet-service-arm.c:434 src/transport/plugin_transport_tcp.c:1180 -#: src/transport/tcp_service_legacy.c:617 src/util/client.c:485 +#: src/transport/tcp_service_legacy.c:617 src/util/client.c:510 #: src/util/service.c:687 #, fuzzy, c-format msgid "Using `%s' instead\n" @@ -362,15 +362,132 @@ msgstr "" msgid "Initiating shutdown as requested by client.\n" msgstr "" -#: src/ats-tests/ats-testing-log.c:837 +#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 +#, c-format +msgid "" +"Could not load quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:2799 +#, c-format +msgid "" +"No outbound quota configured for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:2840 +#, c-format +msgid "" +"No outbound quota configure for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3294 src/ats-tests/gnunet-solver-eval.c:939 +msgid "solver to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3299 src/ats-tests/gnunet-solver-eval.c:945 +#: src/ats-tests/gnunet-solver-eval.c:950 +msgid "experiment to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3306 #, fuzzy -msgid "Stop logging\n" +msgid "print logging" msgstr "Theo dõi" -#: src/ats-tests/ats-testing-log.c:892 +#: src/ats/gnunet-ats-solver-eval.c:3311 +msgid "save logging to disk" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3316 +msgid "disable normalization" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:304 +#, c-format +msgid "" +"Could not load %s quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:314 +#, c-format +msgid "%s quota configured for network `%s' is %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:359 +#, c-format +msgid "" +"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:451 #, fuzzy, c-format -msgid "Start logging `%s'\n" -msgstr "Đang bắt đầu tài về « %s »\n" +msgid "Failed to initialize solver `%s'!\n" +msgstr "Không thể sơ khởi SQLite: %s.\n" + +#: src/ats/plugin_ats_mlp.c:1274 +msgid "Problem size too large, cannot allocate memory!\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1869 +#, fuzzy, c-format +msgid "Adding address for peer `%s' multiple times\n" +msgstr "Không thể lấy địa chỉ của đồng đẳng « %s ».\n" + +#: src/ats/plugin_ats_mlp.c:1913 +#, fuzzy, c-format +msgid "Updating address property for peer `%s' %p not added before\n" +msgstr "Không thể lấy địa chỉ của đồng đẳng « %s ».\n" + +#: src/ats/plugin_ats_mlp.c:2475 +msgid "" +"MLP solver is not optimizing for anything, changing to feasibility check\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 +#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 +#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 +#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 +#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 +#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 +#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 +#, fuzzy, c-format +msgid "Invalid %s configuration %f \n" +msgstr "Không thể lưu tập tin cấu hình « %s »:" + +#: src/ats/plugin_ats_mlp.c:2670 +#, c-format +msgid "" +"Adjusting inconsistent outbound quota configuration for network `%s', is " +"%llu must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2679 +#, c-format +msgid "" +"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " +"must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2689 +#, c-format +msgid "" +"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2698 +#, c-format +msgid "" +"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_proportional.c:1164 +#, fuzzy, c-format +msgid "Invalid %s configuration %f\n" +msgstr "Không thể lưu tập tin cấu hình « %s »:" #: src/ats-tests/ats-testing.c:422 #, c-format @@ -382,6 +499,16 @@ msgstr "" msgid "Failed to connect master peer [%u] with slave [%u]\n" msgstr "Lỗi kết nối đến gnunetd.\n" +#: src/ats-tests/ats-testing-log.c:837 +#, fuzzy +msgid "Stop logging\n" +msgstr "Theo dõi" + +#: src/ats-tests/ats-testing-log.c:892 +#, fuzzy, c-format +msgid "Start logging `%s'\n" +msgstr "Đang bắt đầu tài về « %s »\n" + #: src/ats-tests/gnunet-ats-sim.c:90 #, c-format msgid "" @@ -389,15 +516,6 @@ msgid "" "= %u KiB/s\n" msgstr "" -#: src/ats-tests/gnunet-solver-eval.c:939 src/ats/gnunet-ats-solver-eval.c:3294 -msgid "solver to use" -msgstr "" - -#: src/ats-tests/gnunet-solver-eval.c:945 -#: src/ats-tests/gnunet-solver-eval.c:950 src/ats/gnunet-ats-solver-eval.c:3299 -msgid "experiment to use" -msgstr "" - #: src/ats-tool/gnunet-ats.c:307 #, c-format msgid "%u address resolutions had a timeout\n" @@ -520,124 +638,6 @@ msgstr "" msgid "Print information about ATS state" msgstr "In ra thông tin về các đồng đẳng GNUnet." -#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 -#, c-format -msgid "" -"Could not load quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2799 -#, c-format -msgid "" -"No outbound quota configured for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2840 -#, c-format -msgid "" -"No outbound quota configure for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3306 -#, fuzzy -msgid "print logging" -msgstr "Theo dõi" - -#: src/ats/gnunet-ats-solver-eval.c:3311 -msgid "save logging to disk" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3316 -msgid "disable normalization" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:304 -#, c-format -msgid "" -"Could not load %s quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:314 -#, c-format -msgid "%s quota configured for network `%s' is %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:359 -#, c-format -msgid "" -"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:451 -#, fuzzy, c-format -msgid "Failed to initialize solver `%s'!\n" -msgstr "Không thể sơ khởi SQLite: %s.\n" - -#: src/ats/plugin_ats_mlp.c:1274 -msgid "Problem size too large, cannot allocate memory!\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1869 -#, fuzzy, c-format -msgid "Adding address for peer `%s' multiple times\n" -msgstr "Không thể lấy địa chỉ của đồng đẳng « %s ».\n" - -#: src/ats/plugin_ats_mlp.c:1913 -#, fuzzy, c-format -msgid "Updating address property for peer `%s' %p not added before\n" -msgstr "Không thể lấy địa chỉ của đồng đẳng « %s ».\n" - -#: src/ats/plugin_ats_mlp.c:2475 -msgid "" -"MLP solver is not optimizing for anything, changing to feasibility check\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 -#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 -#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 -#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 -#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 -#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 -#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 -#, fuzzy, c-format -msgid "Invalid %s configuration %f \n" -msgstr "Không thể lưu tập tin cấu hình « %s »:" - -#: src/ats/plugin_ats_mlp.c:2670 -#, c-format -msgid "" -"Adjusting inconsistent outbound quota configuration for network `%s', is " -"%llu must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2679 -#, c-format -msgid "" -"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " -"must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2689 -#, c-format -msgid "" -"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2698 -#, c-format -msgid "" -"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_proportional.c:1164 -#, fuzzy, c-format -msgid "Invalid %s configuration %f\n" -msgstr "Không thể lưu tập tin cấu hình « %s »:" - #: src/auction/gnunet-auction-create.c:163 msgid "description of the item to be sold" msgstr "" @@ -685,58 +685,58 @@ msgstr "" msgid "Invalid peer ID `%s'\n" msgstr "Dữ liệu nhập không hợp lệ.\n" -#: src/cadet/gnunet-cadet.c:702 +#: src/cadet/gnunet-cadet.c:703 #, fuzzy, c-format msgid "Invalid tunnel owner `%s'\n" msgstr "Địa chỉ IP định dạng sai: %s\n" -#: src/cadet/gnunet-cadet.c:775 +#: src/cadet/gnunet-cadet.c:776 msgid "Extra arguments are not applicable in combination with this option.\n" msgstr "" -#: src/cadet/gnunet-cadet.c:866 +#: src/cadet/gnunet-cadet.c:867 #, fuzzy, c-format msgid "Invalid target `%s'\n" msgstr "Đối số không hợp lệ cho « %s ».\n" -#: src/cadet/gnunet-cadet.c:903 +#: src/cadet/gnunet-cadet.c:904 #, fuzzy msgid "No action requested\n" msgstr "Thu thập bị dừng.\n" -#: src/cadet/gnunet-cadet.c:928 +#: src/cadet/gnunet-cadet.c:929 #, fuzzy msgid "Provide information about a particular connection" msgstr "In ra thông tin về các đồng đẳng GNUnet." -#: src/cadet/gnunet-cadet.c:933 +#: src/cadet/gnunet-cadet.c:934 msgid "Activate echo mode" msgstr "" -#: src/cadet/gnunet-cadet.c:938 +#: src/cadet/gnunet-cadet.c:939 msgid "Dump debug information to STDERR" msgstr "" -#: src/cadet/gnunet-cadet.c:944 +#: src/cadet/gnunet-cadet.c:945 msgid "Listen for connections using a shared secret among sender and recipient" msgstr "" -#: src/cadet/gnunet-cadet.c:951 +#: src/cadet/gnunet-cadet.c:952 #, fuzzy msgid "Provide information about a patricular peer" msgstr "In ra thông tin về các đồng đẳng GNUnet." -#: src/cadet/gnunet-cadet.c:957 +#: src/cadet/gnunet-cadet.c:958 #, fuzzy msgid "Provide information about all peers" msgstr "In ra thông tin về các đồng đẳng GNUnet." -#: src/cadet/gnunet-cadet.c:963 +#: src/cadet/gnunet-cadet.c:964 #, fuzzy msgid "Provide information about a particular tunnel" msgstr "In ra thông tin về các đồng đẳng GNUnet." -#: src/cadet/gnunet-cadet.c:969 +#: src/cadet/gnunet-cadet.c:970 #, fuzzy msgid "Provide information about all tunnels" msgstr "In ra thông tin về các đồng đẳng GNUnet." @@ -786,28 +786,6 @@ msgstr "" msgid "Connection to conversation service lost, trying to reconnect\n" msgstr "" -#: src/conversation/gnunet-conversation-test.c:119 -#, c-format -msgid "" -"\n" -"End of transmission. Have a GNU day.\n" -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:145 -#, c-format -msgid "" -"\n" -"We are now playing your recording back. If you can hear it, your audio " -"settings are working..." -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:210 -#, c-format -msgid "" -"We will now be recording you for %s. After that time, the recording will be " -"played back to you..." -msgstr "" - #: src/conversation/gnunet-conversation.c:269 #, c-format msgid "Incoming call from `%s'. Please /accept %u or /cancel %u the call.\n" @@ -1065,8 +1043,30 @@ msgstr "" msgid "Enables having a conversation with other GNUnet users." msgstr "" -#: src/conversation/gnunet-helper-audio-playback-gst.c:356 +#: src/conversation/gnunet-conversation-test.c:119 +#, c-format +msgid "" +"\n" +"End of transmission. Have a GNU day.\n" +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:145 +#, c-format +msgid "" +"\n" +"We are now playing your recording back. If you can hear it, your audio " +"settings are working..." +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:210 +#, c-format +msgid "" +"We will now be recording you for %s. After that time, the recording will be " +"played back to you..." +msgstr "" + #: src/conversation/gnunet_gst.c:622 +#: src/conversation/gnunet-helper-audio-playback-gst.c:361 #, c-format msgid "Read error from STDIN: %d %s\n" msgstr "" @@ -1076,63 +1076,63 @@ msgstr "" msgid "pa_stream_write() failed: %s\n" msgstr "SMTP: « %s » bị lỗi: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:607 +#: src/conversation/gnunet-helper-audio-playback.c:612 msgid "gnunet-helper-audio-playback - Got signal, exiting\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:632 +#: src/conversation/gnunet-helper-audio-playback.c:637 #: src/conversation/gnunet-helper-audio-record.c:545 #, fuzzy msgid "Connection established.\n" msgstr "Thu thập bị dừng.\n" -#: src/conversation/gnunet-helper-audio-playback.c:637 +#: src/conversation/gnunet-helper-audio-playback.c:642 #: src/conversation/gnunet-helper-audio-record.c:550 #, fuzzy, c-format msgid "pa_stream_new() failed: %s\n" msgstr "SMTP: « %s » bị lỗi: %s\n" -#: src/conversation/gnunet-helper-audio-playback.c:651 +#: src/conversation/gnunet-helper-audio-playback.c:656 #, c-format msgid "pa_stream_connect_playback() failed: %s\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:664 +#: src/conversation/gnunet-helper-audio-playback.c:669 #: src/conversation/gnunet-helper-audio-record.c:576 #, fuzzy, c-format msgid "Connection failure: %s\n" msgstr "%s bị lỗi tại %s:%d: « %s »\n" -#: src/conversation/gnunet-helper-audio-playback.c:685 +#: src/conversation/gnunet-helper-audio-playback.c:690 #: src/conversation/gnunet-helper-audio-record.c:599 msgid "Wrong Spec\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:691 +#: src/conversation/gnunet-helper-audio-playback.c:696 #: src/conversation/gnunet-helper-audio-record.c:605 #, fuzzy msgid "pa_mainloop_new() failed.\n" msgstr "Lỗi nội bộ : khẳng định không thành công tại %s:%d.\n" -#: src/conversation/gnunet-helper-audio-playback.c:705 +#: src/conversation/gnunet-helper-audio-playback.c:710 #: src/conversation/gnunet-helper-audio-record.c:620 #, fuzzy msgid "pa_context_new() failed.\n" msgstr "Lỗi nội bộ : khẳng định không thành công tại %s:%d.\n" -#: src/conversation/gnunet-helper-audio-playback.c:712 +#: src/conversation/gnunet-helper-audio-playback.c:717 #: src/conversation/gnunet-helper-audio-record.c:626 #, fuzzy, c-format msgid "pa_context_connect() failed: %s\n" msgstr "# của các đồng đẳng đã kết nối" -#: src/conversation/gnunet-helper-audio-playback.c:718 +#: src/conversation/gnunet-helper-audio-playback.c:723 #: src/conversation/gnunet-helper-audio-record.c:632 #, fuzzy msgid "pa_mainloop_run() failed.\n" msgstr "Lỗi nội bộ : khẳng định không thành công tại %s:%d.\n" -#: src/conversation/gnunet-helper-audio-playback.c:790 +#: src/conversation/gnunet-helper-audio-playback.c:795 #, c-format msgid "Read error from STDIN: %s\n" msgstr "" @@ -1201,7 +1201,7 @@ msgstr "Lỗi tạo thư mục tạm thời." msgid "Could not open line, port %s already in use!\n" msgstr "Không thể kết nối tới %s:%u: %s\n" -#: src/conversation/microphone.c:119 +#: src/conversation/microphone.c:121 #, fuzzy msgid "Could not start record audio helper\n" msgstr "Không thể truy cập đến thông tin về không gian tên.\n" @@ -1293,27 +1293,27 @@ msgstr "# các yêu cầu lỗ hổng bị bỏ do trọng tải" msgid "# dequeuing CAR (duplicate request)" msgstr "" -#: src/core/gnunet-service-core.c:440 +#: src/core/gnunet-service-core.c:443 #, fuzzy, c-format msgid "# bytes of messages of type %u received" msgstr "# các byte nhiễu được nhận" -#: src/core/gnunet-service-core.c:538 +#: src/core/gnunet-service-core.c:541 #, fuzzy msgid "# messages discarded (session disconnected)" msgstr "# các thông báo được chắp liền" -#: src/core/gnunet-service-core.c:876 +#: src/core/gnunet-service-core.c:879 #, fuzzy, c-format msgid "# messages of type %u discarded (client busy)" msgstr "# các byte nhiễu được nhận" -#: src/core/gnunet-service-core.c:985 +#: src/core/gnunet-service-core.c:988 #, fuzzy msgid "Core service is lacking HOSTKEY configuration setting. Exiting.\n" msgstr "Lưu cấu hình ngay bây giờ không?" -#: src/core/gnunet-service-core.c:1006 +#: src/core/gnunet-service-core.c:1009 #, fuzzy, c-format msgid "Core service of `%s' ready.\n" msgstr "Không gian tên « %s » có đánh giá %d.\n" @@ -1326,313 +1326,181 @@ msgstr "# các byte đã mã hoá" msgid "# bytes decrypted" msgstr "# các byte đã giải mã" -#: src/core/gnunet-service-core_kx.c:725 +#: src/core/gnunet-service-core_kx.c:728 #, fuzzy msgid "# PAYLOAD dropped (out of order)" msgstr "# các byte loại bỏ bởi UDP (đi ra)" -#: src/core/gnunet-service-core_kx.c:775 +#: src/core/gnunet-service-core_kx.c:778 msgid "# key exchanges initiated" msgstr "" -#: src/core/gnunet-service-core_kx.c:837 +#: src/core/gnunet-service-core_kx.c:840 msgid "# key exchanges stopped" msgstr "" -#: src/core/gnunet-service-core_kx.c:871 +#: src/core/gnunet-service-core_kx.c:874 #, fuzzy msgid "# PING messages transmitted" msgstr "# các thông báo PING được tạo" -#: src/core/gnunet-service-core_kx.c:938 +#: src/core/gnunet-service-core_kx.c:941 msgid "# old ephemeral keys ignored" msgstr "" -#: src/core/gnunet-service-core_kx.c:945 +#: src/core/gnunet-service-core_kx.c:948 #, fuzzy msgid "# ephemeral keys received" msgstr "# các thông báo phát hiện dht được nhận" -#: src/core/gnunet-service-core_kx.c:984 +#: src/core/gnunet-service-core_kx.c:987 #, c-format msgid "" "Ephemeral key message from peer `%s' rejected as its validity range does not " "match our system time (%llu not in [%llu,%llu]).\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:995 +#: src/core/gnunet-service-core_kx.c:998 #, fuzzy msgid "# EPHEMERAL_KEY messages received" msgstr "# các thông báo được chắp liền" -#: src/core/gnunet-service-core_kx.c:1091 -#: src/transport/gnunet-service-transport_validation.c:1119 +#: src/core/gnunet-service-core_kx.c:1094 +#: src/transport/gnunet-service-transport_validation.c:1128 #, fuzzy msgid "# PING messages received" msgstr "# các thông báo PING được tạo" -#: src/core/gnunet-service-core_kx.c:1100 +#: src/core/gnunet-service-core_kx.c:1103 #, fuzzy msgid "# PING messages dropped (out of order)" msgstr "# các yêu cầu lỗ hổng bị bỏ do trọng tải" -#: src/core/gnunet-service-core_kx.c:1158 +#: src/core/gnunet-service-core_kx.c:1161 #, fuzzy msgid "# PONG messages created" msgstr "# các thông báo PING được tạo" -#: src/core/gnunet-service-core_kx.c:1184 +#: src/core/gnunet-service-core_kx.c:1187 #, fuzzy msgid "# sessions terminated by timeout" msgstr "# các byte loại đi bởi TCP (đi ra)" -#: src/core/gnunet-service-core_kx.c:1197 +#: src/core/gnunet-service-core_kx.c:1200 #, fuzzy msgid "# keepalive messages sent" msgstr "# các thông báo PING nhập thô được gửi" -#: src/core/gnunet-service-core_kx.c:1261 -#: src/transport/gnunet-service-transport_validation.c:1442 +#: src/core/gnunet-service-core_kx.c:1264 +#: src/transport/gnunet-service-transport_validation.c:1461 #, fuzzy msgid "# PONG messages received" msgstr "# các thông báo PONG đã mật mã được nhận" -#: src/core/gnunet-service-core_kx.c:1268 +#: src/core/gnunet-service-core_kx.c:1271 #, fuzzy msgid "# PONG messages dropped (connection down)" msgstr "# các thông báo PONG đã mật mã được nhận" -#: src/core/gnunet-service-core_kx.c:1273 +#: src/core/gnunet-service-core_kx.c:1276 #, fuzzy msgid "# PONG messages dropped (out of order)" msgstr "# các yêu cầu lỗ hổng bị bỏ do trọng tải" -#: src/core/gnunet-service-core_kx.c:1308 +#: src/core/gnunet-service-core_kx.c:1311 #, fuzzy msgid "# PONG messages decrypted" msgstr "# các thông báo PING được tạo" -#: src/core/gnunet-service-core_kx.c:1346 +#: src/core/gnunet-service-core_kx.c:1349 #, fuzzy msgid "# session keys confirmed via PONG" msgstr "# Các quảng cáo đồng đẳng được xác nhận qua PONG" -#: src/core/gnunet-service-core_kx.c:1357 +#: src/core/gnunet-service-core_kx.c:1360 #, fuzzy msgid "# timeouts prevented via PONG" msgstr "# các byte đã nhận qua TCP" -#: src/core/gnunet-service-core_kx.c:1364 +#: src/core/gnunet-service-core_kx.c:1367 #, fuzzy msgid "# rekey operations confirmed via PONG" msgstr "# Các quảng cáo đồng đẳng được xác nhận qua PONG" -#: src/core/gnunet-service-core_kx.c:1518 +#: src/core/gnunet-service-core_kx.c:1521 #, fuzzy msgid "# DATA message dropped (out of order)" msgstr "# các byte loại bỏ bởi UDP (đi ra)" -#: src/core/gnunet-service-core_kx.c:1526 +#: src/core/gnunet-service-core_kx.c:1529 #, c-format msgid "" "Session to peer `%s' went down due to key expiration (should not happen)\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:1529 +#: src/core/gnunet-service-core_kx.c:1532 #, fuzzy msgid "# sessions terminated by key expiration" msgstr "# các byte loại đi bởi TCP (đi ra)" -#: src/core/gnunet-service-core_kx.c:1590 -#: src/core/gnunet-service-core_kx.c:1616 +#: src/core/gnunet-service-core_kx.c:1593 +#: src/core/gnunet-service-core_kx.c:1619 #, fuzzy msgid "# bytes dropped (duplicates)" msgstr "# các byte loại bỏ bởi UDP (đi ra)" -#: src/core/gnunet-service-core_kx.c:1603 +#: src/core/gnunet-service-core_kx.c:1606 #, fuzzy msgid "# bytes dropped (out of sequence)" msgstr "# các byte loại bỏ bởi UDP (đi ra)" -#: src/core/gnunet-service-core_kx.c:1645 +#: src/core/gnunet-service-core_kx.c:1648 #, fuzzy msgid "# bytes dropped (ancient message)" msgstr "# các byte loại bỏ bởi UDP (đi ra)" -#: src/core/gnunet-service-core_kx.c:1653 +#: src/core/gnunet-service-core_kx.c:1656 #, fuzzy msgid "# bytes of payload decrypted" msgstr "# các byte đã giải mã" -#: src/core/gnunet-service-core_sessions.c:266 -#: src/core/gnunet-service-core_sessions.c:356 +#: src/core/gnunet-service-core_sessions.c:260 +#: src/core/gnunet-service-core_sessions.c:350 #: src/dht/gnunet-service-dht_neighbours.c:733 #: src/dht/gnunet-service-dht_neighbours.c:795 #: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1520 #: src/topology/gnunet-daemon-topology.c:612 #: src/topology/gnunet-daemon-topology.c:714 -#: src/transport/gnunet-service-transport_neighbours.c:719 -#: src/transport/gnunet-service-transport_neighbours.c:727 -#, fuzzy -msgid "# peers connected" -msgstr "# của các đồng đẳng đã kết nối" - -#: src/core/gnunet-service-core_sessions.c:302 -#, fuzzy -msgid "# type map refreshes sent" -msgstr "# tổng số yêu cầu lỗ hổng được gửi" - -#: src/core/gnunet-service-core_sessions.c:422 -#, fuzzy -msgid "# outdated typemap confirmations received" -msgstr "Lỗi lưu cấu hình." - -#: src/core/gnunet-service-core_sessions.c:439 -#, fuzzy -msgid "# valid typemap confirmations received" -msgstr "Lỗi lưu cấu hình." - -#: src/core/gnunet-service-core_typemap.c:169 -#: src/core/gnunet-service-core_typemap.c:181 -#, fuzzy -msgid "# type maps received" -msgstr "# các thông báo phát hiện dht được nhận" - -#: src/core/gnunet-service-core_typemap.c:212 -msgid "# updates to my type map" -msgstr "" - -#: src/credential/credential_misc.c:88 -#, fuzzy, c-format -msgid "Unable to parse CRED record string `%s'\n" -msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" - -#: src/credential/gnunet-credential.c:278 src/namestore/gnunet-namestore.c:776 -#: src/namestore/plugin_rest_namestore.c:1009 -#, c-format -msgid "Ego `%s' not known to identity service\n" -msgstr "" - -#: src/credential/gnunet-credential.c:294 -#: src/credential/gnunet-credential.c:446 -#, fuzzy, c-format -msgid "Issuer public key `%s' is not well-formed\n" -msgstr "Đối số không hợp lệ cho « %s ».\n" - -#: src/credential/gnunet-credential.c:375 -#: src/credential/gnunet-credential.c:435 -#, fuzzy, c-format -msgid "Issuer public key not well-formed\n" -msgstr "Đối số không hợp lệ cho « %s ».\n" - -#: src/credential/gnunet-credential.c:386 -#: src/credential/gnunet-credential.c:455 -#, fuzzy, c-format -msgid "Failed to connect to CREDENTIAL\n" -msgstr "Lỗi kết nối đến gnunetd.\n" - -#: src/credential/gnunet-credential.c:392 -#, c-format -msgid "You must provide issuer the attribute\n" -msgstr "" - -#: src/credential/gnunet-credential.c:399 -#, c-format -msgid "ego required\n" -msgstr "" - -#: src/credential/gnunet-credential.c:415 -#, c-format -msgid "Subject public key needed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:426 -#, fuzzy, c-format -msgid "Subject public key `%s' is not well-formed\n" -msgstr "Đối số không hợp lệ cho « %s ».\n" - -#: src/credential/gnunet-credential.c:461 -#, c-format -msgid "You must provide issuer and subject attributes\n" -msgstr "" - -#: src/credential/gnunet-credential.c:511 -#, c-format -msgid "Issuer ego required\n" -msgstr "" - -#: src/credential/gnunet-credential.c:523 -#, c-format -msgid "Please specify name to lookup, subject key and issuer key!\n" -msgstr "" - -#: src/credential/gnunet-credential.c:543 -msgid "create credential" -msgstr "" - -#: src/credential/gnunet-credential.c:547 -msgid "verify credential against attribute" -msgstr "" - -#: src/credential/gnunet-credential.c:552 +#: src/transport/gnunet-service-transport_neighbours.c:719 +#: src/transport/gnunet-service-transport_neighbours.c:727 #, fuzzy -msgid "The public key of the subject to lookup the credential for" -msgstr "xác định mức ưu tiên của nội dung" - -#: src/credential/gnunet-credential.c:557 -msgid "The name of the credential presented by the subject" -msgstr "" +msgid "# peers connected" +msgstr "# của các đồng đẳng đã kết nối" -#: src/credential/gnunet-credential.c:562 +#: src/core/gnunet-service-core_sessions.c:296 #, fuzzy -msgid "The public key of the authority to verify the credential against" -msgstr "xác định mức ưu tiên của nội dung" +msgid "# type map refreshes sent" +msgstr "# tổng số yêu cầu lỗ hổng được gửi" -#: src/credential/gnunet-credential.c:567 +#: src/core/gnunet-service-core_sessions.c:416 #, fuzzy -msgid "The ego to use" -msgstr "kích cỡ tin nhắn" - -#: src/credential/gnunet-credential.c:572 -msgid "The issuer attribute to verify against or to issue" -msgstr "" - -#: src/credential/gnunet-credential.c:577 -msgid "The time to live for the credential" -msgstr "" - -#: src/credential/gnunet-credential.c:581 -msgid "collect credentials" -msgstr "" +msgid "# outdated typemap confirmations received" +msgstr "Lỗi lưu cấu hình." -#: src/credential/gnunet-credential.c:595 +#: src/core/gnunet-service-core_sessions.c:433 #, fuzzy -msgid "GNUnet credential resolver tool" -msgstr "Bản ghi lỗi GNUnet" - -#: src/credential/gnunet-service-credential.c:1204 -#: src/gns/gnunet-gns-helper-service-w32.c:727 src/gns/gnunet-gns.c:355 -#, fuzzy, c-format -msgid "Failed to connect to GNS\n" -msgstr "Lỗi kết nối đến gnunetd.\n" - -#: src/credential/gnunet-service-credential.c:1210 -#: src/namestore/gnunet-namestore-fcfsd.c:1034 -#: src/namestore/gnunet-namestore.c:802 -#: src/namestore/plugin_rest_namestore.c:1022 -#, fuzzy, c-format -msgid "Failed to connect to namestore\n" -msgstr "Không kết nối được đến trình nền gnunetd." - -#: src/credential/plugin_gnsrecord_credential.c:186 -#, fuzzy, c-format -msgid "Unable to parse ATTR record string `%s'\n" -msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" +msgid "# valid typemap confirmations received" +msgstr "Lỗi lưu cấu hình." -#: src/credential/plugin_rest_credential.c:1155 src/gns/plugin_rest_gns.c:668 +#: src/core/gnunet-service-core_typemap.c:169 +#: src/core/gnunet-service-core_typemap.c:181 #, fuzzy -msgid "GNS REST API initialized\n" -msgstr "Lỗi sơ khởi lõi.\n" +msgid "# type maps received" +msgstr "# các thông báo phát hiện dht được nhận" + +#: src/core/gnunet-service-core_typemap.c:212 +msgid "# updates to my type map" +msgstr "" #: src/datacache/datacache.c:119 src/datacache/datacache.c:294 #: src/datastore/gnunet-service-datastore.c:757 @@ -1683,9 +1551,8 @@ msgstr "kho dữ liệu sqlite" #: src/datacache/plugin_datacache_sqlite.c:122 #: src/datastore/plugin_datastore_mysql.c:892 #: src/datastore/plugin_datastore_sqlite.c:58 -#: src/datastore/plugin_datastore_sqlite.c:66 -#: src/identity-provider/plugin_identity_provider_sqlite.c:52 src/my/my.c:80 -#: src/my/my.c:92 src/mysql/mysql.c:42 src/mysql/mysql.c:49 +#: src/datastore/plugin_datastore_sqlite.c:66 src/my/my.c:80 src/my/my.c:92 +#: src/mysql/mysql.c:42 src/mysql/mysql.c:49 #: src/namecache/plugin_namecache_sqlite.c:53 #: src/namestore/plugin_namestore_sqlite.c:53 #: src/peerstore/plugin_peerstore_sqlite.c:52 @@ -1703,7 +1570,6 @@ msgstr "« %s » bị lỗi tại %s:%d với lỗi: %s\n" #: src/datacache/plugin_datacache_sqlite.c:817 #: src/datastore/plugin_datastore_sqlite.c:456 -#: src/identity-provider/plugin_identity_provider_sqlite.c:336 #: src/namecache/plugin_namecache_sqlite.c:296 #: src/namestore/plugin_namestore_sqlite.c:355 msgid "Tried to close sqlite without finalizing all prepared statements.\n" @@ -1728,7 +1594,7 @@ msgstr "" msgid "# queue entries created" msgstr "# các truy vấn lỗ hổng được định tuyến" -#: src/datastore/datastore_api.c:740 +#: src/datastore/datastore_api.c:760 #, fuzzy msgid "# status messages received" msgstr "# các thông báo phát hiện dht được nhận" @@ -1738,39 +1604,39 @@ msgstr "# các thông báo phát hiện dht được nhận" msgid "# Results received" msgstr "# các kết quả dht được nhận" -#: src/datastore/datastore_api.c:941 +#: src/datastore/datastore_api.c:920 #, fuzzy msgid "# datastore connections (re)created" msgstr "# các kết nối dht" -#: src/datastore/datastore_api.c:1055 +#: src/datastore/datastore_api.c:1034 #, fuzzy msgid "# PUT requests executed" msgstr "# các yêu cầu dht được định tuyến" -#: src/datastore/datastore_api.c:1116 +#: src/datastore/datastore_api.c:1095 #, fuzzy msgid "# RESERVE requests executed" msgstr "# các yêu cầu dht được định tuyến" -#: src/datastore/datastore_api.c:1181 +#: src/datastore/datastore_api.c:1160 msgid "# RELEASE RESERVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1259 +#: src/datastore/datastore_api.c:1238 #, fuzzy msgid "# REMOVE requests executed" msgstr "# các yêu cầu dht được định tuyến" -#: src/datastore/datastore_api.c:1319 +#: src/datastore/datastore_api.c:1298 msgid "# GET REPLICATION requests executed" msgstr "" -#: src/datastore/datastore_api.c:1381 +#: src/datastore/datastore_api.c:1360 msgid "# GET ZERO ANONYMITY requests executed" msgstr "" -#: src/datastore/datastore_api.c:1462 +#: src/datastore/datastore_api.c:1441 #, fuzzy msgid "# GET requests executed" msgstr "# các yêu cầu dht được định tuyến" @@ -2057,7 +1923,6 @@ msgid "`%s' failed at %s:%u with error: %s" msgstr "« %s » bị lỗi tại %s:%d với lỗi: %s" #: src/datastore/plugin_datastore_sqlite.c:271 -#: src/identity-provider/plugin_identity_provider_sqlite.c:212 #: src/namecache/plugin_namecache_sqlite.c:194 #: src/namestore/plugin_namestore_sqlite.c:222 #: src/peerstore/plugin_peerstore_sqlite.c:535 @@ -2082,7 +1947,6 @@ msgid "" msgstr "" #: src/datastore/plugin_datastore_sqlite.c:1337 -#: src/identity-provider/plugin_identity_provider_sqlite.c:711 #: src/namecache/plugin_namecache_sqlite.c:603 #: src/namestore/plugin_namestore_sqlite.c:802 #, fuzzy @@ -2151,6 +2015,52 @@ msgstr "" msgid "Prints all packets that go through the DHT." msgstr "" +#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:253 +#, fuzzy, c-format +msgid "Exiting as the number of peers is %u\n" +msgstr "tăng sổ tối đa các kết nối TCP/IP" + +#: src/dht/gnunet_dht_profiler.c:1188 +#, fuzzy +msgid "number of peers to start" +msgstr "số lần lặp lại" + +#: src/dht/gnunet_dht_profiler.c:1194 +msgid "" +"maximum number of times we try to search for successor circle formation (0 " +"for R5N)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 +#: src/testbed/gnunet-testbed-profiler.c:304 +msgid "name of the file with the login information for the testbed" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1206 +msgid "delay between rounds for collecting statistics (default: 30 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1212 +msgid "delay to start doing PUTs (default: 1 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1218 +msgid "delay to start doing GETs (default: 5 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1223 +msgid "replication degree for DHT PUTs" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1230 +msgid "timeout for DHT PUT and GET requests (default: 1 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1248 +#, fuzzy +msgid "Measure quality and performance of the DHT service." +msgstr "Không thể truy cập đến dịch vụ" + #: src/dht/gnunet-dht-put.c:120 #, fuzzy msgid "PUT request sent with key" @@ -2428,52 +2338,6 @@ msgstr "" msgid "# DHT requests combined" msgstr "# các yêu cầu get (lấy) dht được nhận" -#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:255 -#, fuzzy, c-format -msgid "Exiting as the number of peers is %u\n" -msgstr "tăng sổ tối đa các kết nối TCP/IP" - -#: src/dht/gnunet_dht_profiler.c:1188 -#, fuzzy -msgid "number of peers to start" -msgstr "số lần lặp lại" - -#: src/dht/gnunet_dht_profiler.c:1194 -msgid "" -"maximum number of times we try to search for successor circle formation (0 " -"for R5N)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 -#: src/testbed/gnunet-testbed-profiler.c:305 -msgid "name of the file with the login information for the testbed" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1206 -msgid "delay between rounds for collecting statistics (default: 30 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1212 -msgid "delay to start doing PUTs (default: 1 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1218 -msgid "delay to start doing GETs (default: 5 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1223 -msgid "replication degree for DHT PUTs" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1230 -msgid "timeout for DHT PUT and GET requests (default: 1 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1248 -#, fuzzy -msgid "Measure quality and performance of the DHT service." -msgstr "Không thể truy cập đến dịch vụ" - #: src/dht/plugin_block_dht.c:187 #, fuzzy, c-format msgid "Block not of type %u\n" @@ -3024,7 +2888,7 @@ msgstr "" msgid "Failed to not connect to `%s' service.\n" msgstr "Lỗi sơ khởi dịch vụ « %s ».\n" -#: src/fs/fs_misc.c:126 +#: src/fs/fs_misc.c:128 #, c-format msgid "Did not find mime type `%s' in extension list.\n" msgstr "" @@ -3460,6 +3324,15 @@ msgid "" "chk/...)" msgstr "" +#: src/fs/gnunet-fs.c:119 +msgid "print a list of all indexed files" +msgstr "" + +#: src/fs/gnunet-fs.c:130 +#, fuzzy +msgid "Special file-sharing operations" +msgstr "Tùy chọn chia sẻ tập tin" + #: src/fs/gnunet-fs-profiler.c:211 msgid "run the experiment with COUNT peers" msgstr "" @@ -3476,15 +3349,6 @@ msgstr "" msgid "run a testbed to measure file-sharing performance" msgstr "" -#: src/fs/gnunet-fs.c:119 -msgid "print a list of all indexed files" -msgstr "" - -#: src/fs/gnunet-fs.c:130 -#, fuzzy -msgid "Special file-sharing operations" -msgstr "Tùy chọn chia sẻ tập tin" - #: src/fs/gnunet-publish.c:219 src/fs/gnunet-publish.c:231 #, c-format msgid "Publishing `%s' at %llu/%llu (%s remaining)\n" @@ -4195,11 +4059,22 @@ msgstr "" msgid "GNUnet DNS-to-GNS proxy (a DNS server)" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:602 -msgid "Not ready to process requests, lacking ego data\n" +#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 +#, c-format +msgid "Invalid typename specified, assuming `ANY'\n" +msgstr "" + +#: src/gns/gnunet-gns.c:252 +#, c-format +msgid "Please specify name to lookup!\n" +msgstr "" + +#: src/gns/gnunet-gns.c:276 +#, c-format +msgid "Ego for `%s' not found, cannot perform lookup.\n" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:701 src/gns/gnunet-gns.c:315 +#: src/gns/gnunet-gns.c:315 src/gns/gnunet-gns-helper-service-w32.c:701 #: src/gns/plugin_rest_gns.c:422 #, c-format msgid "" @@ -4207,6 +4082,53 @@ msgid "" "gns-import.sh?\n" msgstr "" +#: src/gns/gnunet-gns.c:355 src/gns/gnunet-gns-helper-service-w32.c:727 +#, fuzzy, c-format +msgid "Failed to connect to GNS\n" +msgstr "Lỗi kết nối đến gnunetd.\n" + +#: src/gns/gnunet-gns.c:374 +#, c-format +msgid "Public key `%s' is not well-formed\n" +msgstr "" + +#: src/gns/gnunet-gns.c:428 +msgid "Lookup a record for the given name" +msgstr "" + +#: src/gns/gnunet-gns.c:434 +#, fuzzy +msgid "Specify the type of the record to lookup" +msgstr "xác định mức ưu tiên của nội dung" + +#: src/gns/gnunet-gns.c:440 +#, fuzzy +msgid "Specify timeout for the lookup" +msgstr "xác định mức ưu tiên của nội dung" + +#: src/gns/gnunet-gns.c:445 +msgid "No unneeded output" +msgstr "" + +#: src/gns/gnunet-gns.c:451 +#, fuzzy +msgid "Specify the public key of the zone to lookup the record in" +msgstr "xác định mức ưu tiên của nội dung" + +#: src/gns/gnunet-gns.c:457 +#, fuzzy +msgid "Specify the name of the ego of the zone to lookup the record in" +msgstr "xác định mức ưu tiên của nội dung" + +#: src/gns/gnunet-gns.c:476 +#, fuzzy +msgid "GNUnet GNS resolver tool" +msgstr "Bản ghi lỗi GNUnet" + +#: src/gns/gnunet-gns-helper-service-w32.c:602 +msgid "Not ready to process requests, lacking ego data\n" +msgstr "" + #: src/gns/gnunet-gns-helper-service-w32.c:739 #, fuzzy, c-format msgid "Failed to connect to identity service\n" @@ -4231,164 +4153,111 @@ msgstr "" msgid "%s failed at %s:%d: `%s'\n" msgstr "%s bị lỗi tại %s:%d: « %s »\n" -#: src/gns/gnunet-gns-proxy.c:878 +#: src/gns/gnunet-gns-proxy.c:887 #, fuzzy, c-format msgid "Unsupported CURL SSL backend %d\n" msgstr "Lệnh không được hỗ trợ « %s ». Đang hủy bỏ.\n" -#: src/gns/gnunet-gns-proxy.c:901 +#: src/gns/gnunet-gns-proxy.c:910 #, fuzzy, c-format msgid "Failed to fetch CN from cert: %s\n" msgstr "Lỗi mở tập tin ghi sự kiện « %s »: %s\n" -#: src/gns/gnunet-gns-proxy.c:924 +#: src/gns/gnunet-gns-proxy.c:933 #, fuzzy, c-format msgid "Failed to initialize DANE: %s\n" msgstr "Không thể sơ khởi SQLite: %s.\n" -#: src/gns/gnunet-gns-proxy.c:937 +#: src/gns/gnunet-gns-proxy.c:946 #, fuzzy, c-format msgid "Failed to parse DANE record: %s\n" msgstr "Lỗi mở tập tin ghi sự kiện « %s »: %s\n" -#: src/gns/gnunet-gns-proxy.c:952 +#: src/gns/gnunet-gns-proxy.c:961 #, fuzzy, c-format msgid "Failed to verify TLS connection using DANE: %s\n" msgstr "Không thể lưu tập tin cấu hình « %s »:" -#: src/gns/gnunet-gns-proxy.c:962 +#: src/gns/gnunet-gns-proxy.c:971 #, c-format msgid "Failed DANE verification failed with GnuTLS verify status code: %u\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:986 +#: src/gns/gnunet-gns-proxy.c:995 #, c-format msgid "SSL certificate subject name (%s) does not match `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1095 +#: src/gns/gnunet-gns-proxy.c:1104 #, c-format msgid "Cookie domain `%s' supplied by server is invalid\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1699 +#: src/gns/gnunet-gns-proxy.c:1709 #, fuzzy, c-format msgid "Unsupported HTTP method `%s'\n" msgstr "Lệnh không được hỗ trợ « %s ». Đang hủy bỏ.\n" -#: src/gns/gnunet-gns-proxy.c:2162 +#: src/gns/gnunet-gns-proxy.c:2172 #, fuzzy, c-format msgid "Unable to import private key from file `%s'\n" msgstr "Không thể tạo tài khoản người dùng:" -#: src/gns/gnunet-gns-proxy.c:2192 +#: src/gns/gnunet-gns-proxy.c:2202 #, fuzzy, c-format msgid "Unable to import certificate %s\n" msgstr "Không thể lưu tập tin cấu hình « %s »:" -#: src/gns/gnunet-gns-proxy.c:2365 +#: src/gns/gnunet-gns-proxy.c:2375 #, fuzzy, c-format msgid "Failed to start HTTPS server for `%s'\n" msgstr "Lỗi bắt đầu thu thập.\n" -#: src/gns/gnunet-gns-proxy.c:2384 src/rest/gnunet-rest-server.c:533 +#: src/gns/gnunet-gns-proxy.c:2394 src/rest/gnunet-rest-server.c:533 #, fuzzy msgid "Failed to pass client to MHD\n" msgstr "Lỗi kết nối đến gnunetd.\n" -#: src/gns/gnunet-gns-proxy.c:2704 +#: src/gns/gnunet-gns-proxy.c:2716 #, fuzzy, c-format msgid "Unsupported socks version %d\n" msgstr "Lệnh không được hỗ trợ « %s ». Đang hủy bỏ.\n" -#: src/gns/gnunet-gns-proxy.c:2733 +#: src/gns/gnunet-gns-proxy.c:2745 #, fuzzy, c-format msgid "Unsupported socks command %d\n" msgstr "Lệnh không được hỗ trợ « %s ». Đang hủy bỏ.\n" -#: src/gns/gnunet-gns-proxy.c:2751 src/gns/gnunet-gns-proxy.c:2780 +#: src/gns/gnunet-gns-proxy.c:2763 src/gns/gnunet-gns-proxy.c:2792 msgid "SSL connection to plain IPv4 address requested\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2830 +#: src/gns/gnunet-gns-proxy.c:2842 #, fuzzy, c-format msgid "Unsupported socks address type %d\n" msgstr "Lệnh không được hỗ trợ « %s ». Đang hủy bỏ.\n" -#: src/gns/gnunet-gns-proxy.c:3165 src/gns/gnunet-service-gns.c:403 +#: src/gns/gnunet-gns-proxy.c:3177 src/gns/gnunet-service-gns.c:403 #, c-format msgid "No ego configured for `%s`\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3226 +#: src/gns/gnunet-gns-proxy.c:3238 #, fuzzy, c-format msgid "Failed to load SSL/TLS key and certificate from `%s'\n" msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" -#: src/gns/gnunet-gns-proxy.c:3269 -msgid "listen on specified port (default: 7777)" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3275 -msgid "pem file to use as CA" -msgstr "" - -#: src/gns/gnunet-gns-proxy.c:3300 -msgid "GNUnet GNS proxy" -msgstr "" - -#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 -#, c-format -msgid "Invalid typename specified, assuming `ANY'\n" -msgstr "" - -#: src/gns/gnunet-gns.c:252 -#, c-format -msgid "Please specify name to lookup!\n" -msgstr "" - -#: src/gns/gnunet-gns.c:276 -#, c-format -msgid "Ego for `%s' not found, cannot perform lookup.\n" -msgstr "" - -#: src/gns/gnunet-gns.c:374 -#, c-format -msgid "Public key `%s' is not well-formed\n" -msgstr "" - -#: src/gns/gnunet-gns.c:428 -msgid "Lookup a record for the given name" -msgstr "" - -#: src/gns/gnunet-gns.c:434 -#, fuzzy -msgid "Specify the type of the record to lookup" -msgstr "xác định mức ưu tiên của nội dung" - -#: src/gns/gnunet-gns.c:440 -#, fuzzy -msgid "Specify timeout for the lookup" -msgstr "xác định mức ưu tiên của nội dung" - -#: src/gns/gnunet-gns.c:445 -msgid "No unneeded output" +#: src/gns/gnunet-gns-proxy.c:3281 +msgid "listen on specified port (default: 7777)" msgstr "" -#: src/gns/gnunet-gns.c:451 -#, fuzzy -msgid "Specify the public key of the zone to lookup the record in" -msgstr "xác định mức ưu tiên của nội dung" - -#: src/gns/gnunet-gns.c:457 -#, fuzzy -msgid "Specify the name of the ego of the zone to lookup the record in" -msgstr "xác định mức ưu tiên của nội dung" +#: src/gns/gnunet-gns-proxy.c:3287 +msgid "pem file to use as CA" +msgstr "" -#: src/gns/gnunet-gns.c:476 -#, fuzzy -msgid "GNUnet GNS resolver tool" -msgstr "Bản ghi lỗi GNUnet" +#: src/gns/gnunet-gns-proxy.c:3312 +msgid "GNUnet GNS proxy" +msgstr "" #: src/gns/gnunet-service-gns.c:442 #, fuzzy @@ -4455,35 +4324,45 @@ msgstr "" msgid "Hostname `%s' is not well-formed, resolution fails\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:179 +#: src/gns/plugin_gnsrecord_gns.c:203 #, fuzzy, c-format msgid "Unable to parse PKEY record `%s'\n" msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" -#: src/gns/plugin_gnsrecord_gns.c:208 +#: src/gns/plugin_gnsrecord_gns.c:232 #, fuzzy, c-format msgid "Unable to parse GNS2DNS record `%s'\n" msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" -#: src/gns/plugin_gnsrecord_gns.c:229 +#: src/gns/plugin_gnsrecord_gns.c:253 #, fuzzy, c-format msgid "Failed to serialize GNS2DNS record with value `%s'\n" msgstr "Không thể truy cập đến tập tin gnunet-directory « %s »\n" -#: src/gns/plugin_gnsrecord_gns.c:252 +#: src/gns/plugin_gnsrecord_gns.c:276 #, fuzzy, c-format msgid "Unable to parse VPN record string `%s'\n" msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" -#: src/gns/plugin_gnsrecord_gns.c:288 +#: src/gns/plugin_gnsrecord_gns.c:312 #, fuzzy, c-format msgid "Unable to parse BOX record string `%s'\n" msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" +#: src/gns/plugin_gnsrecord_gns.c:360 +#, fuzzy, c-format +msgid "Unable to parse REVERSE record string `%s'\n" +msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" + #: src/gns/plugin_rest_gns.c:384 msgid "Ego for not found, cannot perform lookup.\n" msgstr "" +#: src/gns/plugin_rest_gns.c:668 +#, fuzzy +msgid "GNS REST API initialized\n" +msgstr "Lỗi sơ khởi lõi.\n" + #: src/gnsrecord/plugin_gnsrecord_dns.c:359 #, fuzzy, c-format msgid "Unable to parse IPv4 address `%s'\n" @@ -4589,37 +4468,37 @@ msgstr "Gặp lỗi khi tạo người dùng" msgid "Modified %u addresses, wrote %u bytes\n" msgstr "" -#: src/hello/hello.c:1103 +#: src/hello/hello.c:1110 #, fuzzy msgid "Failed to parse HELLO message: missing expiration time\n" msgstr "Lỗi lưu cấu hình." -#: src/hello/hello.c:1112 +#: src/hello/hello.c:1119 #, fuzzy msgid "Failed to parse HELLO message: invalid expiration time\n" msgstr "Lỗi lưu cấu hình." -#: src/hello/hello.c:1122 +#: src/hello/hello.c:1129 #, fuzzy msgid "Failed to parse HELLO message: malformed\n" msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" -#: src/hello/hello.c:1133 +#: src/hello/hello.c:1140 #, fuzzy msgid "Failed to parse HELLO message: missing transport plugin\n" msgstr "Không thể nạp phần bổ sung truyền tải « %s »\n" -#: src/hello/hello.c:1151 +#: src/hello/hello.c:1158 #, c-format msgid "Plugin `%s' not found, skipping address\n" msgstr "" -#: src/hello/hello.c:1159 +#: src/hello/hello.c:1166 #, c-format msgid "Plugin `%s' does not support URIs yet\n" msgstr "" -#: src/hello/hello.c:1174 +#: src/hello/hello.c:1181 #, fuzzy, c-format msgid "Failed to parse `%s' as an address for plugin `%s'\n" msgstr "Lỗi đóng kết đến cổng %s %d.\n" @@ -4881,7 +4760,7 @@ msgid "# hostlist advertisements send" msgstr "# Các quảng cáo ngoại được chuyển tiếp" #: src/hostlist/gnunet-daemon-hostlist_server.c:679 -#: src/transport/gnunet-service-transport.c:2803 +#: src/transport/gnunet-service-transport.c:2815 #, fuzzy msgid "Could not access PEERINFO service. Exiting.\n" msgstr "Không thể truy cập đến thông tin về không gian tên.\n" @@ -4926,53 +4805,6 @@ msgstr "« %s » không sẵn sàng.\n" msgid "Could not start hostlist HTTP server on port %u\n" msgstr "Cổng cho trình phục vụ HTTP danh sách máy chủ thống nhất" -#: src/identity-provider/gnunet-idp.c:348 -#, fuzzy -msgid "Ego is required\n" -msgstr "Bị từ chối đặt tùy chọn « %s » trong phần « %s » thành « %s ».\n" - -#: src/identity-provider/gnunet-idp.c:370 -msgid "Add attribute" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:376 -msgid "Attribute value" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:381 -msgid "Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:386 -msgid "Audience (relying party)" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:390 -msgid "List attributes for Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:395 -msgid "Issue a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:400 -msgid "Consume a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:405 -msgid "Revoke a ticket" -msgstr "" - -#: src/identity-provider/identity_provider_api.c:429 -#, fuzzy -msgid "failed to store record\n" -msgstr "Lỗi bắt đầu thu thập.\n" - -#: src/identity-provider/plugin_rest_identity_provider.c:1175 -#, fuzzy -msgid "Identity Provider REST API initialized\n" -msgstr "Lỗi sơ khởi lõi.\n" - #: src/identity/gnunet-identity.c:179 #, fuzzy, c-format msgid "Failed to create ego: %s\n" @@ -5060,11 +4892,34 @@ msgstr "Không thể lưu tập tin cấu hình « %s »:" msgid "Failed to create directory `%s' for storing egos\n" msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" -#: src/identity/plugin_rest_identity.c:964 +#: src/identity/plugin_rest_identity.c:967 #, fuzzy msgid "Identity REST API initialized\n" msgstr "Lỗi sơ khởi lõi.\n" +#: src/identity-provider/gnunet-identity-token.c:66 +#, fuzzy +msgid "Option `-t' is required\n" +msgstr "Bị từ chối đặt tùy chọn « %s » trong phần « %s » thành « %s ».\n" + +#: src/identity-provider/gnunet-identity-token.c:77 +#, fuzzy, c-format +msgid "Token `%s' is malformed\n" +msgstr "Đối số không hợp lệ cho « %s ».\n" + +#: src/identity-provider/gnunet-identity-token.c:166 +msgid "GNUid token" +msgstr "" + +#: src/identity-provider/gnunet-identity-token.c:171 +msgid "Print token contents" +msgstr "" + +#: src/identity-provider/plugin_rest_identity_provider.c:1166 +#, fuzzy +msgid "Identity Token REST API initialized\n" +msgstr "Lỗi sơ khởi lõi.\n" + #: src/json/json.c:119 #, fuzzy, c-format msgid "Failed to parse JSON in option `%s': %s (%s)\n" @@ -5166,79 +5021,19 @@ msgstr "Không thể tạo miền tên.\n" msgid "flat plugin running\n" msgstr "kho dữ liệu sqlite" -#: src/namestore/gnunet-namestore-fcfsd.c:508 -#, fuzzy, c-format -msgid "Unsupported form value `%s'\n" -msgstr "Lệnh không được hỗ trợ « %s ». Đang hủy bỏ.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:535 -#, fuzzy, c-format -msgid "Failed to create record for domain `%s': %s\n" -msgstr "Không thể truy cập đến tập tin gnunet-directory « %s »\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:555 -msgid "Error when mapping zone to name\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:585 -#, c-format -msgid "Found existing name `%s' for the given key\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:662 -#, c-format -msgid "Found %u existing records for domain `%s'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:718 -#, fuzzy, c-format -msgid "Failed to create page for `%s'\n" -msgstr "Không thể tạo miền tên.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:734 -#, fuzzy, c-format -msgid "Failed to setup post processor for `%s'\n" -msgstr "Lỗi cập nhật dữ liệu cho mô-đun « %s »\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:770 -msgid "Domain name must not contain `.'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:778 -msgid "Domain name must not contain `+'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:974 -msgid "No ego configured for `fcfsd` subsystem\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:1000 -#, fuzzy -msgid "Failed to start HTTP server\n" -msgstr "Lỗi bắt đầu thu thập.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1042 -#, fuzzy -msgid "Failed to connect to identity\n" -msgstr "Lỗi kết nối đến gnunetd.\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1074 -msgid "GNU Name System First Come First Serve name registration service" -msgstr "" - #: src/namestore/gnunet-namestore.c:301 #, fuzzy, c-format msgid "Adding record failed: %s\n" msgstr "Gặp lỗi khi tải lên tập tin: %s\n" #: src/namestore/gnunet-namestore.c:330 -#: src/namestore/plugin_rest_namestore.c:567 +#: src/namestore/plugin_rest_namestore.c:562 #, fuzzy, c-format msgid "Deleting record failed, record does not exist%s%s\n" msgstr "Gặp lỗi khi tải lên tập tin: %s\n" #: src/namestore/gnunet-namestore.c:337 -#: src/namestore/plugin_rest_namestore.c:576 +#: src/namestore/plugin_rest_namestore.c:571 #, fuzzy, c-format msgid "Deleting record failed%s%s\n" msgstr "Gặp lỗi khi tải lên tập tin: %s\n" @@ -5256,7 +5051,7 @@ msgid "Records already exist under `%s', cannot add `%s' record.\n" msgstr "" #: src/namestore/gnunet-namestore.c:698 -#: src/namestore/plugin_rest_namestore.c:602 +#: src/namestore/plugin_rest_namestore.c:597 #, c-format msgid "There are no records under label `%s' that could be deleted.\n" msgstr "" @@ -5267,11 +5062,24 @@ msgid "" "There are no records under label `%s' that match the request for deletion.\n" msgstr "" +#: src/namestore/gnunet-namestore.c:776 +#: src/namestore/plugin_rest_namestore.c:1004 +#, c-format +msgid "Ego `%s' not known to identity service\n" +msgstr "" + #: src/namestore/gnunet-namestore.c:791 #, fuzzy, c-format msgid "No options given\n" msgstr "chưa đưa ra tên" +#: src/namestore/gnunet-namestore.c:802 +#: src/namestore/gnunet-namestore-fcfsd.c:1034 +#: src/namestore/plugin_rest_namestore.c:1017 +#, fuzzy +msgid "Failed to connect to namestore\n" +msgstr "Không kết nối được đến trình nền gnunetd." + #: src/namestore/gnunet-namestore.c:810 src/namestore/gnunet-namestore.c:819 #: src/namestore/gnunet-namestore.c:838 src/namestore/gnunet-namestore.c:861 #: src/namestore/gnunet-namestore.c:915 @@ -5285,14 +5093,14 @@ msgid "add" msgstr "" #: src/namestore/gnunet-namestore.c:829 -#: src/namestore/plugin_rest_namestore.c:676 +#: src/namestore/plugin_rest_namestore.c:671 #, fuzzy, c-format msgid "Unsupported type `%s'\n" msgstr "Lệnh không được hỗ trợ « %s ». Đang hủy bỏ.\n" #: src/namestore/gnunet-namestore.c:851 -#: src/namestore/plugin_rest_namestore.c:694 -#: src/namestore/plugin_rest_namestore.c:734 +#: src/namestore/plugin_rest_namestore.c:689 +#: src/namestore/plugin_rest_namestore.c:729 #, c-format msgid "Value `%s' invalid for record type `%s'\n" msgstr "" @@ -5322,13 +5130,13 @@ msgid "Invalid nick `%s'\n" msgstr "Dữ liệu nhập không hợp lệ.\n" #: src/namestore/gnunet-namestore.c:1051 -#: src/namestore/plugin_rest_namestore.c:1052 +#: src/namestore/plugin_rest_namestore.c:1047 #, c-format msgid "No default ego configured in identity service\n" msgstr "" #: src/namestore/gnunet-namestore.c:1108 -#: src/namestore/plugin_rest_namestore.c:1148 +#: src/namestore/plugin_rest_namestore.c:1143 #, fuzzy, c-format msgid "Cannot connect to identity service\n" msgstr "Không thể kết nối tới %s:%u: %s\n" @@ -5391,6 +5199,66 @@ msgstr "" msgid "name of the ego controlling the zone" msgstr "" +#: src/namestore/gnunet-namestore-fcfsd.c:508 +#, fuzzy, c-format +msgid "Unsupported form value `%s'\n" +msgstr "Lệnh không được hỗ trợ « %s ». Đang hủy bỏ.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:535 +#, fuzzy, c-format +msgid "Failed to create record for domain `%s': %s\n" +msgstr "Không thể truy cập đến tập tin gnunet-directory « %s »\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:555 +msgid "Error when mapping zone to name\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:585 +#, c-format +msgid "Found existing name `%s' for the given key\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:662 +#, c-format +msgid "Found %u existing records for domain `%s'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:718 +#, fuzzy, c-format +msgid "Failed to create page for `%s'\n" +msgstr "Không thể tạo miền tên.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:734 +#, fuzzy, c-format +msgid "Failed to setup post processor for `%s'\n" +msgstr "Lỗi cập nhật dữ liệu cho mô-đun « %s »\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:770 +msgid "Domain name must not contain `.'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:778 +msgid "Domain name must not contain `+'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:974 +msgid "No ego configured for `fcfsd` subsystem\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:1000 +#, fuzzy +msgid "Failed to start HTTP server\n" +msgstr "Lỗi bắt đầu thu thập.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1042 +#, fuzzy +msgid "Failed to connect to identity\n" +msgstr "Lỗi kết nối đến gnunetd.\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1074 +msgid "GNU Name System First Come First Serve name registration service" +msgstr "" + #: src/namestore/gnunet-service-namestore.c:615 #, fuzzy, c-format msgid "Failed to replicate block in namecache: %s\n" @@ -5405,7 +5273,7 @@ msgstr "" msgid "flat file database running\n" msgstr "kho dữ liệu sqlite" -#: src/namestore/plugin_rest_namestore.c:1193 +#: src/namestore/plugin_rest_namestore.c:1188 #, fuzzy msgid "Namestore REST API initialized\n" msgstr "Lỗi sơ khởi lõi.\n" @@ -5692,42 +5560,101 @@ msgstr "" msgid "`upnpc' command not found\n" msgstr "" -#: src/nse/gnunet-nse-profiler.c:842 -#, fuzzy -msgid "limit to the number of connections to NSE services, 0 for none" -msgstr "Không kết nối được đến trình nền gnunetd." +#: src/nse/gnunet-nse.c:122 +#, fuzzy +msgid "Show network size estimates from NSE service." +msgstr "# các yêu cầu get (lấy) dht được nhận" + +#: src/nse/gnunet-nse-profiler.c:842 +#, fuzzy +msgid "limit to the number of connections to NSE services, 0 for none" +msgstr "Không kết nối được đến trình nền gnunetd." + +#: src/nse/gnunet-nse-profiler.c:847 +msgid "name of the file for writing connection information and statistics" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:859 +msgid "name of the file for writing the main results" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:866 +msgid "Number of peers to run in each round, separated by commas" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:877 +msgid "delay between rounds" +msgstr "" + +#: src/nse/gnunet-nse-profiler.c:886 +#, fuzzy +msgid "Measure quality and performance of the NSE service." +msgstr "Không thể truy cập đến dịch vụ" + +#: src/nse/gnunet-service-nse.c:1534 +#: src/revocation/gnunet-service-revocation.c:840 src/util/gnunet-scrypt.c:276 +#, fuzzy +msgid "Value is too large.\n" +msgstr "Giá trị không nằm trong phạm vi được phép." + +#: src/peerinfo/gnunet-service-peerinfo.c:178 +#, fuzzy, c-format +msgid "Removing expired address of transport `%s'\n" +msgstr "Đã nạp truyền tải « %s »\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:310 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s': %s\n" +msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:331 +#: src/peerinfo/gnunet-service-peerinfo.c:362 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s'\n" +msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:446 +msgid "# peers known" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:489 +#, c-format +msgid "" +"File `%s' in directory `%s' does not match naming convention. Removed.\n" +msgstr "" +"Tập tin « %s » trong thư mục « %s » không tùy theo quy ước đặt tên. Bị gỡ " +"bỏ.\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:655 +#, fuzzy, c-format +msgid "Scanning directory `%s'\n" +msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" -#: src/nse/gnunet-nse-profiler.c:847 -msgid "name of the file for writing connection information and statistics" -msgstr "" +#: src/peerinfo/gnunet-service-peerinfo.c:663 +#, c-format +msgid "Still no peers found in `%s'!\n" +msgstr "Vẫn còn không tìm thấy đồng đẳng trong « %s ».\n" -#: src/nse/gnunet-nse-profiler.c:859 -msgid "name of the file for writing the main results" -msgstr "" +#: src/peerinfo/gnunet-service-peerinfo.c:1080 +#, fuzzy, c-format +msgid "Cleaning up directory `%s'\n" +msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" -#: src/nse/gnunet-nse-profiler.c:866 -msgid "Number of peers to run in each round, separated by commas" +#: src/peerinfo/gnunet-service-peerinfo.c:1409 +#, c-format +msgid "Importing HELLOs from `%s'\n" msgstr "" -#: src/nse/gnunet-nse-profiler.c:877 -msgid "delay between rounds" +#: src/peerinfo/gnunet-service-peerinfo.c:1422 +msgid "Skipping import of included HELLOs\n" msgstr "" -#: src/nse/gnunet-nse-profiler.c:886 -#, fuzzy -msgid "Measure quality and performance of the NSE service." -msgstr "Không thể truy cập đến dịch vụ" - -#: src/nse/gnunet-nse.c:122 -#, fuzzy -msgid "Show network size estimates from NSE service." -msgstr "# các yêu cầu get (lấy) dht được nhận" - -#: src/nse/gnunet-service-nse.c:1534 -#: src/revocation/gnunet-service-revocation.c:838 src/util/gnunet-scrypt.c:276 +#: src/peerinfo/peerinfo_api.c:220 #, fuzzy -msgid "Value is too large.\n" -msgstr "Giá trị không nằm trong phạm vi được phép." +msgid "Failed to receive response from `PEERINFO' service." +msgstr "" +"\n" +"Không nhận được đáp ứng từ gnunetd.\n" #: src/peerinfo-tool/gnunet-peerinfo.c:239 #, fuzzy, c-format @@ -5820,65 +5747,6 @@ msgstr "Đang nạp các truyền tải « %s »\n" msgid "Failed to load transport plugin for `%s'\n" msgstr "Không thể nạp phần bổ sung truyền tải « %s »\n" -#: src/peerinfo/gnunet-service-peerinfo.c:178 -#, fuzzy, c-format -msgid "Removing expired address of transport `%s'\n" -msgstr "Đã nạp truyền tải « %s »\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:310 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s': %s\n" -msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:331 -#: src/peerinfo/gnunet-service-peerinfo.c:362 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s'\n" -msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:446 -msgid "# peers known" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:489 -#, c-format -msgid "" -"File `%s' in directory `%s' does not match naming convention. Removed.\n" -msgstr "" -"Tập tin « %s » trong thư mục « %s » không tùy theo quy ước đặt tên. Bị gỡ " -"bỏ.\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:655 -#, fuzzy, c-format -msgid "Scanning directory `%s'\n" -msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:663 -#, c-format -msgid "Still no peers found in `%s'!\n" -msgstr "Vẫn còn không tìm thấy đồng đẳng trong « %s ».\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1076 -#, fuzzy, c-format -msgid "Cleaning up directory `%s'\n" -msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1405 -#, c-format -msgid "Importing HELLOs from `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1418 -msgid "Skipping import of included HELLOs\n" -msgstr "" - -#: src/peerinfo/peerinfo_api.c:220 -#, fuzzy -msgid "Failed to receive response from `PEERINFO' service." -msgstr "" -"\n" -"Không nhận được đáp ứng từ gnunetd.\n" - #: src/peerstore/gnunet-peerstore.c:91 msgid "peerstore" msgstr "" @@ -6329,12 +6197,12 @@ msgstr "# các khoá phiên chạy được chấp nhận" msgid "# revocation set unions completed" msgstr "# các sự truyền PONG bị lỗi" -#: src/revocation/gnunet-service-revocation.c:524 -#: src/revocation/gnunet-service-revocation.c:771 +#: src/revocation/gnunet-service-revocation.c:525 +#: src/revocation/gnunet-service-revocation.c:773 msgid "SET service crashed, terminating revocation service\n" msgstr "" -#: src/revocation/gnunet-service-revocation.c:862 +#: src/revocation/gnunet-service-revocation.c:864 #, fuzzy msgid "Could not open revocation database file!" msgstr "« %s »: Không thể kết nối.\n" @@ -6398,10 +6266,10 @@ msgstr "" msgid "Calculate the Vectorproduct with a GNUnet peer." msgstr "" -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #: src/scalarproduct/gnunet-service-scalarproduct_alice.c:1401 #: src/scalarproduct/gnunet-service-scalarproduct_bob.c:1345 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #, fuzzy msgid "Connect to CADET failed\n" msgstr " Không kết nối được (lỗi ?)\n" @@ -6618,7 +6486,7 @@ msgstr "« %s » không giải quyết được phương pháp « %s », với l msgid "Wrote %llu bytes of statistics to `%s'\n" msgstr "Đã tải %llu byte xuống « %s ».\n" -#: src/statistics/gnunet-service-statistics.c:1084 +#: src/statistics/gnunet-service-statistics.c:1086 #, fuzzy, c-format msgid "Loading %llu bytes of statistics from `%s'\n" msgstr "Đã tải %llu byte xuống « %s ».\n" @@ -6747,7 +6615,7 @@ msgid "Invalid argument `%s'; expecting unsigned int\n" msgstr "Đối số không hợp lệ cho « %s ».\n" #: src/testbed/generate-underlay-topology.c:342 -#: src/testbed/gnunet-testbed-profiler.c:284 +#: src/testbed/gnunet-testbed-profiler.c:283 msgid "create COUNT number of peers" msgstr "" @@ -6785,13 +6653,13 @@ msgid "" "deployments" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:231 src/testing/list-keys.c:46 -#: src/testing/testing.c:288 src/util/gnunet-ecc.c:301 +#: src/testbed/gnunet-daemon-testbed-underlay.c:233 src/testing/list-keys.c:46 +#: src/testing/testing.c:288 src/util/gnunet-ecc.c:306 #, c-format msgid "Incorrect hostkey file format: %s\n" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:469 +#: src/testbed/gnunet-daemon-testbed-underlay.c:471 msgid "Daemon to restrict underlay network in testbed deployments" msgstr "" @@ -6856,17 +6724,6 @@ msgstr "« %s » đang tắt.\n" msgid "%.s Unknown result code." msgstr "" -#: src/testbed/gnunet-testbed-profiler.c:290 -msgid "tolerate COUNT number of continious timeout failures" -msgstr "" - -#: src/testbed/gnunet-testbed-profiler.c:295 -msgid "" -"run profiler in non-interactive mode where upon testbed setup the profiler " -"does not wait for a keystroke but continues to run until a termination " -"signal is received" -msgstr "" - #: src/testbed/gnunet_testbed_mpi_spawn.c:118 #, fuzzy msgid "Waiting for child to exit.\n" @@ -6877,6 +6734,17 @@ msgstr "Đang đợi các đồng đẳng kết nối" msgid "Spawning process `%s'\n" msgstr "Đang bắt đầu tài về « %s »\n" +#: src/testbed/gnunet-testbed-profiler.c:289 +msgid "tolerate COUNT number of continious timeout failures" +msgstr "" + +#: src/testbed/gnunet-testbed-profiler.c:294 +msgid "" +"run profiler in non-interactive mode where upon testbed setup the profiler " +"does not wait for a keystroke but continues to run until a termination " +"signal is received" +msgstr "" + #: src/testbed/testbed_api.c:410 #, fuzzy, c-format msgid "Adding host %u failed with error: %s\n" @@ -7179,59 +7047,59 @@ msgstr "# các thông báo PONG đã mật mã được nhận" msgid "GNUnet topology control" msgstr "" +#: src/transport/gnunet-service-transport_ats.c:141 +msgid "# Addresses given to ATS" +msgstr "" + #: src/transport/gnunet-service-transport.c:448 #, fuzzy msgid "# messages dropped due to slow client" msgstr "# các yêu cầu lỗ hổng bị bỏ do trọng tải" -#: src/transport/gnunet-service-transport.c:809 +#: src/transport/gnunet-service-transport.c:818 msgid "# bytes payload dropped (other peer was not connected)" msgstr "" -#: src/transport/gnunet-service-transport.c:1539 +#: src/transport/gnunet-service-transport.c:1551 #, fuzzy msgid "# bytes payload discarded due to not connected peer" msgstr "# Các quảng cáo đồng đẳng bị hủy do trọng tải" -#: src/transport/gnunet-service-transport.c:1699 +#: src/transport/gnunet-service-transport.c:1711 #, fuzzy msgid "# bytes total received" msgstr "# tổng số nội dung lỗ hổng được nhận" -#: src/transport/gnunet-service-transport.c:1796 +#: src/transport/gnunet-service-transport.c:1808 #, fuzzy msgid "# bytes payload received" msgstr "# các byte đã giải mã" -#: src/transport/gnunet-service-transport.c:2113 -#: src/transport/gnunet-service-transport.c:2585 +#: src/transport/gnunet-service-transport.c:2125 +#: src/transport/gnunet-service-transport.c:2597 msgid "# disconnects due to blacklist" msgstr "" -#: src/transport/gnunet-service-transport.c:2589 +#: src/transport/gnunet-service-transport.c:2601 #, fuzzy, c-format msgid "Disallowing connection to peer `%s' on transport %s\n" msgstr "Không thể nạp phần bổ sung truyền tải « %s »\n" -#: src/transport/gnunet-service-transport.c:2697 +#: src/transport/gnunet-service-transport.c:2709 #, fuzzy, c-format msgid "Adding blacklisting entry for peer `%s'\n" msgstr "Không thể lấy địa chỉ của đồng đẳng « %s ».\n" -#: src/transport/gnunet-service-transport.c:2706 +#: src/transport/gnunet-service-transport.c:2718 #, c-format msgid "Adding blacklisting entry for peer `%s':`%s'\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2771 +#: src/transport/gnunet-service-transport.c:2783 #, fuzzy msgid "Transport service is lacking key configuration settings. Exiting.\n" msgstr "Lưu cấu hình ngay bây giờ không?" -#: src/transport/gnunet-service-transport_ats.c:141 -msgid "# Addresses given to ATS" -msgstr "" - #: src/transport/gnunet-service-transport_hello.c:195 msgid "# refreshed my HELLO" msgstr "" @@ -7382,74 +7250,74 @@ msgstr "# các thông báo PING được tạo" msgid "SYN request from peer `%s' ignored due impending shutdown\n" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:2620 +#: src/transport/gnunet-service-transport_neighbours.c:2623 msgid "# Attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3102 +#: src/transport/gnunet-service-transport_neighbours.c:3105 #, fuzzy msgid "# SYN_ACK messages received" msgstr "# các thông báo PONG đã mật mã được nhận" -#: src/transport/gnunet-service-transport_neighbours.c:3110 +#: src/transport/gnunet-service-transport_neighbours.c:3113 #, fuzzy msgid "# unexpected SYN_ACK messages (no peer)" msgstr "gửi ĐẾM thông báo" -#: src/transport/gnunet-service-transport_neighbours.c:3128 -#: src/transport/gnunet-service-transport_neighbours.c:3152 +#: src/transport/gnunet-service-transport_neighbours.c:3131 +#: src/transport/gnunet-service-transport_neighbours.c:3155 #, fuzzy msgid "# unexpected SYN_ACK messages (not ready)" msgstr "gửi ĐẾM thông báo" -#: src/transport/gnunet-service-transport_neighbours.c:3164 +#: src/transport/gnunet-service-transport_neighbours.c:3167 #, fuzzy msgid "# unexpected SYN_ACK messages (waiting on ATS)" msgstr "gửi ĐẾM thông báo" -#: src/transport/gnunet-service-transport_neighbours.c:3189 +#: src/transport/gnunet-service-transport_neighbours.c:3192 msgid "# Successful attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3202 +#: src/transport/gnunet-service-transport_neighbours.c:3205 #, fuzzy msgid "# unexpected SYN_ACK messages (disconnecting)" msgstr "gửi ĐẾM thông báo" -#: src/transport/gnunet-service-transport_neighbours.c:3374 +#: src/transport/gnunet-service-transport_neighbours.c:3377 #, fuzzy msgid "# ACK messages received" msgstr "# các thông báo PONG đã mật mã được nhận" -#: src/transport/gnunet-service-transport_neighbours.c:3410 +#: src/transport/gnunet-service-transport_neighbours.c:3413 #, fuzzy msgid "# unexpected ACK messages" msgstr "# các thông báo PONG đã mật mã được gửi" -#: src/transport/gnunet-service-transport_neighbours.c:3498 +#: src/transport/gnunet-service-transport_neighbours.c:3501 #, fuzzy msgid "# quota messages ignored (malformed)" msgstr "# các yêu cầu lỗ hổng bị bỏ do trọng tải" -#: src/transport/gnunet-service-transport_neighbours.c:3505 +#: src/transport/gnunet-service-transport_neighbours.c:3508 #, fuzzy msgid "# QUOTA messages received" msgstr "# các thông báo PONG đã mật mã được nhận" -#: src/transport/gnunet-service-transport_neighbours.c:3545 +#: src/transport/gnunet-service-transport_neighbours.c:3548 msgid "# disconnect messages ignored (malformed)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3552 +#: src/transport/gnunet-service-transport_neighbours.c:3555 #, fuzzy msgid "# DISCONNECT messages received" msgstr "# các thông báo PONG đã mật mã được nhận" -#: src/transport/gnunet-service-transport_neighbours.c:3563 +#: src/transport/gnunet-service-transport_neighbours.c:3566 msgid "# disconnect messages ignored (timestamp)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3697 +#: src/transport/gnunet-service-transport_neighbours.c:3700 #, fuzzy msgid "# disconnected from peer upon explicit request" msgstr "# các yêu cầu lỗ hổng bị bỏ do trọng tải" @@ -7484,8 +7352,8 @@ msgstr "" #: src/transport/gnunet-service-transport_validation.c:491 #: src/transport/gnunet-service-transport_validation.c:677 -#: src/transport/gnunet-service-transport_validation.c:988 -#: src/transport/gnunet-service-transport_validation.c:1590 +#: src/transport/gnunet-service-transport_validation.c:997 +#: src/transport/gnunet-service-transport_validation.c:1609 #, fuzzy msgid "# validations running" msgstr "kho dữ liệu sqlite" @@ -7511,101 +7379,61 @@ msgstr "" msgid "# address revalidations started" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1114 +#: src/transport/gnunet-service-transport_validation.c:1123 #, fuzzy msgid "# PING message for different peer received" msgstr "# các thông báo PING được tạo" -#: src/transport/gnunet-service-transport_validation.c:1165 +#: src/transport/gnunet-service-transport_validation.c:1174 #, c-format msgid "Plugin `%s' not available, cannot confirm having this address\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1178 +#: src/transport/gnunet-service-transport_validation.c:1187 msgid "# failed address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1181 +#: src/transport/gnunet-service-transport_validation.c:1190 #, c-format msgid "Address `%s' is not one of my addresses, not confirming PING\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1189 +#: src/transport/gnunet-service-transport_validation.c:1198 msgid "# successful address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1202 +#: src/transport/gnunet-service-transport_validation.c:1211 #, c-format msgid "" "Not confirming PING from peer `%s' with address `%s' since I cannot confirm " "having this address.\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1257 +#: src/transport/gnunet-service-transport_validation.c:1266 #, fuzzy, c-format msgid "Failed to create PONG signature for peer `%s'\n" msgstr "Không thể tạo miền tên.\n" -#: src/transport/gnunet-service-transport_validation.c:1308 +#: src/transport/gnunet-service-transport_validation.c:1317 msgid "# PONGs unicast via reliable transport" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1317 +#: src/transport/gnunet-service-transport_validation.c:1326 msgid "# PONGs multicast to all available addresses" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1480 +#: src/transport/gnunet-service-transport_validation.c:1499 msgid "# PONGs dropped, no matching pending validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1498 +#: src/transport/gnunet-service-transport_validation.c:1517 msgid "# PONGs dropped, signature expired" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1553 +#: src/transport/gnunet-service-transport_validation.c:1572 msgid "# validations succeeded" msgstr "" -#: src/transport/gnunet-transport-profiler.c:219 -#, c-format -msgid "%llu B in %llu ms == %.2f KB/s!\n" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:617 -msgid "send data to peer" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:621 -#, fuzzy -msgid "receive data from peer" -msgstr "Yêu cầu cấp %d từ đồng đẳng %d\n" - -#: src/transport/gnunet-transport-profiler.c:626 -#, fuzzy -msgid "iterations" -msgstr "Tùy chọn chung" - -#: src/transport/gnunet-transport-profiler.c:631 -#, fuzzy -msgid "number of messages to send" -msgstr "số tin nhắn cần dùng mỗi lần lặp" - -#: src/transport/gnunet-transport-profiler.c:636 -#, fuzzy -msgid "message size to use" -msgstr "kích cỡ tin nhắn" - -#: src/transport/gnunet-transport-profiler.c:641 -#: src/transport/gnunet-transport.c:1462 -msgid "peer identity" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:652 -#: src/transport/gnunet-transport.c:1482 -#, fuzzy -msgid "Direct access to transport service." -msgstr "Lỗi kết nối đến gnunetd.\n" - #: src/transport/gnunet-transport.c:413 #, fuzzy, c-format msgid "Transmitted %llu bytes/s (%llu bytes in %s)\n" @@ -7745,6 +7573,11 @@ msgstr "In ra thông tin về các đồng đẳng GNUnet." msgid "do not resolve hostnames" msgstr "không quyết định các tên máy" +#: src/transport/gnunet-transport.c:1462 +#: src/transport/gnunet-transport-profiler.c:641 +msgid "peer identity" +msgstr "" + #: src/transport/gnunet-transport.c:1466 msgid "monitor plugin sessions" msgstr "" @@ -7753,6 +7586,41 @@ msgstr "" msgid "send data for benchmarking to the other peer (until CTRL-C)" msgstr "" +#: src/transport/gnunet-transport.c:1482 +#: src/transport/gnunet-transport-profiler.c:652 +#, fuzzy +msgid "Direct access to transport service." +msgstr "Lỗi kết nối đến gnunetd.\n" + +#: src/transport/gnunet-transport-profiler.c:219 +#, c-format +msgid "%llu B in %llu ms == %.2f KB/s!\n" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:617 +msgid "send data to peer" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:621 +#, fuzzy +msgid "receive data from peer" +msgstr "Yêu cầu cấp %d từ đồng đẳng %d\n" + +#: src/transport/gnunet-transport-profiler.c:626 +#, fuzzy +msgid "iterations" +msgstr "Tùy chọn chung" + +#: src/transport/gnunet-transport-profiler.c:631 +#, fuzzy +msgid "number of messages to send" +msgstr "số tin nhắn cần dùng mỗi lần lặp" + +#: src/transport/gnunet-transport-profiler.c:636 +#, fuzzy +msgid "message size to use" +msgstr "kích cỡ tin nhắn" + #: src/transport/plugin_transport_http_client.c:1474 #: src/transport/plugin_transport_http_server.c:2312 #: src/transport/plugin_transport_http_server.c:3526 @@ -8031,6 +7899,21 @@ msgstr "" msgid "TCP transport advertises itself as being on port %llu\n" msgstr "" +#: src/transport/plugin_transport_udp_broadcasting.c:168 +#, fuzzy +msgid "# Multicast HELLO beacons received via UDP" +msgstr "# các thông báo PONG đã mật mã được nhận" + +#: src/transport/plugin_transport_udp_broadcasting.c:548 +msgid "" +"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" +msgstr "" + +#: src/transport/plugin_transport_udp_broadcasting.c:565 +#, c-format +msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" +msgstr "" + #: src/transport/plugin_transport_udp.c:3366 #, c-format msgid "" @@ -8079,21 +7962,6 @@ msgstr "« %s » không sẵn sàng.\n" msgid "Failed to create UDP network sockets\n" msgstr "Không thể tạo miền tên.\n" -#: src/transport/plugin_transport_udp_broadcasting.c:168 -#, fuzzy -msgid "# Multicast HELLO beacons received via UDP" -msgstr "# các thông báo PONG đã mật mã được nhận" - -#: src/transport/plugin_transport_udp_broadcasting.c:548 -msgid "" -"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" -msgstr "" - -#: src/transport/plugin_transport_udp_broadcasting.c:565 -#, c-format -msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" -msgstr "" - #: src/transport/plugin_transport_unix.c:1403 #, fuzzy, c-format msgid "Cannot create path to `%s'\n" @@ -8208,7 +8076,7 @@ msgid "" "`GNUNET_SERVER_receive_done' after %s\n" msgstr "" -#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2336 +#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2346 #, fuzzy, c-format msgid "Unknown address family %d\n" msgstr "\tKhông rõ miền tên « %s »\n" @@ -8284,19 +8152,19 @@ msgstr "Không thể thay đổi người dùng/nhóm thành « %s »: %s\n" msgid "do daemonize (detach from terminal)" msgstr "" -#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:244 +#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:255 #: src/util/service.c:1790 #, fuzzy, c-format msgid "Malformed configuration file `%s', exit ...\n" msgstr "Không thể lưu tập tin cấu hình « %s »:" -#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:261 +#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:272 #: src/util/service.c:1801 #, fuzzy msgid "Malformed configuration, exit ...\n" msgstr "Không thể lưu tập tin cấu hình « %s »:" -#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:256 +#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:267 #: src/util/service.c:1807 #, fuzzy, c-format msgid "Could not access configuration file `%s'\n" @@ -8336,7 +8204,7 @@ msgstr "" msgid "Metadata `%s' failed to deserialize" msgstr "" -#: src/util/client.c:882 +#: src/util/client.c:911 #, c-format msgid "Need a non-empty hostname for service `%s'.\n" msgstr "" @@ -8438,22 +8306,22 @@ msgid "" "%llu)\n" msgstr "" -#: src/util/crypto_ecc.c:777 +#: src/util/crypto_ecc.c:810 #, fuzzy, c-format msgid "ECC signing failed at %s:%d: %s\n" msgstr "%s bị lỗi tại %s:%d: « %s »\n" -#: src/util/crypto_ecc.c:827 +#: src/util/crypto_ecc.c:860 #, fuzzy, c-format msgid "EdDSA signing failed at %s:%d: %s\n" msgstr "%s bị lỗi tại %s:%d: « %s »\n" -#: src/util/crypto_ecc.c:901 +#: src/util/crypto_ecc.c:934 #, fuzzy, c-format msgid "ECDSA signature verification failed at %s:%d: %s\n" msgstr "Lỗi thẩm tra chữ ký RSA tại %s:%d: %s\n" -#: src/util/crypto_ecc.c:958 +#: src/util/crypto_ecc.c:991 #, fuzzy, c-format msgid "EdDSA signature verification failed at %s:%d: %s\n" msgstr "Lỗi thẩm tra chữ ký RSA tại %s:%d: %s\n" @@ -8678,86 +8546,90 @@ msgstr "" msgid "Manipulate GNUnet configuration files" msgstr "cập nhật một giá trị trong tập tin cấu hình" -#: src/util/gnunet-ecc.c:89 +#: src/util/gnunet-ecc.c:94 #, fuzzy, c-format msgid "Failed to open `%s': %s\n" msgstr "Lỗi mở tập tin ghi sự kiện « %s »: %s\n" -#: src/util/gnunet-ecc.c:125 +#: src/util/gnunet-ecc.c:130 #, c-format msgid "Generating %u keys like %s, please wait" msgstr "" -#: src/util/gnunet-ecc.c:138 +#: src/util/gnunet-ecc.c:143 #, c-format msgid "Generating %u keys, please wait" msgstr "" -#: src/util/gnunet-ecc.c:179 +#: src/util/gnunet-ecc.c:184 #, fuzzy, c-format msgid "" "\n" "Failed to write to `%s': %s\n" msgstr "Lỗi chạy %s: %s %d\n" -#: src/util/gnunet-ecc.c:189 +#: src/util/gnunet-ecc.c:194 #, c-format msgid "" "\n" "Finished!\n" msgstr "" -#: src/util/gnunet-ecc.c:192 +#: src/util/gnunet-ecc.c:197 #, c-format msgid "" "\n" "Error, %u keys not generated\n" msgstr "" -#: src/util/gnunet-ecc.c:283 +#: src/util/gnunet-ecc.c:288 #, fuzzy, c-format msgid "Hostkeys file `%s' not found\n" msgstr "Khoá phiên chạy từ đồng đẳng « %s » không thể được thẩm tra.\n" -#: src/util/gnunet-ecc.c:294 +#: src/util/gnunet-ecc.c:299 #, fuzzy, c-format msgid "Hostkeys file `%s' is empty\n" msgstr "Định dạng của tập tin « %s » là không hợp lệ.\n" -#: src/util/gnunet-ecc.c:316 +#: src/util/gnunet-ecc.c:321 #, fuzzy, c-format msgid "Could not read hostkey file: %s\n" msgstr "Không thể đọc danh sách bạn bè « %s »\n" -#: src/util/gnunet-ecc.c:367 +#: src/util/gnunet-ecc.c:372 msgid "No hostkey file specified on command line\n" msgstr "" -#: src/util/gnunet-ecc.c:425 +#: src/util/gnunet-ecc.c:437 msgid "list keys included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:430 +#: src/util/gnunet-ecc.c:442 msgid "number of keys to list included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:435 +#: src/util/gnunet-ecc.c:447 msgid "create COUNT public-private key pairs (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:439 +#: src/util/gnunet-ecc.c:451 msgid "print the public key in ASCII format" msgstr "" -#: src/util/gnunet-ecc.c:443 +#: src/util/gnunet-ecc.c:455 +msgid "print the private key in ASCII format" +msgstr "" + +#: src/util/gnunet-ecc.c:459 msgid "print the public key in HEX format" msgstr "" -#: src/util/gnunet-ecc.c:447 +#: src/util/gnunet-ecc.c:463 msgid "print examples of ECC operations (used for compatibility testing)" msgstr "" -#: src/util/gnunet-ecc.c:463 +#: src/util/gnunet-ecc.c:479 #, fuzzy msgid "Manipulate GNUnet private ECC key files" msgstr "cập nhật một giá trị trong tập tin cấu hình" @@ -8917,22 +8789,22 @@ msgid "" "resolution will be unavailable.\n" msgstr "" -#: src/util/resolver_api.c:826 +#: src/util/resolver_api.c:827 #, fuzzy, c-format msgid "Timeout trying to resolve hostname `%s'.\n" msgstr "không quyết định các tên máy" -#: src/util/resolver_api.c:839 +#: src/util/resolver_api.c:840 #, fuzzy, c-format msgid "Timeout trying to resolve IP address `%s'.\n" msgstr "GNUnet bây giờ sử dụng địa chỉ IP %s.\n" -#: src/util/resolver_api.c:1023 +#: src/util/resolver_api.c:1024 msgid "Resolver not configured correctly.\n" msgstr "" -#: src/util/resolver_api.c:1109 src/util/resolver_api.c:1132 -#: src/util/resolver_api.c:1146 +#: src/util/resolver_api.c:1110 src/util/resolver_api.c:1133 +#: src/util/resolver_api.c:1147 #, fuzzy, c-format msgid "Could not resolve our FQDN: %s\n" msgstr "Không thể giải quyết « %s » (%s): %s\n" @@ -8942,7 +8814,7 @@ msgid "" "Could not bind to any of the ports I was supposed to, refusing to run!\n" msgstr "" -#: src/util/service.c:2081 +#: src/util/service.c:2091 #, c-format msgid "" "Processing code for message of type %u did not call " @@ -9129,65 +9001,65 @@ msgstr "" msgid "# ICMPv6 packets dropped (not allowed)" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2232 +#: src/vpn/gnunet-service-vpn.c:2235 #, fuzzy msgid "# Packets received from TUN interface" msgstr "# các đáp ứng lỗ hổng được gửi cho trình/máy khách" -#: src/vpn/gnunet-service-vpn.c:2265 src/vpn/gnunet-service-vpn.c:2301 +#: src/vpn/gnunet-service-vpn.c:2268 src/vpn/gnunet-service-vpn.c:2304 #, c-format msgid "Packet received for unmapped destination `%s' (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2311 +#: src/vpn/gnunet-service-vpn.c:2314 msgid "Received IPv4 packet with options (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2325 +#: src/vpn/gnunet-service-vpn.c:2328 #, c-format msgid "Received packet of unknown protocol %d from TUN (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2364 +#: src/vpn/gnunet-service-vpn.c:2367 msgid "Failed to find unallocated IPv4 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2419 +#: src/vpn/gnunet-service-vpn.c:2422 msgid "Failed to find unallocated IPv6 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2461 src/vpn/gnunet-service-vpn.c:2683 +#: src/vpn/gnunet-service-vpn.c:2464 src/vpn/gnunet-service-vpn.c:2686 #, fuzzy msgid "# Active destinations" msgstr "# các kết nối dht" -#: src/vpn/gnunet-service-vpn.c:2732 +#: src/vpn/gnunet-service-vpn.c:2735 msgid "Failed to allocate IP address for new destination\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2995 +#: src/vpn/gnunet-service-vpn.c:2998 #, fuzzy msgid "Must specify valid IPv6 address" msgstr "« %s » không sẵn sàng.\n" -#: src/vpn/gnunet-service-vpn.c:3019 +#: src/vpn/gnunet-service-vpn.c:3022 msgid "Must specify valid IPv6 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3027 +#: src/vpn/gnunet-service-vpn.c:3030 msgid "IPv6 support disabled as this system does not support IPv6\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3040 +#: src/vpn/gnunet-service-vpn.c:3043 #, fuzzy msgid "Must specify valid IPv4 address" msgstr "« %s » không sẵn sàng.\n" -#: src/vpn/gnunet-service-vpn.c:3053 +#: src/vpn/gnunet-service-vpn.c:3056 msgid "Must specify valid IPv4 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3063 +#: src/vpn/gnunet-service-vpn.c:3066 msgid "IPv4 support disabled as this system does not support IPv4\n" msgstr "" @@ -9281,10 +9153,6 @@ msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" msgstr "« %s » thất bại ở tập tin « %s » tại %s:%d với lỗi: %s\n" #, fuzzy -#~ msgid "Token `%s' is malformed\n" -#~ msgstr "Đối số không hợp lệ cho « %s ».\n" - -#, fuzzy #~ msgid "Failed to create indices\n" #~ msgstr "Không thể tạo miền tên.\n" diff --git a/po/zh_CN.po b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gnunet-0.8.1\n" "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" -"POT-Creation-Date: 2017-10-20 15:14+0000\n" +"POT-Creation-Date: 2018-01-02 02:33+0100\n" "PO-Revision-Date: 2011-07-09 12:12+0800\n" "Last-Translator: Wylmer Wang <wantinghard@gmail.com>\n" "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" @@ -239,14 +239,14 @@ msgid "Require valid port number for service `%s' in configuration!\n" msgstr "" #: src/arm/gnunet-service-arm.c:430 src/transport/plugin_transport_tcp.c:1176 -#: src/transport/tcp_service_legacy.c:613 src/util/client.c:480 +#: src/transport/tcp_service_legacy.c:613 src/util/client.c:505 #: src/util/service.c:682 #, c-format msgid "UNIXPATH `%s' too long, maximum length is %llu\n" msgstr "" #: src/arm/gnunet-service-arm.c:434 src/transport/plugin_transport_tcp.c:1180 -#: src/transport/tcp_service_legacy.c:617 src/util/client.c:485 +#: src/transport/tcp_service_legacy.c:617 src/util/client.c:510 #: src/util/service.c:687 #, fuzzy, c-format msgid "Using `%s' instead\n" @@ -349,15 +349,133 @@ msgstr "" msgid "Initiating shutdown as requested by client.\n" msgstr "" -#: src/ats-tests/ats-testing-log.c:837 -msgid "Stop logging\n" +#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 +#, c-format +msgid "" +"Could not load quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" msgstr "" -#: src/ats-tests/ats-testing-log.c:892 -#, fuzzy, c-format -msgid "Start logging `%s'\n" +#: src/ats/gnunet-ats-solver-eval.c:2799 +#, c-format +msgid "" +"No outbound quota configured for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:2840 +#, c-format +msgid "" +"No outbound quota configure for network `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3294 src/ats-tests/gnunet-solver-eval.c:939 +msgid "solver to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3299 src/ats-tests/gnunet-solver-eval.c:945 +#: src/ats-tests/gnunet-solver-eval.c:950 +msgid "experiment to use" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3306 +#, fuzzy +msgid "print logging" msgstr "未知的命令“%s”。\n" +#: src/ats/gnunet-ats-solver-eval.c:3311 +msgid "save logging to disk" +msgstr "" + +#: src/ats/gnunet-ats-solver-eval.c:3316 +msgid "disable normalization" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:304 +#, c-format +msgid "" +"Could not load %s quota for network `%s': `%s', assigning default bandwidth " +"%llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:314 +#, c-format +msgid "%s quota configured for network `%s' is %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:359 +#, c-format +msgid "" +"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" +msgstr "" + +#: src/ats/gnunet-service-ats_plugins.c:451 +#, fuzzy, c-format +msgid "Failed to initialize solver `%s'!\n" +msgstr "无法初始化 SQLite:%s。\n" + +#: src/ats/plugin_ats_mlp.c:1274 +msgid "Problem size too large, cannot allocate memory!\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1869 +#, c-format +msgid "Adding address for peer `%s' multiple times\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:1913 +#, c-format +msgid "Updating address property for peer `%s' %p not added before\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2475 +msgid "" +"MLP solver is not optimizing for anything, changing to feasibility check\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 +#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 +#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 +#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 +#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 +#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 +#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 +#, fuzzy, c-format +msgid "Invalid %s configuration %f \n" +msgstr "解析配置文件“%s”失败\n" + +#: src/ats/plugin_ats_mlp.c:2670 +#, c-format +msgid "" +"Adjusting inconsistent outbound quota configuration for network `%s', is " +"%llu must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2679 +#, c-format +msgid "" +"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " +"must be at least %llu\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2689 +#, c-format +msgid "" +"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_mlp.c:2698 +#, c-format +msgid "" +"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" +msgstr "" + +#: src/ats/plugin_ats_proportional.c:1164 +#, fuzzy, c-format +msgid "Invalid %s configuration %f\n" +msgstr "解析配置文件“%s”失败\n" + #: src/ats-tests/ats-testing.c:422 #, c-format msgid "Connected master [%u] with slave [%u]\n" @@ -368,6 +486,15 @@ msgstr "" msgid "Failed to connect master peer [%u] with slave [%u]\n" msgstr "初始化“%s”服务失败。\n" +#: src/ats-tests/ats-testing-log.c:837 +msgid "Stop logging\n" +msgstr "" + +#: src/ats-tests/ats-testing-log.c:892 +#, fuzzy, c-format +msgid "Start logging `%s'\n" +msgstr "未知的命令“%s”。\n" + #: src/ats-tests/gnunet-ats-sim.c:90 #, c-format msgid "" @@ -375,15 +502,6 @@ msgid "" "= %u KiB/s\n" msgstr "" -#: src/ats-tests/gnunet-solver-eval.c:939 src/ats/gnunet-ats-solver-eval.c:3294 -msgid "solver to use" -msgstr "" - -#: src/ats-tests/gnunet-solver-eval.c:945 -#: src/ats-tests/gnunet-solver-eval.c:950 src/ats/gnunet-ats-solver-eval.c:3299 -msgid "experiment to use" -msgstr "" - #: src/ats-tool/gnunet-ats.c:307 #, c-format msgid "%u address resolutions had a timeout\n" @@ -505,124 +623,6 @@ msgstr "" msgid "Print information about ATS state" msgstr "无法获取有关用户“%s”的信息:%s\n" -#: src/ats/gnunet-ats-solver-eval.c:2781 src/ats/gnunet-ats-solver-eval.c:2822 -#, c-format -msgid "" -"Could not load quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2799 -#, c-format -msgid "" -"No outbound quota configured for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:2840 -#, c-format -msgid "" -"No outbound quota configure for network `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3306 -#, fuzzy -msgid "print logging" -msgstr "未知的命令“%s”。\n" - -#: src/ats/gnunet-ats-solver-eval.c:3311 -msgid "save logging to disk" -msgstr "" - -#: src/ats/gnunet-ats-solver-eval.c:3316 -msgid "disable normalization" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:304 -#, c-format -msgid "" -"Could not load %s quota for network `%s': `%s', assigning default bandwidth " -"%llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:314 -#, c-format -msgid "%s quota configured for network `%s' is %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:359 -#, c-format -msgid "" -"No %s-quota configured for network `%s', assigning default bandwidth %llu\n" -msgstr "" - -#: src/ats/gnunet-service-ats_plugins.c:451 -#, fuzzy, c-format -msgid "Failed to initialize solver `%s'!\n" -msgstr "无法初始化 SQLite:%s。\n" - -#: src/ats/plugin_ats_mlp.c:1274 -msgid "Problem size too large, cannot allocate memory!\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1869 -#, c-format -msgid "Adding address for peer `%s' multiple times\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:1913 -#, c-format -msgid "Updating address property for peer `%s' %p not added before\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2475 -msgid "" -"MLP solver is not optimizing for anything, changing to feasibility check\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2515 src/ats/plugin_ats_mlp.c:2532 -#: src/ats/plugin_ats_mlp.c:2564 src/ats/plugin_ats_mlp.c:2582 -#: src/ats/plugin_ats_mlp.c:2601 src/ats/plugin_ats_proportional.c:1141 -#: src/ats/plugin_ats_ril.c:2612 src/ats/plugin_ats_ril.c:2629 -#: src/ats/plugin_ats_ril.c:2646 src/ats/plugin_ats_ril.c:2663 -#: src/ats/plugin_ats_ril.c:2680 src/ats/plugin_ats_ril.c:2697 -#: src/ats/plugin_ats_ril.c:2714 src/ats/plugin_ats_ril.c:2731 -#, fuzzy, c-format -msgid "Invalid %s configuration %f \n" -msgstr "解析配置文件“%s”失败\n" - -#: src/ats/plugin_ats_mlp.c:2670 -#, c-format -msgid "" -"Adjusting inconsistent outbound quota configuration for network `%s', is " -"%llu must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2679 -#, c-format -msgid "" -"Adjusting inconsistent inbound quota configuration for network `%s', is %llu " -"must be at least %llu\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2689 -#, c-format -msgid "" -"Adjusting outbound quota configuration for network `%s'from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_mlp.c:2698 -#, c-format -msgid "" -"Adjusting inbound quota configuration for network `%s' from %llu to %.0f\n" -msgstr "" - -#: src/ats/plugin_ats_proportional.c:1164 -#, fuzzy, c-format -msgid "Invalid %s configuration %f\n" -msgstr "解析配置文件“%s”失败\n" - #: src/auction/gnunet-auction-create.c:163 msgid "description of the item to be sold" msgstr "" @@ -669,57 +669,57 @@ msgstr "" msgid "Invalid peer ID `%s'\n" msgstr "无效条目。\n" -#: src/cadet/gnunet-cadet.c:702 +#: src/cadet/gnunet-cadet.c:703 #, fuzzy, c-format msgid "Invalid tunnel owner `%s'\n" msgstr "IP 格式无效:“%s”\n" -#: src/cadet/gnunet-cadet.c:775 +#: src/cadet/gnunet-cadet.c:776 msgid "Extra arguments are not applicable in combination with this option.\n" msgstr "" -#: src/cadet/gnunet-cadet.c:866 +#: src/cadet/gnunet-cadet.c:867 #, fuzzy, c-format msgid "Invalid target `%s'\n" msgstr "“%s”的参数无效。\n" -#: src/cadet/gnunet-cadet.c:903 +#: src/cadet/gnunet-cadet.c:904 msgid "No action requested\n" msgstr "" -#: src/cadet/gnunet-cadet.c:928 +#: src/cadet/gnunet-cadet.c:929 #, fuzzy msgid "Provide information about a particular connection" msgstr "无法获取有关用户“%s”的信息:%s\n" -#: src/cadet/gnunet-cadet.c:933 +#: src/cadet/gnunet-cadet.c:934 msgid "Activate echo mode" msgstr "" -#: src/cadet/gnunet-cadet.c:938 +#: src/cadet/gnunet-cadet.c:939 msgid "Dump debug information to STDERR" msgstr "" -#: src/cadet/gnunet-cadet.c:944 +#: src/cadet/gnunet-cadet.c:945 msgid "Listen for connections using a shared secret among sender and recipient" msgstr "" -#: src/cadet/gnunet-cadet.c:951 +#: src/cadet/gnunet-cadet.c:952 #, fuzzy msgid "Provide information about a patricular peer" msgstr "无法获取有关用户“%s”的信息:%s\n" -#: src/cadet/gnunet-cadet.c:957 +#: src/cadet/gnunet-cadet.c:958 #, fuzzy msgid "Provide information about all peers" msgstr "无法获取有关用户“%s”的信息:%s\n" -#: src/cadet/gnunet-cadet.c:963 +#: src/cadet/gnunet-cadet.c:964 #, fuzzy msgid "Provide information about a particular tunnel" msgstr "无法获取有关用户“%s”的信息:%s\n" -#: src/cadet/gnunet-cadet.c:969 +#: src/cadet/gnunet-cadet.c:970 #, fuzzy msgid "Provide information about all tunnels" msgstr "无法获取有关用户“%s”的信息:%s\n" @@ -768,28 +768,6 @@ msgstr "" msgid "Connection to conversation service lost, trying to reconnect\n" msgstr "" -#: src/conversation/gnunet-conversation-test.c:119 -#, c-format -msgid "" -"\n" -"End of transmission. Have a GNU day.\n" -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:145 -#, c-format -msgid "" -"\n" -"We are now playing your recording back. If you can hear it, your audio " -"settings are working..." -msgstr "" - -#: src/conversation/gnunet-conversation-test.c:210 -#, c-format -msgid "" -"We will now be recording you for %s. After that time, the recording will be " -"played back to you..." -msgstr "" - #: src/conversation/gnunet-conversation.c:269 #, c-format msgid "Incoming call from `%s'. Please /accept %u or /cancel %u the call.\n" @@ -1038,16 +1016,38 @@ msgstr "初始化“%s”服务失败。\n" msgid "sets the NAME of the ego to use for the phone (and name resolution)" msgstr "" -#: src/conversation/gnunet-conversation.c:1279 -msgid "sets the LINE to use for the phone" +#: src/conversation/gnunet-conversation.c:1279 +msgid "sets the LINE to use for the phone" +msgstr "" + +#: src/conversation/gnunet-conversation.c:1306 +msgid "Enables having a conversation with other GNUnet users." +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:119 +#, c-format +msgid "" +"\n" +"End of transmission. Have a GNU day.\n" +msgstr "" + +#: src/conversation/gnunet-conversation-test.c:145 +#, c-format +msgid "" +"\n" +"We are now playing your recording back. If you can hear it, your audio " +"settings are working..." msgstr "" -#: src/conversation/gnunet-conversation.c:1306 -msgid "Enables having a conversation with other GNUnet users." +#: src/conversation/gnunet-conversation-test.c:210 +#, c-format +msgid "" +"We will now be recording you for %s. After that time, the recording will be " +"played back to you..." msgstr "" -#: src/conversation/gnunet-helper-audio-playback-gst.c:356 #: src/conversation/gnunet_gst.c:622 +#: src/conversation/gnunet-helper-audio-playback-gst.c:361 #, c-format msgid "Read error from STDIN: %d %s\n" msgstr "" @@ -1057,59 +1057,59 @@ msgstr "" msgid "pa_stream_write() failed: %s\n" msgstr "“%s”说:%s\n" -#: src/conversation/gnunet-helper-audio-playback.c:607 +#: src/conversation/gnunet-helper-audio-playback.c:612 msgid "gnunet-helper-audio-playback - Got signal, exiting\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:632 +#: src/conversation/gnunet-helper-audio-playback.c:637 #: src/conversation/gnunet-helper-audio-record.c:545 msgid "Connection established.\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:637 +#: src/conversation/gnunet-helper-audio-playback.c:642 #: src/conversation/gnunet-helper-audio-record.c:550 #, fuzzy, c-format msgid "pa_stream_new() failed: %s\n" msgstr "“%s”说:%s\n" -#: src/conversation/gnunet-helper-audio-playback.c:651 +#: src/conversation/gnunet-helper-audio-playback.c:656 #, c-format msgid "pa_stream_connect_playback() failed: %s\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:664 +#: src/conversation/gnunet-helper-audio-playback.c:669 #: src/conversation/gnunet-helper-audio-record.c:576 #, fuzzy, c-format msgid "Connection failure: %s\n" msgstr "“%s”已连接到“%s”。\n" -#: src/conversation/gnunet-helper-audio-playback.c:685 +#: src/conversation/gnunet-helper-audio-playback.c:690 #: src/conversation/gnunet-helper-audio-record.c:599 msgid "Wrong Spec\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:691 +#: src/conversation/gnunet-helper-audio-playback.c:696 #: src/conversation/gnunet-helper-audio-record.c:605 msgid "pa_mainloop_new() failed.\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:705 +#: src/conversation/gnunet-helper-audio-playback.c:710 #: src/conversation/gnunet-helper-audio-record.c:620 msgid "pa_context_new() failed.\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:712 +#: src/conversation/gnunet-helper-audio-playback.c:717 #: src/conversation/gnunet-helper-audio-record.c:626 #, fuzzy, c-format msgid "pa_context_connect() failed: %s\n" msgstr "“%s”说:%s\n" -#: src/conversation/gnunet-helper-audio-playback.c:718 +#: src/conversation/gnunet-helper-audio-playback.c:723 #: src/conversation/gnunet-helper-audio-record.c:632 msgid "pa_mainloop_run() failed.\n" msgstr "" -#: src/conversation/gnunet-helper-audio-playback.c:790 +#: src/conversation/gnunet-helper-audio-playback.c:795 #, c-format msgid "Read error from STDIN: %s\n" msgstr "" @@ -1178,7 +1178,7 @@ msgstr "初始化“%s”服务失败。\n" msgid "Could not open line, port %s already in use!\n" msgstr "无法连接到 %s:%u:%s\n" -#: src/conversation/microphone.c:119 +#: src/conversation/microphone.c:121 #, fuzzy msgid "Could not start record audio helper\n" msgstr "找不到主机“%s”的 IP:%s\n" @@ -1267,26 +1267,26 @@ msgstr "" msgid "# dequeuing CAR (duplicate request)" msgstr "" -#: src/core/gnunet-service-core.c:440 +#: src/core/gnunet-service-core.c:443 #, c-format msgid "# bytes of messages of type %u received" msgstr "" -#: src/core/gnunet-service-core.c:538 +#: src/core/gnunet-service-core.c:541 msgid "# messages discarded (session disconnected)" msgstr "" -#: src/core/gnunet-service-core.c:876 +#: src/core/gnunet-service-core.c:879 #, c-format msgid "# messages of type %u discarded (client busy)" msgstr "" -#: src/core/gnunet-service-core.c:985 +#: src/core/gnunet-service-core.c:988 #, fuzzy msgid "Core service is lacking HOSTKEY configuration setting. Exiting.\n" msgstr "立即保存配置?" -#: src/core/gnunet-service-core.c:1006 +#: src/core/gnunet-service-core.c:1009 #, fuzzy, c-format msgid "Core service of `%s' ready.\n" msgstr "服务已删除。\n" @@ -1299,125 +1299,125 @@ msgstr "" msgid "# bytes decrypted" msgstr "" -#: src/core/gnunet-service-core_kx.c:725 +#: src/core/gnunet-service-core_kx.c:728 msgid "# PAYLOAD dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:775 +#: src/core/gnunet-service-core_kx.c:778 msgid "# key exchanges initiated" msgstr "" -#: src/core/gnunet-service-core_kx.c:837 +#: src/core/gnunet-service-core_kx.c:840 msgid "# key exchanges stopped" msgstr "" -#: src/core/gnunet-service-core_kx.c:871 +#: src/core/gnunet-service-core_kx.c:874 #, fuzzy msgid "# PING messages transmitted" msgstr "消息尺寸" -#: src/core/gnunet-service-core_kx.c:938 +#: src/core/gnunet-service-core_kx.c:941 msgid "# old ephemeral keys ignored" msgstr "" -#: src/core/gnunet-service-core_kx.c:945 +#: src/core/gnunet-service-core_kx.c:948 msgid "# ephemeral keys received" msgstr "" -#: src/core/gnunet-service-core_kx.c:984 +#: src/core/gnunet-service-core_kx.c:987 #, c-format msgid "" "Ephemeral key message from peer `%s' rejected as its validity range does not " "match our system time (%llu not in [%llu,%llu]).\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:995 +#: src/core/gnunet-service-core_kx.c:998 msgid "# EPHEMERAL_KEY messages received" msgstr "" -#: src/core/gnunet-service-core_kx.c:1091 -#: src/transport/gnunet-service-transport_validation.c:1119 +#: src/core/gnunet-service-core_kx.c:1094 +#: src/transport/gnunet-service-transport_validation.c:1128 msgid "# PING messages received" msgstr "" -#: src/core/gnunet-service-core_kx.c:1100 +#: src/core/gnunet-service-core_kx.c:1103 msgid "# PING messages dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1158 +#: src/core/gnunet-service-core_kx.c:1161 msgid "# PONG messages created" msgstr "" -#: src/core/gnunet-service-core_kx.c:1184 +#: src/core/gnunet-service-core_kx.c:1187 msgid "# sessions terminated by timeout" msgstr "" -#: src/core/gnunet-service-core_kx.c:1197 +#: src/core/gnunet-service-core_kx.c:1200 msgid "# keepalive messages sent" msgstr "" -#: src/core/gnunet-service-core_kx.c:1261 -#: src/transport/gnunet-service-transport_validation.c:1442 +#: src/core/gnunet-service-core_kx.c:1264 +#: src/transport/gnunet-service-transport_validation.c:1461 msgid "# PONG messages received" msgstr "" -#: src/core/gnunet-service-core_kx.c:1268 +#: src/core/gnunet-service-core_kx.c:1271 msgid "# PONG messages dropped (connection down)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1273 +#: src/core/gnunet-service-core_kx.c:1276 msgid "# PONG messages dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1308 +#: src/core/gnunet-service-core_kx.c:1311 msgid "# PONG messages decrypted" msgstr "" -#: src/core/gnunet-service-core_kx.c:1346 +#: src/core/gnunet-service-core_kx.c:1349 msgid "# session keys confirmed via PONG" msgstr "" -#: src/core/gnunet-service-core_kx.c:1357 +#: src/core/gnunet-service-core_kx.c:1360 msgid "# timeouts prevented via PONG" msgstr "" -#: src/core/gnunet-service-core_kx.c:1364 +#: src/core/gnunet-service-core_kx.c:1367 msgid "# rekey operations confirmed via PONG" msgstr "" -#: src/core/gnunet-service-core_kx.c:1518 +#: src/core/gnunet-service-core_kx.c:1521 msgid "# DATA message dropped (out of order)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1526 +#: src/core/gnunet-service-core_kx.c:1529 #, c-format msgid "" "Session to peer `%s' went down due to key expiration (should not happen)\n" msgstr "" -#: src/core/gnunet-service-core_kx.c:1529 +#: src/core/gnunet-service-core_kx.c:1532 msgid "# sessions terminated by key expiration" msgstr "" -#: src/core/gnunet-service-core_kx.c:1590 -#: src/core/gnunet-service-core_kx.c:1616 +#: src/core/gnunet-service-core_kx.c:1593 +#: src/core/gnunet-service-core_kx.c:1619 msgid "# bytes dropped (duplicates)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1603 +#: src/core/gnunet-service-core_kx.c:1606 msgid "# bytes dropped (out of sequence)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1645 +#: src/core/gnunet-service-core_kx.c:1648 msgid "# bytes dropped (ancient message)" msgstr "" -#: src/core/gnunet-service-core_kx.c:1653 +#: src/core/gnunet-service-core_kx.c:1656 msgid "# bytes of payload decrypted" msgstr "" -#: src/core/gnunet-service-core_sessions.c:266 -#: src/core/gnunet-service-core_sessions.c:356 +#: src/core/gnunet-service-core_sessions.c:260 +#: src/core/gnunet-service-core_sessions.c:350 #: src/dht/gnunet-service-dht_neighbours.c:733 #: src/dht/gnunet-service-dht_neighbours.c:795 #: src/fs/gnunet-service-fs_cp.c:615 src/fs/gnunet-service-fs_cp.c:1520 @@ -1428,16 +1428,16 @@ msgstr "" msgid "# peers connected" msgstr "" -#: src/core/gnunet-service-core_sessions.c:302 +#: src/core/gnunet-service-core_sessions.c:296 msgid "# type map refreshes sent" msgstr "" -#: src/core/gnunet-service-core_sessions.c:422 +#: src/core/gnunet-service-core_sessions.c:416 #, fuzzy msgid "# outdated typemap confirmations received" msgstr "保存配置失败。" -#: src/core/gnunet-service-core_sessions.c:439 +#: src/core/gnunet-service-core_sessions.c:433 #, fuzzy msgid "# valid typemap confirmations received" msgstr "保存配置失败。" @@ -1451,135 +1451,6 @@ msgstr "" msgid "# updates to my type map" msgstr "" -#: src/credential/credential_misc.c:88 -#, fuzzy, c-format -msgid "Unable to parse CRED record string `%s'\n" -msgstr "解析配置文件“%s”失败\n" - -#: src/credential/gnunet-credential.c:278 src/namestore/gnunet-namestore.c:776 -#: src/namestore/plugin_rest_namestore.c:1009 -#, c-format -msgid "Ego `%s' not known to identity service\n" -msgstr "" - -#: src/credential/gnunet-credential.c:294 -#: src/credential/gnunet-credential.c:446 -#, fuzzy, c-format -msgid "Issuer public key `%s' is not well-formed\n" -msgstr "“%s”的参数无效。\n" - -#: src/credential/gnunet-credential.c:375 -#: src/credential/gnunet-credential.c:435 -#, fuzzy, c-format -msgid "Issuer public key not well-formed\n" -msgstr "“%s”的参数无效。\n" - -#: src/credential/gnunet-credential.c:386 -#: src/credential/gnunet-credential.c:455 -#, fuzzy, c-format -msgid "Failed to connect to CREDENTIAL\n" -msgstr "初始化“%s”服务失败。\n" - -#: src/credential/gnunet-credential.c:392 -#, c-format -msgid "You must provide issuer the attribute\n" -msgstr "" - -#: src/credential/gnunet-credential.c:399 -#, c-format -msgid "ego required\n" -msgstr "" - -#: src/credential/gnunet-credential.c:415 -#, c-format -msgid "Subject public key needed\n" -msgstr "" - -#: src/credential/gnunet-credential.c:426 -#, fuzzy, c-format -msgid "Subject public key `%s' is not well-formed\n" -msgstr "“%s”的参数无效。\n" - -#: src/credential/gnunet-credential.c:461 -#, c-format -msgid "You must provide issuer and subject attributes\n" -msgstr "" - -#: src/credential/gnunet-credential.c:511 -#, c-format -msgid "Issuer ego required\n" -msgstr "" - -#: src/credential/gnunet-credential.c:523 -#, c-format -msgid "Please specify name to lookup, subject key and issuer key!\n" -msgstr "" - -#: src/credential/gnunet-credential.c:543 -msgid "create credential" -msgstr "" - -#: src/credential/gnunet-credential.c:547 -msgid "verify credential against attribute" -msgstr "" - -#: src/credential/gnunet-credential.c:552 -msgid "The public key of the subject to lookup the credential for" -msgstr "" - -#: src/credential/gnunet-credential.c:557 -msgid "The name of the credential presented by the subject" -msgstr "" - -#: src/credential/gnunet-credential.c:562 -msgid "The public key of the authority to verify the credential against" -msgstr "" - -#: src/credential/gnunet-credential.c:567 -#, fuzzy -msgid "The ego to use" -msgstr "消息尺寸" - -#: src/credential/gnunet-credential.c:572 -msgid "The issuer attribute to verify against or to issue" -msgstr "" - -#: src/credential/gnunet-credential.c:577 -msgid "The time to live for the credential" -msgstr "" - -#: src/credential/gnunet-credential.c:581 -msgid "collect credentials" -msgstr "" - -#: src/credential/gnunet-credential.c:595 -#, fuzzy -msgid "GNUnet credential resolver tool" -msgstr "GNUnet 错误日志" - -#: src/credential/gnunet-service-credential.c:1204 -#: src/gns/gnunet-gns-helper-service-w32.c:727 src/gns/gnunet-gns.c:355 -#, fuzzy, c-format -msgid "Failed to connect to GNS\n" -msgstr "初始化“%s”服务失败。\n" - -#: src/credential/gnunet-service-credential.c:1210 -#: src/namestore/gnunet-namestore-fcfsd.c:1034 -#: src/namestore/gnunet-namestore.c:802 -#: src/namestore/plugin_rest_namestore.c:1022 -#, fuzzy, c-format -msgid "Failed to connect to namestore\n" -msgstr "初始化“%s”服务失败。\n" - -#: src/credential/plugin_gnsrecord_credential.c:186 -#, fuzzy, c-format -msgid "Unable to parse ATTR record string `%s'\n" -msgstr "解析配置文件“%s”失败\n" - -#: src/credential/plugin_rest_credential.c:1155 src/gns/plugin_rest_gns.c:668 -msgid "GNS REST API initialized\n" -msgstr "" - #: src/datacache/datacache.c:119 src/datacache/datacache.c:294 #: src/datastore/gnunet-service-datastore.c:757 msgid "# bytes stored" @@ -1624,9 +1495,8 @@ msgstr "sqlite 数据仓库" #: src/datacache/plugin_datacache_sqlite.c:122 #: src/datastore/plugin_datastore_mysql.c:892 #: src/datastore/plugin_datastore_sqlite.c:58 -#: src/datastore/plugin_datastore_sqlite.c:66 -#: src/identity-provider/plugin_identity_provider_sqlite.c:52 src/my/my.c:80 -#: src/my/my.c:92 src/mysql/mysql.c:42 src/mysql/mysql.c:49 +#: src/datastore/plugin_datastore_sqlite.c:66 src/my/my.c:80 src/my/my.c:92 +#: src/mysql/mysql.c:42 src/mysql/mysql.c:49 #: src/namecache/plugin_namecache_sqlite.c:53 #: src/namestore/plugin_namestore_sqlite.c:53 #: src/peerstore/plugin_peerstore_sqlite.c:52 @@ -1644,7 +1514,6 @@ msgstr "“%s”于 %s:%d 处失败,错误为:%s\n" #: src/datacache/plugin_datacache_sqlite.c:817 #: src/datastore/plugin_datastore_sqlite.c:456 -#: src/identity-provider/plugin_identity_provider_sqlite.c:336 #: src/namecache/plugin_namecache_sqlite.c:296 #: src/namestore/plugin_namestore_sqlite.c:355 msgid "Tried to close sqlite without finalizing all prepared statements.\n" @@ -1668,7 +1537,7 @@ msgstr "" msgid "# queue entries created" msgstr "" -#: src/datastore/datastore_api.c:740 +#: src/datastore/datastore_api.c:760 msgid "# status messages received" msgstr "" @@ -1676,35 +1545,35 @@ msgstr "" msgid "# Results received" msgstr "" -#: src/datastore/datastore_api.c:941 +#: src/datastore/datastore_api.c:920 msgid "# datastore connections (re)created" msgstr "" -#: src/datastore/datastore_api.c:1055 +#: src/datastore/datastore_api.c:1034 msgid "# PUT requests executed" msgstr "" -#: src/datastore/datastore_api.c:1116 +#: src/datastore/datastore_api.c:1095 msgid "# RESERVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1181 +#: src/datastore/datastore_api.c:1160 msgid "# RELEASE RESERVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1259 +#: src/datastore/datastore_api.c:1238 msgid "# REMOVE requests executed" msgstr "" -#: src/datastore/datastore_api.c:1319 +#: src/datastore/datastore_api.c:1298 msgid "# GET REPLICATION requests executed" msgstr "" -#: src/datastore/datastore_api.c:1381 +#: src/datastore/datastore_api.c:1360 msgid "# GET ZERO ANONYMITY requests executed" msgstr "" -#: src/datastore/datastore_api.c:1462 +#: src/datastore/datastore_api.c:1441 msgid "# GET requests executed" msgstr "" @@ -1978,7 +1847,6 @@ msgid "`%s' failed at %s:%u with error: %s" msgstr "“%s”于 %s:%d 处失败,错误为:%s\n" #: src/datastore/plugin_datastore_sqlite.c:271 -#: src/identity-provider/plugin_identity_provider_sqlite.c:212 #: src/namecache/plugin_namecache_sqlite.c:194 #: src/namestore/plugin_namestore_sqlite.c:222 #: src/peerstore/plugin_peerstore_sqlite.c:535 @@ -2003,7 +1871,6 @@ msgid "" msgstr "" #: src/datastore/plugin_datastore_sqlite.c:1337 -#: src/identity-provider/plugin_identity_provider_sqlite.c:711 #: src/namecache/plugin_namecache_sqlite.c:603 #: src/namestore/plugin_namestore_sqlite.c:802 #, fuzzy @@ -2072,6 +1939,52 @@ msgstr "" msgid "Prints all packets that go through the DHT." msgstr "" +#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:253 +#, fuzzy, c-format +msgid "Exiting as the number of peers is %u\n" +msgstr "增加 TCP/IP 的最大连接数" + +#: src/dht/gnunet_dht_profiler.c:1188 +#, fuzzy +msgid "number of peers to start" +msgstr "迭代次数" + +#: src/dht/gnunet_dht_profiler.c:1194 +msgid "" +"maximum number of times we try to search for successor circle formation (0 " +"for R5N)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 +#: src/testbed/gnunet-testbed-profiler.c:304 +msgid "name of the file with the login information for the testbed" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1206 +msgid "delay between rounds for collecting statistics (default: 30 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1212 +msgid "delay to start doing PUTs (default: 1 sec)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1218 +msgid "delay to start doing GETs (default: 5 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1223 +msgid "replication degree for DHT PUTs" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1230 +msgid "timeout for DHT PUT and GET requests (default: 1 min)" +msgstr "" + +#: src/dht/gnunet_dht_profiler.c:1248 +#, fuzzy +msgid "Measure quality and performance of the DHT service." +msgstr "无法访问该服务" + #: src/dht/gnunet-dht-put.c:120 msgid "PUT request sent with key" msgstr "" @@ -2321,52 +2234,6 @@ msgstr "" msgid "# DHT requests combined" msgstr "" -#: src/dht/gnunet_dht_profiler.c:1161 src/testbed/gnunet-testbed-profiler.c:255 -#, fuzzy, c-format -msgid "Exiting as the number of peers is %u\n" -msgstr "增加 TCP/IP 的最大连接数" - -#: src/dht/gnunet_dht_profiler.c:1188 -#, fuzzy -msgid "number of peers to start" -msgstr "迭代次数" - -#: src/dht/gnunet_dht_profiler.c:1194 -msgid "" -"maximum number of times we try to search for successor circle formation (0 " -"for R5N)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1200 src/nse/gnunet-nse-profiler.c:853 -#: src/testbed/gnunet-testbed-profiler.c:305 -msgid "name of the file with the login information for the testbed" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1206 -msgid "delay between rounds for collecting statistics (default: 30 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1212 -msgid "delay to start doing PUTs (default: 1 sec)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1218 -msgid "delay to start doing GETs (default: 5 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1223 -msgid "replication degree for DHT PUTs" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1230 -msgid "timeout for DHT PUT and GET requests (default: 1 min)" -msgstr "" - -#: src/dht/gnunet_dht_profiler.c:1248 -#, fuzzy -msgid "Measure quality and performance of the DHT service." -msgstr "无法访问该服务" - #: src/dht/plugin_block_dht.c:187 #, c-format msgid "Block not of type %u\n" @@ -2894,7 +2761,7 @@ msgstr "“%s”的参数无效。\n" msgid "Failed to not connect to `%s' service.\n" msgstr "初始化“%s”服务失败。\n" -#: src/fs/fs_misc.c:126 +#: src/fs/fs_misc.c:128 #, c-format msgid "Did not find mime type `%s' in extension list.\n" msgstr "" @@ -3321,6 +3188,14 @@ msgid "" "chk/...)" msgstr "" +#: src/fs/gnunet-fs.c:119 +msgid "print a list of all indexed files" +msgstr "" + +#: src/fs/gnunet-fs.c:130 +msgid "Special file-sharing operations" +msgstr "" + #: src/fs/gnunet-fs-profiler.c:211 msgid "run the experiment with COUNT peers" msgstr "" @@ -3337,14 +3212,6 @@ msgstr "" msgid "run a testbed to measure file-sharing performance" msgstr "" -#: src/fs/gnunet-fs.c:119 -msgid "print a list of all indexed files" -msgstr "" - -#: src/fs/gnunet-fs.c:130 -msgid "Special file-sharing operations" -msgstr "" - #: src/fs/gnunet-publish.c:219 src/fs/gnunet-publish.c:231 #, c-format msgid "Publishing `%s' at %llu/%llu (%s remaining)\n" @@ -3975,42 +3842,96 @@ msgstr "" msgid "No valid GNS zone specified!\n" msgstr "" -#: src/gns/gnunet-dns2gns.c:784 -msgid "IP of recursive DNS resolver to use (required)" +#: src/gns/gnunet-dns2gns.c:784 +msgid "IP of recursive DNS resolver to use (required)" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:790 +msgid "Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:796 +msgid "Authoritative DNS suffix to use (optional); default: zkey.eu" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:802 +msgid "UDP port to listen on for inbound DNS requests; default: 2853" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:808 +msgid "Public key of the GNS zone to use (overrides default)" +msgstr "" + +#: src/gns/gnunet-dns2gns.c:826 +msgid "GNUnet DNS-to-GNS proxy (a DNS server)" +msgstr "" + +#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 +#, c-format +msgid "Invalid typename specified, assuming `ANY'\n" +msgstr "" + +#: src/gns/gnunet-gns.c:252 +#, c-format +msgid "Please specify name to lookup!\n" +msgstr "" + +#: src/gns/gnunet-gns.c:276 +#, c-format +msgid "Ego for `%s' not found, cannot perform lookup.\n" +msgstr "" + +#: src/gns/gnunet-gns.c:315 src/gns/gnunet-gns-helper-service-w32.c:701 +#: src/gns/plugin_rest_gns.c:422 +#, c-format +msgid "" +"Ego for `gns-master' not found, cannot perform lookup. Did you run gnunet-" +"gns-import.sh?\n" +msgstr "" + +#: src/gns/gnunet-gns.c:355 src/gns/gnunet-gns-helper-service-w32.c:727 +#, fuzzy, c-format +msgid "Failed to connect to GNS\n" +msgstr "初始化“%s”服务失败。\n" + +#: src/gns/gnunet-gns.c:374 +#, c-format +msgid "Public key `%s' is not well-formed\n" +msgstr "" + +#: src/gns/gnunet-gns.c:428 +msgid "Lookup a record for the given name" msgstr "" -#: src/gns/gnunet-dns2gns.c:790 -msgid "Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu" +#: src/gns/gnunet-gns.c:434 +msgid "Specify the type of the record to lookup" msgstr "" -#: src/gns/gnunet-dns2gns.c:796 -msgid "Authoritative DNS suffix to use (optional); default: zkey.eu" +#: src/gns/gnunet-gns.c:440 +msgid "Specify timeout for the lookup" msgstr "" -#: src/gns/gnunet-dns2gns.c:802 -msgid "UDP port to listen on for inbound DNS requests; default: 2853" +#: src/gns/gnunet-gns.c:445 +msgid "No unneeded output" msgstr "" -#: src/gns/gnunet-dns2gns.c:808 -msgid "Public key of the GNS zone to use (overrides default)" +#: src/gns/gnunet-gns.c:451 +msgid "Specify the public key of the zone to lookup the record in" msgstr "" -#: src/gns/gnunet-dns2gns.c:826 -msgid "GNUnet DNS-to-GNS proxy (a DNS server)" +#: src/gns/gnunet-gns.c:457 +msgid "Specify the name of the ego of the zone to lookup the record in" msgstr "" +#: src/gns/gnunet-gns.c:476 +#, fuzzy +msgid "GNUnet GNS resolver tool" +msgstr "GNUnet 错误日志" + #: src/gns/gnunet-gns-helper-service-w32.c:602 msgid "Not ready to process requests, lacking ego data\n" msgstr "" -#: src/gns/gnunet-gns-helper-service-w32.c:701 src/gns/gnunet-gns.c:315 -#: src/gns/plugin_rest_gns.c:422 -#, c-format -msgid "" -"Ego for `gns-master' not found, cannot perform lookup. Did you run gnunet-" -"gns-import.sh?\n" -msgstr "" - #: src/gns/gnunet-gns-helper-service-w32.c:739 #, fuzzy, c-format msgid "Failed to connect to identity service\n" @@ -4035,161 +3956,112 @@ msgstr "" msgid "%s failed at %s:%d: `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:878 +#: src/gns/gnunet-gns-proxy.c:887 #, fuzzy, c-format msgid "Unsupported CURL SSL backend %d\n" msgstr "未知的命令“%s”。\n" -#: src/gns/gnunet-gns-proxy.c:901 +#: src/gns/gnunet-gns-proxy.c:910 #, fuzzy, c-format msgid "Failed to fetch CN from cert: %s\n" msgstr "打开日志文件“%s”失败:%s\n" -#: src/gns/gnunet-gns-proxy.c:924 +#: src/gns/gnunet-gns-proxy.c:933 #, fuzzy, c-format msgid "Failed to initialize DANE: %s\n" msgstr "无法初始化 SQLite:%s。\n" -#: src/gns/gnunet-gns-proxy.c:937 +#: src/gns/gnunet-gns-proxy.c:946 #, fuzzy, c-format msgid "Failed to parse DANE record: %s\n" msgstr "打开日志文件“%s”失败:%s\n" -#: src/gns/gnunet-gns-proxy.c:952 +#: src/gns/gnunet-gns-proxy.c:961 #, fuzzy, c-format msgid "Failed to verify TLS connection using DANE: %s\n" msgstr "解析配置文件“%s”失败\n" -#: src/gns/gnunet-gns-proxy.c:962 +#: src/gns/gnunet-gns-proxy.c:971 #, c-format msgid "Failed DANE verification failed with GnuTLS verify status code: %u\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:986 +#: src/gns/gnunet-gns-proxy.c:995 #, c-format msgid "SSL certificate subject name (%s) does not match `%s'\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1095 +#: src/gns/gnunet-gns-proxy.c:1104 #, c-format msgid "Cookie domain `%s' supplied by server is invalid\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:1699 +#: src/gns/gnunet-gns-proxy.c:1709 #, fuzzy, c-format msgid "Unsupported HTTP method `%s'\n" msgstr "未知的命令“%s”。\n" -#: src/gns/gnunet-gns-proxy.c:2162 +#: src/gns/gnunet-gns-proxy.c:2172 #, fuzzy, c-format msgid "Unable to import private key from file `%s'\n" msgstr "无法创建用户账户:" -#: src/gns/gnunet-gns-proxy.c:2192 +#: src/gns/gnunet-gns-proxy.c:2202 #, fuzzy, c-format msgid "Unable to import certificate %s\n" msgstr "无法保存配置文件“%s”:" -#: src/gns/gnunet-gns-proxy.c:2365 +#: src/gns/gnunet-gns-proxy.c:2375 #, fuzzy, c-format msgid "Failed to start HTTPS server for `%s'\n" msgstr "初始化“%s”服务失败。\n" -#: src/gns/gnunet-gns-proxy.c:2384 src/rest/gnunet-rest-server.c:533 +#: src/gns/gnunet-gns-proxy.c:2394 src/rest/gnunet-rest-server.c:533 #, fuzzy msgid "Failed to pass client to MHD\n" msgstr "初始化“%s”服务失败。\n" -#: src/gns/gnunet-gns-proxy.c:2704 +#: src/gns/gnunet-gns-proxy.c:2716 #, fuzzy, c-format msgid "Unsupported socks version %d\n" msgstr "未知的命令“%s”。\n" -#: src/gns/gnunet-gns-proxy.c:2733 +#: src/gns/gnunet-gns-proxy.c:2745 #, fuzzy, c-format msgid "Unsupported socks command %d\n" msgstr "未知的命令“%s”。\n" -#: src/gns/gnunet-gns-proxy.c:2751 src/gns/gnunet-gns-proxy.c:2780 +#: src/gns/gnunet-gns-proxy.c:2763 src/gns/gnunet-gns-proxy.c:2792 msgid "SSL connection to plain IPv4 address requested\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:2830 +#: src/gns/gnunet-gns-proxy.c:2842 #, fuzzy, c-format msgid "Unsupported socks address type %d\n" msgstr "未知的命令“%s”。\n" -#: src/gns/gnunet-gns-proxy.c:3165 src/gns/gnunet-service-gns.c:403 +#: src/gns/gnunet-gns-proxy.c:3177 src/gns/gnunet-service-gns.c:403 #, c-format msgid "No ego configured for `%s`\n" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3226 +#: src/gns/gnunet-gns-proxy.c:3238 #, fuzzy, c-format msgid "Failed to load SSL/TLS key and certificate from `%s'\n" msgstr "解析配置文件“%s”失败\n" -#: src/gns/gnunet-gns-proxy.c:3269 +#: src/gns/gnunet-gns-proxy.c:3281 msgid "listen on specified port (default: 7777)" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3275 +#: src/gns/gnunet-gns-proxy.c:3287 msgid "pem file to use as CA" msgstr "" -#: src/gns/gnunet-gns-proxy.c:3300 +#: src/gns/gnunet-gns-proxy.c:3312 msgid "GNUnet GNS proxy" msgstr "" -#: src/gns/gnunet-gns.c:235 src/gns/plugin_rest_gns.c:346 -#, c-format -msgid "Invalid typename specified, assuming `ANY'\n" -msgstr "" - -#: src/gns/gnunet-gns.c:252 -#, c-format -msgid "Please specify name to lookup!\n" -msgstr "" - -#: src/gns/gnunet-gns.c:276 -#, c-format -msgid "Ego for `%s' not found, cannot perform lookup.\n" -msgstr "" - -#: src/gns/gnunet-gns.c:374 -#, c-format -msgid "Public key `%s' is not well-formed\n" -msgstr "" - -#: src/gns/gnunet-gns.c:428 -msgid "Lookup a record for the given name" -msgstr "" - -#: src/gns/gnunet-gns.c:434 -msgid "Specify the type of the record to lookup" -msgstr "" - -#: src/gns/gnunet-gns.c:440 -msgid "Specify timeout for the lookup" -msgstr "" - -#: src/gns/gnunet-gns.c:445 -msgid "No unneeded output" -msgstr "" - -#: src/gns/gnunet-gns.c:451 -msgid "Specify the public key of the zone to lookup the record in" -msgstr "" - -#: src/gns/gnunet-gns.c:457 -msgid "Specify the name of the ego of the zone to lookup the record in" -msgstr "" - -#: src/gns/gnunet-gns.c:476 -#, fuzzy -msgid "GNUnet GNS resolver tool" -msgstr "GNUnet 错误日志" - #: src/gns/gnunet-service-gns.c:442 #, fuzzy msgid "Failed to connect to the namecache!\n" @@ -4254,35 +4126,44 @@ msgstr "" msgid "Hostname `%s' is not well-formed, resolution fails\n" msgstr "" -#: src/gns/plugin_gnsrecord_gns.c:179 +#: src/gns/plugin_gnsrecord_gns.c:203 #, fuzzy, c-format msgid "Unable to parse PKEY record `%s'\n" msgstr "解析配置文件“%s”失败\n" -#: src/gns/plugin_gnsrecord_gns.c:208 +#: src/gns/plugin_gnsrecord_gns.c:232 #, fuzzy, c-format msgid "Unable to parse GNS2DNS record `%s'\n" msgstr "解析配置文件“%s”失败\n" -#: src/gns/plugin_gnsrecord_gns.c:229 +#: src/gns/plugin_gnsrecord_gns.c:253 #, fuzzy, c-format msgid "Failed to serialize GNS2DNS record with value `%s'\n" msgstr "解析配置文件“%s”失败\n" -#: src/gns/plugin_gnsrecord_gns.c:252 +#: src/gns/plugin_gnsrecord_gns.c:276 #, fuzzy, c-format msgid "Unable to parse VPN record string `%s'\n" msgstr "解析配置文件“%s”失败\n" -#: src/gns/plugin_gnsrecord_gns.c:288 +#: src/gns/plugin_gnsrecord_gns.c:312 #, fuzzy, c-format msgid "Unable to parse BOX record string `%s'\n" msgstr "解析配置文件“%s”失败\n" +#: src/gns/plugin_gnsrecord_gns.c:360 +#, fuzzy, c-format +msgid "Unable to parse REVERSE record string `%s'\n" +msgstr "解析配置文件“%s”失败\n" + #: src/gns/plugin_rest_gns.c:384 msgid "Ego for not found, cannot perform lookup.\n" msgstr "" +#: src/gns/plugin_rest_gns.c:668 +msgid "GNS REST API initialized\n" +msgstr "" + #: src/gnsrecord/plugin_gnsrecord_dns.c:359 #, fuzzy, c-format msgid "Unable to parse IPv4 address `%s'\n" @@ -4388,36 +4269,36 @@ msgstr "创建用户出错" msgid "Modified %u addresses, wrote %u bytes\n" msgstr "" -#: src/hello/hello.c:1103 +#: src/hello/hello.c:1110 #, fuzzy msgid "Failed to parse HELLO message: missing expiration time\n" msgstr "保存配置失败。" -#: src/hello/hello.c:1112 +#: src/hello/hello.c:1119 #, fuzzy msgid "Failed to parse HELLO message: invalid expiration time\n" msgstr "保存配置失败。" -#: src/hello/hello.c:1122 +#: src/hello/hello.c:1129 #, fuzzy msgid "Failed to parse HELLO message: malformed\n" msgstr "打开日志文件“%s”失败:%s\n" -#: src/hello/hello.c:1133 +#: src/hello/hello.c:1140 msgid "Failed to parse HELLO message: missing transport plugin\n" msgstr "" -#: src/hello/hello.c:1151 +#: src/hello/hello.c:1158 #, c-format msgid "Plugin `%s' not found, skipping address\n" msgstr "" -#: src/hello/hello.c:1159 +#: src/hello/hello.c:1166 #, c-format msgid "Plugin `%s' does not support URIs yet\n" msgstr "" -#: src/hello/hello.c:1174 +#: src/hello/hello.c:1181 #, fuzzy, c-format msgid "Failed to parse `%s' as an address for plugin `%s'\n" msgstr "找不到接口“%s”的一个 IP 地址。\n" @@ -4663,7 +4544,7 @@ msgid "# hostlist advertisements send" msgstr "" #: src/hostlist/gnunet-daemon-hostlist_server.c:679 -#: src/transport/gnunet-service-transport.c:2803 +#: src/transport/gnunet-service-transport.c:2815 msgid "Could not access PEERINFO service. Exiting.\n" msgstr "" @@ -4707,52 +4588,6 @@ msgstr "“%s”不可用。\n" msgid "Could not start hostlist HTTP server on port %u\n" msgstr "" -#: src/identity-provider/gnunet-idp.c:348 -#, fuzzy -msgid "Ego is required\n" -msgstr "%s:选项“%s”有歧义\n" - -#: src/identity-provider/gnunet-idp.c:370 -msgid "Add attribute" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:376 -msgid "Attribute value" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:381 -msgid "Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:386 -msgid "Audience (relying party)" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:390 -msgid "List attributes for Ego" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:395 -msgid "Issue a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:400 -msgid "Consume a ticket" -msgstr "" - -#: src/identity-provider/gnunet-idp.c:405 -msgid "Revoke a ticket" -msgstr "" - -#: src/identity-provider/identity_provider_api.c:429 -#, fuzzy -msgid "failed to store record\n" -msgstr "运行 %s失败:%s %d\n" - -#: src/identity-provider/plugin_rest_identity_provider.c:1175 -msgid "Identity Provider REST API initialized\n" -msgstr "" - #: src/identity/gnunet-identity.c:179 #, fuzzy, c-format msgid "Failed to create ego: %s\n" @@ -4840,10 +4675,32 @@ msgstr "解析配置文件“%s”失败\n" msgid "Failed to create directory `%s' for storing egos\n" msgstr "解析配置文件“%s”失败\n" -#: src/identity/plugin_rest_identity.c:964 +#: src/identity/plugin_rest_identity.c:967 msgid "Identity REST API initialized\n" msgstr "" +#: src/identity-provider/gnunet-identity-token.c:66 +#, fuzzy +msgid "Option `-t' is required\n" +msgstr "%s:选项“%s”有歧义\n" + +#: src/identity-provider/gnunet-identity-token.c:77 +#, fuzzy, c-format +msgid "Token `%s' is malformed\n" +msgstr "“%s”的参数无效。\n" + +#: src/identity-provider/gnunet-identity-token.c:166 +msgid "GNUid token" +msgstr "" + +#: src/identity-provider/gnunet-identity-token.c:171 +msgid "Print token contents" +msgstr "" + +#: src/identity-provider/plugin_rest_identity_provider.c:1166 +msgid "Identity Token REST API initialized\n" +msgstr "" + #: src/json/json.c:119 #, fuzzy, c-format msgid "Failed to parse JSON in option `%s': %s (%s)\n" @@ -4944,79 +4801,19 @@ msgstr "发送消息失败。\n" msgid "flat plugin running\n" msgstr "sqlite 数据仓库" -#: src/namestore/gnunet-namestore-fcfsd.c:508 -#, fuzzy, c-format -msgid "Unsupported form value `%s'\n" -msgstr "未知的命令“%s”。\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:535 -#, fuzzy, c-format -msgid "Failed to create record for domain `%s': %s\n" -msgstr "解析配置文件“%s”失败\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:555 -msgid "Error when mapping zone to name\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:585 -#, c-format -msgid "Found existing name `%s' for the given key\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:662 -#, c-format -msgid "Found %u existing records for domain `%s'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:718 -#, fuzzy, c-format -msgid "Failed to create page for `%s'\n" -msgstr "发送消息失败。\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:734 -#, fuzzy, c-format -msgid "Failed to setup post processor for `%s'\n" -msgstr "解析配置文件“%s”失败\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:770 -msgid "Domain name must not contain `.'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:778 -msgid "Domain name must not contain `+'\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:974 -msgid "No ego configured for `fcfsd` subsystem\n" -msgstr "" - -#: src/namestore/gnunet-namestore-fcfsd.c:1000 -#, fuzzy -msgid "Failed to start HTTP server\n" -msgstr "初始化“%s”服务失败。\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1042 -#, fuzzy -msgid "Failed to connect to identity\n" -msgstr "初始化“%s”服务失败。\n" - -#: src/namestore/gnunet-namestore-fcfsd.c:1074 -msgid "GNU Name System First Come First Serve name registration service" -msgstr "" - #: src/namestore/gnunet-namestore.c:301 #, c-format msgid "Adding record failed: %s\n" msgstr "" #: src/namestore/gnunet-namestore.c:330 -#: src/namestore/plugin_rest_namestore.c:567 +#: src/namestore/plugin_rest_namestore.c:562 #, c-format msgid "Deleting record failed, record does not exist%s%s\n" msgstr "" #: src/namestore/gnunet-namestore.c:337 -#: src/namestore/plugin_rest_namestore.c:576 +#: src/namestore/plugin_rest_namestore.c:571 #, c-format msgid "Deleting record failed%s%s\n" msgstr "" @@ -5034,7 +4831,7 @@ msgid "Records already exist under `%s', cannot add `%s' record.\n" msgstr "" #: src/namestore/gnunet-namestore.c:698 -#: src/namestore/plugin_rest_namestore.c:602 +#: src/namestore/plugin_rest_namestore.c:597 #, c-format msgid "There are no records under label `%s' that could be deleted.\n" msgstr "" @@ -5045,11 +4842,24 @@ msgid "" "There are no records under label `%s' that match the request for deletion.\n" msgstr "" +#: src/namestore/gnunet-namestore.c:776 +#: src/namestore/plugin_rest_namestore.c:1004 +#, c-format +msgid "Ego `%s' not known to identity service\n" +msgstr "" + #: src/namestore/gnunet-namestore.c:791 #, c-format msgid "No options given\n" msgstr "" +#: src/namestore/gnunet-namestore.c:802 +#: src/namestore/gnunet-namestore-fcfsd.c:1034 +#: src/namestore/plugin_rest_namestore.c:1017 +#, fuzzy +msgid "Failed to connect to namestore\n" +msgstr "初始化“%s”服务失败。\n" + #: src/namestore/gnunet-namestore.c:810 src/namestore/gnunet-namestore.c:819 #: src/namestore/gnunet-namestore.c:838 src/namestore/gnunet-namestore.c:861 #: src/namestore/gnunet-namestore.c:915 @@ -5063,14 +4873,14 @@ msgid "add" msgstr "" #: src/namestore/gnunet-namestore.c:829 -#: src/namestore/plugin_rest_namestore.c:676 +#: src/namestore/plugin_rest_namestore.c:671 #, fuzzy, c-format msgid "Unsupported type `%s'\n" msgstr "未知的命令“%s”。\n" #: src/namestore/gnunet-namestore.c:851 -#: src/namestore/plugin_rest_namestore.c:694 -#: src/namestore/plugin_rest_namestore.c:734 +#: src/namestore/plugin_rest_namestore.c:689 +#: src/namestore/plugin_rest_namestore.c:729 #, c-format msgid "Value `%s' invalid for record type `%s'\n" msgstr "" @@ -5100,13 +4910,13 @@ msgid "Invalid nick `%s'\n" msgstr "无效条目。\n" #: src/namestore/gnunet-namestore.c:1051 -#: src/namestore/plugin_rest_namestore.c:1052 +#: src/namestore/plugin_rest_namestore.c:1047 #, c-format msgid "No default ego configured in identity service\n" msgstr "" #: src/namestore/gnunet-namestore.c:1108 -#: src/namestore/plugin_rest_namestore.c:1148 +#: src/namestore/plugin_rest_namestore.c:1143 #, fuzzy, c-format msgid "Cannot connect to identity service\n" msgstr "无法连接到 %s:%u:%s\n" @@ -5169,6 +4979,66 @@ msgstr "" msgid "name of the ego controlling the zone" msgstr "" +#: src/namestore/gnunet-namestore-fcfsd.c:508 +#, fuzzy, c-format +msgid "Unsupported form value `%s'\n" +msgstr "未知的命令“%s”。\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:535 +#, fuzzy, c-format +msgid "Failed to create record for domain `%s': %s\n" +msgstr "解析配置文件“%s”失败\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:555 +msgid "Error when mapping zone to name\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:585 +#, c-format +msgid "Found existing name `%s' for the given key\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:662 +#, c-format +msgid "Found %u existing records for domain `%s'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:718 +#, fuzzy, c-format +msgid "Failed to create page for `%s'\n" +msgstr "发送消息失败。\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:734 +#, fuzzy, c-format +msgid "Failed to setup post processor for `%s'\n" +msgstr "解析配置文件“%s”失败\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:770 +msgid "Domain name must not contain `.'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:778 +msgid "Domain name must not contain `+'\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:974 +msgid "No ego configured for `fcfsd` subsystem\n" +msgstr "" + +#: src/namestore/gnunet-namestore-fcfsd.c:1000 +#, fuzzy +msgid "Failed to start HTTP server\n" +msgstr "初始化“%s”服务失败。\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1042 +#, fuzzy +msgid "Failed to connect to identity\n" +msgstr "初始化“%s”服务失败。\n" + +#: src/namestore/gnunet-namestore-fcfsd.c:1074 +msgid "GNU Name System First Come First Serve name registration service" +msgstr "" + #: src/namestore/gnunet-service-namestore.c:615 #, fuzzy, c-format msgid "Failed to replicate block in namecache: %s\n" @@ -5183,7 +5053,7 @@ msgstr "" msgid "flat file database running\n" msgstr "sqlite 数据仓库" -#: src/namestore/plugin_rest_namestore.c:1193 +#: src/namestore/plugin_rest_namestore.c:1188 msgid "Namestore REST API initialized\n" msgstr "" @@ -5466,6 +5336,10 @@ msgstr "" msgid "`upnpc' command not found\n" msgstr "" +#: src/nse/gnunet-nse.c:122 +msgid "Show network size estimates from NSE service." +msgstr "" + #: src/nse/gnunet-nse-profiler.c:842 msgid "limit to the number of connections to NSE services, 0 for none" msgstr "" @@ -5491,16 +5365,66 @@ msgstr "" msgid "Measure quality and performance of the NSE service." msgstr "无法访问该服务" -#: src/nse/gnunet-nse.c:122 -msgid "Show network size estimates from NSE service." -msgstr "" - #: src/nse/gnunet-service-nse.c:1534 -#: src/revocation/gnunet-service-revocation.c:838 src/util/gnunet-scrypt.c:276 +#: src/revocation/gnunet-service-revocation.c:840 src/util/gnunet-scrypt.c:276 #, fuzzy msgid "Value is too large.\n" msgstr "值不在合法范围内。" +#: src/peerinfo/gnunet-service-peerinfo.c:178 +#, c-format +msgid "Removing expired address of transport `%s'\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:310 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s': %s\n" +msgstr "解析配置文件“%s”失败\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:331 +#: src/peerinfo/gnunet-service-peerinfo.c:362 +#, fuzzy, c-format +msgid "Failed to parse HELLO in file `%s'\n" +msgstr "解析配置文件“%s”失败\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:446 +msgid "# peers known" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:489 +#, c-format +msgid "" +"File `%s' in directory `%s' does not match naming convention. Removed.\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:655 +#, fuzzy, c-format +msgid "Scanning directory `%s'\n" +msgstr "解析配置文件“%s”失败\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:663 +#, c-format +msgid "Still no peers found in `%s'!\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:1080 +#, fuzzy, c-format +msgid "Cleaning up directory `%s'\n" +msgstr "解析配置文件“%s”失败\n" + +#: src/peerinfo/gnunet-service-peerinfo.c:1409 +#, c-format +msgid "Importing HELLOs from `%s'\n" +msgstr "" + +#: src/peerinfo/gnunet-service-peerinfo.c:1422 +msgid "Skipping import of included HELLOs\n" +msgstr "" + +#: src/peerinfo/peerinfo_api.c:220 +msgid "Failed to receive response from `PEERINFO' service." +msgstr "" + #: src/peerinfo-tool/gnunet-peerinfo.c:239 #, fuzzy, c-format msgid "%sPeer `%s'\n" @@ -5592,60 +5516,6 @@ msgstr "" msgid "Failed to load transport plugin for `%s'\n" msgstr "解析配置文件“%s”失败\n" -#: src/peerinfo/gnunet-service-peerinfo.c:178 -#, c-format -msgid "Removing expired address of transport `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:310 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s': %s\n" -msgstr "解析配置文件“%s”失败\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:331 -#: src/peerinfo/gnunet-service-peerinfo.c:362 -#, fuzzy, c-format -msgid "Failed to parse HELLO in file `%s'\n" -msgstr "解析配置文件“%s”失败\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:446 -msgid "# peers known" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:489 -#, c-format -msgid "" -"File `%s' in directory `%s' does not match naming convention. Removed.\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:655 -#, fuzzy, c-format -msgid "Scanning directory `%s'\n" -msgstr "解析配置文件“%s”失败\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:663 -#, c-format -msgid "Still no peers found in `%s'!\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1076 -#, fuzzy, c-format -msgid "Cleaning up directory `%s'\n" -msgstr "解析配置文件“%s”失败\n" - -#: src/peerinfo/gnunet-service-peerinfo.c:1405 -#, c-format -msgid "Importing HELLOs from `%s'\n" -msgstr "" - -#: src/peerinfo/gnunet-service-peerinfo.c:1418 -msgid "Skipping import of included HELLOs\n" -msgstr "" - -#: src/peerinfo/peerinfo_api.c:220 -msgid "Failed to receive response from `PEERINFO' service." -msgstr "" - #: src/peerstore/gnunet-peerstore.c:91 msgid "peerstore" msgstr "" @@ -6085,12 +5955,12 @@ msgstr "" msgid "# revocation set unions completed" msgstr "" -#: src/revocation/gnunet-service-revocation.c:524 -#: src/revocation/gnunet-service-revocation.c:771 +#: src/revocation/gnunet-service-revocation.c:525 +#: src/revocation/gnunet-service-revocation.c:773 msgid "SET service crashed, terminating revocation service\n" msgstr "" -#: src/revocation/gnunet-service-revocation.c:862 +#: src/revocation/gnunet-service-revocation.c:864 #, fuzzy msgid "Could not open revocation database file!" msgstr "无法连接到 %s:%u:%s\n" @@ -6154,10 +6024,10 @@ msgstr "" msgid "Calculate the Vectorproduct with a GNUnet peer." msgstr "" -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 -#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #: src/scalarproduct/gnunet-service-scalarproduct_alice.c:1401 #: src/scalarproduct/gnunet-service-scalarproduct_bob.c:1345 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c:1172 +#: src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c:1063 #, fuzzy msgid "Connect to CADET failed\n" msgstr "“%s”已连接到“%s”。\n" @@ -6374,7 +6244,7 @@ msgstr "解析配置文件“%s”失败\n" msgid "Wrote %llu bytes of statistics to `%s'\n" msgstr "" -#: src/statistics/gnunet-service-statistics.c:1084 +#: src/statistics/gnunet-service-statistics.c:1086 #, c-format msgid "Loading %llu bytes of statistics from `%s'\n" msgstr "" @@ -6503,7 +6373,7 @@ msgid "Invalid argument `%s'; expecting unsigned int\n" msgstr "“%s”的参数无效。\n" #: src/testbed/generate-underlay-topology.c:342 -#: src/testbed/gnunet-testbed-profiler.c:284 +#: src/testbed/gnunet-testbed-profiler.c:283 msgid "create COUNT number of peers" msgstr "" @@ -6541,13 +6411,13 @@ msgid "" "deployments" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:231 src/testing/list-keys.c:46 -#: src/testing/testing.c:288 src/util/gnunet-ecc.c:301 +#: src/testbed/gnunet-daemon-testbed-underlay.c:233 src/testing/list-keys.c:46 +#: src/testing/testing.c:288 src/util/gnunet-ecc.c:306 #, c-format msgid "Incorrect hostkey file format: %s\n" msgstr "" -#: src/testbed/gnunet-daemon-testbed-underlay.c:469 +#: src/testbed/gnunet-daemon-testbed-underlay.c:471 msgid "Daemon to restrict underlay network in testbed deployments" msgstr "" @@ -6612,17 +6482,6 @@ msgstr "" msgid "%.s Unknown result code." msgstr "" -#: src/testbed/gnunet-testbed-profiler.c:290 -msgid "tolerate COUNT number of continious timeout failures" -msgstr "" - -#: src/testbed/gnunet-testbed-profiler.c:295 -msgid "" -"run profiler in non-interactive mode where upon testbed setup the profiler " -"does not wait for a keystroke but continues to run until a termination " -"signal is received" -msgstr "" - #: src/testbed/gnunet_testbed_mpi_spawn.c:118 msgid "Waiting for child to exit.\n" msgstr "" @@ -6632,6 +6491,17 @@ msgstr "" msgid "Spawning process `%s'\n" msgstr "卸载 GNUnet 服务" +#: src/testbed/gnunet-testbed-profiler.c:289 +msgid "tolerate COUNT number of continious timeout failures" +msgstr "" + +#: src/testbed/gnunet-testbed-profiler.c:294 +msgid "" +"run profiler in non-interactive mode where upon testbed setup the profiler " +"does not wait for a keystroke but continues to run until a termination " +"signal is received" +msgstr "" + #: src/testbed/testbed_api.c:410 #, fuzzy, c-format msgid "Adding host %u failed with error: %s\n" @@ -6928,55 +6798,55 @@ msgstr "" msgid "GNUnet topology control" msgstr "" +#: src/transport/gnunet-service-transport_ats.c:141 +msgid "# Addresses given to ATS" +msgstr "" + #: src/transport/gnunet-service-transport.c:448 msgid "# messages dropped due to slow client" msgstr "" -#: src/transport/gnunet-service-transport.c:809 +#: src/transport/gnunet-service-transport.c:818 msgid "# bytes payload dropped (other peer was not connected)" msgstr "" -#: src/transport/gnunet-service-transport.c:1539 +#: src/transport/gnunet-service-transport.c:1551 msgid "# bytes payload discarded due to not connected peer" msgstr "" -#: src/transport/gnunet-service-transport.c:1699 +#: src/transport/gnunet-service-transport.c:1711 msgid "# bytes total received" msgstr "" -#: src/transport/gnunet-service-transport.c:1796 +#: src/transport/gnunet-service-transport.c:1808 msgid "# bytes payload received" msgstr "" -#: src/transport/gnunet-service-transport.c:2113 -#: src/transport/gnunet-service-transport.c:2585 +#: src/transport/gnunet-service-transport.c:2125 +#: src/transport/gnunet-service-transport.c:2597 msgid "# disconnects due to blacklist" msgstr "" -#: src/transport/gnunet-service-transport.c:2589 +#: src/transport/gnunet-service-transport.c:2601 #, fuzzy, c-format msgid "Disallowing connection to peer `%s' on transport %s\n" msgstr "解析配置文件“%s”失败\n" -#: src/transport/gnunet-service-transport.c:2697 +#: src/transport/gnunet-service-transport.c:2709 #, fuzzy, c-format msgid "Adding blacklisting entry for peer `%s'\n" msgstr "卸载 GNUnet 服务" -#: src/transport/gnunet-service-transport.c:2706 +#: src/transport/gnunet-service-transport.c:2718 #, c-format msgid "Adding blacklisting entry for peer `%s':`%s'\n" msgstr "" -#: src/transport/gnunet-service-transport.c:2771 +#: src/transport/gnunet-service-transport.c:2783 #, fuzzy msgid "Transport service is lacking key configuration settings. Exiting.\n" msgstr "立即保存配置?" -#: src/transport/gnunet-service-transport_ats.c:141 -msgid "# Addresses given to ATS" -msgstr "" - #: src/transport/gnunet-service-transport_hello.c:195 msgid "# refreshed my HELLO" msgstr "" @@ -7110,64 +6980,64 @@ msgstr "" msgid "SYN request from peer `%s' ignored due impending shutdown\n" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:2620 +#: src/transport/gnunet-service-transport_neighbours.c:2623 msgid "# Attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3102 +#: src/transport/gnunet-service-transport_neighbours.c:3105 msgid "# SYN_ACK messages received" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3110 +#: src/transport/gnunet-service-transport_neighbours.c:3113 msgid "# unexpected SYN_ACK messages (no peer)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3128 -#: src/transport/gnunet-service-transport_neighbours.c:3152 +#: src/transport/gnunet-service-transport_neighbours.c:3131 +#: src/transport/gnunet-service-transport_neighbours.c:3155 msgid "# unexpected SYN_ACK messages (not ready)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3164 +#: src/transport/gnunet-service-transport_neighbours.c:3167 msgid "# unexpected SYN_ACK messages (waiting on ATS)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3189 +#: src/transport/gnunet-service-transport_neighbours.c:3192 msgid "# Successful attempts to switch addresses" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3202 +#: src/transport/gnunet-service-transport_neighbours.c:3205 msgid "# unexpected SYN_ACK messages (disconnecting)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3374 +#: src/transport/gnunet-service-transport_neighbours.c:3377 msgid "# ACK messages received" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3410 +#: src/transport/gnunet-service-transport_neighbours.c:3413 msgid "# unexpected ACK messages" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3498 +#: src/transport/gnunet-service-transport_neighbours.c:3501 msgid "# quota messages ignored (malformed)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3505 +#: src/transport/gnunet-service-transport_neighbours.c:3508 msgid "# QUOTA messages received" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3545 +#: src/transport/gnunet-service-transport_neighbours.c:3548 msgid "# disconnect messages ignored (malformed)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3552 +#: src/transport/gnunet-service-transport_neighbours.c:3555 msgid "# DISCONNECT messages received" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3563 +#: src/transport/gnunet-service-transport_neighbours.c:3566 msgid "# disconnect messages ignored (timestamp)" msgstr "" -#: src/transport/gnunet-service-transport_neighbours.c:3697 +#: src/transport/gnunet-service-transport_neighbours.c:3700 msgid "# disconnected from peer upon explicit request" msgstr "" @@ -7201,8 +7071,8 @@ msgstr "" #: src/transport/gnunet-service-transport_validation.c:491 #: src/transport/gnunet-service-transport_validation.c:677 -#: src/transport/gnunet-service-transport_validation.c:988 -#: src/transport/gnunet-service-transport_validation.c:1590 +#: src/transport/gnunet-service-transport_validation.c:997 +#: src/transport/gnunet-service-transport_validation.c:1609 #, fuzzy msgid "# validations running" msgstr "sqlite 数据仓库" @@ -7227,98 +7097,60 @@ msgstr "" msgid "# address revalidations started" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1114 +#: src/transport/gnunet-service-transport_validation.c:1123 msgid "# PING message for different peer received" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1165 +#: src/transport/gnunet-service-transport_validation.c:1174 #, c-format msgid "Plugin `%s' not available, cannot confirm having this address\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1178 +#: src/transport/gnunet-service-transport_validation.c:1187 msgid "# failed address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1181 +#: src/transport/gnunet-service-transport_validation.c:1190 #, c-format msgid "Address `%s' is not one of my addresses, not confirming PING\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1189 +#: src/transport/gnunet-service-transport_validation.c:1198 msgid "# successful address checks during validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1202 +#: src/transport/gnunet-service-transport_validation.c:1211 #, c-format msgid "" "Not confirming PING from peer `%s' with address `%s' since I cannot confirm " "having this address.\n" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1257 +#: src/transport/gnunet-service-transport_validation.c:1266 #, fuzzy, c-format msgid "Failed to create PONG signature for peer `%s'\n" msgstr "发送消息失败。\n" -#: src/transport/gnunet-service-transport_validation.c:1308 +#: src/transport/gnunet-service-transport_validation.c:1317 msgid "# PONGs unicast via reliable transport" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1317 +#: src/transport/gnunet-service-transport_validation.c:1326 msgid "# PONGs multicast to all available addresses" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1480 +#: src/transport/gnunet-service-transport_validation.c:1499 msgid "# PONGs dropped, no matching pending validation" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1498 +#: src/transport/gnunet-service-transport_validation.c:1517 msgid "# PONGs dropped, signature expired" msgstr "" -#: src/transport/gnunet-service-transport_validation.c:1553 +#: src/transport/gnunet-service-transport_validation.c:1572 msgid "# validations succeeded" msgstr "" -#: src/transport/gnunet-transport-profiler.c:219 -#, c-format -msgid "%llu B in %llu ms == %.2f KB/s!\n" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:617 -msgid "send data to peer" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:621 -msgid "receive data from peer" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:626 -msgid "iterations" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:631 -#, fuzzy -msgid "number of messages to send" -msgstr "每次迭代所使用的消息数量" - -#: src/transport/gnunet-transport-profiler.c:636 -#, fuzzy -msgid "message size to use" -msgstr "消息尺寸" - -#: src/transport/gnunet-transport-profiler.c:641 -#: src/transport/gnunet-transport.c:1462 -msgid "peer identity" -msgstr "" - -#: src/transport/gnunet-transport-profiler.c:652 -#: src/transport/gnunet-transport.c:1482 -#, fuzzy -msgid "Direct access to transport service." -msgstr "初始化“%s”服务失败。\n" - #: src/transport/gnunet-transport.c:413 #, c-format msgid "Transmitted %llu bytes/s (%llu bytes in %s)\n" @@ -7455,6 +7287,11 @@ msgstr "" msgid "do not resolve hostnames" msgstr "" +#: src/transport/gnunet-transport.c:1462 +#: src/transport/gnunet-transport-profiler.c:641 +msgid "peer identity" +msgstr "" + #: src/transport/gnunet-transport.c:1466 msgid "monitor plugin sessions" msgstr "" @@ -7463,6 +7300,39 @@ msgstr "" msgid "send data for benchmarking to the other peer (until CTRL-C)" msgstr "" +#: src/transport/gnunet-transport.c:1482 +#: src/transport/gnunet-transport-profiler.c:652 +#, fuzzy +msgid "Direct access to transport service." +msgstr "初始化“%s”服务失败。\n" + +#: src/transport/gnunet-transport-profiler.c:219 +#, c-format +msgid "%llu B in %llu ms == %.2f KB/s!\n" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:617 +msgid "send data to peer" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:621 +msgid "receive data from peer" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:626 +msgid "iterations" +msgstr "" + +#: src/transport/gnunet-transport-profiler.c:631 +#, fuzzy +msgid "number of messages to send" +msgstr "每次迭代所使用的消息数量" + +#: src/transport/gnunet-transport-profiler.c:636 +#, fuzzy +msgid "message size to use" +msgstr "消息尺寸" + #: src/transport/plugin_transport_http_client.c:1474 #: src/transport/plugin_transport_http_server.c:2312 #: src/transport/plugin_transport_http_server.c:3526 @@ -7739,6 +7609,20 @@ msgstr "" msgid "TCP transport advertises itself as being on port %llu\n" msgstr "" +#: src/transport/plugin_transport_udp_broadcasting.c:168 +msgid "# Multicast HELLO beacons received via UDP" +msgstr "" + +#: src/transport/plugin_transport_udp_broadcasting.c:548 +msgid "" +"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" +msgstr "" + +#: src/transport/plugin_transport_udp_broadcasting.c:565 +#, c-format +msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" +msgstr "" + #: src/transport/plugin_transport_udp.c:3366 #, c-format msgid "" @@ -7787,20 +7671,6 @@ msgstr "“%s”不可用。\n" msgid "Failed to create UDP network sockets\n" msgstr "发送消息失败。\n" -#: src/transport/plugin_transport_udp_broadcasting.c:168 -msgid "# Multicast HELLO beacons received via UDP" -msgstr "" - -#: src/transport/plugin_transport_udp_broadcasting.c:548 -msgid "" -"Disabling HELLO broadcasting due to friend-to-friend only configuration!\n" -msgstr "" - -#: src/transport/plugin_transport_udp_broadcasting.c:565 -#, c-format -msgid "Failed to set IPv4 broadcast option for broadcast socket on port %d\n" -msgstr "" - #: src/transport/plugin_transport_unix.c:1403 #, fuzzy, c-format msgid "Cannot create path to `%s'\n" @@ -7905,7 +7775,7 @@ msgid "" "`GNUNET_SERVER_receive_done' after %s\n" msgstr "" -#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2336 +#: src/transport/tcp_service_legacy.c:339 src/util/service.c:2346 #, c-format msgid "Unknown address family %d\n" msgstr "" @@ -7981,19 +7851,19 @@ msgstr "无法更改用户/组为“%s”:%s\n" msgid "do daemonize (detach from terminal)" msgstr "" -#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:244 +#: src/transport/tcp_service_legacy.c:1448 src/util/program.c:255 #: src/util/service.c:1790 #, fuzzy, c-format msgid "Malformed configuration file `%s', exit ...\n" msgstr "解析配置文件“%s”失败\n" -#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:261 +#: src/transport/tcp_service_legacy.c:1458 src/util/program.c:272 #: src/util/service.c:1801 #, fuzzy msgid "Malformed configuration, exit ...\n" msgstr "解析配置文件“%s”失败\n" -#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:256 +#: src/transport/tcp_service_legacy.c:1463 src/util/program.c:267 #: src/util/service.c:1807 #, fuzzy, c-format msgid "Could not access configuration file `%s'\n" @@ -8033,7 +7903,7 @@ msgstr "" msgid "Metadata `%s' failed to deserialize" msgstr "" -#: src/util/client.c:882 +#: src/util/client.c:911 #, c-format msgid "Need a non-empty hostname for service `%s'.\n" msgstr "" @@ -8131,22 +8001,22 @@ msgid "" "%llu)\n" msgstr "" -#: src/util/crypto_ecc.c:777 +#: src/util/crypto_ecc.c:810 #, fuzzy, c-format msgid "ECC signing failed at %s:%d: %s\n" msgstr "对驱动器“%2$s”的“%1$s”操作失败:%3$u\n" -#: src/util/crypto_ecc.c:827 +#: src/util/crypto_ecc.c:860 #, fuzzy, c-format msgid "EdDSA signing failed at %s:%d: %s\n" msgstr "对驱动器“%2$s”的“%1$s”操作失败:%3$u\n" -#: src/util/crypto_ecc.c:901 +#: src/util/crypto_ecc.c:934 #, fuzzy, c-format msgid "ECDSA signature verification failed at %s:%d: %s\n" msgstr "对驱动器“%2$s”的“%1$s”操作失败:%3$u\n" -#: src/util/crypto_ecc.c:958 +#: src/util/crypto_ecc.c:991 #, fuzzy, c-format msgid "EdDSA signature verification failed at %s:%d: %s\n" msgstr "对驱动器“%2$s”的“%1$s”操作失败:%3$u\n" @@ -8367,86 +8237,90 @@ msgstr "" msgid "Manipulate GNUnet configuration files" msgstr "更改配置文件中的一个值" -#: src/util/gnunet-ecc.c:89 +#: src/util/gnunet-ecc.c:94 #, fuzzy, c-format msgid "Failed to open `%s': %s\n" msgstr "打开日志文件“%s”失败:%s\n" -#: src/util/gnunet-ecc.c:125 +#: src/util/gnunet-ecc.c:130 #, c-format msgid "Generating %u keys like %s, please wait" msgstr "" -#: src/util/gnunet-ecc.c:138 +#: src/util/gnunet-ecc.c:143 #, c-format msgid "Generating %u keys, please wait" msgstr "" -#: src/util/gnunet-ecc.c:179 +#: src/util/gnunet-ecc.c:184 #, fuzzy, c-format msgid "" "\n" "Failed to write to `%s': %s\n" msgstr "运行 %s失败:%s %d\n" -#: src/util/gnunet-ecc.c:189 +#: src/util/gnunet-ecc.c:194 #, c-format msgid "" "\n" "Finished!\n" msgstr "" -#: src/util/gnunet-ecc.c:192 +#: src/util/gnunet-ecc.c:197 #, c-format msgid "" "\n" "Error, %u keys not generated\n" msgstr "" -#: src/util/gnunet-ecc.c:283 +#: src/util/gnunet-ecc.c:288 #, c-format msgid "Hostkeys file `%s' not found\n" msgstr "" -#: src/util/gnunet-ecc.c:294 +#: src/util/gnunet-ecc.c:299 #, fuzzy, c-format msgid "Hostkeys file `%s' is empty\n" msgstr "找不到接口“%s”的一个 IP 地址。\n" -#: src/util/gnunet-ecc.c:316 +#: src/util/gnunet-ecc.c:321 #, fuzzy, c-format msgid "Could not read hostkey file: %s\n" msgstr "找不到接口“%s”的一个 IP 地址。\n" -#: src/util/gnunet-ecc.c:367 +#: src/util/gnunet-ecc.c:372 msgid "No hostkey file specified on command line\n" msgstr "" -#: src/util/gnunet-ecc.c:425 +#: src/util/gnunet-ecc.c:437 msgid "list keys included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:430 +#: src/util/gnunet-ecc.c:442 msgid "number of keys to list included in a file (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:435 +#: src/util/gnunet-ecc.c:447 msgid "create COUNT public-private key pairs (for testing)" msgstr "" -#: src/util/gnunet-ecc.c:439 +#: src/util/gnunet-ecc.c:451 msgid "print the public key in ASCII format" msgstr "" -#: src/util/gnunet-ecc.c:443 +#: src/util/gnunet-ecc.c:455 +msgid "print the private key in ASCII format" +msgstr "" + +#: src/util/gnunet-ecc.c:459 msgid "print the public key in HEX format" msgstr "" -#: src/util/gnunet-ecc.c:447 +#: src/util/gnunet-ecc.c:463 msgid "print examples of ECC operations (used for compatibility testing)" msgstr "" -#: src/util/gnunet-ecc.c:463 +#: src/util/gnunet-ecc.c:479 #, fuzzy msgid "Manipulate GNUnet private ECC key files" msgstr "更改配置文件中的一个值" @@ -8606,22 +8480,22 @@ msgid "" "resolution will be unavailable.\n" msgstr "" -#: src/util/resolver_api.c:826 +#: src/util/resolver_api.c:827 #, c-format msgid "Timeout trying to resolve hostname `%s'.\n" msgstr "" -#: src/util/resolver_api.c:839 +#: src/util/resolver_api.c:840 #, fuzzy, c-format msgid "Timeout trying to resolve IP address `%s'.\n" msgstr "GNUnet 现在使用 IP 地址 %s。\n" -#: src/util/resolver_api.c:1023 +#: src/util/resolver_api.c:1024 msgid "Resolver not configured correctly.\n" msgstr "" -#: src/util/resolver_api.c:1109 src/util/resolver_api.c:1132 -#: src/util/resolver_api.c:1146 +#: src/util/resolver_api.c:1110 src/util/resolver_api.c:1133 +#: src/util/resolver_api.c:1147 #, fuzzy, c-format msgid "Could not resolve our FQDN: %s\n" msgstr "无法解析“%s”(%s):%s\n" @@ -8631,7 +8505,7 @@ msgid "" "Could not bind to any of the ports I was supposed to, refusing to run!\n" msgstr "" -#: src/util/service.c:2081 +#: src/util/service.c:2091 #, c-format msgid "" "Processing code for message of type %u did not call " @@ -8813,63 +8687,63 @@ msgstr "" msgid "# ICMPv6 packets dropped (not allowed)" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2232 +#: src/vpn/gnunet-service-vpn.c:2235 msgid "# Packets received from TUN interface" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2265 src/vpn/gnunet-service-vpn.c:2301 +#: src/vpn/gnunet-service-vpn.c:2268 src/vpn/gnunet-service-vpn.c:2304 #, c-format msgid "Packet received for unmapped destination `%s' (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2311 +#: src/vpn/gnunet-service-vpn.c:2314 msgid "Received IPv4 packet with options (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2325 +#: src/vpn/gnunet-service-vpn.c:2328 #, c-format msgid "Received packet of unknown protocol %d from TUN (dropping it)\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2364 +#: src/vpn/gnunet-service-vpn.c:2367 msgid "Failed to find unallocated IPv4 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2419 +#: src/vpn/gnunet-service-vpn.c:2422 msgid "Failed to find unallocated IPv6 address in VPN's range\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2461 src/vpn/gnunet-service-vpn.c:2683 +#: src/vpn/gnunet-service-vpn.c:2464 src/vpn/gnunet-service-vpn.c:2686 msgid "# Active destinations" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2732 +#: src/vpn/gnunet-service-vpn.c:2735 msgid "Failed to allocate IP address for new destination\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:2995 +#: src/vpn/gnunet-service-vpn.c:2998 #, fuzzy msgid "Must specify valid IPv6 address" msgstr "“%s”不可用。\n" -#: src/vpn/gnunet-service-vpn.c:3019 +#: src/vpn/gnunet-service-vpn.c:3022 msgid "Must specify valid IPv6 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3027 +#: src/vpn/gnunet-service-vpn.c:3030 msgid "IPv6 support disabled as this system does not support IPv6\n" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3040 +#: src/vpn/gnunet-service-vpn.c:3043 #, fuzzy msgid "Must specify valid IPv4 address" msgstr "“%s”不可用。\n" -#: src/vpn/gnunet-service-vpn.c:3053 +#: src/vpn/gnunet-service-vpn.c:3056 msgid "Must specify valid IPv4 mask" msgstr "" -#: src/vpn/gnunet-service-vpn.c:3063 +#: src/vpn/gnunet-service-vpn.c:3066 msgid "IPv4 support disabled as this system does not support IPv4\n" msgstr "" @@ -8961,10 +8835,6 @@ msgid "`%s' failed on file `%s' at %s:%d with error: %s\n" msgstr "" #, fuzzy -#~ msgid "Token `%s' is malformed\n" -#~ msgstr "“%s”的参数无效。\n" - -#, fuzzy #~ msgid "Failed to create indices\n" #~ msgstr "发送消息失败。\n" diff --git a/src/Makefile.am b/src/Makefile.am @@ -12,13 +12,12 @@ endif if HAVE_EXPERIMENTAL EXP_DIR = \ rps -endif # dv (FTBFS) - -if HAVE_JSON -if HAVE_MHD - ATTRIBUTE_DIR = identity-attribute - PROVIDER_DIR = identity-provider +if HAVE_ABE + EXP_DIR += abe \ + credential \ + identity-attribute \ + identity-provider endif endif @@ -117,7 +116,6 @@ SUBDIRS = \ revocation \ vpn \ gns \ - credential \ zonemaster \ $(CONVERSATION_DIR) \ fs \ @@ -131,8 +129,6 @@ SUBDIRS = \ psyc \ social \ $(AUCTION_DIR) \ - $(EXP_DIR) \ - $(ATTRIBUTE_DIR) \ - $(PROVIDER_DIR) + $(EXP_DIR) endif diff --git a/src/abe/Makefile.am b/src/abe/Makefile.am @@ -0,0 +1,47 @@ +# This Makefile.am is in the public domain +AM_CPPFLAGS = -I$(top_srcdir)/src/include + +plugindir = $(libdir)/gnunet + +libexecdir= $(pkglibdir)/libexec/ + +pkgcfgdir= $(pkgdatadir)/config.d/ + +if USE_COVERAGE + AM_CFLAGS = --coverage -O0 + XLIB = -lgcov +endif + +libgnunetabe_la_SOURCES = abe.c + +libgnunetabe_la_LIBADD = \ + $(GCLIBADD)\ + $(LIBGCRYPT_LIBS) \ + $(LTLIBICONV) \ + $(LTLIBINTL) \ + $(ABE_LIBADD) \ + -lgabe \ + -lpbc \ + -lglib-2.0 \ + -lltdl $(Z_LIBS) -lunistring $(XLIB) + +libgnunetabe_la_LDFLAGS = \ + $(GN_LIB_LDFLAGS) \ + -version-info 1:0:0 + +lib_LTLIBRARIES = libgnunetabe.la + +if ENABLE_TEST_RUN +AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; +TESTS = $(check_PROGRAMS) +endif + +check_PROGRAMS = test_cpabe + +test_cpabe_SOURCES = \ + test_cpabe.c +test_cpabe_LDADD = \ + libgnunetabe.la \ + $(top_builddir)/src/util/libgnunetutil.la +check_PROGRAMS += \ + test_cpabe diff --git a/src/abe/abe.c b/src/abe/abe.c @@ -0,0 +1,499 @@ +/* + This file is part of GNUnet. Copyright (C) 2001-2018 Christian Grothoff + (and other contributing authors) + + GNUnet is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ + +/** + * @file abe/abe.c + * @brief functions for Attribute-Based Encryption + * @author Martin Schanzenbach + */ + + +#include "platform.h" +#include <pbc/pbc.h> +#include <gabe.h> + +#include "gnunet_crypto_lib.h" +#include "gnunet_abe_lib.h" + +struct GNUNET_ABE_AbeMasterKey +{ + gabe_pub_t* pub; + gabe_msk_t* msk; +}; + +struct GNUNET_ABE_AbeKey +{ + gabe_pub_t* pub; + gabe_prv_t* prv; +}; + +static int +init_aes( element_t k, int enc, + gcry_cipher_hd_t* handle, + struct GNUNET_CRYPTO_SymmetricSessionKey *key, + unsigned char* iv) +{ + int rc; + int key_len; + unsigned char* key_buf; + + key_len = element_length_in_bytes(k) < 33 ? 3 : element_length_in_bytes(k); + key_buf = (unsigned char*) malloc(key_len); + element_to_bytes(key_buf, k); + + memcpy (key->aes_key, key_buf, GNUNET_CRYPTO_AES_KEY_LENGTH); + GNUNET_assert (0 == + gcry_cipher_open (handle, GCRY_CIPHER_AES256, + GCRY_CIPHER_MODE_CFB, 0)); + rc = gcry_cipher_setkey (*handle, + key->aes_key, + sizeof (key->aes_key)); + GNUNET_assert ((0 == rc) || ((char) rc == GPG_ERR_WEAK_KEY)); + memset (iv, 0, 16); //TODO make reasonable + rc = gcry_cipher_setiv (*handle, + iv, + 16); + GNUNET_assert ((0 == rc) || ((char) rc == GPG_ERR_WEAK_KEY)); + + free(key_buf); + return rc; +} + +static int +aes_128_cbc_encrypt( char* pt, + int size, + element_t k, + char **ct ) +{ + gcry_cipher_hd_t handle; + struct GNUNET_CRYPTO_SymmetricSessionKey skey; + unsigned char iv[16]; + char* buf; + int padding; + int buf_size; + uint8_t len[4]; + init_aes(k, 1, &handle, &skey, iv); + + /* TODO make less crufty */ + + /* stuff in real length (big endian) before padding */ + len[0] = (size & 0xff000000)>>24; + len[1] = (size & 0xff0000)>>16; + len[2] = (size & 0xff00)>>8; + len[3] = (size & 0xff)>>0; + padding = 16 - ((4+size) % 16); + buf_size = 4 + size + padding; + buf = GNUNET_malloc (buf_size); + GNUNET_memcpy (buf, len, 4); + GNUNET_memcpy (buf+4, pt, size); + *ct = GNUNET_malloc (buf_size); + + GNUNET_assert (0 == gcry_cipher_encrypt (handle, *ct, buf_size, buf, buf_size)); + gcry_cipher_close (handle); + //AES_cbc_encrypt(pt->data, ct->data, pt->len, &key, iv, AES_ENCRYPT); + GNUNET_free (buf); + return buf_size; +} + +static int +aes_128_cbc_decrypt( char* ct, + int size, + element_t k, + char **pt ) +{ + struct GNUNET_CRYPTO_SymmetricSessionKey skey; + gcry_cipher_hd_t handle; + unsigned char iv[16]; + char* tmp; + uint32_t len; + + init_aes(k, 1, &handle, &skey, iv); + + tmp = GNUNET_malloc (size); + + //AES_cbc_encrypt(ct->data, pt->data, ct->len, &key, iv, AES_DECRYPT); + GNUNET_assert (0 == gcry_cipher_decrypt (handle, tmp, size, ct, size)); + gcry_cipher_close (handle); + /* TODO make less crufty */ + + /* get real length */ + len = 0; + len = len + | ((tmp[0])<<24) | ((tmp[1])<<16) + | ((tmp[2])<<8) | ((tmp[3])<<0); + /* truncate any garbage from the padding */ + *pt = GNUNET_malloc (len); + GNUNET_memcpy (*pt, tmp+4, len); + GNUNET_free (tmp); + return len; +} + +/** + * @ingroup abe + * Create a new CP-ABE master key. Caller must free return value. + * + * @return fresh private key; free using #GNUNET_ABE_cpabe_delete_master_key + */ +struct GNUNET_ABE_AbeMasterKey* +GNUNET_ABE_cpabe_create_master_key (void) +{ + struct GNUNET_ABE_AbeMasterKey* key; + key = GNUNET_new (struct GNUNET_ABE_AbeMasterKey); + gabe_setup(&key->pub, &key->msk); + GNUNET_assert (NULL != key->pub); + GNUNET_assert (NULL != key->msk); + return key; +} + +/** + * @ingroup abe + * Delete a CP-ABE master key. + * + * @param key the master key + * @return fresh private key; free using #GNUNET_free + */ +void +GNUNET_ABE_cpabe_delete_master_key (struct GNUNET_ABE_AbeMasterKey *key) +{ + gabe_msk_free (key->msk); + gabe_pub_free (key->pub); + //GNUNET_free (key->msk); + //gabe_msk_free (key->msk); //For some reason free of pub implicit? + GNUNET_free (key); +} + +/** + * @ingroup abe + * Create a new CP-ABE key. Caller must free return value. + * + * @param key the master key + * @param attrs the attributes to append to the key + * @return fresh private key; free using #GNUNET_ABE_cpabe_delete_key + */ +struct GNUNET_ABE_AbeKey* +GNUNET_ABE_cpabe_create_key (struct GNUNET_ABE_AbeMasterKey *key, + char **attrs) +{ + struct GNUNET_ABE_AbeKey *prv_key; + int size; + char *tmp; + + prv_key = GNUNET_new (struct GNUNET_ABE_AbeKey); + prv_key->prv = gabe_keygen(key->pub, key->msk, attrs); + size = gabe_pub_serialize(key->pub, &tmp); + prv_key->pub = gabe_pub_unserialize(tmp, size); + GNUNET_free (tmp); + GNUNET_assert (NULL != prv_key->prv); + return prv_key; +} + +/** + * @ingroup abe + * Delete a CP-ABE key. + * + * @param key the key to delete + * @param delete_pub GNUNE_YES if the public key should also be freed (bug in gabe) + * @return fresh private key; free using #GNUNET_free + */ +void +GNUNET_ABE_cpabe_delete_key (struct GNUNET_ABE_AbeKey *key, + int delete_pub) +{ + //Memory management in gabe is buggy + gabe_prv_free (key->prv); + if (GNUNET_YES == delete_pub) + gabe_pub_free (key->pub); + GNUNET_free (key); +} + +static ssize_t +write_cpabe (void **result, + uint32_t file_len, + char* cph_buf, + int cph_buf_len, + char* aes_buf, + int aes_buf_len) +{ + char *ptr; + uint32_t *len; + + *result = GNUNET_malloc (12 + cph_buf_len + aes_buf_len); + ptr = *result; + len = (uint32_t*) ptr; + *len = htonl (file_len); + ptr += 4; + len = (uint32_t*) ptr; + *len = htonl (aes_buf_len); + ptr += 4; + memcpy (ptr, aes_buf, aes_buf_len); + ptr += aes_buf_len; + len = (uint32_t*) ptr; + *len = htonl (cph_buf_len); + ptr += 4; + memcpy (ptr, cph_buf, cph_buf_len); + return 12 + cph_buf_len + aes_buf_len; +} + +static ssize_t +read_cpabe (const void *data, + char** cph_buf, + int *cph_buf_len, + char** aes_buf, + int *aes_buf_len) +{ + int buf_len; + char *ptr; + uint32_t *len; + + ptr = (char*)data; + len = (uint32_t*)ptr; + buf_len = ntohl (*len); + ptr += 4; + len = (uint32_t*)ptr; + *aes_buf_len = ntohl (*len); + ptr += 4; + *aes_buf = GNUNET_malloc (*aes_buf_len); + memcpy(*aes_buf, ptr, *aes_buf_len); + ptr += *aes_buf_len; + len = (uint32_t*)ptr; + *cph_buf_len = ntohl (*len); + ptr += 4; + *cph_buf = GNUNET_malloc (*cph_buf_len); + memcpy(*cph_buf, ptr, *cph_buf_len); + + return buf_len; +} + +/** + * @ingroup abe + * Encrypt a block using sessionkey. + * + * @param block the block to encrypt + * @param size the size of the @a block + * @param policy the ABE policy + * @param key the key used to encrypt + * @param result the result buffer. Will be allocated. Free using #GNUNET_free + * @return the size of the encrypted block, -1 for errors + */ +ssize_t +GNUNET_ABE_cpabe_encrypt (const void *block, + size_t size, + const char *policy, + const struct GNUNET_ABE_AbeMasterKey *key, + void **result) +{ + gabe_cph_t* cph; + char* plt; + char* cph_buf; + char* aes_buf; + element_t m; + int cph_buf_len; + int aes_buf_len; + ssize_t result_len; + + if( !(cph = gabe_enc(key->pub, m, (char*)policy)) ) + return GNUNET_SYSERR; + cph_buf_len = gabe_cph_serialize(cph, + &cph_buf); + gabe_cph_free(cph); + GNUNET_free (cph); + plt = GNUNET_memdup (block, size); + aes_buf_len = aes_128_cbc_encrypt(plt, size, m, &aes_buf); + GNUNET_free (plt); + element_clear(m); + result_len = write_cpabe(result, size, cph_buf, cph_buf_len, aes_buf, aes_buf_len); + GNUNET_free(cph_buf); + GNUNET_free(aes_buf); + return result_len; +} + +/** + * @ingroup abe + * Decrypt a block using the ABE key. + * + * @param block the block to encrypt + * @param size the size of the @a block + * @param key the key used to decrypt + * @param result the result buffer. Will be allocated. Free using #GNUNET_free + * @return the size of the encrypted block, -1 for errors + */ +ssize_t +GNUNET_ABE_cpabe_decrypt (const void *block, + size_t size, + const struct GNUNET_ABE_AbeKey *key, + void **result) +{ + char* aes_buf; + char* cph_buf; + gabe_cph_t* cph; + element_t m; + int cph_buf_size; + int aes_buf_size; + int plt_len; + + read_cpabe(block, &cph_buf, &cph_buf_size, &aes_buf, &aes_buf_size); + cph = gabe_cph_unserialize(key->pub, cph_buf, cph_buf_size); + if( !gabe_dec(key->pub, key->prv, cph, m) ) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "%s\n", gabe_error()); + GNUNET_free (aes_buf); + GNUNET_free (cph_buf); + gabe_cph_free(cph); + GNUNET_free (cph); + element_clear (m); + return GNUNET_SYSERR; + } + gabe_cph_free(cph); + GNUNET_free (cph); + plt_len = aes_128_cbc_decrypt(aes_buf, aes_buf_size, m, (char**)result); + GNUNET_free (cph_buf); + GNUNET_free (aes_buf); + element_clear (m); + //freeing is buggy in gabe + //gabe_prv_free (prv); + //gabe_pub_free (pub); + return plt_len; +} + +/** + * @ingroup abe + * Serialize an ABE key. + * + * @param key the key to serialize + * @param result the result buffer. Will be allocated. Free using #GNUNET_free + * @return the size of the encrypted block, -1 for errors + */ +ssize_t +GNUNET_ABE_cpabe_serialize_key (const struct GNUNET_ABE_AbeKey *key, + void **result) +{ + ssize_t len; + char *pub; + char *prv; + int pub_len; + int prv_len; + + pub_len = gabe_pub_serialize (key->pub, &pub); + prv_len = gabe_prv_serialize (key->prv, &prv); + + len = pub_len + prv_len + 12; + write_cpabe (result, len, pub, pub_len, prv, prv_len); + + GNUNET_free (pub); + GNUNET_free (prv); + + return len; +} + +/** + * @ingroup abe + * Deserialize a serialized ABE key. + * + * @param data the data to deserialize + * @param len the length of the data. + * @return the ABE key. NULL of unsuccessful + */ +struct GNUNET_ABE_AbeKey* +GNUNET_ABE_cpabe_deserialize_key (const void *data, + size_t len) +{ + struct GNUNET_ABE_AbeKey *key; + char *pub; + char *prv; + int prv_len; + int pub_len; + + key = GNUNET_new (struct GNUNET_ABE_AbeKey); + read_cpabe (data, + &pub, + &pub_len, + &prv, + &prv_len); + key->pub = gabe_pub_unserialize (pub, pub_len); + key->prv = gabe_prv_unserialize (key->pub, prv, prv_len); + + GNUNET_free (pub); + GNUNET_free (prv); + return key; +} + +/** + * @ingroup abe + * Serialize an ABE master key. + * + * @param key the key to serialize + * @param result the result buffer. Will be allocated. Free using #GNUNET_free + * @return the size of the encrypted block, -1 for errors + */ +ssize_t +GNUNET_ABE_cpabe_serialize_master_key (const struct GNUNET_ABE_AbeMasterKey *key, + void **result) +{ + ssize_t len; + char *pub; + char *msk; + int pub_len; + int msk_len; + + pub_len = gabe_pub_serialize (key->pub, &pub); + msk_len = gabe_msk_serialize (key->msk, &msk); + + len = pub_len + msk_len + 12; + write_cpabe (result, len, pub, pub_len, msk, msk_len); + + GNUNET_free (pub); + GNUNET_free (msk); + + return len; +} + +/** + * @ingroup abe + * Deserialize an ABE master key. + * + * @param data the data to deserialize + * @param len the length of the data. + * @return the ABE key. NULL of unsuccessful + */ +struct GNUNET_ABE_AbeMasterKey* +GNUNET_ABE_cpabe_deserialize_master_key (const void *data, + size_t len) +{ + struct GNUNET_ABE_AbeMasterKey *key; + char *msk; + char *pub; + int msk_len; + int pub_len; + + key = GNUNET_new (struct GNUNET_ABE_AbeMasterKey); + read_cpabe (data, + &pub, + &pub_len, + &msk, + &msk_len); + key->pub = gabe_pub_unserialize (pub, pub_len); + key->msk = gabe_msk_unserialize (key->pub, msk, msk_len); + + GNUNET_free (pub); + GNUNET_free (msk); + + return key; +} diff --git a/src/abe/test_cpabe.c b/src/abe/test_cpabe.c @@ -0,0 +1,87 @@ +/* + This file is part of GNUnet. + Copyright (C) 2002, 2003, 2004, 2006 GNUnet e.V. + + GNUnet is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +*/ +/** + * @author Martin Schanzenbach + * @file util/test_crypto_abe.c + * @brief test for ABE ciphers + */ +#include "platform.h" +#include "gnunet_util_lib.h" +#include "gnunet_abe_lib.h" + +#define TESTSTRING "Hello World!" + +static int +testAbecipher () +{ + struct GNUNET_ABE_AbeMasterKey *msk; + struct GNUNET_ABE_AbeKey *key; + char *result; + char **attrs; + int size; + char *res; + msk = GNUNET_ABE_cpabe_create_master_key (); + size = GNUNET_ABE_cpabe_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, + "testattr", //Policy + msk, + (void*)&result); + GNUNET_assert (-1 != size); + attrs = GNUNET_malloc (2 * sizeof (char*)); + attrs[0] = "testattr"; + attrs[1] = NULL; + key = GNUNET_ABE_cpabe_create_key (msk, + attrs); + + size = GNUNET_ABE_cpabe_decrypt (result, size, + key, + (void*)&res); + if (strlen (TESTSTRING) + 1 != size) + { + printf ("abeciphertest failed: decryptBlock returned %d\n", size); + return 1; + } + if (0 != strcmp (res, TESTSTRING)) + { + printf ("abeciphertest failed: %s != %s\n", res, TESTSTRING); + return 1; + } + else + return 0; +} + + +int +main (int argc, char *argv[]) +{ + int failureCount = 0; + + GNUNET_log_setup ("test-crypto-abe", "WARNING", NULL); + failureCount += testAbecipher (); + + if (failureCount != 0) + { + printf ("%d TESTS FAILED!\n", failureCount); + return -1; + } + return 0; +} + +/* end of test_crypto_aes.c */ diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c @@ -1915,7 +1915,6 @@ setup_service (void *cls, struct sockaddr **addrs; socklen_t *addr_lens; int ret; - unsigned int i; if (0 == strcasecmp (section, "arm")) @@ -2027,7 +2026,7 @@ setup_service (void *cls, &addr_lens))) return; /* this will free (or capture) addrs[i] */ - for (i = 0; i < ret; i++) + for (unsigned int i = 0; i < ret; i++) create_listen_socket (addrs[i], addr_lens[i], sl); diff --git a/src/auction/Makefile.am b/src/auction/Makefile.am @@ -68,6 +68,11 @@ test_auction_api_LDADD = \ check_SCRIPTS = \ test_auction_create.sh +EXTRA_DIST = \ + auction.h \ + auction.conf \ + $(check_SCRIPTS) + if ENABLE_TEST_RUN AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; TESTS = $(check_PROGRAMS) $(check_SCRIPTS) diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c @@ -391,6 +391,8 @@ destroy_channel_on_reconnect_cb (void *cls, /* struct GNUNET_CADET_Handle *handle = cls; */ struct GNUNET_CADET_Channel *ch = value; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Destroying channel due to reconnect\n"); destroy_channel (ch); return GNUNET_OK; } @@ -489,7 +491,7 @@ cadet_mq_send_impl (struct GNUNET_MQ_Handle *mq, struct GNUNET_CADET_Handle *h = ch->cadet; uint16_t msize; struct GNUNET_MQ_Envelope *env; - struct GNUNET_CADET_LocalData *cadet_msg; + struct GNUNET_CADET_LocalData *cadet_msg = NULL; if (NULL == h->mq) { @@ -636,7 +638,6 @@ handle_channel_created (void *cls, ch = create_channel (h, &ccn); ch->peer = msg->peer; - ch->cadet = h; ch->incoming_port = port; ch->options = ntohl (msg->opt); LOG (GNUNET_ERROR_TYPE_DEBUG, @@ -824,6 +825,29 @@ handle_mq_error (void *cls, /** + * Check that message received from CADET service is well-formed. + * + * @param cls the `struct GNUNET_CADET_Handle` + * @param message the message we got + * @return #GNUNET_OK if the message is well-formed, + * #GNUNET_SYSERR otherwise + */ +static int +check_get_peers (void *cls, + const struct GNUNET_MessageHeader *message) +{ + size_t esize; + + esize = ntohs (message->size); + if (sizeof (struct GNUNET_CADET_LocalInfoPeer) == esize) + return GNUNET_OK; + if (sizeof (struct GNUNET_MessageHeader) == esize) + return GNUNET_OK; + return GNUNET_SYSERR; +} + + +/** * Process a local reply about info on all tunnels, pass info to the user. * * @param cls Closure (Cadet handle). @@ -831,17 +855,26 @@ handle_mq_error (void *cls, */ static void handle_get_peers (void *cls, - const struct GNUNET_CADET_LocalInfoPeer *msg) + const struct GNUNET_MessageHeader *msg) { struct GNUNET_CADET_Handle *h = cls; + const struct GNUNET_CADET_LocalInfoPeer *info = + (const struct GNUNET_CADET_LocalInfoPeer *) msg; if (NULL == h->info_cb.peers_cb) return; - h->info_cb.peers_cb (h->info_cls, - &msg->destination, - (int) ntohs (msg->tunnel), - (unsigned int) ntohs (msg->paths), - 0); + if (sizeof (struct GNUNET_CADET_LocalInfoPeer) == ntohs (msg->size)) + h->info_cb.peers_cb (h->info_cls, + &info->destination, + (int) ntohs (info->tunnel), + (unsigned int) ntohs (info->paths), + 0); + else + h->info_cb.peers_cb (h->info_cls, + NULL, + 0, + 0, + 0); } @@ -946,6 +979,29 @@ handle_get_peer (void *cls, /** + * Check that message received from CADET service is well-formed. + * + * @param cls the `struct GNUNET_CADET_Handle` + * @param message the message we got + * @return #GNUNET_OK if the message is well-formed, + * #GNUNET_SYSERR otherwise + */ +static int +check_get_tunnels (void *cls, + const struct GNUNET_MessageHeader *message) +{ + size_t esize; + + esize = ntohs (message->size); + if (sizeof (struct GNUNET_CADET_LocalInfoTunnel) == esize) + return GNUNET_OK; + if (sizeof (struct GNUNET_MessageHeader) == esize) + return GNUNET_OK; + return GNUNET_SYSERR; +} + + +/** * Process a local reply about info on all tunnels, pass info to the user. * * @param cls Closure (Cadet handle). @@ -953,19 +1009,28 @@ handle_get_peer (void *cls, */ static void handle_get_tunnels (void *cls, - const struct GNUNET_CADET_LocalInfoTunnel *msg) + const struct GNUNET_MessageHeader *msg) { struct GNUNET_CADET_Handle *h = cls; + const struct GNUNET_CADET_LocalInfoTunnel *info = + (const struct GNUNET_CADET_LocalInfoTunnel *) msg; if (NULL == h->info_cb.tunnels_cb) return; - h->info_cb.tunnels_cb (h->info_cls, - &msg->destination, - ntohl (msg->channels), - ntohl (msg->connections), - ntohs (msg->estate), - ntohs (msg->cstate)); - + if (sizeof (struct GNUNET_CADET_LocalInfoTunnel) == ntohs (msg->size)) + h->info_cb.tunnels_cb (h->info_cls, + &info->destination, + ntohl (info->channels), + ntohl (info->connections), + ntohs (info->estate), + ntohs (info->cstate)); + else + h->info_cb.tunnels_cb (h->info_cls, + NULL, + 0, + 0, + 0, + 0); } @@ -1075,18 +1140,18 @@ reconnect (struct GNUNET_CADET_Handle *h) GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK, struct GNUNET_CADET_LocalAck, h), - GNUNET_MQ_hd_fixed_size (get_peers, - GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS, - struct GNUNET_CADET_LocalInfoPeer, - h), + GNUNET_MQ_hd_var_size (get_peers, + GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS, + struct GNUNET_MessageHeader, + h), GNUNET_MQ_hd_var_size (get_peer, GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER, struct GNUNET_CADET_LocalInfoPeer, h), - GNUNET_MQ_hd_fixed_size (get_tunnels, - GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS, - struct GNUNET_CADET_LocalInfoTunnel, - h), + GNUNET_MQ_hd_var_size (get_tunnels, + GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS, + struct GNUNET_MessageHeader, + h), GNUNET_MQ_hd_var_size (get_tunnel, GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL, struct GNUNET_CADET_LocalInfoTunnel, @@ -1094,6 +1159,7 @@ reconnect (struct GNUNET_CADET_Handle *h) GNUNET_MQ_handler_end () }; + GNUNET_assert (NULL == h->mq); h->mq = GNUNET_CLIENT_connect (h->cfg, "cadet", handlers, @@ -1132,6 +1198,8 @@ destroy_channel_cb (void *cls, "channel %X not destroyed\n", ntohl (ch->ccn.channel_of_client)); } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Destroying channel due to GNUNET_CADET_disconnect()\n"); destroy_channel (ch); return GNUNET_OK; } @@ -1246,6 +1314,8 @@ GNUNET_CADET_channel_destroy (struct GNUNET_CADET_Channel *channel) GNUNET_MQ_send (h->mq, env); } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Destroying channel due to GNUNET_CADET_channel_destroy()\n"); destroy_channel (channel); } @@ -1600,7 +1670,10 @@ GNUNET_CADET_open_port (struct GNUNET_CADET_Handle *h, GNUNET_assert (NULL != connects); GNUNET_assert (NULL != disconnects); - + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Listening to CADET port %s\n", + GNUNET_h2s (port)); + p = GNUNET_new (struct GNUNET_CADET_Port); p->cadet = h; p->id = *port; @@ -1663,6 +1736,10 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h, struct GNUNET_MQ_Envelope *env; GNUNET_assert (NULL != disconnects); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Creating channel to peer %s at port %s\n", + GNUNET_i2s (destination), + GNUNET_h2s (port)); ch = create_channel (h, NULL); ch->ctx = channel_cls; diff --git a/src/cadet/cadet_test_lib.c b/src/cadet/cadet_test_lib.c @@ -241,6 +241,7 @@ GNUNET_CADET_TEST_cleanup (struct GNUNET_CADET_TEST_Context *ctx) } GNUNET_free (ctx->ops); GNUNET_free (ctx->cadets); + GNUNET_free (ctx->handlers); GNUNET_free (ctx); GNUNET_SCHEDULER_shutdown (); } diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c @@ -693,6 +693,7 @@ show_tunnel (void *cls) { struct GNUNET_PeerIdentity pid; + job = NULL; if (GNUNET_OK != GNUNET_CRYPTO_eddsa_public_key_from_string (tunnel_id, strlen (tunnel_id), diff --git a/src/cadet/gnunet-service-cadet_core.c b/src/cadet/gnunet-service-cadet_core.c @@ -623,7 +623,7 @@ timeout_cb (void *cls) { exp = GNUNET_TIME_absolute_add (r->last_use, linger); - if (0 != GNUNET_TIME_absolute_get_duration (exp).rel_value_us) + if (0 != GNUNET_TIME_absolute_get_remaining (exp).rel_value_us) { /* Route not yet timed out, wait until it does. */ timeout_task = GNUNET_SCHEDULER_add_at (exp, @@ -631,6 +631,11 @@ timeout_cb (void *cls) NULL); return; } + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Sending BROKEN due to timeout (%s was last use, %s linger)\n", + GNUNET_STRINGS_absolute_time_to_string (r->last_use), + GNUNET_STRINGS_relative_time_to_string (linger, + GNUNET_YES)); send_broken (&r->prev, &r->cid, NULL, @@ -688,6 +693,8 @@ dir_ready_cb (void *cls, return; } odir = (dir == &route->next) ? &route->prev : &route->next; + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Sending BROKEN due to MQ going down\n"); send_broken (&route->next, &route->cid, GCP_get_id (odir->hop), @@ -771,6 +778,33 @@ handle_connection_create (void *cls, options = (enum GNUNET_CADET_ChannelOption) ntohl (msg->options); path_length = size / sizeof (struct GNUNET_PeerIdentity); + if (0 == path_length) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Dropping CADET_CONNECTION_CREATE with empty path\n"); + GNUNET_break_op (0); + return; + } + /* Check for loops */ + struct GNUNET_CONTAINER_MultiPeerMap *map; + map = GNUNET_CONTAINER_multipeermap_create (path_length * 2, + GNUNET_YES); + GNUNET_assert (NULL != map); + for (off = 0; off < path_length; off++) { + if (GNUNET_SYSERR == + GNUNET_CONTAINER_multipeermap_put (map, + &pids[off], + NULL, + GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) { + /* bogus request */ + GNUNET_CONTAINER_multipeermap_destroy (map); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Dropping CADET_CONNECTION_CREATE with cyclic path\n"); + GNUNET_break_op (0); + return; + } + } + GNUNET_CONTAINER_multipeermap_destroy (map); /* Initiator is at offset 0. */ for (off=1;off<path_length;off++) if (0 == memcmp (&my_full_id, @@ -779,7 +813,8 @@ handle_connection_create (void *cls, break; if (off == path_length) { - /* We are not on the path, bogus request */ + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Dropping CADET_CONNECTION_CREATE without us in the path\n"); GNUNET_break_op (0); return; } @@ -787,7 +822,8 @@ handle_connection_create (void *cls, if (sender != GCP_get (&pids[off - 1], GNUNET_NO)) { - /* sender is not on the path, not allowed */ + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Dropping CADET_CONNECTION_CREATE without sender in the path\n"); GNUNET_break_op (0); return; } diff --git a/src/cadet/gnunet-service-cadet_paths.c b/src/cadet/gnunet-service-cadet_paths.c @@ -179,7 +179,7 @@ GCPP_del_connection (struct CadetPeerPath *path, GCC_2s (cc), GCPP_2s (path), off); - GNUNET_assert (off < path->entries_length); /* FIXME: #4909: This assertion fails sometimes! */ + GNUNET_assert (off < path->entries_length); entry = path->entries[off]; GNUNET_assert (cc == entry->cc); entry->cc = NULL; @@ -187,33 +187,51 @@ GCPP_del_connection (struct CadetPeerPath *path, /** - * This path is no longer needed, free resources. + * Tries to attach @a path to a peer, working backwards from the end + * and stopping at @a stop_at. If path->hn is NULL on return then the + * path was not attached and you can assume that path->entries_length + * is equal to @a stop_at. * - * @param path path resources to free + * @param path the path to attach + * @param stop_at the path length at which to stop trying */ static void -path_destroy (struct CadetPeerPath *path) +attach_path (struct CadetPeerPath *path, unsigned int stop_at) { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Destroying path %s\n", - GCPP_2s (path)); - for (unsigned int i=0;i<path->entries_length;i++) + GNUNET_assert (NULL == path->hn); + + /* Try to attach this path to a peer, working backwards from the end. */ + while (path->entries_length > stop_at) { - struct CadetPeerPathEntry *entry = path->entries[i]; + unsigned int end = path->entries_length - 1; + struct CadetPeerPathEntry *entry = path->entries[end]; + int force = GNUNET_NO; + recalculate_path_desirability (path); + /* If the entry already has a connection using it, force attach. */ if (NULL != entry->cc) - { - struct CadetTConnection *ct; + force = GNUNET_YES; + path->hn = GCP_attach_path (entry->peer, + path, + end, + force); + if (NULL != path->hn) + break; - ct = GCC_get_ct (entry->cc); - if (NULL != ct) - GCT_connection_lost (ct); - GCC_destroy_without_tunnel (entry->cc); - } + /* Attach failed, trim this entry from the path. */ + GNUNET_assert (NULL == entry->cc); + GCP_path_entry_remove (entry->peer, + entry, + end); GNUNET_free (entry); + path->entries[end] = NULL; + path->entries_length--; } - GNUNET_free (path->entries); - GNUNET_free (path); + + /* Shrink array to actual path length. */ + GNUNET_array_grow (path->entries, + path->entries_length, + path->entries_length); } @@ -228,7 +246,6 @@ void GCPP_release (struct CadetPeerPath *path) { struct CadetPeerPathEntry *entry; - int force; LOG (GNUNET_ERROR_TYPE_DEBUG, "Owner releases path %s\n", @@ -236,34 +253,23 @@ GCPP_release (struct CadetPeerPath *path) path->hn = NULL; entry = path->entries[path->entries_length - 1]; GNUNET_assert (path == entry->path); - while (1) + GNUNET_assert (NULL == entry->cc); + /* cut 'off' end of path */ + GCP_path_entry_remove (entry->peer, + entry, + path->entries_length - 1); + GNUNET_free (entry); + path->entries[path->entries_length - 1] = NULL; + path->entries_length--; + /* see if new peer at the end likes this path any better */ + attach_path (path, 0); + if (NULL == path->hn) { - /* cut 'off' end of path */ - GNUNET_assert (NULL == entry->cc); - GCP_path_entry_remove (entry->peer, - entry, - path->entries_length - 1); - path->entries_length--; /* We don't bother shrinking the 'entries' array, - as it's probably not worth it. */ - GNUNET_free (entry); - if (0 == path->entries_length) - break; /* the end */ - - /* see if new peer at the end likes this path any better */ - entry = path->entries[path->entries_length - 1]; - GNUNET_assert (path == entry->path); - force = (NULL == entry->cc) ? GNUNET_NO : GNUNET_YES; - path->hn = GCP_attach_path (entry->peer, - path, - path->entries_length - 1, - force); - if (NULL != path->hn) - return; /* yep, got attached, we are done. */ - GNUNET_assert (GNUNET_NO == force); + /* nobody wants us, discard the path */ + GNUNET_assert (0 == path->entries_length); + GNUNET_assert (NULL == path->entries); + GNUNET_free (path); } - - /* nobody wants us, discard the path */ - path_destroy (path); } @@ -422,33 +428,13 @@ extend_path (struct CadetPeerPath *path, path, path->hn); path->hn = NULL; - for (i=num_peers-1;i>=0;i--) - { - struct CadetPeerPathEntry *entry = path->entries[old_len + i]; - - path->entries_length = old_len + i + 1; - recalculate_path_desirability (path); - if (NULL != entry->cc) - force = GNUNET_YES; - path->hn = GCP_attach_path (peers[i], - path, - old_len + (unsigned int) i, - force); - if (NULL != path->hn) - break; - GCP_path_entry_remove (entry->peer, - entry, - old_len + i); - GNUNET_free (entry); - path->entries[old_len + i] = NULL; - } + path->entries_length = old_len + num_peers; + attach_path (path, old_len); if (NULL == path->hn) { /* none of the peers is interested in this path; - shrink path back and re-attach. */ - GNUNET_array_grow (path->entries, - path->entries_length, - old_len); + re-attach. */ + GNUNET_assert (old_len == path->entries_length); path->hn = GCP_attach_path (path->entries[old_len - 1]->peer, path, old_len - 1, @@ -483,7 +469,6 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, struct CadetPeer *cpath[get_path_length + put_path_length]; struct CheckMatchContext cm_ctx; struct CadetPeerPath *path; - struct GNUNET_CONTAINER_HeapNode *hn; int i; unsigned int skip; unsigned int total_len; @@ -501,6 +486,14 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, pid = (off < get_path_length) ? &get_path[get_path_length - off - 1] : &put_path[get_path_length + put_path_length - off - 1]; + /* Check that I am not in the path */ + if (0 == memcmp (&my_full_id, + pid, + sizeof (struct GNUNET_PeerIdentity))) + { + skip = off + 1; + continue; + } cpath[off - skip] = GCP_get (pid, GNUNET_YES); /* Check that no peer is twice on the path */ @@ -513,6 +506,12 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, } } } + if (skip >= total_len) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Path discovered from DHT is one big cycle?\n"); + return; + } total_len -= skip; /* First figure out if this path is a subset of an existing path, an @@ -573,39 +572,17 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, } /* Finally, try to attach it */ - hn = NULL; - for (i=total_len-1;i>=0;i--) - { - struct CadetPeerPathEntry *entry = path->entries[i]; - - path->entries_length = i + 1; - recalculate_path_desirability (path); - hn = GCP_attach_path (cpath[i], - path, - (unsigned int) i, - GNUNET_NO); - if (NULL != hn) - break; - GCP_path_entry_remove (entry->peer, - entry, - i); - GNUNET_free (entry); - path->entries[i] = NULL; - } - if (NULL == hn) + attach_path (path, 0); + if (NULL == path->hn) { /* None of the peers on the path care about it. */ LOG (GNUNET_ERROR_TYPE_DEBUG, "Path discovered from DHT is not interesting to us\n"); - GNUNET_free (path->entries); + GNUNET_assert (0 == path->entries_length); + GNUNET_assert (NULL == path->entries); GNUNET_free (path); return; } - path->hn = hn; - /* Shrink path to actual useful length */ - GNUNET_array_grow (path->entries, - path->entries_length, - i + 1); LOG (GNUNET_ERROR_TYPE_DEBUG, "Created new path %s based on information from DHT\n", GCPP_2s (path)); diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c @@ -979,7 +979,7 @@ GCP_attach_path (struct CadetPeer *cp, (desirability < root_desirability) ) { LOG (GNUNET_ERROR_TYPE_DEBUG, - "Decided to not attach path %p to peer %s due to undesirability\n", + "Decided to not attach path %s to peer %s due to undesirability\n", GCPP_2s (path), GCP_2s (cp)); return NULL; diff --git a/src/cadet/gnunet-service-cadet_tunnels.c b/src/cadet/gnunet-service-cadet_tunnels.c @@ -2856,7 +2856,9 @@ handle_plaintext_channel_destroy (void *cls, * * @param cls the `struct CadetTunnel` that got the message * @param msg the message - * @return #GNUNET_OK (continue to process) + * @return #GNUNET_OK on success (always) + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int handle_decrypted (void *cls, diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c @@ -58,6 +58,11 @@ struct CadetTestChannelWrapper #define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20) /** + * How fast do we send messages? + */ +#define SEND_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 10) + +/** * DIFFERENT TESTS TO RUN */ #define SETUP 0 @@ -269,12 +274,20 @@ show_end_data (void) end_time = GNUNET_TIME_absolute_get (); total_time = GNUNET_TIME_absolute_get_difference (start_time, end_time); - FPRINTF (stderr, "\nResults of test \"%s\"\n", test_name); - FPRINTF (stderr, "Test time %s\n", + FPRINTF (stderr, + "\nResults of test \"%s\"\n", + test_name); + FPRINTF (stderr, + "Test time %s\n", GNUNET_STRINGS_relative_time_to_string (total_time, GNUNET_YES)); - FPRINTF (stderr, "Test bandwidth: %f kb/s\n", 4 * total_packets * 1.0 / (total_time.rel_value_us / 1000)); // 4bytes * ms - FPRINTF (stderr, "Test throughput: %f packets/s\n\n", total_packets * 1000.0 / (total_time.rel_value_us / 1000)); // packets * ms - GAUGER ("CADET", test_name, + FPRINTF (stderr, + "Test bandwidth: %f kb/s\n", + 4 * total_packets * 1.0 / (total_time.rel_value_us / 1000)); // 4bytes * ms + FPRINTF (stderr, + "Test throughput: %f packets/s\n\n", + total_packets * 1000.0 / (total_time.rel_value_us / 1000)); // packets * ms + GAUGER ("CADET", + test_name, total_packets * 1000.0 / (total_time.rel_value_us / 1000), "packets/s"); } @@ -290,13 +303,12 @@ static void disconnect_cadet_peers (void *cls) { long line = (long) cls; - unsigned int i; disconnect_task = NULL; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "disconnecting cadet service of peers, called from line %ld\n", line); - for (i = 0; i < 2; i++) + for (unsigned int i = 0; i < 2; i++) { GNUNET_TESTBED_operation_done (t_op[i]); } @@ -324,7 +336,8 @@ disconnect_cadet_peers (void *cls) static void shutdown_task (void *cls) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending test.\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Ending test.\n"); if (NULL != send_next_msg_task) { GNUNET_SCHEDULER_cancel (send_next_msg_task); @@ -339,7 +352,8 @@ shutdown_task (void *cls) { GNUNET_SCHEDULER_cancel (disconnect_task); disconnect_task = - GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, (void *) __LINE__); + GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, + (void *) __LINE__); } } @@ -354,10 +368,14 @@ shutdown_task (void *cls) * operation has executed successfully. */ static void -stats_cont (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg) +stats_cont (void *cls, + struct GNUNET_TESTBED_Operation *op, + const char *emsg) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, " KA sent: %u, KA received: %u\n", - ka_sent, ka_received); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "KA sent: %u, KA received: %u\n", + ka_sent, + ka_received); if ((KEEPALIVE == test) && ((ka_sent < 2) || (ka_sent > ka_received + 1))) { GNUNET_break (0); @@ -367,7 +385,8 @@ stats_cont (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg) if (NULL != disconnect_task) GNUNET_SCHEDULER_cancel (disconnect_task); - disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, cls); + disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, + cls); } @@ -438,7 +457,6 @@ gather_stats_and_exit (void *cls) } - /** * Abort test: schedule disconnect and shutdown immediately * @@ -450,9 +468,12 @@ abort_test (long line) if (NULL != disconnect_task) { GNUNET_SCHEDULER_cancel (disconnect_task); - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting test from %ld\n", line); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Aborting test from %ld\n", + line); disconnect_task = - GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, (void *) line); + GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, + (void *) line); } } @@ -525,6 +546,7 @@ send_test_message (struct GNUNET_CADET_Channel *channel) GNUNET_MQ_send (GNUNET_CADET_get_mq (channel), env); } + /** * Task to request a new data transmission in a SPEED test, without waiting * for previous messages to be sent/arrrive. @@ -537,7 +559,9 @@ send_next_msg (void *cls) struct GNUNET_CADET_Channel *channel; send_next_msg_task = NULL; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending next message: %d\n", data_sent); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Sending next message: %d\n", + data_sent); channel = GNUNET_YES == test_backwards ? incoming_ch : outgoing_ch; GNUNET_assert (NULL != channel); @@ -550,9 +574,9 @@ send_next_msg (void *cls) "Scheduling message %d\n", data_sent + 1); send_next_msg_task = - GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, - &send_next_msg, - NULL); + GNUNET_SCHEDULER_add_delayed (SEND_INTERVAL, + &send_next_msg, + NULL); } } @@ -571,7 +595,7 @@ reschedule_timeout_task (long line) if (NULL != disconnect_task) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - " reschedule timeout every 10 messages\n"); + "reschedule timeout every 10 messages\n"); GNUNET_SCHEDULER_cancel (disconnect_task); disconnect_task = GNUNET_SCHEDULER_add_delayed (short_time, &gather_stats_and_exit, @@ -605,7 +629,8 @@ check_data (void *cls, const struct GNUNET_MessageHeader *message) * @param message the actual message */ static void -handle_data (void *cls, const struct GNUNET_MessageHeader *message) +handle_data (void *cls, + const struct GNUNET_MessageHeader *message) { struct CadetTestChannelWrapper *ch = cls; struct GNUNET_CADET_Channel *channel = ch->ch; @@ -770,19 +795,21 @@ connect_handler (void *cls, struct GNUNET_CADET_Channel *channel, * @param channel Connection to the other end (henceforth invalid). */ static void -disconnect_handler (void *cls, const struct GNUNET_CADET_Channel *channel) +disconnect_handler (void *cls, + const struct GNUNET_CADET_Channel *channel) { struct CadetTestChannelWrapper *ch_w = cls; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Channel disconnected\n"); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Channel disconnected at %d\n", + ok); GNUNET_assert (ch_w->ch == channel); if (channel == incoming_ch) { ok++; incoming_ch = NULL; } - else if (outgoing_ch == channel - ) + else if (outgoing_ch == channel) { if (P2P_SIGNAL == test) { @@ -791,15 +818,17 @@ disconnect_handler (void *cls, const struct GNUNET_CADET_Channel *channel) outgoing_ch = NULL; } else - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unknown channel! %p\n", channel); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, " ok: %d\n", ok); - + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Unknown channel! %p\n", + channel); if (NULL != disconnect_task) { GNUNET_SCHEDULER_cancel (disconnect_task); disconnect_task = - GNUNET_SCHEDULER_add_now (&gather_stats_and_exit, (void *) __LINE__); + GNUNET_SCHEDULER_add_now (&gather_stats_and_exit, + (void *) __LINE__); } + GNUNET_free (ch_w); } @@ -879,25 +908,34 @@ start_test (void *cls) * NULL if the operation is successfull */ static void -pi_cb (void *cls, struct GNUNET_TESTBED_Operation *op, - const struct GNUNET_TESTBED_PeerInformation *pinfo, const char *emsg) +pi_cb (void *cls, + struct GNUNET_TESTBED_Operation *op, + const struct GNUNET_TESTBED_PeerInformation *pinfo, + const char *emsg) { long i = (long) cls; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ID callback for %ld\n", i); - - if ((NULL == pinfo) || (NULL != emsg)) + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "ID callback for %ld\n", + i); + if ( (NULL == pinfo) || + (NULL != emsg) ) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "pi_cb: %s\n", emsg); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "pi_cb: %s\n", + emsg); abort_test (__LINE__); return; } p_id[i] = pinfo->result.id; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " id: %s\n", GNUNET_i2s (p_id[i])); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "id: %s\n", + GNUNET_i2s (p_id[i])); p_ids++; if (p_ids < 2) return; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got all IDs, starting test\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Got all IDs, starting test\n"); test_task = GNUNET_SCHEDULER_add_now (&start_test, NULL); } @@ -929,7 +967,8 @@ tmain (void *cls, disconnect_task = GNUNET_SCHEDULER_add_delayed (short_time, &disconnect_cadet_peers, (void *) __LINE__); - GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); + GNUNET_SCHEDULER_add_shutdown (&shutdown_task, + NULL); t_op[0] = GNUNET_TESTBED_peer_get_information (peers[0], GNUNET_TESTBED_PIT_IDENTITY, &pi_cb, @@ -960,16 +999,16 @@ main (int argc, char *argv[]) char port_id[] = "test port"; struct GNUNET_GETOPT_CommandLineOption options[] = { GNUNET_GETOPT_option_relative_time ('t', - "time", - "short_time", - gettext_noop ("set short timeout"), - &short_time), + "time", + "short_time", + gettext_noop ("set short timeout"), + &short_time), GNUNET_GETOPT_option_uint ('m', - "messages", - "NUM_MESSAGES", - gettext_noop ("set number of messages to send"), - &total_packets), + "messages", + "NUM_MESSAGES", + gettext_noop ("set number of messages to send"), + &total_packets), GNUNET_GETOPT_OPTION_END }; diff --git a/src/conversation/gnunet-helper-audio-playback-gst.c b/src/conversation/gnunet-helper-audio-playback-gst.c @@ -221,6 +221,11 @@ feed_buffer_to_gst (const char *audio, size_t b_len) /** * Message callback + * + * @param msg message we received. + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing due to disconnect (no error) + * #GNUNET_SYSERR to stop further processing due to error */ static int stdin_receiver (void *cls, diff --git a/src/conversation/gnunet-helper-audio-playback.c b/src/conversation/gnunet-helper-audio-playback.c @@ -546,6 +546,11 @@ ogg_demux_and_decode () /** * Message callback + * + * @param msg message we received. + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing due to disconnect (no error) + * #GNUNET_SYSERR to stop further processing due to error */ static int stdin_receiver (void *cls, diff --git a/src/conversation/gnunet_gst.c b/src/conversation/gnunet_gst.c @@ -649,6 +649,11 @@ gnunet_read (GNUNET_gstData * d) /** * Message callback + * + * @param msg message we received. + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing due to disconnect (no error) + * #GNUNET_SYSERR to stop further processing due to error */ static int stdin_receiver (void *cls, diff --git a/src/conversation/microphone.c b/src/conversation/microphone.c @@ -65,7 +65,9 @@ struct Microphone * * @param cls clsoure with our `struct Microphone` * @param msg the message from the helper - * @return #GNUNET_OK on success, #GNUNET_SYSERR on error + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int process_record_messages (void *cls, diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c @@ -426,6 +426,9 @@ struct TokenizerContext * * @param cls reservation request (`struct TokenizerContext`) * @param message the actual message + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int tokenized_cb (void *cls, diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c @@ -708,6 +708,9 @@ setup_fresh_ping (struct GSC_KeyExchangeInfo *kx) * * @param cls the `struct GSC_KeyExchangeInfo` * @param m the message + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int deliver_message (void *cls, @@ -950,7 +953,7 @@ handle_ephemeral_key (void *cls, kx->peer, sizeof (struct GNUNET_PeerIdentity))) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Received EPHEMERAL_KEY from %s, but expected %s\n", GNUNET_i2s (&m->origin_identity), GNUNET_i2s_full (kx->peer)); diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c @@ -147,12 +147,6 @@ struct Session struct GNUNET_TIME_Relative typemap_delay; /** - * Is the neighbour queue empty and thus ready for us - * to transmit an encrypted message? - */ - int ready_to_transmit; - - /** * Is this the first time we're sending the typemap? If so, * we want to send it a bit faster the second time. 0 if * we are sending for the first time, 1 if not. @@ -641,13 +635,7 @@ try_transmission (struct Session *session) enum GNUNET_CORE_Priority maxpc; struct GSC_ClientActiveRequest *car; int excess; - - if (GNUNET_YES != session->ready_to_transmit) - { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Not yet ready to transmit, not evaluating queue\n"); - return; - } + msize = 0; min_deadline = GNUNET_TIME_UNIT_FOREVER_ABS; /* if the peer has excess bandwidth, background traffic is allowed, @@ -801,7 +789,6 @@ try_transmission (struct Session *session) total_bytes / total_msgs, GNUNET_NO); /* now actually transmit... */ - session->ready_to_transmit = GNUNET_NO; GSC_KX_encrypt_and_transmit (session->kx, pbuf, used); @@ -888,10 +875,12 @@ GSC_SESSIONS_solicit (const struct GNUNET_PeerIdentity *pid) { struct Session *session; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Transport solicits for %s\n", + GNUNET_i2s (pid)); session = find_session (pid); if (NULL == session) return; - session->ready_to_transmit = GNUNET_YES; try_transmission (session); } diff --git a/src/credential/credential.h b/src/credential/credential.h @@ -20,7 +20,7 @@ /** * @file credential/credential.h * @brief IPC messages between CREDENTIAL API and CREDENTIAL service - * @author Adnan Husain + * @author Martin Schanzenbach */ #ifndef CREDENTIAL_H #define CREDENTIAL_H diff --git a/src/credential/credential_api.c b/src/credential/credential_api.c @@ -20,7 +20,7 @@ /** * @file credential/credential_api.c * @brief library to access the CREDENTIAL service - * @author Adnan Husain + * @author Martin Schanzenbach */ #include "platform.h" #include "gnunet_util_lib.h" @@ -189,7 +189,7 @@ mq_error_handler (void *cls, * Check validity of message received from the CREDENTIAL service * * @param cls the `struct GNUNET_CREDENTIAL_Handle *` - * @param loookup_msg the incoming message + * @param vr_msg the incoming message */ static int check_result (void *cls, @@ -204,7 +204,7 @@ check_result (void *cls, * Handler for messages received from the CREDENTIAL service * * @param cls the `struct GNUNET_CREDENTIAL_Handle *` - * @param loookup_msg the incoming message + * @param vr_msg the incoming message */ static void handle_result (void *cls, @@ -348,15 +348,15 @@ GNUNET_CREDENTIAL_disconnect (struct GNUNET_CREDENTIAL_Handle *handle) * @param lr the verify request to cancel */ void -GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *vr) +GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *lr) { - struct GNUNET_CREDENTIAL_Handle *handle = vr->credential_handle; + struct GNUNET_CREDENTIAL_Handle *handle = lr->credential_handle; GNUNET_CONTAINER_DLL_remove (handle->request_head, handle->request_tail, - vr); - GNUNET_MQ_discard (vr->env); - GNUNET_free (vr); + lr); + GNUNET_MQ_discard (lr->env); + GNUNET_free (lr); } @@ -369,8 +369,6 @@ GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *vr) * @param issuer_key the issuer public key * @param issuer_attribute the issuer attribute * @param subject_key the subject public key - * @param credential_count number of credentials provided - * @param credentials subject credentials * @param proc function to call on result * @param proc_cls closure for processor * @return handle to the queued request diff --git a/src/credential/credential_misc.c b/src/credential/credential_misc.c @@ -20,7 +20,7 @@ /** - * @file credential/credential_mic.c + * @file credential/credential_misc.c * @brief Misc API for credentials * * @author Martin Schanzenbach @@ -113,7 +113,6 @@ GNUNET_CREDENTIAL_credential_from_string (const char* s) /** * Issue an attribute to a subject * - * @param handle handle to the Credential service * @param issuer the ego that should be used to issue the attribute * @param subject the subject of the attribute * @param attribute the name of the attribute @@ -150,6 +149,7 @@ GNUNET_CREDENTIAL_credential_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey * { GNUNET_break (0); GNUNET_free (crd); + GNUNET_free (cred); return NULL; } cred->signature = crd->signature; diff --git a/src/credential/credential_serialization.c b/src/credential/credential_serialization.c @@ -34,11 +34,10 @@ /** * Calculate how many bytes we will need to serialize - * the given delegation chain and credential + * the given delegation chain * - * @param d_count number of delegation chain entries - * @param dd array of #GNUNET_CREDENTIAL_Delegation - * @param cd a #GNUNET_CREDENTIAL_Credential + * @param ds_count number of delegation chain entries + * @param dsr array of #GNUNET_CREDENTIAL_DelegationSet * @return the required size to serialize */ size_t @@ -62,8 +61,7 @@ GNUNET_CREDENTIAL_delegation_set_get_size (unsigned int ds_count, * Serizalize the given delegation chain entries and credential * * @param d_count number of delegation chain entries - * @param dd array of #GNUNET_CREDENTIAL_Delegation - * @param cd a #GNUNET_CREDENTIAL_Credential + * @param dsr array of #GNUNET_CREDENTIAL_DelegationSet * @param dest_size size of the destination * @param dest where to store the result * @return the size of the data, -1 on failure @@ -108,8 +106,7 @@ GNUNET_CREDENTIAL_delegation_set_serialize (unsigned int d_count, * @param len size of the serialized delegation chain and cred * @param src the serialized data * @param d_count the number of delegation chain entries - * @param dd where to put the delegation chain entries - * @param cd where to put the credential data + * @param dsr where to put the delegation chain entries * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int @@ -282,7 +279,6 @@ GNUNET_CREDENTIAL_delegation_chain_get_size (unsigned int d_count, ret += dd[i].issuer_attribute_len + dd[i].subject_attribute_len; } return ret+GNUNET_CREDENTIAL_credentials_get_size(c_count, cd); - return ret; } /** diff --git a/src/credential/gnunet-credential.c b/src/credential/gnunet-credential.c @@ -20,7 +20,7 @@ /** * @file gnunet-credential.c * @brief command line tool to access command line Credential service - * @author Adnan Husain + * @author Martin Schanzenbach */ #include "platform.h" #include <gnunet_util_lib.h> @@ -158,13 +158,6 @@ do_timeout (void *cls) GNUNET_SCHEDULER_shutdown (); } -/** - * Function called with the result of a Credential lookup. - * - * @param cls the 'const char *' name that was resolved - * @param cd_count number of records returned - * @param cd array of @a cd_count records with the results - */ static void handle_collect_result (void *cls, unsigned int d_count, @@ -192,13 +185,6 @@ handle_collect_result (void *cls, } -/** - * Function called with the result of a Credential lookup. - * - * @param cls the 'const char *' name that was resolved - * @param cd_count number of records returned - * @param cd array of @a cd_count records with the results - */ static void handle_verify_result (void *cls, unsigned int d_count, @@ -385,12 +371,14 @@ run (void *cls, fprintf (stderr, _("Failed to connect to CREDENTIAL\n")); GNUNET_SCHEDULER_shutdown (); + return; } if (NULL == issuer_attr) { fprintf (stderr, _("You must provide issuer the attribute\n")); GNUNET_SCHEDULER_shutdown (); + return; } if (NULL == ego_name) @@ -446,6 +434,7 @@ run (void *cls, _("Issuer public key `%s' is not well-formed\n"), issuer_key); GNUNET_SCHEDULER_shutdown (); + return; } credential = GNUNET_CREDENTIAL_connect (cfg); @@ -454,12 +443,14 @@ run (void *cls, fprintf (stderr, _("Failed to connect to CREDENTIAL\n")); GNUNET_SCHEDULER_shutdown (); + return; } if (NULL == issuer_attr || NULL == subject_credential) { fprintf (stderr, _("You must provide issuer and subject attributes\n")); GNUNET_SCHEDULER_shutdown (); + return; } //Subject credentials are comma separated @@ -471,6 +462,7 @@ run (void *cls, "Invalid subject credentials\n"); GNUNET_free (tmp); GNUNET_SCHEDULER_shutdown (); + return; } int count = 1; int i; @@ -504,6 +496,7 @@ run (void *cls, { GNUNET_free ((char*)credentials[i].issuer_attribute); } + GNUNET_free (tmp); } else if (GNUNET_YES == create_cred) { if (NULL == ego_name) { diff --git a/src/credential/gnunet-service-credential.c b/src/credential/gnunet-service-credential.c @@ -18,9 +18,9 @@ Boston, MA 02110-1301, USA. */ /** - * @file gns/gnunet-service-credential.c - * @brief GNU Credential Service (main service) - * @author Adnan Husain + * @file credential/gnunet-service-credential.c + * @brief GNUnet Credential Service (main service) + * @author Martin Schanzenbach */ #include "platform.h" #include "gnunet_util_lib.h" @@ -377,16 +377,11 @@ cleanup_delegation_set (struct DelegationSetQueueEntry *ds_entry) } GNUNET_free (dq_entry); } - if (NULL != ds_entry->issuer_key) - GNUNET_free (ds_entry->issuer_key); - if (NULL != ds_entry->lookup_attribute) - GNUNET_free (ds_entry->lookup_attribute); - if (NULL != ds_entry->issuer_attribute) - GNUNET_free (ds_entry->issuer_attribute); - if (NULL != ds_entry->unresolved_attribute_delegation) - GNUNET_free (ds_entry->unresolved_attribute_delegation); - if (NULL != ds_entry->attr_trailer) - GNUNET_free (ds_entry->attr_trailer); + GNUNET_free_non_null (ds_entry->issuer_key); + GNUNET_free_non_null (ds_entry->lookup_attribute); + GNUNET_free_non_null (ds_entry->issuer_attribute); + GNUNET_free_non_null (ds_entry->unresolved_attribute_delegation); + GNUNET_free_non_null (ds_entry->attr_trailer); if (NULL != ds_entry->lookup_request) { GNUNET_GNS_lookup_cancel (ds_entry->lookup_request); @@ -394,10 +389,8 @@ cleanup_delegation_set (struct DelegationSetQueueEntry *ds_entry) } if (NULL != ds_entry->delegation_chain_entry) { - if (NULL != ds_entry->delegation_chain_entry->subject_attribute) - GNUNET_free (ds_entry->delegation_chain_entry->subject_attribute); - if (NULL != ds_entry->delegation_chain_entry->issuer_attribute) - GNUNET_free (ds_entry->delegation_chain_entry->issuer_attribute); + GNUNET_free_non_null (ds_entry->delegation_chain_entry->subject_attribute); + GNUNET_free_non_null (ds_entry->delegation_chain_entry->issuer_attribute); GNUNET_free (ds_entry->delegation_chain_entry); } GNUNET_free (ds_entry); @@ -415,8 +408,7 @@ cleanup_handle (struct VerifyRequestHandle *vrh) vrh->lookup_request = NULL; } cleanup_delegation_set (vrh->root_set); - if (NULL != vrh->issuer_attribute) - GNUNET_free (vrh->issuer_attribute); + GNUNET_free_non_null (vrh->issuer_attribute); for (cr_entry = vrh->cred_chain_head; NULL != vrh->cred_chain_head; cr_entry = vrh->cred_chain_head) @@ -424,19 +416,12 @@ cleanup_handle (struct VerifyRequestHandle *vrh) GNUNET_CONTAINER_DLL_remove (vrh->cred_chain_head, vrh->cred_chain_tail, cr_entry); - if (NULL != cr_entry->credential); - GNUNET_free (cr_entry->credential); + GNUNET_free_non_null (cr_entry->credential); GNUNET_free (cr_entry); } GNUNET_free (vrh); } -/** - * Task run during shutdown. - * - * @param cls unused - * @param tc unused - */ static void shutdown_task (void *cls) { @@ -475,11 +460,6 @@ shutdown_task (void *cls) -/** - * Send. - * - * @param handle the handle to the request - */ static void send_lookup_response (struct VerifyRequestHandle *vrh) { @@ -491,12 +471,11 @@ send_lookup_response (struct VerifyRequestHandle *vrh) struct CredentialRecordEntry *cd; struct CredentialRecordEntry *tmp; size_t size; - int i; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending response\n"); dce = vrh->delegation_chain_head; - for (i=0;i<vrh->delegation_chain_size;i++) + for (uint32_t i=0;i<vrh->delegation_chain_size;i++) { dd[i].issuer_key = dce->issuer_key; dd[i].subject_key = dce->subject_key; @@ -537,7 +516,7 @@ send_lookup_response (struct VerifyRequestHandle *vrh) * Append at the end of rmsg */ cd = vrh->cred_chain_head; - for (i=0;i<vrh->cred_chain_size;i++) + for (uint32_t i=0;i<vrh->cred_chain_size;i++) { cred[i].issuer_key = cd->credential->issuer_key; cred[i].subject_key = cd->credential->subject_key; @@ -598,8 +577,6 @@ backward_resolution (void* cls, struct DelegationQueueEntry *dq_entry; char *expanded_attr; char *lookup_attribute; - int i; - int j; current_set = cls; @@ -610,7 +587,7 @@ backward_resolution (void* cls, "Got %d attrs\n", rd_count); // Each OR - for (i=0; i < rd_count; i++) + for (uint32_t i=0; i < rd_count; i++) { if (GNUNET_GNSRECORD_TYPE_ATTRIBUTE != rd[i].record_type) continue; @@ -637,7 +614,7 @@ backward_resolution (void* cls, current_set->queue_entries_tail, dq_entry); // Each AND - for (j=0; j<ntohl(sets->set_count); j++) + for (uint32_t j=0; j<ntohl(sets->set_count); j++) { ds_entry = GNUNET_new (struct DelegationSetQueueEntry); if (NULL != current_set->attr_trailer) @@ -745,6 +722,12 @@ backward_resolution (void* cls, strcpy (issuer_attribute_name, ds_entry->unresolved_attribute_delegation); char *next_attr = strtok (issuer_attribute_name, "."); + if (NULL == next_attr) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to parse next attribute\n"); + continue; + } GNUNET_asprintf (&lookup_attribute, "%s.gnu", next_attr); @@ -793,8 +776,6 @@ backward_resolution (void* cls, * Result from GNS lookup. * * @param cls the closure (our client lookup handle) - * @param rd_count the number of records in @a rd - * @param rd the record data */ static void delegation_chain_resolution_start (void* cls) @@ -831,7 +812,7 @@ delegation_chain_resolution_start (void* cls) * Check for attributes from the issuer and follow the chain * till you get the required subject's attributes */ - char issuer_attribute_name[strlen (vrh->issuer_attribute)]; + char issuer_attribute_name[strlen (vrh->issuer_attribute) + strlen (".gnu") + 1]; strcpy (issuer_attribute_name, vrh->issuer_attribute); strcpy (issuer_attribute_name + strlen (vrh->issuer_attribute), @@ -858,13 +839,6 @@ delegation_chain_resolution_start (void* cls) ds_entry); } -/** - * Checks a #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY message - * - * @param cls client sending the message - * @param v_msg message of type `struct VerifyMessage` - * @return #GNUNET_OK if @a v_msg is well-formed - */ static int check_verify (void *cls, const struct VerifyMessage *v_msg) @@ -893,13 +867,6 @@ check_verify (void *cls, return GNUNET_OK; } -/** - * Handle Credential verification requests from client - * - * @param cls the closure - * @param client the client - * @param message the message - */ static void handle_verify (void *cls, const struct VerifyMessage *v_msg) @@ -909,7 +876,6 @@ handle_verify (void *cls, struct CredentialRecordEntry *cr_entry; uint32_t credentials_count; uint32_t credential_data_size; - int i; char attr[GNUNET_CREDENTIAL_MAX_LENGTH + 1]; char issuer_attribute[GNUNET_CREDENTIAL_MAX_LENGTH + 1]; char *attrptr = attr; @@ -929,7 +895,7 @@ handle_verify (void *cls, vrh->issuer_key = v_msg->issuer_key; vrh->subject_key = v_msg->subject_key; vrh->issuer_attribute = GNUNET_strdup (issuer_attribute); - if (NULL == issuer_attribute) + if (0 == strlen (issuer_attribute)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No issuer attribute provided!\n"); @@ -958,7 +924,7 @@ handle_verify (void *cls, return; } - for (i=0;i<credentials_count;i++) { + for (uint32_t i=0;i<credentials_count;i++) { cr_entry = GNUNET_new (struct CredentialRecordEntry); cr_entry->credential = GNUNET_malloc (sizeof (struct GNUNET_CREDENTIAL_Credential) + credentials[i].issuer_attribute_len); @@ -979,9 +945,6 @@ handle_verify (void *cls, } -/** - * We encountered an error while collecting - */ static void handle_cred_collection_error_cb (void *cls) { @@ -1001,9 +964,6 @@ collect_next (void *cls) GNUNET_NAMESTORE_zone_iterator_next (vrh->cred_collection_iter); } -/** - * Store credential - */ static void handle_cred_collection_cb (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, @@ -1015,10 +975,9 @@ handle_cred_collection_cb (void *cls, struct GNUNET_CREDENTIAL_Credential *crd; struct CredentialRecordEntry *cr_entry; int cred_record_count; - int i; cred_record_count = 0; - for (i=0; i < rd_count; i++) + for (uint32_t i=0; i < rd_count; i++) { if (GNUNET_GNSRECORD_TYPE_CREDENTIAL != rd[i].record_type) continue; @@ -1042,9 +1001,6 @@ handle_cred_collection_cb (void *cls, vrh); } -/** - * We encountered an error while collecting - */ static void handle_cred_collection_finished_cb (void *cls) { @@ -1055,13 +1011,6 @@ handle_cred_collection_finished_cb (void *cls) delegation_chain_resolution_start (vrh); } -/** - * Handle Credential collection requests from client - * - * @param cls the closure - * @param client the client - * @param message the message - */ static void handle_collect (void *cls, const struct CollectMessage *c_msg) @@ -1090,7 +1039,7 @@ handle_collect (void *cls, &vrh->subject_key); vrh->issuer_attribute = GNUNET_strdup (issuer_attribute); - if (NULL == issuer_attribute) + if (0 == strlen (issuer_attribute)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No issuer attribute provided!\n"); @@ -1113,13 +1062,6 @@ handle_collect (void *cls, } -/** - * Checks a #GNUNET_MESSAGE_TYPE_CREDENTIAL_COLLECT message - * - * @param cls client sending the message - * @param v_msg message of type `struct CollectMessage` - * @return #GNUNET_OK if @a v_msg is well-formed - */ static int check_collect (void *cls, const struct CollectMessage *c_msg) @@ -1140,7 +1082,7 @@ check_collect (void *cls, } attr = (const char *) &c_msg[1]; - if ( ('\0' != attr[ntohs(c_msg->header.size) - sizeof (struct CollectMessage) - 1]) || + if ( ('\0' != attr[msg_size - sizeof (struct CollectMessage) - 1]) || (strlen (attr) > GNUNET_CREDENTIAL_MAX_LENGTH) ) { GNUNET_break (0); @@ -1149,12 +1091,6 @@ check_collect (void *cls, return GNUNET_OK; } -/** - * One of our clients disconnected, clean up after it. - * - * @param cls NULL - * @param client the client that disconnected - */ static void client_disconnect_cb (void *cls, struct GNUNET_SERVICE_Client *client, @@ -1165,14 +1101,6 @@ client_disconnect_cb (void *cls, client); } -/** - * Add a client to our list of active clients. - * - * @param cls NULL - * @param client client to add - * @param mq message queue for @a client - * @return this client - */ static void * client_connect_cb (void *cls, struct GNUNET_SERVICE_Client *client, @@ -1188,8 +1116,8 @@ client_connect_cb (void *cls, * Process Credential requests. * * @param cls closure - * @param server the initialized server * @param c configuration to use + * @param handle service handle */ static void run (void *cls, diff --git a/src/credential/plugin_gnsrecord_credential.c b/src/credential/plugin_gnsrecord_credential.c @@ -21,7 +21,7 @@ /** * @file credential/plugin_gnsrecord_credential.c * @brief gnsrecord plugin to provide the API for CREDENTIAL records - * @author Adnan Husain + * @author Martin Schanzenbach */ #include "platform.h" @@ -199,6 +199,13 @@ credential_string_to_value (void *cls, GNUNET_free (tmp_str); tmp_str = GNUNET_strdup (s); token = strtok (tmp_str, ","); + if (NULL == token) + { + GNUNET_free (tmp_str); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Malformed string %s\n", s); + return GNUNET_SYSERR; + } struct GNUNET_CREDENTIAL_DelegationSet set[entries]; for (i=0;i<entries;i++) { @@ -219,7 +226,10 @@ credential_string_to_value (void *cls, set); if (-1 == tmp_data_size) + { + GNUNET_free (tmp_str); return GNUNET_SYSERR; + } *data_size += tmp_data_size; *data = sets = GNUNET_malloc (*data_size); GNUNET_CREDENTIAL_delegation_set_serialize (entries, diff --git a/src/credential/plugin_rest_credential.c b/src/credential/plugin_rest_credential.c @@ -19,7 +19,7 @@ */ /** * @author Martin Schanzenbach - * @file gns/plugin_rest_credential.c + * @file credential/plugin_rest_credential.c * @brief GNUnet CREDENTIAL REST plugin * */ @@ -194,12 +194,6 @@ cleanup_handle (struct RequestHandle *handle) } -/** - * Task run on shutdown. Cleans up everything. - * - * @param cls unused - * @param tc scheduler context - */ static void do_error (void *cls) { @@ -213,7 +207,8 @@ do_error (void *cls) /** * Attribute delegation to JSON - * @param attr the attribute + * + * @param delegation_chain_entry the DSE * @return JSON, NULL if failed */ static json_t* @@ -257,6 +252,7 @@ attribute_delegation_to_json (struct GNUNET_CREDENTIAL_Delegation *delegation_ch /** * JSONAPI resource to Credential + * * @param res the JSONAPI resource * @return the resulting credential, NULL if failed */ @@ -327,6 +323,7 @@ json_to_credential (json_t *res) /** * Credential to JSON + * * @param cred the credential * @return the resulting json, NULL if failed */ @@ -373,13 +370,6 @@ credential_to_json (struct GNUNET_CREDENTIAL_Credential *cred) return cred_obj; } -/** - * Function called with the result of a Credential lookup. - * - * @param cls the 'const char *' name that was resolved - * @param cd_count number of records returned - * @param cd array of @a cd_count records with the results - */ static void handle_collect_response (void *cls, unsigned int d_count, @@ -470,13 +460,6 @@ subject_ego_lookup (void *cls, -/** - * Function called with the result of a Credential lookup. - * - * @param cls the 'const char *' name that was resolved - * @param cd_count number of records returned - * @param cd array of @a cd_count records with the results - */ static void handle_verify_response (void *cls, unsigned int d_count, @@ -634,7 +617,6 @@ collect_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Missing subject\n"); - GNUNET_free (entity_attr); GNUNET_SCHEDULER_add_now (&do_error, handle); return; } @@ -644,7 +626,6 @@ collect_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Malformed subject\n"); - GNUNET_free (entity_attr); GNUNET_SCHEDULER_add_now (&do_error, handle); return; } @@ -745,7 +726,6 @@ verify_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Missing subject key\n"); - GNUNET_free (entity_attr); GNUNET_SCHEDULER_add_now (&do_error, handle); return; } @@ -755,7 +735,6 @@ verify_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Malformed subject\n"); - GNUNET_free (entity_attr); GNUNET_SCHEDULER_add_now (&do_error, handle); return; } @@ -765,7 +744,6 @@ verify_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, &handle->subject_key)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Malformed subject key\n"); - GNUNET_free (entity_attr); GNUNET_SCHEDULER_add_now (&do_error, handle); return; } @@ -875,6 +853,7 @@ send_cred_response (struct RequestHandle *handle, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Subject malformed\n"); + GNUNET_free (issuer); return; } GNUNET_asprintf (&id, @@ -886,6 +865,8 @@ send_cred_response (struct RequestHandle *handle, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Subject malformed\n"); + GNUNET_free (id); + GNUNET_free (issuer); return; } GNUNET_STRINGS_base64_encode ((char*)&cred->signature, @@ -970,6 +951,14 @@ get_cred_issuer_cb (void *cls, } expiration_str = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, &key); + if ( NULL == expiration_str ) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Expiration malformed\n"); + GNUNET_SCHEDULER_add_now (&do_error, handle); + return; + } + if (GNUNET_OK == GNUNET_STRINGS_fancy_time_to_relative (expiration_str, &etime_rel)) { @@ -1062,11 +1051,6 @@ issue_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, handle); } -/** - * Handle rest request - * - * @param handle the lookup handle - */ static void options_cont (struct GNUNET_REST_RequestHandle *con_handle, const char* url, @@ -1087,17 +1071,6 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle, } -/** - * Function processing the REST call - * - * @param method HTTP method - * @param url URL of the HTTP request - * @param data body of the HTTP request (optional) - * @param data_size length of the body - * @param proc callback function for the result - * @param proc_cls closure for callback function - * @return GNUNET_OK if request accepted - */ static void rest_credential_process_request(struct GNUNET_REST_RequestHandle *conndata_handle, GNUNET_REST_ResultProcessor proc, diff --git a/src/credential/test_credential_verify_simple.sh b/src/credential/test_credential_verify_simple.sh @@ -31,17 +31,19 @@ CRED=`$DO_TIMEOUT gnunet-credential --issue --ego=testissuer --subject=$SUBJECT_ TEST_CREDENTIAL="t1" gnunet-namestore -p -z testsubject -a -n $TEST_CREDENTIAL -t CRED -V "$CRED" -e 5m -c test_credential_lookup.conf +CREDS=`$DO_TIMEOUT gnunet-credential --collect --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --ego=testsubject -c test_credential_lookup.conf | paste -d, -s` + + #TODO2 Add -z swich like in gnunet-gns #RES_CRED=`$DO_TIMEOUT gnunet-credential --verify --issuer=$ISSUER_KEY --attribute="$TEST_ATTR" --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf` -RES_CRED=`gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --credential=$TEST_CREDENTIAL -c test_credential_lookup.conf` +RES_CRED=`gnunet-credential --verify --issuer=$ISSUER_KEY --attribute=$TEST_ATTR --subject=$SUBJECT_KEY --credential="$CREDS" -c test_credential_lookup.conf` #TODO cleanup properly gnunet-namestore -z testsubject -d -n $TEST_CREDENTIAL -t CRED -e never -c test_credential_lookup.conf gnunet-identity -D testsubject -c test_credential_lookup.conf gnunet-arm -e -c test_credential_lookup.conf -echo $RES_CRED #TODO3 proper test -if [ "$RES_CRED" == "Successful." ] +if [ "$RES_CRED" != "Failed." ] then exit 0 else diff --git a/src/curl/curl.c b/src/curl/curl.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet - Copyright (C) 2014, 2015, 2016 GNUnet e.V. + Copyright (C) 2014, 2015, 2016, 2018 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -466,6 +466,7 @@ GNUNET_CURL_perform (struct GNUNET_CURL_Context *ctx) CURLINFO_PRIVATE, (char **) &job)); GNUNET_assert (job->ctx == ctx); + response_code = 0; j = download_get_result (&job->db, job->easy_handle, &response_code); diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c @@ -538,6 +538,14 @@ extract_result_cb (void *cls, GNUNET_PQ_result_spec_end }; + if (GNUNET_YES != + GNUNET_PQ_extract_result (result, + rs, + i)) + { + GNUNET_break (0); + return; + } if (0 != (path_len % sizeof (struct GNUNET_PeerIdentity))) { GNUNET_break (0); diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am @@ -197,6 +197,7 @@ test_dht_monitor_LDADD = \ EXTRA_DIST = \ $(check_SCRIPTS) \ + gnunet-service-dht_clients.c \ test_dht_api_data.conf \ test_dht_api_peer1.conf \ test_dht_monitor.conf \ diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c @@ -55,7 +55,6 @@ static struct GNUNET_TRANSPORT_HelloGetHandle *ghh; struct GNUNET_TIME_Relative hello_expiration; -/* Code shared between different DHT implementations */ #include "gnunet-service-dht_clients.c" diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c @@ -1170,7 +1170,10 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, trc = GNUNET_NO; for (i=0;i<p->num_queries;i++) { - ret = GNUNET_DNSPARSER_builder_add_query (tmp, sizeof (tmp), &off, &p->queries[i]); + ret = GNUNET_DNSPARSER_builder_add_query (tmp, + sizeof (tmp), + &off, + &p->queries[i]); if (GNUNET_SYSERR == ret) return GNUNET_SYSERR; if (GNUNET_NO == ret) @@ -1182,7 +1185,10 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, } for (i=0;i<p->num_answers;i++) { - ret = add_record (tmp, sizeof (tmp), &off, &p->answers[i]); + ret = add_record (tmp, + sizeof (tmp), + &off, + &p->answers[i]); if (GNUNET_SYSERR == ret) return GNUNET_SYSERR; if (GNUNET_NO == ret) @@ -1194,7 +1200,10 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, } for (i=0;i<p->num_authority_records;i++) { - ret = add_record (tmp, sizeof (tmp), &off, &p->authority_records[i]); + ret = add_record (tmp, + sizeof (tmp), + &off, + &p->authority_records[i]); if (GNUNET_SYSERR == ret) return GNUNET_SYSERR; if (GNUNET_NO == ret) @@ -1206,7 +1215,10 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, } for (i=0;i<p->num_additional_records;i++) { - ret = add_record (tmp, sizeof (tmp), &off, &p->additional_records[i]); + ret = add_record (tmp, + sizeof (tmp), + &off, + &p->additional_records[i]); if (GNUNET_SYSERR == ret) return GNUNET_SYSERR; if (GNUNET_NO == ret) @@ -1219,11 +1231,15 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, if (GNUNET_YES == trc) dns.flags.message_truncated = 1; - GNUNET_memcpy (tmp, &dns, sizeof (struct GNUNET_TUN_DnsHeader)); + GNUNET_memcpy (tmp, + &dns, + sizeof (struct GNUNET_TUN_DnsHeader)); *buf = GNUNET_malloc (off); *buf_length = off; - GNUNET_memcpy (*buf, tmp, off); + GNUNET_memcpy (*buf, + tmp, + off); if (GNUNET_YES == trc) return GNUNET_NO; return GNUNET_OK; diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c @@ -211,9 +211,9 @@ expand_tree (struct GNUNET_FS_ShareTreeItem *parent, chld->short_filename[slen-1] = '\0'; chld->is_directory = is_directory; if (NULL != parent) - GNUNET_CONTAINER_DLL_insert (parent->children_head, - parent->children_tail, - chld); + GNUNET_CONTAINER_DLL_insert (parent->children_head, + parent->children_tail, + chld); return chld; } @@ -246,6 +246,9 @@ finish_scan (void *cls) * * @param cls the closure (directory scanner object) * @param msg message from the helper process + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int process_helper_msgs (void *cls, @@ -256,7 +259,8 @@ process_helper_msgs (void *cls, size_t left; #if 0 - fprintf (stderr, "DMS parses %u-byte message of type %u\n", + fprintf (stderr, + "DMS parses %u-byte message of type %u\n", (unsigned int) ntohs (msg->size), (unsigned int) ntohs (msg->type)); #endif @@ -274,11 +278,18 @@ process_helper_msgs (void *cls, filename, GNUNET_NO, GNUNET_FS_DIRSCANNER_FILE_START); if (NULL == ds->toplevel) + { ds->toplevel = expand_tree (ds->pos, - filename, GNUNET_NO); + filename, + GNUNET_NO); + } else + { + GNUNET_assert (NULL != ds->pos); (void) expand_tree (ds->pos, - filename, GNUNET_NO); + filename, + GNUNET_NO); + } return GNUNET_OK; case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY: if (filename[left-1] != '\0') @@ -300,7 +311,8 @@ process_helper_msgs (void *cls, filename, GNUNET_YES, GNUNET_FS_DIRSCANNER_FILE_START); ds->pos = expand_tree (ds->pos, - filename, GNUNET_YES); + filename, + GNUNET_YES); if (NULL == ds->toplevel) ds->toplevel = ds->pos; return GNUNET_OK; @@ -357,11 +369,13 @@ process_helper_msgs (void *cls, break; } ds->progress_callback (ds->progress_callback_cls, - filename, GNUNET_YES, + filename, + GNUNET_YES, GNUNET_FS_DIRSCANNER_EXTRACT_FINISHED); if (0 < left) { - ds->pos->meta = GNUNET_CONTAINER_meta_data_deserialize (end, left); + ds->pos->meta = GNUNET_CONTAINER_meta_data_deserialize (end, + left); if (NULL == ds->pos->meta) { GNUNET_break (0); diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c @@ -37,7 +37,8 @@ static int is_recursive_download (struct GNUNET_FS_DownloadContext *dc) { return (0 != (dc->options & GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE)) && - ( (GNUNET_YES == GNUNET_FS_meta_data_test_for_directory (dc->meta)) || + ( (GNUNET_YES == + GNUNET_FS_meta_data_test_for_directory (dc->meta)) || ( (NULL == dc->meta) && ( (NULL == dc->filename) || ( (strlen (dc->filename) >= strlen (GNUNET_FS_DIRECTORY_EXT)) && diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c @@ -568,7 +568,13 @@ process_ksk_result (struct GNUNET_FS_SearchContext *sc, /* check if new */ GNUNET_assert (NULL != sc); - GNUNET_FS_uri_to_key (uri, &key); + if (GNUNET_OK != + GNUNET_FS_uri_to_key (uri, + &key)) + { + GNUNET_break_op (0); + return; + } if (GNUNET_SYSERR == GNUNET_CONTAINER_multihashmap_get_multiple (ent->results, &key, @@ -680,8 +686,15 @@ process_sks_result (struct GNUNET_FS_SearchContext *sc, /* check if new */ GNUNET_assert (NULL != sc); - GNUNET_FS_uri_to_key (uri, &key); - GNUNET_CRYPTO_hash_xor (&uri->data.chk.chk.key, &uri->data.chk.chk.query, + if (GNUNET_OK != + GNUNET_FS_uri_to_key (uri, + &key)) + { + GNUNET_break (0); + return; + } + GNUNET_CRYPTO_hash_xor (&uri->data.chk.chk.key, + &uri->data.chk.chk.query, &key); if (GNUNET_SYSERR == GNUNET_CONTAINER_multihashmap_get_multiple (sc->master_result_map, &key, diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c @@ -96,8 +96,9 @@ * * @param uri uri to convert to a unique key * @param key where to store the unique key + * @return #GNUNET_OK on success */ -void +int GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode *key) { @@ -105,25 +106,35 @@ GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, { case GNUNET_FS_URI_CHK: *key = uri->data.chk.chk.query; - return; + return GNUNET_OK; case GNUNET_FS_URI_SKS: GNUNET_CRYPTO_hash (uri->data.sks.identifier, - strlen (uri->data.sks.identifier), key); - break; + strlen (uri->data.sks.identifier), + key); + return GNUNET_OK; case GNUNET_FS_URI_KSK: if (uri->data.ksk.keywordCount > 0) + { GNUNET_CRYPTO_hash (uri->data.ksk.keywords[0], - strlen (uri->data.ksk.keywords[0]), key); + strlen (uri->data.ksk.keywords[0]), + key); + return GNUNET_OK; + } + else + { + memset (key, 0, sizeof (struct GNUNET_HashCode)); + return GNUNET_SYSERR; + } break; case GNUNET_FS_URI_LOC: GNUNET_CRYPTO_hash (&uri->data.loc.fi, sizeof (struct FileIdentifier) + sizeof (struct GNUNET_PeerIdentity), key); - break; + return GNUNET_OK; default: memset (key, 0, sizeof (struct GNUNET_HashCode)); - break; + return GNUNET_SYSERR; } } diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c @@ -124,7 +124,8 @@ display_bar (unsigned long long x, * field in the `struct GNUNET_FS_ProgressInfo` */ static void * -progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) +progress_cb (void *cls, + const struct GNUNET_FS_ProgressInfo *info) { char *s; const char *s2; @@ -134,7 +135,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) { case GNUNET_FS_STATUS_DOWNLOAD_START: if (verbose > 1) - FPRINTF (stderr, _("Starting download `%s'.\n"), + FPRINTF (stderr, + _("Starting download `%s'.\n"), info->value.download.filename); break; case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS: @@ -146,8 +148,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us) s2 = _("<unknown time>"); else - s2 = GNUNET_STRINGS_relative_time_to_string ( - info->value.download.specifics.progress.block_download_duration, + s2 = GNUNET_STRINGS_relative_time_to_string (info->value.download.specifics.progress.block_download_duration, GNUNET_YES); t = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000LL / @@ -157,7 +158,10 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) _("Downloading `%s' at %llu/%llu (%s remaining, %s/s). Block took %s to download\n"), info->value.download.filename, (unsigned long long) info->value.download.completed, - (unsigned long long) info->value.download.size, s, t, s2); + (unsigned long long) info->value.download.size, + s, + t, + s2); GNUNET_free (s); GNUNET_free (t); } @@ -173,7 +177,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) if (0 != isatty (1)) fprintf (stdout, "\n"); #else - if (FILE_TYPE_CHAR == GetFileType (GetStdHandle (STD_OUTPUT_HANDLE))) + if (FILE_TYPE_CHAR == + GetFileType (GetStdHandle (STD_OUTPUT_HANDLE))) fprintf (stdout, "\n"); #endif FPRINTF (stderr, _("Error downloading: %s.\n"), @@ -188,10 +193,12 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) if (0 != isatty (1)) fprintf (stdout, "\n"); #else - if (FILE_TYPE_CHAR == GetFileType (GetStdHandle (STD_OUTPUT_HANDLE))) + if (FILE_TYPE_CHAR == + GetFileType (GetStdHandle (STD_OUTPUT_HANDLE))) fprintf (stdout, "\n"); #endif - FPRINTF (stdout, _("Downloading `%s' done (%s/s).\n"), + FPRINTF (stdout, + _("Downloading `%s' done (%s/s).\n"), info->value.download.filename, s); GNUNET_free (s); if (info->value.download.dc == dc) @@ -205,7 +212,9 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE: break; default: - FPRINTF (stderr, _("Unexpected status: %d\n"), info->status); + FPRINTF (stderr, + _("Unexpected status: %d\n"), + info->status); break; } return NULL; @@ -221,7 +230,9 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) * @param c configuration */ static void -run (void *cls, char *const *args, const char *cfgfile, +run (void *cls, + char *const *args, + const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) { struct GNUNET_FS_Uri *uri; @@ -230,41 +241,55 @@ run (void *cls, char *const *args, const char *cfgfile, if (NULL == args[0]) { - FPRINTF (stderr, "%s", _("You need to specify a URI argument.\n")); + FPRINTF (stderr, + "%s", + _("You need to specify a URI argument.\n")); return; } uri = GNUNET_FS_uri_parse (args[0], &emsg); if (NULL == uri) { - FPRINTF (stderr, _("Failed to parse URI: %s\n"), emsg); + FPRINTF (stderr, + _("Failed to parse URI: %s\n"), + emsg); GNUNET_free (emsg); ret = 1; return; } - if ((!GNUNET_FS_uri_test_chk (uri)) && (!GNUNET_FS_uri_test_loc (uri))) + if ( (! GNUNET_FS_uri_test_chk (uri)) && + (! GNUNET_FS_uri_test_loc (uri))) { - FPRINTF (stderr, "%s", _("Only CHK or LOC URIs supported.\n")); + FPRINTF (stderr, + "%s", + _("Only CHK or LOC URIs supported.\n")); ret = 1; GNUNET_FS_uri_destroy (uri); return; } if (NULL == filename) { - FPRINTF (stderr, "%s", _("Target filename must be specified.\n")); + FPRINTF (stderr, + "%s", + _("Target filename must be specified.\n")); ret = 1; GNUNET_FS_uri_destroy (uri); return; } cfg = c; - ctx = - GNUNET_FS_start (cfg, "gnunet-download", &progress_cb, NULL, - GNUNET_FS_FLAGS_NONE, - GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM, parallelism, - GNUNET_FS_OPTIONS_REQUEST_PARALLELISM, - request_parallelism, GNUNET_FS_OPTIONS_END); + ctx = GNUNET_FS_start (cfg, + "gnunet-download", + &progress_cb, NULL, + GNUNET_FS_FLAGS_NONE, + GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM, + parallelism, + GNUNET_FS_OPTIONS_REQUEST_PARALLELISM, + request_parallelism, + GNUNET_FS_OPTIONS_END); if (NULL == ctx) { - FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); + FPRINTF (stderr, + _("Could not initialize `%s' subsystem.\n"), + "FS"); GNUNET_FS_uri_destroy (uri); ret = 1; return; @@ -274,9 +299,17 @@ run (void *cls, char *const *args, const char *cfgfile, options |= GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE; if (local_only) options |= GNUNET_FS_DOWNLOAD_OPTION_LOOPBACK_ONLY; - dc = GNUNET_FS_download_start (ctx, uri, NULL, filename, NULL, 0, + dc = GNUNET_FS_download_start (ctx, + uri, + NULL, + filename, + NULL, + 0, GNUNET_FS_uri_chk_get_file_size (uri), - anonymity, options, NULL, NULL); + anonymity, + options, + NULL, + NULL); GNUNET_FS_uri_destroy (uri); if (dc == NULL) { @@ -301,60 +334,58 @@ main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { GNUNET_GETOPT_option_uint ('a', - "anonymity", - "LEVEL", - gettext_noop ("set the desired LEVEL of receiver-anonymity"), - &anonymity), + "anonymity", + "LEVEL", + gettext_noop ("set the desired LEVEL of receiver-anonymity"), + &anonymity), GNUNET_GETOPT_option_flag ('D', - "delete-incomplete", - gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"), - &delete_incomplete), + "delete-incomplete", + gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"), + &delete_incomplete), GNUNET_GETOPT_option_flag ('n', - "no-network", - gettext_noop ("only search the local peer (no P2P network search)"), - &local_only), - + "no-network", + gettext_noop ("only search the local peer (no P2P network search)"), + &local_only), GNUNET_GETOPT_option_string ('o', "output", "FILENAME", gettext_noop ("write the file to FILENAME"), &filename), - GNUNET_GETOPT_option_uint ('p', - "parallelism", - "DOWNLOADS", - gettext_noop ("set the maximum number of parallel downloads that is allowed"), - &parallelism), - + "parallelism", + "DOWNLOADS", + gettext_noop ("set the maximum number of parallel downloads that is allowed"), + &parallelism), GNUNET_GETOPT_option_uint ('r', - "request-parallelism", - "REQUESTS", - gettext_noop ("set the maximum number of parallel requests for blocks that is allowed"), - &request_parallelism), - + "request-parallelism", + "REQUESTS", + gettext_noop ("set the maximum number of parallel requests for blocks that is allowed"), + &request_parallelism), GNUNET_GETOPT_option_flag ('R', - "recursive", - gettext_noop ("download a GNUnet directory recursively"), - &do_recursive), - + "recursive", + gettext_noop ("download a GNUnet directory recursively"), + &do_recursive), GNUNET_GETOPT_option_increment_uint ('V', - "verbose", - gettext_noop ("be verbose (print progress information)"), - &verbose), - + "verbose", + gettext_noop ("be verbose (print progress information)"), + &verbose), GNUNET_GETOPT_OPTION_END }; - if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) + if (GNUNET_OK != + GNUNET_STRINGS_get_utf8_args (argc, argv, + &argc, &argv)) return 2; ret = (GNUNET_OK == - GNUNET_PROGRAM_run (argc, argv, "gnunet-download [OPTIONS] URI", + GNUNET_PROGRAM_run (argc, argv, + "gnunet-download [OPTIONS] URI", gettext_noop ("Download files from GNUnet using a GNUnet CHK or LOC URI (gnunet://fs/chk/...)"), - options, &run, NULL)) ? ret : 1; + options, + &run, NULL)) ? ret : 1; GNUNET_free ((void*) argv); return ret; } diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c @@ -179,7 +179,6 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) GNUNET_FS_DOWNLOAD_OPTION_NONE, "download", NULL); break; case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: - consider_restart (event->status); printf ("Download complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000000LL / (1 + diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c @@ -134,7 +134,6 @@ progress_cb (void *cls, switch (event->status) { case GNUNET_FS_STATUS_PUBLISH_COMPLETED: - consider_restart (event->status); ret = event->value.publish.cctx; printf ("Publish complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000000LL / diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c @@ -533,14 +533,21 @@ read_dns4 (void *cls) } { char buf[size + 1]; + ssize_t sret; addrlen = sizeof (v4); - GNUNET_break (size == - GNUNET_NETWORK_socket_recvfrom (listen_socket4, - buf, - size + 1, - (struct sockaddr *) &v4, - &addrlen)); + sret = GNUNET_NETWORK_socket_recvfrom (listen_socket4, + buf, + size + 1, + (struct sockaddr *) &v4, + &addrlen); + if (0 > sret) + { + GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, + "recvfrom"); + return; + } + GNUNET_break (size == (size_t) sret); handle_request (listen_socket4, &v4, addrlen, @@ -579,16 +586,26 @@ read_dns6 (void *cls) } { char buf[size]; + ssize_t sret; addrlen = sizeof (v6); - GNUNET_break (size == - GNUNET_NETWORK_socket_recvfrom (listen_socket6, - buf, - size, - (struct sockaddr *) &v6, - &addrlen)); - handle_request (listen_socket6, &v6, addrlen, - buf, size); + sret = GNUNET_NETWORK_socket_recvfrom (listen_socket6, + buf, + size, + (struct sockaddr *) &v6, + &addrlen); + if (0 > sret) + { + GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, + "recvfrom"); + return; + } + GNUNET_break (size == (size_t) sret); + handle_request (listen_socket6, + &v6, + addrlen, + buf, + size); } } diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c @@ -327,7 +327,7 @@ struct GNS_ResolverHandle /** * ID of a task associated with the resolution process. */ - struct GNUNET_SCHEDULER_Task * task_id; + struct GNUNET_SCHEDULER_Task *task_id; /** * The name to resolve @@ -658,6 +658,8 @@ resolver_lookup_get_next_label (struct GNS_ResolverHandle *rh) } rh->protocol = pe->p_proto; rh->service = se->s_port; + GNUNET_free (proto_name); + GNUNET_free (srv_name); } return ret; } @@ -806,10 +808,10 @@ recursive_resolution (void *cls); * Begin the resolution process from 'name', starting with * the identification of the zone specified by 'name'. * - * @param rh resolution to perform + * @param cls closure with `struct GNS_ResolverHandle *rh` */ static void -start_resolver_lookup (struct GNS_ResolverHandle *rh); +start_resolver_lookup (void *cls); /** @@ -833,6 +835,7 @@ dns_result_parser (void *cls, unsigned int rd_count; unsigned int i; + (void) rs; rh->dns_request = NULL; GNUNET_SCHEDULER_cancel (rh->task_id); rh->task_id = NULL; @@ -857,7 +860,8 @@ dns_result_parser (void *cls, GNUNET_free (rh->name); rh->name = GNUNET_strdup (p->answers[0].data.hostname); rh->name_resolution_pos = strlen (rh->name); - start_resolver_lookup (rh); + rh->task_id = GNUNET_SCHEDULER_add_now (&start_resolver_lookup, + rh); GNUNET_DNSPARSER_free_packet (p); return; } @@ -1017,6 +1021,7 @@ recursive_dns_resolution (struct GNS_ResolverHandle *rh) struct GNUNET_DNSPARSER_Packet *p; char *dns_request; size_t dns_request_length; + int ret; ac = rh->ac_tail; GNUNET_assert (NULL != ac); @@ -1049,11 +1054,16 @@ recursive_dns_resolution (struct GNS_ResolverHandle *rh) UINT16_MAX); p->flags.opcode = GNUNET_TUN_DNS_OPCODE_QUERY; p->flags.recursion_desired = 1; - if (GNUNET_OK != - GNUNET_DNSPARSER_pack (p, 1024, &dns_request, &dns_request_length)) + ret = GNUNET_DNSPARSER_pack (p, + 1024, + &dns_request, + &dns_request_length); + if (GNUNET_OK != ret) { GNUNET_break (0); - rh->proc (rh->proc_cls, 0, NULL); + rh->proc (rh->proc_cls, + 0, + NULL); GNS_resolver_lookup_cancel (rh); } else @@ -1069,7 +1079,8 @@ recursive_dns_resolution (struct GNS_ResolverHandle *rh) &fail_resolution, rh); } - GNUNET_free (dns_request); + if (GNUNET_SYSERR != ret) + GNUNET_free (dns_request); GNUNET_DNSPARSER_free_packet (p); } @@ -1132,7 +1143,8 @@ handle_gns_cname_result (struct GNS_ResolverHandle *rh, GNUNET_free (rh->name); rh->name = GNUNET_strdup (cname); rh->name_resolution_pos = strlen (rh->name); - start_resolver_lookup (rh); + rh->task_id = GNUNET_SCHEDULER_add_now (&start_resolver_lookup, + rh); } @@ -1460,10 +1472,10 @@ handle_gns_resolution_result (void *cls, vpn_ctx->rd_data = GNUNET_malloc (vpn_ctx->rd_data_size); vpn_ctx->rd_count = rd_count; GNUNET_assert (vpn_ctx->rd_data_size == - GNUNET_GNSRECORD_records_serialize (rd_count, - rd, - vpn_ctx->rd_data_size, - vpn_ctx->rd_data)); + (size_t) GNUNET_GNSRECORD_records_serialize (rd_count, + rd, + vpn_ctx->rd_data_size, + vpn_ctx->rd_data)); vpn_ctx->vpn_request = GNUNET_VPN_redirect_to_peer (vpn_handle, af, ntohs (vpn->proto), @@ -1830,7 +1842,9 @@ handle_gns_resolution_result (void *cls, g2dc->rh->options = GNUNET_GNS_LO_DEFAULT; g2dc->rh->loop_limiter = rh->loop_limiter + 1; rh->g2dc = g2dc; - start_resolver_lookup (g2dc->rh); + g2dc->rh->task_id + = GNUNET_SCHEDULER_add_now (&start_resolver_lookup, + g2dc->rh); return; } case GNUNET_DNSPARSER_TYPE_CNAME: @@ -1884,7 +1898,7 @@ namecache_cache_continuation (void *cls, struct CacheOps *co = cls; co->namecache_qe_cache = NULL; - if (NULL != emsg) + if (GNUNET_OK != success) GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Failed to cache GNS resolution: %s\n"), emsg); @@ -1921,13 +1935,21 @@ handle_dht_response (void *cls, const struct GNUNET_PeerIdentity *put_path, unsigned int put_path_length, enum GNUNET_BLOCK_Type type, - size_t size, const void *data) + size_t size, + const void *data) { struct GNS_ResolverHandle *rh = cls; struct AuthorityChain *ac = rh->ac_tail; const struct GNUNET_GNSRECORD_Block *block; struct CacheOps *co; + (void) exp; + (void) key; + (void) get_path; + (void) get_path_length; + (void) put_path; + (void) put_path_length; + (void) type; GNUNET_DHT_get_stop (rh->get_handle); rh->get_handle = NULL; GNUNET_CONTAINER_heap_remove_node (rh->dht_heap_node); @@ -2230,16 +2252,18 @@ recursive_resolution (void *cls) * Begin the resolution process from 'name', starting with * the identification of the zone specified by 'name'. * - * @param rh resolution to perform + * @param cls the `struct GNS_ResolverHandle` */ static void -start_resolver_lookup (struct GNS_ResolverHandle *rh) +start_resolver_lookup (void *cls) { + struct GNS_ResolverHandle *rh = cls; struct AuthorityChain *ac; char *y; struct in_addr v4; struct in6_addr v6; + rh->task_id = NULL; if (1 == inet_pton (AF_INET, rh->name, &v4)) @@ -2360,7 +2384,8 @@ GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone, uint32_t record_type, const char *name, enum GNUNET_GNS_LocalOptions options, - GNS_ResultProcessor proc, void *proc_cls) + GNS_ResultProcessor proc, + void *proc_cls) { struct GNS_ResolverHandle *rh; @@ -2378,7 +2403,8 @@ GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone, rh->record_type = record_type; rh->name = GNUNET_strdup (name); rh->name_resolution_pos = strlen (name); - start_resolver_lookup (rh); + rh->task_id = GNUNET_SCHEDULER_add_now (&start_resolver_lookup, + rh); return rh; } diff --git a/src/hello/hello.c b/src/hello/hello.c @@ -271,7 +271,10 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg, msize = GNUNET_HELLO_size (msg); if ((msize < sizeof (struct GNUNET_HELLO_Message)) || (ntohs (msg->header.type) != GNUNET_MESSAGE_TYPE_HELLO)) + { + GNUNET_break_op (0); return NULL; + } ret = NULL; if (return_modified) { @@ -285,6 +288,10 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg, wpos = 0; woff = (NULL != ret) ? (char *) &ret[1] : NULL; address.peer.public_key = msg->publicKey; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "HELLO has %u bytes of address data\n", + (unsigned int) insize); + while (insize > 0) { esize = get_hello_address_size (inptr, diff --git a/src/identity-attribute/identity_attribute.c b/src/identity-attribute/identity_attribute.c @@ -19,7 +19,7 @@ */ /** - * @file identity-provider/identity_attribute.c + * @file identity-attribute/identity_attribute.c * @brief helper library to manage identity attributes * @author Martin Schanzenbach */ @@ -206,7 +206,7 @@ GNUNET_IDENTITY_ATTRIBUTE_value_to_string (uint32_t type, /** * Create a new attribute. * - * @param name the attribute name + * @param attr_name the attribute name * @param type the attribute type * @param data the attribute value * @param data_size the attribute value size @@ -214,7 +214,7 @@ GNUNET_IDENTITY_ATTRIBUTE_value_to_string (uint32_t type, */ struct GNUNET_IDENTITY_ATTRIBUTE_Claim * GNUNET_IDENTITY_ATTRIBUTE_claim_new (const char* attr_name, - uint32_t attr_type, + uint32_t type, const void* data, size_t data_size) { @@ -224,7 +224,7 @@ GNUNET_IDENTITY_ATTRIBUTE_claim_new (const char* attr_name, attr = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_ATTRIBUTE_Claim) + strlen (attr_name) + 1 + data_size); - attr->type = attr_type; + attr->type = type; attr->data_size = data_size; attr->version = 0; write_ptr = (char*)&attr[1]; diff --git a/src/identity-attribute/identity_attribute.h b/src/identity-attribute/identity_attribute.h @@ -19,8 +19,8 @@ */ /** * @author Martin Schanzenbach - * @file identity-provider/identity_attribute.h - * @brief GNUnet Identity Provider library + * @file identity-attribute/identity_attribute.h + * @brief GNUnet Identity attributes * */ #ifndef IDENTITY_ATTRIBUTE_H diff --git a/src/identity-attribute/plugin_identity_attribute_gnuid.c b/src/identity-attribute/plugin_identity_attribute_gnuid.c @@ -19,7 +19,7 @@ */ /** - * @file identity-provider/plugin_identity_attribute_gnuid.c + * @file identity-attribute/plugin_identity_attribute_gnuid.c * @brief identity attribute plugin to provide the API for fundamental * attribute types. * diff --git a/src/identity-provider/Makefile.am b/src/identity-provider/Makefile.am @@ -70,6 +70,7 @@ gnunet_service_identity_provider_LDADD = \ $(top_builddir)/src/namestore/libgnunetnamestore.la \ $(top_builddir)/src/identity/libgnunetidentity.la \ $(top_builddir)/src/statistics/libgnunetstatistics.la \ + $(top_builddir)/src/abe/libgnunetabe.la \ $(top_builddir)/src/credential/libgnunetcredential.la \ $(top_builddir)/src/identity-attribute/libgnunetidentityattribute.la \ libgnunetidentityprovider.la \ diff --git a/src/identity-provider/gnunet-idp.c b/src/identity-provider/gnunet-idp.c @@ -432,8 +432,7 @@ main(int argc, char *const argv[]) &type_str), GNUNET_GETOPT_OPTION_END }; - GNUNET_PROGRAM_run (argc, argv, "ct", + return (GNUNET_OK == GNUNET_PROGRAM_run (argc, argv, "ct", "ct", options, - &run, NULL); - return ret; + &run, NULL)); } diff --git a/src/identity-provider/gnunet-service-identity-provider.c b/src/identity-provider/gnunet-service-identity-provider.c @@ -30,6 +30,7 @@ #include "gnunet_identity_service.h" #include "gnunet_gnsrecord_lib.h" #include "gnunet_namestore_service.h" +#include "gnunet_abe_lib.h" #include "gnunet_credential_service.h" #include "gnunet_statistics_service.h" #include "gnunet_gns_service.h" @@ -94,11 +95,6 @@ static struct GNUNET_GNS_Handle *gns_handle; static struct GNUNET_CREDENTIAL_Handle *credential_handle; /** - * Stats handle - */ -static struct GNUNET_STATISTICS_Handle *stats_handle; - -/** * Namestore qe */ static struct GNUNET_NAMESTORE_QueueEntry *ns_qe; @@ -205,7 +201,7 @@ struct TicketIteration */ typedef void (*AbeBootstrapResult) (void *cls, - struct GNUNET_CRYPTO_AbeMasterKey *abe_key); + struct GNUNET_ABE_AbeMasterKey *abe_key); struct AbeBootstrapHandle @@ -233,7 +229,7 @@ struct AbeBootstrapHandle /** * The issuer egos ABE master key */ - struct GNUNET_CRYPTO_AbeMasterKey *abe_key; + struct GNUNET_ABE_AbeMasterKey *abe_key; }; /** @@ -264,7 +260,7 @@ struct AttributeIterator /** * The issuer egos ABE master key */ - struct GNUNET_CRYPTO_AbeMasterKey *abe_key; + struct GNUNET_ABE_AbeMasterKey *abe_key; /** * Namestore iterator @@ -355,7 +351,7 @@ struct AttributeStoreHandle /** * The issuer egos ABE master key */ - struct GNUNET_CRYPTO_AbeMasterKey *abe_key; + struct GNUNET_ABE_AbeMasterKey *abe_key; /** * QueueEntry @@ -423,7 +419,7 @@ struct ConsumeTicketHandle /** * The ABE key */ - struct GNUNET_CRYPTO_AbeKey *key; + struct GNUNET_ABE_AbeKey *key; /** * Attributes @@ -520,7 +516,7 @@ struct TicketRevocationHandle /** * The ABE master key */ - struct GNUNET_CRYPTO_AbeMasterKey *abe_key; + struct GNUNET_ABE_AbeMasterKey *abe_key; /** * Offset @@ -634,12 +630,8 @@ cleanup() GNUNET_NAMESTORE_cancel (ns_qe); if (NULL != ns_handle) GNUNET_NAMESTORE_disconnect (ns_handle); - if (NULL != stats_handle) - GNUNET_STATISTICS_destroy (stats_handle, GNUNET_NO); - if (NULL != token) - GNUNET_free (token); - if (NULL != label) - GNUNET_free (label); + GNUNET_free_non_null (token); + GNUNET_free_non_null (label); } @@ -647,7 +639,6 @@ cleanup() * Shutdown task * * @param cls NULL - * @param tc task context */ static void do_shutdown (void *cls) @@ -690,7 +681,7 @@ bootstrap_store_task (void *cls) struct GNUNET_GNSRECORD_Data rd[1]; char *key; - rd[0].data_size = GNUNET_CRYPTO_cpabe_serialize_master_key (abh->abe_key, + rd[0].data_size = GNUNET_ABE_cpabe_serialize_master_key (abh->abe_key, (void**)&key); rd[0].data = key; rd[0].record_type = GNUNET_GNSRECORD_TYPE_ABE_MASTER; @@ -713,7 +704,6 @@ static void bootstrap_abe_error (void *cls) { struct AbeBootstrapHandle *abh = cls; - GNUNET_free (abh); abh->proc (abh->proc_cls, NULL); GNUNET_free (abh); } @@ -730,13 +720,12 @@ bootstrap_abe_result (void *cls, const struct GNUNET_GNSRECORD_Data *rd) { struct AbeBootstrapHandle *abh = cls; - struct GNUNET_CRYPTO_AbeMasterKey *abe_key; - int i; + struct GNUNET_ABE_AbeMasterKey *abe_key; - for (i=0;i<rd_count;i++) { + for (uint32_t i=0;i<rd_count;i++) { if (GNUNET_GNSRECORD_TYPE_ABE_MASTER != rd[i].record_type) continue; - abe_key = GNUNET_CRYPTO_cpabe_deserialize_master_key (rd[i].data, + abe_key = GNUNET_ABE_cpabe_deserialize_master_key (rd[i].data, rd[i].data_size); abh->proc (abh->proc_cls, abe_key); GNUNET_free (abh); @@ -744,7 +733,7 @@ bootstrap_abe_result (void *cls, } //No ABE master found, bootstrapping... - abh->abe_key = GNUNET_CRYPTO_cpabe_create_master_key (); + abh->abe_key = GNUNET_ABE_cpabe_create_master_key (); GNUNET_SCHEDULER_add_now (&bootstrap_store_task, abh); } @@ -767,7 +756,7 @@ bootstrap_abe (const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, abh->identity = *identity; if (GNUNET_YES == recreate) { - abh->abe_key = GNUNET_CRYPTO_cpabe_create_master_key (); + abh->abe_key = GNUNET_ABE_cpabe_create_master_key (); GNUNET_SCHEDULER_add_now (&bootstrap_store_task, abh); } else { abh->ns_qe = GNUNET_NAMESTORE_records_lookup (ns_handle, @@ -874,7 +863,7 @@ store_ticket_issue_cont (void *cls, int serialize_abe_keyinfo2 (const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, - const struct GNUNET_CRYPTO_AbeKey *rp_key, + const struct GNUNET_ABE_AbeKey *rp_key, struct GNUNET_CRYPTO_EcdhePrivateKey **ecdh_privkey, char **result) { @@ -892,7 +881,7 @@ serialize_abe_keyinfo2 (const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, struct GNUNET_HashCode new_key_hash; ssize_t enc_size; - size = GNUNET_CRYPTO_cpabe_serialize_key (rp_key, + size = GNUNET_ABE_cpabe_serialize_key (rp_key, (void**)&serialized_key); attrs_str_len = 0; for (le = attrs->list_head; NULL != le; le = le->next) { @@ -951,19 +940,19 @@ serialize_abe_keyinfo2 (const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, static void issue_ticket_after_abe_bootstrap (void *cls, - struct GNUNET_CRYPTO_AbeMasterKey *abe_key) + struct GNUNET_ABE_AbeMasterKey *abe_key) { struct TicketIssueHandle *ih = cls; struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe_privkey; struct GNUNET_GNSRECORD_Data code_record[1]; - struct GNUNET_CRYPTO_AbeKey *rp_key; + struct GNUNET_ABE_AbeKey *rp_key; char *code_record_data; char **attrs; char *label; char *policy; int attrs_len; - int i; + uint32_t i; size_t code_record_len; //Create new ABE key for RP @@ -983,7 +972,7 @@ issue_ticket_after_abe_bootstrap (void *cls, i++; } attrs[i] = NULL; - rp_key = GNUNET_CRYPTO_cpabe_create_key (abe_key, + rp_key = GNUNET_ABE_cpabe_create_key (abe_key, attrs); //TODO review this wireformat @@ -1014,19 +1003,12 @@ issue_ticket_after_abe_bootstrap (void *cls, GNUNET_free (label); GNUNET_free (attrs); GNUNET_free (code_record_data); - GNUNET_CRYPTO_cpabe_delete_key (rp_key, + GNUNET_ABE_cpabe_delete_key (rp_key, GNUNET_YES); - GNUNET_CRYPTO_cpabe_delete_master_key (abe_key); + GNUNET_ABE_cpabe_delete_master_key (abe_key); } -/** - * Checks a ticket issue message - * - * @param cls client sending the message - * @param im message of type `struct TicketIssueMessage` - * @return #GNUNET_OK if @a im is well-formed - */ static int check_issue_ticket_message(void *cls, const struct IssueTicketMessage *im) @@ -1043,14 +1025,6 @@ check_issue_ticket_message(void *cls, } -/** - * - * Handler for ticket issue message - * - * @param cls unused - * @param client who sent the message - * @param message the message - */ static void handle_issue_ticket_message (void *cls, const struct IssueTicketMessage *im) @@ -1082,26 +1056,31 @@ handle_issue_ticket_message (void *cls, /** * Cleanup revoke handle + * + * @param rh the ticket revocation handle */ static void -cleanup_revoke_ticket_handle (struct TicketRevocationHandle *handle) -{ - if (NULL != handle->attrs) - GNUNET_IDENTITY_ATTRIBUTE_list_destroy (handle->attrs); - if (NULL != handle->rvk_attrs) - GNUNET_IDENTITY_ATTRIBUTE_list_destroy (handle->rvk_attrs); - if (NULL != handle->abe_key) - GNUNET_CRYPTO_cpabe_delete_master_key (handle->abe_key); - if (NULL != handle->ns_qe) - GNUNET_NAMESTORE_cancel (handle->ns_qe); - if (NULL != handle->ns_it) - GNUNET_NAMESTORE_zone_iteration_stop (handle->ns_it); - GNUNET_free (handle); +cleanup_revoke_ticket_handle (struct TicketRevocationHandle *rh) +{ + if (NULL != rh->attrs) + GNUNET_IDENTITY_ATTRIBUTE_list_destroy (rh->attrs); + if (NULL != rh->rvk_attrs) + GNUNET_IDENTITY_ATTRIBUTE_list_destroy (rh->rvk_attrs); + if (NULL != rh->abe_key) + GNUNET_ABE_cpabe_delete_master_key (rh->abe_key); + if (NULL != rh->ns_qe) + GNUNET_NAMESTORE_cancel (rh->ns_qe); + if (NULL != rh->ns_it) + GNUNET_NAMESTORE_zone_iteration_stop (rh->ns_it); + GNUNET_free (rh); } /** * Send revocation result + * + * @param rh ticket revocation handle + * @param success GNUNET_OK if successful result */ static void send_revocation_finished (struct TicketRevocationHandle *rh, @@ -1183,13 +1162,13 @@ ticket_reissue_proc (void *cls, struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le_rollover; struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe_privkey; struct GNUNET_GNSRECORD_Data code_record[1]; - struct GNUNET_CRYPTO_AbeKey *rp_key; + struct GNUNET_ABE_AbeKey *rp_key; char *code_record_data; char **attr_arr; char *label; char *policy; int attrs_len; - int i; + uint32_t i; int reissue_ticket; size_t code_record_len; @@ -1263,7 +1242,7 @@ ticket_reissue_proc (void *cls, i++; } attr_arr[i] = NULL; - rp_key = GNUNET_CRYPTO_cpabe_create_key (rh->abe_key, + rp_key = GNUNET_ABE_cpabe_create_key (rh->abe_key, attr_arr); //TODO review this wireformat @@ -1294,7 +1273,7 @@ ticket_reissue_proc (void *cls, GNUNET_free (label); GNUNET_free (attr_arr); GNUNET_free (code_record_data); - GNUNET_CRYPTO_cpabe_delete_key (rp_key, GNUNET_YES); + GNUNET_ABE_cpabe_delete_key (rp_key, GNUNET_YES); } @@ -1362,13 +1341,24 @@ reenc_next_attribute (struct TicketRevocationHandle *rh) /** * Encrypt the attribute value and store in namestore */ - enc_size = GNUNET_CRYPTO_cpabe_encrypt (buf, + enc_size = GNUNET_ABE_cpabe_encrypt (buf, buf_size, policy, //Policy rh->abe_key, (void**)&enc_buf); GNUNET_free (buf); + if (GNUNET_SYSERR == enc_size) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Unable to re-encrypt with policy %s\n", + policy); + GNUNET_free (policy); + send_revocation_finished (rh, GNUNET_SYSERR); + cleanup_revoke_ticket_handle (rh); + return; + } GNUNET_free (policy); + rd[0].data_size = enc_size + sizeof (uint32_t); rd_buf = GNUNET_malloc (rd[0].data_size); attr_ver = htonl (rh->attrs->list_head->claim->version); @@ -1463,7 +1453,7 @@ process_attributes_to_update (void *cls, static void get_ticket_after_abe_bootstrap (void *cls, - struct GNUNET_CRYPTO_AbeMasterKey *abe_key) + struct GNUNET_ABE_AbeMasterKey *abe_key) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished ABE bootstrap\n"); @@ -1475,13 +1465,6 @@ get_ticket_after_abe_bootstrap (void *cls, rh); } -/** - * Checks a ticket revocation message - * - * @param cls client sending the message - * @param im message of type `struct RevokeTicketMessage` - * @return #GNUNET_OK if @a im is well-formed - */ static int check_revoke_ticket_message(void *cls, const struct RevokeTicketMessage *im) @@ -1496,14 +1479,7 @@ check_revoke_ticket_message(void *cls, } return GNUNET_OK; } -/** - * - * Handler for ticket revocation message - * - * @param cls unused - * @param client who sent the message - * @param message the message - */ + static void handle_revoke_ticket_message (void *cls, const struct RevokeTicketMessage *rm) @@ -1534,8 +1510,8 @@ static void cleanup_consume_ticket_handle (struct ConsumeTicketHandle *handle) { if (NULL != handle->key) - GNUNET_CRYPTO_cpabe_delete_key (handle->key, - GNUNET_YES); + GNUNET_ABE_cpabe_delete_key (handle->key, + GNUNET_YES); if (NULL != handle->attrs) GNUNET_IDENTITY_ATTRIBUTE_list_destroy (handle->attrs); GNUNET_free (handle); @@ -1543,13 +1519,6 @@ cleanup_consume_ticket_handle (struct ConsumeTicketHandle *handle) -/** - * Checks a ticket consume message - * - * @param cls client sending the message - * @param im message of type `struct ConsumeTicketMessage` - * @return #GNUNET_OK if @a im is well-formed - */ static int check_consume_ticket_message(void *cls, const struct ConsumeTicketMessage *cm) @@ -1587,11 +1556,11 @@ process_parallel_lookup2 (void *cls, uint32_t rd_count, parallel_lookup); GNUNET_free (parallel_lookup->label); - GNUNET_STATISTICS_update (stats_handle, + GNUNET_STATISTICS_update (stats, "attribute_lookup_time_total", GNUNET_TIME_absolute_get_duration (parallel_lookup->lookup_start_time).rel_value_us, GNUNET_YES); - GNUNET_STATISTICS_update (stats_handle, + GNUNET_STATISTICS_update (stats, "attribute_lookups_count", 1, GNUNET_YES); @@ -1603,24 +1572,24 @@ process_parallel_lookup2 (void *cls, uint32_t rd_count, if (rd->record_type == GNUNET_GNSRECORD_TYPE_ID_ATTR) { decrypt_duration = GNUNET_TIME_absolute_get (); - attr_len = GNUNET_CRYPTO_cpabe_decrypt (rd->data + sizeof (uint32_t), - rd->data_size - sizeof (uint32_t), - handle->key, - (void**)&data); + attr_len = GNUNET_ABE_cpabe_decrypt (rd->data + sizeof (uint32_t), + rd->data_size - sizeof (uint32_t), + handle->key, + (void**)&data); if (GNUNET_SYSERR != attr_len) { - GNUNET_STATISTICS_update (stats_handle, + GNUNET_STATISTICS_update (stats, "abe_decrypt_time_total", GNUNET_TIME_absolute_get_duration (decrypt_duration).rel_value_us, GNUNET_YES); - GNUNET_STATISTICS_update (stats_handle, + GNUNET_STATISTICS_update (stats, "abe_decrypt_count", 1, GNUNET_YES); attr_le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); attr_le->claim = GNUNET_IDENTITY_ATTRIBUTE_deserialize (data, - attr_len); + attr_len); attr_le->claim->version = ntohl(*(uint32_t*)rd->data); GNUNET_CONTAINER_DLL_insert (handle->attrs->list_head, handle->attrs->list_tail, @@ -1652,7 +1621,7 @@ process_parallel_lookup2 (void *cls, uint32_t rd_count, crm->identity = handle->ticket.identity; data_tmp = (char *) &crm[1]; GNUNET_IDENTITY_ATTRIBUTE_list_serialize (handle->attrs, - data_tmp); + data_tmp); GNUNET_MQ_send (handle->client->mq, env); cleanup_consume_ticket_handle (handle); } @@ -1734,20 +1703,20 @@ process_consume_abe_key (void *cls, uint32_t rd_count, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Decrypted bytes: %zd Expected bytes: %zd\n", size, rd->data_size - sizeof (struct GNUNET_CRYPTO_EcdhePublicKey)); - GNUNET_STATISTICS_update (stats_handle, + GNUNET_STATISTICS_update (stats, "abe_key_lookup_time_total", GNUNET_TIME_absolute_get_duration (handle->lookup_start_time).rel_value_us, GNUNET_YES); - GNUNET_STATISTICS_update (stats_handle, + GNUNET_STATISTICS_update (stats, "abe_key_lookups_count", 1, GNUNET_YES); scopes = GNUNET_strdup (buf); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Scopes %s\n", scopes); - handle->key = GNUNET_CRYPTO_cpabe_deserialize_key ((void*)(buf + strlen (scopes) + 1), - rd->data_size - sizeof (struct GNUNET_CRYPTO_EcdhePublicKey) - - strlen (scopes) - 1); + handle->key = GNUNET_ABE_cpabe_deserialize_key ((void*)(buf + strlen (scopes) + 1), + rd->data_size - sizeof (struct GNUNET_CRYPTO_EcdhePublicKey) + - strlen (scopes) - 1); for (scope = strtok (scopes, ","); NULL != scope; scope = strtok (NULL, ",")) { @@ -1781,14 +1750,6 @@ process_consume_abe_key (void *cls, uint32_t rd_count, } -/** - * - * Handler for ticket issue message - * - * @param cls unused - * @param client who sent the message - * @param message the message - */ static void handle_consume_ticket_message (void *cls, const struct ConsumeTicketMessage *cm) @@ -1833,7 +1794,7 @@ cleanup_as_handle (struct AttributeStoreHandle *handle) if (NULL != handle->claim) GNUNET_free (handle->claim); if (NULL != handle->abe_key) - GNUNET_CRYPTO_cpabe_delete_master_key (handle->abe_key); + GNUNET_ABE_cpabe_delete_master_key (handle->abe_key); GNUNET_free (handle); } @@ -1886,7 +1847,7 @@ attr_store_task (void *cls) buf = GNUNET_malloc (buf_size); GNUNET_IDENTITY_ATTRIBUTE_serialize (as_handle->claim, - buf); + buf); GNUNET_asprintf (&policy, "%s_%lu", @@ -1897,11 +1858,22 @@ attr_store_task (void *cls) /** * Encrypt the attribute value and store in namestore */ - enc_size = GNUNET_CRYPTO_cpabe_encrypt (buf, - buf_size, - policy, //Policy - as_handle->abe_key, - (void**)&enc_buf); + enc_size = GNUNET_ABE_cpabe_encrypt (buf, + buf_size, + policy, //Policy + as_handle->abe_key, + (void**)&enc_buf); + if (GNUNET_SYSERR == enc_size) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to encrypt with policy %s\n", + policy); + cleanup_as_handle (as_handle); + GNUNET_free (buf); + GNUNET_free (policy); + GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); + return; + } GNUNET_free (buf); GNUNET_free (policy); rd[0].data_size = enc_size + sizeof (uint32_t); @@ -1931,7 +1903,7 @@ attr_store_task (void *cls) static void store_after_abe_bootstrap (void *cls, - struct GNUNET_CRYPTO_AbeMasterKey *abe_key) + struct GNUNET_ABE_AbeMasterKey *abe_key) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished ABE bootstrap\n"); @@ -1940,13 +1912,6 @@ store_after_abe_bootstrap (void *cls, GNUNET_SCHEDULER_add_now (&attr_store_task, ash); } -/** - * Checks a store message - * - * @param cls client sending the message - * @param sam message of type `struct AttributeStoreMessage` - * @return #GNUNET_OK if @a im is well-formed - */ static int check_attribute_store_message(void *cls, const struct AttributeStoreMessage *sam) @@ -1963,14 +1928,6 @@ check_attribute_store_message(void *cls, } -/** - * - * Handler for store message - * - * @param cls unused - * @param client who sent the message - * @param message the message - */ static void handle_attribute_store_message (void *cls, const struct AttributeStoreMessage *sam) @@ -1985,7 +1942,7 @@ handle_attribute_store_message (void *cls, as_handle = GNUNET_new (struct AttributeStoreHandle); as_handle->claim = GNUNET_IDENTITY_ATTRIBUTE_deserialize ((char*)&sam[1], - data_len); + data_len); as_handle->r_id = ntohl (sam->id); as_handle->identity = sam->identity; @@ -2001,7 +1958,7 @@ static void cleanup_iter_handle (struct AttributeIterator *ai) { if (NULL != ai->abe_key) - GNUNET_CRYPTO_cpabe_delete_master_key (ai->abe_key); + GNUNET_ABE_cpabe_delete_master_key (ai->abe_key); GNUNET_CONTAINER_DLL_remove (ai->client->op_head, ai->client->op_tail, ai); @@ -2043,7 +2000,7 @@ attr_iter_cb (void *cls, { struct AttributeIterator *ai = cls; struct AttributeResultMessage *arm; - struct GNUNET_CRYPTO_AbeKey *key; + struct GNUNET_ABE_AbeKey *key; struct GNUNET_MQ_Envelope *env; ssize_t msg_extra_len; char* attr_ser; @@ -2067,15 +2024,19 @@ attr_iter_cb (void *cls, label, attr_ver); attrs[0] = policy; attrs[1] = 0; - key = GNUNET_CRYPTO_cpabe_create_key (ai->abe_key, - attrs); - msg_extra_len = GNUNET_CRYPTO_cpabe_decrypt (rd->data+sizeof (uint32_t), - rd->data_size-sizeof (uint32_t), - key, - (void**)&attr_ser); - - GNUNET_CRYPTO_cpabe_delete_key (key, - GNUNET_YES); + key = GNUNET_ABE_cpabe_create_key (ai->abe_key, + attrs); + msg_extra_len = GNUNET_ABE_cpabe_decrypt (rd->data+sizeof (uint32_t), + rd->data_size-sizeof (uint32_t), + key, + (void**)&attr_ser); + if (GNUNET_SYSERR == msg_extra_len) { + GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it); + return; + } + + GNUNET_ABE_cpabe_delete_key (key, + GNUNET_YES); //GNUNET_free (policy); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attribute: %s\n", label); @@ -2092,14 +2053,14 @@ attr_iter_cb (void *cls, msg_extra_len); GNUNET_MQ_send (ai->client->mq, env); GNUNET_free (attr_ser); - GNUNET_CRYPTO_cpabe_delete_master_key (ai->abe_key); + GNUNET_ABE_cpabe_delete_master_key (ai->abe_key); ai->abe_key = NULL; } void iterate_after_abe_bootstrap (void *cls, - struct GNUNET_CRYPTO_AbeMasterKey *abe_key) + struct GNUNET_ABE_AbeMasterKey *abe_key) { struct AttributeIterator *ai = cls; ai->abe_key = abe_key; @@ -2115,7 +2076,7 @@ iterate_after_abe_bootstrap (void *cls, void iterate_next_after_abe_bootstrap (void *cls, - struct GNUNET_CRYPTO_AbeMasterKey *abe_key) + struct GNUNET_ABE_AbeMasterKey *abe_key) { struct AttributeIterator *ai = cls; ai->abe_key = abe_key; @@ -2124,12 +2085,6 @@ iterate_next_after_abe_bootstrap (void *cls, -/** - * Handles a #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ITERATION_START message - * - * @param cls the client sending the message - * @param zis_msg message from the client - */ static void handle_iteration_start (void *cls, const struct AttributeIterationStartMessage *ais_msg) @@ -2152,12 +2107,6 @@ handle_iteration_start (void *cls, } -/** - * Handles a #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ITERATION_STOP message - * - * @param cls the client sending the message - * @param ais_msg message from the client - */ static void handle_iteration_stop (void *cls, const struct AttributeIterationStopMessage *ais_msg) @@ -2187,12 +2136,6 @@ handle_iteration_stop (void *cls, } -/** - * Handles a #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT message - * - * @param cls the client sending the message - * @param message message from the client - */ static void handle_iteration_next (void *cls, const struct AttributeIterationNextMessage *ais_msg) @@ -2350,12 +2293,6 @@ run_ticket_iteration_round (struct TicketIteration *ti) cleanup_ticket_iter_handle (ti); } -/** - * Handles a #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START message - * - * @param cls the client sending the message - * @param tis_msg message from the client - */ static void handle_ticket_iteration_start (void *cls, const struct TicketIterationStartMessage *tis_msg) @@ -2380,12 +2317,6 @@ handle_ticket_iteration_start (void *cls, } -/** - * Handles a #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP message - * - * @param cls the client sending the message - * @param tis_msg message from the client - */ static void handle_ticket_iteration_stop (void *cls, const struct TicketIterationStopMessage *tis_msg) @@ -2415,12 +2346,6 @@ handle_ticket_iteration_stop (void *cls, } -/** - * Handles a #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT message - * - * @param cls the client sending the message - * @param message message from the client - */ static void handle_ticket_iteration_next (void *cls, const struct TicketIterationNextMessage *tis_msg) @@ -2452,9 +2377,8 @@ handle_ticket_iteration_next (void *cls, * Main function that will be run * * @param cls closure - * @param args remaining command-line arguments - * @param cfgfile name of the configuration file used (for saving, can be NULL) - * @param c configuration + * @param c the configuration used + * @param server the service handle */ static void run (void *cls, @@ -2486,8 +2410,6 @@ run (void *cls, identity_handle = GNUNET_IDENTITY_connect (cfg, NULL, NULL); - stats_handle = GNUNET_STATISTICS_create ("identity-provider", - cfg); /* Loading DB plugin */ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, diff --git a/src/identity-provider/identity_provider.h b/src/identity-provider/identity_provider.h @@ -248,7 +248,7 @@ struct TicketIterationStopMessage struct IssueTicketMessage { /** - * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ISSUE + * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_TICKET */ struct GNUNET_MessageHeader header; @@ -281,7 +281,7 @@ struct IssueTicketMessage struct RevokeTicketMessage { /** - * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ISSUE + * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET */ struct GNUNET_MessageHeader header; @@ -309,7 +309,7 @@ struct RevokeTicketMessage struct RevokeTicketResultMessage { /** - * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ISSUE + * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET_RESULT */ struct GNUNET_MessageHeader header; @@ -348,7 +348,7 @@ struct TicketResultMessage struct ConsumeTicketMessage { /** - * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ISSUE + * Type will be #GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET */ struct GNUNET_MessageHeader header; diff --git a/src/identity-provider/identity_provider_api.c b/src/identity-provider/identity_provider_api.c @@ -317,14 +317,13 @@ struct GNUNET_IDENTITY_PROVIDER_Handle }; - /** * Try again to connect to the service. * - * @param cls handle to the service. + * @param h handle to the identity provider service. */ static void -reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *handle); +reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h); /** * Reconnect @@ -344,7 +343,7 @@ reconnect_task (void *cls) /** * Disconnect from service and then reconnect. * - * @param handle our handle + * @param handle our service */ static void force_reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *handle) @@ -515,13 +514,16 @@ handle_consume_ticket_result (void *cls, GNUNET_IDENTITY_ATTRIBUTE_list_destroy (attrs); } } - op->ar_cb (op->cls, - NULL, - NULL); - GNUNET_CONTAINER_DLL_remove (h->op_head, - h->op_tail, - op); - GNUNET_free (op); + if (NULL != op) + { + op->ar_cb (op->cls, + NULL, + NULL); + GNUNET_CONTAINER_DLL_remove (h->op_head, + h->op_tail, + op); + GNUNET_free (op); + } return; } GNUNET_assert (0); @@ -775,7 +777,7 @@ handle_revoke_ticket_result (void *cls, /** * Try again to connect to the service. * - * @param cls handle to the identity provider service. + * @param h handle to the identity provider service. */ static void reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h) @@ -895,8 +897,7 @@ GNUNET_IDENTITY_PROVIDER_disconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h) * * @param h handle to the identity provider * @param pkey private key of the identity - * @param name the attribute name - * @param value the attribute value + * @param attr the attribute value * @param cont continuation to call when done * @param cont_cls closure for @a cont * @return handle to abort the request @@ -928,7 +929,7 @@ GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle sam->id = htonl (op->r_id); GNUNET_IDENTITY_ATTRIBUTE_serialize (attr, - (char*)&sam[1]); + (char*)&sam[1]); sam->attr_len = htons (attr_len); if (NULL != h->mq) @@ -1061,7 +1062,7 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_At * @param h the identity provider to use * @param iss the issuing identity * @param rp the subject of the ticket (the relying party) - * @param attr the attributes that the relying party is given access to + * @param attrs the attributes that the relying party is given access to * @param cb the callback * @param cb_cls the callback closure * @return handle to abort the operation @@ -1095,7 +1096,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h tim->id = htonl (op->r_id); GNUNET_IDENTITY_ATTRIBUTE_list_serialize (attrs, - (char*)&tim[1]); + (char*)&tim[1]); tim->attr_len = htons (attr_len); if (NULL != h->mq) @@ -1108,7 +1109,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h * Consumes an issued ticket. The ticket is persisted * and used to retrieve identity information from the issuer * - * @param id the identity provider to use + * @param h the identity provider to use * @param identity the identity that is the subject of the issued ticket (the relying party) * @param ticket the issued ticket to consume * @param cb the callback to call @@ -1218,7 +1219,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER * Lists all tickets that have been issued to remote * identites (relying parties) * - * @param id the identity provider to use + * @param h the identity provider to use * @param identity the issuing identity * @param error_cb function to call on error (i.e. disconnect), * the handle is afterwards invalid @@ -1324,7 +1325,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (struct GNUNET_IDENTITY_PROVIDER_ * Revoked an issued ticket. The relying party will be unable to retrieve * updated attributes. * - * @param id the identity provider to use + * @param h the identity provider to use * @param identity the issuing identity * @param ticket the ticket to revoke * @param cb the callback diff --git a/src/identity-provider/plugin_gnsrecord_identity_provider.c b/src/identity-provider/plugin_gnsrecord_identity_provider.c @@ -19,9 +19,9 @@ */ /** - * @file identity/plugin_gnsrecord_identity.c + * @file identity-provider/plugin_gnsrecord_identity_provider.c * @brief gnsrecord plugin to provide the API for identity records - * @author Christian Grothoff + * @author Martin Schanzenbach */ #include "platform.h" #include "gnunet_util_lib.h" diff --git a/src/identity-provider/plugin_identity_provider_sqlite.c b/src/identity-provider/plugin_identity_provider_sqlite.c @@ -368,6 +368,7 @@ database_shutdown (struct Plugin *plugin) * * @param cls closure (internal context for the plugin) * @param ticket the ticket to persist + * @param attrs the attributes associated with the ticket * @return #GNUNET_OK on success, else #GNUNET_SYSERR */ static int @@ -581,8 +582,7 @@ get_ticket_and_call_iterator (struct Plugin *plugin, * Lookup tickets in the datastore. * * @param cls closure (internal context for the plugin) - * @param zone private key of the zone - * @param label name of the record in the zone + * @param ticket the ticket to retrieve attributes for * @param iter function to call with the result * @param iter_cls closure for @a iter * @return #GNUNET_OK on success, else #GNUNET_SYSERR diff --git a/src/identity-provider/plugin_rest_identity_provider.c b/src/identity-provider/plugin_rest_identity_provider.c @@ -1540,17 +1540,6 @@ list_ego (void *cls, } -/** - * Function processing the REST call - * - * @param method HTTP method - * @param url URL of the HTTP request - * @param data body of the HTTP request (optional) - * @param data_size length of the body - * @param proc callback function for the result - * @param proc_cls closure for callback function - * @return GNUNET_OK if request accepted - */ static void rest_identity_process_request(struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_REST_ResultProcessor proc, diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c @@ -593,6 +593,7 @@ ego_edit_cont (struct GNUNET_REST_RequestHandle *con, struct GNUNET_JSONAPI_Resource *json_res; struct RequestHandle *handle = cls; struct EgoEntry *ego_entry; + struct EgoEntry *ego_entry_tmp; struct MHD_Response *resp; json_t *subsys_json; json_t *name_json; @@ -684,12 +685,12 @@ ego_edit_cont (struct GNUNET_REST_RequestHandle *con, if ((NULL != name_json) && json_is_string (name_json)) { newname = json_string_value (name_json); - for (ego_entry = handle->ego_head; - NULL != ego_entry; - ego_entry = ego_entry->next) + for (ego_entry_tmp = handle->ego_head; + NULL != ego_entry_tmp; + ego_entry_tmp = ego_entry_tmp->next) { - if (0 == strcasecmp (newname, ego_entry->identifier) && - 0 != strcasecmp (keystring, ego_entry->keystring)) + if (0 == strcasecmp (newname, ego_entry_tmp->identifier) && + 0 != strcasecmp (keystring, ego_entry_tmp->keystring)) { //Ego with same name not allowed GNUNET_JSONAPI_document_delete (json_obj); diff --git a/src/include/Makefile.am b/src/include/Makefile.am @@ -33,6 +33,7 @@ gnunetinclude_HEADERS = \ gnunet_bandwidth_lib.h \ gnunet_bio_lib.h \ gnunet_block_lib.h \ + gnunet_block_group_lib.h \ gnunet_block_plugin.h \ gnunet_client_lib.h \ gnunet_common.h \ @@ -65,7 +66,10 @@ gnunetinclude_HEADERS = \ gnunet_hello_lib.h \ gnunet_helper_lib.h \ gnunet_identity_service.h \ + gnunet_identity_provider_service.h \ gnunet_json_lib.h \ + gnunet_jsonapi_lib.h \ + gnunet_jsonapi_util.h \ gnunet_load_lib.h \ gnunet_cadet_service.h \ gnunet_microphone_lib.h \ @@ -102,6 +106,8 @@ gnunetinclude_HEADERS = \ gnunet_protocols.h \ gnunet_resolver_service.h \ gnunet_regex_service.h \ + gnunet_rest_lib.h \ + gnunet_rest_plugin.h \ gnunet_revocation_service.h \ gnunet_scalarproduct_service.h \ gnunet_scheduler_lib.h \ @@ -111,6 +117,7 @@ gnunetinclude_HEADERS = \ gnunet_signal_lib.h \ gnunet_signatures.h \ gnunet_social_service.h \ + gnunet_socks.h \ gnunet_speaker_lib.h \ gnunet_sq_lib.h \ gnunet_statistics_service.h \ diff --git a/src/include/gnunet_abe_lib.h b/src/include/gnunet_abe_lib.h @@ -0,0 +1,193 @@ +/* + This file is part of GNUnet. + Copyright (C) 2001-2018 GNUnet e.V. + + GNUnet is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +/** + * @file include/gnunet_abe_lib.h + * @brief Attribute-Based Encryption primitives for GNUnet + * + * @author Martin Schanzenbach + * + * @defgroup abe ABE Crypto library: Attribute-Based Encryption operations + * + */ +#ifndef GNUNET_ABE_LIB_H +#define GNUNET_ABE_LIB_H + +#ifdef __cplusplus +extern "C" +{ +#if 0 /* keep Emacsens' auto-indent happy */ +} +#endif +#endif + +#include "gnunet_common.h" +#include <gcrypt.h> + +/** + * @brief type for ABE master keys + */ +struct GNUNET_CRYPTO_AbeMasterKey; + +/** + * @brief type for ABE keys + */ +struct GNUNET_CRYPTO_AbeKey; + + + +/** + * @ingroup abe + * Create a new CP-ABE master key. Caller must free return value. + * + * @return fresh private key; free using #GNUNET_ABE_cpabe_delete_master_key + */ +struct GNUNET_ABE_AbeMasterKey * +GNUNET_ABE_cpabe_create_master_key (void); + +/** + * @ingroup abe + * Delete a CP-ABE master key. + * + * @param key the master key + * @return fresh private key; free using #GNUNET_free + */ +void +GNUNET_ABE_cpabe_delete_master_key (struct GNUNET_ABE_AbeMasterKey *key); + +/** + * @ingroup abe + * Create a new CP-ABE key. Caller must free return value. + * + * @param key the master key + * @param attrs the attributes to append to the key + * @return fresh private key; free using #GNUNET_ABE_cpabe_delete_key + */ +struct GNUNET_ABE_AbeKey * +GNUNET_ABE_cpabe_create_key (struct GNUNET_ABE_AbeMasterKey *key, + char **attrs); + +/** + * @ingroup abe + * Delete a CP-ABE key. + * + * @param key the key to delete + * @param delete_pub GNUNE_YES if the public key should also be freed (bug in gabe) + * @return fresh private key; free using #GNUNET_free + */ +void +GNUNET_ABE_cpabe_delete_key (struct GNUNET_ABE_AbeKey *key, + int delete_pub); + + +/** + * @ingroup abe + * Encrypt a block using sessionkey. + * + * @param block the block to encrypt + * @param size the size of the @a block + * @param policy the ABE policy + * @param key the key used to encrypt + * @param result the result buffer. Will be allocated. Free using #GNUNET_free + * @return the size of the encrypted block, -1 for errors + */ +ssize_t +GNUNET_ABE_cpabe_encrypt (const void *block, + size_t size, + const char *policy, + const struct GNUNET_ABE_AbeMasterKey *key, + void **result); + +/** + * @ingroup abe + * Decrypt a block using the ABE key. + * + * @param block the block to encrypt + * @param size the size of the @a block + * @param key the key used to decrypt + * @param result the result buffer. Will be allocated. Free using #GNUNET_free + * @return the size of the encrypted block, -1 for errors + */ +ssize_t +GNUNET_ABE_cpabe_decrypt (const void *block, + size_t size, + const struct GNUNET_ABE_AbeKey *key, + void **result); + +/** + * @ingroup abe + * Serialize an ABE key. + * + * @param key the key to serialize + * @param result the result buffer. Will be allocated. Free using #GNUNET_free + * @return the size of the encrypted block, -1 for errors + */ +ssize_t +GNUNET_ABE_cpabe_serialize_key (const struct GNUNET_ABE_AbeKey *key, + void **result); + +/** + * @ingroup abe + * Deserialize a serialized ABE key. + * + * @param data the data to deserialize + * @param len the length of the data. + * @return the ABE key. NULL of unsuccessful + */ +struct GNUNET_ABE_AbeKey* +GNUNET_ABE_cpabe_deserialize_key (const void *data, + size_t len); + +/** + * @ingroup abe + * Serialize an ABE master key. + * + * @param key the key to serialize + * @param result the result buffer. Will be allocated. Free using #GNUNET_free + * @return the size of the encrypted block, -1 for errors + */ +ssize_t +GNUNET_ABE_cpabe_serialize_master_key (const struct GNUNET_ABE_AbeMasterKey *key, + void **result); + +/** + * @ingroup abe + * Deserialize an ABE master key. + * + * @param data the data to deserialize + * @param len the length of the data. + * @return the ABE key. NULL of unsuccessful + */ +struct GNUNET_ABE_AbeMasterKey* +GNUNET_ABE_cpabe_deserialize_master_key (const void *data, + size_t len); + + +#if 0 /* keep Emacsens' auto-indent happy */ +{ +#endif +#ifdef __cplusplus +} +#endif + + +/* ifndef GNUNET_ABE_LIB_H */ +#endif +/* end of gnunet_abe_lib.h */ diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h @@ -988,7 +988,8 @@ GNUNET_ntoh_double (double d); * arr is important since size is the number of elements and * not the size in bytes * @param size the number of elements in the existing vector (number - * of elements to copy over) + * of elements to copy over), will be updated with the new + * array size * @param tsize the target size for the resulting vector, use 0 to * free the vector (then, arr will be NULL afterwards). */ @@ -996,8 +997,16 @@ GNUNET_ntoh_double (double d); /** * @ingroup memory - * Append an element to a list (growing the - * list by one). + * Append an element to a list (growing the list by one). + * + * @param arr base-pointer of the vector, may be NULL if size is 0; + * will be updated to reflect the new address. The TYPE of + * arr is important since size is the number of elements and + * not the size in bytes + * @param size the number of elements in the existing vector (number + * of elements to copy over), will be updated with the new + * array size + * @param element the element that will be appended to the array */ #define GNUNET_array_append(arr,size,element) do { GNUNET_array_grow(arr,size,size+1); arr[size-1] = element; } while(0) diff --git a/src/include/gnunet_credential_service.h b/src/include/gnunet_credential_service.h @@ -20,7 +20,6 @@ /** * @author Martin Schanzenbach - * @author Adnan Husain * * @file * API to the Credential service @@ -274,7 +273,8 @@ typedef void (*GNUNET_CREDENTIAL_RemoveDelegateResultProcessor) (void *cls, * @param issuer_key the issuer public key * @param issuer_attribute the issuer attribute * @param subject_key the subject public key - * @param subject_attribute the attribute claimed by the subject + * @param credential_count number of credentials + * @param credentials the subject credentials * @param proc function to call on result * @param proc_cls closure for processor * @return handle to the queued request @@ -305,6 +305,8 @@ GNUNET_CREDENTIAL_collect (struct GNUNET_CREDENTIAL_Handle *handle, * @param attribute the name of the attribute to delegate * @param subject the subject of the delegation * @param delegated_attribute the name of the attribute that is delegated to + * @param proc the result callback + * @param proc_cls the result closure context * @return handle to the queued request */ struct GNUNET_CREDENTIAL_Request * @@ -322,6 +324,8 @@ GNUNET_CREDENTIAL_add_delegation (struct GNUNET_CREDENTIAL_Handle *handle, * @param handle handle to the Credential service * @param issuer the ego that was used to delegate the attribute * @param attribute the name of the attribute that is delegated + * @param proc the callback + * @param proc_cls callback closure * @return handle to the queued request */ struct GNUNET_CREDENTIAL_Request * @@ -336,7 +340,6 @@ GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle, /** * Issue an attribute to a subject * - * @param handle handle to the Credential service * @param issuer the ego that should be used to issue the attribute * @param subject the subject of the attribute * @param attribute the name of the attribute @@ -344,32 +347,12 @@ GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle, * @return handle to the queued request */ struct GNUNET_CREDENTIAL_Credential* -GNUNET_CREDENTIAL_credential_issue ( - const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, +GNUNET_CREDENTIAL_credential_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, struct GNUNET_CRYPTO_EcdsaPublicKey *subject, const char *attribute, struct GNUNET_TIME_Absolute *expiration); -/** - * Remove a credential - * - * @param handle handle to the Credential service - * @param issuer the identity that issued the credential - * @param subject the subject of the credential - * @param credential the name of the credential - * @return handle to the queued request - */ -/** - struct GNUNET_CREDENTIAL_IssueRequest * - GNUNET_CREDENTIAL_remove (struct GNUNET_CREDENTIAL_Handle *handle, - struct GNUNET_IDENTITY_Ego *issuer, - struct GNUNET_IDENTITY_Ego *subject, - const char *credential, - GNUNET_CREDENTIAL_IssueResultProcessor proc, - void *proc_cls); - */ - /** * Cancel pending lookup request @@ -377,7 +360,7 @@ GNUNET_CREDENTIAL_credential_issue ( * @param lr the lookup request to cancel */ void -GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *vr); +GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *lr); #if 0 /* keep Emacsens' auto-indent happy */ diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h @@ -395,11 +395,6 @@ struct GNUNET_CRYPTO_PaillierCiphertext unsigned char bits[GNUNET_CRYPTO_PAILLIER_BITS * 2 / 8]; }; -/** - * @brief type for ABE master keys - */ -struct GNUNET_CRYPTO_AbeMasterKey; - /* **************** Functions and Macros ************* */ @@ -2142,83 +2137,6 @@ GNUNET_CRYPTO_rsa_verify (const struct GNUNET_HashCode *hash, const struct GNUNET_CRYPTO_RsaPublicKey *public_key); -/** - * @ingroup crypto - * Create a new CP-ABE master key. Caller must free return value. - * - * @return fresh private key; free using #GNUNET_free - */ -struct GNUNET_CRYPTO_AbeMasterKey * -GNUNET_CRYPTO_cpabe_create_master_key (void); -void -GNUNET_CRYPTO_cpabe_delete_master_key (struct GNUNET_CRYPTO_AbeMasterKey *key); - -/** - * @ingroup crypto - * Create a new CP-ABE key. Caller must free return value. - * - * @return fresh private key; free using #GNUNET_free - */ -struct GNUNET_CRYPTO_AbeKey * -GNUNET_CRYPTO_cpabe_create_key (struct GNUNET_CRYPTO_AbeMasterKey *msk, - char **attrs); -void -GNUNET_CRYPTO_cpabe_delete_key (struct GNUNET_CRYPTO_AbeKey *key, - int delete_pub); - - -/** - * @ingroup crypto - * Encrypt a block using sessionkey. - * - * @param block the block to encrypt - * @param size the size of the @a block - * @param sessionkey the key used to encrypt - * @param iv the initialization vector to use, use INITVALUE - * for streams. - * @return the size of the encrypted block, -1 for errors - */ -ssize_t -GNUNET_CRYPTO_cpabe_encrypt (const void *block, - size_t size, - const char *policy, - const struct GNUNET_CRYPTO_AbeMasterKey *key, - void **result); - -/** - * @ingroup crypto - * Encrypt a block using sessionkey. - * - * @param block the block to encrypt - * @param size the size of the @a block - * @param sessionkey the key used to encrypt - * @param iv the initialization vector to use, use INITVALUE - * for streams. - * @return the size of the encrypted block, -1 for errors - */ -ssize_t -GNUNET_CRYPTO_cpabe_decrypt (const void *block, - size_t size, - const struct GNUNET_CRYPTO_AbeKey *key, - void **result); - -ssize_t -GNUNET_CRYPTO_cpabe_serialize_key (const struct GNUNET_CRYPTO_AbeKey *key, - void **result); - -struct GNUNET_CRYPTO_AbeKey* -GNUNET_CRYPTO_cpabe_deserialize_key (const void *data, - size_t len); - -ssize_t -GNUNET_CRYPTO_cpabe_serialize_master_key (const struct GNUNET_CRYPTO_AbeMasterKey *key, - void **result); - -struct GNUNET_CRYPTO_AbeMasterKey* -GNUNET_CRYPTO_cpabe_deserialize_master_key (const void *data, - size_t len); - - #if 0 /* keep Emacsens' auto-indent happy */ { #endif diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h @@ -109,8 +109,9 @@ typedef int * * @param uri uri to convert to a unique key * @param key wherer to store the unique key + * @return #GNUNET_OK on success */ -void +int GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode *key); diff --git a/src/include/gnunet_identity_attribute_lib.h b/src/include/gnunet_identity_attribute_lib.h @@ -122,7 +122,7 @@ struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry /** * Create a new attribute claim. * - * @param name the attribute name + * @param attr_name the attribute name * @param type the attribute type * @param data the attribute value * @param data_size the attribute value size diff --git a/src/include/gnunet_identity_provider_service.h b/src/include/gnunet_identity_provider_service.h @@ -131,6 +131,7 @@ GNUNET_IDENTITY_PROVIDER_attribute_store (struct GNUNET_IDENTITY_PROVIDER_Handle * Process an attribute that was stored in the idp. * * @param cls closure + * @param identity the identity * @param attr the attribute */ typedef void @@ -211,19 +212,19 @@ typedef void /** * Issues a ticket to another identity. The identity may use - * @GNUNET_IDENTITY_PROVIDER_authorization_ticket_consume to consume the ticket + * GNUNET_IDENTITY_PROVIDER_ticket_consume to consume the ticket * and retrieve the attributes specified in the AttributeList. * - * @param id the identity provider to use + * @param h the identity provider to use * @param iss the issuing identity * @param rp the subject of the ticket (the relying party) - * @param attr the attributes that the relying party is given access to + * @param attrs the attributes that the relying party is given access to * @param cb the callback * @param cb_cls the callback closure * @return handle to abort the operation */ struct GNUNET_IDENTITY_PROVIDER_Operation * -GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *id, +GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss, const struct GNUNET_CRYPTO_EcdsaPublicKey *rp, const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs, @@ -234,7 +235,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *i * Revoked an issued ticket. The relying party will be unable to retrieve * updated attributes. * - * @param id the identity provider to use + * @param h the identity provider to use * @param identity the issuing identity * @param ticket the ticket to revoke * @param cb the callback @@ -242,7 +243,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_issue (struct GNUNET_IDENTITY_PROVIDER_Handle *i * @return handle to abort the operation */ struct GNUNET_IDENTITY_PROVIDER_Operation * -GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *id, +GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, GNUNET_IDENTITY_PROVIDER_ContinuationWithStatus cb, @@ -254,7 +255,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle * * Consumes an issued ticket. The ticket is persisted * and used to retrieve identity information from the issuer * - * @param id the identity provider to use + * @param h the identity provider to use * @param identity the identity that is the subject of the issued ticket (the audience) * @param ticket the issued ticket to consume * @param cb the callback to call @@ -262,7 +263,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Handle * * @return handle to abort the operation */ struct GNUNET_IDENTITY_PROVIDER_Operation * -GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *id, +GNUNET_IDENTITY_PROVIDER_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *h, const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, GNUNET_IDENTITY_PROVIDER_AttributeResult cb, @@ -299,7 +300,7 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER * Lists all tickets that have been issued to remote * identites (relying parties) * - * @param id the identity provider to use + * @param h the identity provider to use * @param identity the issuing identity * @param error_cb function to call on error (i.e. disconnect), * the handle is afterwards invalid diff --git a/src/include/gnunet_mst_lib.h b/src/include/gnunet_mst_lib.h @@ -61,7 +61,9 @@ struct GNUNET_MessageStreamTokenizer; * * @param cls closure * @param message the actual message - * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing due to disconnect (no error) + * #GNUNET_SYSERR to stop further processing due to error */ typedef int (*GNUNET_MessageTokenizerCallback) (void *cls, diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h @@ -53,7 +53,7 @@ struct GNUNET_NETWORK_FDSet { /** - * Maximum number of any socket socket descriptor in the set (plus one) + * Maximum number of any socket descriptor in the set (plus one) */ int nsds; @@ -464,7 +464,7 @@ GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to, * @return POSIX file descriptor */ int -GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc); +GNUNET_NETWORK_get_fd (const struct GNUNET_NETWORK_Handle *desc); /** @@ -474,7 +474,7 @@ GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc); * @return POSIX file descriptor */ struct sockaddr* -GNUNET_NETWORK_get_addr (struct GNUNET_NETWORK_Handle *desc); +GNUNET_NETWORK_get_addr (const struct GNUNET_NETWORK_Handle *desc); /** @@ -484,7 +484,7 @@ GNUNET_NETWORK_get_addr (struct GNUNET_NETWORK_Handle *desc); * @return socklen_t for sockaddr */ socklen_t -GNUNET_NETWORK_get_addrlen (struct GNUNET_NETWORK_Handle *desc); +GNUNET_NETWORK_get_addrlen (const struct GNUNET_NETWORK_Handle *desc); /** diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h @@ -2067,7 +2067,11 @@ extern "C" /** S->C: slave join acknowledgement */ #define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 684 -/* 685-686 */ +/** C->S: request to part from a channel */ +#define GNUNET_MESSAGE_TYPE_PSYC_PART_REQUEST 685 + +/** S->C: acknowledgement that a slave of master parted from a channel */ +#define GNUNET_MESSAGE_TYPE_PSYC_PART_ACK 686 /** M->S->C: incoming join request from multicast */ #define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687 @@ -2258,6 +2262,7 @@ extern "C" */ #define GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK 755 +// FIXME: this is never used! /** * Group terminated. */ @@ -2398,35 +2403,38 @@ extern "C" /** C->S: request to leave a place */ #define GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE 848 +/** S->C: place leave acknowledgement */ +#define GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE_ACK 849 + /** C->S: add place to GNS zone */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_PLACE 849 +#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_PLACE 850 /** C->S: add nym to GNS zone */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_NYM 850 +#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_NYM 851 /** C->S: connect application */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_CONNECT 851 +#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_CONNECT 852 /** C->S: detach a place from application */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_DETACH 852 +#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_DETACH 853 /** S->C: notify about an existing ego */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO 853 +#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO 854 /** S->C: end of ego list */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END 854 +#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END 855 /** S->C: notify about an existing place */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE 855 +#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE 856 /** S->C: end of place list */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END 856 +#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END 857 /** C->S: set message processing flags */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_SET 860 +#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_SET 858 /** C->S: clear message processing flags */ -#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_CLEAR 861 +#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_CLEAR 859 /******************************************************************************* * X-VINE DHT messages diff --git a/src/include/gnunet_rest_lib.h b/src/include/gnunet_rest_lib.h @@ -32,7 +32,7 @@ #define GNUNET_REST_LIB_H #include "gnunet_util_lib.h" -#include "microhttpd.h" +#include <microhttpd.h> #define GNUNET_REST_HANDLER_END {NULL, NULL, NULL} @@ -113,7 +113,7 @@ typedef void (*GNUNET_REST_ResultProcessor) (void *cls, * * @param url URL to check * @param namespace namespace to check against - * @retun GNUNET_YES if namespace matches + * @return GNUNET_YES if namespace matches */ int GNUNET_REST_namespace_match (const char *url, const char *namespace); @@ -122,7 +122,7 @@ GNUNET_REST_namespace_match (const char *url, const char *namespace); * Create REST MHD response * * @param data result - * @retun MHD response + * @return MHD response */ struct MHD_Response* GNUNET_REST_create_response (const char *data); diff --git a/src/include/gnunet_rest_plugin.h b/src/include/gnunet_rest_plugin.h @@ -57,7 +57,7 @@ struct GNUNET_REST_Plugin /** * Plugin name. Used as the namespace for the API. - * e.g. http://hostname:port/<name> + * e.g. http://hostname:port/name */ char *name; diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h @@ -152,14 +152,14 @@ struct GNUNET_SCHEDULER_FdInfo * NULL if this is about a file handle or if no network * handle was given to the scheduler originally. */ - struct GNUNET_NETWORK_Handle *fd; + const struct GNUNET_NETWORK_Handle *fd; /** * GNUnet file handle the event is about, matches @a sock, * NULL if this is about a network socket or if no network * handle was given to the scheduler originally. */ - struct GNUNET_DISK_FileHandle *fh; + const struct GNUNET_DISK_FileHandle *fh; /** * Type of the event that was generated related to @e sock. @@ -216,17 +216,18 @@ struct GNUNET_SCHEDULER_TaskContext /** * Function used by event-loop implementations to signal the scheduler - * that a particular @a task is ready due to an event of type @a et. + * that a particular @a task is ready due to an event specified in the + * et field of @a fdi. * * This function will then queue the task to notify the application * that the task is ready (with the respective priority). * * @param task the task that is ready - * @param et information about why the task is ready + * @param fdi information about the related FD */ void GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task, - enum GNUNET_SCHEDULER_EventType et); + struct GNUNET_SCHEDULER_FdInfo *fdi); /** @@ -241,15 +242,16 @@ struct GNUNET_SCHEDULER_Handle; * there are tasks left to run just to give other tasks a chance as * well. If we return #GNUNET_YES, the driver should call this * function again as soon as possible, while if we return #GNUNET_NO - * it must block until the operating system has more work as the - * scheduler has no more work to do right now. + * it must block until either the operating system has more work (the + * scheduler has no more work to do right now) or the timeout set by + * the scheduler (using the set_wakeup callback) is reached. * * @param sh scheduler handle that was given to the `loop` * @return #GNUNET_OK if there are more tasks that are ready, * and thus we would like to run more (yield to avoid * blocking other activities for too long) * #GNUNET_NO if we are done running tasks (yield to block) - * #GNUNET_SYSERR on error + * #GNUNET_SYSERR on error, e.g. no tasks were ready */ int GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh); @@ -268,8 +270,11 @@ struct GNUNET_SCHEDULER_Driver void *cls; /** - * Add a @a task to be run if the conditions given - * in @a fdi are satisfied. + * Add a @a task to be run if the conditions specified in the + * et field of the given @a fdi are satisfied. The et field will + * be cleared after this call and the driver is expected to set + * the type of the actual event before passing @a fdi to + * #GNUNET_SCHEDULER_task_ready. * * @param cls closure * @param task task to add @@ -280,21 +285,21 @@ struct GNUNET_SCHEDULER_Driver int (*add)(void *cls, struct GNUNET_SCHEDULER_Task *task, - struct GNUNET_SCHEDULER_FdInfo *fdi); + struct GNUNET_SCHEDULER_FdInfo *fdi); /** - * Delete a @a task from the set of tasks to be run. + * Delete a @a task from the set of tasks to be run. A task may + * comprise multiple FdInfo entries previously added with the add + * function. The driver is expected to delete them all. * * @param cls closure * @param task task to delete - * @param fdi conditions to watch for (must match @e add call) * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure - * (i.e. @a task or @a fdi do not match prior @e add call) + * (i.e. @a task does not match prior @e add call) */ int (*del)(void *cls, - struct GNUNET_SCHEDULER_Task *task, - const struct GNUNET_SCHEDULER_FdInfo *fdi); + struct GNUNET_SCHEDULER_Task *task); /** * Set time at which we definitively want to get a wakeup call. @@ -309,7 +314,10 @@ struct GNUNET_SCHEDULER_Driver /** * Event loop's "main" function, to be called from * #GNUNET_SCHEDULER_run_with_driver() to actually - * launch the loop. + * launch the loop. The loop should run as long as + * tasks (added by the add callback) are available + * OR the wakeup time (added by the set_wakeup + * callback) is not FOREVER. * * @param cls closure * @param sh scheduler handle to pass to @@ -359,7 +367,7 @@ GNUNET_SCHEDULER_run_with_driver (const struct GNUNET_SCHEDULER_Driver *driver, * * @return NULL on error */ -const struct GNUNET_SCHEDULER_Driver * +struct GNUNET_SCHEDULER_Driver * GNUNET_SCHEDULER_driver_select (void); diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h @@ -366,11 +366,16 @@ GNUNET_SERVICE_client_disable_continue_warning (struct GNUNET_SERVICE_Client *c) /** * Ask the server to disconnect from the given client. This is the * same as returning #GNUNET_SYSERR within the check procedure when - * handling a message, wexcept that it allows dropping of a client even + * handling a message, except that it allows dropping of a client even * when not handling a message from that client. The `disconnect_cb` * will be called on @a c even if the application closes the connection * using this function. * + * This function should be called (outside of util's internal logic) + * if (and usually only if) the client has violated the + * protocol. Otherwise, we should leave it to the client to disconnect + * from the service. + * * @param c client to disconnect now */ void diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h @@ -530,6 +530,7 @@ GNUNET_SET_iterate (struct GNUNET_SET_Handle *set, GNUNET_SET_ElementIterator iter, void *iter_cls); + /** * Stop iteration over all elements in the given set. Can only * be called before the iteration has "naturally" completed its @@ -540,6 +541,7 @@ GNUNET_SET_iterate (struct GNUNET_SET_Handle *set, void GNUNET_SET_iterate_cancel (struct GNUNET_SET_Handle *set); + /** * Create a copy of an element. The copy * must be GNUNET_free-d by the caller. @@ -550,6 +552,7 @@ GNUNET_SET_iterate_cancel (struct GNUNET_SET_Handle *set); struct GNUNET_SET_Element * GNUNET_SET_element_dup (const struct GNUNET_SET_Element *element); + /** * Hash a set element. * diff --git a/src/jsonapi/Makefile.am b/src/jsonapi/Makefile.am @@ -24,7 +24,7 @@ libgnunetjsonapi_la_LDFLAGS = \ -version-info 0:0:0 \ -no-undefined libgnunetjsonapi_la_SOURCES = \ - jsonapi_document.c \ + jsonapi_document.c jsonapi_objects.h \ jsonapi_resource.c \ jsonapi_error.c \ jsonapi_relationship.c diff --git a/src/jsonapi/test_jsonapi.c b/src/jsonapi/test_jsonapi.c @@ -1,18 +1,18 @@ /* - This file is part of GNUnet - (C) 2015, 2016 GNUnet e.V. + This file is part of GNUnet + (C) 2015, 2016 GNUnet e.V. - GNUnet is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. + GNUnet is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. - GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. + GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along with - GNUnet; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> -*/ + You should have received a copy of the GNU General Public License along with + GNUnet; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> + */ /** * @file json/test_jsonapi.c @@ -24,7 +24,7 @@ #include "gnunet_jsonapi_lib.h" #include "gnunet_json_lib.h" -#define TEST_JSONAPI_DOCUMENT "{\"data\":{\"id\":\"1\",\"type\":\"bar\",\"attributes\":{\"foo\":\"bar\"}}}" +#define TEST_JSONAPI_DOCUMENT "{\"data\":[{\"id\":\"1\",\"type\":\"bar\",\"attributes\":{\"foo\":\"bar\"}}]}" #define TEST_JSONAPI_DOCUMENT_ERR "{\"errors\":[{\"id\":\"1\",\"status\":\"403\",\"code\":\"23\", \"title\":\"Error\", \"detail\":\"Error details\"}]}" @@ -74,7 +74,8 @@ test_document () json_t *doc_json; json_t *data_js; json_error_t err; - + int ret; + obj = GNUNET_JSONAPI_document_new (); res = GNUNET_JSONAPI_resource_new ("bar", "1"); @@ -94,11 +95,11 @@ test_document () JSON_DECODE_ANY, &err); GNUNET_assert (NULL != data_js); - GNUNET_assert (0 != json_equal (data_js, doc_json)); + ret = json_equal (data_js, doc_json) ? 0 : 1; GNUNET_JSONAPI_document_delete (obj); json_decref (data_js); json_decref (doc_json); - return 0; + return ret; } static int @@ -106,6 +107,7 @@ test_serialize () { struct GNUNET_JSONAPI_Document *obj; char* tmp_data; + int ret; json_t* data_js; json_t* tmp_data_js; json_error_t err; @@ -125,11 +127,11 @@ test_serialize () GNUNET_JSON_parse_free (jsonapispec); tmp_data_js = json_loads (tmp_data, JSON_DECODE_ANY, &err); GNUNET_assert (NULL != tmp_data_js); - GNUNET_assert (0 != json_equal (tmp_data_js, data_js)); + ret = (1 == json_equal (tmp_data_js, data_js)) ? 0 : 1; json_decref (data_js); json_decref (tmp_data_js); GNUNET_free (tmp_data); - return 0; + return ret; } /** diff --git a/src/multicast/Makefile.am b/src/multicast/Makefile.am @@ -19,7 +19,7 @@ endif lib_LTLIBRARIES = libgnunetmulticast.la libgnunetmulticast_la_SOURCES = \ - multicast_api.c + multicast_api.c multicast.h libgnunetmulticast_la_LIBADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(GN_LIBINTL) $(XLIB) diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c @@ -137,6 +137,7 @@ struct Channel */ struct GNUNET_CADET_Channel *channel; + // FIXME: not used /** * CADET transmission handle. */ @@ -228,7 +229,7 @@ struct Group /** * Is the client disconnected? #GNUNET_YES or #GNUNET_NO */ - uint8_t disconnected; + uint8_t is_disconnected; /** * Is this an origin (#GNUNET_YES), or member (#GNUNET_NO)? @@ -365,6 +366,8 @@ client_send_join_decision (struct Member *mem, static void shutdown_task (void *cls) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "shutting down\n"); if (NULL != cadet) { GNUNET_CADET_disconnect (cadet); @@ -420,6 +423,11 @@ cleanup_member (struct Member *mem) GNUNET_free (mem->join_dcsn); mem->join_dcsn = NULL; } + if (NULL != mem->origin_channel) + { + GNUNET_CADET_channel_destroy (mem->origin_channel->channel); + mem->origin_channel = NULL; + } GNUNET_CONTAINER_multihashmap_remove (members, &grp->pub_key_hash, mem); GNUNET_free (mem); } @@ -553,36 +561,47 @@ client_send (struct GNUNET_SERVICE_Client *client, * Send message to all clients connected to the group. */ static void -client_send_group (const struct Group *grp, - const struct GNUNET_MessageHeader *msg) +client_send_group_keep_envelope (const struct Group *grp, + struct GNUNET_MQ_Envelope *env) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "%p Sending message to all clients of the group.\n", grp); + struct ClientList *cli = grp->clients_head; - struct ClientList *cl = grp->clients_head; - while (NULL != cl) + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "%p Sending message to all clients of the group.\n", + grp); + while (NULL != cli) { - struct GNUNET_MQ_Envelope * - env = GNUNET_MQ_msg_copy (msg); - - GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (cl->client), - env); - cl = cl->next; + GNUNET_MQ_send_copy (GNUNET_SERVICE_client_get_mq (cli->client), + env); + cli = cli->next; } } /** + * Send message to all clients connected to the group and + * takes care of freeing @env. + */ +static void +client_send_group (const struct Group *grp, + struct GNUNET_MQ_Envelope *env) +{ + client_send_group_keep_envelope (grp, env); + GNUNET_MQ_discard (env); +} + + +/** * Iterator callback for sending a message to origin clients. */ static int client_send_origin_cb (void *cls, const struct GNUNET_HashCode *pub_key_hash, void *origin) { - const struct GNUNET_MessageHeader *msg = cls; + struct GNUNET_MQ_Envelope *env = cls; struct Member *orig = origin; - client_send_group (&orig->group, msg); + client_send_group_keep_envelope (&orig->group, env); return GNUNET_YES; } @@ -594,12 +613,12 @@ static int client_send_member_cb (void *cls, const struct GNUNET_HashCode *pub_key_hash, void *member) { - const struct GNUNET_MessageHeader *msg = cls; + struct GNUNET_MQ_Envelope *env = cls; struct Member *mem = member; if (NULL != mem->join_dcsn) { /* Only send message to admitted members */ - client_send_group (&mem->group, msg); + client_send_group_keep_envelope (&mem->group, env); } return GNUNET_YES; } @@ -615,15 +634,16 @@ client_send_member_cb (void *cls, const struct GNUNET_HashCode *pub_key_hash, */ static int client_send_all (struct GNUNET_HashCode *pub_key_hash, - const struct GNUNET_MessageHeader *msg) + struct GNUNET_MQ_Envelope *env) { int n = 0; n += GNUNET_CONTAINER_multihashmap_get_multiple (origins, pub_key_hash, client_send_origin_cb, - (void *) msg); + (void *) env); n += GNUNET_CONTAINER_multihashmap_get_multiple (members, pub_key_hash, client_send_member_cb, - (void *) msg); + (void *) env); + GNUNET_MQ_discard (env); return n; } @@ -636,14 +656,15 @@ client_send_all (struct GNUNET_HashCode *pub_key_hash, */ static int client_send_random (struct GNUNET_HashCode *pub_key_hash, - const struct GNUNET_MessageHeader *msg) + struct GNUNET_MQ_Envelope *env) { int n = 0; n = GNUNET_CONTAINER_multihashmap_get_random (origins, client_send_origin_cb, - (void *) msg); + (void *) env); if (n <= 0) n = GNUNET_CONTAINER_multihashmap_get_random (members, client_send_member_cb, - (void *) msg); + (void *) env); + GNUNET_MQ_discard (env); return n; } @@ -658,12 +679,12 @@ client_send_random (struct GNUNET_HashCode *pub_key_hash, */ static int client_send_origin (struct GNUNET_HashCode *pub_key_hash, - const struct GNUNET_MessageHeader *msg) + struct GNUNET_MQ_Envelope *env) { int n = 0; n += GNUNET_CONTAINER_multihashmap_get_multiple (origins, pub_key_hash, client_send_origin_cb, - (void *) msg); + (void *) env); return n; } @@ -677,17 +698,12 @@ client_send_origin (struct GNUNET_HashCode *pub_key_hash, static void client_send_ack (struct GNUNET_HashCode *pub_key_hash) { + struct GNUNET_MQ_Envelope *env; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Sending message ACK to client.\n"); - - static struct GNUNET_MessageHeader *msg = NULL; - if (NULL == msg) - { - msg = GNUNET_malloc (sizeof (*msg)); - msg->type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK); - msg->size = htons (sizeof (*msg)); - } - client_send_all (pub_key_hash, msg); + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK); + client_send_all (pub_key_hash, env); } @@ -983,7 +999,8 @@ handle_cadet_join_request (void *cls, chn->peer = req->peer; chn->join_status = JOIN_WAITING; - client_send_all (&group_pub_hash, &req->header); + client_send_all (&group_pub_hash, + GNUNET_MQ_msg_copy (&req->header)); } @@ -1102,7 +1119,8 @@ handle_cadet_message (void *cls, { struct Channel *chn = cls; GNUNET_CADET_receive_done (chn->channel); - client_send_all (&chn->group_pub_hash, &msg->header); + client_send_all (&chn->group_pub_hash, + GNUNET_MQ_msg_copy (&msg->header)); } @@ -1153,30 +1171,32 @@ handle_cadet_request (void *cls, { struct Channel *chn = cls; GNUNET_CADET_receive_done (chn->channel); - client_send_origin (&chn->group_pub_hash, &req->header); + client_send_origin (&chn->group_pub_hash, + GNUNET_MQ_msg_copy (&req->header)); } -static int -check_cadet_replay_request (void *cls, - const struct MulticastReplayRequestMessage *req) -{ - uint16_t size = ntohs (req->header.size); - if (size < sizeof (*req)) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - - struct Channel *chn = cls; - if (NULL == chn) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - - return GNUNET_OK; -} +// FIXME: do checks in handle_cadet_replay_request +//static int +//check_cadet_replay_request (void *cls, +// const struct MulticastReplayRequestMessage *req) +//{ +// uint16_t size = ntohs (req->header.size); +// if (size < sizeof (*req)) +// { +// GNUNET_break_op (0); +// return GNUNET_SYSERR; +// } +// +// struct Channel *chn = cls; +// if (NULL == chn) +// { +// GNUNET_break_op (0); +// return GNUNET_SYSERR; +// } +// +// return GNUNET_OK; +//} /** @@ -1187,6 +1207,7 @@ handle_cadet_replay_request (void *cls, const struct MulticastReplayRequestMessage *req) { struct Channel *chn = cls; + GNUNET_CADET_receive_done (chn->channel); struct MulticastReplayRequestMessage rep = *req; @@ -1203,12 +1224,16 @@ handle_cadet_replay_request (void *cls, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); } struct GNUNET_HashCode key_hash; - replay_key_hash (rep.fragment_id, rep.message_id, rep.fragment_offset, - rep.flags, &key_hash); + replay_key_hash (rep.fragment_id, + rep.message_id, + rep.fragment_offset, + rep.flags, + &key_hash); GNUNET_CONTAINER_multihashmap_put (grp_replay_req, &key_hash, chn, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); - client_send_random (&chn->group_pub_hash, &rep.header); + client_send_random (&chn->group_pub_hash, + GNUNET_MQ_msg_copy (&rep.header)); } @@ -1290,10 +1315,10 @@ cadet_channel_create (struct Group *grp, struct GNUNET_PeerIdentity *peer) struct MulticastJoinDecisionMessageHeader, chn), - GNUNET_MQ_hd_var_size (cadet_replay_request, - GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, - struct MulticastReplayRequestMessage, - chn), + GNUNET_MQ_hd_fixed_size (cadet_replay_request, + GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, + struct MulticastReplayRequestMessage, + chn), GNUNET_MQ_hd_var_size (cadet_replay_response, GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE, @@ -1357,6 +1382,7 @@ handle_client_origin_start (void *cls, grp->is_origin = GNUNET_YES; grp->pub_key = pub_key; grp->pub_key_hash = pub_key_hash; + grp->is_disconnected = GNUNET_NO; GNUNET_CONTAINER_multihashmap_put (origins, &grp->pub_key_hash, orig, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); @@ -1379,10 +1405,10 @@ handle_client_origin_start (void *cls, struct MulticastJoinRequestMessage, grp), - GNUNET_MQ_hd_var_size (cadet_replay_request, - GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, - struct MulticastReplayRequestMessage, - grp), + GNUNET_MQ_hd_fixed_size (cadet_replay_request, + GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, + struct MulticastReplayRequestMessage, + grp), GNUNET_MQ_hd_var_size (cadet_replay_response, GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE, @@ -1484,6 +1510,7 @@ handle_client_member_join (void *cls, grp->is_origin = GNUNET_NO; grp->pub_key = msg->group_pub_key; grp->pub_key_hash = pub_key_hash; + grp->is_disconnected = GNUNET_NO; group_set_cadet_port_hash (grp); if (NULL == grp_mem) @@ -1494,7 +1521,8 @@ handle_client_member_join (void *cls, } GNUNET_CONTAINER_multihashmap_put (grp_mem, &mem->pub_key_hash, mem, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); - + + // FIXME: should the members hash map have option UNIQUE_FAST? GNUNET_CONTAINER_multihashmap_put (members, &grp->pub_key_hash, mem, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); } @@ -1509,10 +1537,11 @@ handle_client_member_join (void *cls, char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&mem->pub_key); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Client connected to group %s as member %s (%s).\n", + "Client connected to group %s as member %s (%s). size = %d\n", GNUNET_h2s (&grp->pub_key_hash), GNUNET_h2s2 (&mem->pub_key_hash), - str); + str, + GNUNET_CONTAINER_multihashmap_size (members)); GNUNET_free (str); if (NULL != mem->join_dcsn) @@ -1567,7 +1596,9 @@ handle_client_member_join (void *cls, GNUNET_free (mem->join_req); mem->join_req = req; - if (0 == client_send_origin (&grp->pub_key_hash, &mem->join_req->header)) + if (0 == + client_send_origin (&grp->pub_key_hash, + GNUNET_MQ_msg_copy (&mem->join_req->header))) { /* No local origins, send to remote origin */ cadet_send_join_request (mem); } @@ -1580,7 +1611,7 @@ static void client_send_join_decision (struct Member *mem, const struct MulticastJoinDecisionMessageHeader *hdcsn) { - client_send_group (&mem->group, &hdcsn->header); + client_send_group (&mem->group, GNUNET_MQ_msg_copy (&hdcsn->header)); const struct MulticastJoinDecisionMessage * dcsn = (const struct MulticastJoinDecisionMessage *) &hdcsn[1]; @@ -1621,8 +1652,9 @@ handle_client_join_decision (void *cls, GNUNET_SERVICE_client_drop (client); return; } + GNUNET_assert (GNUNET_NO == grp->is_disconnected); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Got join decision from client for group %s..\n", + "%p got join decision from client for group %s..\n", grp, GNUNET_h2s (&grp->pub_key_hash)); struct GNUNET_CONTAINER_MultiHashMap * @@ -1652,6 +1684,32 @@ handle_client_join_decision (void *cls, } +static void +handle_client_part_request (void *cls, + const struct GNUNET_MessageHeader *msg) +{ + struct Client *c = cls; + struct GNUNET_SERVICE_Client *client = c->client; + struct Group *grp = c->group; + struct GNUNET_MQ_Envelope *env; + + if (NULL == grp) + { + GNUNET_break (0); + GNUNET_SERVICE_client_drop (client); + return; + } + GNUNET_assert (GNUNET_NO == grp->is_disconnected); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "%p got part request from client for group %s.\n", + grp, GNUNET_h2s (&grp->pub_key_hash)); + grp->is_disconnected = GNUNET_YES; + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK); + client_send_group (grp, env); + GNUNET_SERVICE_client_continue (client); +} + + static int check_client_multicast_message (void *cls, const struct GNUNET_MULTICAST_MessageHeader *msg) @@ -1667,6 +1725,7 @@ static void handle_client_multicast_message (void *cls, const struct GNUNET_MULTICAST_MessageHeader *msg) { + // FIXME: what if GNUNET_YES == grp->is_disconnected? Do we allow sending messages? struct Client *c = cls; struct GNUNET_SERVICE_Client *client = c->client; struct Group *grp = c->group; @@ -1680,6 +1739,7 @@ handle_client_multicast_message (void *cls, GNUNET_assert (GNUNET_YES == grp->is_origin); struct Origin *orig = grp->origin; + // FIXME: use GNUNET_MQ_msg_copy /* FIXME: yucky, should use separate message structs for P2P and CS! */ struct GNUNET_MULTICAST_MessageHeader * out = (struct GNUNET_MULTICAST_MessageHeader *) GNUNET_copy_message (&msg->header); @@ -1696,7 +1756,7 @@ handle_client_multicast_message (void *cls, GNUNET_assert (0); } - client_send_all (&grp->pub_key_hash, &out->header); + client_send_all (&grp->pub_key_hash, GNUNET_MQ_msg_copy (&out->header)); cadet_send_children (&grp->pub_key_hash, &out->header); client_send_ack (&grp->pub_key_hash); GNUNET_free (out); @@ -1730,6 +1790,7 @@ handle_client_multicast_request (void *cls, GNUNET_SERVICE_client_drop (client); return; } + GNUNET_assert (GNUNET_NO == grp->is_disconnected); GNUNET_assert (GNUNET_NO == grp->is_origin); struct Member *mem = grp->member; @@ -1751,7 +1812,9 @@ handle_client_multicast_request (void *cls, } uint8_t send_ack = GNUNET_YES; - if (0 == client_send_origin (&grp->pub_key_hash, &out->header)) + if (0 == + client_send_origin (&grp->pub_key_hash, + GNUNET_MQ_msg_copy (&out->header))) { /* No local origins, send to remote origin */ if (NULL != mem->origin_channel) { @@ -1792,6 +1855,7 @@ handle_client_replay_request (void *cls, GNUNET_SERVICE_client_drop (client); return; } + GNUNET_assert (GNUNET_NO == grp->is_disconnected); GNUNET_assert (GNUNET_NO == grp->is_origin); struct Member *mem = grp->member; @@ -1812,7 +1876,9 @@ handle_client_replay_request (void *cls, GNUNET_CONTAINER_multihashmap_put (grp_replay_req, &key_hash, client, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); - if (0 == client_send_origin (&grp->pub_key_hash, &rep->header)) + if (0 == + client_send_origin (&grp->pub_key_hash, + GNUNET_MQ_msg_copy (&rep->header))) { /* No local origin, replay from remote members / origin. */ if (NULL != mem->origin_channel) { @@ -1821,6 +1887,7 @@ handle_client_replay_request (void *cls, else { /* FIXME: not yet connected to origin */ + GNUNET_assert (0); GNUNET_SERVICE_client_drop (client); return; } @@ -1880,6 +1947,7 @@ handle_client_replay_response_end (void *cls, GNUNET_SERVICE_client_drop (client); return; } + GNUNET_assert (GNUNET_NO == grp->is_disconnected); struct GNUNET_HashCode key_hash; replay_key_hash (res->fragment_id, res->message_id, res->fragment_offset, @@ -1939,6 +2007,7 @@ handle_client_replay_response (void *cls, GNUNET_SERVICE_client_drop (client); return; } + GNUNET_assert (GNUNET_NO == grp->is_disconnected); const struct GNUNET_MessageHeader *msg = &res->header; if (GNUNET_MULTICAST_REC_OK == res->error_code) @@ -2033,9 +2102,14 @@ client_notify_disconnect (void *cls, grp, (GNUNET_YES == grp->is_origin) ? "origin" : "member", GNUNET_h2s (&grp->pub_key_hash)); + // FIXME (due to protocol change): here we must not remove all clients, + // only the one we were notified about! struct ClientList *cl = grp->clients_head; while (NULL != cl) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "iterating clients for group %p\n", + grp); if (cl->client == client) { GNUNET_CONTAINER_DLL_remove (grp->clients_head, grp->clients_tail, cl); @@ -2049,16 +2123,7 @@ client_notify_disconnect (void *cls, if (NULL == grp->clients_head) { /* Last client disconnected. */ -#if FIXME - if (NULL != grp->tmit_head) - { /* Send pending messages via CADET before cleanup. */ - transmit_message (grp); - } - else -#endif - { - cleanup_group (grp); - } + cleanup_group (grp); } } @@ -2103,9 +2168,9 @@ run (void *cls, GNUNET_SERVICE_MAIN ("multicast", GNUNET_SERVICE_OPTION_NONE, - run, - client_notify_connect, - client_notify_disconnect, + &run, + &client_notify_connect, + &client_notify_disconnect, NULL, GNUNET_MQ_hd_fixed_size (client_origin_start, GNUNET_MESSAGE_TYPE_MULTICAST_ORIGIN_START, @@ -2119,6 +2184,10 @@ GNUNET_SERVICE_MAIN GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION, struct MulticastJoinDecisionMessageHeader, NULL), + GNUNET_MQ_hd_fixed_size (client_part_request, + GNUNET_MESSAGE_TYPE_MULTICAST_PART_REQUEST, + struct GNUNET_MessageHeader, + NULL), GNUNET_MQ_hd_var_size (client_multicast_message, GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE, struct GNUNET_MULTICAST_MessageHeader, diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c @@ -542,31 +542,12 @@ group_cleanup (struct GNUNET_MULTICAST_Group *grp) static void -group_disconnect (struct GNUNET_MULTICAST_Group *grp, - GNUNET_ContinuationCallback cb, - void *cls) +handle_group_part_ack (void *cls, + const struct GNUNET_MessageHeader *msg) { - grp->is_disconnecting = GNUNET_YES; - grp->disconnect_cb = cb; - grp->disconnect_cls = cls; + struct GNUNET_MULTICAST_Group *grp = cls; - if (NULL != grp->mq) - { - struct GNUNET_MQ_Envelope *last = GNUNET_MQ_get_last_envelope (grp->mq); - if (NULL != last) - { - GNUNET_MQ_notify_sent (last, - (GNUNET_SCHEDULER_TaskCallback) group_cleanup, grp); - } - else - { - group_cleanup (grp); - } - } - else - { - group_cleanup (grp); - } + group_cleanup (grp); } @@ -779,6 +760,10 @@ origin_connect (struct GNUNET_MULTICAST_Origin *orig) GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST, struct MulticastJoinRequestMessage, grp), + GNUNET_MQ_hd_fixed_size (group_part_ack, + GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK, + struct GNUNET_MessageHeader, + grp), GNUNET_MQ_hd_fixed_size (group_replay_request, GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, struct MulticastReplayRequestMessage, @@ -879,8 +864,13 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *orig, void *stop_cls) { struct GNUNET_MULTICAST_Group *grp = &orig->grp; + struct GNUNET_MQ_Envelope *env; - group_disconnect (grp, stop_cb, stop_cls); + grp->is_disconnecting = GNUNET_YES; + grp->disconnect_cb = stop_cb; + grp->disconnect_cls = stop_cls; + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_MULTICAST_PART_REQUEST); + GNUNET_MQ_send (grp->mq, env); } @@ -1065,6 +1055,10 @@ member_connect (struct GNUNET_MULTICAST_Member *mem) GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION, struct MulticastJoinDecisionMessageHeader, mem), + GNUNET_MQ_hd_fixed_size (group_part_ack, + GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK, + struct GNUNET_MessageHeader, + grp), GNUNET_MQ_hd_fixed_size (group_replay_request, GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, struct MulticastReplayRequestMessage, @@ -1198,16 +1192,19 @@ GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *mem, GNUNET_ContinuationCallback part_cb, void *part_cls) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Member parting.\n", mem); struct GNUNET_MULTICAST_Group *grp = &mem->grp; + struct GNUNET_MQ_Envelope *env; mem->join_dcsn_cb = NULL; grp->join_req_cb = NULL; grp->message_cb = NULL; grp->replay_msg_cb = NULL; grp->replay_frag_cb = NULL; - - group_disconnect (grp, part_cb, part_cls); + grp->is_disconnecting = GNUNET_YES; + grp->disconnect_cb = part_cb; + grp->disconnect_cls = part_cls; + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_MULTICAST_PART_REQUEST); + GNUNET_MQ_send (grp->mq, env); } diff --git a/src/multicast/test_multicast_multipeer.c b/src/multicast/test_multicast_multipeer.c @@ -35,9 +35,10 @@ #define PEERS_REQUESTED 12 -struct multicast_peer +struct MulticastPeerContext { int peer; /* peer number */ + struct GNUNET_CRYPTO_EcdsaPrivateKey *key; const struct GNUNET_PeerIdentity *id; struct GNUNET_TESTBED_Operation *op; /* not yet in use */ struct GNUNET_TESTBED_Operation *pi_op; /* not yet in use */ @@ -61,7 +62,7 @@ static void service_connect (void *cls, void *ca_result, const char *emsg); -static struct multicast_peer **mc_peers; +static struct MulticastPeerContext **multicast_peers; static struct GNUNET_TESTBED_Peer **peers; // FIXME: refactor @@ -69,18 +70,14 @@ static struct GNUNET_TESTBED_Operation *op[PEERS_REQUESTED]; static struct GNUNET_TESTBED_Operation *pi_op[PEERS_REQUESTED]; static struct GNUNET_MULTICAST_Origin *origin; -static struct GNUNET_MULTICAST_Member *member[PEERS_REQUESTED]; /* first element always empty */ +static struct GNUNET_MULTICAST_Member *members[PEERS_REQUESTED]; /* first element always empty */ static struct GNUNET_SCHEDULER_Task *timeout_tid; -static struct GNUNET_CRYPTO_EddsaPrivateKey group_key; +//static struct GNUNET_CRYPTO_EddsaPrivateKey *group_key; static struct GNUNET_CRYPTO_EddsaPublicKey group_pub_key; static struct GNUNET_HashCode group_pub_key_hash; -static struct GNUNET_CRYPTO_EcdsaPrivateKey *member_key[PEERS_REQUESTED]; -static struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key[PEERS_REQUESTED]; - - /** * Global result for testcase. */ @@ -93,6 +90,8 @@ static int result; static void shutdown_task (void *cls) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "shutdown_task!\n"); for (int i=0;i<PEERS_REQUESTED;i++) { if (NULL != op[i]) @@ -107,14 +106,16 @@ shutdown_task (void *cls) } } - if (NULL != mc_peers) + if (NULL != multicast_peers) { for (int i=0; i < PEERS_REQUESTED; i++) { - GNUNET_free (mc_peers[i]); - mc_peers[i] = NULL; + GNUNET_free (multicast_peers[i]->key); + GNUNET_free (multicast_peers[i]); + multicast_peers[i] = NULL; } - GNUNET_free (mc_peers); + GNUNET_free (multicast_peers); + multicast_peers = NULL; } if (NULL != timeout_tid) @@ -141,11 +142,11 @@ member_join_request (void *cls, const struct GNUNET_MessageHeader *join_msg, struct GNUNET_MULTICAST_JoinHandle *jh) { - struct multicast_peer *mc_peer = (struct multicast_peer*)cls; + struct MulticastPeerContext *mc_peer = (struct MulticastPeerContext*)cls; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer #%u (%s) sent a join request.\n", mc_peer->peer, - GNUNET_i2s (mc_peers[mc_peer->peer]->id)); + GNUNET_i2s (multicast_peers[mc_peer->peer]->id)); } @@ -154,7 +155,7 @@ notify (void *cls, size_t *data_size, void *data) { - struct multicast_peer *mc_peer = (struct multicast_peer*)cls; + struct MulticastPeerContext *mc_peer = (struct MulticastPeerContext*)cls; struct pingpong_msg *pp_msg = GNUNET_new (struct pingpong_msg); pp_msg->peer = mc_peer->peer; @@ -178,18 +179,18 @@ member_join_decision (void *cls, const struct GNUNET_PeerIdentity *relays, const struct GNUNET_MessageHeader *join_msg) { - struct multicast_peer *mc_peer = (struct multicast_peer*)cls; + struct MulticastPeerContext *mc_peer = (struct MulticastPeerContext*)cls; struct GNUNET_MULTICAST_MemberTransmitHandle *req; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer #%u (%s) received a decision from origin: %s\n", mc_peer->peer, - GNUNET_i2s (mc_peers[mc_peer->peer]->id), + GNUNET_i2s (multicast_peers[mc_peer->peer]->id), (GNUNET_YES == is_admitted)?"accepted":"rejected"); if (GNUNET_YES == is_admitted) { - req = GNUNET_MULTICAST_member_to_origin (member[mc_peer->peer], + req = GNUNET_MULTICAST_member_to_origin (members[mc_peer->peer], 0, notify, cls); @@ -215,10 +216,32 @@ member_replay_msg () static void +origin_disconnected_cb (void *cls) +{ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Origin disconnected. Shutting down.\n"); + result = GNUNET_YES; + GNUNET_SCHEDULER_shutdown (); +} + + +static void +member_disconnected_cb (void *cls) +{ + for (int i = 1; i < PEERS_REQUESTED; ++i) + if (GNUNET_NO == multicast_peers[i]->test_ok) + return; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "All member disconnected. Stopping origin.\n"); + GNUNET_MULTICAST_origin_stop (origin, origin_disconnected_cb, cls); +} + + +static void member_message (void *cls, const struct GNUNET_MULTICAST_MessageHeader *msg) { - struct multicast_peer *mc_peer = (struct multicast_peer*)cls; + struct MulticastPeerContext *mc_peer = (struct MulticastPeerContext*)cls; struct pingpong_msg *pp_msg = (struct pingpong_msg*) &(msg[1]); if (PONG == pp_msg->msg && mc_peer->peer == pp_msg->peer) @@ -226,18 +249,15 @@ member_message (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "peer #%i (%s) receives a pong\n", mc_peer->peer, - GNUNET_i2s (mc_peers[mc_peer->peer]->id)); - + GNUNET_i2s (multicast_peers[mc_peer->peer]->id)); mc_peer->test_ok = GNUNET_OK; - } - - // Test for completeness of received PONGs - for (int i=1; i<PEERS_REQUESTED; i++) - if (GNUNET_NO == mc_peers[i]->test_ok) - return; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "peer #%u (%s) parting from multicast group\n", + mc_peer->peer, + GNUNET_i2s (multicast_peers[mc_peer->peer]->id)); - result = GNUNET_YES; - GNUNET_SCHEDULER_shutdown(); + GNUNET_MULTICAST_member_part (members[mc_peer->peer], member_disconnected_cb, cls); + } } @@ -349,81 +369,53 @@ origin_message (void *cls, static void -multicast_da (void *cls, - void *op_result) +multicast_disconnect (void *cls, + void *op_result) { - struct multicast_peer *mc_peer = (struct multicast_peer*)cls; - if (0 == mc_peer->peer) - { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Origin closes multicast group\n"); - - GNUNET_MULTICAST_origin_stop (origin, NULL, cls); - } - else - { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "peer #%u (%s) parting from multicast group\n", - mc_peer->peer, - GNUNET_i2s (mc_peers[mc_peer->peer]->id)); - - GNUNET_MULTICAST_member_part (member[mc_peer->peer], NULL, cls); - } } static void * -multicast_ca (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) +multicast_connect (void *cls, + const struct GNUNET_CONFIGURATION_Handle *cfg) { - struct multicast_peer *mc_peer = (struct multicast_peer*)cls; + struct MulticastPeerContext *multicast_peer = cls; struct GNUNET_MessageHeader *join_msg; char data[64]; - if (0 == mc_peer->peer) + multicast_peer->key = GNUNET_CRYPTO_ecdsa_key_create (); + if (0 == multicast_peer->peer) { - struct GNUNET_CRYPTO_EddsaPrivateKey *key = GNUNET_CRYPTO_eddsa_key_create (); - GNUNET_CRYPTO_eddsa_key_get_public (key, &group_pub_key); + GNUNET_CRYPTO_eddsa_key_get_public (multicast_peer->key, &group_pub_key); GNUNET_CRYPTO_hash (&group_pub_key, sizeof (group_pub_key), &group_pub_key_hash); - - group_key = *key; - origin = GNUNET_MULTICAST_origin_start (cfg, - &group_key, - 0, - origin_join_request, - origin_replay_frag, - origin_replay_msg, - origin_request, - origin_message, - cls); - - if (NULL == origin) { + multicast_peer->key, + 0, + origin_join_request, + origin_replay_frag, + origin_replay_msg, + origin_request, + origin_message, + cls); + if (NULL == origin) + { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer #%u could not create a multicast group", - mc_peer->peer); + multicast_peer->peer); return NULL; } - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer #%u connected as origin to group %s\n", - mc_peer->peer, + multicast_peer->peer, GNUNET_h2s (&group_pub_key_hash)); - return origin; } else { - // Get members keys - member_pub_key[mc_peer->peer] = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey); - member_key[mc_peer->peer] = GNUNET_CRYPTO_ecdsa_key_create (); - GNUNET_CRYPTO_ecdsa_key_get_public (member_key[mc_peer->peer], - member_pub_key[mc_peer->peer]); - sprintf(data, "Hi, I am peer #%u (%s). Can I enter?", - mc_peer->peer, - GNUNET_i2s (mc_peers[mc_peer->peer]->id)); + multicast_peer->peer, + GNUNET_i2s (multicast_peers[multicast_peer->peer]->id)); uint8_t data_size = strlen (data) + 1; join_msg = GNUNET_malloc (sizeof (join_msg) + data_size); join_msg->size = htons (sizeof (join_msg) + data_size); @@ -432,24 +424,25 @@ multicast_ca (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer #%u (%s) tries to join multicast group %s\n", - mc_peer->peer, - GNUNET_i2s (mc_peers[mc_peer->peer]->id), + multicast_peer->peer, + GNUNET_i2s (multicast_peers[multicast_peer->peer]->id), GNUNET_h2s (&group_pub_key_hash)); - member[mc_peer->peer] = GNUNET_MULTICAST_member_join (cfg, - &group_pub_key, - member_key[mc_peer->peer], - mc_peers[0]->id, - 0, - NULL, - join_msg, /* join message */ - member_join_request, - member_join_decision, - member_replay_frag, - member_replay_msg, - member_message, - cls); - return member[mc_peer->peer]; + members[multicast_peer->peer] = + GNUNET_MULTICAST_member_join (cfg, + &group_pub_key, + multicast_peer->key, + multicast_peers[0]->id, + 0, + NULL, + join_msg, /* join message */ + member_join_request, + member_join_decision, + member_replay_frag, + member_replay_msg, + member_message, + cls); + return members[multicast_peer->peer]; } } @@ -460,7 +453,7 @@ peer_information_cb (void *cls, const struct GNUNET_TESTBED_PeerInformation *pinfo, const char *emsg) { - struct multicast_peer *mc_peer = (struct multicast_peer*)cls; + struct MulticastPeerContext *mc_peer = (struct MulticastPeerContext*)cls; if (NULL == pinfo) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "got no peer information\n"); @@ -468,7 +461,7 @@ peer_information_cb (void *cls, GNUNET_SCHEDULER_shutdown (); } - mc_peers[mc_peer->peer]->id = pinfo->result.id; + multicast_peers[mc_peer->peer]->id = pinfo->result.id; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Got peer information of %s (%s)\n", @@ -478,22 +471,28 @@ peer_information_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Create peer #%u (%s)\n", mc_peer->peer, - GNUNET_i2s (mc_peers[mc_peer->peer]->id)); + GNUNET_i2s (multicast_peers[mc_peer->peer]->id)); if (0 != mc_peer->peer) { /* connect to multicast service of members */ - op[mc_peer->peer] = GNUNET_TESTBED_service_connect (NULL, /* Closure for operation */ - peers[mc_peer->peer], /* The peer whose service to connect to */ - "multicast", /* The name of the service */ - service_connect, /* callback to call after a handle to service - is opened */ - cls, /* closure for the above callback */ - multicast_ca, /* callback to call with peer's configuration; - this should open the needed service connection */ - multicast_da, /* callback to be called when closing the - opened service connection */ - cls); /* closure for the above two callbacks */ + op[mc_peer->peer] = + GNUNET_TESTBED_service_connect (/* Closure for operation */ + NULL, + /* The peer whose service to connect to */ + peers[mc_peer->peer], + /* The name of the service */ + "multicast", + /* called after a handle to service is opened */ + service_connect, + /* closure for the above callback */ + cls, + /* called when opening the service connection */ + multicast_connect, + /* called when closing the service connection */ + multicast_disconnect, + /* closure for the above two callbacks */ + cls); } } @@ -504,14 +503,14 @@ service_connect (void *cls, void *ca_result, const char *emsg) { - struct multicast_peer *mc_peer = (struct multicast_peer*)cls; + struct MulticastPeerContext *mc_peer = (struct MulticastPeerContext*)cls; if (NULL == ca_result) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connection adapter not created for peer #%u (%s)\n", mc_peer->peer, - GNUNET_i2s (mc_peers[mc_peer->peer]->id)); + GNUNET_i2s (multicast_peers[mc_peer->peer]->id)); result = GNUNET_SYSERR; GNUNET_SCHEDULER_shutdown(); @@ -525,7 +524,7 @@ service_connect (void *cls, pi_op[i] = GNUNET_TESTBED_peer_get_information (peers[i], GNUNET_TESTBED_PIT_IDENTITY, peer_information_cb, - mc_peers[i]); + multicast_peers[i]); } } } @@ -549,50 +548,51 @@ service_connect (void *cls, * @param links_failed number of links testbed was unable to establish */ static void testbed_master (void *cls, - struct GNUNET_TESTBED_RunHandle *h, - unsigned int num_peers, - struct GNUNET_TESTBED_Peer **p, - unsigned int links_succeeded, - unsigned int links_failed) + struct GNUNET_TESTBED_RunHandle *h, + unsigned int num_peers, + struct GNUNET_TESTBED_Peer **p, + unsigned int links_succeeded, + unsigned int links_failed) { /* Testbed is ready with peers running and connected in a pre-defined overlay topology (FIXME) */ - - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Connected to testbed_master()\n"); - peers = p; - - mc_peers = GNUNET_new_array (PEERS_REQUESTED, struct multicast_peer*); + multicast_peers = GNUNET_new_array (PEERS_REQUESTED, struct MulticastPeerContext*); // Create test contexts for members for (int i = 0; i<PEERS_REQUESTED; i++) { - mc_peers[i] = GNUNET_new (struct multicast_peer); - mc_peers[i]->peer = i; - mc_peers[i]->test_ok = GNUNET_NO; + multicast_peers[i] = GNUNET_new (struct MulticastPeerContext); + multicast_peers[i]->peer = i; + multicast_peers[i]->test_ok = GNUNET_NO; } - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Create origin peer\n"); - - op[0] = GNUNET_TESTBED_service_connect (NULL, /* Closure for operation */ - peers[0], /* The peer whose service to connect to */ - "multicast", /* The name of the service */ - service_connect, /* callback to call after a handle to service - is opened */ - mc_peers[0], /* closure for the above callback */ - multicast_ca, /* callback to call with peer's configuration; - this should open the needed service connection */ - multicast_da, /* callback to be called when closing the - opened service connection */ - mc_peers[0]); /* closure for the above two callbacks */ - - GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); /* Schedule a new task on shutdown */ - + op[0] = + GNUNET_TESTBED_service_connect (/* Closure for operation */ + NULL, + /* The peer whose service to connect to */ + peers[0], + /* The name of the service */ + "multicast", + /* called after a handle to service is opened */ + service_connect, + /* closure for the above callback */ + multicast_peers[0], + /* called when opening the service connection */ + multicast_connect, + /* called when closing the service connection */ + multicast_disconnect, + /* closure for the above two callbacks */ + multicast_peers[0]); + /* Schedule a new task on shutdown */ + GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); /* Schedule the shutdown task with a delay of a few Seconds */ - timeout_tid = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 400), - &timeout_task, NULL); + timeout_tid = + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply + (GNUNET_TIME_UNIT_SECONDS, 400), + &timeout_task, + NULL); } @@ -616,15 +616,21 @@ main (int argc, char *argv[]) } result = GNUNET_SYSERR; - ret = GNUNET_TESTBED_test_run - ("test-multicast-multipeer", /* test case name */ - config_file, /* template configuration */ - PEERS_REQUESTED, /* number of peers to start */ - 0LL, /* Event mask - set to 0 for no event notifications */ - NULL, /* Controller event callback */ - NULL, /* Closure for controller event callback */ - testbed_master, /* continuation callback to be called when testbed setup is complete */ - NULL); /* Closure for the test_master callback */ + ret = + GNUNET_TESTBED_test_run ("test-multicast-multipeer", + config_file, + /* number of peers to start */ + PEERS_REQUESTED, + /* Event mask - set to 0 for no event notifications */ + 0LL, + /* Controller event callback */ + NULL, + /* Closure for controller event callback */ + NULL, + /* called when testbed setup is complete */ + testbed_master, + /* Closure for the test_master callback */ + NULL); if ( (GNUNET_OK != ret) || (GNUNET_OK != result) ) return 1; return 0; diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c @@ -377,10 +377,16 @@ run (void *cls, ls = GNUNET_NETWORK_socket_create (af, SOCK_DGRAM, IPPROTO_UDP); + if (NULL == ls) + { + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "Failed to create socket\n"); + goto fail_and_shutdown; + } if (GNUNET_OK != - GNUNET_NETWORK_socket_bind (ls, - local_sa, - local_len)) + GNUNET_NETWORK_socket_bind (ls, + local_sa, + local_len)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to bind to %s: %s\n", diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c @@ -374,13 +374,14 @@ nse_disconnect_adapter (void *cls, */ static int stat_iterator (void *cls, - const char *subsystem, - const char *name, - uint64_t value, int is_persistent) + const char *subsystem, + const char *name, + uint64_t value, + int is_persistent) { char *output_buffer; struct GNUNET_TIME_Absolute now; - size_t size; + int size; unsigned int flag; GNUNET_assert (NULL != data_file); @@ -390,8 +391,14 @@ stat_iterator (void *cls, flag = 1; size = GNUNET_asprintf (&output_buffer, "%llu %llu %u\n", now.abs_value_us / 1000LL / 1000LL, - value, flag); - if (size != GNUNET_DISK_file_write (data_file, output_buffer, size)) + value, flag); + if (0 > size) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Error formatting output buffer.\n"); + GNUNET_free (output_buffer); + return GNUNET_SYSERR; + } + if (size != GNUNET_DISK_file_write (data_file, output_buffer, (size_t) size)) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unable to write to file!\n"); GNUNET_free (output_buffer); diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c @@ -198,6 +198,8 @@ count_addresses (void *cls, { unsigned int *cnt = cls; + (void) address; + (void) expiration; (*cnt)++; return GNUNET_OK; } @@ -290,7 +292,7 @@ read_host_file (const char *fn, const struct GNUNET_HELLO_Message *hello; struct GNUNET_HELLO_Message *hello_clean; size_t read_pos; - int size_hello; + uint16_t size_hello; r->friend_only_hello = NULL; r->hello = NULL; @@ -304,7 +306,8 @@ read_host_file (const char *fn, "Read %d bytes from `%s'\n", (int) size_total, fn); - if (size_total < sizeof (struct GNUNET_MessageHeader)) + if ( (size_total < 0) || + (((size_t) size_total) < sizeof (struct GNUNET_MessageHeader)) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to parse HELLO in file `%s': %s\n"), @@ -320,12 +323,12 @@ read_host_file (const char *fn, } read_pos = 0; - while (read_pos < size_total) + while (read_pos < (size_t) size_total) { hello = (const struct GNUNET_HELLO_Message *) &buffer[read_pos]; size_hello = GNUNET_HELLO_size (hello); if ( (0 == size_hello) || - (size_total - read_pos < size_hello) ) + (((size_t) size_total) - read_pos < size_hello) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to parse HELLO in file `%s'\n"), @@ -559,11 +562,11 @@ hosts_directory_scan_callback (void *cls, if (GNUNET_OK != GNUNET_HELLO_get_id (r.friend_only_hello, &id_friend)) + { if (GNUNET_YES == dsc->remove_files) - { remove_garbage (fullname); - return GNUNET_OK; - } + return GNUNET_OK; + } id = id_friend; } if (NULL != r.hello) @@ -571,11 +574,11 @@ hosts_directory_scan_callback (void *cls, if (GNUNET_OK != GNUNET_HELLO_get_id (r.hello, &id_public)) + { if (GNUNET_YES == dsc->remove_files) - { remove_garbage (fullname); - return GNUNET_OK; - } + return GNUNET_OK; + } id = id_public; } @@ -640,6 +643,7 @@ cron_scan_directory_data_hosts (void *cls) static unsigned int retries; struct DirScanContext dsc; + (void) cls; cron_scan = NULL; if (GNUNET_SYSERR == GNUNET_DISK_directory_create (networkIdDirectory)) @@ -730,7 +734,7 @@ update_hello (const struct GNUNET_PeerIdentity *peer, int friend_hello_type; int store_hello; int store_friend_hello; - int pos; + unsigned int pos; char *buffer; host = GNUNET_CONTAINER_multipeermap_get (hostmap, peer); @@ -849,8 +853,8 @@ update_hello (const struct GNUNET_PeerIdentity *peer, if (GNUNET_YES == store_friend_hello) { GNUNET_memcpy (&buffer[pos], - host->friend_only_hello, - GNUNET_HELLO_size (host->friend_only_hello)); + host->friend_only_hello, + GNUNET_HELLO_size (host->friend_only_hello)); pos += GNUNET_HELLO_size (host->friend_only_hello); } GNUNET_assert (pos == size); @@ -987,13 +991,32 @@ discard_hosts_helper (void *cls, int write_pos; unsigned int cnt; char *writebuffer; + uint64_t fsize; + + if (GNUNET_OK != + GNUNET_DISK_file_size (fn, + &fsize, + GNUNET_YES, + GNUNET_YES)) + { + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING | + GNUNET_ERROR_TYPE_BULK, + "fstat", + fn); + return GNUNET_OK; + } + read_size = GNUNET_DISK_fn_read (fn, + buffer, + sizeof (buffer)); - read_size = GNUNET_DISK_fn_read (fn, buffer, sizeof (buffer)); - if (read_size < (int) sizeof (struct GNUNET_MessageHeader)) + if ( (read_size < (int) sizeof (struct GNUNET_MessageHeader)) || + (fsize > GNUNET_MAX_MESSAGE_SIZE) ) { if (0 != UNLINK (fn)) GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING | - GNUNET_ERROR_TYPE_BULK, "unlink", fn); + GNUNET_ERROR_TYPE_BULK, + "unlink", + fn); return GNUNET_OK; } @@ -1070,6 +1093,7 @@ cron_clean_data_hosts (void *cls) { struct GNUNET_TIME_Absolute now; + (void) cls; cron_clean = NULL; now = GNUNET_TIME_absolute_get (); GNUNET_log (GNUNET_ERROR_TYPE_INFO | GNUNET_ERROR_TYPE_BULK, @@ -1097,6 +1121,7 @@ check_hello (void *cls, { struct GNUNET_PeerIdentity pid; + (void) cls; if (GNUNET_OK != GNUNET_HELLO_get_id (hello, &pid)) @@ -1121,12 +1146,12 @@ handle_hello (void *cls, struct GNUNET_SERVICE_Client *client = cls; struct GNUNET_PeerIdentity pid; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "HELLO message received for peer `%s'\n", - GNUNET_i2s (&pid)); GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_id (hello, &pid)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "HELLO message received for peer `%s'\n", + GNUNET_i2s (&pid)); add_host_to_known_hosts (&pid); update_hello (&pid, hello); @@ -1248,6 +1273,8 @@ client_connect_cb (void *cls, struct GNUNET_SERVICE_Client *client, struct GNUNET_MQ_Handle *mq) { + (void) cls; + (void) mq; return client; } @@ -1264,6 +1291,7 @@ client_disconnect_cb (void *cls, struct GNUNET_SERVICE_Client *client, void *app_ctx) { + (void) cls; GNUNET_assert (app_ctx == client); } @@ -1283,6 +1311,8 @@ free_host_entry (void *cls, { struct HostEntry *he = value; + (void) cls; + (void) key; GNUNET_free_non_null (he->hello); GNUNET_free_non_null (he->friend_only_hello); GNUNET_free (he); @@ -1298,6 +1328,7 @@ free_host_entry (void *cls, static void shutdown_task (void *cls) { + (void) cls; GNUNET_notification_context_destroy (notify_list); notify_list = NULL; GNUNET_notification_context_destroy (notify_friend_only_list); @@ -1349,6 +1380,8 @@ run (void *cls, int noio; int use_included; + (void) cls; + (void) service; hostmap = GNUNET_CONTAINER_multipeermap_create (1024, GNUNET_YES); diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c @@ -279,7 +279,7 @@ struct Channel * Is the client disconnected? * #GNUNET_YES or #GNUNET_NO */ - uint8_t is_disconnected; + uint8_t is_disconnecting; /** * Is this a channel master (#GNUNET_YES), or slave (#GNUNET_NO)? @@ -508,8 +508,6 @@ cleanup_master (struct Master *mst) { struct Channel *chn = &mst->channel; - if (NULL != mst->origin) - GNUNET_MULTICAST_origin_stop (mst->origin, NULL, NULL); // FIXME GNUNET_CONTAINER_multihashmap_destroy (mst->join_reqs); GNUNET_CONTAINER_multihashmap_remove (masters, &chn->pub_key_hash, mst); } @@ -546,11 +544,6 @@ cleanup_slave (struct Slave *slv) GNUNET_free (slv->relays); slv->relays = NULL; } - if (NULL != slv->member) - { - GNUNET_MULTICAST_member_part (slv->member, NULL, NULL); // FIXME - slv->member = NULL; - } GNUNET_CONTAINER_multihashmap_remove (slaves, &chn->pub_key_hash, slv); } @@ -603,15 +596,16 @@ client_notify_disconnect (void *cls, if (NULL == chn) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p User context is NULL in client_disconnect()\n", + "%p User context is NULL in client_notify_disconnect ()\n", chn); GNUNET_break (0); return; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Client (%s) disconnected from channel %s\n", + "%p Client %p (%s) disconnected from channel %s\n", chn, + client, (GNUNET_YES == chn->is_master) ? "master" : "slave", GNUNET_h2s (&chn->pub_key_hash)); @@ -645,15 +639,8 @@ client_notify_disconnect (void *cls, chn, (GNUNET_YES == chn->is_master) ? "master" : "slave", GNUNET_h2s (&chn->pub_key_hash)); - chn->is_disconnected = GNUNET_YES; - if (NULL != chn->tmit_head) - { /* Send pending messages to multicast before cleanup. */ - transmit_message (chn); - } - else - { - cleanup_channel (chn); - } + chn->is_disconnecting = GNUNET_YES; + cleanup_channel (chn); } } @@ -688,7 +675,7 @@ client_send_msg (const struct Channel *chn, const struct GNUNET_MessageHeader *msg) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Sending message to clients.\n", + "Sending message to clients of channel %p.\n", chn); struct ClientList *cli = chn->clients_head; @@ -699,7 +686,6 @@ client_send_msg (const struct Channel *chn, GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (cli->client), env); - cli = cli->next; } } @@ -734,7 +720,7 @@ client_send_result (struct GNUNET_SERVICE_Client *client, uint64_t op_id, GNUNET_memcpy (&res[1], data, data_size); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Sending result to client for operation #%" PRIu64 ": %" PRId64 " (size: %u)\n", + "%p Sending result to client for OP ID %" PRIu64 ": %" PRId64 " (size: %u)\n", client, GNUNET_ntohll (op_id), result_code, @@ -1202,12 +1188,12 @@ fragment_queue_insert (struct Channel *chn, else if (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD == first_ptype || frag_offset == fragq->header_size) { /* header is now complete */ - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Header of message %" PRIu64 " is complete.\n", chn, GNUNET_ntohll (mmsg->message_id)); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Adding message %" PRIu64 " to queue.\n", chn, GNUNET_ntohll (mmsg->message_id)); @@ -1215,7 +1201,7 @@ fragment_queue_insert (struct Channel *chn, } else { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Header of message %" PRIu64 " is NOT complete yet: %" PRIu64 " != %" PRIu64 "\n", chn, GNUNET_ntohll (mmsg->message_id), @@ -1230,7 +1216,7 @@ fragment_queue_insert (struct Channel *chn, if (frag_offset == fragq->size) fragq->state = MSG_FRAG_STATE_END; else - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Message %" PRIu64 " is NOT complete yet: %" PRIu64 " != %" PRIu64 "\n", chn, GNUNET_ntohll (mmsg->message_id), @@ -1285,7 +1271,7 @@ static void fragment_queue_run (struct Channel *chn, uint64_t msg_id, struct FragmentQueue *fragq, uint8_t drop) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Running message fragment queue for message %" PRIu64 " (state: %u).\n", chn, msg_id, @@ -1413,7 +1399,7 @@ store_recv_state_modify_result (void *cls, int64_t result, static uint64_t message_queue_run (struct Channel *chn) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Running message queue.\n", chn); uint64_t n = 0; uint64_t msg_id; @@ -1421,7 +1407,7 @@ message_queue_run (struct Channel *chn) while (GNUNET_YES == GNUNET_CONTAINER_heap_peek2 (chn->recv_msgs, NULL, &msg_id)) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Processing message %" PRIu64 " in queue.\n", chn, msg_id); struct GNUNET_HashCode msg_id_hash; hash_key_from_hll (&msg_id_hash, msg_id); @@ -1431,7 +1417,7 @@ message_queue_run (struct Channel *chn) if (NULL == fragq || fragq->state <= MSG_FRAG_STATE_HEADER) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p No fragq (%p) or header not complete.\n", chn, fragq); break; @@ -1453,7 +1439,7 @@ message_queue_run (struct Channel *chn) && (chn->max_message_id != msg_id - 1 && chn->max_message_id != msg_id)) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Out of order message. " "(%" PRIu64 " != %" PRIu64 " - 1)\n", chn, chn->max_message_id, msg_id); @@ -1469,7 +1455,7 @@ message_queue_run (struct Channel *chn) { if (msg_id - fragq->state_delta != chn->max_state_message_id) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Out of order stateful message. " "(%" PRIu64 " - %" PRIu64 " != %" PRIu64 ")\n", chn, msg_id, fragq->state_delta, chn->max_state_message_id); @@ -1515,8 +1501,6 @@ message_queue_run (struct Channel *chn) static uint64_t message_queue_drop (struct Channel *chn) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "%p Dropping message queue.\n", chn); uint64_t n = 0; uint64_t msg_id; while (GNUNET_YES == GNUNET_CONTAINER_heap_peek2 (chn->recv_msgs, NULL, @@ -1703,7 +1687,7 @@ store_recv_slave_counters (void *cls, int result, uint64_t max_fragment_id, res.result_code = htonl (result); res.max_message_id = GNUNET_htonll (max_message_id); - if (GNUNET_OK == result || GNUNET_NO == result) + if (GNUNET_YES == result || GNUNET_NO == result) { chn->max_message_id = max_message_id; chn->max_state_message_id = max_state_message_id; @@ -1831,6 +1815,9 @@ handle_client_slave_join (void *cls, struct GNUNET_CRYPTO_EcdsaPublicKey slv_pub_key; struct GNUNET_HashCode pub_key_hash, slv_pub_hash; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "got join request from client %p\n", + client); GNUNET_CRYPTO_ecdsa_key_get_public (&req->slave_key, &slv_pub_key); GNUNET_CRYPTO_hash (&slv_pub_key, sizeof (slv_pub_key), &slv_pub_hash); GNUNET_CRYPTO_hash (&req->channel_pub_key, sizeof (req->channel_pub_key), &pub_key_hash); @@ -1905,7 +1892,7 @@ handle_client_slave_join (void *cls, GNUNET_CONTAINER_multihashmap_put (slaves, &chn->pub_key_hash, chn, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); chn->store_op = GNUNET_PSYCSTORE_counters_get (store, &chn->pub_key, - &store_recv_slave_counters, slv); + &store_recv_slave_counters, slv); } else { @@ -1952,8 +1939,9 @@ handle_client_slave_join (void *cls, } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Client connected as slave to channel %s.\n", - slv, GNUNET_h2s (&chn->pub_key_hash)); + "Client %p connected as slave to channel %s.\n", + client, + GNUNET_h2s (&chn->pub_key_hash)); struct ClientList *cli = GNUNET_malloc (sizeof (*cli)); cli->client = client; @@ -2037,6 +2025,49 @@ handle_client_join_decision (void *cls, } +static void +channel_part_cb (void *cls) +{ + struct GNUNET_SERVICE_Client *client = cls; + struct GNUNET_MQ_Envelope *env; + + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_PSYC_PART_ACK); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); +} + + +static void +handle_client_part_request (void *cls, + const struct GNUNET_MessageHeader *msg) +{ + struct Client *c = cls; + + c->channel->is_disconnecting = GNUNET_YES; + if (GNUNET_YES == c->channel->is_master) + { + struct Master *mst = (struct Master *) c->channel; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Got part request from master %p\n", + mst); + GNUNET_assert (NULL != mst->origin); + GNUNET_MULTICAST_origin_stop (mst->origin, channel_part_cb, c->client); + } + else + { + struct Slave *slv = (struct Slave *) c->channel; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Got part request from slave %p\n", + slv); + GNUNET_assert (NULL != slv->member); + GNUNET_MULTICAST_member_part (slv->member, channel_part_cb, c->client); + } + GNUNET_SERVICE_client_continue (c->client); +} + + /** * Send acknowledgement to a client. * @@ -2096,7 +2127,7 @@ transmit_notify (void *cls, size_t *data_size, void *data) { GNUNET_SCHEDULER_add_now (&schedule_transmit_message, chn); } - else if (GNUNET_YES == chn->is_disconnected + else if (GNUNET_YES == chn->is_disconnecting && tmit_msg->last_ptype < GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END) { /* FIXME: handle partial message (when still in_transmit) */ @@ -2208,12 +2239,10 @@ transmit_message (struct Channel *chn) static void master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%p master_queue_message()\n", mst); - if (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD == tmit_msg->first_ptype) { tmit_msg->id = ++mst->max_message_id; - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p master_queue_message: message_id=%" PRIu64 "\n", mst, tmit_msg->id); struct GNUNET_PSYC_MessageMethod *pmeth @@ -2225,7 +2254,7 @@ master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg) } else if (pmeth->flags & GNUNET_PSYC_MASTER_TRANSMIT_STATE_MODIFY) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p master_queue_message: state_delta=%" PRIu64 "\n", mst, tmit_msg->id - mst->max_state_message_id); pmeth->state_delta = GNUNET_htonll (tmit_msg->id @@ -2234,7 +2263,7 @@ master_queue_message (struct Master *mst, struct TransmitMessage *tmit_msg) } else { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p master_queue_message: state not modified\n", mst); pmeth->state_delta = GNUNET_htonll (GNUNET_PSYC_STATE_NOT_MODIFIED); } @@ -2359,7 +2388,9 @@ handle_client_psyc_message (void *cls, if (GNUNET_YES != chn->is_ready) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "%p Channel is not ready yet, disconnecting client.\n", chn); + "%p Channel is not ready yet, disconnecting client %p.\n", + chn, + client); GNUNET_break (0); GNUNET_SERVICE_client_drop (client); return; @@ -2789,9 +2820,9 @@ run (void *cls, GNUNET_SERVICE_MAIN ("psyc", GNUNET_SERVICE_OPTION_NONE, - run, - client_notify_connect, - client_notify_disconnect, + &run, + &client_notify_connect, + &client_notify_disconnect, NULL, GNUNET_MQ_hd_fixed_size (client_master_start, GNUNET_MESSAGE_TYPE_PSYC_MASTER_START, @@ -2805,6 +2836,10 @@ GNUNET_SERVICE_MAIN GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION, struct GNUNET_PSYC_JoinDecisionMessage, NULL), + GNUNET_MQ_hd_fixed_size (client_part_request, + GNUNET_MESSAGE_TYPE_PSYC_PART_REQUEST, + struct GNUNET_MessageHeader, + NULL), GNUNET_MQ_hd_var_size (client_psyc_message, GNUNET_MESSAGE_TYPE_PSYC_MESSAGE, struct GNUNET_MessageHeader, diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c @@ -260,6 +260,10 @@ handle_channel_result (void *cls, GNUNET_OP_result (chn->op, GNUNET_ntohll (res->op_id), GNUNET_ntohll (res->result_code), data, data_size, NULL); + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "handle_channel_result: Received result message with OP ID %" PRIu64 "\n", + GNUNET_ntohll (res->op_id)); } @@ -555,6 +559,9 @@ handle_slave_join_decision (void *cls, static void channel_cleanup (struct GNUNET_PSYC_Channel *chn) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "cleaning up channel %p\n", + chn); if (NULL != chn->tmit) { GNUNET_PSYC_transmit_destroy (chn->tmit); @@ -562,6 +569,7 @@ channel_cleanup (struct GNUNET_PSYC_Channel *chn) } if (NULL != chn->recv) { + GNUNET_PSYC_receive_destroy (chn->recv); chn->recv = NULL; } @@ -585,30 +593,12 @@ channel_cleanup (struct GNUNET_PSYC_Channel *chn) static void -channel_disconnect (struct GNUNET_PSYC_Channel *chn, - GNUNET_ContinuationCallback cb, - void *cls) +handle_channel_part_ack (void *cls, + const struct GNUNET_MessageHeader *msg) { - chn->is_disconnecting = GNUNET_YES; - chn->disconnect_cb = cb; - chn->disconnect_cls = cls; + struct GNUNET_PSYC_Channel *chn = cls; - if (NULL != chn->mq) - { - struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (chn->mq); - if (NULL != env) - { - GNUNET_MQ_notify_sent (env, (GNUNET_SCHEDULER_TaskCallback) channel_cleanup, chn); - } - else - { - channel_cleanup (chn); - } - } - else - { - channel_cleanup (chn); - } + channel_cleanup (chn); } @@ -671,6 +661,10 @@ master_connect (struct GNUNET_PSYC_Master *mst) GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST, struct GNUNET_PSYC_JoinRequestMessage, mst), + GNUNET_MQ_hd_fixed_size (channel_part_ack, + GNUNET_MESSAGE_TYPE_PSYC_PART_ACK, + struct GNUNET_MessageHeader, + chn), GNUNET_MQ_hd_var_size (channel_message, GNUNET_MESSAGE_TYPE_PSYC_MESSAGE, struct GNUNET_PSYC_MessageHeader, @@ -694,8 +688,11 @@ master_connect (struct GNUNET_PSYC_Master *mst) GNUNET_MQ_handler_end () }; - chn->mq = GNUNET_CLIENT_connect (chn->cfg, "psyc", - handlers, master_disconnected, mst); + chn->mq = GNUNET_CLIENT_connect (chn->cfg, + "psyc", + handlers, + &master_disconnected, + mst); GNUNET_assert (NULL != chn->mq); chn->tmit = GNUNET_PSYC_transmit_create (chn->mq); @@ -780,10 +777,13 @@ GNUNET_PSYC_master_stop (struct GNUNET_PSYC_Master *mst, void *stop_cls) { struct GNUNET_PSYC_Channel *chn = &mst->chn; + struct GNUNET_MQ_Envelope *env; - /* FIXME: send msg to service */ - - channel_disconnect (chn, stop_cb, stop_cls); + chn->is_disconnecting = GNUNET_YES; + chn->disconnect_cb = stop_cb; + chn->disconnect_cls = stop_cls; + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_PSYC_PART_REQUEST); + GNUNET_MQ_send (chn->mq, env); } @@ -931,7 +931,8 @@ slave_reconnect (void *cls) * Reconnect after backoff period. */ static void -slave_disconnected (void *cls, enum GNUNET_MQ_Error error) +slave_disconnected (void *cls, + enum GNUNET_MQ_Error error) { struct GNUNET_PSYC_Slave *slv = cls; struct GNUNET_PSYC_Channel *chn = &slv->chn; @@ -950,7 +951,7 @@ slave_disconnected (void *cls, enum GNUNET_MQ_Error error) chn->mq = NULL; } chn->reconnect_task = GNUNET_SCHEDULER_add_delayed (chn->reconnect_delay, - slave_reconnect, + &slave_reconnect, slv); chn->reconnect_delay = GNUNET_TIME_STD_BACKOFF (chn->reconnect_delay); } @@ -970,6 +971,10 @@ slave_connect (struct GNUNET_PSYC_Slave *slv) GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION, struct GNUNET_PSYC_JoinDecisionMessage, slv), + GNUNET_MQ_hd_fixed_size (channel_part_ack, + GNUNET_MESSAGE_TYPE_PSYC_PART_ACK, + struct GNUNET_MessageHeader, + chn), GNUNET_MQ_hd_var_size (channel_message, GNUNET_MESSAGE_TYPE_PSYC_MESSAGE, struct GNUNET_PSYC_MessageHeader, @@ -993,9 +998,19 @@ slave_connect (struct GNUNET_PSYC_Slave *slv) GNUNET_MQ_handler_end () }; - chn->mq = GNUNET_CLIENT_connect (chn->cfg, "psyc", - handlers, slave_disconnected, slv); - GNUNET_assert (NULL != chn->mq); + chn->mq = GNUNET_CLIENT_connect (chn->cfg, + "psyc", + handlers, + &slave_disconnected, + slv); + if (NULL == chn->mq) + { + chn->reconnect_task = GNUNET_SCHEDULER_add_delayed (chn->reconnect_delay, + &slave_reconnect, + slv); + chn->reconnect_delay = GNUNET_TIME_STD_BACKOFF (chn->reconnect_delay); + return; + } chn->tmit = GNUNET_PSYC_transmit_create (chn->mq); GNUNET_MQ_send_copy (chn->mq, chn->connect_env); @@ -1107,10 +1122,13 @@ GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slv, void *part_cls) { struct GNUNET_PSYC_Channel *chn = &slv->chn; + struct GNUNET_MQ_Envelope *env; - /* FIXME: send msg to service */ - - channel_disconnect (chn, part_cb, part_cls); + chn->is_disconnecting = GNUNET_YES; + chn->disconnect_cb = part_cb; + chn->disconnect_cls = part_cls; + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_PSYC_PART_REQUEST); + GNUNET_MQ_send (chn->mq, env); } @@ -1233,6 +1251,9 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn, req->did_join = GNUNET_YES; req->op_id = GNUNET_htonll (GNUNET_OP_add (chn->op, result_cb, cls, NULL)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "GNUNET_PSYC_channel_slave_add, OP ID: %" PRIu64 "\n", + GNUNET_ntohll (req->op_id)); GNUNET_MQ_send (chn->mq, env); } @@ -1283,6 +1304,9 @@ GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *chn, req->did_join = GNUNET_NO; req->op_id = GNUNET_htonll (GNUNET_OP_add (chn->op, result_cb, cls, NULL)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "GNUNET_PSYC_channel_slave_remove, OP ID: %" PRIu64 "\n", + GNUNET_ntohll (req->op_id)); GNUNET_MQ_send (chn->mq, env); } @@ -1321,6 +1345,10 @@ channel_history_replay (struct GNUNET_PSYC_Channel *chn, req->message_limit = GNUNET_htonll (message_limit); req->flags = htonl (flags); req->op_id = GNUNET_htonll (hist->op_id); + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "channel_history_replay, OP ID: %" PRIu64 "\n", + GNUNET_ntohll (req->op_id)); GNUNET_memcpy (&req[1], method_prefix, method_size); GNUNET_MQ_send (chn->mq, env); @@ -1459,6 +1487,11 @@ channel_state_get (struct GNUNET_PSYC_Channel *chn, struct GNUNET_MQ_Envelope * env = GNUNET_MQ_msg_extra (req, name_size, type); req->op_id = GNUNET_htonll (sr->op_id); + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "channel_state_get, OP ID: %" PRIu64 "\n", + GNUNET_ntohll (req->op_id)); + GNUNET_memcpy (&req[1], name, name_size); GNUNET_MQ_send (chn->mq, env); diff --git a/src/psyc/test_psyc.c b/src/psyc/test_psyc.c @@ -755,15 +755,22 @@ slave_add () static void +schedule_second_slave_join (void *cls) +{ + slave_join (TEST_SLAVE_JOIN_ACCEPT); +} + + +static void first_slave_parted (void *cls) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "First slave parted.\n"); - slave_join (TEST_SLAVE_JOIN_ACCEPT); + GNUNET_SCHEDULER_add_now (&schedule_second_slave_join, NULL); } static void -schedule_slave_part (void *cls) +schedule_first_slave_part (void *cls) { GNUNET_PSYC_slave_part (slv, GNUNET_NO, &first_slave_parted, NULL); } @@ -783,7 +790,7 @@ join_decision_cb (void *cls, case TEST_SLAVE_JOIN_REJECT: GNUNET_assert (0 == is_admitted); GNUNET_assert (1 == join_req_count); - GNUNET_SCHEDULER_add_now (&schedule_slave_part, NULL); + GNUNET_SCHEDULER_add_now (&schedule_first_slave_part, NULL); break; case TEST_SLAVE_JOIN_ACCEPT: @@ -844,11 +851,18 @@ slave_join (int t) struct GNUNET_PSYC_Message * join_msg = GNUNET_PSYC_message_create ("_request_join", env, "some data", 9); - slv = GNUNET_PSYC_slave_join (cfg, &channel_pub_key, slave_key, + slv = GNUNET_PSYC_slave_join (cfg, + &channel_pub_key, + slave_key, GNUNET_PSYC_SLAVE_JOIN_NONE, - &origin, 0, NULL, - &slave_message_cb, &slave_message_part_cb, - &slave_connect_cb, &join_decision_cb, NULL, + &origin, + 0, + NULL, + &slave_message_cb, + &slave_message_part_cb, + &slave_connect_cb, + &join_decision_cb, + NULL, join_msg); GNUNET_free (join_msg); slv_chn = GNUNET_PSYC_slave_get_channel (slv); diff --git a/src/psyc/test_psyc.conf b/src/psyc/test_psyc.conf @@ -0,0 +1,16 @@ +@INLINE@ ../../contrib/no_forcestart.conf + +[PATHS] +GNUNET_TEST_HOME = /tmp/gnunet-test-psyc/ + +[transport] +PLUGINS = tcp + +[nat] +DISABLEV6 = YES +ENABLE_UPNP = NO +BEHIND_NAT = NO +ALLOW_NAT = NO +INTERNAL_ADDRESS = 127.0.0.1 +EXTERNAL_ADDRESS = 127.0.0.1 + diff --git a/src/psycstore/psycstore_api.c b/src/psycstore/psycstore_api.c @@ -148,14 +148,14 @@ handle_result_code (void *cls, const struct OperationResult *opres) str, size - sizeof (*opres), (void **) &op)) { LOG (GNUNET_ERROR_TYPE_DEBUG, - "handle_result_code: Received result message with operation ID: %" PRIu64 "\n", + "handle_result_code: Received result message with OP ID: %" PRIu64 "\n", GNUNET_ntohll (opres->op_id)); GNUNET_free (op); } else { LOG (GNUNET_ERROR_TYPE_DEBUG, - "handle_result_code: No callback registered for operation with ID %" PRIu64 ".\n", + "handle_result_code: No callback registered for OP ID %" PRIu64 ".\n", GNUNET_ntohll (opres->op_id)); } h->reconnect_delay = GNUNET_TIME_UNIT_MILLISECONDS; @@ -187,7 +187,7 @@ handle_result_counters (void *cls, const struct CountersResult *cres) else { LOG (GNUNET_ERROR_TYPE_DEBUG, - "handle_result_counters: No callback registered for operation with ID %" PRIu64 ".\n", + "handle_result_counters: No callback registered for OP ID %" PRIu64 ".\n", GNUNET_ntohll (cres->op_id)); } h->reconnect_delay = GNUNET_TIME_UNIT_MILLISECONDS; @@ -233,7 +233,7 @@ handle_result_fragment (void *cls, const struct FragmentResult *fres) else { LOG (GNUNET_ERROR_TYPE_DEBUG, - "handle_result_fragment: No callback registered for operation with ID %" PRIu64 ".\n", + "handle_result_fragment: No callback registered for OP ID %" PRIu64 ".\n", GNUNET_ntohll (fres->op_id)); } h->reconnect_delay = GNUNET_TIME_UNIT_MILLISECONDS; @@ -282,7 +282,7 @@ handle_result_state (void *cls, const struct StateResult *sres) else { LOG (GNUNET_ERROR_TYPE_DEBUG, - "handle_result_state: No callback registered for operation with ID %" PRIu64 ".\n", + "handle_result_state: No callback registered for OP ID %" PRIu64 ".\n", GNUNET_ntohll (sres->op_id)); } h->reconnect_delay = GNUNET_TIME_UNIT_MILLISECONDS; @@ -362,6 +362,9 @@ do_connect (struct GNUNET_PSYCSTORE_Handle *h) static void reconnect (void *cls) { + struct GNUNET_PSYCSTORE_Handle *h = cls; + + h->reconnect_task = NULL; do_connect (cls); } diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c @@ -154,23 +154,30 @@ regex_iterator (void *cls, NULL, NULL); } block = REGEX_BLOCK_create (proof, - num_edges, edges, + num_edges, + edges, accepting, &size); - (void) - GNUNET_DHT_put (h->dht, key, - DHT_REPLICATION, - DHT_OPT, - GNUNET_BLOCK_TYPE_REGEX, - size, block, - GNUNET_TIME_relative_to_absolute (DHT_TTL), - NULL, NULL); + if (NULL == block) + return; + (void) GNUNET_DHT_put (h->dht, + key, + DHT_REPLICATION, + DHT_OPT, + GNUNET_BLOCK_TYPE_REGEX, + size, + block, + GNUNET_TIME_relative_to_absolute (DHT_TTL), + NULL, + NULL); GNUNET_STATISTICS_update (h->stats, "# regex blocks stored", - 1, GNUNET_NO); + 1, + GNUNET_NO); GNUNET_STATISTICS_update (h->stats, "# regex block bytes stored", - size, GNUNET_NO); + size, + GNUNET_NO); GNUNET_free (block); } diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c @@ -99,8 +99,7 @@ c2i (char c, int size) static void space (int n) { - int i; - for (i = 0; i < n; i++) + for (int i = 0; i < n; i++) fprintf (stderr, "| "); } @@ -114,8 +113,7 @@ space (int n) static void debugctx (struct RegexCombineCtx *ctx, int level) { - return; - unsigned int i; +#if DEBUG_REGEX if (NULL != ctx->s) { space (level - 1); @@ -123,7 +121,7 @@ debugctx (struct RegexCombineCtx *ctx, int level) } else fprintf (stderr, "ROOT (base %u)\n", ctx->size); - for (i = 0; i < ctx->size; i++) + for (unsigned int i = 0; i < ctx->size; i++) { if (NULL != ctx->children[i]) { @@ -132,6 +130,7 @@ debugctx (struct RegexCombineCtx *ctx, int level) } } fflush(stderr); +#endif } @@ -142,7 +141,8 @@ debugctx (struct RegexCombineCtx *ctx, int level) * @param regex Regex to add. */ static void -regex_add (struct RegexCombineCtx *ctx, const char *regex); +regex_add (struct RegexCombineCtx *ctx, + const char *regex); /** @@ -164,14 +164,18 @@ new_regex_ctx (unsigned int alphabet_size) return ctx; } + static void -move_children (struct RegexCombineCtx *dst, const struct RegexCombineCtx *src) +move_children (struct RegexCombineCtx *dst, + const struct RegexCombineCtx *src) { size_t array_size; array_size = sizeof(struct RegexCombineCtx *) * src->size; - memcpy (dst->children, src->children, array_size); - for (int i = 0; i < src->size; i++) + memcpy (dst->children, + src->children, + array_size); + for (unsigned int i = 0; i < src->size; i++) { src->children[i] = NULL; } @@ -402,6 +406,7 @@ regex_split (struct RegexCombineCtx *ctx, tmp = ctx->children; ctx->children = GNUNET_malloc (sizeof(*tmp) * ctx->size); regex_add_multiple (ctx, suffix, tmp); + GNUNET_free (suffix); GNUNET_free (tmp); return; } diff --git a/src/rest/Makefile.am b/src/rest/Makefile.am @@ -26,6 +26,8 @@ lib_LTLIBRARIES = \ libexec_PROGRAMS = \ gnunet-rest-server +EXTRA_DIST = \ + rest.conf gnunet_rest_server_SOURCES = \ gnunet-rest-server.c diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c @@ -759,7 +759,11 @@ handle_revocation_union_request (void *cls, { peer_entry = new_peer_entry (other_peer); } - GNUNET_assert (NULL == peer_entry->so); + if (NULL != peer_entry->so) + { + GNUNET_break_op (0); + return; + } peer_entry->so = GNUNET_SET_accept (request, GNUNET_SET_RESULT_ADDED, (struct GNUNET_SET_Option[]) {{ 0 }}, @@ -769,8 +773,7 @@ handle_revocation_union_request (void *cls, GNUNET_SET_commit (peer_entry->so, revocation_set)) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - _("SET service crashed, terminating revocation service\n")); + GNUNET_break (0); GNUNET_SCHEDULER_shutdown (); return; } diff --git a/src/rps/.gitignore b/src/rps/.gitignore @@ -1,3 +1,15 @@ gnunet-service-rps gnunet-rps gnunet-rps-profiler +test_rps_malicious_1 +test_rps_malicious_2 +test_rps_malicious_3 +test_rps_req_cancel +test_rps_seed_big +test_rps_seed_request +test_rps_single_req +test_service_rps_custommap +test_service_rps_sampler_elem +test_service_rps_view +test_rps_churn +test_service_rps_peers diff --git a/src/rps/Makefile.am b/src/rps/Makefile.am @@ -49,7 +49,6 @@ endif gnunet_service_rps_SOURCES = \ gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \ gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \ - gnunet-service-rps_peers.h gnunet-service-rps_peers.c \ gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \ gnunet-service-rps_view.h gnunet-service-rps_view.c \ rps-test_util.h rps-test_util.c \ @@ -73,7 +72,6 @@ if HAVE_TESTING check_PROGRAMS = \ test_service_rps_view \ test_service_rps_custommap \ - test_service_rps_peers \ test_service_rps_sampler_elem \ test_rps_malicious_1 \ test_rps_malicious_2 \ @@ -81,7 +79,8 @@ check_PROGRAMS = \ test_rps_seed_request \ test_rps_single_req \ test_rps_req_cancel \ - test_rps_seed_big + test_rps_seed_big \ + test_rps_churn endif ld_rps_test_lib = \ @@ -105,13 +104,6 @@ test_service_rps_view_SOURCES = \ test_service_rps_view.c test_service_rps_view_LDADD = $(top_builddir)/src/util/libgnunetutil.la -test_service_rps_peers_SOURCES = \ - gnunet-service-rps_peers.h gnunet-service-rps_peers.c \ - test_service_rps_peers.c -test_service_rps_peers_LDADD = \ - $(top_builddir)/src/util/libgnunetutil.la \ - $(top_builddir)/src/cadet/libgnunetcadet.la - test_service_rps_custommap_SOURCES = \ gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \ test_service_rps_custommap.c @@ -145,6 +137,9 @@ test_rps_req_cancel_LDADD = $(ld_rps_test_lib) test_rps_seed_big_SOURCES = $(rps_test_src) test_rps_seed_big_LDADD = $(ld_rps_test_lib) +test_rps_churn_SOURCES = $(rps_test_src) +test_rps_churn_LDADD = $(ld_rps_test_lib) + gnunet_rps_profiler_SOURCES = $(rps_test_src) gnunet_rps_profiler_LDADD = $(ld_rps_test_lib) diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c @@ -33,7 +33,6 @@ #include "rps-test_util.h" #include "gnunet-service-rps_sampler.h" #include "gnunet-service-rps_custommap.h" -#include "gnunet-service-rps_peers.h" #include "gnunet-service-rps_view.h" #include <math.h> @@ -66,6 +65,1728 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg; static struct GNUNET_PeerIdentity own_identity; + +/*********************************************************************** + * Old gnunet-service-rps_peers.c +***********************************************************************/ + +/** + * Set a peer flag of given peer context. + */ +#define set_peer_flag(peer_ctx, mask) ((peer_ctx->peer_flags) |= (mask)) + +/** + * Get peer flag of given peer context. + */ +#define check_peer_flag_set(peer_ctx, mask)\ + ((peer_ctx->peer_flags) & (mask) ? GNUNET_YES : GNUNET_NO) + +/** + * Unset flag of given peer context. + */ +#define unset_peer_flag(peer_ctx, mask) ((peer_ctx->peer_flags) &= ~(mask)) + +/** + * Set a channel flag of given channel context. + */ +#define set_channel_flag(channel_flags, mask) ((*channel_flags) |= (mask)) + +/** + * Get channel flag of given channel context. + */ +#define check_channel_flag_set(channel_flags, mask)\ + ((*channel_flags) & (mask) ? GNUNET_YES : GNUNET_NO) + +/** + * Unset flag of given channel context. + */ +#define unset_channel_flag(channel_flags, mask) ((*channel_flags) &= ~(mask)) + + + +/** + * Pending operation on peer consisting of callback and closure + * + * When an operation cannot be executed right now this struct is used to store + * the callback and closure for later execution. + */ +struct PeerPendingOp +{ + /** + * Callback + */ + PeerOp op; + + /** + * Closure + */ + void *op_cls; +}; + +/** + * List containing all messages that are yet to be send + * + * This is used to keep track of all messages that have not been sent yet. When + * a peer is to be removed the pending messages can be removed properly. + */ +struct PendingMessage +{ + /** + * DLL next, prev + */ + struct PendingMessage *next; + struct PendingMessage *prev; + + /** + * The envelope to the corresponding message + */ + struct GNUNET_MQ_Envelope *ev; + + /** + * The corresponding context + */ + struct PeerContext *peer_ctx; + + /** + * The message type + */ + const char *type; +}; + +/** + * Struct used to keep track of other peer's status + * + * This is stored in a multipeermap. + * It contains information such as cadet channels, a message queue for sending, + * status about the channels, the pending operations on this peer and some flags + * about the status of the peer itself. (live, valid, ...) + */ +struct PeerContext +{ + /** + * Message queue open to client + */ + struct GNUNET_MQ_Handle *mq; + + /** + * Channel open to client. + */ + struct GNUNET_CADET_Channel *send_channel; + + /** + * Flags to the sending channel + */ + uint32_t *send_channel_flags; + + /** + * Channel open from client. + */ + struct GNUNET_CADET_Channel *recv_channel; // unneeded? + + /** + * Flags to the receiving channel + */ + uint32_t *recv_channel_flags; + + /** + * Array of pending operations on this peer. + */ + struct PeerPendingOp *pending_ops; + + /** + * Handle to the callback given to cadet_ntfy_tmt_rdy() + * + * To be canceled on shutdown. + */ + struct PendingMessage *liveliness_check_pending; + + /** + * Number of pending operations. + */ + unsigned int num_pending_ops; + + /** + * Identity of the peer + */ + struct GNUNET_PeerIdentity peer_id; + + /** + * Flags indicating status of peer + */ + uint32_t peer_flags; + + /** + * Last time we received something from that peer. + */ + struct GNUNET_TIME_Absolute last_message_recv; + + /** + * Last time we received a keepalive message. + */ + struct GNUNET_TIME_Absolute last_keepalive; + + /** + * DLL with all messages that are yet to be sent + */ + struct PendingMessage *pending_messages_head; + struct PendingMessage *pending_messages_tail; + + /** + * This is pobably followed by 'statistical' data (when we first saw + * him, how did we get his ID, how many pushes (in a timeinterval), + * ...) + */ +}; + +/** + * @brief Closure to #valid_peer_iterator + */ +struct PeersIteratorCls +{ + /** + * Iterator function + */ + PeersIterator iterator; + + /** + * Closure to iterator + */ + void *cls; +}; + +/** + * @brief Hashmap of valid peers. + */ +static struct GNUNET_CONTAINER_MultiPeerMap *valid_peers; + +/** + * @brief Maximum number of valid peers to keep. + * TODO read from config + */ +static uint32_t num_valid_peers_max = UINT32_MAX; + +/** + * @brief Filename of the file that stores the valid peers persistently. + */ +static char *filename_valid_peers; + +/** + * Set of all peers to keep track of them. + */ +static struct GNUNET_CONTAINER_MultiPeerMap *peer_map; + +/** + * Cadet handle. + */ +static struct GNUNET_CADET_Handle *cadet_handle; + + + +/** + * @brief Get the #PeerContext associated with a peer + * + * @param peer the peer id + * + * @return the #PeerContext + */ +static struct PeerContext * +get_peer_ctx (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *ctx; + int ret; + + ret = GNUNET_CONTAINER_multipeermap_contains (peer_map, peer); + GNUNET_assert (GNUNET_YES == ret); + ctx = GNUNET_CONTAINER_multipeermap_get (peer_map, peer); + GNUNET_assert (NULL != ctx); + return ctx; +} + +int +Peers_check_peer_known (const struct GNUNET_PeerIdentity *peer); + +/** + * @brief Create a new #PeerContext and insert it into the peer map + * + * @param peer the peer to create the #PeerContext for + * + * @return the #PeerContext + */ +static struct PeerContext * +create_peer_ctx (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *ctx; + int ret; + + GNUNET_assert (GNUNET_NO == Peers_check_peer_known (peer)); + + ctx = GNUNET_new (struct PeerContext); + ctx->peer_id = *peer; + ctx->send_channel_flags = GNUNET_new (uint32_t); + ctx->recv_channel_flags = GNUNET_new (uint32_t); + ret = GNUNET_CONTAINER_multipeermap_put (peer_map, peer, ctx, + GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); + GNUNET_assert (GNUNET_OK == ret); + return ctx; +} + + +/** + * @brief Create or get a #PeerContext + * + * @param peer the peer to get the associated context to + * + * @return the context + */ +static struct PeerContext * +create_or_get_peer_ctx (const struct GNUNET_PeerIdentity *peer) +{ + if (GNUNET_NO == Peers_check_peer_known (peer)) + { + return create_peer_ctx (peer); + } + return get_peer_ctx (peer); +} + +void +Peers_unset_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags); + +void +Peers_set_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags); + +/** + * @brief Check whether we have a connection to this @a peer + * + * Also sets the #Peers_ONLINE flag accordingly + * + * @param peer the peer in question + * + * @return #GNUNET_YES if we are connected + * #GNUNET_NO otherwise + */ +int +Peers_check_connected (const struct GNUNET_PeerIdentity *peer) +{ + const struct PeerContext *peer_ctx; + + /* If we don't know about this peer we don't know whether it's online */ + if (GNUNET_NO == Peers_check_peer_known (peer)) + { + return GNUNET_NO; + } + /* Get the context */ + peer_ctx = get_peer_ctx (peer); + /* If we have no channel to this peer we don't know whether it's online */ + if ( (NULL == peer_ctx->send_channel) && + (NULL == peer_ctx->recv_channel) ) + { + Peers_unset_peer_flag (peer, Peers_ONLINE); + return GNUNET_NO; + } + /* Otherwise (if we have a channel, we know that it's online */ + Peers_set_peer_flag (peer, Peers_ONLINE); + return GNUNET_YES; +} + + +/** + * @brief The closure to #get_rand_peer_iterator. + */ +struct GetRandPeerIteratorCls +{ + /** + * @brief The index of the peer to return. + * Will be decreased until 0. + * Then current peer is returned. + */ + uint32_t index; + + /** + * @brief Pointer to peer to return. + */ + const struct GNUNET_PeerIdentity *peer; +}; + + +/** + * @brief Iterator function for #get_random_peer_from_peermap. + * + * Implements #GNUNET_CONTAINER_PeerMapIterator. + * Decreases the index until the index is null. + * Then returns the current peer. + * + * @param cls the #GetRandPeerIteratorCls containing index and peer + * @param peer current peer + * @param value unused + * + * @return #GNUNET_YES if we should continue to + * iterate, + * #GNUNET_NO if not. + */ +static int +get_rand_peer_iterator (void *cls, + const struct GNUNET_PeerIdentity *peer, + void *value) +{ + struct GetRandPeerIteratorCls *iterator_cls = cls; + if (0 >= iterator_cls->index) + { + iterator_cls->peer = peer; + return GNUNET_NO; + } + iterator_cls->index--; + return GNUNET_YES; +} + + +/** + * @brief Get a random peer from @a peer_map + * + * @param peer_map the peer_map to get the peer from + * + * @return a random peer + */ +static const struct GNUNET_PeerIdentity * +get_random_peer_from_peermap (const struct + GNUNET_CONTAINER_MultiPeerMap *peer_map) +{ + struct GetRandPeerIteratorCls *iterator_cls; + const struct GNUNET_PeerIdentity *ret; + + iterator_cls = GNUNET_new (struct GetRandPeerIteratorCls); + iterator_cls->index = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, + GNUNET_CONTAINER_multipeermap_size (peer_map)); + (void) GNUNET_CONTAINER_multipeermap_iterate (valid_peers, + get_rand_peer_iterator, + iterator_cls); + ret = iterator_cls->peer; + GNUNET_free (iterator_cls); + return ret; +} + + +/** + * @brief Add a given @a peer to valid peers. + * + * If valid peers are already #num_valid_peers_max, delete a peer previously. + * + * @param peer the peer that is added to the valid peers. + * + * @return #GNUNET_YES if no other peer had to be removed + * #GNUNET_NO otherwise + */ +static int +add_valid_peer (const struct GNUNET_PeerIdentity *peer) +{ + const struct GNUNET_PeerIdentity *rand_peer; + int ret; + + ret = GNUNET_YES; + while (GNUNET_CONTAINER_multipeermap_size (valid_peers) >= num_valid_peers_max) + { + rand_peer = get_random_peer_from_peermap (valid_peers); + GNUNET_CONTAINER_multipeermap_remove_all (valid_peers, rand_peer); + ret = GNUNET_NO; + } + (void) GNUNET_CONTAINER_multipeermap_put (valid_peers, peer, NULL, + GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); + return ret; +} + + +/** + * @brief Set the peer flag to living and + * call the pending operations on this peer. + * + * Also adds peer to #valid_peers. + * + * @param peer_ctx the #PeerContext of the peer to set live + */ +static void +set_peer_live (struct PeerContext *peer_ctx) +{ + struct GNUNET_PeerIdentity *peer; + unsigned int i; + + peer = &peer_ctx->peer_id; + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Peer %s is live and valid, calling %i pending operations on it\n", + GNUNET_i2s (peer), + peer_ctx->num_pending_ops); + + if (NULL != peer_ctx->liveliness_check_pending) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Removing pending liveliness check for peer %s\n", + GNUNET_i2s (&peer_ctx->peer_id)); + // TODO wait until cadet sets mq->cancel_impl + //GNUNET_MQ_send_cancel (peer_ctx->liveliness_check_pending->ev); + GNUNET_free (peer_ctx->liveliness_check_pending); + peer_ctx->liveliness_check_pending = NULL; + } + + (void) add_valid_peer (peer); + set_peer_flag (peer_ctx, Peers_ONLINE); + + /* Call pending operations */ + for (i = 0; i < peer_ctx->num_pending_ops; i++) + { + peer_ctx->pending_ops[i].op (peer_ctx->pending_ops[i].op_cls, peer); + } + GNUNET_array_grow (peer_ctx->pending_ops, peer_ctx->num_pending_ops, 0); +} + +static void +cleanup_destroyed_channel (void *cls, + const struct GNUNET_CADET_Channel *channel); + +/* Declaration of handlers */ +static void +handle_peer_check (void *cls, + const struct GNUNET_MessageHeader *msg); + +static void +handle_peer_push (void *cls, + const struct GNUNET_MessageHeader *msg); + +static void +handle_peer_pull_request (void *cls, + const struct GNUNET_MessageHeader *msg); + +static int +check_peer_pull_reply (void *cls, + const struct GNUNET_RPS_P2P_PullReplyMessage *msg); + +static void +handle_peer_pull_reply (void *cls, + const struct GNUNET_RPS_P2P_PullReplyMessage *msg); + +/* End declaration of handlers */ + + +/** + * @brief Get the channel of a peer. If not existing, create. + * + * @param peer the peer id + * @return the #GNUNET_CADET_Channel used to send data to @a peer + */ +struct GNUNET_CADET_Channel * +get_channel (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *peer_ctx; + struct GNUNET_HashCode port; + /* There exists a copy-paste-clone in run() */ + struct GNUNET_MQ_MessageHandler cadet_handlers[] = { + GNUNET_MQ_hd_fixed_size (peer_check, + GNUNET_MESSAGE_TYPE_RPS_PP_CHECK_LIVE, + struct GNUNET_MessageHeader, + NULL), + GNUNET_MQ_hd_fixed_size (peer_push, + GNUNET_MESSAGE_TYPE_RPS_PP_PUSH, + struct GNUNET_MessageHeader, + NULL), + GNUNET_MQ_hd_fixed_size (peer_pull_request, + GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST, + struct GNUNET_MessageHeader, + NULL), + GNUNET_MQ_hd_var_size (peer_pull_reply, + GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY, + struct GNUNET_RPS_P2P_PullReplyMessage, + NULL), + GNUNET_MQ_handler_end () + }; + + + peer_ctx = get_peer_ctx (peer); + if (NULL == peer_ctx->send_channel) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Trying to establish channel to peer %s\n", + GNUNET_i2s (peer)); + GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_RPS, + strlen (GNUNET_APPLICATION_PORT_RPS), + &port); + peer_ctx->send_channel = + GNUNET_CADET_channel_create (cadet_handle, + (struct GNUNET_PeerIdentity *) peer, /* context */ + peer, + &port, + GNUNET_CADET_OPTION_RELIABLE, + NULL, /* WindowSize handler */ + cleanup_destroyed_channel, /* Disconnect handler */ + cadet_handlers); + } + GNUNET_assert (NULL != peer_ctx->send_channel); + return peer_ctx->send_channel; +} + + +/** + * Get the message queue (#GNUNET_MQ_Handle) of a specific peer. + * + * If we already have a message queue open to this client, + * simply return it, otherways create one. + * + * @param peer the peer to get the mq to + * @return the #GNUNET_MQ_Handle + */ +static struct GNUNET_MQ_Handle * +get_mq (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *peer_ctx; + + peer_ctx = get_peer_ctx (peer); + + if (NULL == peer_ctx->mq) + { + (void) get_channel (peer); + peer_ctx->mq = GNUNET_CADET_get_mq (peer_ctx->send_channel); + } + return peer_ctx->mq; +} + + +/** + * @brief This is called in response to the first message we sent as a + * liveliness check. + * + * @param cls #PeerContext of peer with pending liveliness check + */ +static void +mq_liveliness_check_successful (void *cls) +{ + struct PeerContext *peer_ctx = cls; + + if (NULL != peer_ctx->liveliness_check_pending) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Liveliness check for peer %s was successfull\n", + GNUNET_i2s (&peer_ctx->peer_id)); + GNUNET_free (peer_ctx->liveliness_check_pending); + peer_ctx->liveliness_check_pending = NULL; + set_peer_live (peer_ctx); + } +} + +/** + * Issue a check whether peer is live + * + * @param peer_ctx the context of the peer + */ +static void +check_peer_live (struct PeerContext *peer_ctx) +{ + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Get informed about peer %s getting live\n", + GNUNET_i2s (&peer_ctx->peer_id)); + + struct GNUNET_MQ_Handle *mq; + struct GNUNET_MQ_Envelope *ev; + + ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_RPS_PP_CHECK_LIVE); + peer_ctx->liveliness_check_pending = GNUNET_new (struct PendingMessage); + peer_ctx->liveliness_check_pending->ev = ev; + peer_ctx->liveliness_check_pending->peer_ctx = peer_ctx; + peer_ctx->liveliness_check_pending->type = "Check liveliness"; + mq = get_mq (&peer_ctx->peer_id); + GNUNET_MQ_notify_sent (ev, + mq_liveliness_check_successful, + peer_ctx); + GNUNET_MQ_send (mq, ev); +} + +/** + * @brief Add an envelope to a message passed to mq to list of pending messages + * + * @param peer peer the message was sent to + * @param ev envelope to the message + * @param type type of the message to be sent + * @return pointer to pending message + */ +static struct PendingMessage * +insert_pending_message (const struct GNUNET_PeerIdentity *peer, + struct GNUNET_MQ_Envelope *ev, + const char *type) +{ + struct PendingMessage *pending_msg; + struct PeerContext *peer_ctx; + + peer_ctx = get_peer_ctx (peer); + pending_msg = GNUNET_new (struct PendingMessage); + pending_msg->ev = ev; + pending_msg->peer_ctx = peer_ctx; + pending_msg->type = type; + GNUNET_CONTAINER_DLL_insert (peer_ctx->pending_messages_head, + peer_ctx->pending_messages_tail, + pending_msg); + return pending_msg; +} + + +/** + * @brief Remove a pending message from the respective DLL + * + * @param pending_msg the pending message to remove + * @param cancel cancel the pending message, too + */ +static void +remove_pending_message (struct PendingMessage *pending_msg, int cancel) +{ + struct PeerContext *peer_ctx; + + peer_ctx = pending_msg->peer_ctx; + GNUNET_assert (NULL != peer_ctx); + GNUNET_CONTAINER_DLL_remove (peer_ctx->pending_messages_head, + peer_ctx->pending_messages_tail, + pending_msg); + // TODO wait for the cadet implementation of message cancellation + //if (GNUNET_YES == cancel) + //{ + // GNUNET_MQ_send_cancel (pending_msg->ev); + //} + GNUNET_free (pending_msg); +} + + +/** + * @brief Check whether function of type #PeerOp was already scheduled + * + * The array with pending operations will probably never grow really big, so + * iterating over it should be ok. + * + * @param peer the peer to check + * @param peer_op the operation (#PeerOp) on the peer + * + * @return #GNUNET_YES if this operation is scheduled on that peer + * #GNUNET_NO otherwise + */ +static int +check_operation_scheduled (const struct GNUNET_PeerIdentity *peer, + const PeerOp peer_op) +{ + const struct PeerContext *peer_ctx; + unsigned int i; + + peer_ctx = get_peer_ctx (peer); + for (i = 0; i < peer_ctx->num_pending_ops; i++) + if (peer_op == peer_ctx->pending_ops[i].op) + return GNUNET_YES; + return GNUNET_NO; +} + +int +Peers_remove_peer (const struct GNUNET_PeerIdentity *peer); + +/** + * Iterator over hash map entries. Deletes all contexts of peers. + * + * @param cls closure + * @param key current public key + * @param value value in the hash map + * @return #GNUNET_YES if we should continue to iterate, + * #GNUNET_NO if not. + */ +static int +peermap_clear_iterator (void *cls, + const struct GNUNET_PeerIdentity *key, + void *value) +{ + Peers_remove_peer (key); + return GNUNET_YES; +} + + +/** + * @brief This is called once a message is sent. + * + * Removes the pending message + * + * @param cls type of the message that was sent + */ +static void +mq_notify_sent_cb (void *cls) +{ + struct PendingMessage *pending_msg = (struct PendingMessage *) cls; + LOG (GNUNET_ERROR_TYPE_DEBUG, + "%s was sent.\n", + pending_msg->type); + /* Do not cancle message */ + remove_pending_message (pending_msg, GNUNET_NO); +} + + +/** + * @brief Iterator function for #store_valid_peers. + * + * Implements #GNUNET_CONTAINER_PeerMapIterator. + * Writes single peer to disk. + * + * @param cls the file handle to write to. + * @param peer current peer + * @param value unused + * + * @return #GNUNET_YES if we should continue to + * iterate, + * #GNUNET_NO if not. + */ +static int +store_peer_presistently_iterator (void *cls, + const struct GNUNET_PeerIdentity *peer, + void *value) +{ + const struct GNUNET_DISK_FileHandle *fh = cls; + char peer_string[128]; + int size; + ssize_t ret; + + if (NULL == peer) + { + return GNUNET_YES; + } + size = GNUNET_snprintf (peer_string, + sizeof (peer_string), + "%s\n", + GNUNET_i2s_full (peer)); + GNUNET_assert (53 == size); + ret = GNUNET_DISK_file_write (fh, + peer_string, + size); + GNUNET_assert (size == ret); + return GNUNET_YES; +} + + +/** + * @brief Store the peers currently in #valid_peers to disk. + */ +static void +store_valid_peers () +{ + struct GNUNET_DISK_FileHandle *fh; + uint32_t number_written_peers; + int ret; + + if (0 == strncmp ("DISABLE", filename_valid_peers, 7)) + { + return; + } + + ret = GNUNET_DISK_directory_create_for_file (filename_valid_peers); + if (GNUNET_SYSERR == ret) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + "Not able to create directory for file `%s'\n", + filename_valid_peers); + GNUNET_break (0); + } + else if (GNUNET_NO == ret) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + "Directory for file `%s' exists but is not writable for us\n", + filename_valid_peers); + GNUNET_break (0); + } + fh = GNUNET_DISK_file_open (filename_valid_peers, + GNUNET_DISK_OPEN_WRITE | + GNUNET_DISK_OPEN_CREATE, + GNUNET_DISK_PERM_USER_READ | + GNUNET_DISK_PERM_USER_WRITE); + if (NULL == fh) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + "Not able to write valid peers to file `%s'\n", + filename_valid_peers); + return; + } + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Writing %u valid peers to disk\n", + GNUNET_CONTAINER_multipeermap_size (valid_peers)); + number_written_peers = + GNUNET_CONTAINER_multipeermap_iterate (valid_peers, + store_peer_presistently_iterator, + fh); + GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); + GNUNET_assert (number_written_peers == + GNUNET_CONTAINER_multipeermap_size (valid_peers)); +} + + +/** + * @brief Convert string representation of peer id to peer id. + * + * Counterpart to #GNUNET_i2s_full. + * + * @param string_repr The string representation of the peer id + * + * @return The peer id + */ +static const struct GNUNET_PeerIdentity * +s2i_full (const char *string_repr) +{ + struct GNUNET_PeerIdentity *peer; + size_t len; + int ret; + + peer = GNUNET_new (struct GNUNET_PeerIdentity); + len = strlen (string_repr); + if (52 > len) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + "Not able to convert string representation of PeerID to PeerID\n" + "Sting representation: %s (len %lu) - too short\n", + string_repr, + len); + GNUNET_break (0); + } + else if (52 < len) + { + len = 52; + } + ret = GNUNET_CRYPTO_eddsa_public_key_from_string (string_repr, + len, + &peer->public_key); + if (GNUNET_OK != ret) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + "Not able to convert string representation of PeerID to PeerID\n" + "Sting representation: %s\n", + string_repr); + GNUNET_break (0); + } + return peer; +} + + +/** + * @brief Restore the peers on disk to #valid_peers. + */ +static void +restore_valid_peers () +{ + off_t file_size; + uint32_t num_peers; + struct GNUNET_DISK_FileHandle *fh; + char *buf; + ssize_t size_read; + char *iter_buf; + char *str_repr; + const struct GNUNET_PeerIdentity *peer; + + if (0 == strncmp ("DISABLE", filename_valid_peers, 7)) + { + return; + } + + if (GNUNET_OK != GNUNET_DISK_file_test (filename_valid_peers)) + { + return; + } + fh = GNUNET_DISK_file_open (filename_valid_peers, + GNUNET_DISK_OPEN_READ, + GNUNET_DISK_PERM_NONE); + GNUNET_assert (NULL != fh); + GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_handle_size (fh, &file_size)); + num_peers = file_size / 53; + buf = GNUNET_malloc (file_size); + size_read = GNUNET_DISK_file_read (fh, buf, file_size); + GNUNET_assert (size_read == file_size); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Restoring %" PRIu32 " peers from file `%s'\n", + num_peers, + filename_valid_peers); + for (iter_buf = buf; iter_buf < buf + file_size - 1; iter_buf += 53) + { + str_repr = GNUNET_strndup (iter_buf, 53); + peer = s2i_full (str_repr); + GNUNET_free (str_repr); + add_valid_peer (peer); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Restored valid peer %s from disk\n", + GNUNET_i2s_full (peer)); + } + iter_buf = NULL; + GNUNET_free (buf); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "num_peers: %" PRIu32 ", _size (valid_peers): %u\n", + num_peers, + GNUNET_CONTAINER_multipeermap_size (valid_peers)); + if (num_peers != GNUNET_CONTAINER_multipeermap_size (valid_peers)) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + "Number of restored peers does not match file size. Have probably duplicates.\n"); + } + GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Restored %u valid peers from disk\n", + GNUNET_CONTAINER_multipeermap_size (valid_peers)); +} + + +/** + * @brief Initialise storage of peers + * + * @param fn_valid_peers filename of the file used to store valid peer ids + * @param cadet_h cadet handle + * @param disconnect_handler Disconnect handler + * @param own_id own peer identity + */ +void +Peers_initialise (char* fn_valid_peers, + struct GNUNET_CADET_Handle *cadet_h, + GNUNET_CADET_DisconnectEventHandler disconnect_handler, + const struct GNUNET_PeerIdentity *own_id) +{ + filename_valid_peers = GNUNET_strdup (fn_valid_peers); + cadet_handle = cadet_h; + own_identity = *own_id; + peer_map = GNUNET_CONTAINER_multipeermap_create (4, GNUNET_NO); + valid_peers = GNUNET_CONTAINER_multipeermap_create (4, GNUNET_NO); + restore_valid_peers (); +} + + +/** + * @brief Delete storage of peers that was created with #Peers_initialise () + */ +void +Peers_terminate () +{ + if (GNUNET_SYSERR == + GNUNET_CONTAINER_multipeermap_iterate (peer_map, + peermap_clear_iterator, + NULL)) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + "Iteration destroying peers was aborted.\n"); + } + GNUNET_CONTAINER_multipeermap_destroy (peer_map); + store_valid_peers (); + GNUNET_free (filename_valid_peers); + GNUNET_CONTAINER_multipeermap_destroy (valid_peers); +} + + +/** + * Iterator over #valid_peers hash map entries. + * + * @param cls closure - unused + * @param peer current peer id + * @param value value in the hash map - unused + * @return #GNUNET_YES if we should continue to + * iterate, + * #GNUNET_NO if not. + */ +static int +valid_peer_iterator (void *cls, + const struct GNUNET_PeerIdentity *peer, + void *value) +{ + struct PeersIteratorCls *it_cls = cls; + + return it_cls->iterator (it_cls->cls, + peer); +} + + +/** + * @brief Get all currently known, valid peer ids. + * + * @param it function to call on each peer id + * @param it_cls extra argument to @a it + * @return the number of key value pairs processed, + * #GNUNET_SYSERR if it aborted iteration + */ +int +Peers_get_valid_peers (PeersIterator iterator, + void *it_cls) +{ + struct PeersIteratorCls *cls; + int ret; + + cls = GNUNET_new (struct PeersIteratorCls); + cls->iterator = iterator; + cls->cls = it_cls; + ret = GNUNET_CONTAINER_multipeermap_iterate (valid_peers, + valid_peer_iterator, + cls); + GNUNET_free (cls); + return ret; +} + + +/** + * @brief Add peer to known peers. + * + * This function is called on new peer_ids from 'external' sources + * (client seed, cadet get_peers(), ...) + * + * @param peer the new #GNUNET_PeerIdentity + * + * @return #GNUNET_YES if peer was inserted + * #GNUNET_NO otherwise (if peer was already known or + * peer was #own_identity) + */ +int +Peers_insert_peer (const struct GNUNET_PeerIdentity *peer) +{ + if ( (GNUNET_YES == Peers_check_peer_known (peer)) || + (0 == GNUNET_CRYPTO_cmp_peer_identity (peer, &own_identity)) ) + { + return GNUNET_NO; /* We already know this peer - nothing to do */ + } + (void) create_peer_ctx (peer); + return GNUNET_YES; +} + +int +Peers_check_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags); + +/** + * @brief Try connecting to a peer to see whether it is online + * + * If not known yet, insert into known peers + * + * @param peer the peer whose liveliness is to be checked + * @return #GNUNET_YES if peer had to be inserted + * #GNUNET_NO otherwise (if peer was already known or + * peer was #own_identity) + */ +int +Peers_issue_peer_liveliness_check (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *peer_ctx; + int ret; + + if (0 == GNUNET_CRYPTO_cmp_peer_identity (peer, &own_identity)) + { + return GNUNET_NO; + } + ret = Peers_insert_peer (peer); + peer_ctx = get_peer_ctx (peer); + if (GNUNET_NO == Peers_check_peer_flag (peer, Peers_ONLINE)) + { + check_peer_live (peer_ctx); + } + return ret; +} + + +/** + * @brief Check if peer is removable. + * + * Check if + * - a recv channel exists + * - there are pending messages + * - there is no pending pull reply + * + * @param peer the peer in question + * @return #GNUNET_YES if peer is removable + * #GNUNET_NO if peer is NOT removable + * #GNUNET_SYSERR if peer is not known + */ +int +Peers_check_removable (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *peer_ctx; + + if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (peer_map, peer)) + { + return GNUNET_SYSERR; + } + + peer_ctx = get_peer_ctx (peer); + if ( (NULL != peer_ctx->recv_channel) || + (NULL != peer_ctx->pending_messages_head) || + (GNUNET_NO == check_peer_flag_set (peer_ctx, Peers_PULL_REPLY_PENDING)) ) + { + return GNUNET_NO; + } + return GNUNET_YES; +} + +uint32_t * +Peers_get_channel_flag (const struct GNUNET_PeerIdentity *peer, + enum Peers_ChannelRole role); + +int +Peers_check_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags); + +/** + * @brief Remove peer + * + * @param peer the peer to clean + * @return #GNUNET_YES if peer was removed + * #GNUNET_NO otherwise + */ +int +Peers_remove_peer (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *peer_ctx; + uint32_t *channel_flag; + + if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (peer_map, peer)) + { + return GNUNET_NO; + } + + peer_ctx = get_peer_ctx (peer); + set_peer_flag (peer_ctx, Peers_TO_DESTROY); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Going to remove peer %s\n", + GNUNET_i2s (&peer_ctx->peer_id)); + Peers_unset_peer_flag (peer, Peers_ONLINE); + + GNUNET_array_grow (peer_ctx->pending_ops, peer_ctx->num_pending_ops, 0); + while (NULL != peer_ctx->pending_messages_head) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Removing unsent %s\n", + peer_ctx->pending_messages_head->type); + /* Cancle pending message, too */ + remove_pending_message (peer_ctx->pending_messages_head, GNUNET_YES); + } + /* If we are still waiting for notification whether this peer is live + * cancel the according task */ + if (NULL != peer_ctx->liveliness_check_pending) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Removing pending liveliness check for peer %s\n", + GNUNET_i2s (&peer_ctx->peer_id)); + // TODO wait until cadet sets mq->cancel_impl + //GNUNET_MQ_send_cancel (peer_ctx->liveliness_check_pending->ev); + GNUNET_free (peer_ctx->liveliness_check_pending); + peer_ctx->liveliness_check_pending = NULL; + } + channel_flag = Peers_get_channel_flag (peer, Peers_CHANNEL_ROLE_SENDING); + if (NULL != peer_ctx->send_channel && + GNUNET_YES != Peers_check_channel_flag (channel_flag, Peers_CHANNEL_DESTROING)) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Destroying send channel\n"); + GNUNET_CADET_channel_destroy (peer_ctx->send_channel); + peer_ctx->send_channel = NULL; + } + channel_flag = Peers_get_channel_flag (peer, Peers_CHANNEL_ROLE_RECEIVING); + if (NULL != peer_ctx->recv_channel && + GNUNET_YES != Peers_check_channel_flag (channel_flag, Peers_CHANNEL_DESTROING)) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Destroying recv channel\n"); + GNUNET_CADET_channel_destroy (peer_ctx->recv_channel); + peer_ctx->recv_channel = NULL; + } + + GNUNET_free (peer_ctx->send_channel_flags); + GNUNET_free (peer_ctx->recv_channel_flags); + + if (GNUNET_YES != GNUNET_CONTAINER_multipeermap_remove_all (peer_map, &peer_ctx->peer_id)) + { + LOG (GNUNET_ERROR_TYPE_WARNING, "removing peer from peer_map failed\n"); + } + GNUNET_free (peer_ctx); + return GNUNET_YES; +} + + +/** + * @brief set flags on a given peer. + * + * @param peer the peer to set flags on + * @param flags the flags + */ +void +Peers_set_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags) +{ + struct PeerContext *peer_ctx; + + peer_ctx = get_peer_ctx (peer); + set_peer_flag (peer_ctx, flags); +} + + +/** + * @brief unset flags on a given peer. + * + * @param peer the peer to unset flags on + * @param flags the flags + */ +void +Peers_unset_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags) +{ + struct PeerContext *peer_ctx; + + peer_ctx = get_peer_ctx (peer); + unset_peer_flag (peer_ctx, flags); +} + + +/** + * @brief Check whether flags on a peer are set. + * + * @param peer the peer to check the flag of + * @param flags the flags to check + * + * @return #GNUNET_SYSERR if peer is not known + * #GNUNET_YES if all given flags are set + * #GNUNET_NO otherwise + */ +int +Peers_check_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags) +{ + struct PeerContext *peer_ctx; + + if (GNUNET_NO == Peers_check_peer_known (peer)) + { + return GNUNET_SYSERR; + } + peer_ctx = get_peer_ctx (peer); + return check_peer_flag_set (peer_ctx, flags); +} + + +/** + * @brief set flags on a given channel. + * + * @param channel the channel to set flags on + * @param flags the flags + */ +void +Peers_set_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags) +{ + set_channel_flag (channel_flags, flags); +} + + +/** + * @brief unset flags on a given channel. + * + * @param channel the channel to unset flags on + * @param flags the flags + */ +void +Peers_unset_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags) +{ + unset_channel_flag (channel_flags, flags); +} + + +/** + * @brief Check whether flags on a channel are set. + * + * @param channel the channel to check the flag of + * @param flags the flags to check + * + * @return #GNUNET_YES if all given flags are set + * #GNUNET_NO otherwise + */ +int +Peers_check_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags) +{ + return check_channel_flag_set (channel_flags, flags); +} + +/** + * @brief Get the flags for the channel in @a role for @a peer. + * + * @param peer Peer to get the channel flags for. + * @param role Role of channel to get flags for + * + * @return The flags. + */ +uint32_t * +Peers_get_channel_flag (const struct GNUNET_PeerIdentity *peer, + enum Peers_ChannelRole role) +{ + const struct PeerContext *peer_ctx; + + peer_ctx = get_peer_ctx (peer); + if (Peers_CHANNEL_ROLE_SENDING == role) + { + return peer_ctx->send_channel_flags; + } + else if (Peers_CHANNEL_ROLE_RECEIVING == role) + { + return peer_ctx->recv_channel_flags; + } + else + { + GNUNET_assert (0); + } +} + +/** + * @brief Check whether we have information about the given peer. + * + * FIXME probably deprecated. Make this the new _online. + * + * @param peer peer in question + * + * @return #GNUNET_YES if peer is known + * #GNUNET_NO if peer is not knwon + */ +int +Peers_check_peer_known (const struct GNUNET_PeerIdentity *peer) +{ + return GNUNET_CONTAINER_multipeermap_contains (peer_map, peer); +} + + +/** + * @brief Check whether @a peer is actually a peer. + * + * A valid peer is a peer that we know exists eg. we were connected to once. + * + * @param peer peer in question + * + * @return #GNUNET_YES if peer is valid + * #GNUNET_NO if peer is not valid + */ +int +Peers_check_peer_valid (const struct GNUNET_PeerIdentity *peer) +{ + return GNUNET_CONTAINER_multipeermap_contains (valid_peers, peer); +} + + +/** + * @brief Indicate that we want to send to the other peer + * + * This establishes a sending channel + * + * @param peer the peer to establish channel to + */ +void +Peers_indicate_sending_intention (const struct GNUNET_PeerIdentity *peer) +{ + GNUNET_assert (GNUNET_YES == Peers_check_peer_known (peer)); + (void) get_channel (peer); +} + + +/** + * @brief Check whether other peer has the intention to send/opened channel + * towars us + * + * @param peer the peer in question + * + * @return #GNUNET_YES if peer has the intention to send + * #GNUNET_NO otherwise + */ +int +Peers_check_peer_send_intention (const struct GNUNET_PeerIdentity *peer) +{ + const struct PeerContext *peer_ctx; + + peer_ctx = get_peer_ctx (peer); + if (NULL != peer_ctx->recv_channel) + { + return GNUNET_YES; + } + return GNUNET_NO; +} + + +/** + * Handle the channel a peer opens to us. + * + * @param cls The closure + * @param channel The channel the peer wants to establish + * @param initiator The peer's peer ID + * + * @return initial channel context for the channel + * (can be NULL -- that's not an error) + */ +void * +Peers_handle_inbound_channel (void *cls, + struct GNUNET_CADET_Channel *channel, + const struct GNUNET_PeerIdentity *initiator) +{ + struct PeerContext *peer_ctx; + + LOG (GNUNET_ERROR_TYPE_DEBUG, + "New channel was established to us (Peer %s).\n", + GNUNET_i2s (initiator)); + GNUNET_assert (NULL != channel); /* according to cadet API */ + /* Make sure we 'know' about this peer */ + peer_ctx = create_or_get_peer_ctx (initiator); + set_peer_live (peer_ctx); + /* We only accept one incoming channel per peer */ + if (GNUNET_YES == Peers_check_peer_send_intention (initiator)) + { + set_channel_flag (peer_ctx->recv_channel_flags, + Peers_CHANNEL_ESTABLISHED_TWICE); + GNUNET_CADET_channel_destroy (channel); + /* return the channel context */ + return &peer_ctx->peer_id; + } + peer_ctx->recv_channel = channel; + return &peer_ctx->peer_id; +} + + +/** + * @brief Check whether a sending channel towards the given peer exists + * + * @param peer the peer to check for + * + * @return #GNUNET_YES if a sending channel towards that peer exists + * #GNUNET_NO otherwise + */ +int +Peers_check_sending_channel_exists (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *peer_ctx; + + if (GNUNET_NO == Peers_check_peer_known (peer)) + { /* If no such peer exists, there is no channel */ + return GNUNET_NO; + } + peer_ctx = get_peer_ctx (peer); + if (NULL == peer_ctx->send_channel) + { + return GNUNET_NO; + } + return GNUNET_YES; +} + + +/** + * @brief check whether the given channel is the sending channel of the given + * peer + * + * @param peer the peer in question + * @param channel the channel to check for + * @param role either #Peers_CHANNEL_ROLE_SENDING, or + * #Peers_CHANNEL_ROLE_RECEIVING + * + * @return #GNUNET_YES if the given chennel is the sending channel of the peer + * #GNUNET_NO otherwise + */ +int +Peers_check_channel_role (const struct GNUNET_PeerIdentity *peer, + const struct GNUNET_CADET_Channel *channel, + enum Peers_ChannelRole role) +{ + const struct PeerContext *peer_ctx; + + if (GNUNET_NO == Peers_check_peer_known (peer)) + { + return GNUNET_NO; + } + peer_ctx = get_peer_ctx (peer); + if ( (Peers_CHANNEL_ROLE_SENDING == role) && + (channel == peer_ctx->send_channel) ) + { + return GNUNET_YES; + } + if ( (Peers_CHANNEL_ROLE_RECEIVING == role) && + (channel == peer_ctx->recv_channel) ) + { + return GNUNET_YES; + } + return GNUNET_NO; +} + + +/** + * @brief Destroy the send channel of a peer e.g. stop indicating a sending + * intention to another peer + * + * If there is also no channel to receive messages from that peer, remove it + * from the peermap. + * TODO really? + * + * @peer the peer identity of the peer whose sending channel to destroy + * @return #GNUNET_YES if channel was destroyed + * #GNUNET_NO otherwise + */ +int +Peers_destroy_sending_channel (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *peer_ctx; + + if (GNUNET_NO == Peers_check_peer_known (peer)) + { + return GNUNET_NO; + } + peer_ctx = get_peer_ctx (peer); + if (NULL != peer_ctx->send_channel) + { + set_channel_flag (peer_ctx->send_channel_flags, Peers_CHANNEL_CLEAN); + GNUNET_CADET_channel_destroy (peer_ctx->send_channel); + peer_ctx->send_channel = NULL; + (void) Peers_check_connected (peer); + return GNUNET_YES; + } + return GNUNET_NO; +} + +/** + * This is called when a channel is destroyed. + * + * @param cls The closure + * @param channel The channel being closed + * @param channel_ctx The context associated with this channel + */ +void +Peers_cleanup_destroyed_channel (void *cls, + const struct GNUNET_CADET_Channel *channel) +{ + struct GNUNET_PeerIdentity *peer = cls; + struct PeerContext *peer_ctx; + + if (GNUNET_NO == Peers_check_peer_known (peer)) + {/* We don't want to implicitly create a context that we're about to kill */ + LOG (GNUNET_ERROR_TYPE_DEBUG, + "channel (%s) without associated context was destroyed\n", + GNUNET_i2s (peer)); + return; + } + peer_ctx = get_peer_ctx (peer); + + /* If our peer issued the destruction of the channel, the #Peers_TO_DESTROY + * flag will be set. In this case simply make sure that the channels are + * cleaned. */ + /* FIXME This distinction seems to be redundant */ + if (Peers_check_peer_flag (peer, Peers_TO_DESTROY)) + {/* We initiatad the destruction of this particular peer */ + if (channel == peer_ctx->send_channel) + peer_ctx->send_channel = NULL; + else if (channel == peer_ctx->recv_channel) + peer_ctx->recv_channel = NULL; + + if (NULL != peer_ctx->send_channel) + { + GNUNET_CADET_channel_destroy (peer_ctx->send_channel); + peer_ctx->send_channel = NULL; + } + if (NULL != peer_ctx->recv_channel) + { + GNUNET_CADET_channel_destroy (peer_ctx->recv_channel); + peer_ctx->recv_channel = NULL; + } + /* Set the #Peers_ONLINE flag accordingly */ + (void) Peers_check_connected (peer); + return; + } + + else + { /* We did not initiate the destruction of this peer */ + if (channel == peer_ctx->send_channel) + { /* Something (but us) killd the channel - clean up peer */ + LOG (GNUNET_ERROR_TYPE_DEBUG, + "send channel (%s) was destroyed - cleaning up\n", + GNUNET_i2s (peer)); + peer_ctx->send_channel = NULL; + } + else if (channel == peer_ctx->recv_channel) + { /* Other peer doesn't want to send us messages anymore */ + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Peer %s destroyed recv channel - cleaning up channel\n", + GNUNET_i2s (peer)); + peer_ctx->recv_channel = NULL; + } + else + { + LOG (GNUNET_ERROR_TYPE_WARNING, + "unknown channel (%s) was destroyed\n", + GNUNET_i2s (peer)); + } + } + (void) Peers_check_connected (peer); +} + +/** + * @brief Send a message to another peer. + * + * Keeps track about pending messages so they can be properly removed when the + * peer is destroyed. + * + * @param peer receeiver of the message + * @param ev envelope of the message + * @param type type of the message + */ +void +Peers_send_message (const struct GNUNET_PeerIdentity *peer, + struct GNUNET_MQ_Envelope *ev, + const char *type) +{ + struct PendingMessage *pending_msg; + struct GNUNET_MQ_Handle *mq; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Sending message to %s of type %s\n", + GNUNET_i2s (peer), + type); + pending_msg = insert_pending_message (peer, ev, type); + mq = get_mq (peer); + GNUNET_MQ_notify_sent (ev, + mq_notify_sent_cb, + pending_msg); + GNUNET_MQ_send (mq, ev); +} + +/** + * @brief Schedule a operation on given peer + * + * Avoids scheduling an operation twice. + * + * @param peer the peer we want to schedule the operation for once it gets live + * + * @return #GNUNET_YES if the operation was scheduled + * #GNUNET_NO otherwise + */ +int +Peers_schedule_operation (const struct GNUNET_PeerIdentity *peer, + const PeerOp peer_op) +{ + struct PeerPendingOp pending_op; + struct PeerContext *peer_ctx; + + if (0 == GNUNET_CRYPTO_cmp_peer_identity (peer, &own_identity)) + { + return GNUNET_NO; + } + GNUNET_assert (GNUNET_YES == Peers_check_peer_known (peer)); + + //TODO if LIVE/ONLINE execute immediately + + if (GNUNET_NO == check_operation_scheduled (peer, peer_op)) + { + peer_ctx = get_peer_ctx (peer); + pending_op.op = peer_op; + pending_op.op_cls = NULL; + GNUNET_array_append (peer_ctx->pending_ops, + peer_ctx->num_pending_ops, + pending_op); + return GNUNET_YES; + } + return GNUNET_NO; +} + +/** + * @brief Get the recv_channel of @a peer. + * Needed to correctly handle (call #GNUNET_CADET_receive_done()) incoming + * messages. + * + * @param peer The peer to get the recv_channel from. + * + * @return The recv_channel. + */ +struct GNUNET_CADET_Channel * +Peers_get_recv_channel (const struct GNUNET_PeerIdentity *peer) +{ + struct PeerContext *peer_ctx; + + GNUNET_assert (GNUNET_YES == Peers_check_peer_known (peer)); + peer_ctx = get_peer_ctx (peer); + return peer_ctx->recv_channel; +} +/*********************************************************************** + * /Old gnunet-service-rps_peers.c +***********************************************************************/ + + /*********************************************************************** * Housekeeping with clients ***********************************************************************/ @@ -847,6 +2568,7 @@ cleanup_destroyed_channel (void *cls, { struct GNUNET_PeerIdentity *peer = cls; uint32_t *channel_flag; + struct PeerContext *peer_ctx; if (GNUNET_NO == Peers_check_peer_known (peer)) { /* We don't know a context to that peer */ @@ -856,6 +2578,15 @@ cleanup_destroyed_channel (void *cls, return; } + peer_ctx = get_peer_ctx (peer); + if (GNUNET_YES == Peers_check_channel_role (peer, channel, Peers_CHANNEL_ROLE_RECEIVING)) + { + set_channel_flag (peer_ctx->recv_channel_flags, Peers_CHANNEL_DESTROING); + } else if (GNUNET_YES == Peers_check_channel_role (peer, channel, Peers_CHANNEL_ROLE_SENDING)) + { + set_channel_flag (peer_ctx->send_channel_flags, Peers_CHANNEL_DESTROING); + } + if (GNUNET_YES == Peers_check_peer_flag (peer, Peers_TO_DESTROY)) { /* We are in the middle of removing that peer from our knowledge. In this case simply make sure that the channels are cleaned. */ @@ -1121,7 +2852,6 @@ handle_client_request_cancel (void *cls, (rep_cls->id != ntohl (msg->id)) ) rep_cls = rep_cls->next; GNUNET_assert (rep_cls->id == ntohl (msg->id)); - RPS_sampler_request_cancel (rep_cls->req_handle); destroy_reply_cls (rep_cls); GNUNET_SERVICE_client_continue (cli_ctx->client); } @@ -1239,24 +2969,24 @@ handle_peer_push (void *cls, (3 == mal_type) ) { /* Try to maximise representation */ tmp_att_peer = GNUNET_new (struct AttackedPeer); - GNUNET_memcpy (&tmp_att_peer->peer_id, peer, sizeof (struct GNUNET_PeerIdentity)); + tmp_att_peer->peer_id = *peer; if (NULL == att_peer_set) att_peer_set = GNUNET_CONTAINER_multipeermap_create (1, GNUNET_NO); - if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (att_peer_set, - peer)) + if (GNUNET_NO == + GNUNET_CONTAINER_multipeermap_contains (att_peer_set, + peer)) { GNUNET_CONTAINER_DLL_insert (att_peers_head, att_peers_tail, tmp_att_peer); add_peer_array_to_set (peer, 1, att_peer_set); } - GNUNET_CADET_receive_done (Peers_get_recv_channel (peer)); } else if (2 == mal_type) - { /* We attack one single well-known peer - simply ignore */ - GNUNET_CADET_receive_done (Peers_get_recv_channel (peer)); + { + /* We attack one single well-known peer - simply ignore */ } #endif /* ENABLE_MALICIOUS */ @@ -1289,7 +3019,6 @@ handle_peer_pull_request (void *cls, || 3 == mal_type) { /* Try to maximise representation */ send_pull_reply (peer, mal_peers, num_mal_peers); - GNUNET_CADET_receive_done (Peers_get_recv_channel (peer)); } else if (2 == mal_type) @@ -1298,7 +3027,6 @@ handle_peer_pull_request (void *cls, { send_pull_reply (peer, mal_peers, num_mal_peers); } - GNUNET_CADET_receive_done (Peers_get_recv_channel (peer)); } #endif /* ENABLE_MALICIOUS */ @@ -1360,7 +3088,7 @@ static void handle_peer_pull_reply (void *cls, const struct GNUNET_RPS_P2P_PullReplyMessage *msg) { - struct GNUNET_PeerIdentity *peers; + const struct GNUNET_PeerIdentity *peers; struct GNUNET_PeerIdentity *sender = cls; uint32_t i; #ifdef ENABLE_MALICIOUS @@ -1373,12 +3101,11 @@ handle_peer_pull_reply (void *cls, // We shouldn't even receive pull replies as we're not sending if (2 == mal_type) { - GNUNET_CADET_receive_done (Peers_get_recv_channel (sender)); } #endif /* ENABLE_MALICIOUS */ /* Do actual logic */ - peers = (struct GNUNET_PeerIdentity *) &msg[1]; + peers = (const struct GNUNET_PeerIdentity *) &msg[1]; LOG (GNUNET_ERROR_TYPE_DEBUG, "PULL REPLY received, got following %u peers:\n", @@ -2132,7 +3859,6 @@ shutdown_task (void *cls) reply_cls); GNUNET_free (reply_cls); } - GNUNET_MQ_destroy (client_ctx->mq); GNUNET_CONTAINER_DLL_remove (cli_ctx_head, cli_ctx_tail, client_ctx); GNUNET_free (client_ctx); } @@ -2150,6 +3876,7 @@ shutdown_task (void *cls) GNUNET_NSE_disconnect (nse); RPS_sampler_destroy (prot_sampler); RPS_sampler_destroy (client_sampler); + GNUNET_CADET_close_port (cadet_port); GNUNET_CADET_disconnect (cadet_handle); View_destroy (); CustomPeerMap_destroy (push_map); @@ -2240,26 +3967,6 @@ run (void *cls, const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_SERVICE_Handle *service) { - struct GNUNET_MQ_MessageHandler cadet_handlers[] = { - GNUNET_MQ_hd_fixed_size (peer_check, - GNUNET_MESSAGE_TYPE_RPS_PP_CHECK_LIVE, - struct GNUNET_MessageHeader, - NULL), - GNUNET_MQ_hd_fixed_size (peer_push, - GNUNET_MESSAGE_TYPE_RPS_PP_PUSH, - struct GNUNET_MessageHeader, - NULL), - GNUNET_MQ_hd_fixed_size (peer_pull_request, - GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST, - struct GNUNET_MessageHeader, - NULL), - GNUNET_MQ_hd_var_size (peer_pull_reply, - GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY, - struct GNUNET_RPS_P2P_PullReplyMessage, - NULL), - GNUNET_MQ_handler_end () - }; - int size; int out_size; char* fn_valid_peers; @@ -2349,6 +4056,27 @@ run (void *cls, /* Initialise cadet */ + /* There exists a copy-paste-clone in get_channel() */ + struct GNUNET_MQ_MessageHandler cadet_handlers[] = { + GNUNET_MQ_hd_fixed_size (peer_check, + GNUNET_MESSAGE_TYPE_RPS_PP_CHECK_LIVE, + struct GNUNET_MessageHeader, + NULL), + GNUNET_MQ_hd_fixed_size (peer_push, + GNUNET_MESSAGE_TYPE_RPS_PP_PUSH, + struct GNUNET_MessageHeader, + NULL), + GNUNET_MQ_hd_fixed_size (peer_pull_request, + GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST, + struct GNUNET_MessageHeader, + NULL), + GNUNET_MQ_hd_var_size (peer_pull_reply, + GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY, + struct GNUNET_RPS_P2P_PullReplyMessage, + NULL), + GNUNET_MQ_handler_end () + }; + cadet_handle = GNUNET_CADET_connect (cfg); GNUNET_assert (NULL != cadet_handle); GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_RPS, @@ -2365,7 +4093,7 @@ run (void *cls, peerinfo_handle = GNUNET_PEERINFO_connect (cfg); Peers_initialise (fn_valid_peers, cadet_handle, cleanup_destroyed_channel, - cadet_handlers, &own_identity); + &own_identity); GNUNET_free (fn_valid_peers); /* Initialise sampler */ diff --git a/src/rps/gnunet-service-rps_peers.c b/src/rps/gnunet-service-rps_peers.c @@ -1,1694 +0,0 @@ -/* - This file is part of GNUnet. - Copyright (C) - - GNUnet is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GNUnet is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -/** - * @file rps/gnunet-service-rps_peers.c - * @brief utilities for managing (information about) peers - * @author Julius Bünger - */ -#include "platform.h" -#include "gnunet_applications.h" -#include "gnunet_util_lib.h" -#include "gnunet_cadet_service.h" -#include <inttypes.h> -#include "rps.h" -#include "gnunet-service-rps_peers.h" - - - -#define LOG(kind, ...) GNUNET_log_from(kind,"rps-peers",__VA_ARGS__) - - -/** - * Set a peer flag of given peer context. - */ -#define set_peer_flag(peer_ctx, mask) ((peer_ctx->peer_flags) |= (mask)) - -/** - * Get peer flag of given peer context. - */ -#define check_peer_flag_set(peer_ctx, mask)\ - ((peer_ctx->peer_flags) & (mask) ? GNUNET_YES : GNUNET_NO) - -/** - * Unset flag of given peer context. - */ -#define unset_peer_flag(peer_ctx, mask) ((peer_ctx->peer_flags) &= ~(mask)) - -/** - * Set a channel flag of given channel context. - */ -#define set_channel_flag(channel_flags, mask) ((*channel_flags) |= (mask)) - -/** - * Get channel flag of given channel context. - */ -#define check_channel_flag_set(channel_flags, mask)\ - ((*channel_flags) & (mask) ? GNUNET_YES : GNUNET_NO) - -/** - * Unset flag of given channel context. - */ -#define unset_channel_flag(channel_flags, mask) ((*channel_flags) &= ~(mask)) - - - -/** - * Pending operation on peer consisting of callback and closure - * - * When an operation cannot be executed right now this struct is used to store - * the callback and closure for later execution. - */ -struct PeerPendingOp -{ - /** - * Callback - */ - PeerOp op; - - /** - * Closure - */ - void *op_cls; -}; - -/** - * List containing all messages that are yet to be send - * - * This is used to keep track of all messages that have not been sent yet. When - * a peer is to be removed the pending messages can be removed properly. - */ -struct PendingMessage -{ - /** - * DLL next, prev - */ - struct PendingMessage *next; - struct PendingMessage *prev; - - /** - * The envelope to the corresponding message - */ - struct GNUNET_MQ_Envelope *ev; - - /** - * The corresponding context - */ - struct PeerContext *peer_ctx; - - /** - * The message type - */ - const char *type; -}; - -/** - * Struct used to keep track of other peer's status - * - * This is stored in a multipeermap. - * It contains information such as cadet channels, a message queue for sending, - * status about the channels, the pending operations on this peer and some flags - * about the status of the peer itself. (live, valid, ...) - */ -struct PeerContext -{ - /** - * Message queue open to client - */ - struct GNUNET_MQ_Handle *mq; - - /** - * Channel open to client. - */ - struct GNUNET_CADET_Channel *send_channel; - - /** - * Flags to the sending channel - */ - uint32_t *send_channel_flags; - - /** - * Channel open from client. - */ - struct GNUNET_CADET_Channel *recv_channel; // unneeded? - - /** - * Flags to the receiving channel - */ - uint32_t *recv_channel_flags; - - /** - * Array of pending operations on this peer. - */ - struct PeerPendingOp *pending_ops; - - /** - * Handle to the callback given to cadet_ntfy_tmt_rdy() - * - * To be canceled on shutdown. - */ - struct PendingMessage *liveliness_check_pending; - - /** - * Number of pending operations. - */ - unsigned int num_pending_ops; - - /** - * Identity of the peer - */ - struct GNUNET_PeerIdentity peer_id; - - /** - * Flags indicating status of peer - */ - uint32_t peer_flags; - - /** - * Last time we received something from that peer. - */ - struct GNUNET_TIME_Absolute last_message_recv; - - /** - * Last time we received a keepalive message. - */ - struct GNUNET_TIME_Absolute last_keepalive; - - /** - * DLL with all messages that are yet to be sent - */ - struct PendingMessage *pending_messages_head; - struct PendingMessage *pending_messages_tail; - - /** - * This is pobably followed by 'statistical' data (when we first saw - * him, how did we get his ID, how many pushes (in a timeinterval), - * ...) - */ -}; - -/** - * @brief Closure to #valid_peer_iterator - */ -struct PeersIteratorCls -{ - /** - * Iterator function - */ - PeersIterator iterator; - - /** - * Closure to iterator - */ - void *cls; -}; - -/** - * @brief Hashmap of valid peers. - */ -static struct GNUNET_CONTAINER_MultiPeerMap *valid_peers; - -/** - * @brief Maximum number of valid peers to keep. - * TODO read from config - */ -static uint32_t num_valid_peers_max = UINT32_MAX; - -/** - * @brief Filename of the file that stores the valid peers persistently. - */ -static char *filename_valid_peers; - -/** - * Set of all peers to keep track of them. - */ -static struct GNUNET_CONTAINER_MultiPeerMap *peer_map; - -/** - * Own #GNUNET_PeerIdentity. - */ -static const struct GNUNET_PeerIdentity *own_identity; - -/** - * Cadet handle. - */ -static struct GNUNET_CADET_Handle *cadet_handle; - -/** - * @brief Disconnect handler - */ -static GNUNET_CADET_DisconnectEventHandler cleanup_destroyed_channel; - -/** - * @brief cadet handlers - */ -static const struct GNUNET_MQ_MessageHandler *cadet_handlers; - - - -/** - * @brief Get the #PeerContext associated with a peer - * - * @param peer the peer id - * - * @return the #PeerContext - */ -static struct PeerContext * -get_peer_ctx (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *ctx; - int ret; - - ret = GNUNET_CONTAINER_multipeermap_contains (peer_map, peer); - GNUNET_assert (GNUNET_YES == ret); - ctx = GNUNET_CONTAINER_multipeermap_get (peer_map, peer); - GNUNET_assert (NULL != ctx); - return ctx; -} - - -/** - * @brief Create a new #PeerContext and insert it into the peer map - * - * @param peer the peer to create the #PeerContext for - * - * @return the #PeerContext - */ -static struct PeerContext * -create_peer_ctx (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *ctx; - int ret; - - GNUNET_assert (GNUNET_NO == Peers_check_peer_known (peer)); - - ctx = GNUNET_new (struct PeerContext); - ctx->peer_id = *peer; - ctx->send_channel_flags = GNUNET_new (uint32_t); - ctx->recv_channel_flags = GNUNET_new (uint32_t); - ret = GNUNET_CONTAINER_multipeermap_put (peer_map, peer, ctx, - GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); - GNUNET_assert (GNUNET_OK == ret); - return ctx; -} - - -/** - * @brief Create or get a #PeerContext - * - * @param peer the peer to get the associated context to - * - * @return the context - */ -static struct PeerContext * -create_or_get_peer_ctx (const struct GNUNET_PeerIdentity *peer) -{ - if (GNUNET_NO == Peers_check_peer_known (peer)) - { - return create_peer_ctx (peer); - } - return get_peer_ctx (peer); -} - - -/** - * @brief Check whether we have a connection to this @a peer - * - * Also sets the #Peers_ONLINE flag accordingly - * - * @param peer the peer in question - * - * @return #GNUNET_YES if we are connected - * #GNUNET_NO otherwise - */ -int -Peers_check_connected (const struct GNUNET_PeerIdentity *peer) -{ - const struct PeerContext *peer_ctx; - - /* If we don't know about this peer we don't know whether it's online */ - if (GNUNET_NO == Peers_check_peer_known (peer)) - { - return GNUNET_NO; - } - /* Get the context */ - peer_ctx = get_peer_ctx (peer); - /* If we have no channel to this peer we don't know whether it's online */ - if ( (NULL == peer_ctx->send_channel) && - (NULL == peer_ctx->recv_channel) ) - { - Peers_unset_peer_flag (peer, Peers_ONLINE); - return GNUNET_NO; - } - /* Otherwise (if we have a channel, we know that it's online */ - Peers_set_peer_flag (peer, Peers_ONLINE); - return GNUNET_YES; -} - - -/** - * @brief The closure to #get_rand_peer_iterator. - */ -struct GetRandPeerIteratorCls -{ - /** - * @brief The index of the peer to return. - * Will be decreased until 0. - * Then current peer is returned. - */ - uint32_t index; - - /** - * @brief Pointer to peer to return. - */ - const struct GNUNET_PeerIdentity *peer; -}; - - -/** - * @brief Iterator function for #get_random_peer_from_peermap. - * - * Implements #GNUNET_CONTAINER_PeerMapIterator. - * Decreases the index until the index is null. - * Then returns the current peer. - * - * @param cls the #GetRandPeerIteratorCls containing index and peer - * @param peer current peer - * @param value unused - * - * @return #GNUNET_YES if we should continue to - * iterate, - * #GNUNET_NO if not. - */ -static int -get_rand_peer_iterator (void *cls, - const struct GNUNET_PeerIdentity *peer, - void *value) -{ - struct GetRandPeerIteratorCls *iterator_cls = cls; - if (0 >= iterator_cls->index) - { - iterator_cls->peer = peer; - return GNUNET_NO; - } - iterator_cls->index--; - return GNUNET_YES; -} - - -/** - * @brief Get a random peer from @a peer_map - * - * @param peer_map the peer_map to get the peer from - * - * @return a random peer - */ -static const struct GNUNET_PeerIdentity * -get_random_peer_from_peermap (const struct - GNUNET_CONTAINER_MultiPeerMap *peer_map) -{ - struct GetRandPeerIteratorCls *iterator_cls; - const struct GNUNET_PeerIdentity *ret; - - iterator_cls = GNUNET_new (struct GetRandPeerIteratorCls); - iterator_cls->index = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, - GNUNET_CONTAINER_multipeermap_size (peer_map)); - (void) GNUNET_CONTAINER_multipeermap_iterate (valid_peers, - get_rand_peer_iterator, - iterator_cls); - ret = iterator_cls->peer; - GNUNET_free (iterator_cls); - return ret; -} - - -/** - * @brief Add a given @a peer to valid peers. - * - * If valid peers are already #num_valid_peers_max, delete a peer previously. - * - * @param peer the peer that is added to the valid peers. - * - * @return #GNUNET_YES if no other peer had to be removed - * #GNUNET_NO otherwise - */ -static int -add_valid_peer (const struct GNUNET_PeerIdentity *peer) -{ - const struct GNUNET_PeerIdentity *rand_peer; - int ret; - - ret = GNUNET_YES; - while (GNUNET_CONTAINER_multipeermap_size (valid_peers) >= num_valid_peers_max) - { - rand_peer = get_random_peer_from_peermap (valid_peers); - GNUNET_CONTAINER_multipeermap_remove_all (valid_peers, rand_peer); - ret = GNUNET_NO; - } - (void) GNUNET_CONTAINER_multipeermap_put (valid_peers, peer, NULL, - GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); - return ret; -} - - -/** - * @brief Set the peer flag to living and - * call the pending operations on this peer. - * - * Also adds peer to #valid_peers. - * - * @param peer_ctx the #PeerContext of the peer to set live - */ -static void -set_peer_live (struct PeerContext *peer_ctx) -{ - struct GNUNET_PeerIdentity *peer; - unsigned int i; - - peer = &peer_ctx->peer_id; - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Peer %s is live and valid, calling %i pending operations on it\n", - GNUNET_i2s (peer), - peer_ctx->num_pending_ops); - - if (NULL != peer_ctx->liveliness_check_pending) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Removing pending liveliness check for peer %s\n", - GNUNET_i2s (&peer_ctx->peer_id)); - // TODO wait until cadet sets mq->cancel_impl - //GNUNET_MQ_send_cancel (peer_ctx->liveliness_check_pending->ev); - GNUNET_free (peer_ctx->liveliness_check_pending); - peer_ctx->liveliness_check_pending = NULL; - } - - (void) add_valid_peer (peer); - set_peer_flag (peer_ctx, Peers_ONLINE); - - /* Call pending operations */ - for (i = 0; i < peer_ctx->num_pending_ops; i++) - { - peer_ctx->pending_ops[i].op (peer_ctx->pending_ops[i].op_cls, peer); - } - GNUNET_array_grow (peer_ctx->pending_ops, peer_ctx->num_pending_ops, 0); -} - - -/** - * @brief Get the channel of a peer. If not existing, create. - * - * @param peer the peer id - * @return the #GNUNET_CADET_Channel used to send data to @a peer - */ -struct GNUNET_CADET_Channel * -get_channel (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *peer_ctx; - struct GNUNET_HashCode port; - - peer_ctx = get_peer_ctx (peer); - if (NULL == peer_ctx->send_channel) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Trying to establish channel to peer %s\n", - GNUNET_i2s (peer)); - GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_RPS, - strlen (GNUNET_APPLICATION_PORT_RPS), - &port); - peer_ctx->send_channel = - GNUNET_CADET_channel_create (cadet_handle, - (struct GNUNET_PeerIdentity *) peer, /* context */ - peer, - &port, - GNUNET_CADET_OPTION_RELIABLE, - NULL, /* WindowSize handler */ - cleanup_destroyed_channel, /* Disconnect handler */ - cadet_handlers); - } - GNUNET_assert (NULL != peer_ctx->send_channel); - return peer_ctx->send_channel; -} - - -/** - * Get the message queue (#GNUNET_MQ_Handle) of a specific peer. - * - * If we already have a message queue open to this client, - * simply return it, otherways create one. - * - * @param peer the peer to get the mq to - * @return the #GNUNET_MQ_Handle - */ -static struct GNUNET_MQ_Handle * -get_mq (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *peer_ctx; - - peer_ctx = get_peer_ctx (peer); - - if (NULL == peer_ctx->mq) - { - (void) get_channel (peer); - peer_ctx->mq = GNUNET_CADET_get_mq (peer_ctx->send_channel); - } - return peer_ctx->mq; -} - - -/** - * @brief This is called in response to the first message we sent as a - * liveliness check. - * - * @param cls #PeerContext of peer with pending liveliness check - */ -static void -mq_liveliness_check_successful (void *cls) -{ - struct PeerContext *peer_ctx = cls; - - if (NULL != peer_ctx->liveliness_check_pending) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Liveliness check for peer %s was successfull\n", - GNUNET_i2s (&peer_ctx->peer_id)); - GNUNET_free (peer_ctx->liveliness_check_pending); - peer_ctx->liveliness_check_pending = NULL; - set_peer_live (peer_ctx); - } -} - -/** - * Issue a check whether peer is live - * - * @param peer_ctx the context of the peer - */ -static void -check_peer_live (struct PeerContext *peer_ctx) -{ - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Get informed about peer %s getting live\n", - GNUNET_i2s (&peer_ctx->peer_id)); - - struct GNUNET_MQ_Handle *mq; - struct GNUNET_MQ_Envelope *ev; - - ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_RPS_PP_CHECK_LIVE); - peer_ctx->liveliness_check_pending = GNUNET_new (struct PendingMessage); - peer_ctx->liveliness_check_pending->ev = ev; - peer_ctx->liveliness_check_pending->peer_ctx = peer_ctx; - peer_ctx->liveliness_check_pending->type = "Check liveliness"; - mq = get_mq (&peer_ctx->peer_id); - GNUNET_MQ_notify_sent (ev, - mq_liveliness_check_successful, - peer_ctx); - GNUNET_MQ_send (mq, ev); -} - -/** - * @brief Add an envelope to a message passed to mq to list of pending messages - * - * @param peer peer the message was sent to - * @param ev envelope to the message - * @param type type of the message to be sent - * @return pointer to pending message - */ -static struct PendingMessage * -insert_pending_message (const struct GNUNET_PeerIdentity *peer, - struct GNUNET_MQ_Envelope *ev, - const char *type) -{ - struct PendingMessage *pending_msg; - struct PeerContext *peer_ctx; - - peer_ctx = get_peer_ctx (peer); - pending_msg = GNUNET_new (struct PendingMessage); - pending_msg->ev = ev; - pending_msg->peer_ctx = peer_ctx; - pending_msg->type = type; - GNUNET_CONTAINER_DLL_insert (peer_ctx->pending_messages_head, - peer_ctx->pending_messages_tail, - pending_msg); - return pending_msg; -} - - -/** - * @brief Remove a pending message from the respective DLL - * - * @param pending_msg the pending message to remove - */ -static void -remove_pending_message (struct PendingMessage *pending_msg) -{ - struct PeerContext *peer_ctx; - - peer_ctx = pending_msg->peer_ctx; - GNUNET_CONTAINER_DLL_remove (peer_ctx->pending_messages_head, - peer_ctx->pending_messages_tail, - pending_msg); - GNUNET_MQ_send_cancel (peer_ctx->pending_messages_head->ev); - GNUNET_free (pending_msg); -} - - -/** - * @brief Check whether function of type #PeerOp was already scheduled - * - * The array with pending operations will probably never grow really big, so - * iterating over it should be ok. - * - * @param peer the peer to check - * @param peer_op the operation (#PeerOp) on the peer - * - * @return #GNUNET_YES if this operation is scheduled on that peer - * #GNUNET_NO otherwise - */ -static int -check_operation_scheduled (const struct GNUNET_PeerIdentity *peer, - const PeerOp peer_op) -{ - const struct PeerContext *peer_ctx; - unsigned int i; - - peer_ctx = get_peer_ctx (peer); - for (i = 0; i < peer_ctx->num_pending_ops; i++) - if (peer_op == peer_ctx->pending_ops[i].op) - return GNUNET_YES; - return GNUNET_NO; -} - - -/** - * Iterator over hash map entries. Deletes all contexts of peers. - * - * @param cls closure - * @param key current public key - * @param value value in the hash map - * @return #GNUNET_YES if we should continue to iterate, - * #GNUNET_NO if not. - */ -static int -peermap_clear_iterator (void *cls, - const struct GNUNET_PeerIdentity *key, - void *value) -{ - Peers_remove_peer (key); - return GNUNET_YES; -} - - -/** - * @brief This is called once a message is sent. - * - * Removes the pending message - * - * @param cls type of the message that was sent - */ -static void -mq_notify_sent_cb (void *cls) -{ - struct PendingMessage *pending_msg = (struct PendingMessage *) cls; - LOG (GNUNET_ERROR_TYPE_DEBUG, - "%s was sent.\n", - pending_msg->type); - remove_pending_message (pending_msg); -} - - -/** - * @brief Iterator function for #store_valid_peers. - * - * Implements #GNUNET_CONTAINER_PeerMapIterator. - * Writes single peer to disk. - * - * @param cls the file handle to write to. - * @param peer current peer - * @param value unused - * - * @return #GNUNET_YES if we should continue to - * iterate, - * #GNUNET_NO if not. - */ -static int -store_peer_presistently_iterator (void *cls, - const struct GNUNET_PeerIdentity *peer, - void *value) -{ - const struct GNUNET_DISK_FileHandle *fh = cls; - char peer_string[128]; - int size; - ssize_t ret; - - if (NULL == peer) - { - return GNUNET_YES; - } - size = GNUNET_snprintf (peer_string, - sizeof (peer_string), - "%s\n", - GNUNET_i2s_full (peer)); - GNUNET_assert (53 == size); - ret = GNUNET_DISK_file_write (fh, - peer_string, - size); - GNUNET_assert (size == ret); - return GNUNET_YES; -} - - -/** - * @brief Store the peers currently in #valid_peers to disk. - */ -static void -store_valid_peers () -{ - struct GNUNET_DISK_FileHandle *fh; - uint32_t number_written_peers; - int ret; - - if (0 == strncmp ("DISABLE", filename_valid_peers, 7)) - { - return; - } - - ret = GNUNET_DISK_directory_create_for_file (filename_valid_peers); - if (GNUNET_SYSERR == ret) - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "Not able to create directory for file `%s'\n", - filename_valid_peers); - GNUNET_break (0); - } - else if (GNUNET_NO == ret) - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "Directory for file `%s' exists but is not writable for us\n", - filename_valid_peers); - GNUNET_break (0); - } - fh = GNUNET_DISK_file_open (filename_valid_peers, - GNUNET_DISK_OPEN_WRITE | - GNUNET_DISK_OPEN_CREATE, - GNUNET_DISK_PERM_USER_READ | - GNUNET_DISK_PERM_USER_WRITE); - if (NULL == fh) - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "Not able to write valid peers to file `%s'\n", - filename_valid_peers); - return; - } - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Writing %u valid peers to disk\n", - GNUNET_CONTAINER_multipeermap_size (valid_peers)); - number_written_peers = - GNUNET_CONTAINER_multipeermap_iterate (valid_peers, - store_peer_presistently_iterator, - fh); - GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); - GNUNET_assert (number_written_peers == - GNUNET_CONTAINER_multipeermap_size (valid_peers)); -} - - -/** - * @brief Convert string representation of peer id to peer id. - * - * Counterpart to #GNUNET_i2s_full. - * - * @param string_repr The string representation of the peer id - * - * @return The peer id - */ -static const struct GNUNET_PeerIdentity * -s2i_full (const char *string_repr) -{ - struct GNUNET_PeerIdentity *peer; - size_t len; - int ret; - - peer = GNUNET_new (struct GNUNET_PeerIdentity); - len = strlen (string_repr); - if (52 > len) - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "Not able to convert string representation of PeerID to PeerID\n" - "Sting representation: %s (len %u) - too short\n", - string_repr, - len); - GNUNET_break (0); - } - else if (52 < len) - { - len = 52; - } - ret = GNUNET_CRYPTO_eddsa_public_key_from_string (string_repr, - len, - &peer->public_key); - if (GNUNET_OK != ret) - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "Not able to convert string representation of PeerID to PeerID\n" - "Sting representation: %s\n", - string_repr); - GNUNET_break (0); - } - return peer; -} - - -/** - * @brief Restore the peers on disk to #valid_peers. - */ -static void -restore_valid_peers () -{ - off_t file_size; - uint32_t num_peers; - struct GNUNET_DISK_FileHandle *fh; - char *buf; - ssize_t size_read; - char *iter_buf; - char *str_repr; - const struct GNUNET_PeerIdentity *peer; - - if (0 == strncmp ("DISABLE", filename_valid_peers, 7)) - { - return; - } - - if (GNUNET_OK != GNUNET_DISK_file_test (filename_valid_peers)) - { - return; - } - fh = GNUNET_DISK_file_open (filename_valid_peers, - GNUNET_DISK_OPEN_READ, - GNUNET_DISK_PERM_NONE); - GNUNET_assert (NULL != fh); - GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_handle_size (fh, &file_size)); - num_peers = file_size / 53; - buf = GNUNET_malloc (file_size); - size_read = GNUNET_DISK_file_read (fh, buf, file_size); - GNUNET_assert (size_read == file_size); - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Restoring %" PRIu32 " peers from file `%s'\n", - num_peers, - filename_valid_peers); - for (iter_buf = buf; iter_buf < buf + file_size - 1; iter_buf += 53) - { - str_repr = GNUNET_strndup (iter_buf, 53); - peer = s2i_full (str_repr); - GNUNET_free (str_repr); - add_valid_peer (peer); - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Restored valid peer %s from disk\n", - GNUNET_i2s_full (peer)); - } - iter_buf = NULL; - GNUNET_free (buf); - LOG (GNUNET_ERROR_TYPE_DEBUG, - "num_peers: %" PRIu32 ", _size (valid_peers): %u\n", - num_peers, - GNUNET_CONTAINER_multipeermap_size (valid_peers)); - if (num_peers != GNUNET_CONTAINER_multipeermap_size (valid_peers)) - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "Number of restored peers does not match file size. Have probably duplicates.\n"); - } - GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Restored %u valid peers from disk\n", - GNUNET_CONTAINER_multipeermap_size (valid_peers)); -} - - -/** - * @brief Initialise storage of peers - * - * @param fn_valid_peers filename of the file used to store valid peer ids - * @param cadet_h cadet handle - * @param disconnect_handler Disconnect handler - * @param c_handlers cadet handlers - * @param own_id own peer identity - */ -void -Peers_initialise (char* fn_valid_peers, - struct GNUNET_CADET_Handle *cadet_h, - GNUNET_CADET_DisconnectEventHandler disconnect_handler, - const struct GNUNET_MQ_MessageHandler *c_handlers, - const struct GNUNET_PeerIdentity *own_id) -{ - filename_valid_peers = GNUNET_strdup (fn_valid_peers); - cadet_handle = cadet_h; - cleanup_destroyed_channel = disconnect_handler; - cadet_handlers = c_handlers; - own_identity = own_id; - peer_map = GNUNET_CONTAINER_multipeermap_create (4, GNUNET_NO); - valid_peers = GNUNET_CONTAINER_multipeermap_create (4, GNUNET_NO); - restore_valid_peers (); -} - - -/** - * @brief Delete storage of peers that was created with #Peers_initialise () - */ -void -Peers_terminate () -{ - if (GNUNET_SYSERR == - GNUNET_CONTAINER_multipeermap_iterate (peer_map, - peermap_clear_iterator, - NULL)) - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "Iteration destroying peers was aborted.\n"); - } - GNUNET_CONTAINER_multipeermap_destroy (peer_map); - store_valid_peers (); - GNUNET_free (filename_valid_peers); - GNUNET_CONTAINER_multipeermap_destroy (valid_peers); -} - - -/** - * Iterator over #valid_peers hash map entries. - * - * @param cls closure - unused - * @param peer current peer id - * @param value value in the hash map - unused - * @return #GNUNET_YES if we should continue to - * iterate, - * #GNUNET_NO if not. - */ -static int -valid_peer_iterator (void *cls, - const struct GNUNET_PeerIdentity *peer, - void *value) -{ - struct PeersIteratorCls *it_cls = cls; - - return it_cls->iterator (it_cls->cls, - peer); -} - - -/** - * @brief Get all currently known, valid peer ids. - * - * @param it function to call on each peer id - * @param it_cls extra argument to @a it - * @return the number of key value pairs processed, - * #GNUNET_SYSERR if it aborted iteration - */ -int -Peers_get_valid_peers (PeersIterator iterator, - void *it_cls) -{ - struct PeersIteratorCls *cls; - int ret; - - cls = GNUNET_new (struct PeersIteratorCls); - cls->iterator = iterator; - cls->cls = it_cls; - ret = GNUNET_CONTAINER_multipeermap_iterate (valid_peers, - valid_peer_iterator, - cls); - GNUNET_free (cls); - return ret; -} - - -/** - * @brief Add peer to known peers. - * - * This function is called on new peer_ids from 'external' sources - * (client seed, cadet get_peers(), ...) - * - * @param peer the new #GNUNET_PeerIdentity - * - * @return #GNUNET_YES if peer was inserted - * #GNUNET_NO otherwise (if peer was already known or - * peer was #own_identity) - */ -int -Peers_insert_peer (const struct GNUNET_PeerIdentity *peer) -{ - if ( (GNUNET_YES == Peers_check_peer_known (peer)) || - (0 == GNUNET_CRYPTO_cmp_peer_identity (peer, own_identity)) ) - { - return GNUNET_NO; /* We already know this peer - nothing to do */ - } - (void) create_peer_ctx (peer); - return GNUNET_YES; -} - - -/** - * @brief Try connecting to a peer to see whether it is online - * - * If not known yet, insert into known peers - * - * @param peer the peer whose liveliness is to be checked - * @return #GNUNET_YES if peer had to be inserted - * #GNUNET_NO otherwise (if peer was already known or - * peer was #own_identity) - */ -int -Peers_issue_peer_liveliness_check (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *peer_ctx; - int ret; - - if (0 == GNUNET_CRYPTO_cmp_peer_identity (peer, own_identity)) - { - return GNUNET_NO; - } - ret = Peers_insert_peer (peer); - peer_ctx = get_peer_ctx (peer); - if (GNUNET_NO == Peers_check_peer_flag (peer, Peers_ONLINE)) - { - check_peer_live (peer_ctx); - } - return ret; -} - - -/** - * @brief Check if peer is removable. - * - * Check if - * - a recv channel exists - * - there are pending messages - * - there is no pending pull reply - * - * @param peer the peer in question - * @return #GNUNET_YES if peer is removable - * #GNUNET_NO if peer is NOT removable - * #GNUNET_SYSERR if peer is not known - */ -int -Peers_check_removable (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *peer_ctx; - - if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (peer_map, peer)) - { - return GNUNET_SYSERR; - } - - peer_ctx = get_peer_ctx (peer); - if ( (NULL != peer_ctx->recv_channel) || - (NULL != peer_ctx->pending_messages_head) || - (GNUNET_NO == check_peer_flag_set (peer_ctx, Peers_PULL_REPLY_PENDING)) ) - { - return GNUNET_NO; - } - return GNUNET_YES; -} - - -/** - * @brief Remove peer - * - * @param peer the peer to clean - * @return #GNUNET_YES if peer was removed - * #GNUNET_NO otherwise - */ -int -Peers_remove_peer (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *peer_ctx; - - if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (peer_map, peer)) - { - return GNUNET_NO; - } - - peer_ctx = get_peer_ctx (peer); - set_peer_flag (peer_ctx, Peers_TO_DESTROY); - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Going to remove peer %s\n", - GNUNET_i2s (&peer_ctx->peer_id)); - Peers_unset_peer_flag (peer, Peers_ONLINE); - - GNUNET_array_grow (peer_ctx->pending_ops, peer_ctx->num_pending_ops, 0); - while (NULL != peer_ctx->pending_messages_head) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Removing unsent %s\n", - peer_ctx->pending_messages_head->type); - remove_pending_message (peer_ctx->pending_messages_head); - } - /* If we are still waiting for notification whether this peer is live - * cancel the according task */ - if (NULL != peer_ctx->liveliness_check_pending) - { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Removing pending liveliness check for peer %s\n", - GNUNET_i2s (&peer_ctx->peer_id)); - // TODO wait until cadet sets mq->cancel_impl - //GNUNET_MQ_send_cancel (peer_ctx->liveliness_check_pending->ev); - GNUNET_free (peer_ctx->liveliness_check_pending); - peer_ctx->liveliness_check_pending = NULL; - } - if (NULL != peer_ctx->send_channel) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Destroying send channel\n"); - GNUNET_CADET_channel_destroy (peer_ctx->send_channel); - peer_ctx->send_channel = NULL; - } - if (NULL != peer_ctx->recv_channel) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Destroying recv channel\n"); - GNUNET_CADET_channel_destroy (peer_ctx->recv_channel); - peer_ctx->recv_channel = NULL; - } - if (NULL != peer_ctx->mq) - { - GNUNET_MQ_destroy (peer_ctx->mq); - peer_ctx->mq = NULL; - } - - GNUNET_free (peer_ctx->send_channel_flags); - GNUNET_free (peer_ctx->recv_channel_flags); - - if (GNUNET_YES != GNUNET_CONTAINER_multipeermap_remove_all (peer_map, &peer_ctx->peer_id)) - { - LOG (GNUNET_ERROR_TYPE_WARNING, "removing peer from peer_map failed\n"); - } - GNUNET_free (peer_ctx); - return GNUNET_YES; -} - - -/** - * @brief set flags on a given peer. - * - * @param peer the peer to set flags on - * @param flags the flags - */ -void -Peers_set_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags) -{ - struct PeerContext *peer_ctx; - - peer_ctx = get_peer_ctx (peer); - set_peer_flag (peer_ctx, flags); -} - - -/** - * @brief unset flags on a given peer. - * - * @param peer the peer to unset flags on - * @param flags the flags - */ -void -Peers_unset_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags) -{ - struct PeerContext *peer_ctx; - - peer_ctx = get_peer_ctx (peer); - unset_peer_flag (peer_ctx, flags); -} - - -/** - * @brief Check whether flags on a peer are set. - * - * @param peer the peer to check the flag of - * @param flags the flags to check - * - * @return #GNUNET_SYSERR if peer is not known - * #GNUNET_YES if all given flags are set - * #GNUNET_NO otherwise - */ -int -Peers_check_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags) -{ - struct PeerContext *peer_ctx; - - if (GNUNET_NO == Peers_check_peer_known (peer)) - { - return GNUNET_SYSERR; - } - peer_ctx = get_peer_ctx (peer); - return check_peer_flag_set (peer_ctx, flags); -} - - -/** - * @brief set flags on a given channel. - * - * @param channel the channel to set flags on - * @param flags the flags - */ -void -Peers_set_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags) -{ - set_channel_flag (channel_flags, flags); -} - - -/** - * @brief unset flags on a given channel. - * - * @param channel the channel to unset flags on - * @param flags the flags - */ -void -Peers_unset_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags) -{ - unset_channel_flag (channel_flags, flags); -} - - -/** - * @brief Check whether flags on a channel are set. - * - * @param channel the channel to check the flag of - * @param flags the flags to check - * - * @return #GNUNET_YES if all given flags are set - * #GNUNET_NO otherwise - */ -int -Peers_check_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags) -{ - return check_channel_flag_set (channel_flags, flags); -} - -/** - * @brief Get the flags for the channel in @a role for @a peer. - * - * @param peer Peer to get the channel flags for. - * @param role Role of channel to get flags for - * - * @return The flags. - */ -uint32_t * -Peers_get_channel_flag (const struct GNUNET_PeerIdentity *peer, - enum Peers_ChannelRole role) -{ - const struct PeerContext *peer_ctx; - - peer_ctx = get_peer_ctx (peer); - if (Peers_CHANNEL_ROLE_SENDING == role) - { - return peer_ctx->send_channel_flags; - } - else if (Peers_CHANNEL_ROLE_RECEIVING == role) - { - return peer_ctx->recv_channel_flags; - } - else - { - GNUNET_assert (0); - } -} - -/** - * @brief Check whether we have information about the given peer. - * - * FIXME probably deprecated. Make this the new _online. - * - * @param peer peer in question - * - * @return #GNUNET_YES if peer is known - * #GNUNET_NO if peer is not knwon - */ -int -Peers_check_peer_known (const struct GNUNET_PeerIdentity *peer) -{ - return GNUNET_CONTAINER_multipeermap_contains (peer_map, peer); -} - - -/** - * @brief Check whether @a peer is actually a peer. - * - * A valid peer is a peer that we know exists eg. we were connected to once. - * - * @param peer peer in question - * - * @return #GNUNET_YES if peer is valid - * #GNUNET_NO if peer is not valid - */ -int -Peers_check_peer_valid (const struct GNUNET_PeerIdentity *peer) -{ - return GNUNET_CONTAINER_multipeermap_contains (valid_peers, peer); -} - - -/** - * @brief Indicate that we want to send to the other peer - * - * This establishes a sending channel - * - * @param peer the peer to establish channel to - */ -void -Peers_indicate_sending_intention (const struct GNUNET_PeerIdentity *peer) -{ - GNUNET_assert (GNUNET_YES == Peers_check_peer_known (peer)); - (void) get_channel (peer); -} - - -/** - * @brief Check whether other peer has the intention to send/opened channel - * towars us - * - * @param peer the peer in question - * - * @return #GNUNET_YES if peer has the intention to send - * #GNUNET_NO otherwise - */ -int -Peers_check_peer_send_intention (const struct GNUNET_PeerIdentity *peer) -{ - const struct PeerContext *peer_ctx; - - peer_ctx = get_peer_ctx (peer); - if (NULL != peer_ctx->recv_channel) - { - return GNUNET_YES; - } - return GNUNET_NO; -} - - -/** - * Handle the channel a peer opens to us. - * - * @param cls The closure - * @param channel The channel the peer wants to establish - * @param initiator The peer's peer ID - * - * @return initial channel context for the channel - * (can be NULL -- that's not an error) - */ -void * -Peers_handle_inbound_channel (void *cls, - struct GNUNET_CADET_Channel *channel, - const struct GNUNET_PeerIdentity *initiator) -{ - struct PeerContext *peer_ctx; - - LOG (GNUNET_ERROR_TYPE_DEBUG, - "New channel was established to us (Peer %s).\n", - GNUNET_i2s (initiator)); - GNUNET_assert (NULL != channel); /* according to cadet API */ - /* Make sure we 'know' about this peer */ - peer_ctx = create_or_get_peer_ctx (initiator); - set_peer_live (peer_ctx); - /* We only accept one incoming channel per peer */ - if (GNUNET_YES == Peers_check_peer_send_intention (initiator)) - { - set_channel_flag (peer_ctx->recv_channel_flags, - Peers_CHANNEL_ESTABLISHED_TWICE); - GNUNET_CADET_channel_destroy (channel); - /* return the channel context */ - return &peer_ctx->peer_id; - } - peer_ctx->recv_channel = channel; - return &peer_ctx->peer_id; -} - - -/** - * @brief Check whether a sending channel towards the given peer exists - * - * @param peer the peer to check for - * - * @return #GNUNET_YES if a sending channel towards that peer exists - * #GNUNET_NO otherwise - */ -int -Peers_check_sending_channel_exists (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *peer_ctx; - - if (GNUNET_NO == Peers_check_peer_known (peer)) - { /* If no such peer exists, there is no channel */ - return GNUNET_NO; - } - peer_ctx = get_peer_ctx (peer); - if (NULL == peer_ctx->send_channel) - { - return GNUNET_NO; - } - return GNUNET_YES; -} - - -/** - * @brief check whether the given channel is the sending channel of the given - * peer - * - * @param peer the peer in question - * @param channel the channel to check for - * @param role either #Peers_CHANNEL_ROLE_SENDING, or - * #Peers_CHANNEL_ROLE_RECEIVING - * - * @return #GNUNET_YES if the given chennel is the sending channel of the peer - * #GNUNET_NO otherwise - */ -int -Peers_check_channel_role (const struct GNUNET_PeerIdentity *peer, - const struct GNUNET_CADET_Channel *channel, - enum Peers_ChannelRole role) -{ - const struct PeerContext *peer_ctx; - - if (GNUNET_NO == Peers_check_peer_known (peer)) - { - return GNUNET_NO; - } - peer_ctx = get_peer_ctx (peer); - if ( (Peers_CHANNEL_ROLE_SENDING == role) && - (channel == peer_ctx->send_channel) ) - { - return GNUNET_YES; - } - if ( (Peers_CHANNEL_ROLE_RECEIVING == role) && - (channel == peer_ctx->recv_channel) ) - { - return GNUNET_YES; - } - return GNUNET_NO; -} - - -/** - * @brief Destroy the send channel of a peer e.g. stop indicating a sending - * intention to another peer - * - * If there is also no channel to receive messages from that peer, remove it - * from the peermap. - * TODO really? - * - * @peer the peer identity of the peer whose sending channel to destroy - * @return #GNUNET_YES if channel was destroyed - * #GNUNET_NO otherwise - */ -int -Peers_destroy_sending_channel (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *peer_ctx; - - if (GNUNET_NO == Peers_check_peer_known (peer)) - { - return GNUNET_NO; - } - peer_ctx = get_peer_ctx (peer); - if (NULL != peer_ctx->send_channel) - { - set_channel_flag (peer_ctx->send_channel_flags, Peers_CHANNEL_CLEAN); - GNUNET_CADET_channel_destroy (peer_ctx->send_channel); - peer_ctx->send_channel = NULL; - (void) Peers_check_connected (peer); - return GNUNET_YES; - } - return GNUNET_NO; -} - -/** - * This is called when a channel is destroyed. - * - * @param cls The closure - * @param channel The channel being closed - * @param channel_ctx The context associated with this channel - */ -void -Peers_cleanup_destroyed_channel (void *cls, - const struct GNUNET_CADET_Channel *channel) -{ - struct GNUNET_PeerIdentity *peer = cls; - struct PeerContext *peer_ctx; - - if (GNUNET_NO == Peers_check_peer_known (peer)) - {/* We don't want to implicitly create a context that we're about to kill */ - LOG (GNUNET_ERROR_TYPE_DEBUG, - "channel (%s) without associated context was destroyed\n", - GNUNET_i2s (peer)); - return; - } - peer_ctx = get_peer_ctx (peer); - - /* If our peer issued the destruction of the channel, the #Peers_TO_DESTROY - * flag will be set. In this case simply make sure that the channels are - * cleaned. */ - /* FIXME This distinction seems to be redundant */ - if (Peers_check_peer_flag (peer, Peers_TO_DESTROY)) - {/* We initiatad the destruction of this particular peer */ - if (channel == peer_ctx->send_channel) - peer_ctx->send_channel = NULL; - else if (channel == peer_ctx->recv_channel) - peer_ctx->recv_channel = NULL; - - if (NULL != peer_ctx->send_channel) - { - GNUNET_CADET_channel_destroy (peer_ctx->send_channel); - peer_ctx->send_channel = NULL; - } - if (NULL != peer_ctx->recv_channel) - { - GNUNET_CADET_channel_destroy (peer_ctx->recv_channel); - peer_ctx->recv_channel = NULL; - } - /* Set the #Peers_ONLINE flag accordingly */ - (void) Peers_check_connected (peer); - return; - } - - else - { /* We did not initiate the destruction of this peer */ - if (channel == peer_ctx->send_channel) - { /* Something (but us) killd the channel - clean up peer */ - LOG (GNUNET_ERROR_TYPE_DEBUG, - "send channel (%s) was destroyed - cleaning up\n", - GNUNET_i2s (peer)); - peer_ctx->send_channel = NULL; - } - else if (channel == peer_ctx->recv_channel) - { /* Other peer doesn't want to send us messages anymore */ - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Peer %s destroyed recv channel - cleaning up channel\n", - GNUNET_i2s (peer)); - peer_ctx->recv_channel = NULL; - } - else - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "unknown channel (%s) was destroyed\n", - GNUNET_i2s (peer)); - } - } - (void) Peers_check_connected (peer); -} - -/** - * @brief Send a message to another peer. - * - * Keeps track about pending messages so they can be properly removed when the - * peer is destroyed. - * - * @param peer receeiver of the message - * @param ev envelope of the message - * @param type type of the message - */ -void -Peers_send_message (const struct GNUNET_PeerIdentity *peer, - struct GNUNET_MQ_Envelope *ev, - const char *type) -{ - struct PendingMessage *pending_msg; - struct GNUNET_MQ_Handle *mq; - - pending_msg = insert_pending_message (peer, ev, type); - mq = get_mq (peer); - GNUNET_MQ_notify_sent (ev, - mq_notify_sent_cb, - pending_msg); - GNUNET_MQ_send (mq, ev); -} - -/** - * @brief Schedule a operation on given peer - * - * Avoids scheduling an operation twice. - * - * @param peer the peer we want to schedule the operation for once it gets live - * - * @return #GNUNET_YES if the operation was scheduled - * #GNUNET_NO otherwise - */ -int -Peers_schedule_operation (const struct GNUNET_PeerIdentity *peer, - const PeerOp peer_op) -{ - struct PeerPendingOp pending_op; - struct PeerContext *peer_ctx; - - if (0 == GNUNET_CRYPTO_cmp_peer_identity (peer, own_identity)) - { - return GNUNET_NO; - } - GNUNET_assert (GNUNET_YES == Peers_check_peer_known (peer)); - - //TODO if LIVE/ONLINE execute immediately - - if (GNUNET_NO == check_operation_scheduled (peer, peer_op)) - { - peer_ctx = get_peer_ctx (peer); - pending_op.op = peer_op; - pending_op.op_cls = NULL; - GNUNET_array_append (peer_ctx->pending_ops, - peer_ctx->num_pending_ops, - pending_op); - return GNUNET_YES; - } - return GNUNET_NO; -} - -/** - * @brief Get the recv_channel of @a peer. - * Needed to correctly handle (call #GNUNET_CADET_receive_done()) incoming - * messages. - * - * @param peer The peer to get the recv_channel from. - * - * @return The recv_channel. - */ -struct GNUNET_CADET_Channel * -Peers_get_recv_channel (const struct GNUNET_PeerIdentity *peer) -{ - struct PeerContext *peer_ctx; - - GNUNET_assert (GNUNET_YES == Peers_check_peer_known (peer)); - peer_ctx = get_peer_ctx (peer); - return peer_ctx->recv_channel; -} - -/* end of gnunet-service-rps_peers.c */ diff --git a/src/rps/gnunet-service-rps_peers.h b/src/rps/gnunet-service-rps_peers.h @@ -1,437 +0,0 @@ -/* - This file is part of GNUnet. - Copyright (C) - - GNUnet is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GNUnet is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -/** - * @file rps/gnunet-service-rps_peers.h - * @brief utilities for managing (information about) peers - * @author Julius Bünger - */ -#include "gnunet_util_lib.h" -#include <inttypes.h> -#include "gnunet_cadet_service.h" - - -/** - * Different flags indicating the status of another peer. - */ -enum Peers_PeerFlags -{ - /** - * If we are waiting for a reply from that peer (sent a pull request). - */ - Peers_PULL_REPLY_PENDING = 0x01, - - /* IN_OTHER_GOSSIP_LIST = 0x02, unneeded? */ - /* IN_OWN_SAMPLER_LIST = 0x04, unneeded? */ - /* IN_OWN_GOSSIP_LIST = 0x08, unneeded? */ - - /** - * We set this bit when we know the peer is online. - */ - Peers_ONLINE = 0x20, - - /** - * We set this bit when we are going to destroy the channel to this peer. - * When cleanup_channel is called, we know that we wanted to destroy it. - * Otherwise the channel to the other peer was destroyed. - */ - Peers_TO_DESTROY = 0x40, -}; - -/** - * Keep track of the status of a channel. - * - * This is needed in order to know what to do with a channel when it's - * destroyed. - */ -enum Peers_ChannelFlags -{ - /** - * We destroyed the channel because the other peer established a second one. - */ - Peers_CHANNEL_ESTABLISHED_TWICE = 0x1, - - /** - * The channel was removed because it was not needed any more. This should be - * the sending channel. - */ - Peers_CHANNEL_CLEAN = 0x2, -}; - -/** - * @brief The role of a channel. Sending or receiving. - */ -enum Peers_ChannelRole -{ - /** - * Channel is used for sending - */ - Peers_CHANNEL_ROLE_SENDING = 0x01, - - /** - * Channel is used for receiving - */ - Peers_CHANNEL_ROLE_RECEIVING = 0x02, -}; - -/** - * @brief Functions of this type can be used to be stored at a peer for later execution. - * - * @param cls closure - * @param peer peer to execute function on - */ -typedef void (* PeerOp) (void *cls, const struct GNUNET_PeerIdentity *peer); - -/** - * @brief Iterator over valid peers. - * - * @param cls closure - * @param peer current public peer id - * @return #GNUNET_YES if we should continue to - * iterate, - * #GNUNET_NO if not. - */ -typedef int -(*PeersIterator) (void *cls, - const struct GNUNET_PeerIdentity *peer); - -/** - * @brief Initialise storage of peers - * - * @param fn_valid_peers filename of the file used to store valid peer ids - * @param cadet_h cadet handle - * @param disconnect_handler Disconnect handler - * @param c_handlers cadet handlers - * @param own_id own peer identity - */ -void -Peers_initialise (char* fn_valid_peers, - struct GNUNET_CADET_Handle *cadet_h, - GNUNET_CADET_DisconnectEventHandler disconnect_handler, - const struct GNUNET_MQ_MessageHandler *c_handlers, - const struct GNUNET_PeerIdentity *own_id); - -/** - * @brief Delete storage of peers that was created with #Peers_initialise () - */ -void -Peers_terminate (); - - -/** - * @brief Get all currently known, valid peer ids. - * - * @param it function to call on each peer id - * @param it_cls extra argument to @a it - * @return the number of key value pairs processed, - * #GNUNET_SYSERR if it aborted iteration - */ -int -Peers_get_valid_peers (PeersIterator iterator, - void *it_cls); - -/** - * @brief Add peer to known peers. - * - * This function is called on new peer_ids from 'external' sources - * (client seed, cadet get_peers(), ...) - * - * @param peer the new #GNUNET_PeerIdentity - * - * @return #GNUNET_YES if peer was inserted - * #GNUNET_NO otherwise (if peer was already known or - * peer was #own_identity) - */ -int -Peers_insert_peer (const struct GNUNET_PeerIdentity *peer); - -/** - * @brief Try connecting to a peer to see whether it is online - * - * If not known yet, insert into known peers - * - * @param peer the peer whose liveliness is to be checked - * @return #GNUNET_YES if peer had to be inserted - * #GNUNET_NO otherwise (if peer was already known or - * peer was #own_identity) - */ -int -Peers_issue_peer_liveliness_check (const struct GNUNET_PeerIdentity *peer); - -/** - * @brief Check if peer is removable. - * - * Check if - * - a recv channel exists - * - there are pending messages - * - there is no pending pull reply - * - * @param peer the peer in question - * @return #GNUNET_YES if peer is removable - * #GNUNET_NO if peer is NOT removable - * #GNUNET_SYSERR if peer is not known - */ -int -Peers_check_removable (const struct GNUNET_PeerIdentity *peer); - -/** - * @brief Remove peer - * - * @param peer the peer to clean - * @return #GNUNET_YES if peer was removed - * #GNUNET_NO otherwise - */ -int -Peers_remove_peer (const struct GNUNET_PeerIdentity *peer); - -/** - * @brief set flags on a given peer. - * - * @param peer the peer to set flags on - * @param flags the flags - */ -void -Peers_set_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags); - -/** - * @brief unset flags on a given peer. - * - * @param peer the peer to unset flags on - * @param flags the flags - */ -void -Peers_unset_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags); - -/** - * @brief Check whether flags on a peer are set. - * - * @param peer the peer to check the flag of - * @param flags the flags to check - * - * @return #GNUNET_YES if all given flags are set - * ##GNUNET_NO otherwise - */ -int -Peers_check_peer_flag (const struct GNUNET_PeerIdentity *peer, enum Peers_PeerFlags flags); - - -/** - * @brief set flags on a given channel. - * - * @param channel the channel to set flags on - * @param flags the flags - */ -void -Peers_set_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags); - -/** - * @brief unset flags on a given channel. - * - * @param channel the channel to unset flags on - * @param flags the flags - */ -void -Peers_unset_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags); - -/** - * @brief Check whether flags on a channel are set. - * - * @param channel the channel to check the flag of - * @param flags the flags to check - * - * @return #GNUNET_YES if all given flags are set - * #GNUNET_NO otherwise - */ -int -Peers_check_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags); - -/** - * @brief Get the flags for the channel in @a role for @a peer. - * - * @param peer Peer to get the channel flags for. - * @param role Role of channel to get flags for - * - * @return The flags. - */ -uint32_t * -Peers_get_channel_flag (const struct GNUNET_PeerIdentity *peer, - enum Peers_ChannelRole role); - -/** - * @brief Check whether we have information about the given peer. - * - * FIXME probably deprecated. Make this the new _online. - * - * @param peer peer in question - * - * @return #GNUNET_YES if peer is known - * #GNUNET_NO if peer is not knwon - */ -int -Peers_check_peer_known (const struct GNUNET_PeerIdentity *peer); - -/** - * @brief Check whether @a peer is actually a peer. - * - * A valid peer is a peer that we know exists eg. we were connected to once. - * - * @param peer peer in question - * - * @return #GNUNET_YES if peer is valid - * #GNUNET_NO if peer is not valid - */ -int -Peers_check_peer_valid (const struct GNUNET_PeerIdentity *peer); - -/** - * @brief Indicate that we want to send to the other peer - * - * This establishes a sending channel - * - * @param peer the peer to establish channel to - */ -void -Peers_indicate_sending_intention (const struct GNUNET_PeerIdentity *peer); - -/** - * @brief Check whether other peer has the intention to send/opened channel - * towars us - * - * @param peer the peer in question - * - * @return #GNUNET_YES if peer has the intention to send - * #GNUNET_NO otherwise - */ -int -Peers_check_peer_send_intention (const struct GNUNET_PeerIdentity *peer); - -/** - * Handle the channel a peer opens to us. - * - * @param cls The closure - * @param channel The channel the peer wants to establish - * @param initiator The peer's peer ID - * - * @return initial channel context for the channel - * (can be NULL -- that's not an error) - */ -void * -Peers_handle_inbound_channel (void *cls, - struct GNUNET_CADET_Channel *channel, - const struct GNUNET_PeerIdentity *initiator); - -/** - * @brief Check whether a sending channel towards the given peer exists - * - * @param peer the peer to check for - * - * @return #GNUNET_YES if a sending channel towards that peer exists - * #GNUNET_NO otherwise - */ -int -Peers_check_sending_channel_exists (const struct GNUNET_PeerIdentity *peer); - -/** - * @brief check whether the given channel is the sending channel of the given - * peer - * - * @param peer the peer in question - * @param channel the channel to check for - * @param role either #Peers_CHANNEL_ROLE_SENDING, or - * #Peers_CHANNEL_ROLE_RECEIVING - * - * @return #GNUNET_YES if the given chennel is the sending channel of the peer - * #GNUNET_NO otherwise - */ -int -Peers_check_channel_role (const struct GNUNET_PeerIdentity *peer, - const struct GNUNET_CADET_Channel *channel, - enum Peers_ChannelRole role); - -/** - * @brief Destroy the send channel of a peer e.g. stop indicating a sending - * intention to another peer - * - * If there is also no channel to receive messages from that peer, remove it - * from the peermap. - * - * @peer the peer identity of the peer whose sending channel to destroy - * @return #GNUNET_YES if channel was destroyed - * #GNUNET_NO otherwise - */ -int -Peers_destroy_sending_channel (const struct GNUNET_PeerIdentity *peer); - -/** - * This is called when a channel is destroyed. - * - * Removes peer completely from our knowledge if the send_channel was destroyed - * Otherwise simply delete the recv_channel - * - * @param cls The closure - * @param channel The channel being closed - * @param channel_ctx The context associated with this channel - */ -void -Peers_cleanup_destroyed_channel (void *cls, - const struct GNUNET_CADET_Channel *channel); - -/** - * @brief Send a message to another peer. - * - * Keeps track about pending messages so they can be properly removed when the - * peer is destroyed. - * - * @param peer receeiver of the message - * @param ev envelope of the message - * @param type type of the message - */ -void -Peers_send_message (const struct GNUNET_PeerIdentity *peer, - struct GNUNET_MQ_Envelope *ev, - const char *type); - -/** - * @brief Schedule a operation on given peer - * - * Avoids scheduling an operation twice. - * - * @param peer the peer we want to schedule the operation for once it gets live - * - * @return #GNUNET_YES if the operation was scheduled - * #GNUNET_NO otherwise - */ -int -Peers_schedule_operation (const struct GNUNET_PeerIdentity *peer, - const PeerOp peer_op); - -/** - * @brief Get the recv_channel of @a peer. - * Needed to correctly handle (call #GNUNET_CADET_receive_done()) incoming - * messages. - * - * @param peer The peer to get the recv_channel from. - * - * @return The recv_channel. - */ -struct GNUNET_CADET_Channel * -Peers_get_recv_channel (const struct GNUNET_PeerIdentity *peer); - -/* end of gnunet-service-rps_peers.h */ diff --git a/src/rps/rps.h b/src/rps/rps.h @@ -175,4 +175,100 @@ struct GNUNET_RPS_CS_ActMaliciousMessage }; #endif /* ENABLE_MALICIOUS */ + +/*********************************************************************** + * Defines from old gnunet-service-rps_peers.h +***********************************************************************/ + +/** + * Different flags indicating the status of another peer. + */ +enum Peers_PeerFlags +{ + /** + * If we are waiting for a reply from that peer (sent a pull request). + */ + Peers_PULL_REPLY_PENDING = 0x01, + + /* IN_OTHER_GOSSIP_LIST = 0x02, unneeded? */ + /* IN_OWN_SAMPLER_LIST = 0x04, unneeded? */ + /* IN_OWN_GOSSIP_LIST = 0x08, unneeded? */ + + /** + * We set this bit when we know the peer is online. + */ + Peers_ONLINE = 0x20, + + /** + * We set this bit when we are going to destroy the channel to this peer. + * When cleanup_channel is called, we know that we wanted to destroy it. + * Otherwise the channel to the other peer was destroyed. + */ + Peers_TO_DESTROY = 0x40, +}; + +/** + * Keep track of the status of a channel. + * + * This is needed in order to know what to do with a channel when it's + * destroyed. + */ +enum Peers_ChannelFlags +{ + /** + * We destroyed the channel because the other peer established a second one. + */ + Peers_CHANNEL_ESTABLISHED_TWICE = 0x1, + + /** + * The channel was removed because it was not needed any more. This should be + * the sending channel. + */ + Peers_CHANNEL_CLEAN = 0x2, + + /** + * We destroyed the channel because the other peer established a second one. + */ + Peers_CHANNEL_DESTROING = 0x4, +}; + + +/** + * @brief The role of a channel. Sending or receiving. + */ +enum Peers_ChannelRole +{ + /** + * Channel is used for sending + */ + Peers_CHANNEL_ROLE_SENDING = 0x01, + + /** + * Channel is used for receiving + */ + Peers_CHANNEL_ROLE_RECEIVING = 0x02, +}; + +/** + * @brief Functions of this type can be used to be stored at a peer for later execution. + * + * @param cls closure + * @param peer peer to execute function on + */ +typedef void (* PeerOp) (void *cls, const struct GNUNET_PeerIdentity *peer); + +/** + * @brief Iterator over valid peers. + * + * @param cls closure + * @param peer current public peer id + * @return #GNUNET_YES if we should continue to + * iterate, + * #GNUNET_NO if not. + */ +typedef int +(*PeersIterator) (void *cls, + const struct GNUNET_PeerIdentity *peer); + + GNUNET_NETWORK_STRUCT_END diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ /** - * @file rps/test_rps_multipeer.c + * @file rps/test_rps.c * @brief Testcase for the random peer sampling service. Starts * a peergroup with a given number of peers, then waits to * receive size pushes/pulls from each peer. Expects to wait @@ -62,6 +62,19 @@ static unsigned int mal_type = 0; */ static struct GNUNET_TESTBED_Peer **testbed_peers; +/** + * @brief Indicates whether peer should go off- or online + */ +enum PEER_ONLINE_DELTA { + /** + * @brief Indicates peer going online + */ + PEER_GO_ONLINE = 1, + /** + * @brief Indicates peer going offline + */ + PEER_GO_OFFLINE = -1, +}; /** * Operation map entry @@ -84,10 +97,10 @@ struct OpListEntry struct GNUNET_TESTBED_Operation *op; /** - * Depending on whether we start or stop NSE service at the peer set this to 1 - * or -1 + * Depending on whether we start or stop RPS service at the peer, set this to + * #PEER_GO_ONLINE (1) or #PEER_GO_OFFLINE (-1) */ - int delta; + enum PEER_ONLINE_DELTA delta; /** * Index of the regarding peer @@ -188,7 +201,7 @@ struct RPSPeer int online; /** - * Number of Peer IDs to request + * Number of Peer IDs to request during the whole test */ unsigned int num_ids_to_request; @@ -218,6 +231,11 @@ struct RPSPeer * Number of received PeerIDs */ unsigned int num_recv_ids; + + /** + * Pending operation on that peer + */ + const struct OpListEntry *entry_op_manage; }; @@ -259,6 +277,11 @@ static int ok; /** * Identifier for the churn task that runs periodically */ +static struct GNUNET_SCHEDULER_Task *shutdown_task; + +/** + * Identifier for the churn task that runs periodically + */ static struct GNUNET_SCHEDULER_Task *churn_task; /** @@ -267,13 +290,21 @@ static struct GNUNET_SCHEDULER_Task *churn_task; typedef void (*InitPeer) (struct RPSPeer *rps_peer); /** - * Called directly after connecting to the service + * @brief Called directly after connecting to the service + * + * @param rps_peer Specific peer the function is called on + * @param h the handle to the rps service */ -typedef void (*PreTest) (void *cls, struct GNUNET_RPS_Handle *h); +typedef void (*PreTest) (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h); /** + * @brief Executes functions to test the api/service for a given peer + * * Called from within #rps_connect_complete_cb () - * Executes functions to test the api/service + * Implemented by #churn_test_cb, #profiler_cb, #mal_cb, #single_req_cb, + * #delay_req_cb, #seed_big_cb, #single_peer_seed_cb, #seed_cb, #req_cancel_cb + * + * @param rps_peer the peer the task runs on */ typedef void (*MainTest) (struct RPSPeer *rps_peer); @@ -306,7 +337,7 @@ struct SingleTestRun char *name; /** - * Called to initialise peer + * Called with a single peer in order to initialise that peer */ InitPeer init_peer; @@ -316,7 +347,7 @@ struct SingleTestRun PreTest pre_test; /** - * Function to execute the functions to be tested + * Main function for each peer */ MainTest main_test; @@ -344,6 +375,11 @@ struct SingleTestRun * Number of Requests to make. */ uint32_t num_requests; + + /** + * Run with churn + */ + int have_churn; } cur_test_run; /** @@ -497,6 +533,8 @@ shutdown_op (void *cls) { unsigned int i; + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Shutdown task scheduled, going down.\n"); in_shutdown = GNUNET_YES; if (NULL != churn_task) { @@ -578,6 +616,11 @@ info_cb (void *cb_cls, { struct OpListEntry *entry = (struct OpListEntry *) cb_cls; + if (GNUNET_YES == in_shutdown) + { + return; + } + if (NULL == pinfo || NULL != emsg) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Got Error: %s\n", emsg); @@ -627,6 +670,11 @@ rps_connect_complete_cb (void *cls, struct RPSPeer *rps_peer = cls; struct GNUNET_RPS_Handle *rps = ca_result; + if (GNUNET_YES == in_shutdown) + { + return; + } + rps_peer->rps_handle = rps; rps_peer->online = GNUNET_YES; num_peers_online++; @@ -755,7 +803,10 @@ default_reply_handle (void *cls, if (0 == evaluate ()) { - GNUNET_SCHEDULER_shutdown (); + GNUNET_assert (NULL != shutdown_task); + GNUNET_SCHEDULER_cancel (shutdown_task); + shutdown_task = GNUNET_SCHEDULER_add_now (&shutdown_op, NULL); + GNUNET_assert (NULL!= shutdown_task); } } @@ -899,12 +950,20 @@ static void mal_init_peer (struct RPSPeer *rps_peer) rps_peer->num_ids_to_request = 1; } + +/** + * @brief Set peers to (non-)malicious before execution + * + * Of signature #PreTest + * + * @param rps_peer the peer to set (non-) malicious + * @param h the handle to the service + */ static void -mal_pre (void *cls, struct GNUNET_RPS_Handle *h) +mal_pre (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h) { #ifdef ENABLE_MALICIOUS uint32_t num_mal_peers; - struct RPSPeer *rps_peer = (struct RPSPeer *) cls; GNUNET_assert ( (1 >= portion) && (0 < portion) ); @@ -929,6 +988,11 @@ mal_cb (struct RPSPeer *rps_peer) { uint32_t num_mal_peers; + if (GNUNET_YES == in_shutdown) + { + return; + } + #ifdef ENABLE_MALICIOUS GNUNET_assert ( (1 >= portion) && (0 < portion) ); @@ -951,6 +1015,11 @@ mal_cb (struct RPSPeer *rps_peer) static void single_req_cb (struct RPSPeer *rps_peer) { + if (GNUNET_YES == in_shutdown) + { + return; + } + schedule_missing_requests (rps_peer); } @@ -960,6 +1029,11 @@ single_req_cb (struct RPSPeer *rps_peer) static void delay_req_cb (struct RPSPeer *rps_peer) { + if (GNUNET_YES == in_shutdown) + { + return; + } + schedule_missing_requests (rps_peer); } @@ -969,6 +1043,11 @@ delay_req_cb (struct RPSPeer *rps_peer) static void seed_cb (struct RPSPeer *rps_peer) { + if (GNUNET_YES == in_shutdown) + { + return; + } + GNUNET_SCHEDULER_add_delayed ( GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10), seed_peers, rps_peer); @@ -980,6 +1059,11 @@ seed_cb (struct RPSPeer *rps_peer) static void seed_big_cb (struct RPSPeer *rps_peer) { + if (GNUNET_YES == in_shutdown) + { + return; + } + // TODO test seeding > GNUNET_MAX_MESSAGE_SIZE peers GNUNET_SCHEDULER_add_delayed ( GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2), @@ -1001,6 +1085,11 @@ single_peer_seed_cb (struct RPSPeer *rps_peer) static void seed_req_cb (struct RPSPeer *rps_peer) { + if (GNUNET_YES == in_shutdown) + { + return; + } + GNUNET_SCHEDULER_add_delayed ( GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2), seed_peers, rps_peer); @@ -1015,6 +1104,11 @@ seed_req_cb (struct RPSPeer *rps_peer) static void req_cancel_cb (struct RPSPeer *rps_peer) { + if (GNUNET_YES == in_shutdown) + { + return; + } + schedule_missing_requests (rps_peer); GNUNET_SCHEDULER_add_delayed ( GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, @@ -1023,6 +1117,49 @@ req_cancel_cb (struct RPSPeer *rps_peer) } /*********************************** + * CHURN +***********************************/ + +static void +churn (void *cls); + +/** + * @brief Starts churn + * + * Has signature of #MainTest + * + * This is not implemented too nicely as this is called for each peer, but we + * only need to call it once. (Yes we check that we only schedule the task + * once.) + * + * @param rps_peer The peer it's called for + */ +static void +churn_test_cb (struct RPSPeer *rps_peer) +{ + if (GNUNET_YES == in_shutdown) + { + return; + } + + /* Start churn */ + if (GNUNET_YES == cur_test_run.have_churn && NULL == churn_task) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Starting churn task\n"); + churn_task = GNUNET_SCHEDULER_add_delayed ( + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5), + churn, + NULL); + } else { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Not starting churn task\n"); + } + + schedule_missing_requests (rps_peer); +} + +/*********************************** * PROFILER ***********************************/ @@ -1041,6 +1178,11 @@ churn_cb (void *cls, // FIXME struct OpListEntry *entry = cls; + if (GNUNET_YES == in_shutdown) + { + return; + } + GNUNET_TESTBED_operation_done (entry->op); if (NULL != emsg) { @@ -1052,7 +1194,7 @@ churn_cb (void *cls, num_peers_online += entry->delta; - if (0 > entry->delta) + if (PEER_GO_OFFLINE == entry->delta) { /* Peer hopefully just went offline */ if (GNUNET_YES != rps_peers[entry->index].online) { @@ -1070,7 +1212,7 @@ churn_cb (void *cls, rps_peers[entry->index].online = GNUNET_NO; } - else if (0 < entry->delta) + else if (PEER_GO_ONLINE < entry->delta) { /* Peer hopefully just went online */ if (GNUNET_NO != rps_peers[entry->index].online) { @@ -1093,20 +1235,44 @@ churn_cb (void *cls, } rps_peers[entry->index].online = GNUNET_YES; } + else + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Invalid value for delta: %i\n", entry->delta); + GNUNET_break (0); + } GNUNET_CONTAINER_DLL_remove (oplist_head, oplist_tail, entry); + rps_peers[entry->index].entry_op_manage = NULL; GNUNET_free (entry); //if (num_peers_in_round[current_round] == peers_running) // run_round (); } +/** + * @brief Set the rps-service up or down for a specific peer + * + * @param i index of action + * @param j index of peer + * @param delta (#PEER_ONLINE_DELTA) down (-1) or up (1) + * @param prob_go_on_off the probability of the action + */ static void -manage_service_wrapper (unsigned int i, unsigned int j, int delta, - double prob_go_on_off) +manage_service_wrapper (unsigned int i, unsigned int j, + enum PEER_ONLINE_DELTA delta, + double prob_go_on_off) { struct OpListEntry *entry; uint32_t prob; + GNUNET_assert (GNUNET_YES == rps_peers[j].online); + + /* make sure that management operation is not already scheduled */ + if (NULL != rps_peers[j].entry_op_manage) + { + return; + } + prob = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, UINT32_MAX); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -1114,15 +1280,19 @@ manage_service_wrapper (unsigned int i, unsigned int j, int delta, i, j, GNUNET_i2s (rps_peers[j].peer_id), - (0 > delta) ? "online" : "offline"); + (PEER_GO_ONLINE == delta) ? "online" : "offline"); if (prob < prob_go_on_off * UINT32_MAX) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%s goes %s\n", GNUNET_i2s (rps_peers[j].peer_id), - (0 > delta) ? "offline" : "online"); + (PEER_GO_OFFLINE == delta) ? "offline" : "online"); + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "testbed_peers points to %p, peer 0 to %p\n", + testbed_peers, testbed_peers[0]); - if (0 > delta) + if (PEER_GO_OFFLINE == delta) cancel_pending_req_rep (&rps_peers[j]); entry = make_oplist_entry (); entry->delta = delta; @@ -1132,8 +1302,9 @@ manage_service_wrapper (unsigned int i, unsigned int j, int delta, "rps", &churn_cb, entry, - (0 > delta) ? 0 : 1); + (PEER_GO_OFFLINE == delta) ? 0 : 1); } + rps_peers[j].entry_op_manage = entry; } @@ -1148,6 +1319,15 @@ churn (void *cls) double portion_go_online; double portion_go_offline; + if (GNUNET_YES == in_shutdown) + { + return; + } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Churn function executing\n"); + + churn_task = NULL; /* Should be invalid by now */ + /* Compute the probability for an online peer to go offline * this round */ portion_online = num_peers_online * 1.0 / num_peers; @@ -1255,13 +1435,23 @@ profiler_reply_handle (void *cls, static void profiler_cb (struct RPSPeer *rps_peer) { + if (GNUNET_YES == in_shutdown) + { + return; + } + /* Start churn */ - if (NULL == churn_task) + if (GNUNET_YES == cur_test_run.have_churn && NULL == churn_task) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Starting churn task\n"); churn_task = GNUNET_SCHEDULER_add_delayed ( GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5), churn, NULL); + } else { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Not starting churn task\n"); } /* Only request peer ids at one peer. @@ -1353,6 +1543,24 @@ run (void *cls, struct OpListEntry *entry; uint32_t num_mal_peers; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "RUN was called\n"); + + /* Check whether we timed out */ + if (n_peers != num_peers || + NULL == peers || + 0 == links_succeeded) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Going down due to args (eg. timeout)\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\tn_peers: %u\n", n_peers); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\tnum_peers: %" PRIu32 "\n", num_peers); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\tpeers: %p\n", peers); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "\tlinks_succeeded: %u\n", links_succeeded); + GNUNET_SCHEDULER_shutdown (); + return; + } + + + /* Initialize peers */ testbed_peers = peers; num_peers_online = 0; for (i = 0; i < num_peers; i++) @@ -1368,6 +1576,7 @@ run (void *cls, entry); } + /* Bring peers up */ num_mal_peers = round (portion * num_peers); GNUNET_assert (num_peers == n_peers); for (i = 0; i < n_peers; i++) @@ -1390,7 +1599,7 @@ run (void *cls, if (NULL != churn_task) GNUNET_SCHEDULER_cancel (churn_task); - GNUNET_SCHEDULER_add_delayed (timeout, &shutdown_op, NULL); + shutdown_task = GNUNET_SCHEDULER_add_delayed (timeout, &shutdown_op, NULL); } @@ -1412,6 +1621,7 @@ main (int argc, char *argv[]) cur_test_run.pre_test = NULL; cur_test_run.reply_handle = default_reply_handle; cur_test_run.eval_cb = default_eval_cb; + cur_test_run.have_churn = GNUNET_YES; churn_task = NULL; timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30); @@ -1446,6 +1656,7 @@ main (int argc, char *argv[]) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Test single request\n"); cur_test_run.name = "test-rps-single-req"; cur_test_run.main_test = single_req_cb; + cur_test_run.have_churn = GNUNET_NO; } else if (strstr (argv[0], "_delayed_reqs") != NULL) @@ -1453,6 +1664,7 @@ main (int argc, char *argv[]) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test delayed requests\n"); cur_test_run.name = "test-rps-delayed-reqs"; cur_test_run.main_test = delay_req_cb; + cur_test_run.have_churn = GNUNET_NO; } else if (strstr (argv[0], "_seed_big") != NULL) @@ -1462,6 +1674,7 @@ main (int argc, char *argv[]) cur_test_run.name = "test-rps-seed-big"; cur_test_run.main_test = seed_big_cb; cur_test_run.eval_cb = no_eval; + cur_test_run.have_churn = GNUNET_NO; timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10); } @@ -1470,6 +1683,7 @@ main (int argc, char *argv[]) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test seeding and requesting on a single peer\n"); cur_test_run.name = "test-rps-single-peer-seed"; cur_test_run.main_test = single_peer_seed_cb; + cur_test_run.have_churn = GNUNET_NO; } else if (strstr (argv[0], "_seed_request") != NULL) @@ -1477,6 +1691,7 @@ main (int argc, char *argv[]) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test seeding and requesting on multiple peers\n"); cur_test_run.name = "test-rps-seed-request"; cur_test_run.main_test = seed_req_cb; + cur_test_run.have_churn = GNUNET_NO; } else if (strstr (argv[0], "_seed") != NULL) @@ -1485,6 +1700,7 @@ main (int argc, char *argv[]) cur_test_run.name = "test-rps-seed"; cur_test_run.main_test = seed_cb; cur_test_run.eval_cb = no_eval; + cur_test_run.have_churn = GNUNET_NO; } else if (strstr (argv[0], "_req_cancel") != NULL) @@ -1494,6 +1710,20 @@ main (int argc, char *argv[]) num_peers = 1; cur_test_run.main_test = req_cancel_cb; cur_test_run.eval_cb = no_eval; + cur_test_run.have_churn = GNUNET_NO; + timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10); + } + + else if (strstr (argv[0], "_churn") != NULL) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test churn\n"); + cur_test_run.name = "test-rps-churn"; + num_peers = 5; + cur_test_run.init_peer = default_init_peer; + cur_test_run.main_test = churn_test_cb; + cur_test_run.reply_handle = default_reply_handle; + cur_test_run.eval_cb = default_eval_cb; + cur_test_run.have_churn = GNUNET_YES; timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10); } @@ -1510,6 +1740,7 @@ main (int argc, char *argv[]) cur_test_run.eval_cb = profiler_eval; cur_test_run.request_interval = 2; cur_test_run.num_requests = 5; + cur_test_run.have_churn = GNUNET_YES; timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 90); /* 'Clean' directory */ @@ -1529,17 +1760,24 @@ main (int argc, char *argv[]) with the malicious portion */ ok = 1; - (void) GNUNET_TESTBED_test_run (cur_test_run.name, - "test_rps.conf", - num_peers, - 0, NULL, NULL, - &run, NULL); + ret_value = GNUNET_TESTBED_test_run (cur_test_run.name, + "test_rps.conf", + num_peers, + 0, NULL, NULL, + &run, NULL); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "_test_run returned.\n"); + if (GNUNET_OK != ret_value) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Test did not run successfully!\n"); + } ret_value = cur_test_run.eval_cb(); - GNUNET_free (rps_peers ); + GNUNET_free (rps_peers); GNUNET_free (rps_peer_ids); GNUNET_CONTAINER_multipeermap_destroy (peer_map); return ret_value; } -/* end of test_rps_multipeer.c */ +/* end of test_rps.c */ diff --git a/src/rps/test_rps.conf b/src/rps/test_rps.conf @@ -24,16 +24,16 @@ INITSIZE = 4 [testbed] HOSTNAME = localhost -OPERATION_TIMEOUT = 60 s +# OPERATION_TIMEOUT = 60 s -MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 1 -#OVERLAY_TOPOLOGY = CLIQUE -OVERLAY_TOPOLOGY = SMALL_WORLD +# MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 100 +OVERLAY_TOPOLOGY = CLIQUE +#OVERLAY_TOPOLOGY = SMALL_WORLD #SCALE_FREE_TOPOLOGY_CAP = -OVERLAY_RANDOM_LINKS = 25 +# OVERLAY_RANDOM_LINKS = 25 -SETUP_TIMEOUT = 2 m +# SETUP_TIMEOUT = 2 m [nse] WORKBITS = 0 @@ -46,7 +46,27 @@ USE_LOCALADDR = YES RETURN_LOCAL_ADDRESSES = YES [transport] -PLUGINS = unix +PLUGINS = udp + +[ats] +# Network specific inbound/outbound quotas +UNSPECIFIED_QUOTA_IN = unlimited +UNSPECIFIED_QUOTA_OUT = unlimited +# LOOPBACK +LOOPBACK_QUOTA_IN = unlimited +LOOPBACK_QUOTA_OUT = unlimited +# LAN +LAN_QUOTA_IN = unlimited +LAN_QUOTA_OUT = unlimited +#WAN +WAN_QUOTA_OUT = unlimited +WAN_QUOTA_IN = unlimited +# WLAN +WLAN_QUOTA_IN = unlimited +WLAN_QUOTA_OUT = unlimited +# BLUETOOTH +BLUETOOTH_QUOTA_IN = unlimited +BLUETOOTH_QUOTA_OUT = unlimited [dht] DISABLE_TRY_CONNECT = YES @@ -69,6 +89,10 @@ NO_IO = YES FORCESTART = NO AUTOSTART = NO +[zonemaster] +FORCESTART = NO +AUTOSTART = NO + [namecache] FORCESTART = NO AUTOSTART = NO diff --git a/src/rps/test_service_rps_peers.c b/src/rps/test_service_rps_peers.c @@ -1,137 +0,0 @@ -/* - This file is part of GNUnet. - Copyright (C) - - GNUnet is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GNUnet is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -/** - * @file rps/test_service_rps_peers.c - * @brief testcase for gnunet-service-rps_peers.c - */ -#include <platform.h> -#include "gnunet-service-rps_peers.h" - -#define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); Peers_terminate (); return 1; } -#define CHECK(c) { if (! (c)) ABORT(); } - -#define FN_VALID_PEERS "DISABLE" - -/** - * @brief Dummy implementation of #PeerOp (Operation on peer) - * - * @param cls closure - * @param peer peer - */ -void peer_op (void *cls, const struct GNUNET_PeerIdentity *peer) -{ - GNUNET_assert (NULL != peer); -} - -/** - * @brief Function that is called on a peer for later execution - * - * @param cls closure - * @param peer peer to execute function upon - */ -void -peer_op (void *cls, const struct GNUNET_PeerIdentity *peer); - -static int -check () -{ - struct GNUNET_PeerIdentity k1; - struct GNUNET_PeerIdentity own_id; - - memset (&k1, 0, sizeof (k1)); - memset (&own_id, 1, sizeof (own_id)); - - /* Do nothing */ - Peers_initialise (FN_VALID_PEERS, NULL, NULL, NULL, &own_id); - Peers_terminate (); - - - /* Create peer */ - Peers_initialise (FN_VALID_PEERS, NULL, NULL, NULL, &own_id); - CHECK (GNUNET_YES == Peers_insert_peer (&k1)); - Peers_terminate (); - - - /* Create peer */ - Peers_initialise (FN_VALID_PEERS, NULL, NULL, NULL, &own_id); - CHECK (GNUNET_YES == Peers_insert_peer (&k1)); - CHECK (GNUNET_YES == Peers_remove_peer (&k1)); - Peers_terminate (); - - - /* Insertion and Removal */ - Peers_initialise (FN_VALID_PEERS, NULL, NULL, NULL, &own_id); - CHECK (GNUNET_NO == Peers_check_peer_known (&k1)); - - CHECK (GNUNET_YES == Peers_insert_peer (&k1)); - CHECK (GNUNET_NO == Peers_insert_peer (&k1)); - CHECK (GNUNET_YES == Peers_check_peer_known (&k1)); - - CHECK (GNUNET_YES == Peers_remove_peer (&k1)); - CHECK (GNUNET_NO == Peers_remove_peer (&k1)); - CHECK (GNUNET_NO == Peers_check_peer_known (&k1)); - - - /* Flags */ - Peers_insert_peer (&k1); - - CHECK (GNUNET_NO == Peers_check_peer_flag (&k1, Peers_PULL_REPLY_PENDING)); - CHECK (GNUNET_NO == Peers_check_peer_flag (&k1, Peers_ONLINE)); - CHECK (GNUNET_NO == Peers_check_peer_flag (&k1, Peers_TO_DESTROY)); - - CHECK (GNUNET_NO == Peers_check_peer_flag (&k1, Peers_ONLINE)); - - Peers_set_peer_flag (&k1, Peers_ONLINE); - CHECK (GNUNET_YES == Peers_check_peer_flag (&k1, Peers_ONLINE)); - CHECK (GNUNET_NO == Peers_check_peer_flag (&k1, Peers_TO_DESTROY)); - CHECK (GNUNET_YES == Peers_check_peer_flag (&k1, Peers_ONLINE)); - CHECK (GNUNET_NO == Peers_check_peer_flag (&k1, Peers_TO_DESTROY)); - - /* Check send intention */ - CHECK (GNUNET_NO == Peers_check_peer_send_intention (&k1)); - - /* Check existence of sending channel */ - CHECK (GNUNET_NO == Peers_check_sending_channel_exists (&k1)); - - /* Check role of channels */ - CHECK (GNUNET_YES == Peers_check_channel_role (&k1, - NULL, - Peers_CHANNEL_ROLE_SENDING)); - CHECK (GNUNET_YES == Peers_check_channel_role (&k1, - NULL, - Peers_CHANNEL_ROLE_RECEIVING)); - - CHECK (GNUNET_YES == Peers_schedule_operation (&k1, peer_op)); - - Peers_terminate (); - return 0; -} - - -int -main (int argc, char *argv[]) -{ - GNUNET_log_setup ("test_service_rps_peers", - "WARNING", - NULL); - return check (); -} - -/* end of test_service_rps_peers.c */ diff --git a/src/set/Makefile.am b/src/set/Makefile.am @@ -52,7 +52,7 @@ gnunet_set_ibf_profiler_LDADD = \ gnunet_service_set_SOURCES = \ gnunet-service-set.c gnunet-service-set.h \ gnunet-service-set_union.c gnunet-service-set_union.h \ - gnunet-service-set_intersection.c \ + gnunet-service-set_intersection.c gnunet-service-set_intersection.h \ ibf.c ibf.h \ gnunet-service-set_union_strata_estimator.c gnunet-service-set_union_strata_estimator.h \ gnunet-service-set_protocol.h diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c @@ -364,7 +364,7 @@ fail_union_operation (struct Operation *op) struct GNUNET_MQ_Envelope *ev; struct GNUNET_SET_ResultMessage *msg; - LOG (GNUNET_ERROR_TYPE_ERROR, + LOG (GNUNET_ERROR_TYPE_WARNING, "union operation failed\n"); ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_RESULT); msg->result_status = htons (GNUNET_SET_STATUS_FAILURE); @@ -389,10 +389,11 @@ get_ibf_key (const struct GNUNET_HashCode *src) struct IBF_Key key; uint16_t salt = 0; - GNUNET_CRYPTO_kdf (&key, sizeof (key), - src, sizeof *src, - &salt, sizeof (salt), - NULL, 0); + GNUNET_assert (GNUNET_OK == + GNUNET_CRYPTO_kdf (&key, sizeof (key), + src, sizeof *src, + &salt, sizeof (salt), + NULL, 0)); return key; } @@ -1404,7 +1405,7 @@ send_client_done (void *cls) } if (PHASE_DONE != op->state->phase) { - LOG (GNUNET_ERROR_TYPE_ERROR, + LOG (GNUNET_ERROR_TYPE_WARNING, "union operation failed\n"); ev = GNUNET_MQ_msg (rm, GNUNET_MESSAGE_TYPE_SET_RESULT); rm->result_status = htons (GNUNET_SET_STATUS_FAILURE); diff --git a/src/set/set_api.c b/src/set/set_api.c @@ -695,6 +695,7 @@ GNUNET_SET_add_element (struct GNUNET_SET_Handle *set, "adding element of type %u to set %p\n", (unsigned int) element->element_type, set); + GNUNET_assert (NULL != set); if (GNUNET_YES == set->invalid) { if (NULL != cont) @@ -772,6 +773,7 @@ GNUNET_SET_destroy (struct GNUNET_SET_Handle *set) /* destroying set while iterator is active is currently not supported; we should expand the API to allow clients to explicitly cancel the iteration! */ + GNUNET_assert (NULL != set); if ( (NULL != set->ops_head) || (NULL != set->iterator) || (GNUNET_SYSERR == set->destroy_requested) ) @@ -1124,11 +1126,12 @@ GNUNET_SET_commit (struct GNUNET_SET_OperationHandle *oh, { if (NULL != oh->set) { - /* Some other set was already commited for this + /* Some other set was already committed for this * operation, there is a logic bug in the client of this API */ GNUNET_break (0); return GNUNET_OK; } + GNUNET_assert (NULL != set); if (GNUNET_YES == set->invalid) return GNUNET_SYSERR; LOG (GNUNET_ERROR_TYPE_DEBUG, diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c @@ -96,7 +96,7 @@ static struct GNUNET_CONTAINER_MultiHashMap *apps_places; * Application subscriptions per place. * H(place_pub_key) -> H(app_id) */ -static struct GNUNET_CONTAINER_MultiHashMap *places_apps; +//static struct GNUNET_CONTAINER_MultiHashMap *places_apps; /** * Connected applications. @@ -255,10 +255,10 @@ struct Place uint8_t is_ready; /** - * Is the client disconnected? + * Is the client disconnecting? * #GNUNET_YES or #GNUNET_NO */ - uint8_t is_disconnected; + uint8_t is_disconnecting; /** * Is this a host (#GNUNET_YES), or guest (#GNUNET_NO)? @@ -348,7 +348,7 @@ struct Guest /** * Join request to be transmitted to the master on join. */ - struct GNUNET_MessageHeader *join_req; + struct GNUNET_MessageHeader *join_req; // FIXME: not used! /** * Join decision received from PSYC. @@ -487,8 +487,6 @@ cleanup_host (struct Host *hst) { struct Place *plc = &hst->place; - if (NULL != hst->master) - GNUNET_PSYC_master_stop (hst->master, GNUNET_NO, NULL, NULL); // FIXME GNUNET_CONTAINER_multihashmap_destroy (hst->join_reqs); GNUNET_CONTAINER_multihashmap_destroy (hst->relay_msgs); GNUNET_CONTAINER_multihashmap_remove (hosts, &plc->pub_key_hash, plc); @@ -505,23 +503,22 @@ cleanup_guest (struct Guest *gst) struct GNUNET_CONTAINER_MultiHashMap * plc_gst = GNUNET_CONTAINER_multihashmap_get (place_guests, &plc->pub_key_hash); - GNUNET_assert (NULL != plc_gst); // FIXME - GNUNET_CONTAINER_multihashmap_remove (plc_gst, &plc->ego_pub_hash, gst); - - if (0 == GNUNET_CONTAINER_multihashmap_size (plc_gst)) + if (NULL != plc_gst) { - GNUNET_CONTAINER_multihashmap_remove (place_guests, &plc->pub_key_hash, - plc_gst); - GNUNET_CONTAINER_multihashmap_destroy (plc_gst); + GNUNET_CONTAINER_multihashmap_remove (plc_gst, &plc->ego_pub_hash, gst); + + if (0 == GNUNET_CONTAINER_multihashmap_size (plc_gst)) + { + GNUNET_CONTAINER_multihashmap_remove (place_guests, &plc->pub_key_hash, + plc_gst); + GNUNET_CONTAINER_multihashmap_destroy (plc_gst); + } } GNUNET_CONTAINER_multihashmap_remove (guests, &plc->pub_key_hash, gst); - if (NULL != gst->join_req) GNUNET_free (gst->join_req); if (NULL != gst->relays) GNUNET_free (gst->relays); - if (NULL != gst->slave) - GNUNET_PSYC_slave_part (gst->slave, GNUNET_NO, NULL, NULL); // FIXME GNUNET_CONTAINER_multihashmap_remove (guests, &plc->pub_key_hash, plc); } @@ -537,8 +534,8 @@ cleanup_place (void *cls) struct Place *plc = cls; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Cleaning up place %s\n", - plc, GNUNET_h2s (&plc->pub_key_hash)); + "cleaning up place %s\n", + GNUNET_h2s (&plc->pub_key_hash)); (GNUNET_YES == plc->is_host) ? cleanup_host ((struct Host *) plc) @@ -583,12 +580,19 @@ client_notify_disconnect (void *cls, { if (cli->client == client) { - GNUNET_CONTAINER_DLL_remove (plc->clients_head, plc->clients_tail, cli); + GNUNET_CONTAINER_DLL_remove (plc->clients_head, + plc->clients_tail, + cli); GNUNET_free (cli); break; } cli = cli->next; } + if (GNUNET_YES == plc->is_disconnecting) + { + GNUNET_PSYC_slicer_destroy (plc->slicer); + GNUNET_free (plc); + } } @@ -605,46 +609,55 @@ client_notify_connect (void *cls, struct GNUNET_SERVICE_Client *client, struct GNUNET_MQ_Handle *mq) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client connected: %p\n", client); + struct Client *c = GNUNET_new (struct Client); - struct Client *c = GNUNET_malloc (sizeof (*c)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Client %p connected with queue %p\n", + client, + mq); c->client = client; - return c; } /** - * Send message to a client. - */ -static inline void -client_send_msg (struct GNUNET_SERVICE_Client *client, - const struct GNUNET_MessageHeader *msg) -{ - struct GNUNET_MQ_Envelope * - env = GNUNET_MQ_msg_copy (msg); - - GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), - env); -} - - -/** - * Send message to all clients connected to a place. + * Send message to all clients connected to a place and + * takes care of freeing @env. */ static void place_send_msg (const struct Place *plc, - const struct GNUNET_MessageHeader *msg) + struct GNUNET_MQ_Envelope *env) { + struct ClientListItem *cli = plc->clients_head; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Sending message to clients of place.\n", plc); - - struct ClientListItem *cli = plc->clients_head; while (NULL != cli) { - client_send_msg (cli->client, msg); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Sending message to client %p\n", + cli); + GNUNET_MQ_send_copy (GNUNET_SERVICE_client_get_mq (cli->client), + env); cli = cli->next; } + GNUNET_MQ_discard (env); +} + + +static void +place_send_leave_ack (struct Place *plc) +{ + struct GNUNET_MQ_Envelope *env; + + for (struct ClientListItem *cli = plc->clients_head; + NULL != cli; + cli = cli->next) + { + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE_ACK); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (cli->client), + env); + } } @@ -666,23 +679,21 @@ static void client_send_result (struct GNUNET_SERVICE_Client *client, uint64_t op_id, int64_t result_code, const void *data, uint16_t data_size) { + struct GNUNET_MQ_Envelope *env; struct GNUNET_OperationResultMessage *res; - res = GNUNET_malloc (sizeof (*res) + data_size); - res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE); - res->header.size = htons (sizeof (*res) + data_size); + env = GNUNET_MQ_msg_extra (res, + data_size, + GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE); res->result_code = GNUNET_htonll (result_code); res->op_id = op_id; if (0 < data_size) GNUNET_memcpy (&res[1], data, data_size); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Sending result to client for operation #%" PRIu64 ": " "%" PRId64 " (size: %u)\n", client, GNUNET_ntohll (op_id), result_code, data_size); - - client_send_msg (client, &res->header); - GNUNET_free (res); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), env); } @@ -690,19 +701,21 @@ static void client_send_host_enter_ack (struct GNUNET_SERVICE_Client *client, struct Host *hst, uint32_t result) { + struct GNUNET_MQ_Envelope *env; + struct HostEnterAck *hack; struct Place *plc = &hst->place; - struct HostEnterAck hack; - hack.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK); - hack.header.size = htons (sizeof (hack)); - hack.result_code = htonl (result); - hack.max_message_id = GNUNET_htonll (plc->max_message_id); - hack.place_pub_key = plc->pub_key; + env = GNUNET_MQ_msg (hack, + GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK); + hack->result_code = htonl (result); + hack->max_message_id = GNUNET_htonll (plc->max_message_id); + hack->place_pub_key = plc->pub_key; if (NULL != client) - client_send_msg (client, &hack.header); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); else - place_send_msg (plc, &hack.header); + place_send_msg (plc, env); } @@ -736,7 +749,8 @@ psyc_recv_join_request (void *cls, GNUNET_CRYPTO_hash (slave_key, sizeof (*slave_key), &slave_key_hash); GNUNET_CONTAINER_multihashmap_put (hst->join_reqs, &slave_key_hash, jh, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); - place_send_msg (&hst->place, &req->header); + place_send_msg (&hst->place, + GNUNET_MQ_msg_copy (&req->header)); } @@ -746,18 +760,29 @@ psyc_recv_join_request (void *cls, static void psyc_slave_connected (void *cls, int result, uint64_t max_message_id) { + struct GNUNET_PSYC_CountersResultMessage *res; + struct GNUNET_MQ_Envelope *env; struct Guest *gst = cls; struct Place *plc = &gst->place; + plc->max_message_id = max_message_id; plc->is_ready = GNUNET_YES; + env = GNUNET_MQ_msg (res, + GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK); + res->result_code = + (result != GNUNET_SYSERR) ? htonl (GNUNET_OK) : htonl (GNUNET_SYSERR); + res->max_message_id = GNUNET_htonll (plc->max_message_id); + place_send_msg (plc, env); +} - struct GNUNET_PSYC_CountersResultMessage res; - res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK); - res.header.size = htons (sizeof (res)); - res.result_code = htonl (result); - res.max_message_id = GNUNET_htonll (plc->max_message_id); - place_send_msg (plc, &res.header); +static void +slave_parted_after_join_decision (void *cls) +{ + struct Guest *gst = cls; + + GNUNET_assert (NULL != gst->join_dcsn); + place_send_msg (&gst->place, GNUNET_MQ_msg_copy (&gst->join_dcsn->header)); } @@ -771,7 +796,21 @@ psyc_recv_join_dcsn (void *cls, const struct GNUNET_PSYC_Message *join_msg) { struct Guest *gst = cls; - place_send_msg (&gst->place, &dcsn->header); + + gst->join_dcsn = GNUNET_malloc (dcsn->header.size); + GNUNET_memcpy (gst->join_dcsn, + dcsn, + dcsn->header.size); + if (GNUNET_NO == is_admitted) + { + GNUNET_PSYC_slave_part (gst->slave, + GNUNET_NO, + &slave_parted_after_join_decision, + gst); + gst->slave = NULL; + return; + } + place_send_msg (&gst->place, GNUNET_MQ_msg_copy (&gst->join_dcsn->header)); } @@ -792,7 +831,7 @@ psyc_recv_message (void *cls, GNUNET_PSYC_slicer_message (plc->slicer, msg); - place_send_msg (plc, &msg->header); + place_send_msg (plc, GNUNET_MQ_msg_copy (&msg->header)); } @@ -1096,9 +1135,6 @@ place_init (struct Place *plc) static int place_add (const struct PlaceEnterRequest *ereq) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Adding place to hashmap:\n"); - struct EgoPlacePublicKey ego_place_pub_key = { .ego_pub_key = ereq->ego_pub_key, .place_pub_key = ereq->place_pub_key, @@ -1173,7 +1209,9 @@ app_place_add (const char *app_id, return GNUNET_NO; if (GNUNET_SYSERR == place_add (ereq)) + { return GNUNET_SYSERR; + } if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put (app_places, &ego_place_pub_hash, NULL, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)) @@ -1181,32 +1219,6 @@ app_place_add (const char *app_id, GNUNET_break (0); return GNUNET_SYSERR; } - - struct GNUNET_HashCode place_pub_hash; - GNUNET_CRYPTO_hash (&ereq->place_pub_key, sizeof (ereq->place_pub_key), &place_pub_hash); - - struct GNUNET_CONTAINER_MultiHashMap * - place_apps = GNUNET_CONTAINER_multihashmap_get (places_apps, &place_pub_hash); - if (NULL == place_apps) - { - place_apps = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_NO); - if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put (places_apps, &place_pub_hash, place_apps, - GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)) - { - GNUNET_break (0); - } - } - - size_t app_id_size = strlen (app_id) + 1; - void *app_id_value = GNUNET_malloc (app_id_size); - GNUNET_memcpy (app_id_value, app_id, app_id_size); - - if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put (place_apps, &app_id_hash, app_id_value, - GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) - { - GNUNET_break (0); - } - return GNUNET_OK; } @@ -1223,7 +1235,10 @@ static int app_place_save (const char *app_id, const struct PlaceEnterRequest *ereq) { - app_place_add (app_id, ereq); + if (GNUNET_SYSERR == app_place_add (app_id, ereq)) + { + GNUNET_assert (0); + } if (NULL == dir_places) return GNUNET_SYSERR; @@ -1304,18 +1319,6 @@ app_place_remove (const char *app_id, if (NULL != app_places) GNUNET_CONTAINER_multihashmap_remove (app_places, &place_pub_hash, NULL); - struct GNUNET_CONTAINER_MultiHashMap * - place_apps = GNUNET_CONTAINER_multihashmap_get (places_apps, &place_pub_hash); - if (NULL != place_apps) - { - void *app_id_value = GNUNET_CONTAINER_multihashmap_get (place_apps, &app_id_hash); - if (NULL != app_id_value) - { - GNUNET_CONTAINER_multihashmap_remove (place_apps, &app_id_hash, app_id_value); - GNUNET_free (app_id_value); - } - } - int ret = GNUNET_OK; if (0 != unlink (app_place_filename)) @@ -1389,24 +1392,150 @@ msg_proc_parse (const struct MsgProcRequest *mpreq, const char **method_prefix, struct GNUNET_HashCode *method_hash) { - uint8_t method_size = ntohs (mpreq->header.size) - sizeof (*mpreq); - uint16_t offset = GNUNET_STRINGS_buffer_tokenize ((const char *) &mpreq[1], - method_size, 1, method_prefix); + ssize_t method_size = ntohs (mpreq->header.size) - sizeof (*mpreq); + uint16_t offset; - if (0 == offset || offset != method_size || *method_prefix == NULL) + if (method_size < 0) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "offset = %u, method_size = %u, method_name = %s\n", - offset, method_size, *method_prefix); + "MsgProcRequest has invalid size\n"); return GNUNET_SYSERR; } - GNUNET_CRYPTO_hash (*method_prefix, method_size, method_hash); + offset = GNUNET_STRINGS_buffer_tokenize ((const char *) &mpreq[1], + method_size, + 1, + method_prefix); + if (0 == offset || offset != method_size || *method_prefix == NULL) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "MsgProcRequest contains invalid method\n"); + return GNUNET_SYSERR; + } + GNUNET_CRYPTO_hash (*method_prefix, (size_t) method_size, method_hash); *flags = ntohl (mpreq->flags); return GNUNET_OK; } +void +app_notify_place (const struct GNUNET_MessageHeader *msg, + struct GNUNET_SERVICE_Client *client) +{ + struct AppPlaceMessage *amsg; + struct GNUNET_MQ_Envelope *env; + uint16_t msg_size = ntohs (msg->size); + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "%p Sending place notification of type %u to client.\n", + client, ntohs (msg->type)); + switch (ntohs (msg->type)) + { + case GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER: + { + struct HostEnterRequest *hreq = (struct HostEnterRequest *) msg; + if (msg_size < sizeof (struct HostEnterRequest)) + return; + env = GNUNET_MQ_msg (amsg, + GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE); + // FIXME: also notify about not entered places + amsg->place_state = GNUNET_SOCIAL_PLACE_STATE_ENTERED; + amsg->is_host = GNUNET_YES; + amsg->ego_pub_key = hreq->ego_pub_key; + amsg->place_pub_key = hreq->place_pub_key; + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); + break; + } + case GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER: + { + if (msg_size < sizeof (struct GuestEnterRequest)) + return; + struct GuestEnterRequest *greq = (struct GuestEnterRequest *) msg; + env = GNUNET_MQ_msg (amsg, + GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE); + // FIXME: also notify about not entered places + amsg->place_state = GNUNET_SOCIAL_PLACE_STATE_ENTERED; + amsg->is_host = GNUNET_NO; + amsg->ego_pub_key = greq->ego_pub_key; + amsg->place_pub_key = greq->place_pub_key; + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); + break; + } + default: + return; + } +} + + +void +app_notify_place_end (struct GNUNET_SERVICE_Client *client) +{ + struct GNUNET_MQ_Envelope *env; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "%p Sending end of place list notification to client\n", + client); + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); +} + + +void +app_notify_ego (struct Ego *ego, struct GNUNET_SERVICE_Client *client) +{ + struct AppEgoMessage *emsg; + struct GNUNET_MQ_Envelope *env; + size_t name_size = strlen (ego->name) + 1; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "%p Sending ego notification to client: %s\n", + client, ego->name); + env = GNUNET_MQ_msg_extra (emsg, + name_size, + GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO); + GNUNET_CRYPTO_ecdsa_key_get_public (&ego->key, &emsg->ego_pub_key); + GNUNET_memcpy (&emsg[1], ego->name, name_size); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); +} + + +void +app_notify_ego_end (struct GNUNET_SERVICE_Client *client) +{ + struct GNUNET_MQ_Envelope *env; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "%p Sending end of ego list notification to client\n", + client); + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); +} + + +int +app_place_entry_notify (void *cls, const struct GNUNET_HashCode *key, void *value) +{ + struct GNUNET_MessageHeader * + msg = GNUNET_CONTAINER_multihashmap_get (places, key); + if (NULL != msg) + app_notify_place (msg, cls); + return GNUNET_YES; +} + + +int +ego_entry (void *cls, const struct GNUNET_HashCode *key, void *value) +{ + app_notify_ego (value, cls); + return GNUNET_YES; +} + + static int check_client_msg_proc_set (void *cls, const struct MsgProcRequest *mpreq) @@ -1518,9 +1647,8 @@ static void handle_client_host_enter (void *cls, const struct HostEnterRequest *hr) { - struct Client *c = cls; + struct Client *c = cls; struct GNUNET_SERVICE_Client *client = c->client; - struct HostEnterRequest * hreq = (struct HostEnterRequest *) GNUNET_copy_message (&hr->header); @@ -1578,7 +1706,7 @@ handle_client_host_enter (void *cls, if (ret != GNUNET_SYSERR) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Client connected as host to place %s.\n", hst, GNUNET_h2s (&plc->pub_key_hash)); @@ -1586,6 +1714,7 @@ handle_client_host_enter (void *cls, cli->client = client; GNUNET_CONTAINER_DLL_insert (plc->clients_head, plc->clients_tail, cli); c->place = plc; + app_notify_place (&hreq->header, client); } GNUNET_CRYPTO_eddsa_key_clear (&hreq->place_key); @@ -1622,8 +1751,12 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) struct Ego *ego = GNUNET_CONTAINER_multihashmap_get (egos, &ego_pub_hash); if (NULL == ego) + { return GNUNET_SYSERR; + } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "entering as guest\n"); struct GNUNET_HashCode place_pub_hash; GNUNET_CRYPTO_hash (&greq->place_pub_key, sizeof (greq->place_pub_key), &place_pub_hash); @@ -1631,13 +1764,24 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) struct GNUNET_CONTAINER_MultiHashMap * plc_gst = GNUNET_CONTAINER_multihashmap_get (place_guests, &place_pub_hash); struct Guest *gst = NULL; + int new_guest; if (NULL != plc_gst) gst = GNUNET_CONTAINER_multihashmap_get (plc_gst, &ego_pub_hash); - if (NULL == gst || NULL == gst->slave) + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "plc_gst = %p, gst = %p\n", + plc_gst, + gst); + + new_guest = GNUNET_NO; + if (NULL == gst) { gst = GNUNET_new (struct Guest); + new_guest = GNUNET_YES; + } + if (NULL == gst->slave) + { gst->origin = greq->origin; gst->relay_count = ntohl (greq->relay_count); @@ -1711,10 +1855,14 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) (void) GNUNET_CONTAINER_multihashmap_put (place_guests, &plc->pub_key_hash, plc_gst, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); } - (void) GNUNET_CONTAINER_multihashmap_put (plc_gst, &plc->ego_pub_hash, gst, - GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); - (void) GNUNET_CONTAINER_multihashmap_put (guests, &plc->pub_key_hash, gst, + if (GNUNET_YES == new_guest) + { + (void) GNUNET_CONTAINER_multihashmap_put (plc_gst, &plc->ego_pub_hash, gst, + GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); + (void) GNUNET_CONTAINER_multihashmap_put (guests, &plc->pub_key_hash, gst, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); + + } gst->slave = GNUNET_PSYC_slave_join (cfg, &plc->pub_key, &plc->ego_key, gst->join_flags, &gst->origin, @@ -1724,9 +1872,13 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) &psyc_recv_join_dcsn, gst, join_msg); plc->channel = GNUNET_PSYC_slave_get_channel (gst->slave); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "slave entered channel %p\n", + plc->channel); ret = GNUNET_YES; } + // TODO: explain why free(gst) not necessary if (NULL != ret_gst) *ret_gst = gst; return ret; @@ -1734,78 +1886,96 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) static int -check_client_guest_enter (void *cls, - const struct GuestEnterRequest *greq) +client_guest_enter (struct Client *c, + const struct GuestEnterRequest *greq) { - return GNUNET_OK; -} - - -/** - * Handle a connecting client entering a place as guest. - */ -static void -handle_client_guest_enter (void *cls, - const struct GuestEnterRequest *greq) -{ - struct Client *c = cls; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "client_guest_enter\n"); + struct GNUNET_PSYC_CountersResultMessage *result_msg; + struct GNUNET_MQ_Envelope *env; struct GNUNET_SERVICE_Client *client = c->client; - uint16_t remaining = ntohs (greq->header.size) - sizeof (*greq); const char *app_id = NULL; uint16_t offset = GNUNET_STRINGS_buffer_tokenize ((const char *) &greq[1], remaining, 1, &app_id); - if (0 == offset) - { - GNUNET_break (0); - GNUNET_SERVICE_client_drop (client); - return; - } - struct Guest *gst = NULL; struct Place *plc = NULL; + if (0 == offset) + { + return GNUNET_SYSERR; + } switch (guest_enter (greq, &gst)) { case GNUNET_YES: + { plc = c->place = &gst->place; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "guest entered successfully to local place %s\n", + GNUNET_h2s (&plc->pub_key_hash)); plc->guest = gst; app_place_save (app_id, (const struct PlaceEnterRequest *) greq); + app_notify_place (&greq->header, client); break; - + } case GNUNET_NO: { plc = c->place = &gst->place; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "guest re-entered successfully to local place %s\n", + GNUNET_h2s (&plc->pub_key_hash)); plc->guest = gst; - - struct GNUNET_PSYC_CountersResultMessage res; - res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK); - res.header.size = htons (sizeof (res)); - res.result_code = htonl (GNUNET_OK); - res.max_message_id = GNUNET_htonll (plc->max_message_id); - - client_send_msg (client, &res.header); + env = GNUNET_MQ_msg (result_msg, + GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK); + result_msg->result_code = htonl (GNUNET_OK); + result_msg->max_message_id = GNUNET_htonll (plc->max_message_id); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); if (NULL != gst->join_dcsn) - client_send_msg (client, &gst->join_dcsn->header); - + { + env = GNUNET_MQ_msg_copy (&gst->join_dcsn->header); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); + } break; } case GNUNET_SYSERR: - GNUNET_break (0); - GNUNET_SERVICE_client_drop (client); - return; + { + return GNUNET_SYSERR; + } } - - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Client connected as guest to place %s.\n", - gst, GNUNET_h2s (&plc->pub_key_hash)); struct ClientListItem *cli = GNUNET_new (struct ClientListItem); cli->client = client; GNUNET_CONTAINER_DLL_insert (plc->clients_head, plc->clients_tail, cli); + return GNUNET_OK; +} - c->place = plc; - GNUNET_SERVICE_client_continue (client); + +static int +check_client_guest_enter (void *cls, + const struct GuestEnterRequest *greq) +{ + return GNUNET_OK; +} + + +/** + * Handle a connecting client entering a place as guest. + */ +static void +handle_client_guest_enter (void *cls, + const struct GuestEnterRequest *greq) +{ + struct Client *c = cls; + + if (GNUNET_SYSERR == client_guest_enter (c, greq)) + { + GNUNET_break (0); + GNUNET_SERVICE_client_drop (c->client); + return; + } + GNUNET_SERVICE_client_continue (c->client); } @@ -1830,7 +2000,7 @@ gns_result_guest_enter (void *cls, uint32_t rd_count, { struct GuestEnterByNameClosure *gcls = cls; struct Client *c = gcls->client; - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p GNS result: %u records.\n", c, rd_count); @@ -1882,7 +2052,7 @@ gns_result_guest_enter (void *cls, uint32_t rd_count, p += relay_size; GNUNET_memcpy (p, gcls->join_msg, join_msg_size); - handle_client_guest_enter (c, greq); + client_guest_enter (c, greq); GNUNET_free (gcls->app_id); if (NULL != gcls->password) @@ -1960,118 +2130,7 @@ handle_client_guest_enter_by_name (void *cls, GNUNET_GNSRECORD_TYPE_PLACE, GNUNET_GNS_LO_DEFAULT, &gns_result_guest_enter, gcls); -} - - -void -app_notify_place (struct GNUNET_MessageHeader *msg, - struct GNUNET_SERVICE_Client *client) -{ - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Sending place notification of type %u to client.\n", - client, ntohs (msg->type)); - - uint16_t msg_size = ntohs (msg->size); - struct AppPlaceMessage amsg; - amsg.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE); - amsg.header.size = htons (sizeof (amsg)); - // FIXME: also notify about not entered places - amsg.place_state = GNUNET_SOCIAL_PLACE_STATE_ENTERED; - - switch (ntohs (msg->type)) - { - case GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER: - if (msg_size < sizeof (struct HostEnterRequest)) - return; - struct HostEnterRequest *hreq = (struct HostEnterRequest *) msg; - amsg.is_host = GNUNET_YES; - amsg.ego_pub_key = hreq->ego_pub_key; - amsg.place_pub_key = hreq->place_pub_key; - break; - - case GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER: - if (msg_size < sizeof (struct GuestEnterRequest)) - return; - struct GuestEnterRequest *greq = (struct GuestEnterRequest *) msg; - amsg.is_host = GNUNET_NO; - amsg.ego_pub_key = greq->ego_pub_key; - amsg.place_pub_key = greq->place_pub_key; - break; - - default: - return; - } - - client_send_msg (client, &amsg.header); -} - - -void -app_notify_place_end (struct GNUNET_SERVICE_Client *client) -{ - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Sending end of place list notification to client\n", - client); - - struct GNUNET_MessageHeader msg; - msg.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END); - msg.size = htons (sizeof (msg)); - - client_send_msg (client, &msg); -} - - -void -app_notify_ego (struct Ego *ego, struct GNUNET_SERVICE_Client *client) -{ - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Sending ego notification to client: %s\n", - client, ego->name); - - size_t name_size = strlen (ego->name) + 1; - struct AppEgoMessage *emsg = GNUNET_malloc (sizeof (*emsg) + name_size); - emsg->header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO); - emsg->header.size = htons (sizeof (*emsg) + name_size); - - GNUNET_CRYPTO_ecdsa_key_get_public (&ego->key, &emsg->ego_pub_key); - GNUNET_memcpy (&emsg[1], ego->name, name_size); - - client_send_msg (client, &emsg->header); - GNUNET_free (emsg); -} - - -void -app_notify_ego_end (struct GNUNET_SERVICE_Client *client) -{ - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Sending end of ego list notification to client\n", - client); - - struct GNUNET_MessageHeader msg; - msg.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END); - msg.size = htons (sizeof (msg)); - - client_send_msg (client, &msg); -} - - -int -app_place_entry_notify (void *cls, const struct GNUNET_HashCode *key, void *value) -{ - struct GNUNET_MessageHeader * - msg = GNUNET_CONTAINER_multihashmap_get (places, key); - if (NULL != msg) - app_notify_place (msg, cls); - return GNUNET_YES; -} - - -int -ego_entry (void *cls, const struct GNUNET_HashCode *key, void *value) -{ - app_notify_ego (value, cls); - return GNUNET_YES; + GNUNET_SERVICE_client_continue (client); } @@ -2092,20 +2151,34 @@ handle_client_app_connect (void *cls, { struct Client *c = cls; struct GNUNET_SERVICE_Client *client = c->client; - - uint8_t app_id_size = ntohs (creq->header.size) - sizeof (*creq); + ssize_t app_id_size = ntohs (creq->header.size) - sizeof (*creq); const char *app_id = NULL; - uint16_t offset = GNUNET_STRINGS_buffer_tokenize ((const char *) &creq[1], - app_id_size, 1, &app_id); + uint16_t offset; + + if (app_id_size < 0) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "AppConnectRequest has invalid size\n"); + GNUNET_break (0); + GNUNET_SERVICE_client_drop (client); + return; + } + + offset = GNUNET_STRINGS_buffer_tokenize ((const char *) &creq[1], + (size_t) app_id_size, + 1, + &app_id); if (0 == offset || offset != app_id_size) { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "AppConnectRequest contains invalid app ID\n"); GNUNET_break (0); GNUNET_SERVICE_client_drop (client); return; } struct GNUNET_HashCode app_id_hash; - GNUNET_CRYPTO_hash (app_id, app_id_size, &app_id_hash); + GNUNET_CRYPTO_hash (app_id, (size_t) app_id_size, &app_id_hash); GNUNET_CONTAINER_multihashmap_iterate (egos, ego_entry, client); app_notify_ego_end (client); @@ -2130,8 +2203,8 @@ handle_client_app_connect (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Application %s connected.\n", app, app_id); - c->app_id = GNUNET_malloc (app_id_size); - GNUNET_memcpy (c->app_id, app_id, app_id_size); + c->app_id = GNUNET_malloc ((size_t) app_id_size); + GNUNET_memcpy (c->app_id, app_id, (size_t) app_id_size); GNUNET_SERVICE_client_continue (client); } @@ -2154,13 +2227,15 @@ handle_client_app_detach (void *cls, } -int -app_places_entry_remove (void *cls, const struct GNUNET_HashCode *key, void *value) +static void +place_leave_cb (void *cls) { struct Place *plc = cls; - const char *app_id = value; - app_place_remove (app_id, &plc->ego_pub_key, &plc->pub_key); - return GNUNET_YES; + + place_send_leave_ack (plc); + (GNUNET_YES == plc->is_host) + ? cleanup_host ((struct Host *) plc) + : cleanup_guest ((struct Guest *) plc); } @@ -2174,6 +2249,11 @@ handle_client_place_leave (void *cls, struct Client *c = cls; struct GNUNET_SERVICE_Client *client = c->client; struct Place *plc = c->place; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "got leave request from %s for place %s", + plc->is_host? "host" : "slave", + GNUNET_h2s (&plc->pub_key_hash)); if (NULL == plc) { GNUNET_break (0); @@ -2181,40 +2261,28 @@ handle_client_place_leave (void *cls, return; } - /* FIXME: remove all app subscriptions and leave this place */ - - struct GNUNET_CONTAINER_MultiHashMap * - place_apps = GNUNET_CONTAINER_multihashmap_get (places_apps, &plc->pub_key_hash); - if (NULL != place_apps) + if (GNUNET_YES != plc->is_disconnecting) { - GNUNET_CONTAINER_multihashmap_iterate (place_apps, app_places_entry_remove, plc); - } - - /* FIXME: disconnect from the network, but keep local connection for history access */ - - /* Disconnect all clients connected to the place */ - struct ClientListItem *cli = plc->clients_head, *next; - while (NULL != cli) - { - GNUNET_CONTAINER_DLL_remove (plc->clients_head, plc->clients_tail, cli); - GNUNET_SERVICE_client_drop (cli->client); - next = cli->next; - GNUNET_free (cli); - cli = next; - } - - if (GNUNET_YES != plc->is_disconnected) - { - plc->is_disconnected = GNUNET_YES; - if (NULL != plc->tmit_msgs_head) - { /* Send pending messages to PSYC before cleanup. */ - psyc_transmit_message (plc); + plc->is_disconnecting = GNUNET_YES; + if (plc->is_host) + { + struct Host *host = plc->host; + GNUNET_assert (NULL != host); + GNUNET_PSYC_master_stop (host->master, GNUNET_NO, &place_leave_cb, plc); } else { - cleanup_place (plc); + struct Guest *guest = plc->guest; + GNUNET_assert (NULL != guest); + GNUNET_PSYC_slave_part (guest->slave, GNUNET_NO, &place_leave_cb, plc); } } + else + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "got leave request but place is already leaving\n"); + } + GNUNET_SERVICE_client_continue (client); } @@ -2273,6 +2341,9 @@ handle_client_join_decision (void *cls, ? (struct GNUNET_PSYC_Message *) &dcsn[1] : NULL; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "jcls.msg = %p\n", + jcls.msg); struct GNUNET_HashCode slave_pub_hash; GNUNET_CRYPTO_hash (&dcsn->slave_pub_key, sizeof (dcsn->slave_pub_key), &slave_pub_hash); @@ -2302,10 +2373,11 @@ handle_client_join_decision (void *cls, static void send_message_ack (struct Place *plc, struct GNUNET_SERVICE_Client *client) { - struct GNUNET_MessageHeader res; - res.size = htons (sizeof (res)); - res.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK); - client_send_msg (client, &res); + struct GNUNET_MQ_Envelope *env; + + env = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK); + GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), + env); } @@ -2437,7 +2509,6 @@ psyc_transmit_notify_data (void *cls, uint16_t *data_size, void *data) { *data_size = 0; tmit_msg = psyc_transmit_queue_next_msg (plc, tmit_msg); - plc->is_disconnected = GNUNET_YES; GNUNET_SERVICE_client_drop (tmit_frag->client); GNUNET_SCHEDULER_add_now (&cleanup_place, plc); return ret; @@ -2479,11 +2550,7 @@ psyc_transmit_notify_data (void *cls, uint16_t *data_size, void *data) { psyc_transmit_message (plc); } - else if (GNUNET_YES == plc->is_disconnected) - { - /* FIXME: handle partial message (when still in_transmit) */ - cleanup_place (plc); - } + /* FIXME: handle partial message (when still in_transmit) */ } return ret; } @@ -2597,7 +2664,6 @@ psyc_transmit_notify_mod (void *cls, uint16_t *data_size, void *data, *data_size = 0; ret = GNUNET_SYSERR; tmit_msg = psyc_transmit_queue_next_msg (plc, tmit_msg); - plc->is_disconnected = GNUNET_YES; GNUNET_SERVICE_client_drop (tmit_frag->client); GNUNET_SCHEDULER_add_now (&cleanup_place, plc); } @@ -2862,26 +2928,26 @@ psyc_transmit_queue_message (struct Place *plc, } -/** - * Cancel transmission of current message to PSYC. - * - * @param plc Place to send to. - * @param client Client the message originates from. - */ -static void -psyc_transmit_cancel (struct Place *plc, struct GNUNET_SERVICE_Client *client) -{ - uint16_t type = GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_CANCEL; - - struct GNUNET_MessageHeader msg; - msg.size = htons (sizeof (msg)); - msg.type = htons (type); - - psyc_transmit_queue_message (plc, client, sizeof (msg), &msg, type, type, NULL); - psyc_transmit_message (plc); - - /* FIXME: cleanup */ -} +///** +// * Cancel transmission of current message to PSYC. +// * +// * @param plc Place to send to. +// * @param client Client the message originates from. +// */ +//static void +//psyc_transmit_cancel (struct Place *plc, struct GNUNET_SERVICE_Client *client) +//{ +// uint16_t type = GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_CANCEL; +// +// struct GNUNET_MessageHeader msg; +// msg.size = htons (sizeof (msg)); +// msg.type = htons (type); +// +// psyc_transmit_queue_message (plc, client, sizeof (msg), &msg, type, type, NULL); +// psyc_transmit_message (plc); +// +// /* FIXME: cleanup */ +//} static int @@ -2902,17 +2968,19 @@ handle_client_psyc_message (void *cls, struct Client *c = cls; struct GNUNET_SERVICE_Client *client = c->client; struct Place *plc = c->place; + int ret; + if (NULL == plc) { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "received PSYC message for non-existing client %p\n", + client); GNUNET_break (0); GNUNET_SERVICE_client_drop (client); return; } - - int ret = GNUNET_SYSERR; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%p Received message from client.\n", plc); + "%p Received message of type %d from client.\n", plc, ntohs (msg->type)); GNUNET_PSYC_log_message (GNUNET_ERROR_TYPE_DEBUG, msg); if (GNUNET_YES != plc->is_ready) @@ -2933,20 +3001,19 @@ handle_client_psyc_message (void *cls, "%p Received message with invalid payload size (%u) from client.\n", plc, psize); GNUNET_break (0); - psyc_transmit_cancel (plc, client); GNUNET_SERVICE_client_drop (client); return; } - uint16_t first_ptype = 0, last_ptype = 0; - if (GNUNET_SYSERR - == GNUNET_PSYC_receive_check_parts (psize, (const char *) &msg[1], - &first_ptype, &last_ptype)) + uint16_t first_ptype = 0; + uint16_t last_ptype = 0; + if (GNUNET_SYSERR == + GNUNET_PSYC_receive_check_parts (psize, (const char *) &msg[1], + &first_ptype, &last_ptype)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%p Received invalid message part from client.\n", plc); GNUNET_break (0); - psyc_transmit_cancel (plc, client); GNUNET_SERVICE_client_drop (client); return; } @@ -2963,20 +3030,19 @@ handle_client_psyc_message (void *cls, c->tmit_msg = NULL; ret = psyc_transmit_message (plc); } - + else + { + ret = GNUNET_SYSERR; + } if (GNUNET_OK != ret) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%p Received invalid message part from client.\n", plc); GNUNET_break (0); - psyc_transmit_cancel (plc, client); - ret = GNUNET_SYSERR; - } - - if (GNUNET_OK == ret) - GNUNET_SERVICE_client_continue (client); - else GNUNET_SERVICE_client_drop (client); + return; + } + GNUNET_SERVICE_client_continue (client); } @@ -3006,7 +3072,7 @@ psyc_recv_history_message (void *cls, const struct GNUNET_PSYC_MessageHeader *ms GNUNET_memcpy (&res[1], msg, size); /** @todo FIXME: send only to requesting client */ - place_send_msg (plc, &res->header); + place_send_msg (plc, GNUNET_MQ_msg_copy (&res->header)); GNUNET_free (res); } @@ -3108,29 +3174,24 @@ psyc_recv_state_var (void *cls, uint32_t value_size, uint32_t full_value_size) { + struct GNUNET_OperationResultMessage *result_msg; + struct GNUNET_MQ_Envelope *env; struct OperationClosure *opcls = cls; struct Client *c = opcls->client; struct Place *plc = c->place; + uint16_t size = ntohs (mod->size); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Received state variable %s from PSYC\n", plc, name); - - uint16_t size = ntohs (mod->size); - - struct GNUNET_OperationResultMessage * - res = GNUNET_malloc (sizeof (*res) + size); - res->header.size = htons (sizeof (*res) + size); - res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT); - res->op_id = opcls->op_id; - res->result_code = GNUNET_htonll (GNUNET_OK); - - GNUNET_memcpy (&res[1], mod, size); - + env = GNUNET_MQ_msg_extra (result_msg, + size, + GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT); + result_msg->op_id = opcls->op_id; + result_msg->result_code = GNUNET_htonll (GNUNET_OK); + GNUNET_memcpy (&result_msg[1], mod, size); /** @todo FIXME: send only to requesting client */ - place_send_msg (plc, &res->header); - - GNUNET_free (res); + place_send_msg (plc, env); } @@ -3184,7 +3245,7 @@ handle_client_state_get (void *cls, uint16_t size = ntohs (req->header.size); const char *name = (const char *) &req[1]; - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p State get #%" PRIu64 ": %s\n", plc, GNUNET_ntohll (req->op_id), name); @@ -3382,7 +3443,7 @@ path_basename (const char *path) if (NULL != basename) basename++; - if (NULL == basename || '\0' == basename) + if (NULL == basename || '\0' == *basename) return NULL; return basename; @@ -3468,7 +3529,10 @@ file_place_load (void *cls, const char *place_filename) return GNUNET_OK; } - app_place_add (plcls->app_id, ereq); + if (GNUNET_SYSERR == app_place_add (plcls->app_id, ereq)) + { + GNUNET_assert (0); + } GNUNET_free (ereq); return GNUNET_OK; } @@ -3523,6 +3587,10 @@ identity_recv_ego (void *cls, struct GNUNET_IDENTITY_Ego *id_ego, if (NULL == id_ego) // end of initial list of egos return; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "social service received ego %s\n", + name); + struct GNUNET_CRYPTO_EcdsaPublicKey ego_pub_key; GNUNET_IDENTITY_ego_get_public_key (id_ego, &ego_pub_key); @@ -3571,6 +3639,9 @@ run (void *cls, const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_SERVICE_Handle *svc) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "starting social service\n"); + cfg = c; service = svc; GNUNET_CRYPTO_get_peer_identity (cfg, &this_peer); @@ -3583,7 +3654,7 @@ run (void *cls, apps = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_NO); places = GNUNET_CONTAINER_multihashmap_create(1, GNUNET_NO); apps_places = GNUNET_CONTAINER_multihashmap_create(1, GNUNET_NO); - places_apps = GNUNET_CONTAINER_multihashmap_create(1, GNUNET_NO); + //places_apps = GNUNET_CONTAINER_multihashmap_create(1, GNUNET_NO); id = GNUNET_IDENTITY_connect (cfg, &identity_recv_ego, NULL); gns = GNUNET_GNS_connect (cfg); diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c @@ -283,7 +283,7 @@ exit_fail () static void host_left (void *cls) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "The host has left the place.\n"); exit_success (); } @@ -309,7 +309,7 @@ host_leave () static void guest_left (void *cls) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Guest has left the place.\n"); } @@ -518,7 +518,7 @@ look_var (void *cls, uint32_t value_size, uint32_t full_value_size) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Received var: %s\n%.*s\n", name, value_size, (const char *) value); } @@ -558,7 +558,7 @@ slicer_recv_method (void *cls, const char *method_name) { method_received = method_name; - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Received method for message ID %" PRIu64 ":\n" "%s (flags: %x)\n", message_id, method_name, ntohl (meth->flags)); @@ -584,7 +584,7 @@ slicer_recv_modifier (void *cls, uint16_t full_value_size) { #if 0 - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Received modifier for message ID %" PRIu64 ":\n" "%c%s: %.*s (size: %u)\n", message_id, oper, name, value_size, (const char *) value, value_size); @@ -608,7 +608,7 @@ slicer_recv_data (void *cls, uint16_t data_size) { #if 0 - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Received data for message ID %" PRIu64 ":\n" "%.*s\n", message_id, data_size, (const char *) data); @@ -631,7 +631,7 @@ slicer_recv_eom (void *cls, uint8_t is_cancelled) { printf(".\n"); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Received end of message ID %" PRIu64 ", cancelled: %u\n", message_id, is_cancelled); @@ -668,7 +668,7 @@ guest_recv_entry_decision (void *cls, int is_admitted, const struct GNUNET_PSYC_Message *entry_msg) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Guest received entry decision %d\n", is_admitted); @@ -683,7 +683,7 @@ guest_recv_entry_decision (void *cls, GNUNET_PSYC_message_parse (pmsg, &method_name, env, &data, &data_size); GNUNET_free (pmsg); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "%s\n%.*s\n", method_name, data_size, (const char *) data); } @@ -704,7 +704,7 @@ guest_recv_local_enter (void *cls, int result, uint64_t max_message_id) { char *pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Guest entered local place: %s, max_message_id: %" PRIu64 "\n", pub_str, max_message_id); GNUNET_free (pub_str); @@ -802,7 +802,7 @@ host_answer_door (void *cls, char * nym_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Entry request: %s\n", nym_str); GNUNET_free (nym_str); @@ -840,7 +840,7 @@ host_farewell (void *cls, char * nym_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Farewell: %s\n", nym_str); GNUNET_free (nym_str); } @@ -856,7 +856,7 @@ host_entered (void *cls, int result, { place_pub_key = *pub_key; char *pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Host entered: %s, max_message_id: %" PRIu64 "\n", pub_str, max_message_id); GNUNET_free (pub_str); diff --git a/src/social/social_api.c b/src/social/social_api.c @@ -183,6 +183,7 @@ struct GNUNET_SOCIAL_Place */ struct GNUNET_PSYC_Slicer *slicer; + // FIXME: do we need is_disconnecing like on the psyc and multicast APIs? /** * Function called after disconnected from the service. */ @@ -371,6 +372,68 @@ struct ZoneAddNymHandle }; +/*** CLEANUP / DISCONNECT ***/ + + +static void +host_cleanup (struct GNUNET_SOCIAL_Host *hst) +{ + if (NULL != hst->slicer) + { + GNUNET_PSYC_slicer_destroy (hst->slicer); + hst->slicer = NULL; + } + GNUNET_free (hst); +} + + +static void +guest_cleanup (struct GNUNET_SOCIAL_Guest *gst) +{ + GNUNET_free (gst); +} + + +static void +place_cleanup (struct GNUNET_SOCIAL_Place *plc) +{ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "cleaning up place %p\n", + plc); + if (NULL != plc->tmit) + { + GNUNET_PSYC_transmit_destroy (plc->tmit); + plc->tmit = NULL; + } + if (NULL != plc->connect_env) + { + GNUNET_MQ_discard (plc->connect_env); + plc->connect_env = NULL; + } + if (NULL != plc->mq) + { + GNUNET_MQ_destroy (plc->mq); + plc->mq = NULL; + } + if (NULL != plc->disconnect_cb) + { + plc->disconnect_cb (plc->disconnect_cls); + plc->disconnect_cb = NULL; + } + + (GNUNET_YES == plc->is_host) + ? host_cleanup ((struct GNUNET_SOCIAL_Host *) plc) + : guest_cleanup ((struct GNUNET_SOCIAL_Guest *) plc); +} + + +static void +place_disconnect (struct GNUNET_SOCIAL_Place *plc) +{ + place_cleanup (plc); +} + + /*** NYM ***/ static struct GNUNET_SOCIAL_Nym * @@ -428,7 +491,7 @@ host_recv_notice_place_leave_method (void *cls, struct GNUNET_SOCIAL_Nym *nym = nym_get_or_create (&msg->slave_pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Host received method for message ID %" PRIu64 " from nym %s: %s\n", message_id, GNUNET_h2s (&nym->pub_key_hash), method_name); @@ -436,7 +499,7 @@ host_recv_notice_place_leave_method (void *cls, hst->notice_place_leave_env = GNUNET_PSYC_env_create (); char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&hst->notice_place_leave_nym->pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "_notice_place_leave: got method from nym %s (%s).\n", GNUNET_h2s (&hst->notice_place_leave_nym->pub_key_hash), str); GNUNET_free (str); @@ -458,7 +521,7 @@ host_recv_notice_place_leave_modifier (void *cls, if (NULL == hst->notice_place_leave_env) return; - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Host received modifier for _notice_place_leave message with ID %" PRIu64 ":\n" "%c%s: %.*s\n", message_id, oper, name, value_size, (const char *) value); @@ -485,7 +548,7 @@ host_recv_notice_place_leave_eom (void *cls, return; char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&hst->notice_place_leave_nym->pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "_notice_place_leave: got EOM from nym %s (%s).\n", GNUNET_h2s (&hst->notice_place_leave_nym->pub_key_hash), str); GNUNET_free (str); @@ -1015,100 +1078,24 @@ handle_app_place_end (void *cls, } -/*** CLEANUP / DISCONNECT ***/ - - -static void -host_cleanup (struct GNUNET_SOCIAL_Host *hst) -{ - if (NULL != hst->slicer) - { - GNUNET_PSYC_slicer_destroy (hst->slicer); - hst->slicer = NULL; - } - GNUNET_free (hst); -} - - +/** + * Handler for a #GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE_ACK message received + * from the social service. + * + * @param cls the place of type `struct GNUNET_SOCIAL_Place` + * @param msg the message received from the service + */ static void -guest_cleanup (struct GNUNET_SOCIAL_Guest *gst) +handle_place_leave_ack (void *cls, + const struct GNUNET_MessageHeader *msg) { - GNUNET_free (gst); -} - + struct GNUNET_SOCIAL_Place *plc = cls; -static void -place_cleanup (struct GNUNET_SOCIAL_Place *plc) -{ - struct GNUNET_HashCode place_pub_hash; - GNUNET_CRYPTO_hash (&plc->pub_key, sizeof (plc->pub_key), &place_pub_hash); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "%s place cleanup: %s\n", - GNUNET_YES == plc->is_host ? "host" : "guest", - GNUNET_h2s (&place_pub_hash)); - - if (NULL != plc->tmit) - { - GNUNET_PSYC_transmit_destroy (plc->tmit); - plc->tmit = NULL; - } - if (NULL != plc->connect_env) - { - GNUNET_MQ_discard (plc->connect_env); - plc->connect_env = NULL; - } - if (NULL != plc->mq) - { - GNUNET_MQ_destroy (plc->mq); - plc->mq = NULL; - } - if (NULL != plc->disconnect_cb) - { - plc->disconnect_cb (plc->disconnect_cls); - plc->disconnect_cb = NULL; - } - - (GNUNET_YES == plc->is_host) - ? host_cleanup ((struct GNUNET_SOCIAL_Host *) plc) - : guest_cleanup ((struct GNUNET_SOCIAL_Guest *) plc); -} - - -void -place_disconnect (struct GNUNET_SOCIAL_Place *plc, - GNUNET_ContinuationCallback cb, - void *cls) -{ - plc->disconnect_cb = cb; - plc->disconnect_cls = cls; - - if (NULL != plc->mq) - { - struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (plc->mq); - if (NULL != env) - { - GNUNET_MQ_notify_sent (env, (GNUNET_SCHEDULER_TaskCallback) place_cleanup, plc); - } - else - { - place_cleanup (plc); - } - } - else - { - place_cleanup (plc); - } -} - - -void -place_leave (struct GNUNET_SOCIAL_Place *plc) -{ - struct GNUNET_MessageHeader *msg; - struct GNUNET_MQ_Envelope * - env = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE); - - GNUNET_MQ_send (plc->mq, env); + "%s left place %p\n", + plc->is_host ? "host" : "guest", + plc); + place_disconnect (plc); } @@ -1168,6 +1155,10 @@ host_connect (struct GNUNET_SOCIAL_Host *hst) GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK, struct HostEnterAck, hst), + GNUNET_MQ_hd_fixed_size (place_leave_ack, + GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE_ACK, + struct GNUNET_MessageHeader, + plc), GNUNET_MQ_hd_var_size (host_enter_request, GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST, struct GNUNET_PSYC_JoinRequestMessage, @@ -1516,6 +1507,9 @@ GNUNET_SOCIAL_host_announce (struct GNUNET_SOCIAL_Host *hst, void *notify_data_cls, enum GNUNET_SOCIAL_AnnounceFlags flags) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "PSYC_transmit_message for host, method: %s\n", + method_name); if (GNUNET_OK == GNUNET_PSYC_transmit_message (hst->plc.tmit, method_name, env, NULL, notify_data, notify_data_cls, flags)) @@ -1580,7 +1574,11 @@ GNUNET_SOCIAL_host_disconnect (struct GNUNET_SOCIAL_Host *hst, GNUNET_ContinuationCallback disconnect_cb, void *cls) { - place_disconnect (&hst->plc, disconnect_cb, cls); + struct GNUNET_SOCIAL_Place *plc = &hst->plc; + + plc->disconnect_cb = disconnect_cb; + plc->disconnect_cls = cls; + place_disconnect (plc); } @@ -1607,10 +1605,15 @@ GNUNET_SOCIAL_host_leave (struct GNUNET_SOCIAL_Host *hst, GNUNET_ContinuationCallback disconnect_cb, void *cls) { + struct GNUNET_MQ_Envelope *envelope; + GNUNET_SOCIAL_host_announce (hst, "_notice_place_closing", env, NULL, NULL, GNUNET_SOCIAL_ANNOUNCE_NONE); - place_leave (&hst->plc); - GNUNET_SOCIAL_host_disconnect (hst, disconnect_cb, cls); + hst->plc.disconnect_cb = disconnect_cb; + hst->plc.disconnect_cls = cls; + envelope = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE); + GNUNET_MQ_send (hst->plc.mq, + envelope); } @@ -1670,6 +1673,10 @@ guest_connect (struct GNUNET_SOCIAL_Guest *gst) GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK, struct GNUNET_PSYC_CountersResultMessage, gst), + GNUNET_MQ_hd_fixed_size (place_leave_ack, + GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE_ACK, + struct GNUNET_MessageHeader, + plc), GNUNET_MQ_hd_var_size (guest_enter_decision, GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION, struct GNUNET_PSYC_JoinDecisionMessage, @@ -1896,6 +1903,64 @@ GNUNET_SOCIAL_guest_enter_by_name (const struct GNUNET_SOCIAL_App *app, } +struct ReconnectContext +{ + struct GNUNET_SOCIAL_Guest *guest; + int *result; + int64_t *max_message_id; + GNUNET_SOCIAL_GuestEnterCallback enter_cb; + void *enter_cls; +}; + + +static void +guest_enter_reconnect_cb (void *cls, + int result, + const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, + uint64_t max_message_id) +{ + struct ReconnectContext *reconnect_ctx = cls; + + GNUNET_assert (NULL != reconnect_ctx); + reconnect_ctx->result = GNUNET_new (int); + *(reconnect_ctx->result) = result; + reconnect_ctx->max_message_id = GNUNET_new (int64_t); + *(reconnect_ctx->max_message_id) = max_message_id; +} + + +static void +guest_entry_dcsn_reconnect_cb (void *cls, + int is_admitted, + const struct GNUNET_PSYC_Message *entry_resp) +{ + struct ReconnectContext *reconnect_ctx = cls; + struct GNUNET_SOCIAL_Guest *gst = reconnect_ctx->guest; + + GNUNET_assert (NULL != reconnect_ctx); + GNUNET_assert (NULL != reconnect_ctx->result); + GNUNET_assert (NULL != reconnect_ctx->max_message_id); + if (GNUNET_YES != is_admitted) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Guest was rejected after calling " + "GNUNET_SOCIAL_guest_enter_reconnect ()\n"); + } + else if (NULL != reconnect_ctx->enter_cb) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "guest reconnected!\n"); + reconnect_ctx->enter_cb (reconnect_ctx->enter_cls, + *(reconnect_ctx->result), + &gst->plc.pub_key, + *(reconnect_ctx->max_message_id)); + } + GNUNET_free (reconnect_ctx->result); + GNUNET_free (reconnect_ctx->max_message_id); + GNUNET_free (reconnect_ctx); +} + + /** * Reconnect to an already entered place as guest. * @@ -1906,8 +1971,8 @@ GNUNET_SOCIAL_guest_enter_by_name (const struct GNUNET_SOCIAL_App *app, * Flags for the entry. * @param slicer * Slicer to use for processing incoming requests from guests. - * @param local_enter_cb - * Called upon connection established to the social service. + * @param enter_cb + * Called upon re-entering is complete. * @param entry_decision_cb * Called upon receiving entry decision. * @@ -1917,11 +1982,12 @@ struct GNUNET_SOCIAL_Guest * GNUNET_SOCIAL_guest_enter_reconnect (struct GNUNET_SOCIAL_GuestConnection *gconn, enum GNUNET_PSYC_SlaveJoinFlags flags, struct GNUNET_PSYC_Slicer *slicer, - GNUNET_SOCIAL_GuestEnterCallback local_enter_cb, + GNUNET_SOCIAL_GuestEnterCallback enter_cb, void *cls) { struct GNUNET_SOCIAL_Guest *gst = GNUNET_malloc (sizeof (*gst)); struct GNUNET_SOCIAL_Place *plc = &gst->plc; + struct ReconnectContext *reconnect_ctx; uint16_t app_id_size = strlen (gconn->app->id) + 1; struct GuestEnterRequest *greq; @@ -1940,10 +2006,15 @@ GNUNET_SOCIAL_guest_enter_reconnect (struct GNUNET_SOCIAL_GuestConnection *gconn plc->pub_key = gconn->plc_msg.place_pub_key; plc->ego_pub_key = gconn->plc_msg.ego_pub_key; - plc->op = GNUNET_OP_create (); + reconnect_ctx = GNUNET_new (struct ReconnectContext); + reconnect_ctx->guest = gst; + reconnect_ctx->enter_cb = enter_cb; + reconnect_ctx->enter_cls = cls; - gst->enter_cb = local_enter_cb; - gst->cb_cls = cls; + plc->op = GNUNET_OP_create (); + gst->enter_cb = &guest_enter_reconnect_cb; + gst->entry_dcsn_cb = &guest_entry_dcsn_reconnect_cb; + gst->cb_cls = reconnect_ctx; guest_connect (gst); return gst; @@ -2028,7 +2099,11 @@ GNUNET_SOCIAL_guest_disconnect (struct GNUNET_SOCIAL_Guest *gst, GNUNET_ContinuationCallback disconnect_cb, void *cls) { - place_disconnect (&gst->plc, disconnect_cb, cls); + struct GNUNET_SOCIAL_Place *plc = &gst->plc; + + plc->disconnect_cb = disconnect_cb; + plc->disconnect_cls = cls; + place_disconnect (plc); } @@ -2054,10 +2129,15 @@ GNUNET_SOCIAL_guest_leave (struct GNUNET_SOCIAL_Guest *gst, GNUNET_ContinuationCallback disconnect_cb, void *cls) { + struct GNUNET_MQ_Envelope *envelope; + GNUNET_SOCIAL_guest_talk (gst, "_notice_place_leave", env, NULL, NULL, GNUNET_SOCIAL_TALK_NONE); - place_leave (&gst->plc); - GNUNET_SOCIAL_guest_disconnect (gst, disconnect_cb, cls); + gst->plc.disconnect_cb = disconnect_cb; + gst->plc.disconnect_cls = cls; + envelope = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE); + GNUNET_MQ_send (gst->plc.mq, + envelope); } diff --git a/src/social/test_social.c b/src/social/test_social.c @@ -129,22 +129,22 @@ enum TEST_HOST_ANSWER_DOOR_REFUSE = 4, TEST_GUEST_RECV_ENTRY_DCSN_REFUSE = 5, TEST_HOST_ANSWER_DOOR_ADMIT = 6, - TEST_GUEST_RECV_ENTRY_DCSN_ADMIT = 9, - TEST_HOST_ANNOUNCE = 10, - TEST_HOST_ANNOUNCE_END = 11, - TEST_GUEST_TALK = 12, - TEST_HOST_ANNOUNCE2 = 13, - TEST_HOST_ANNOUNCE2_END = 14, - TEST_GUEST_HISTORY_REPLAY = 15, - TEST_GUEST_HISTORY_REPLAY_LATEST = 16, - TEST_GUEST_LOOK_AT = 17, - TEST_GUEST_LOOK_FOR = 18, - TEST_GUEST_LEAVE = 18, - TEST_ZONE_ADD_PLACE = 20, - TEST_GUEST_ENTER_BY_NAME = 21, - TEST_RECONNECT = 22, - TEST_GUEST_LEAVE2 = 23, - TEST_HOST_LEAVE = 24, + TEST_GUEST_RECV_ENTRY_DCSN_ADMIT = 7, + TEST_HOST_ANNOUNCE = 8, + TEST_HOST_ANNOUNCE_END = 9, + TEST_GUEST_TALK = 10, + TEST_HOST_ANNOUNCE2 = 11, + TEST_HOST_ANNOUNCE2_END = 12, + TEST_GUEST_HISTORY_REPLAY = 13, + TEST_GUEST_HISTORY_REPLAY_LATEST = 14, + TEST_GUEST_LOOK_AT = 15, + TEST_GUEST_LOOK_FOR = 16, + TEST_GUEST_LEAVE = 17, + TEST_ZONE_ADD_PLACE = 18, + TEST_GUEST_ENTER_BY_NAME = 19, + TEST_RECONNECT = 20, + TEST_GUEST_LEAVE2 = 21, + TEST_HOST_LEAVE = 22, } test; @@ -180,10 +180,28 @@ host_announce2 (); /** - * Clean up all resources used. + * Terminate the test case (failure). + * + * @param cls NULL + */ +static void +end_badly (void *cls) +{ + end_badly_task = NULL; + GNUNET_SCHEDULER_shutdown (); + res = 2; + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Test FAILED.\n"); +} + + +/** + * Terminate the test case (failure). + * + * @param cls NULL */ static void -cleanup () +end_shutdown (void *cls) { if (NULL != id) { @@ -202,7 +220,11 @@ cleanup () GNUNET_PSYC_slicer_destroy (host_slicer); host_slicer = NULL; } - + if (NULL != end_badly_task) + { + GNUNET_SCHEDULER_cancel (end_badly_task); + end_badly_task = NULL; + } if (NULL != gst) { GNUNET_SOCIAL_guest_leave (gst, NULL, NULL, NULL); @@ -216,21 +238,6 @@ cleanup () hst_plc = NULL; } GNUNET_SOCIAL_app_disconnect (app, NULL, NULL); - GNUNET_SCHEDULER_shutdown (); -} - - -/** - * Terminate the test case (failure). - * - * @param cls NULL - */ -static void -end_badly (void *cls) -{ - res = 1; - cleanup (); - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Test FAILED.\n"); } @@ -242,9 +249,9 @@ end_badly (void *cls) static void end_normally (void *cls) { + GNUNET_SCHEDULER_shutdown (); res = 0; - cleanup (); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test PASSED.\n"); + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test PASSED.\n"); } @@ -254,7 +261,7 @@ end_normally (void *cls) static void end () { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Ending tests.\n", test); if (end_badly_task != NULL) @@ -271,7 +278,7 @@ transmit_resume (void *cls) { struct TransmitClosure *tmit = cls; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Transmission resumed.\n", test); if (NULL != tmit->host_ann) GNUNET_SOCIAL_host_announce_resume (tmit->host_ann); @@ -296,7 +303,7 @@ notify_data (void *cls, uint16_t *data_size, void *data) } uint16_t size = strlen (tmit->data[tmit->n]); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Transmit notify data: %u bytes available, " "processing fragment %u/%u (size %u).\n", test, *data_size, tmit->n + 1, tmit->data_count, size); @@ -309,7 +316,7 @@ notify_data (void *cls, uint16_t *data_size, void *data) if (GNUNET_YES != tmit->paused && 0 < tmit->data_delay[tmit->n]) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Transmission paused.\n", test); tmit->paused = GNUNET_YES; GNUNET_SCHEDULER_add_delayed ( @@ -331,7 +338,7 @@ notify_data (void *cls, uint16_t *data_size, void *data) static void host_left () { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: The host has left the place.\n", test); end (); } @@ -352,7 +359,7 @@ host_farewell2 (void *cls, const struct GNUNET_SOCIAL_Nym *nym, struct GNUNET_PSYC_Environment *env) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Nym left the place again.\n"); GNUNET_SCHEDULER_add_now (&schedule_host_leave, NULL); } @@ -365,13 +372,14 @@ host_reconnected (void *cls, int result, { place_pub_key = *home_pub_key; GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Host reconnected to place %s\n", test, GNUNET_h2s (&place_pub_hash)); is_host_reconnected = GNUNET_YES; if (GNUNET_YES == is_guest_reconnected) { + GNUNET_assert (NULL != gst); GNUNET_SCHEDULER_add_now (&schedule_guest_leave, NULL); } } @@ -382,7 +390,7 @@ guest_reconnected (void *cls, int result, const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, uint64_t max_message_id) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest reconnected to place: %d\n", test, result); GNUNET_assert (0 <= result); @@ -390,6 +398,7 @@ guest_reconnected (void *cls, int result, is_guest_reconnected = GNUNET_YES; if (GNUNET_YES == is_host_reconnected) { + GNUNET_assert (NULL != gst); GNUNET_SCHEDULER_add_now (&schedule_guest_leave, NULL); } } @@ -398,7 +407,7 @@ guest_reconnected (void *cls, int result, static void app_connected (void *cls) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: App connected: %p\n", test, cls); } @@ -411,21 +420,28 @@ app_recv_host (void *cls, enum GNUNET_SOCIAL_AppPlaceState place_state) { struct GNUNET_HashCode host_pub_hash; - GNUNET_CRYPTO_hash (host_pub_key, sizeof (*host_pub_key), &host_pub_hash); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_CRYPTO_hash (host_pub_key, + sizeof (*host_pub_key), + &host_pub_hash); + + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Got app host place notification: %s\n", - test, GNUNET_h2s (&host_pub_hash)); + test, + GNUNET_h2s (&host_pub_hash)); if (test == TEST_RECONNECT) { if (0 == memcmp (&place_pub_key, host_pub_key, sizeof (*host_pub_key))) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Reconnecting to host place: %s\n", test, GNUNET_h2s (&host_pub_hash)); - hst = GNUNET_SOCIAL_host_enter_reconnect (hconn, host_slicer, host_reconnected, - host_answer_door, host_farewell2, NULL); + hst = GNUNET_SOCIAL_host_enter_reconnect (hconn, host_slicer, + &host_reconnected, + &host_answer_door, + &host_farewell2, + NULL); } } } @@ -439,21 +455,30 @@ app_recv_guest (void *cls, enum GNUNET_SOCIAL_AppPlaceState place_state) { struct GNUNET_HashCode guest_pub_hash; - GNUNET_CRYPTO_hash (guest_pub_key, sizeof (*guest_pub_key), &guest_pub_hash); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_CRYPTO_hash (guest_pub_key, + sizeof (*guest_pub_key), + &guest_pub_hash); + + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Got app guest place notification: %s\n", test, GNUNET_h2s (&guest_pub_hash)); if (test == TEST_RECONNECT) { - if (0 == memcmp (&place_pub_key, guest_pub_key, sizeof (*guest_pub_key))) + if (0 == memcmp (&place_pub_key, + guest_pub_key, + sizeof (*guest_pub_key))) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Reconnecting to guest place: %s\n", test, GNUNET_h2s (&guest_pub_hash)); - gst = GNUNET_SOCIAL_guest_enter_reconnect (gconn, GNUNET_PSYC_SLAVE_JOIN_NONE, - guest_slicer, guest_reconnected, NULL); + gst = GNUNET_SOCIAL_guest_enter_reconnect (gconn, + GNUNET_PSYC_SLAVE_JOIN_NONE, + guest_slicer, + &guest_reconnected, + NULL); + GNUNET_assert (NULL != gst); } } } @@ -478,7 +503,7 @@ app_recv_ego (void *cls, const char *name) { char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Got app ego notification: %p %s %s\n", test, ego, name, ego_pub_str); GNUNET_free (ego_pub_str); @@ -487,15 +512,30 @@ app_recv_ego (void *cls, { host_ego = ego; host_pub_key = ego_pub_key; - GNUNET_assert (TEST_IDENTITIES_CREATE == test); - enter_if_ready (); + if (TEST_IDENTITIES_CREATE == test) + { + enter_if_ready (); + } + else + { + GNUNET_assert (TEST_RECONNECT == test); + } } else if (NULL != strstr (name, guest_name)) { guest_ego = ego; guest_pub_key = ego_pub_key; - GNUNET_assert (TEST_IDENTITIES_CREATE == test); - enter_if_ready (); + if (TEST_IDENTITIES_CREATE == test) + { + enter_if_ready (); + } + else + { + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "test = %d\n", + test); + GNUNET_assert (TEST_RECONNECT == test); + } } } @@ -504,7 +544,6 @@ static void schedule_reconnect (void *cls) { test = TEST_RECONNECT; - GNUNET_SOCIAL_host_disconnect (hst, NULL, NULL); GNUNET_SOCIAL_guest_disconnect (gst, NULL, NULL); hst = NULL; @@ -512,10 +551,10 @@ schedule_reconnect (void *cls) GNUNET_SOCIAL_app_disconnect (app, NULL, NULL); app = GNUNET_SOCIAL_app_connect (cfg, app_id, - app_recv_ego, - app_recv_host, - app_recv_guest, - app_connected, + &app_recv_ego, + &app_recv_host, + &app_recv_guest, + &app_connected, NULL); } @@ -524,7 +563,7 @@ static void host_recv_zone_add_place_result (void *cls, int64_t result, const void *data, uint16_t data_size) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Zone add place result: %" PRId64 " (%.*s).\n", test, result, data_size, (const char *) data); GNUNET_assert (GNUNET_YES == result); @@ -538,7 +577,7 @@ static void zone_add_place () { test = TEST_ZONE_ADD_PLACE; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Adding place to zone.\n", test); GNUNET_SOCIAL_zone_add_place (app, host_ego, "home", "let.me*in!", @@ -557,7 +596,7 @@ host_farewell (void *cls, nym_key = GNUNET_SOCIAL_nym_get_pub_key (nym); char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Farewell: nym %s (%s) has left the place.\n", test, GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str); GNUNET_free (str); @@ -578,13 +617,13 @@ host_farewell (void *cls, static void guest_left (void *cls) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: The guest has left the place.\n", test); } static void -guest_leave() +guest_leave () { if (test < TEST_RECONNECT) test = TEST_GUEST_LEAVE; @@ -615,11 +654,11 @@ guest_look_for_result (void *cls, uint16_t data_size) { struct ResultClosure *rcls = cls; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: guest_look_for_result: %" PRId64 "\n", test, result_code); GNUNET_assert (GNUNET_OK == result_code); - GNUNET_assert (3 == rcls->n); + GNUNET_assert (6 == rcls->n); GNUNET_free (rcls); GNUNET_SCHEDULER_add_now (&schedule_guest_leave, NULL); } @@ -635,7 +674,7 @@ guest_look_for_var (void *cls, { struct ResultClosure *rcls = cls; rcls->n++; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: guest_look_for_var: %s\n%.*s\n", test, name, value_size, (const char *) value); } @@ -656,7 +695,7 @@ guest_look_at_result (void *cls, int64_t result_code, { struct ResultClosure *rcls = cls; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: guest_look_at_result: %" PRId64 "\n", test, result_code); GNUNET_assert (GNUNET_OK == result_code); @@ -677,7 +716,7 @@ guest_look_at_var (void *cls, struct ResultClosure *rcls = cls; rcls->n++; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: guest_look_at_var: %s\n%.*s\n", test ,name, value_size, (const char *) value); } @@ -696,7 +735,7 @@ static void guest_recv_history_replay_latest_result (void *cls, int64_t result, const void *data, uint16_t data_size) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest received latest history replay result " "(%" PRIu32 " messages, %" PRId64 " fragments):\n" "%.*s\n", @@ -725,7 +764,7 @@ static void guest_recv_history_replay_result (void *cls, int64_t result, const void *data, uint16_t data_size) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest received history replay result: %" PRId64 "\n" "%.*s\n", test, result, data_size, (const char *) data); @@ -756,7 +795,7 @@ guest_recv_method (void *cls, uint64_t message_id, const char *method_name) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest received method for message ID %" PRIu64 ":\n" "%s (flags: %x)\n", test, message_id, method_name, ntohl (meth->flags)); @@ -775,7 +814,7 @@ guest_recv_modifier (void *cls, uint16_t value_size, uint16_t full_value_size) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest received modifier for message ID %" PRIu64 ":\n" "%c%s: %.*s (size: %u)\n", test, message_id, oper, name, value_size, (const char *) value, value_size); @@ -793,7 +832,7 @@ guest_recv_mod_foo_bar (void *cls, uint16_t value_size, uint16_t full_value_size) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest received modifier matching _foo_bar for message ID %" PRIu64 ":\n" "%c%s: %.*s (size: %u)\n", test, message_id, oper, name, value_size, (const char *) value, value_size); @@ -811,7 +850,7 @@ guest_recv_data (void *cls, const void *data, uint16_t data_size) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest received data for message ID %" PRIu64 ":\n" "%.*s\n", test, message_id, data_size, (const char *) data); @@ -826,7 +865,7 @@ guest_recv_eom (void *cls, uint64_t message_id, uint8_t is_cancelled) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest received end of message ID %" PRIu64 ", cancelled: %u\n", test, message_id, is_cancelled); @@ -868,7 +907,7 @@ host_recv_method (void *cls, uint64_t message_id, const char *method_name) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Host received method for message ID %" PRIu64 ":\n" "%s\n", test, message_id, method_name); @@ -887,7 +926,7 @@ host_recv_modifier (void *cls, uint16_t value_size, uint16_t full_value_size) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Host received modifier for message ID %" PRIu64 ":\n" "%c%s: %.*s\n", test, message_id, oper, name, value_size, (const char *) value); @@ -902,7 +941,7 @@ host_recv_data (void *cls, const void *data, uint16_t data_size) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Host received data for message ID %" PRIu64 ":\n" "%.*s\n", test, message_id, data_size, (const char *) data); @@ -916,7 +955,7 @@ host_recv_eom (void *cls, uint64_t message_id, uint8_t is_cancelled) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Host received end of message ID %" PRIu64 ", cancelled: %u\n", test, message_id, is_cancelled); @@ -981,7 +1020,7 @@ host_announce () { test = TEST_HOST_ANNOUNCE; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Host announcement.\n", test); tmit = (struct TransmitClosure) {}; @@ -1015,7 +1054,7 @@ host_announce2 () test = TEST_HOST_ANNOUNCE2; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Host announcement 2.\n", test); tmit = (struct TransmitClosure) {}; @@ -1025,7 +1064,7 @@ host_announce2 () GNUNET_PSYC_env_add (tmit.env, GNUNET_PSYC_OP_ASSIGN, "_foo2_bar", DATA2ARG ("FOO BAR")); GNUNET_PSYC_env_add (tmit.env, GNUNET_PSYC_OP_ASSIGN, - "_foo2_bar", DATA2ARG ("FOO BAR BAZ")); + "_foo2_bar_baz", DATA2ARG ("FOO BAR BAZ")); tmit.data[0] = "AAA BBB CCC "; tmit.data[1] = "ABC DEF GHI JKL.\n"; tmit.data[2] = "TESTING ONE TWO THREE.\n"; @@ -1043,7 +1082,7 @@ guest_recv_entry_decision (void *cls, int is_admitted, const struct GNUNET_PSYC_Message *entry_msg) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Guest received entry decision (try %u): %d.\n", test, join_req_count, is_admitted); @@ -1068,7 +1107,8 @@ guest_recv_entry_decision (void *cls, { case TEST_GUEST_RECV_ENTRY_DCSN_REFUSE: GNUNET_assert (GNUNET_NO == is_admitted); - guest_enter (); + test = TEST_HOST_ANSWER_DOOR_ADMIT; + GNUNET_SOCIAL_guest_disconnect (gst, &guest_enter, NULL); break; case TEST_GUEST_RECV_ENTRY_DCSN_ADMIT: @@ -1097,7 +1137,7 @@ host_answer_door (void *cls, { join_req_count++; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Test #%u: Host received entry request from guest (try %u).\n", (uint8_t) test, join_req_count); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -1118,7 +1158,7 @@ host_answer_door (void *cls, // fall through case TEST_GUEST_ENTER_BY_NAME: - join_resp = GNUNET_PSYC_message_create ("_notice_place_admit", env, + join_resp = GNUNET_PSYC_message_create ("_notice_place_admit", env, DATA2ARG ("Welcome, nym!")); GNUNET_SOCIAL_host_entry_decision (hst, nym, GNUNET_YES, join_resp); break; @@ -1135,18 +1175,18 @@ guest_recv_local_enter (void *cls, int result, const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, uint64_t max_message_id) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Test #%u: Guest entered to local place: %d\n", + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "Test #%u: Guest entered local place: %d\n", test, result); - GNUNET_assert (0 <= result); + GNUNET_assert (GNUNET_OK == result); } static void guest_enter () { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Test #%u: Entering to place as guest.\n", test); + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "Test #%u: Entering place as guest.\n", test); struct GuestEnterMessage *emsg = &guest_enter_msg; @@ -1177,8 +1217,8 @@ static void guest_enter_by_name () { test = TEST_GUEST_ENTER_BY_NAME; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Test #%u: Entering to place by name as guest.\n", test); + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "Test #%u: Entering place by name as guest.\n", test); struct GuestEnterMessage *emsg = &guest_enter_msg; @@ -1222,7 +1262,7 @@ guest_init () guest_recv_data, guest_recv_eom, NULL); GNUNET_PSYC_slicer_modifier_add (guest_slicer, "_foo_bar", guest_recv_mod_foo_bar, &mod_foo_bar_rcls); - test = TEST_HOST_ANSWER_DOOR_ADMIT; + test = TEST_HOST_ANSWER_DOOR_REFUSE; GNUNET_SOCIAL_zone_add_nym (app, guest_ego, "host", host_pub_key, GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES), @@ -1270,8 +1310,8 @@ host_entered (void *cls, int result, { place_pub_key = *home_pub_key; GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Test #%u: Host entered to place %s\n", + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "Test #%u: Host entered place %s\n", test, GNUNET_h2s (&place_pub_hash)); guest_enter (); } @@ -1285,8 +1325,8 @@ host_enter () host_recv_method, host_recv_modifier, host_recv_data, host_recv_eom, NULL); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Test #%u: Entering to place as host.\n", test); + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "Test #%u: Entering place as host.\n", test); test = TEST_HOST_ENTER; hst = GNUNET_SOCIAL_host_enter (app, host_ego, GNUNET_PSYC_CHANNEL_PRIVATE, @@ -1306,6 +1346,8 @@ start_app_if_ready () { return; } + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, + "starting app...\n"); app = GNUNET_SOCIAL_app_connect (cfg, app_id, app_recv_ego, @@ -1324,17 +1366,17 @@ identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, { if (ego == identity_host_ego) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Host ego deleted\n"); } else if (ego == identity_guest_ego) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Guest ego deleted\n"); } else if (0 == strcmp (name, host_name)) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Created ego %s\n", name); identity_host_ego = ego; @@ -1342,7 +1384,7 @@ identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, } else if (0 == strcmp (name, guest_name)) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "Created guest ego %s\n", name); identity_guest_ego = ego; @@ -1370,9 +1412,11 @@ run (void *cls, #endif { cfg = c; + res = 1; end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); - + GNUNET_SCHEDULER_add_shutdown (&end_shutdown, + NULL); GNUNET_CRYPTO_get_peer_identity (cfg, &this_peer); id = GNUNET_IDENTITY_connect (cfg, &identity_ego_cb, NULL); diff --git a/src/social/test_social.conf b/src/social/test_social.conf @@ -0,0 +1,19 @@ +@INLINE@ ../../contrib/no_forcestart.conf + +[PATHS] +GNUNET_TEST_HOME = /tmp/gnunet-test-social/ + +[social] +FORCESTART = YES + +[transport] +PLUGINS = tcp + +[nat] +DISABLEV6 = YES +ENABLE_UPNP = NO +BEHIND_NAT = NO +ALLOW_NAT = NO +INTERNAL_ADDRESS = 127.0.0.1 +EXTERNAL_ADDRESS = 127.0.0.1 + diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c @@ -998,7 +998,9 @@ client_disconnect_cb (void *cls, * * @param cls NULL * @param message the message found on disk - * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int inject_message (void *cls, diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am @@ -45,7 +45,7 @@ gnunet_service_testbed_SOURCES = \ gnunet-service-testbed_oc.c \ gnunet-service-testbed_cpustatus.c \ gnunet-service-testbed_meminfo.c gnunet-service-testbed_meminfo.h \ - gnunet-service-testbed_barriers.c \ + gnunet-service-testbed_barriers.c gnunet-service-testbed_barriers.h \ gnunet-service-testbed_connectionpool.c gnunet-service-testbed_connectionpool.h gnunet_service_testbed_LDADD = $(XLIB) \ $(top_builddir)/src/util/libgnunetutil.la \ diff --git a/src/testbed/gnunet-daemon-testbed-blacklist.c b/src/testbed/gnunet-daemon-testbed-blacklist.c @@ -190,7 +190,8 @@ run (void *cls, char *fname; if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_filename (c, "PATHS", + GNUNET_CONFIGURATION_get_value_filename (c, + "PATHS", "GNUNET_HOME", &shome)) { @@ -208,6 +209,7 @@ run (void *cls, GNUNET_free (fname); return; } + GNUNET_free (fname); GNUNET_asprintf (&fname, "%s/blacklist", shome); diff --git a/src/testbed/gnunet-daemon-testbed-underlay.c b/src/testbed/gnunet-daemon-testbed-underlay.c @@ -165,7 +165,8 @@ check_access (void *cls, const struct GNUNET_PeerIdentity * pid) static int -get_identity (unsigned int offset, struct GNUNET_PeerIdentity *id) +get_identity (unsigned int offset, + struct GNUNET_PeerIdentity *id) { struct GNUNET_CRYPTO_EddsaPrivateKey private_key; @@ -174,7 +175,8 @@ get_identity (unsigned int offset, struct GNUNET_PeerIdentity *id) GNUNET_memcpy (&private_key, hostkeys_data + (offset * GNUNET_TESTING_HOSTKEYFILESIZE), GNUNET_TESTING_HOSTKEYFILESIZE); - GNUNET_CRYPTO_eddsa_key_get_public (&private_key, &id->public_key); + GNUNET_CRYPTO_eddsa_key_get_public (&private_key, + &id->public_key); return GNUNET_OK; } diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c @@ -292,8 +292,9 @@ child_death_task (void *cls) * * @param cls identification of the client * @param message the actual message - * - * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int tokenizer_cb (void *cls, @@ -359,7 +360,7 @@ tokenizer_cb (void *cls, cfg = GNUNET_CONFIGURATION_create (); if (GNUNET_OK != GNUNET_CONFIGURATION_deserialize (cfg, - config, + config, ul_config_size, NULL)) { diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c @@ -261,7 +261,7 @@ struct OverlayConnectContext enum OverlayConnectContextType type; /** - * The id of the second peer which is has to connect to the first peer + * The id of the second peer which has to connect to the first peer */ uint32_t other_peer_id; }; @@ -930,10 +930,10 @@ send_hello (void *cls) other_peer_str); GNUNET_free (other_peer_str); lp2c->ohh = - GNUNET_TRANSPORT_offer_hello (lp2c->tcc.cfg, - occ->hello, - &occ_hello_sent_cb, - occ); + GNUNET_TRANSPORT_offer_hello (lp2c->tcc.cfg, + occ->hello, + &occ_hello_sent_cb, + occ); if (NULL == lp2c->ohh) { GNUNET_break (0); @@ -1001,6 +1001,11 @@ p2_transport_connect (struct OverlayConnectContext *occ) { struct Peer *peer2; + /* HUH? Why to *obtain* HELLO? Seems we use this to *SEND* the + HELLO! */ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Connecting to transport of peer %s to obtain HELLO\n", + GNUNET_i2s (&occ->other_peer_identity)); GNUNET_assert (NULL == occ->emsg); GNUNET_assert (NULL != occ->hello); GNUNET_assert (NULL == occ->ghh); diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c @@ -175,9 +175,7 @@ controller_event_cb (void *cls, { printf ("\nAborting due to very high failure rate\n"); print_overlay_links_summary (); - if (NULL != abort_task) - GNUNET_SCHEDULER_cancel (abort_task); - abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); + GNUNET_SCHEDULER_shutdown (); return; } } @@ -260,11 +258,12 @@ run (void *cls, char *const *args, const char *cfgfile, event_mask = 0; event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); - GNUNET_TESTBED_run (hosts_file, cfg, num_peers, event_mask, controller_event_cb, - NULL, &test_run, NULL); + GNUNET_TESTBED_run (hosts_file, cfg, num_peers, event_mask, + &controller_event_cb, NULL, + &test_run, NULL); abort_task = - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &do_abort, - NULL); + GNUNET_SCHEDULER_add_shutdown (&do_abort, + NULL); } @@ -310,6 +309,8 @@ main (int argc, char *const *argv) const char *binaryHelp = "gnunet-testbed-profiler [OPTIONS]"; int ret; + unsetenv ("XDG_DATA_HOME"); + unsetenv ("XDG_CONFIG_HOME"); if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) return 2; result = GNUNET_SYSERR; diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am @@ -295,7 +295,7 @@ noinst_LTLIBRARIES = \ libgnunet_plugin_transport_template.la libgnunet_plugin_transport_tcp_la_SOURCES = \ - plugin_transport_tcp.c + plugin_transport_tcp.c libgnunet_plugin_transport_tcp_la_LIBADD = \ $(top_builddir)/src/hello/libgnunethello.la \ $(top_builddir)/src/statistics/libgnunetstatistics.la \ @@ -1330,7 +1330,6 @@ test_transport_api_monitor_peers_peer2.conf\ test_transport_api_monitor_validation_peer1.conf\ test_transport_api_monitor_validation_peer2.conf\ test_transport_defaults.conf\ -test_transport_startonly.conf\ test_transport_api_disconnect_tcp_peer1.conf\ test_transport_api_disconnect_tcp_peer2.conf\ test_transport_api_timeout_http_peer1.conf\ @@ -1350,4 +1349,8 @@ test_transport_api_http_reverse_peer2.conf \ perf_tcp_peer1.conf \ perf_tcp_peer2.conf \ test_transport_api_slow_ats_peer1.conf \ -test_transport_api_slow_ats_peer2.conf +test_transport_api_slow_ats_peer2.conf \ + tcp_connection_legacy.c \ + tcp_server_mst_legacy.c \ + tcp_server_legacy.c \ + tcp_service_legacy.c diff --git a/src/transport/gnunet-helper-transport-wlan-dummy.c b/src/transport/gnunet-helper-transport-wlan-dummy.c @@ -121,6 +121,9 @@ send_mac_to_plugin (char *buffer, struct GNUNET_TRANSPORT_WLAN_MacAddress *mac) * * @param cls the 'struct SendBuffer' to copy the converted message to * @param hdr inbound message from the FIFO + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int stdin_send (void *cls, @@ -167,6 +170,9 @@ stdin_send (void *cls, * * @param cls the 'struct SendBuffer' to copy to * @param hdr the message we received to copy to the buffer + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int file_in_send (void *cls, diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c @@ -688,6 +688,8 @@ handle_client_hello (void *cls, { struct TransportClient *tc = cls; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Received HELLO message\n"); GST_validation_handle_hello (message); GNUNET_SERVICE_client_continue (tc->client); } @@ -2802,7 +2804,7 @@ run (void *cls, GNUNET_assert (NULL != GST_my_private_key); GNUNET_log(GNUNET_ERROR_TYPE_INFO, - "My identity is `%4s'\n", + "My identity is `%s'\n", GNUNET_i2s_full (&GST_my_identity)); GNUNET_SCHEDULER_add_shutdown (&shutdown_task, diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c @@ -337,14 +337,10 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address, return; /* our own, ignore! */ ai = find_ai (address, session); - if (NULL == ai) - { - GNUNET_assert (0); - return; - } - if (NULL == ai->ar) + if (NULL == ai || NULL == ai->ar) { - /* already blocked but this might be a blacklist check callback */ + /* The address is already gone/blocked, this can happen during a blacklist + * callback. */ return; } ai->back_off = GNUNET_TIME_STD_BACKOFF (ai->back_off); diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c @@ -616,6 +616,8 @@ neighbours_changed_notification (const struct GNUNET_PeerIdentity *peer, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) { + (void) bandwidth_in; + (void) bandwidth_out; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Notifying about change for peer `%s' with address `%s' in state `%s' timing out at %s\n", GNUNET_i2s (peer), @@ -993,6 +995,10 @@ send_disconnect_cont (void *cls, { struct NeighbourMapEntry *n; + (void) cls; + (void) result; + (void) payload; + (void) physical; n = lookup_neighbour (target); if (NULL == n) return; /* already gone */ @@ -1131,10 +1137,12 @@ disconnect_neighbour (struct NeighbourMapEntry *n) * our own receive rate and informs the neighbour about * the new quota. * - * @param n neighbour entry to change qutoa for + * @param n neighbour entry to change quota for * @param quota new quota + * @return #GNUNET_YES if @a n is still valid, #GNUNET_NO if + * @a n was freed */ -static void +static int set_incoming_quota (struct NeighbourMapEntry *n, struct GNUNET_BANDWIDTH_Value32NBO quota) { @@ -1158,7 +1166,7 @@ set_incoming_quota (struct NeighbourMapEntry *n, GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_NO, NULL, NULL); - return; + return GNUNET_YES; } GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Disconnecting peer `%s' due to SET_QUOTA\n", @@ -1168,6 +1176,7 @@ set_incoming_quota (struct NeighbourMapEntry *n, gettext_noop ("# disconnects due to quota of 0"), 1, GNUNET_NO); disconnect_neighbour (n); + return GNUNET_NO; } @@ -1196,8 +1205,10 @@ set_primary_address (struct NeighbourMapEntry *n, if (n->primary_address.bandwidth_in.value__ != bandwidth_in.value__) { n->primary_address.bandwidth_in = bandwidth_in; - set_incoming_quota (n, - bandwidth_in); + if (GNUNET_YES != + set_incoming_quota (n, + bandwidth_in)) + return; } if (n->primary_address.bandwidth_out.value__ != bandwidth_out.value__) { @@ -1237,8 +1248,10 @@ set_primary_address (struct NeighbourMapEntry *n, /* subsystems about address use */ GST_validation_set_address_use (n->primary_address.address, GNUNET_YES); - set_incoming_quota (n, - bandwidth_in); + if (GNUNET_YES != + set_incoming_quota (n, + bandwidth_in)) + return; send_outbound_quota_to_clients (n); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Neighbour `%s' switched to address `%s'\n", @@ -1805,6 +1818,9 @@ send_session_syn_cont (void *cls, { struct NeighbourMapEntry *n; + (void) cls; + (void) size_payload; + (void) size_on_wire; n = lookup_neighbour (target); if (NULL == n) { @@ -1978,6 +1994,9 @@ send_session_syn_ack_cont (void *cls, { struct NeighbourMapEntry *n; + (void) cls; + (void) size_payload; + (void) size_on_wire; n = lookup_neighbour (target); if (NULL == n) { @@ -2393,8 +2412,10 @@ try_run_fast_ats_update (const struct GNUNET_HELLO_Address *address, if (n->primary_address.bandwidth_in.value__ != bandwidth_in.value__) { n->primary_address.bandwidth_in = bandwidth_in; - set_incoming_quota (n, - bandwidth_in); + if (GNUNET_YES != + set_incoming_quota (n, + bandwidth_in)) + return GNUNET_NO; } if (n->primary_address.bandwidth_out.value__ != bandwidth_out.value__) { @@ -2433,7 +2454,10 @@ switch_address_bl_check_cont (void *cls, goto cleanup; papi = GST_plugins_find (address->transport_name); - GNUNET_assert (NULL != papi); + if (NULL == papi) { + /* This can happen during shutdown. */ + goto cleanup; + } if (GNUNET_NO == result) { @@ -2802,6 +2826,7 @@ send_utilization_data (void *cls, uint32_t bps_out; struct GNUNET_TIME_Relative delta; + (void) cls; if ( (GNUNET_YES != test_connected (n)) || (NULL == n->primary_address.address) ) return GNUNET_OK; @@ -2832,11 +2857,12 @@ send_utilization_data (void *cls, /** * Task transmitting utilization in a regular interval * - * @param cls the 'struct NeighbourMapEntry' for which we are running + * @param cls the `struct NeighbourMapEntry` for which we are running */ static void utilization_transmission (void *cls) { + (void) cls; util_transmission_tk = NULL; GNUNET_CONTAINER_multipeermap_iterate (neighbours, &send_utilization_data, @@ -3092,6 +3118,7 @@ GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *messag struct GNUNET_TIME_Absolute ts; struct NeighbourMapEntry *n; + (void) session; if (ntohs (message->size) != sizeof (struct TransportSynMessage)) { GNUNET_break_op (0); @@ -3365,6 +3392,7 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, { struct NeighbourMapEntry *n; + (void) session; if (ntohs (message->size) != sizeof (struct GNUNET_MessageHeader)) { GNUNET_break_op (0); @@ -3638,6 +3666,7 @@ neighbours_iterate (void *cls, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out; + (void) key; if (NULL != n->primary_address.address) { bandwidth_in = n->primary_address.bandwidth_in; @@ -3730,6 +3759,7 @@ GST_neighbour_get_current_address (const struct GNUNET_PeerIdentity *peer) void GST_neighbours_start (unsigned int max_fds) { + (void) max_fds; neighbours = GNUNET_CONTAINER_multipeermap_create (NEIGHBOUR_TABLE_SIZE, GNUNET_NO); util_transmission_tk = GNUNET_SCHEDULER_add_delayed (UTIL_TRANSMISSION_INTERVAL, @@ -3753,6 +3783,8 @@ disconnect_all_neighbours (void *cls, { struct NeighbourMapEntry *n = value; + (void) cls; + (void) key; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting peer `%4s' during shutdown\n", GNUNET_i2s (&n->id)); diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c @@ -1347,6 +1347,9 @@ GST_validation_handle_address (const struct GNUNET_HELLO_Address *address) if (NULL == papi) { /* This plugin is currently unvailable ... ignore */ + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "No plugin available for %s\n", + address->transport_name); return; } ve = find_validation_entry (address); @@ -1358,6 +1361,13 @@ GST_validation_handle_address (const struct GNUNET_HELLO_Address *address) GNUNET_i2s (&ve->address->peer)); ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, ve); } + else + { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Validation already running for address `%s' of %s\n", + GST_plugins_a2s (ve->address), + GNUNET_i2s (&ve->address->peer)); + } } @@ -1657,6 +1667,9 @@ GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello) sizeof (struct GNUNET_PeerIdentity))) { /* got our own HELLO, how boring */ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Validation received our own HELLO (%s), ignoring\n", + GNUNET_i2s (&pid)); return GNUNET_OK; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c @@ -1651,7 +1651,7 @@ server_send_callback (void *cls, * * @param cls current session as closure * @param message the message to be forwarded to transport service - * @return #GNUNET_OK + * @return #GNUNET_OK (all OK) */ static int server_receive_mst_cb (void *cls, diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c @@ -3172,8 +3172,6 @@ handle_tcp_welcome (void *cls, sizeof(struct GNUNET_PeerIdentity))) { /* refuse connections from ourselves */ - GNUNET_SERVER_receive_done (client, - GNUNET_SYSERR); if (GNUNET_OK == GNUNET_SERVER_client_get_address (client, &vaddr, @@ -3185,6 +3183,8 @@ handle_tcp_welcome (void *cls, GNUNET_a2s (vaddr, alen)); GNUNET_free (vaddr); } + GNUNET_SERVER_receive_done (client, + GNUNET_SYSERR); return; } @@ -3348,12 +3348,13 @@ handle_tcp_data (void *cls, if (NULL == session) { /* No inbound session found */ - void *vaddr; + void *vaddr = NULL; size_t alen; - GNUNET_SERVER_client_get_address (client, - &vaddr, - &alen); + GNUNET_assert (GNUNET_OK == + GNUNET_SERVER_client_get_address (client, + &vaddr, + &alen)); LOG (GNUNET_ERROR_TYPE_ERROR, "Received unexpected %u bytes of type %u from `%s'\n", (unsigned int) ntohs (message->size), @@ -3369,7 +3370,7 @@ handle_tcp_data (void *cls, if (GNUNET_YES == session->expecting_welcome) { /* Session is expecting WELCOME message */ - void *vaddr; + void *vaddr = NULL; size_t alen; GNUNET_SERVER_client_get_address (client, @@ -3389,7 +3390,7 @@ handle_tcp_data (void *cls, session->last_activity = GNUNET_TIME_absolute_get (); { - void *vaddr; + void *vaddr = NULL; size_t alen; GNUNET_SERVER_client_get_address (client, diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c @@ -1631,6 +1631,7 @@ enqueue (struct Plugin *plugin, if (GNUNET_YES == session->in_destroy) { GNUNET_break (0); + GNUNET_free (udpw); return; } if (plugin->bytes_in_buffer > INT64_MAX - udpw->msg_size) @@ -1913,8 +1914,8 @@ enqueue_fragment (void *cls, udpw->qc = &qc_fragment_sent; udpw->qc_cls = plugin; GNUNET_memcpy (udpw->msg_buf, - msg, - msg_len); + msg, + msg_len); enqueue (plugin, udpw); if (session->address->address_length == sizeof (struct IPv4UdpAddress)) @@ -3838,9 +3839,9 @@ libgnunet_plugin_transport_udp_init (void *cls) unsigned long long port; unsigned long long aport; unsigned long long udp_max_bps; - unsigned long long enable_v6; - unsigned long long enable_broadcasting; - unsigned long long enable_broadcasting_recv; + int enable_v6; + int enable_broadcasting; + int enable_broadcasting_recv; char *bind4_address; char *bind6_address; struct GNUNET_TIME_Relative interval; diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c @@ -1218,8 +1218,10 @@ RETRY: * @param timeout maximum amount of time to wait * @param receiver function to call with received data * @param receiver_cls closure for @a receiver + * @return #GNUNET_SYSERR if @a connection died (receiver was + * called with error) */ -void +int GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *connection, size_t max, struct GNUNET_TIME_Relative timeout, @@ -1241,7 +1243,7 @@ GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *connection, connection->sock, &receive_ready, connection); - return; + return GNUNET_OK; } if ((NULL == connection->dns_active) && (NULL == connection->ap_head) && @@ -1252,8 +1254,9 @@ GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *connection, NULL, 0, NULL, 0, ETIMEDOUT); - return; + return GNUNET_SYSERR; } + return GNUNET_OK; } diff --git a/src/transport/tcp_server_legacy.c b/src/transport/tcp_server_legacy.c @@ -1044,11 +1044,13 @@ process_mst (struct GNUNET_SERVER_Client *client, "Server re-enters receive loop, timeout: %s.\n", GNUNET_STRINGS_relative_time_to_string (client->idle_timeout, GNUNET_YES)); client->receive_pending = GNUNET_YES; - GNUNET_CONNECTION_receive (client->connection, - GNUNET_MAX_MESSAGE_SIZE - 1, - client->idle_timeout, - &process_incoming, - client); + if (GNUNET_OK != + GNUNET_CONNECTION_receive (client->connection, + GNUNET_MAX_MESSAGE_SIZE - 1, + client->idle_timeout, + &process_incoming, + client)) + return; break; } LOG (GNUNET_ERROR_TYPE_DEBUG, @@ -1287,11 +1289,13 @@ GNUNET_SERVER_connect_socket (struct GNUNET_SERVER_Handle *server, for (n = server->connect_notify_list_head; NULL != n; n = n->next) n->callback (n->callback_cls, client); client->receive_pending = GNUNET_YES; - GNUNET_CONNECTION_receive (client->connection, - GNUNET_MAX_MESSAGE_SIZE - 1, - client->idle_timeout, - &process_incoming, - client); + if (GNUNET_SYSERR == + GNUNET_CONNECTION_receive (client->connection, + GNUNET_MAX_MESSAGE_SIZE - 1, + client->idle_timeout, + &process_incoming, + client)) + return NULL; return client; } diff --git a/src/util/Makefile.am b/src/util/Makefile.am @@ -119,18 +119,6 @@ libgnunetutil_la_LIBADD = \ $(LTLIBINTL) \ -lltdl $(Z_LIBS) -lunistring $(XLIB) -if HAVE_PBC -if HAVE_ABE -libgnunetutil_la_SOURCES += \ - crypto_abe.c -libgnunetutil_la_LIBADD += \ - $(ABE_LIBADD) \ - -lgabe \ - -lpbc \ - -lglib-2.0 -endif -endif - libgnunetutil_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) \ -version-info 13:0:0 @@ -564,17 +552,6 @@ test_speedup_SOURCES = \ test_speedup_LDADD = \ libgnunetutil.la -if HAVE_PBC -if HAVE_ABE -test_crypto_abe_SOURCES = \ - test_crypto_abe.c -test_crypto_abe_LDADD = \ - libgnunetutil.la -check_PROGRAMS += \ - test_crypto_abe -endif -endif - perf_crypto_hash_SOURCES = \ perf_crypto_hash.c perf_crypto_hash_LDADD = \ diff --git a/src/util/bio.c b/src/util/bio.c @@ -162,15 +162,19 @@ GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, { if (min > len - pos) min = len - pos; - GNUNET_memcpy (&dst[pos], &h->buffer[h->pos], min); + GNUNET_memcpy (&dst[pos], + &h->buffer[h->pos], + min); h->pos += min; pos += min; } if (pos == len) return GNUNET_OK; /* done! */ - GNUNET_assert (h->have == h->pos); + GNUNET_assert (((off_t) h->have) == h->pos); /* fill buffer */ - ret = GNUNET_DISK_file_read (h->fd, h->buffer, h->size); + ret = GNUNET_DISK_file_read (h->fd, + h->buffer, + h->size); if (-1 == ret) { GNUNET_asprintf (&h->emsg, @@ -287,7 +291,9 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, char *buf; struct GNUNET_CONTAINER_MetaData *meta; - if (GNUNET_BIO_read_int32 (h, (int32_t *) & size) != GNUNET_OK) + if (GNUNET_OK != + GNUNET_BIO_read_int32 (h, + (int32_t *) & size)) return GNUNET_SYSERR; if (size == 0) { @@ -298,20 +304,29 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, { GNUNET_asprintf (&h->emsg, _("Serialized metadata `%s' larger than allowed (%u>%u)"), - what, size, MAX_META_DATA); + what, + size, + MAX_META_DATA); return GNUNET_SYSERR; } buf = GNUNET_malloc (size); - if (GNUNET_OK != GNUNET_BIO_read (h, what, buf, size)) + if (GNUNET_OK != + GNUNET_BIO_read (h, + what, + buf, + size)) { GNUNET_free (buf); return GNUNET_SYSERR; } - meta = GNUNET_CONTAINER_meta_data_deserialize (buf, size); - if (meta == NULL) + meta = GNUNET_CONTAINER_meta_data_deserialize (buf, + size); + if (NULL == meta) { GNUNET_free (buf); - GNUNET_asprintf (&h->emsg, _("Metadata `%s' failed to deserialize"), what); + GNUNET_asprintf (&h->emsg, + _("Metadata `%s' failed to deserialize"), + what); return GNUNET_SYSERR; } GNUNET_free (buf); @@ -330,12 +345,19 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int -GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file, - int line, int32_t * i) +GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, + const char *file, + int line, + int32_t * i) { int32_t big; - if (GNUNET_OK != GNUNET_BIO_read_fn (h, file, line, &big, sizeof (int32_t))) + if (GNUNET_OK != + GNUNET_BIO_read_fn (h, + file, + line, + &big, + sizeof (int32_t))) return GNUNET_SYSERR; *i = ntohl (big); return GNUNET_OK; @@ -359,7 +381,12 @@ GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, { int64_t big; - if (GNUNET_OK != GNUNET_BIO_read_fn (h, file, line, &big, sizeof (int64_t))) + if (GNUNET_OK != + GNUNET_BIO_read_fn (h, + file, + line, + &big, + sizeof (int64_t))) return GNUNET_SYSERR; *i = GNUNET_ntohll (big); return GNUNET_OK; @@ -432,7 +459,8 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h) int ret; ret = GNUNET_SYSERR; - if ( (NULL != h->fd) && (GNUNET_OK == (ret = GNUNET_BIO_flush (h))) ) + if ( (NULL != h->fd) && + (GNUNET_OK == (ret = GNUNET_BIO_flush (h))) ) GNUNET_DISK_file_close (h->fd); GNUNET_free (h); return ret; @@ -451,8 +479,10 @@ GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h) { ssize_t ret; - ret = GNUNET_DISK_file_write (h->fd, h->buffer, h->have); - if (ret != h->have) + ret = GNUNET_DISK_file_write (h->fd, + h->buffer, + h->have); + if (ret != (ssize_t) h->have) { GNUNET_DISK_file_close (h->fd); h->fd = NULL; @@ -472,7 +502,8 @@ GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h) * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int -GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer, +GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, + const void *buffer, size_t n) { const char *src = buffer; @@ -488,7 +519,9 @@ GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer, min = h->size - h->have; if (min > n - pos) min = n - pos; - GNUNET_memcpy (&h->buffer[h->have], &src[pos], min); + GNUNET_memcpy (&h->buffer[h->have], + &src[pos], + min); pos += min; h->have += min; if (pos == n) diff --git a/src/util/client.c b/src/util/client.c @@ -261,14 +261,27 @@ transmit_ready (void *cls) pos = (const char *) cstate->msg; len = ntohs (cstate->msg->size); GNUNET_assert (cstate->msg_off < len); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "client: message of type %u trying to send with socket %p (MQ: %p\n", + ntohs(cstate->msg->type), + cstate->sock, + cstate->mq); + RETRY: ret = GNUNET_NETWORK_socket_send (cstate->sock, &pos[cstate->msg_off], len - cstate->msg_off); if (-1 == ret) { - if (EINTR == errno) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "client: error during sending message of type %u\n", + ntohs(cstate->msg->type)); + if (EINTR == errno){ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "client: retrying message of type %u\n", + ntohs(cstate->msg->type)); goto RETRY; + } GNUNET_MQ_inject_error (cstate->mq, GNUNET_MQ_ERROR_WRITE); return; @@ -277,6 +290,9 @@ transmit_ready (void *cls) cstate->msg_off += ret; if (cstate->msg_off < len) { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "client: rescheduling message of type %u\n", + ntohs(cstate->msg->type)); cstate->send_task = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, cstate->sock, @@ -286,6 +302,9 @@ transmit_ready (void *cls) GNUNET_MQ_impl_send_in_flight (cstate->mq); return; } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "client: sending message of type %u successful\n", + ntohs(cstate->msg->type)); cstate->msg = NULL; GNUNET_MQ_impl_send_continue (cstate->mq); } @@ -297,7 +316,9 @@ transmit_ready (void *cls) * * @param cls the `struct ClientState` * @param msg message we received. - * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing due to disconnect (no error) + * #GNUNET_SYSERR to stop further processing due to error */ static int recv_message (void *cls, @@ -306,7 +327,7 @@ recv_message (void *cls, struct ClientState *cstate = cls; if (GNUNET_YES == cstate->in_destroy) - return GNUNET_SYSERR; + return GNUNET_NO; LOG (GNUNET_ERROR_TYPE_DEBUG, "Received message of type %u and size %u from %s\n", ntohs (msg->type), @@ -315,7 +336,7 @@ recv_message (void *cls, GNUNET_MQ_inject_message (cstate->mq, msg); if (GNUNET_YES == cstate->in_destroy) - return GNUNET_SYSERR; + return GNUNET_NO; return GNUNET_OK; } @@ -356,6 +377,7 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq, { struct ClientState *cstate = impl_state; + (void) mq; if (GNUNET_SYSERR == cstate->in_destroy) { /* defer destruction */ @@ -371,8 +393,12 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq, GNUNET_SCHEDULER_cancel (cstate->recv_task); if (NULL != cstate->retry_task) GNUNET_SCHEDULER_cancel (cstate->retry_task); - if (NULL != cstate->sock) + if (NULL != cstate->sock){ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "client: destroying socket: %p\n", + cstate->sock); GNUNET_NETWORK_socket_close (cstate->sock); + } cancel_aps (cstate); GNUNET_free (cstate->service_name); GNUNET_free_non_null (cstate->hostname); @@ -789,13 +815,18 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq, { struct ClientState *cstate = impl_state; + (void) mq; /* only one message at a time allowed */ GNUNET_assert (NULL == cstate->msg); GNUNET_assert (NULL == cstate->send_task); cstate->msg = msg; cstate->msg_off = 0; - if (NULL == cstate->sock) + if (NULL == cstate->sock){ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "client: message of type %u waiting for socket\n", + ntohs(msg->type)); return; /* still waiting for connection */ + } cstate->send_task = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, cstate->sock, @@ -816,6 +847,7 @@ connection_client_cancel_impl (struct GNUNET_MQ_Handle *mq, { struct ClientState *cstate = impl_state; + (void) mq; GNUNET_assert (NULL != cstate->msg); GNUNET_assert (0 == cstate->msg_off); cstate->msg = NULL; diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c @@ -100,8 +100,11 @@ GNUNET_xmalloc_ (size_t size, * @return allocated memory, never NULL */ void ** -GNUNET_xnew_array_2d_ (size_t n, size_t m, size_t elementSize, - const char *filename, int linenumber) +GNUNET_xnew_array_2d_ (size_t n, + size_t m, + size_t elementSize, + const char *filename, + int linenumber) { /* use char pointer internally to avoid void pointer arithmetic warnings */ char **ret = GNUNET_xmalloc_ (n * sizeof (void *) + /* 1. dim header */ @@ -218,6 +221,8 @@ GNUNET_xmalloc_unchecked_ (size_t size, { void *result; + (void) filename; + (void) linenumber; #ifdef W32_MEM_LIMIT size += sizeof (size_t); if (mem_used + size > W32_MEM_LIMIT) @@ -256,6 +261,9 @@ GNUNET_xrealloc_ (void *ptr, const char *filename, int linenumber) { + (void) filename; + (void) linenumber; + #ifdef W32_MEM_LIMIT n += sizeof (size_t); ptr = &((size_t *) ptr)[-1]; @@ -264,7 +272,8 @@ GNUNET_xrealloc_ (void *ptr, ptr = realloc (ptr, n); if ((NULL == ptr) && (n > 0)) { - LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "realloc"); + LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, + "realloc"); GNUNET_assert (0); } #ifdef W32_MEM_LIMIT @@ -466,8 +475,8 @@ GNUNET_xgrow_ (void **old, */ int GNUNET_asprintf (char **buf, - const char *format, - ...) + const char *format, + ...) { int ret; va_list args; @@ -475,6 +484,7 @@ GNUNET_asprintf (char **buf, va_start (args, format); ret = VSNPRINTF (NULL, 0, format, args); va_end (args); + GNUNET_assert (ret >= 0); *buf = GNUNET_malloc (ret + 1); va_start (args, format); ret = VSPRINTF (*buf, format, args); @@ -501,9 +511,13 @@ GNUNET_snprintf (char *buf, va_list args; va_start (args, format); - ret = VSNPRINTF (buf, size, format, args); + ret = VSNPRINTF (buf, + size, + format, + args); va_end (args); - GNUNET_assert (ret < size); + GNUNET_assert ( (ret >= 0) && + (((size_t) ret) < size) ); return ret; } @@ -523,7 +537,9 @@ GNUNET_copy_message (const struct GNUNET_MessageHeader *msg) msize = ntohs (msg->size); GNUNET_assert (msize >= sizeof (struct GNUNET_MessageHeader)); ret = GNUNET_malloc (msize); - GNUNET_memcpy (ret, msg, msize); + GNUNET_memcpy (ret, + msg, + msize); return ret; } diff --git a/src/util/common_logging.c b/src/util/common_logging.c @@ -976,20 +976,25 @@ mylog (enum GNUNET_ErrorType kind, } else { - strftime (date2, - DATE_STR_SIZE, - "%b %d %H:%M:%S-%%020llu", - tmptr); - snprintf (date, - sizeof (date), - date2, - (long long) (pc.QuadPart / - (performance_frequency.QuadPart / 1000))); + if (0 == + strftime (date2, + DATE_STR_SIZE, + "%b %d %H:%M:%S-%%020llu", + tmptr)) + abort (); + if (0 > + snprintf (date, + sizeof (date), + date2, + (long long) (pc.QuadPart / + (performance_frequency.QuadPart / 1000)))) + abort (); } #else struct timeval timeofday; - gettimeofday (&timeofday, NULL); + gettimeofday (&timeofday, + NULL); offset = GNUNET_TIME_get_offset (); if (offset > 0) { @@ -1022,24 +1027,33 @@ mylog (enum GNUNET_ErrorType kind, } else { - strftime (date2, - DATE_STR_SIZE, - "%b %d %H:%M:%S-%%06u", - tmptr); - snprintf (date, - sizeof (date), - date2, - timeofday.tv_usec); + if (0 == + strftime (date2, + DATE_STR_SIZE, + "%b %d %H:%M:%S-%%06u", + tmptr)) + abort (); + if (0 > + snprintf (date, + sizeof (date), + date2, + timeofday.tv_usec)) + abort (); } #endif - VSNPRINTF (buf, size, message, va); + VSNPRINTF (buf, + size, + message, + va); #if ! (defined(GNUNET_CULL_LOGGING) || TALER_WALLET_ONLY) if (NULL != tmptr) (void) setup_log_file (tmptr); #endif if ((0 != (kind & GNUNET_ERROR_TYPE_BULK)) && (0 != last_bulk_time.abs_value_us) && - (0 == strncmp (buf, last_bulk, sizeof (last_bulk)))) + (0 == strncmp (buf, + last_bulk, + sizeof (last_bulk)))) { last_bulk_repeat++; if ( (GNUNET_TIME_absolute_get_duration (last_bulk_time).rel_value_us > diff --git a/src/util/configuration.c b/src/util/configuration.c @@ -324,6 +324,7 @@ GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg, char *endsep; int dirty; int ret; + ssize_t sret; fn = GNUNET_STRINGS_filename_expand (filename); LOG (GNUNET_ERROR_TYPE_DEBUG, @@ -333,7 +334,10 @@ GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg, return GNUNET_SYSERR; dirty = cfg->dirty; /* back up value! */ if (GNUNET_SYSERR == - GNUNET_DISK_file_size (fn, &fs64, GNUNET_YES, GNUNET_YES)) + GNUNET_DISK_file_size (fn, + &fs64, + GNUNET_YES, + GNUNET_YES)) { LOG (GNUNET_ERROR_TYPE_WARNING, "Error while determining the file size of `%s'\n", @@ -349,7 +353,11 @@ GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg, } fs = fs64; mem = GNUNET_malloc (fs); - if (fs != GNUNET_DISK_fn_read (fn, mem, fs)) + sret = GNUNET_DISK_fn_read (fn, + mem, + fs); + if ( (sret < 0) || + (fs != (size_t) sret) ) { LOG (GNUNET_ERROR_TYPE_WARNING, _("Error while reading file `%s'\n"), @@ -413,7 +421,6 @@ GNUNET_CONFIGURATION_serialize (const struct GNUNET_CONFIGURATION_Handle *cfg, size_t m_size; size_t c_size; - /* Pass1 : calculate the buffer size required */ m_size = 0; for (sec = cfg->sections; NULL != sec; sec = sec->next) @@ -495,6 +502,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, char *fn; char *cfg_buf; size_t size; + ssize_t sret; fn = GNUNET_STRINGS_filename_expand (filename); if (fn == NULL) @@ -505,11 +513,13 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, return GNUNET_SYSERR; } cfg_buf = GNUNET_CONFIGURATION_serialize (cfg, &size); - if (size != GNUNET_DISK_fn_write (fn, cfg_buf, size, - GNUNET_DISK_PERM_USER_READ - | GNUNET_DISK_PERM_USER_WRITE - | GNUNET_DISK_PERM_GROUP_READ - | GNUNET_DISK_PERM_GROUP_WRITE)) + sret = GNUNET_DISK_fn_write (fn, cfg_buf, size, + GNUNET_DISK_PERM_USER_READ + | GNUNET_DISK_PERM_USER_WRITE + | GNUNET_DISK_PERM_GROUP_READ + | GNUNET_DISK_PERM_GROUP_WRITE); + if ( (sret < 0) || + (size != (size_t) sret) ) { GNUNET_free (fn); GNUNET_free (cfg_buf); @@ -858,13 +868,20 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg, */ void GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle *cfg, - const char *section, const char *option, + const char *section, + const char *option, unsigned long long number) { char s[64]; - GNUNET_snprintf (s, 64, "%llu", number); - GNUNET_CONFIGURATION_set_value_string (cfg, section, option, s); + GNUNET_snprintf (s, + 64, + "%llu", + number); + GNUNET_CONFIGURATION_set_value_string (cfg, + section, + option, + s); } diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2011, 2012 GNUnet e.V. + Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2011, 2012, 2018 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -513,10 +513,11 @@ GNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size, GNUNET_free (bf); return NULL; } - if (fsize == 0) + if (0 == fsize) { /* found existing empty file, just overwrite */ - if (GNUNET_OK != make_empty_file (bf->fh, size * 4LL)) + if (GNUNET_OK != + make_empty_file (bf->fh, size * 4LL)) { GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "write"); @@ -525,7 +526,7 @@ GNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size, return NULL; } } - else if (fsize != size * 4LL) + else if (fsize != ((off_t) size) * 4LL) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Size of file on disk is incorrect for this Bloom filter (want %llu, have %llu)\n"), @@ -563,9 +564,9 @@ GNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size, bf->filename = GNUNET_strdup (filename); /* Alloc block */ bf->bitArray = GNUNET_malloc_large (size); - if (bf->bitArray == NULL) + if (NULL == bf->bitArray) { - if (bf->fh != NULL) + if (NULL != bf->fh) GNUNET_DISK_file_close (bf->fh); GNUNET_free (bf->filename); GNUNET_free (bf); @@ -578,14 +579,18 @@ GNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size, /* Read from the file what bits we can */ rbuff = GNUNET_malloc (BUFFSIZE); pos = 0; - while (pos < size * 8LL) + while (pos < ((off_t) size) * 8LL) { int res; - res = GNUNET_DISK_file_read (bf->fh, rbuff, BUFFSIZE); + res = GNUNET_DISK_file_read (bf->fh, + rbuff, + BUFFSIZE); if (res == -1) { - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "read", bf->filename); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, + "read", + bf->filename); GNUNET_free (rbuff); GNUNET_free (bf->filename); GNUNET_DISK_file_close (bf->fh); @@ -713,11 +718,11 @@ GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter *bf) * * @param e the element * @param bf the filter - * @return GNUNET_YES if the element is in the filter, GNUNET_NO if not + * @return #GNUNET_YES if the element is in the filter, #GNUNET_NO if not */ int -GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter - *bf, const struct GNUNET_HashCode * e) +GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter *bf, + const struct GNUNET_HashCode * e) { int res; @@ -757,7 +762,8 @@ GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf, */ int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf, - const char *data, size_t size) + const char *data, + size_t size) { unsigned int i; unsigned int n; @@ -791,8 +797,7 @@ GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf, */ int GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf, - const struct GNUNET_CONTAINER_BloomFilter - *to_or) + const struct GNUNET_CONTAINER_BloomFilter *to_or) { unsigned int i; unsigned int n; @@ -828,13 +833,16 @@ GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf, */ void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf, - const struct GNUNET_HashCode * e) + const struct GNUNET_HashCode *e) { if (NULL == bf) return; - if (bf->filename == NULL) + if (NULL == bf->filename) return; - iterateBits (bf, &decrementBitCallback, bf, e); + iterateBits (bf, + &decrementBitCallback, + bf, + e); } /** @@ -851,7 +859,8 @@ GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf, void GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter *bf, GNUNET_CONTAINER_HashCodeIterator iterator, - void *iterator_cls, size_t size, + void *iterator_cls, + size_t size, unsigned int k) { struct GNUNET_HashCode hc; @@ -862,13 +871,16 @@ GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter *bf, while (i < size) i *= 2; size = i; /* make sure it's a power of 2 */ - + bf->addressesPerElement = k; bf->bitArraySize = size; bf->bitArray = GNUNET_malloc (size); - if (bf->filename != NULL) - make_empty_file (bf->fh, bf->bitArraySize * 4LL); - while (GNUNET_YES == iterator (iterator_cls, &hc)) - GNUNET_CONTAINER_bloomfilter_add (bf, &hc); + if (NULL != bf->filename) + make_empty_file (bf->fh, + bf->bitArraySize * 4LL); + while (GNUNET_YES == iterator (iterator_cls, + &hc)) + GNUNET_CONTAINER_bloomfilter_add (bf, + &hc); } /* end of container_bloomfilter.c */ diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c @@ -1242,7 +1242,7 @@ eddsa_d_to_a (gcry_mpi_t d) size_t rawmpilen; unsigned char digest[64]; /* 512-bit hash value */ gcry_buffer_t hvec[2]; - int b; + unsigned int b; gcry_mpi_t a; b = 256 / 8; /* number of bytes in `d` */ @@ -1257,7 +1257,7 @@ eddsa_d_to_a (gcry_mpi_t d) d)); hvec[0].data = digest; hvec[0].off = 0; - hvec[0].len = b > rawmpilen? b - rawmpilen : 0; + hvec[0].len = b > rawmpilen ? (b - rawmpilen) : 0; hvec[1].data = rawmpi; hvec[1].off = 0; hvec[1].len = rawmpilen; diff --git a/src/util/crypto_ecc_dlog.c b/src/util/crypto_ecc_dlog.c @@ -130,6 +130,7 @@ GNUNET_CRYPTO_ecc_bin_to_point (struct GNUNET_CRYPTO_EccDlogContext *edc, gcry_ctx_t ctx; gcry_mpi_point_t q; + (void) edc; if (0 != gcry_sexp_build (&pub_sexpr, NULL, "(public-key(ecc(curve " CURVE ")(q %b)))", (int) sizeof (bin->q_y), diff --git a/src/util/crypto_ecc_setup.c b/src/util/crypto_ecc_setup.c @@ -80,6 +80,7 @@ GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename) unsigned int cnt; int ec; uint64_t fs; + ssize_t sret; if (GNUNET_SYSERR == GNUNET_DISK_directory_create_for_file (filename)) return NULL; @@ -193,7 +194,8 @@ GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename) { LOG (GNUNET_ERROR_TYPE_ERROR, _("When trying to read key file `%s' I found %u bytes but I need at least %u.\n"), - filename, (unsigned int) fs, + filename, + (unsigned int) fs, (unsigned int) sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey)); LOG (GNUNET_ERROR_TYPE_ERROR, _("This may be ok if someone is currently generating a key.\n")); @@ -205,12 +207,20 @@ GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename) } fs = sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey); priv = GNUNET_malloc (fs); - GNUNET_assert (fs == GNUNET_DISK_file_read (fd, priv, fs)); + sret = GNUNET_DISK_file_read (fd, + priv, + fs); + GNUNET_assert ( (sret >= 0) && + (fs == (size_t) sret) ); if (GNUNET_YES != - GNUNET_DISK_file_unlock (fd, 0, + GNUNET_DISK_file_unlock (fd, + 0, sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey))) - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); - GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, + "fcntl", + filename); + GNUNET_assert (GNUNET_YES == + GNUNET_DISK_file_close (fd)); return priv; } @@ -237,8 +247,10 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename) unsigned int cnt; int ec; uint64_t fs; - - if (GNUNET_SYSERR == GNUNET_DISK_directory_create_for_file (filename)) + ssize_t sret; + + if (GNUNET_SYSERR == + GNUNET_DISK_directory_create_for_file (filename)) return NULL; while (GNUNET_YES != GNUNET_DISK_file_test (filename)) { @@ -255,19 +267,24 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename) { /* must exist but not be accessible, fail for good! */ if (0 != ACCESS (filename, R_OK)) - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", filename); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, + "access", + filename); else GNUNET_break (0); /* what is going on!? */ return NULL; } continue; } - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "open", filename); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, + "open", + filename); return NULL; } cnt = 0; while (GNUNET_YES != - GNUNET_DISK_file_lock (fd, 0, + GNUNET_DISK_file_lock (fd, + 0, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey), GNUNET_YES)) { @@ -276,7 +293,8 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename) { ec = errno; LOG (GNUNET_ERROR_TYPE_ERROR, - _("Could not acquire lock on file `%s': %s...\n"), filename, + _("Could not acquire lock on file `%s': %s...\n"), + filename, STRERROR (ec)); } } @@ -285,21 +303,29 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename) priv = GNUNET_CRYPTO_ecdsa_key_create (); GNUNET_assert (NULL != priv); GNUNET_assert (sizeof (*priv) == - GNUNET_DISK_file_write (fd, priv, sizeof (*priv))); + GNUNET_DISK_file_write (fd, + priv, + sizeof (*priv))); GNUNET_DISK_file_sync (fd); if (GNUNET_YES != GNUNET_DISK_file_unlock (fd, 0, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); - GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, + "fcntl", + filename); + GNUNET_assert (GNUNET_YES == + GNUNET_DISK_file_close (fd)); return priv; } /* key file exists already, read it! */ - fd = GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ, + fd = GNUNET_DISK_file_open (filename, + GNUNET_DISK_OPEN_READ, GNUNET_DISK_PERM_NONE); if (NULL == fd) { - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "open", filename); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, + "open", + filename); return NULL; } cnt = 0; @@ -318,25 +344,34 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename) filename, STRERROR (ec)); LOG (GNUNET_ERROR_TYPE_ERROR, - _ - ("This may be ok if someone is currently generating a private key.\n")); + _("This may be ok if someone is currently generating a private key.\n")); } short_wait (); continue; } - if (GNUNET_YES != GNUNET_DISK_file_test (filename)) + if (GNUNET_YES != + GNUNET_DISK_file_test (filename)) { /* eh, what!? File we opened is now gone!? */ - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "stat", filename); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, + "stat", + filename); if (GNUNET_YES != GNUNET_DISK_file_unlock (fd, 0, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); - GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd)); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, + "fcntl", + filename); + GNUNET_assert (GNUNET_OK == + GNUNET_DISK_file_close (fd)); return NULL; } - if (GNUNET_OK != GNUNET_DISK_file_size (filename, &fs, GNUNET_YES, GNUNET_YES)) + if (GNUNET_OK != + GNUNET_DISK_file_size (filename, + &fs, + GNUNET_YES, + GNUNET_YES)) fs = 0; if (fs < sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)) { @@ -345,7 +380,9 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename) if (GNUNET_YES != GNUNET_DISK_file_unlock (fd, 0, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, + "fcntl", + filename); if (0 == ++cnt % 10) { LOG (GNUNET_ERROR_TYPE_ERROR, @@ -362,12 +399,19 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename) } fs = sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey); priv = GNUNET_malloc (fs); - GNUNET_assert (fs == GNUNET_DISK_file_read (fd, priv, fs)); + sret = GNUNET_DISK_file_read (fd, + priv, + fs); + GNUNET_assert ( (sret >= 0) && + (fs == (size_t) sret) ); if (GNUNET_YES != GNUNET_DISK_file_unlock (fd, 0, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); - GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, + "fcntl", + filename); + GNUNET_assert (GNUNET_YES == + GNUNET_DISK_file_close (fd)); return priv; } diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c @@ -69,9 +69,9 @@ GNUNET_CRYPTO_hash_to_enc (const struct GNUNET_HashCode *block, char *np; np = GNUNET_STRINGS_data_to_string ((const unsigned char *) block, - sizeof (struct GNUNET_HashCode), - (char*) result, - sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1); + sizeof (struct GNUNET_HashCode), + (char *) result, + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1); GNUNET_assert (NULL != np); *np = '\0'; } diff --git a/src/util/crypto_hash_file.c b/src/util/crypto_hash_file.c @@ -124,23 +124,29 @@ file_hash_task (void *cls) struct GNUNET_CRYPTO_FileHashContext *fhc = cls; struct GNUNET_HashCode *res; size_t delta; + ssize_t sret; fhc->task = NULL; GNUNET_assert (fhc->offset <= fhc->fsize); delta = fhc->bsize; if (fhc->fsize - fhc->offset < delta) delta = fhc->fsize - fhc->offset; - if (delta != GNUNET_DISK_file_read (fhc->fh, - fhc->buffer, - delta)) + sret = GNUNET_DISK_file_read (fhc->fh, + fhc->buffer, + delta); + if ( (sret < 0) || + (delta != (size_t) sret) ) { LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "read", fhc->filename); - file_hash_finish (fhc, NULL); + file_hash_finish (fhc, + NULL); return; } - gcry_md_write (fhc->md, fhc->buffer, delta); + gcry_md_write (fhc->md, + fhc->buffer, + delta); fhc->offset += delta; if (fhc->offset == fhc->fsize) { diff --git a/src/util/disk.c b/src/util/disk.c @@ -1324,6 +1324,7 @@ static int remove_helper (void *unused, const char *fn) { + (void) unused; (void) GNUNET_DISK_directory_remove (fn); return GNUNET_OK; } @@ -1396,6 +1397,7 @@ GNUNET_DISK_file_copy (const char *src, uint64_t pos; uint64_t size; size_t len; + ssize_t sret; struct GNUNET_DISK_FileHandle *in; struct GNUNET_DISK_FileHandle *out; @@ -1425,9 +1427,17 @@ GNUNET_DISK_file_copy (const char *src, len = COPY_BLK_SIZE; if (len > size - pos) len = size - pos; - if (len != GNUNET_DISK_file_read (in, buf, len)) + sret = GNUNET_DISK_file_read (in, + buf, + len); + if ( (sret < 0) || + (len != (size_t) sret) ) goto FAIL; - if (len != GNUNET_DISK_file_write (out, buf, len)) + sret = GNUNET_DISK_file_write (out, + buf, + len); + if ( (sret < 0) || + (len != (size_t) sret) ) goto FAIL; pos += len; } @@ -1457,7 +1467,8 @@ GNUNET_DISK_filename_canonicalize (char *fn) { c = *idx; - if (c == '/' || c == '\\' || c == ':' || c == '*' || c == '?' || c == '"' || + if (c == '/' || c == '\\' || c == ':' || + c == '*' || c == '?' || c == '"' || c == '<' || c == '>' || c == '|') { *idx = '_'; @@ -2236,18 +2247,24 @@ create_selectable_pipe (PHANDLE read_pipe_ptr, PHANDLE write_pipe_ptr, * @return handle to the new pipe, NULL on error */ struct GNUNET_DISK_PipeHandle * -GNUNET_DISK_pipe (int blocking_read, int blocking_write, int inherit_read, int inherit_write) +GNUNET_DISK_pipe (int blocking_read, + int blocking_write, + int inherit_read, + int inherit_write) { #ifndef MINGW int fd[2]; int ret; int eno; + (void) inherit_read; + (void) inherit_write; ret = pipe (fd); if (ret == -1) { eno = errno; - LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "pipe"); + LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, + "pipe"); errno = eno; return NULL; } diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c @@ -46,6 +46,8 @@ print_version (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { const char *version = scls; + (void) option; + (void) value; printf ("%s v%s\n", ctx->binaryName, version); @@ -104,6 +106,8 @@ format_help (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, const struct GNUNET_GETOPT_CommandLineOption *opt; const struct GNUNET_OS_ProjectData *pd; + (void) option; + (void) value; if (NULL != about) { printf ("%s\n%s\n", ctx->binaryOptions, gettext (about)); @@ -112,7 +116,7 @@ format_help (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, } i = 0; opt = ctx->allOptions; - while (opt[i].description != NULL) + while (NULL != opt[i].description) { if (opt[i].shortName == '\0') printf (" "); @@ -120,7 +124,7 @@ format_help (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, printf (" -%c, ", opt[i].shortName); printf ("--%s", opt[i].name); slen = 8 + strlen (opt[i].name); - if (opt[i].argumentHelp != NULL) + if (NULL != opt[i].argumentHelp) { printf ("=%s", opt[i].argumentHelp); slen += 1 + strlen (opt[i].argumentHelp); @@ -144,7 +148,7 @@ format_help (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, OUTER: while (ml - p > 78 - slen) { - for (j = p + 78 - slen; j > p; j--) + for (j = p + 78 - slen; j > (int) p; j--) { if (isspace ((unsigned char) trans[j])) { @@ -227,6 +231,9 @@ increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { unsigned int *val = scls; + (void) ctx; + (void) option; + (void) value; (*val)++; return GNUNET_OK; } @@ -243,9 +250,9 @@ increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_increment_uint (char shortName, - const char *name, - const char *description, - unsigned int *val) + const char *name, + const char *description, + unsigned int *val) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = shortName, @@ -302,6 +309,9 @@ set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { int *val = scls; + (void) ctx; + (void) option; + (void) value; *val = 1; return GNUNET_OK; } @@ -319,9 +329,9 @@ set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag (char shortName, - const char *name, - const char *description, - int *val) + const char *name, + const char *description, + int *val) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = shortName, @@ -357,6 +367,8 @@ set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { char **val = scls; + (void) ctx; + (void) option; GNUNET_assert (NULL != value); GNUNET_free_non_null (*val); *val = GNUNET_strdup (value); @@ -436,6 +448,8 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { char **val = scls; + (void) ctx; + (void) option; GNUNET_assert (NULL != value); GNUNET_free_non_null (*val); *val = GNUNET_STRINGS_filename_expand (value); @@ -454,10 +468,10 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_filename (char shortName, - const char *name, - const char *argumentHelp, - const char *description, - char **str) + const char *name, + const char *argumentHelp, + const char *description, + char **str) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = shortName, @@ -538,6 +552,7 @@ set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { unsigned long long *val = scls; + (void) ctx; if (1 != SSCANF (value, "%llu", val)) @@ -562,10 +577,10 @@ set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_ulong (char shortName, - const char *name, - const char *argumentHelp, - const char *description, - unsigned long long *val) + const char *name, + const char *argumentHelp, + const char *description, + unsigned long long *val) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = shortName, @@ -601,7 +616,8 @@ set_relative_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, const char *value) { struct GNUNET_TIME_Relative *val = scls; - + + (void) ctx; if (GNUNET_OK != GNUNET_STRINGS_fancy_time_to_relative (value, val)) @@ -627,10 +643,10 @@ set_relative_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_relative_time (char shortName, - const char *name, - const char *argumentHelp, - const char *description, - struct GNUNET_TIME_Relative *val) + const char *name, + const char *argumentHelp, + const char *description, + struct GNUNET_TIME_Relative *val) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = shortName, @@ -667,6 +683,7 @@ set_absolute_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { struct GNUNET_TIME_Absolute *val = scls; + (void) ctx; if (GNUNET_OK != GNUNET_STRINGS_fancy_time_to_absolute (value, val)) @@ -692,10 +709,10 @@ set_absolute_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_absolute_time (char shortName, - const char *name, - const char *argumentHelp, - const char *description, - struct GNUNET_TIME_Absolute *val) + const char *name, + const char *argumentHelp, + const char *description, + struct GNUNET_TIME_Absolute *val) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = shortName, @@ -732,6 +749,7 @@ set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { unsigned int *val = scls; + (void) ctx; if (1 != SSCANF (value, "%u", val)) @@ -756,10 +774,10 @@ set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, */ struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_uint (char shortName, - const char *name, - const char *argumentHelp, - const char *description, - unsigned int *val) + const char *name, + const char *argumentHelp, + const char *description, + unsigned int *val) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = shortName, @@ -813,6 +831,7 @@ set_base32 (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, { struct Base32Context *bc = scls; + (void) ctx; if (GNUNET_OK != GNUNET_STRINGS_string_to_data (value, strlen (value), diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c @@ -72,12 +72,17 @@ static int rewrite; * @param value value of the option */ static void -print_option (void *cls, const char *section, +print_option (void *cls, + const char *section, const char *option, const char *value) { + (void) cls; + (void) section; fprintf (stdout, - "%s = %s\n", option, value); + "%s = %s\n", + option, + value); } @@ -91,7 +96,10 @@ static void print_section_name (void *cls, const char *section) { - fprintf (stdout, "%s\n", section); + (void) cls; + fprintf (stdout, + "%s\n", + section); } @@ -112,6 +120,8 @@ run (void *cls, struct GNUNET_CONFIGURATION_Handle *out = NULL; struct GNUNET_CONFIGURATION_Handle *diff = NULL; + (void) cls; + (void) args; if (rewrite) { struct GNUNET_CONFIGURATION_Handle *def; @@ -221,36 +231,37 @@ run (void *cls, * @return 0 ok, 1 on error */ int -main (int argc, char *const *argv) +main (int argc, + char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { GNUNET_GETOPT_option_flag ('f', - "filename", - gettext_noop ("obtain option of value as a filename (with $-expansion)"), - &is_filename), + "filename", + gettext_noop ("obtain option of value as a filename (with $-expansion)"), + &is_filename), GNUNET_GETOPT_option_string ('s', - "section", - "SECTION", - gettext_noop ("name of the section to access"), - &section), + "section", + "SECTION", + gettext_noop ("name of the section to access"), + &section), GNUNET_GETOPT_option_string ('o', - "option", - "OPTION", - gettext_noop ("name of the option to access"), - &option), + "option", + "OPTION", + gettext_noop ("name of the option to access"), + &option), GNUNET_GETOPT_option_string ('V', - "value", - "VALUE", - gettext_noop ("value to set"), - &value), + "value", + "VALUE", + gettext_noop ("value to set"), + &value), GNUNET_GETOPT_option_flag ('S', - "list-sections", - gettext_noop ("print available configuration sections"), - &list_sections), + "list-sections", + gettext_noop ("print available configuration sections"), + &list_sections), GNUNET_GETOPT_option_flag ('w', - "rewrite", - gettext_noop ("write configuration file that only contains delta to defaults"), - &rewrite), + "rewrite", + gettext_noop ("write configuration file that only contains delta to defaults"), + &rewrite), GNUNET_GETOPT_OPTION_END }; if (GNUNET_OK != diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c @@ -281,8 +281,10 @@ print_key (const char *filename) uint64_t fs; unsigned int total_hostkeys; unsigned int c; + ssize_t sret; - if (GNUNET_YES != GNUNET_DISK_file_test (filename)) + if (GNUNET_YES != + GNUNET_DISK_file_test (filename)) { fprintf (stderr, _("Hostkeys file `%s' not found\n"), @@ -291,7 +293,11 @@ print_key (const char *filename) } /* Check hostkey file size, read entire thing into memory */ - if (GNUNET_OK != GNUNET_DISK_file_size (filename, &fs, GNUNET_YES, GNUNET_YES)) + if (GNUNET_OK != + GNUNET_DISK_file_size (filename, + &fs, + GNUNET_YES, + GNUNET_YES)) fs = 0; if (0 == fs) { @@ -307,15 +313,22 @@ print_key (const char *filename) filename); return; } - fd = GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ, - GNUNET_DISK_PERM_NONE); + fd = GNUNET_DISK_file_open (filename, + GNUNET_DISK_OPEN_READ, + GNUNET_DISK_PERM_NONE); if (NULL == fd) { - GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", filename); + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, + "open", + filename); return; } hostkeys_data = GNUNET_malloc (fs); - if (fs != GNUNET_DISK_file_read (fd, hostkeys_data, fs)) + sret = GNUNET_DISK_file_read (fd, + hostkeys_data, + fs); + if ( (sret < 0) || + (fs != (size_t) sret) ) { fprintf (stderr, _("Could not read hostkey file: %s\n"), @@ -351,15 +364,21 @@ print_key (const char *filename) /** * Main function that will be run by the scheduler. * - * @param cls closure + * @param cls closure, NULL * @param args remaining command-line arguments * @param cfgfile name of the configuration file used (for saving, can be NULL!) * @param cfg configuration */ static void -run (void *cls, char *const *args, const char *cfgfile, +run (void *cls, + char *const *args, + const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { + (void) cls; + (void) cfgfile; + (void) cfg; + if (print_examples_flag) { print_examples (); diff --git a/src/util/gnunet-resolver.c b/src/util/gnunet-resolver.c @@ -46,9 +46,12 @@ static void print_hostname (void *cls, const char *hostname) { + (void) cls; if (NULL == hostname) return; - FPRINTF (stdout, "%s\n", hostname); + FPRINTF (stdout, + "%s\n", + hostname); } @@ -60,11 +63,17 @@ print_hostname (void *cls, * @param addrlen length of the address */ static void -print_sockaddr (void *cls, const struct sockaddr *addr, socklen_t addrlen) +print_sockaddr (void *cls, + const struct sockaddr *addr, + socklen_t addrlen) { + (void) cls; if (NULL == addr) return; - FPRINTF (stdout, "%s\n", GNUNET_a2s (addr, addrlen)); + FPRINTF (stdout, + "%s\n", + GNUNET_a2s (addr, + addrlen)); } @@ -77,7 +86,9 @@ print_sockaddr (void *cls, const struct sockaddr *addr, socklen_t addrlen) * @param cfg configuration */ static void -run (void *cls, char *const *args, const char *cfgfile, +run (void *cls, + char *const *args, + const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { const struct sockaddr *sa; @@ -85,11 +96,18 @@ run (void *cls, char *const *args, const char *cfgfile, struct sockaddr_in v4; struct sockaddr_in6 v6; - if (args[0] == NULL) + (void) cls; + (void) cfgfile; + (void) cfg; + if (NULL == args[0]) return; if (! reverse) { - GNUNET_RESOLVER_ip_get (args[0], AF_UNSPEC, GET_TIMEOUT, &print_sockaddr, NULL); + GNUNET_RESOLVER_ip_get (args[0], + AF_UNSPEC, + GET_TIMEOUT, + &print_sockaddr, + NULL); return; } diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c @@ -582,7 +582,7 @@ get_ip_from_hostname (struct GNUNET_SERVICE_Client *client, /** * Verify well-formedness of GET-message. * - * @param cls closure + * @param cls closure, unused * @param get the actual message * @return #GNUNET_OK if @a get is well-formed */ @@ -594,6 +594,7 @@ check_get (void *cls, int direction; int af; + (void) cls; size = ntohs (get->header.size) - sizeof (*get); direction = ntohl (get->direction); if (GNUNET_NO == direction) @@ -688,7 +689,7 @@ handle_get (void *cls, /** * Callback called when a client connects to the service. * - * @param cls closure for the service + * @param cls closure for the service, unused * @param c the new client that connected to the service * @param mq the message queue used to send messages to the client * @return @a c @@ -698,6 +699,9 @@ connect_cb (void *cls, struct GNUNET_SERVICE_Client *c, struct GNUNET_MQ_Handle *mq) { + (void) cls; + (void) mq; + return c; } @@ -714,6 +718,8 @@ disconnect_cb (void *cls, struct GNUNET_SERVICE_Client *c, void *internal_cls) { + (void) cls; + GNUNET_assert (c == internal_cls); } diff --git a/src/util/mq.c b/src/util/mq.c @@ -357,6 +357,12 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, } GNUNET_assert (NULL == mq->envelope_head); mq->current_envelope = ev; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "mq: sending message of type %u, queue empty (MQ: %p)\n", + ntohs(ev->mh->type), + mq); + mq->send_impl (mq, ev->mh, mq->impl_state); @@ -452,6 +458,11 @@ impl_send_continue (void *cls) GNUNET_CONTAINER_DLL_remove (mq->envelope_head, mq->envelope_tail, mq->current_envelope); + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "mq: sending message of type %u from queue\n", + ntohs(mq->current_envelope->mh->type)); + mq->send_impl (mq, mq->current_envelope->mh, mq->impl_state); @@ -840,6 +851,9 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq) ev); GNUNET_assert (0 < mq->queue_length); mq->queue_length--; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "MQ destroy drops message of type %u\n", + ntohs (ev->mh->type)); GNUNET_MQ_discard (ev); } if (NULL != mq->current_envelope) @@ -847,6 +861,9 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq) /* we can only discard envelopes that * are not queued! */ mq->current_envelope->parent_queue = NULL; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "MQ destroy drops current message of type %u\n", + ntohs (mq->current_envelope->mh->type)); GNUNET_MQ_discard (mq->current_envelope); mq->current_envelope = NULL; GNUNET_assert (0 < mq->queue_length); @@ -928,6 +945,11 @@ GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev) GNUNET_CONTAINER_DLL_remove (mq->envelope_head, mq->envelope_tail, mq->current_envelope); + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "mq: sending canceled message of type %u queue\n", + ntohs(ev->mh->type)); + mq->send_impl (mq, mq->current_envelope->mh, mq->impl_state); diff --git a/src/util/mst.c b/src/util/mst.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2010, 2016 GNUnet e.V. + Copyright (C) 2010, 2016, 2017 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -126,6 +126,7 @@ GNUNET_MST_from_buffer (struct GNUNET_MessageStreamTokenizer *mst, int need_align; unsigned long offset; int ret; + int cbret; GNUNET_assert (mst->off <= mst->pos); GNUNET_assert (mst->pos <= mst->curr_buf); @@ -229,9 +230,17 @@ do_align: if (one_shot == GNUNET_YES) one_shot = GNUNET_SYSERR; mst->off += want; - if (GNUNET_SYSERR == mst->cb (mst->cb_cls, - hdr)) + if (GNUNET_OK != + (cbret = mst->cb (mst->cb_cls, + hdr))) + { + if (GNUNET_SYSERR == cbret) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failure processing message of type %u and size %u\n", + ntohs (hdr->type), + ntohs (hdr->size)); return GNUNET_SYSERR; + } if (mst->off == mst->pos) { /* reset to beginning of buffer, it's free right now! */ @@ -271,9 +280,17 @@ do_align: } if (one_shot == GNUNET_YES) one_shot = GNUNET_SYSERR; - if (GNUNET_SYSERR == mst->cb (mst->cb_cls, - hdr)) + if (GNUNET_OK != + (cbret = mst->cb (mst->cb_cls, + hdr))) + { + if (GNUNET_SYSERR == cbret) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failure processing message of type %u and size %u\n", + ntohs (hdr->type), + ntohs (hdr->size)); return GNUNET_SYSERR; + } buf += want; size -= want; } diff --git a/src/util/network.c b/src/util/network.c @@ -91,8 +91,8 @@ GNUNET_NETWORK_test_pf (int pf) if (EAFNOSUPPORT == errno) return GNUNET_NO; GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to create test socket: %s\n", - STRERROR (errno)); + "Failed to create test socket: %s\n", + STRERROR (errno)); return GNUNET_SYSERR; } #if WINDOWS @@ -128,21 +128,20 @@ GNUNET_NETWORK_shorten_unixpath (char *unixpath) if (slen < upm) return unixpath; /* no shortening required */ GNUNET_CRYPTO_hash (unixpath, slen, &sh); - while (16 + - strlen (unixpath) >= upm) + while (16 + strlen (unixpath) >= upm) { if (NULL == (end = strrchr (unixpath, '/'))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - _("Unable to shorten unix path `%s' while keeping name unique\n"), - unixpath); + _("Unable to shorten unix path `%s' while keeping name unique\n"), + unixpath); GNUNET_free (unixpath); return NULL; } *end = '\0'; } GNUNET_CRYPTO_hash_to_enc (&sh, &ae); - strncat (unixpath, (char*) ae.encoding, 16); + strncat (unixpath, (char *) ae.encoding, 16); return unixpath; } @@ -239,7 +238,6 @@ GNUNET_NETWORK_socket_set_blocking (struct GNUNET_NETWORK_Handle *fd, int flags = fcntl (fd->fd, F_GETFL); if (flags == -1) - { LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "fcntl"); @@ -311,7 +309,7 @@ socket_set_nosigpipe (const struct GNUNET_NETWORK_Handle *h) if (0 != setsockopt (h->fd, SOL_SOCKET, SO_NOSIGPIPE, - (const void *) &abs_value, + (const void *) &abs_value, sizeof (abs_value))) LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "setsockopt"); } @@ -342,8 +340,10 @@ socket_set_nodelay (const struct GNUNET_NETWORK_Handle *h) const char *abs_value = "1"; if (0 != - setsockopt (h->fd, IPPROTO_TCP, TCP_NODELAY, - (const void *) abs_value, + setsockopt (h->fd, + IPPROTO_TCP, + TCP_NODELAY, + (const void *) abs_value, sizeof (abs_value))) LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "setsockopt"); @@ -365,7 +365,7 @@ socket_set_nodelay (const struct GNUNET_NETWORK_Handle *h) */ static int initialize_network_handle (struct GNUNET_NETWORK_Handle *h, - int af, + int af, int type) { int eno; @@ -409,7 +409,7 @@ initialize_network_handle (struct GNUNET_NETWORK_Handle *h, #ifdef AF_UNIX && (af != AF_UNIX) #endif - ) + ) socket_set_nodelay (h); return GNUNET_OK; } @@ -426,7 +426,7 @@ initialize_network_handle (struct GNUNET_NETWORK_Handle *h, struct GNUNET_NETWORK_Handle * GNUNET_NETWORK_socket_accept (const struct GNUNET_NETWORK_Handle *desc, struct sockaddr *address, - socklen_t *address_len) + socklen_t *address_len) { struct GNUNET_NETWORK_Handle *ret; int eno; @@ -443,7 +443,7 @@ GNUNET_NETWORK_socket_accept (const struct GNUNET_NETWORK_Handle *desc, if (0 == gsn) LOG (GNUNET_ERROR_TYPE_DEBUG, - "Accepting connection on `%s'\n", + "Accepting connection on `%s'\n", GNUNET_a2s ((const struct sockaddr *) &name, namelen)); } @@ -491,9 +491,11 @@ GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc, const int on = 1; if (AF_INET6 == desc->af) - if (setsockopt (desc->fd, IPPROTO_IPV6, IPV6_V6ONLY, - (const void *) &on, - sizeof (on))) + if (setsockopt (desc->fd, + IPPROTO_IPV6, + IPV6_V6ONLY, + (const void *) &on, + sizeof (on))) LOG_STRERROR (GNUNET_ERROR_TYPE_DEBUG, "setsockopt"); } @@ -593,8 +595,8 @@ GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc) if (0 != unlink (dirname)) { LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, - "unlink", - dirname); + "unlink", + dirname); } else { @@ -1209,8 +1211,8 @@ GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to, to->handles_size, from->handles_pos * 2); GNUNET_memcpy (to->handles, - from->handles, - from->handles_pos * sizeof (struct GNUNET_NETWORK_Handle *)); + from->handles, + from->handles_pos * sizeof (struct GNUNET_NETWORK_Handle *)); to->handles_pos = from->handles_pos; #endif } @@ -1223,7 +1225,7 @@ GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to, * @return POSIX file descriptor */ int -GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc) +GNUNET_NETWORK_get_fd (const struct GNUNET_NETWORK_Handle *desc) { return desc->fd; } @@ -1236,7 +1238,7 @@ GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc) * @return sockaddr */ struct sockaddr* -GNUNET_NETWORK_get_addr (struct GNUNET_NETWORK_Handle *desc) +GNUNET_NETWORK_get_addr (const struct GNUNET_NETWORK_Handle *desc) { return desc->addr; } @@ -1249,7 +1251,7 @@ GNUNET_NETWORK_get_addr (struct GNUNET_NETWORK_Handle *desc) * @return socklen_t for sockaddr */ socklen_t -GNUNET_NETWORK_get_addrlen (struct GNUNET_NETWORK_Handle *desc) +GNUNET_NETWORK_get_addrlen (const struct GNUNET_NETWORK_Handle *desc) { return desc->addrlen; } @@ -1326,9 +1328,10 @@ GNUNET_NETWORK_fdset_handle_set (struct GNUNET_NETWORK_FDSet *fds, #else int fd; - GNUNET_DISK_internal_file_handle_ (h, - &fd, - sizeof (int)); + GNUNET_assert (GNUNET_OK == + GNUNET_DISK_internal_file_handle_ (h, + &fd, + sizeof (int))); FD_SET (fd, &fds->sds); fds->nsds = GNUNET_MAX (fd + 1, @@ -1706,7 +1709,7 @@ initialize_select_thread () */ int GNUNET_NETWORK_test_port_free (int ipproto, - uint16_t port) + uint16_t port) { struct GNUNET_NETWORK_Handle *socket; int bind_status; @@ -1717,36 +1720,35 @@ GNUNET_NETWORK_test_port_free (int ipproto, struct addrinfo *ai; GNUNET_snprintf (open_port_str, - sizeof (open_port_str), - "%u", - (unsigned int) port); - socktype = (IPPROTO_TCP == ipproto) - ? SOCK_STREAM - : SOCK_DGRAM; + sizeof (open_port_str), + "%u", + (unsigned int) port); + socktype = (IPPROTO_TCP == ipproto) ? SOCK_STREAM : SOCK_DGRAM; ret = NULL; memset (&hint, 0, sizeof (hint)); - hint.ai_family = AF_UNSPEC; /* IPv4 and IPv6 */ + hint.ai_family = AF_UNSPEC; /* IPv4 and IPv6 */ hint.ai_socktype = socktype; hint.ai_protocol = ipproto; hint.ai_addrlen = 0; hint.ai_addr = NULL; hint.ai_canonname = NULL; hint.ai_next = NULL; - hint.ai_flags = AI_PASSIVE | AI_NUMERICSERV; /* Wild card address */ + hint.ai_flags = AI_PASSIVE | AI_NUMERICSERV; /* Wild card address */ GNUNET_assert (0 == getaddrinfo (NULL, - open_port_str, - &hint, - &ret)); + open_port_str, + &hint, + &ret)); + bind_status = GNUNET_NO; for (ai = ret; NULL != ai; ai = ai->ai_next) { socket = GNUNET_NETWORK_socket_create (ai->ai_family, - ai->ai_socktype, - ai->ai_protocol); + ai->ai_socktype, + ai->ai_protocol); if (NULL == socket) continue; bind_status = GNUNET_NETWORK_socket_bind (socket, - ai->ai_addr, - ai->ai_addrlen); + ai->ai_addr, + ai->ai_addrlen); GNUNET_NETWORK_socket_close (socket); if (GNUNET_OK != bind_status) break; @@ -1806,7 +1808,7 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, (tv.tv_sec * GNUNET_TIME_UNIT_SECONDS.rel_value_us)); } return select (nfds, - (NULL != rfds) ? &rfds->sds : NULL, + (NULL != rfds) ? &rfds->sds : NULL, (NULL != wfds) ? &wfds->sds : NULL, (NULL != efds) ? &efds->sds : NULL, (timeout.rel_value_us == @@ -2176,7 +2178,7 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, { LOG (GNUNET_ERROR_TYPE_DEBUG, "Adding the socket event to the array as %d\n", - nhandles); + nhandles); handle_array[nhandles++] = select_finished_event; if (timeout.rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us) { diff --git a/src/util/os_installation.c b/src/util/os_installation.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2006-2016 GNUnet e.V. + Copyright (C) 2006-2018 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -152,14 +152,21 @@ get_path_from_proc_exe () ssize_t size; char *lep; - GNUNET_snprintf (fn, sizeof (fn), "/proc/%u/exe", getpid ()); - size = readlink (fn, lnk, sizeof (lnk) - 1); + GNUNET_snprintf (fn, + sizeof (fn), + "/proc/%u/exe", + getpid ()); + size = readlink (fn, + lnk, + sizeof (lnk) - 1); if (size <= 0) { - LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "readlink", fn); + LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, + "readlink", + fn); return NULL; } - GNUNET_assert (size < sizeof (lnk)); + GNUNET_assert ( ((size_t) size) < sizeof (lnk)); lnk[size] = '\0'; while ((lnk[size] != '/') && (size > 0)) size--; @@ -167,12 +174,13 @@ get_path_from_proc_exe () "/%s/libexec/", current_pd->project_dirname); /* test for being in lib/gnunet/libexec/ or lib/MULTIARCH/gnunet/libexec */ - if ( (size > strlen (lep)) && + if ( (((size_t) size) > strlen (lep)) && (0 == strcmp (lep, &lnk[size - strlen (lep)])) ) size -= strlen (lep) - 1; GNUNET_free (lep); - if ((size < 4) || (lnk[size - 4] != '/')) + if ( (size < 4) || + (lnk[size - 4] != '/') ) { /* not installed in "/bin/" -- binary path probably useless */ return NULL; @@ -903,6 +911,7 @@ GNUNET_OS_check_helper_binary (const char *binary, if (check_suid) { #ifndef MINGW + (void) params; if ( (0 != (statbuf.st_mode & S_ISUID)) && (0 == statbuf.st_uid) ) { diff --git a/src/util/os_priority.c b/src/util/os_priority.c @@ -154,6 +154,7 @@ GNUNET_OS_install_parent_control_handler (void *cls) struct GNUNET_DISK_FileHandle *control_pipe; uint64_t pipe_fd; + (void) cls; if (NULL != pch) { /* already done, we've been called twice... */ diff --git a/src/util/peer.c b/src/util/peer.c @@ -201,7 +201,8 @@ GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta) return; GNUNET_assert (id < size); GNUNET_assert (table[id]->rc > 0); - GNUNET_assert ((delta >= 0) || (table[id]->rc >= -delta)); + GNUNET_assert ( (delta >= 0) || + (table[id]->rc >= (unsigned int) (-delta)) ); table[id]->rc += delta; if (0 == table[id]->rc) { diff --git a/src/util/program.c b/src/util/program.c @@ -69,6 +69,17 @@ struct CommandContext /** + * task run when the scheduler shuts down + */ +static void +shutdown_task (void *cls) +{ + (void) cls; + GNUNET_SPEEDUP_stop_ (); +} + + +/** * Initial task called by the scheduler for each * program. Runs the program-specific main task. */ @@ -78,6 +89,7 @@ program_main (void *cls) struct CommandContext *cc = cls; GNUNET_SPEEDUP_start_(cc->cfg); + GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); GNUNET_RESOLVER_connect (cc->cfg); cc->task (cc->task_cls, cc->args, cc->cfgfile, cc->cfg); } @@ -306,7 +318,6 @@ GNUNET_PROGRAM_run2 (int argc, char *const *argv, const char *binaryName, } ret = GNUNET_OK; cleanup: - GNUNET_SPEEDUP_stop_ (); GNUNET_CONFIGURATION_destroy (cfg); GNUNET_free_non_null (cc.cfgfile); GNUNET_free (cfg_fn); diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2009-2016 GNUnet e.V. + Copyright (C) 2009-2018 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -214,7 +214,8 @@ check_config () for (unsigned int i = 0; NULL != loopback[i]; i++) - if (0 == strcasecmp (loopback[i], hostname)) + if (0 == strcasecmp (loopback[i], + hostname)) { GNUNET_free (hostname); return GNUNET_OK; @@ -285,6 +286,7 @@ GNUNET_RESOLVER_disconnect () static void shutdown_task (void *cls) { + (void) cls; s_task = NULL; GNUNET_RESOLVER_disconnect (); backoff = GNUNET_TIME_UNIT_MILLISECONDS; @@ -387,10 +389,12 @@ static void mq_error_handler (void *cls, enum GNUNET_MQ_Error error) { + (void) cls; GNUNET_MQ_destroy (mq); mq = NULL; LOG (GNUNET_ERROR_TYPE_DEBUG, - "MQ error, reconnecting\n"); + "MQ error %d, reconnecting\n", + error); reconnect (); } @@ -414,10 +418,11 @@ process_requests () { /* nothing to do, release socket really soon if there is nothing * else happening... */ - s_task = - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS, - &shutdown_task, - NULL); + if (NULL == s_task) + s_task = + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS, + &shutdown_task, + NULL); return; } if (GNUNET_NO != rh->was_transmitted) @@ -448,6 +453,9 @@ static int check_response (void *cls, const struct GNUNET_MessageHeader *msg) { + (void) cls; + (void) msg; + /* implemented in #handle_response() for now */ return GNUNET_OK; } @@ -469,6 +477,7 @@ handle_response (void *cls, uint16_t size; char *nret; + (void) cls; GNUNET_assert (NULL != rh); size = ntohs (msg->size); if (size == sizeof (struct GNUNET_MessageHeader)) @@ -742,6 +751,7 @@ reconnect_task (void *cls) GNUNET_MQ_handler_end () }; + (void) cls; r_task = NULL; if (NULL == req_head) return; /* no work pending */ diff --git a/src/util/scheduler.c b/src/util/scheduler.c @@ -89,12 +89,6 @@ struct GNUNET_SCHEDULER_Handle * @deprecated */ struct GNUNET_NETWORK_FDSet *ws; - - /** - * Driver we used for the event loop. - */ - const struct GNUNET_SCHEDULER_Driver *driver; - }; @@ -124,36 +118,40 @@ struct GNUNET_SCHEDULER_Task void *callback_cls; /** - * Handle to the scheduler's state. + * Information about which FDs are ready for this task (and why). */ - const struct GNUNET_SCHEDULER_Handle *sh; + struct GNUNET_SCHEDULER_FdInfo *fds; /** - * Set of file descriptors this task is waiting - * for for reading. Once ready, this is updated - * to reflect the set of file descriptors ready - * for operation. + * Storage location used for @e fds if we want to avoid + * a separate malloc() call in the common case that this + * task is only about a single FD. */ - struct GNUNET_NETWORK_FDSet *read_set; + struct GNUNET_SCHEDULER_FdInfo fdx; /** - * Set of file descriptors this task is waiting for for writing. - * Once ready, this is updated to reflect the set of file - * descriptors ready for operation. + * Size of the @e fds array. */ - struct GNUNET_NETWORK_FDSet *write_set; + unsigned int fds_len; /** - * Information about which FDs are ready for this task (and why). + * if this task is related to multiple FDs this array contains + * all FdInfo structs that were marked as ready by calling + * #GNUNET_SCHEDULER_task_ready */ - const struct GNUNET_SCHEDULER_FdInfo *fds; + struct GNUNET_SCHEDULER_FdInfo *ready_fds; /** - * Storage location used for @e fds if we want to avoid - * a separate malloc() call in the common case that this - * task is only about a single FD. + * Size of the @e ready_fds array */ - struct GNUNET_SCHEDULER_FdInfo fdx; + unsigned int ready_fds_len; + + /** + * Do we own the network and file handles referenced by the FdInfo + * structs in the fds array. This will only be GNUNET_YES if the + * task was created by the #GNUNET_SCHEDULER_add_select function. + */ + int own_handles; /** * Absolute timeout value for the task, or @@ -169,11 +167,6 @@ struct GNUNET_SCHEDULER_Task #endif /** - * Size of the @e fds array. - */ - unsigned int fds_len; - - /** * Why is the task ready? Set after task is added to ready queue. * Initially set to zero. All reasons that have already been * satisfied (i.e. read or write ready) will be set over time. @@ -224,11 +217,72 @@ struct GNUNET_SCHEDULER_Task int num_backtrace_strings; #endif +}; + + +/** + * A struct representing an event the select driver is waiting for + */ +struct Scheduled +{ + struct Scheduled *prev; + + struct Scheduled *next; + + /** + * the task, the event is related to + */ + struct GNUNET_SCHEDULER_Task *task; + + /** + * information about the network socket / file descriptor where + * the event is expected to occur + */ + struct GNUNET_SCHEDULER_FdInfo *fdi; + + /** + * the event types (multiple event types can be ORed) the select + * driver is expected to wait for + */ + enum GNUNET_SCHEDULER_EventType et; +}; + + +/** + * Driver context used by GNUNET_SCHEDULER_run + */ +struct DriverContext +{ + /** + * the head of a DLL containing information about the events the + * select driver is waiting for + */ + struct Scheduled *scheduled_head; + + /** + * the tail of a DLL containing information about the events the + * select driver is waiting for + */ + struct Scheduled *scheduled_tail; + /** + * the time until the select driver will wake up again (after + * calling select) + */ + struct GNUNET_TIME_Relative timeout; }; /** + * The driver used for the event loop. Will be handed over to + * the scheduler in #GNUNET_SCHEDULER_run_from_driver(), peristed + * there in this variable for later use in functions like + * #GNUNET_SCHEDULER_add_select(), #add_without_sets() and + * #GNUNET_SCHEDULER_cancel(). + */ +static const struct GNUNET_SCHEDULER_Driver *scheduler_driver; + +/** * Head of list of tasks waiting for an event. */ static struct GNUNET_SCHEDULER_Task *pending_head; @@ -330,6 +384,11 @@ static struct GNUNET_SCHEDULER_TaskContext tc; */ static void *scheduler_select_cls; +/** + * Scheduler handle used for the driver functions + */ +static struct GNUNET_SCHEDULER_Handle sh; + /** * Sets the select function to use in the scheduler (scheduler_select). @@ -364,115 +423,44 @@ check_priority (enum GNUNET_SCHEDULER_Priority p) /** - * Update all sets and timeout for select. - * - * @param rs read-set, set to all FDs we would like to read (updated) - * @param ws write-set, set to all FDs we would like to write (updated) - * @param timeout next timeout (updated) + * chooses the nearest timeout from all pending tasks, to be used + * to tell the driver the next wakeup time (using its set_wakeup + * callback) */ -static void -update_sets (struct GNUNET_NETWORK_FDSet *rs, - struct GNUNET_NETWORK_FDSet *ws, - struct GNUNET_TIME_Relative *timeout) +struct GNUNET_TIME_Absolute +get_timeout () { struct GNUNET_SCHEDULER_Task *pos; struct GNUNET_TIME_Absolute now; - struct GNUNET_TIME_Relative to; + struct GNUNET_TIME_Absolute timeout; - now = GNUNET_TIME_absolute_get (); pos = pending_timeout_head; + now = GNUNET_TIME_absolute_get (); + timeout = GNUNET_TIME_UNIT_FOREVER_ABS; if (NULL != pos) { - to = GNUNET_TIME_absolute_get_difference (now, pos->timeout); - if (timeout->rel_value_us > to.rel_value_us) - *timeout = to; if (0 != pos->reason) - *timeout = GNUNET_TIME_UNIT_ZERO; + { + timeout = now; + } + else + { + timeout = pos->timeout; + } } for (pos = pending_head; NULL != pos; pos = pos->next) { - if (pos->timeout.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) + if (0 != pos->reason) { - to = GNUNET_TIME_absolute_get_difference (now, pos->timeout); - if (timeout->rel_value_us > to.rel_value_us) - *timeout = to; + timeout = now; + } + else if ((pos->timeout.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) && + (timeout.abs_value_us > pos->timeout.abs_value_us)) + { + timeout = pos->timeout; } - if (-1 != pos->read_fd) - GNUNET_NETWORK_fdset_set_native (rs, pos->read_fd); - if (-1 != pos->write_fd) - GNUNET_NETWORK_fdset_set_native (ws, pos->write_fd); - if (NULL != pos->read_set) - GNUNET_NETWORK_fdset_add (rs, pos->read_set); - if (NULL != pos->write_set) - GNUNET_NETWORK_fdset_add (ws, pos->write_set); - if (0 != pos->reason) - *timeout = GNUNET_TIME_UNIT_ZERO; - } -} - - -/** - * Check if the ready set overlaps with the set we want to have ready. - * If so, update the want set (set all FDs that are ready). If not, - * return #GNUNET_NO. - * - * @param ready set that is ready - * @param want set that we want to be ready - * @return #GNUNET_YES if there was some overlap - */ -static int -set_overlaps (const struct GNUNET_NETWORK_FDSet *ready, - struct GNUNET_NETWORK_FDSet *want) -{ - if ((NULL == want) || (NULL == ready)) - return GNUNET_NO; - if (GNUNET_NETWORK_fdset_overlap (ready, want)) - { - /* copy all over (yes, there maybe unrelated bits, - * but this should not hurt well-written clients) */ - GNUNET_NETWORK_fdset_copy (want, ready); - return GNUNET_YES; } - return GNUNET_NO; -} - - -/** - * Check if the given task is eligible to run now. - * Also set the reason why it is eligible. - * - * @param task task to check if it is ready - * @param now the current time - * @param rs set of FDs ready for reading - * @param ws set of FDs ready for writing - * @return #GNUNET_YES if we can run it, #GNUNET_NO if not. - */ -static int -is_ready (struct GNUNET_SCHEDULER_Task *task, - struct GNUNET_TIME_Absolute now, - const struct GNUNET_NETWORK_FDSet *rs, - const struct GNUNET_NETWORK_FDSet *ws) -{ - enum GNUNET_SCHEDULER_Reason reason; - - reason = task->reason; - if (now.abs_value_us >= task->timeout.abs_value_us) - reason |= GNUNET_SCHEDULER_REASON_TIMEOUT; - if ((0 == (reason & GNUNET_SCHEDULER_REASON_READ_READY)) && - (((task->read_fd != -1) && - (GNUNET_YES == GNUNET_NETWORK_fdset_test_native (rs, task->read_fd))) || - (set_overlaps (rs, task->read_set)))) - reason |= GNUNET_SCHEDULER_REASON_READ_READY; - if ((0 == (reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) && - (((task->write_fd != -1) && - (GNUNET_YES == GNUNET_NETWORK_fdset_test_native (ws, task->write_fd))) - || (set_overlaps (ws, task->write_set)))) - reason |= GNUNET_SCHEDULER_REASON_WRITE_READY; - if (0 == reason) - return GNUNET_NO; /* not ready */ - reason |= GNUNET_SCHEDULER_REASON_PREREQ_DONE; - task->reason = reason; - return GNUNET_YES; + return timeout; } @@ -495,51 +483,6 @@ queue_ready_task (struct GNUNET_SCHEDULER_Task *task) /** - * Check which tasks are ready and move them - * to the respective ready queue. - * - * @param rs FDs ready for reading - * @param ws FDs ready for writing - */ -static void -check_ready (const struct GNUNET_NETWORK_FDSet *rs, - const struct GNUNET_NETWORK_FDSet *ws) -{ - struct GNUNET_SCHEDULER_Task *pos; - struct GNUNET_SCHEDULER_Task *next; - struct GNUNET_TIME_Absolute now; - - now = GNUNET_TIME_absolute_get (); - while (NULL != (pos = pending_timeout_head)) - { - if (now.abs_value_us >= pos->timeout.abs_value_us) - pos->reason |= GNUNET_SCHEDULER_REASON_TIMEOUT; - if (0 == pos->reason) - break; - GNUNET_CONTAINER_DLL_remove (pending_timeout_head, - pending_timeout_tail, - pos); - if (pending_timeout_last == pos) - pending_timeout_last = NULL; - queue_ready_task (pos); - } - pos = pending_head; - while (NULL != pos) - { - next = pos->next; - if (GNUNET_YES == is_ready (pos, now, rs, ws)) - { - GNUNET_CONTAINER_DLL_remove (pending_head, - pending_tail, - pos); - queue_ready_task (pos); - } - pos = next; - } -} - - -/** * Request the shutdown of a scheduler. Marks all tasks * awaiting shutdown as ready. Note that tasks * scheduled with #GNUNET_SCHEDULER_add_shutdown() AFTER this call @@ -562,25 +505,6 @@ GNUNET_SCHEDULER_shutdown () /** - * Destroy a task (release associated resources) - * - * @param t task to destroy - */ -static void -destroy_task (struct GNUNET_SCHEDULER_Task *t) -{ - if (NULL != t->read_set) - GNUNET_NETWORK_fdset_destroy (t->read_set); - if (NULL != t->write_set) - GNUNET_NETWORK_fdset_destroy (t->write_set); -#if EXECINFO - GNUNET_free (t->backtrace_strings); -#endif - GNUNET_free (t); -} - - -/** * Output stack trace of task @a t. * * @param t task to dump stack trace of @@ -589,91 +513,62 @@ static void dump_backtrace (struct GNUNET_SCHEDULER_Task *t) { #if EXECINFO - unsigned int i; - - for (i = 0; i < t->num_backtrace_strings; i++) - LOG (GNUNET_ERROR_TYPE_DEBUG, + for (unsigned int i = 0; i < t->num_backtrace_strings; i++) + LOG (GNUNET_ERROR_TYPE_WARNING, "Task %p trace %u: %s\n", t, i, t->backtrace_strings[i]); +#else + (void) t; #endif } /** - * Run at least one task in the highest-priority queue that is not - * empty. Keep running tasks until we are either no longer running - * "URGENT" tasks or until we have at least one "pending" task (which - * may become ready, hence we should select on it). Naturally, if - * there are no more ready tasks, we also return. + * Destroy a task (release associated resources) * - * @param rs FDs ready for reading - * @param ws FDs ready for writing + * @param t task to destroy */ static void -run_ready (struct GNUNET_NETWORK_FDSet *rs, - struct GNUNET_NETWORK_FDSet *ws) +destroy_task (struct GNUNET_SCHEDULER_Task *t) { - enum GNUNET_SCHEDULER_Priority p; - struct GNUNET_SCHEDULER_Task *pos; + unsigned int i; - max_priority_added = GNUNET_SCHEDULER_PRIORITY_KEEP; - do + LOG (GNUNET_ERROR_TYPE_DEBUG, + "destroying task %p\n", + t); + + if (GNUNET_YES == t->own_handles) { - if (0 == ready_count) - return; - GNUNET_assert (NULL == ready_head[GNUNET_SCHEDULER_PRIORITY_KEEP]); - /* yes, p>0 is correct, 0 is "KEEP" which should - * always be an empty queue (see assertion)! */ - for (p = GNUNET_SCHEDULER_PRIORITY_COUNT - 1; p > 0; p--) + for (i = 0; i != t->fds_len; ++i) { - pos = ready_head[p]; - if (NULL != pos) - break; - } - GNUNET_assert (NULL != pos); /* ready_count wrong? */ - GNUNET_CONTAINER_DLL_remove (ready_head[p], - ready_tail[p], - pos); - ready_count--; - current_priority = pos->priority; - current_lifeness = pos->lifeness; - active_task = pos; -#if PROFILE_DELAYS - if (GNUNET_TIME_absolute_get_duration (pos->start_time).rel_value_us > - DELAY_THRESHOLD.rel_value_us) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Task %p took %s to be scheduled\n", - pos, - GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (pos->start_time), - GNUNET_YES)); + const struct GNUNET_NETWORK_Handle *fd = t->fds[i].fd; + const struct GNUNET_DISK_FileHandle *fh = t->fds[i].fh; + if (fd) + { + GNUNET_NETWORK_socket_free_memory_only_ ((struct GNUNET_NETWORK_Handle *) fd); + } + if (fh) + { + // FIXME: on WIN32 this is not enough! A function + // GNUNET_DISK_file_free_memory_only would be nice + GNUNET_free ((void *) fh); + } } -#endif - tc.reason = pos->reason; - tc.read_ready = (NULL == pos->read_set) ? rs : pos->read_set; - if ((-1 != pos->read_fd) && - (0 != (pos->reason & GNUNET_SCHEDULER_REASON_READ_READY))) - GNUNET_NETWORK_fdset_set_native (rs, pos->read_fd); - tc.write_ready = (NULL == pos->write_set) ? ws : pos->write_set; - if ((-1 != pos->write_fd) && - (0 != (pos->reason & GNUNET_SCHEDULER_REASON_WRITE_READY))) - GNUNET_NETWORK_fdset_set_native (ws, pos->write_fd); - if ((0 != (tc.reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) && - (-1 != pos->write_fd) && - (!GNUNET_NETWORK_fdset_test_native (ws, pos->write_fd))) - GNUNET_assert (0); // added to ready in previous select loop! - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Running task: %p\n", - pos); - pos->callback (pos->callback_cls); - dump_backtrace (pos); - active_task = NULL; - destroy_task (pos); - tasks_run++; } - while ((NULL == pending_head) || (p >= max_priority_added)); + if (t->fds_len > 1) + { + GNUNET_array_grow (t->fds, t->fds_len, 0); + } + if (t->ready_fds_len > 0) + { + GNUNET_array_grow (t->ready_fds, t->ready_fds_len, 0); + } +#if EXECINFO + GNUNET_free (t->backtrace_strings); +#endif + GNUNET_free (t); } @@ -700,22 +595,22 @@ sighandler_pipe () #endif -/** - * Wait for a short time. - * Sleeps for @a ms ms (as that should be long enough for virtually all - * modern systems to context switch and allow another process to do - * some 'real' work). - * - * @param ms how many ms to wait - */ -static void -short_wait (unsigned int ms) -{ - struct GNUNET_TIME_Relative timeout; - - timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, ms); - (void) GNUNET_NETWORK_socket_select (NULL, NULL, NULL, timeout); -} +///** +// * Wait for a short time. +// * Sleeps for @a ms ms (as that should be long enough for virtually all +// * modern systems to context switch and allow another process to do +// * some 'real' work). +// * +// * @param ms how many ms to wait +// */ +//static void +//short_wait (unsigned int ms) +//{ +// struct GNUNET_TIME_Relative timeout; +// +// timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, ms); +// (void) GNUNET_NETWORK_socket_select (NULL, NULL, NULL, timeout); +//} /** @@ -737,35 +632,31 @@ sighandler_shutdown () } -/** - * Check if the system is still alive. Trigger shutdown if we - * have tasks, but none of them give us lifeness. - * - * @return #GNUNET_OK to continue the main loop, - * #GNUNET_NO to exit - */ -static int -check_lifeness () +void +shutdown_if_no_lifeness () { struct GNUNET_SCHEDULER_Task *t; if (ready_count > 0) - return GNUNET_OK; + return; for (t = pending_head; NULL != t; t = t->next) - if (t->lifeness == GNUNET_YES) - return GNUNET_OK; + if (GNUNET_YES == t->lifeness) + return; for (t = shutdown_head; NULL != t; t = t->next) - if (t->lifeness == GNUNET_YES) - return GNUNET_OK; + if (GNUNET_YES == t->lifeness) + return; for (t = pending_timeout_head; NULL != t; t = t->next) - if (t->lifeness == GNUNET_YES) - return GNUNET_OK; - if (NULL != shutdown_head) + if (GNUNET_YES == t->lifeness) + return; + /* No lifeness! Cancel all pending tasks the driver knows about and shutdown */ + t = pending_head; + while (NULL != t) { - GNUNET_SCHEDULER_shutdown (); - return GNUNET_OK; + struct GNUNET_SCHEDULER_Task *next = t->next; + GNUNET_SCHEDULER_cancel (t); + t = next; } - return GNUNET_NO; + GNUNET_SCHEDULER_shutdown (); } @@ -787,204 +678,17 @@ void GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_TaskCallback task, void *task_cls) { - GNUNET_SCHEDULER_run_with_optional_signals(GNUNET_YES, task, task_cls); -} - -void -GNUNET_SCHEDULER_run_with_optional_signals (int install_signals, - GNUNET_SCHEDULER_TaskCallback task, - void *task_cls) -{ - struct GNUNET_NETWORK_FDSet *rs; - struct GNUNET_NETWORK_FDSet *ws; - struct GNUNET_TIME_Relative timeout; - int ret; - struct GNUNET_SIGNAL_Context *shc_int; - struct GNUNET_SIGNAL_Context *shc_term; -#if (SIGTERM != GNUNET_TERM_SIG) - struct GNUNET_SIGNAL_Context *shc_gterm; -#endif - -#ifndef MINGW - struct GNUNET_SIGNAL_Context *shc_quit; - struct GNUNET_SIGNAL_Context *shc_hup; - struct GNUNET_SIGNAL_Context *shc_pipe; -#endif - unsigned long long last_tr; - unsigned int busy_wait_warning; - const struct GNUNET_DISK_FileHandle *pr; - char c; - - GNUNET_assert (NULL == active_task); - rs = GNUNET_NETWORK_fdset_create (); - ws = GNUNET_NETWORK_fdset_create (); - GNUNET_assert (NULL == shutdown_pipe_handle); - shutdown_pipe_handle = GNUNET_DISK_pipe (GNUNET_NO, - GNUNET_NO, - GNUNET_NO, - GNUNET_NO); - GNUNET_assert (NULL != shutdown_pipe_handle); - pr = GNUNET_DISK_pipe_handle (shutdown_pipe_handle, - GNUNET_DISK_PIPE_END_READ); - GNUNET_assert (NULL != pr); - my_pid = getpid (); - - if (GNUNET_YES == install_signals) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Registering signal handlers\n"); - shc_int = GNUNET_SIGNAL_handler_install (SIGINT, - &sighandler_shutdown); - shc_term = GNUNET_SIGNAL_handler_install (SIGTERM, - &sighandler_shutdown); -#if (SIGTERM != GNUNET_TERM_SIG) - shc_gterm = GNUNET_SIGNAL_handler_install (GNUNET_TERM_SIG, - &sighandler_shutdown); -#endif -#ifndef MINGW - shc_pipe = GNUNET_SIGNAL_handler_install (SIGPIPE, - &sighandler_pipe); - shc_quit = GNUNET_SIGNAL_handler_install (SIGQUIT, - &sighandler_shutdown); - shc_hup = GNUNET_SIGNAL_handler_install (SIGHUP, - &sighandler_shutdown); -#endif - } - - current_priority = GNUNET_SCHEDULER_PRIORITY_DEFAULT; - current_lifeness = GNUNET_YES; - GNUNET_SCHEDULER_add_with_reason_and_priority (task, - task_cls, - GNUNET_SCHEDULER_REASON_STARTUP, - GNUNET_SCHEDULER_PRIORITY_DEFAULT); - active_task = (void *) (long) -1; /* force passing of sanity check */ - GNUNET_SCHEDULER_add_now_with_lifeness (GNUNET_NO, - &GNUNET_OS_install_parent_control_handler, - NULL); - active_task = NULL; - last_tr = 0; - busy_wait_warning = 0; - while (GNUNET_OK == check_lifeness ()) - { - GNUNET_NETWORK_fdset_zero (rs); - GNUNET_NETWORK_fdset_zero (ws); - timeout = GNUNET_TIME_UNIT_FOREVER_REL; - update_sets (rs, ws, &timeout); - GNUNET_NETWORK_fdset_handle_set (rs, pr); - if (ready_count > 0) - { - /* no blocking, more work already ready! */ - timeout = GNUNET_TIME_UNIT_ZERO; - } - if (NULL == scheduler_select) - ret = GNUNET_NETWORK_socket_select (rs, - ws, - NULL, - timeout); - else - ret = scheduler_select (scheduler_select_cls, - rs, - ws, - NULL, - timeout); - if (ret == GNUNET_SYSERR) - { - if (errno == EINTR) - continue; - - LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "select"); -#ifndef MINGW -#if USE_LSOF - char lsof[512]; - - snprintf (lsof, sizeof (lsof), "lsof -p %d", getpid ()); - (void) close (1); - (void) dup2 (2, 1); - if (0 != system (lsof)) - LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, - "system"); -#endif -#endif -#if DEBUG_FDS - struct GNUNET_SCHEDULER_Task *t; - - for (t = pending_head; NULL != t; t = t->next) - { - if (-1 != t->read_fd) - { - int flags = fcntl (t->read_fd, F_GETFD); - if ((flags == -1) && (errno == EBADF)) - { - LOG (GNUNET_ERROR_TYPE_ERROR, - "Got invalid file descriptor %d!\n", - t->read_fd); - dump_backtrace (t); - } - } - if (-1 != t->write_fd) - { - int flags = fcntl (t->write_fd, F_GETFD); - if ((flags == -1) && (errno == EBADF)) - { - LOG (GNUNET_ERROR_TYPE_ERROR, - "Got invalid file descriptor %d!\n", - t->write_fd); - dump_backtrace (t); - } - } - } -#endif - GNUNET_assert (0); - break; - } - - if ( (0 == ret) && - (0 == timeout.rel_value_us) && - (busy_wait_warning > 16) ) - { - LOG (GNUNET_ERROR_TYPE_WARNING, - "Looks like we're busy waiting...\n"); - short_wait (100); /* mitigate */ - } - check_ready (rs, ws); - run_ready (rs, ws); - if (GNUNET_NETWORK_fdset_handle_isset (rs, pr)) - { - /* consume the signal */ - GNUNET_DISK_file_read (pr, &c, sizeof (c)); - /* mark all active tasks as ready due to shutdown */ - GNUNET_SCHEDULER_shutdown (); - } - if (last_tr == tasks_run) - { - short_wait (1); - busy_wait_warning++; - } - else - { - last_tr = tasks_run; - busy_wait_warning = 0; - } - } - - if (GNUNET_YES == install_signals) - { - GNUNET_SIGNAL_handler_uninstall (shc_int); - GNUNET_SIGNAL_handler_uninstall (shc_term); -#if (SIGTERM != GNUNET_TERM_SIG) - GNUNET_SIGNAL_handler_uninstall (shc_gterm); -#endif -#ifndef MINGW - GNUNET_SIGNAL_handler_uninstall (shc_pipe); - GNUNET_SIGNAL_handler_uninstall (shc_quit); - GNUNET_SIGNAL_handler_uninstall (shc_hup); -#endif - } - - GNUNET_DISK_pipe_close (shutdown_pipe_handle); - shutdown_pipe_handle = NULL; - GNUNET_NETWORK_fdset_destroy (rs); - GNUNET_NETWORK_fdset_destroy (ws); + struct GNUNET_SCHEDULER_Driver *driver; + struct DriverContext context = {.scheduled_head = NULL, + .scheduled_tail = NULL, + .timeout = GNUNET_TIME_UNIT_FOREVER_REL}; + + driver = GNUNET_SCHEDULER_driver_select (); + driver->cls = &context; + + GNUNET_SCHEDULER_run_with_driver (driver, task, task_cls); + + GNUNET_free (driver); } @@ -1014,24 +718,183 @@ GNUNET_SCHEDULER_get_task_context () unsigned int GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p) { - struct GNUNET_SCHEDULER_Task *pos; - unsigned int ret; + struct GNUNET_SCHEDULER_Task *pos; + unsigned int ret; + + GNUNET_assert (NULL != active_task); + if (p == GNUNET_SCHEDULER_PRIORITY_COUNT) + return ready_count; + if (p == GNUNET_SCHEDULER_PRIORITY_KEEP) + p = current_priority; + ret = 0; + for (pos = ready_head[check_priority (p)]; NULL != pos; pos = pos->next) + ret++; + return ret; +} + + +void +init_fd_info (struct GNUNET_SCHEDULER_Task *t, + const struct GNUNET_NETWORK_Handle *const *read_nh, + unsigned int read_nh_len, + const struct GNUNET_NETWORK_Handle *const *write_nh, + unsigned int write_nh_len, + const struct GNUNET_DISK_FileHandle *const *read_fh, + unsigned int read_fh_len, + const struct GNUNET_DISK_FileHandle *const *write_fh, + unsigned int write_fh_len) +{ + // FIXME: if we have exactly two network handles / exactly two file handles + // and they are equal, we can make one FdInfo with both + // GNUNET_SCHEDULER_ET_IN and GNUNET_SCHEDULER_ET_OUT set. + struct GNUNET_SCHEDULER_FdInfo *fdi; + + t->fds_len = read_nh_len + write_nh_len + read_fh_len + write_fh_len; + if (1 == t->fds_len) + { + fdi = &t->fdx; + t->fds = fdi; + if (1 == read_nh_len) + { + GNUNET_assert (NULL != read_nh); + GNUNET_assert (NULL != *read_nh); + fdi->fd = *read_nh; + fdi->et = GNUNET_SCHEDULER_ET_IN; + fdi->sock = GNUNET_NETWORK_get_fd (*read_nh); + t->read_fd = fdi->sock; + t->write_fd = -1; + } + else if (1 == write_nh_len) + { + GNUNET_assert (NULL != write_nh); + GNUNET_assert (NULL != *write_nh); + fdi->fd = *write_nh; + fdi->et = GNUNET_SCHEDULER_ET_OUT; + fdi->sock = GNUNET_NETWORK_get_fd (*write_nh); + t->read_fd = -1; + t->write_fd = fdi->sock; + } + else if (1 == read_fh_len) + { + GNUNET_assert (NULL != read_fh); + GNUNET_assert (NULL != *read_fh); + fdi->fh = *read_fh; + fdi->et = GNUNET_SCHEDULER_ET_IN; + fdi->sock = (*read_fh)->fd; // FIXME: does not work under WIN32 + t->read_fd = fdi->sock; + t->write_fd = -1; + } + else + { + GNUNET_assert (NULL != write_fh); + GNUNET_assert (NULL != *write_fh); + fdi->fh = *write_fh; + fdi->et = GNUNET_SCHEDULER_ET_OUT; + fdi->sock = (*write_fh)->fd; // FIXME: does not work under WIN32 + t->read_fd = -1; + t->write_fd = fdi->sock; + } + } + else + { + fdi = GNUNET_new_array (t->fds_len, struct GNUNET_SCHEDULER_FdInfo); + t->fds = fdi; + t->read_fd = -1; + t->write_fd = -1; + unsigned int i; + for (i = 0; i != read_nh_len; ++i) + { + fdi->fd = read_nh[i]; + GNUNET_assert (NULL != fdi->fd); + fdi->et = GNUNET_SCHEDULER_ET_IN; + fdi->sock = GNUNET_NETWORK_get_fd (read_nh[i]); + ++fdi; + } + for (i = 0; i != write_nh_len; ++i) + { + fdi->fd = write_nh[i]; + GNUNET_assert (NULL != fdi->fd); + fdi->et = GNUNET_SCHEDULER_ET_OUT; + fdi->sock = GNUNET_NETWORK_get_fd (write_nh[i]); + ++fdi; + } + for (i = 0; i != read_fh_len; ++i) + { + fdi->fh = read_fh[i]; + GNUNET_assert (NULL != fdi->fh); + fdi->et = GNUNET_SCHEDULER_ET_IN; + fdi->sock = (read_fh[i])->fd; // FIXME: does not work under WIN32 + ++fdi; + } + for (i = 0; i != write_fh_len; ++i) + { + fdi->fh = write_fh[i]; + GNUNET_assert (NULL != fdi->fh); + fdi->et = GNUNET_SCHEDULER_ET_OUT; + fdi->sock = (write_fh[i])->fd; // FIXME: does not work under WIN32 + ++fdi; + } + } +} + + +/** + * calls the given function @a func on each FdInfo related to @a t. + * Optionally updates the event type field in each FdInfo after calling + * @a func. + * + * @param t the task + * @param driver_func the function to call with each FdInfo contained in + * in @a t + * @param if_not_ready only call @a driver_func on FdInfos that are not + * ready + * @param et the event type to be set in each FdInfo after calling + * @a driver_func on it, or -1 if no updating not desired. + */ +static void +driver_add_multiple (struct GNUNET_SCHEDULER_Task *t) +{ + struct GNUNET_SCHEDULER_FdInfo *fdi; + int success = GNUNET_YES; - GNUNET_assert (NULL != active_task); - if (p == GNUNET_SCHEDULER_PRIORITY_COUNT) - return ready_count; - if (p == GNUNET_SCHEDULER_PRIORITY_KEEP) - p = current_priority; - ret = 0; - for (pos = ready_head[check_priority (p)]; NULL != pos; pos = pos->next) - ret++; - return ret; + for (unsigned int i = 0; i != t->fds_len; ++i) + { + fdi = &t->fds[i]; + success = scheduler_driver->add (scheduler_driver->cls, + t, + fdi) && success; + fdi->et = GNUNET_SCHEDULER_ET_NONE; + } + if (GNUNET_YES != success) + { + LOG (GNUNET_ERROR_TYPE_ERROR, + "driver could not add task\n"); + } +} + + +static void +shutdown_cb (void *cls) +{ + char c; + const struct GNUNET_DISK_FileHandle *pr; + + (void) cls; + pr = GNUNET_DISK_pipe_handle (shutdown_pipe_handle, + GNUNET_DISK_PIPE_END_READ); + GNUNET_assert (! GNUNET_DISK_handle_invalid (pr)); + /* consume the signal */ + GNUNET_DISK_file_read (pr, &c, sizeof (c)); + /* mark all active tasks as ready due to shutdown */ + GNUNET_SCHEDULER_shutdown (); } /** * Cancel the task with the specified identifier. - * The task must not yet have run. + * The task must not yet have run. Only allowed to be called as long as the + * scheduler is running (#GNUNET_SCHEDULER_run or + * #GNUNET_SCHEDULER_run_with_driver has been called and has not returned yet). * * @param task id of the task to cancel * @return original closure of the task @@ -1040,34 +903,50 @@ void * GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Task *task) { enum GNUNET_SCHEDULER_Priority p; + int is_fd_task; void *ret; + LOG (GNUNET_ERROR_TYPE_DEBUG, + "canceling task %p\n", + task); + + /* scheduler must be running */ + GNUNET_assert (NULL != scheduler_driver); GNUNET_assert ( (NULL != active_task) || - (GNUNET_NO == task->lifeness) ); - if (! task->in_ready_list) + (GNUNET_NO == task->lifeness) ); + is_fd_task = (NULL != task->fds); + if (is_fd_task) { - if ( (-1 == task->read_fd) && - (-1 == task->write_fd) && - (NULL == task->read_set) && - (NULL == task->write_set) ) + int del_result = scheduler_driver->del (scheduler_driver->cls, task); + if (GNUNET_OK != del_result) { - if (GNUNET_YES == task->on_shutdown) - GNUNET_CONTAINER_DLL_remove (shutdown_head, - shutdown_tail, - task); - else - GNUNET_CONTAINER_DLL_remove (pending_timeout_head, - pending_timeout_tail, - task); - if (task == pending_timeout_last) - pending_timeout_last = NULL; + LOG (GNUNET_ERROR_TYPE_ERROR, + "driver could not delete task\n"); + GNUNET_assert (0); } - else + } + if (! task->in_ready_list) + { + if (is_fd_task) { GNUNET_CONTAINER_DLL_remove (pending_head, pending_tail, task); } + else if (GNUNET_YES == task->on_shutdown) + { + GNUNET_CONTAINER_DLL_remove (shutdown_head, + shutdown_tail, + task); + } + else + { + GNUNET_CONTAINER_DLL_remove (pending_timeout_head, + pending_timeout_tail, + task); + if (pending_timeout_last == task) + pending_timeout_last = NULL; + } } else { @@ -1078,9 +957,6 @@ GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Task *task) ready_count--; } ret = task->callback_cls; - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Canceling task %p\n", - task); destroy_task (task); return ret; } @@ -1101,8 +977,10 @@ init_backtrace (struct GNUNET_SCHEDULER_Task *t) = backtrace (backtrace_array, MAX_TRACE_DEPTH); t->backtrace_strings = backtrace_symbols (backtrace_array, - t->num_backtrace_strings); + t->num_backtrace_strings); dump_backtrace (t); +#else + (void) t; #endif } @@ -1218,7 +1096,7 @@ GNUNET_SCHEDULER_add_at_with_priority (struct GNUNET_TIME_Absolute at, pending_timeout_last = t; LOG (GNUNET_ERROR_TYPE_DEBUG, - "Adding task: %p\n", + "Adding task %p\n", t); init_backtrace (t); return t; @@ -1238,8 +1116,8 @@ GNUNET_SCHEDULER_add_at_with_priority (struct GNUNET_TIME_Absolute at, */ struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed_with_priority (struct GNUNET_TIME_Relative delay, - enum GNUNET_SCHEDULER_Priority priority, - GNUNET_SCHEDULER_TaskCallback task, + enum GNUNET_SCHEDULER_Priority priority, + GNUNET_SCHEDULER_TaskCallback task, void *task_cls) { return GNUNET_SCHEDULER_add_at_with_priority (GNUNET_TIME_relative_to_absolute (delay), @@ -1307,12 +1185,12 @@ GNUNET_SCHEDULER_add_at (struct GNUNET_TIME_Absolute at, struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, - void *task_cls) + void *task_cls) { return GNUNET_SCHEDULER_add_delayed_with_priority (delay, - GNUNET_SCHEDULER_PRIORITY_DEFAULT, - task, - task_cls); + GNUNET_SCHEDULER_PRIORITY_DEFAULT, + task, + task_cls); } @@ -1333,11 +1211,11 @@ GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, */ struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_TaskCallback task, - void *task_cls) + void *task_cls) { return GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_ZERO, - task, - task_cls); + task, + task_cls); } @@ -1353,7 +1231,7 @@ GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_TaskCallback task, */ struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown (GNUNET_SCHEDULER_TaskCallback task, - void *task_cls) + void *task_cls) { struct GNUNET_SCHEDULER_Task *t; @@ -1370,12 +1248,12 @@ GNUNET_SCHEDULER_add_shutdown (GNUNET_SCHEDULER_TaskCallback task, t->timeout = GNUNET_TIME_UNIT_FOREVER_ABS; t->priority = GNUNET_SCHEDULER_PRIORITY_SHUTDOWN; t->on_shutdown = GNUNET_YES; - t->lifeness = GNUNET_YES; + t->lifeness = GNUNET_NO; GNUNET_CONTAINER_DLL_insert (shutdown_head, - shutdown_tail, - t); + shutdown_tail, + t); LOG (GNUNET_ERROR_TYPE_DEBUG, - "Adding task: %p\n", + "Adding shutdown task %p\n", t); init_backtrace (t); return t; @@ -1409,6 +1287,33 @@ GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, } +#if DEBUG_FDS +/** + * check a raw file descriptor and abort if it is bad (for debugging purposes) + * + * @param t the task related to the file descriptor + * @param raw_fd the raw file descriptor to check + */ +void +check_fd (struct GNUNET_SCHEDULER_Task *t, int raw_fd) +{ + if (-1 != raw_fd) + { + int flags = fcntl (raw_fd, F_GETFD); + + if ((flags == -1) && (errno == EBADF)) + { + LOG (GNUNET_ERROR_TYPE_ERROR, + "Got invalid file descriptor %d!\n", + raw_fd); + init_backtrace (t); + GNUNET_assert (0); + } + } +} +#endif + + /** * Schedule a new task to be run with a specified delay or when any of * the specified file descriptor sets is ready. The delay can be used @@ -1437,9 +1342,11 @@ GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, #ifndef MINGW static struct GNUNET_SCHEDULER_Task * add_without_sets (struct GNUNET_TIME_Relative delay, - enum GNUNET_SCHEDULER_Priority priority, - int rfd, - int wfd, + enum GNUNET_SCHEDULER_Priority priority, + const struct GNUNET_NETWORK_Handle *read_nh, + const struct GNUNET_NETWORK_Handle *write_nh, + const struct GNUNET_DISK_FileHandle *read_fh, + const struct GNUNET_DISK_FileHandle *write_fh, GNUNET_SCHEDULER_TaskCallback task, void *task_cls) { @@ -1448,39 +1355,23 @@ add_without_sets (struct GNUNET_TIME_Relative delay, GNUNET_assert (NULL != active_task); GNUNET_assert (NULL != task); t = GNUNET_new (struct GNUNET_SCHEDULER_Task); + init_fd_info (t, + &read_nh, + read_nh ? 1 : 0, + &write_nh, + write_nh ? 1 : 0, + &read_fh, + read_fh ? 1 : 0, + &write_fh, + write_fh ? 1 : 0); t->callback = task; t->callback_cls = task_cls; #if DEBUG_FDS - if (-1 != rfd) - { - int flags = fcntl (rfd, F_GETFD); - - if ((flags == -1) && (errno == EBADF)) - { - LOG (GNUNET_ERROR_TYPE_ERROR, - "Got invalid file descriptor %d!\n", - rfd); - init_backtrace (t); - GNUNET_assert (0); - } - } - if (-1 != wfd) - { - int flags = fcntl (wfd, F_GETFD); - - if (flags == -1 && errno == EBADF) - { - LOG (GNUNET_ERROR_TYPE_ERROR, - "Got invalid file descriptor %d!\n", - wfd); - init_backtrace (t); - GNUNET_assert (0); - } - } + check_fd (t, NULL != read_nh ? GNUNET_NETWORK_get_fd (read_nh) : -1); + check_fd (t, NULL != write_nh ? GNUNET_NETWORK_get_fd (write_nh) : -1); + check_fd (t, NULL != read_fh ? read_fh->fd : -1); + check_fd (t, NULL != write_fh ? write_fh->fd : -1); #endif - t->read_fd = rfd; - GNUNET_assert (wfd >= -1); - t->write_fd = wfd; #if PROFILE_DELAYS t->start_time = GNUNET_TIME_absolute_get (); #endif @@ -1490,11 +1381,9 @@ add_without_sets (struct GNUNET_TIME_Relative delay, GNUNET_CONTAINER_DLL_insert (pending_head, pending_tail, t); + driver_add_multiple (t); max_priority_added = GNUNET_MAX (max_priority_added, t->priority); - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Adding task %p\n", - t); init_backtrace (t); return t; } @@ -1507,6 +1396,9 @@ add_without_sets (struct GNUNET_TIME_Relative delay, * used as a timeout on the socket being ready. The task will be * scheduled for execution once either the delay has expired or the * socket operation is ready. It will be run with the DEFAULT priority. + * Only allowed to be called as long as the scheduler is running + * (#GNUNET_SCHEDULER_run or #GNUNET_SCHEDULER_run_with_driver has been + * called and has not returned yet). * * @param delay when should this operation time out? * @param rfd read file-descriptor @@ -1522,8 +1414,8 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, void *task_cls) { return GNUNET_SCHEDULER_add_read_net_with_priority (delay, - GNUNET_SCHEDULER_PRIORITY_DEFAULT, - rfd, task, task_cls); + GNUNET_SCHEDULER_PRIORITY_DEFAULT, + rfd, task, task_cls); } @@ -1534,6 +1426,9 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, * socket being ready. The task will be scheduled for execution once * either the delay has expired or the socket operation is ready. It * will be run with the DEFAULT priority. + * Only allowed to be called as long as the scheduler is running + * (#GNUNET_SCHEDULER_run or #GNUNET_SCHEDULER_run_with_driver has been + * called and has not returned yet). * * @param delay when should this operation time out? * @param priority priority to use for the task @@ -1545,9 +1440,9 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, */ struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_read_net_with_priority (struct GNUNET_TIME_Relative delay, - enum GNUNET_SCHEDULER_Priority priority, - struct GNUNET_NETWORK_Handle *rfd, - GNUNET_SCHEDULER_TaskCallback task, + enum GNUNET_SCHEDULER_Priority priority, + struct GNUNET_NETWORK_Handle *rfd, + GNUNET_SCHEDULER_TaskCallback task, void *task_cls) { return GNUNET_SCHEDULER_add_net_with_priority (delay, priority, @@ -1565,6 +1460,9 @@ GNUNET_SCHEDULER_add_read_net_with_priority (struct GNUNET_TIME_Relative delay, * scheduled for execution once either the delay has expired or the * socket operation is ready. It will be run with the priority of * the calling task. + * Only allowed to be called as long as the scheduler is running + * (#GNUNET_SCHEDULER_run or #GNUNET_SCHEDULER_run_with_driver has been + * called and has not returned yet). * * @param delay when should this operation time out? * @param wfd write file-descriptor @@ -1592,6 +1490,9 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, * used as a timeout on the socket being ready. The task will be * scheduled for execution once either the delay has expired or the * socket operation is ready. + * Only allowed to be called as long as the scheduler is running + * (#GNUNET_SCHEDULER_run or #GNUNET_SCHEDULER_run_with_driver has been + * called and has not returned yet). * * @param delay when should this operation time out? * @param priority priority of the task @@ -1612,6 +1513,9 @@ GNUNET_SCHEDULER_add_net_with_priority (struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls) { + /* scheduler must be running */ + GNUNET_assert (NULL != scheduler_driver); + #if MINGW struct GNUNET_NETWORK_FDSet *s; struct GNUNET_SCHEDULER_Task * ret; @@ -1627,10 +1531,13 @@ GNUNET_SCHEDULER_add_net_with_priority (struct GNUNET_TIME_Relative delay, GNUNET_NETWORK_fdset_destroy (s); return ret; #else + GNUNET_assert (on_read || on_write); GNUNET_assert (GNUNET_NETWORK_get_fd (fd) >= 0); return add_without_sets (delay, priority, - on_read ? GNUNET_NETWORK_get_fd (fd) : -1, - on_write ? GNUNET_NETWORK_get_fd (fd) : -1, + on_read ? fd : NULL, + on_write ? fd : NULL, + NULL, + NULL, task, task_cls); #endif } @@ -1642,6 +1549,9 @@ GNUNET_SCHEDULER_add_net_with_priority (struct GNUNET_TIME_Relative delay, * used as a timeout on the socket being ready. The task will be * scheduled for execution once either the delay has expired or the * socket operation is ready. It will be run with the DEFAULT priority. + * Only allowed to be called as long as the scheduler is running + * (#GNUNET_SCHEDULER_run or #GNUNET_SCHEDULER_run_with_driver has been + * called and has not returned yet). * * @param delay when should this operation time out? * @param rfd read file-descriptor @@ -1668,6 +1578,9 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, * used as a timeout on the socket being ready. The task will be * scheduled for execution once either the delay has expired or the * socket operation is ready. It will be run with the DEFAULT priority. + * Only allowed to be called as long as the scheduler is running + * (#GNUNET_SCHEDULER_run or #GNUNET_SCHEDULER_run_with_driver has been + * called and has not returned yet). * * @param delay when should this operation time out? * @param wfd write file-descriptor @@ -1694,6 +1607,9 @@ GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, * used as a timeout on the socket being ready. The task will be * scheduled for execution once either the delay has expired or the * socket operation is ready. + * Only allowed to be called as long as the scheduler is running + * (#GNUNET_SCHEDULER_run or #GNUNET_SCHEDULER_run_with_driver has been + * called and has not returned yet). * * @param delay when should this operation time out? * @param priority priority of the task @@ -1712,6 +1628,9 @@ GNUNET_SCHEDULER_add_file_with_priority (struct GNUNET_TIME_Relative delay, int on_read, int on_write, GNUNET_SCHEDULER_TaskCallback task, void *task_cls) { + /* scheduler must be running */ + GNUNET_assert (NULL != scheduler_driver); + #if MINGW struct GNUNET_NETWORK_FDSet *s; struct GNUNET_SCHEDULER_Task * ret; @@ -1727,19 +1646,71 @@ GNUNET_SCHEDULER_add_file_with_priority (struct GNUNET_TIME_Relative delay, GNUNET_NETWORK_fdset_destroy (s); return ret; #else - int real_fd; - - GNUNET_DISK_internal_file_handle_ (fd, &real_fd, sizeof (int)); - GNUNET_assert (real_fd >= 0); - return add_without_sets ( - delay, priority, - on_read ? real_fd : -1, - on_write ? real_fd : -1, - task, task_cls); + GNUNET_assert (on_read || on_write); + GNUNET_assert (fd->fd >= 0); + return add_without_sets (delay, priority, + NULL, + NULL, + on_read ? fd : NULL, + on_write ? fd : NULL, + task, task_cls); #endif } +void +extract_handles (struct GNUNET_SCHEDULER_Task *t, + const struct GNUNET_NETWORK_FDSet *fdset, + const struct GNUNET_NETWORK_Handle ***ntarget, + unsigned int *extracted_nhandles, + const struct GNUNET_DISK_FileHandle ***ftarget, + unsigned int *extracted_fhandles) +{ + // FIXME: this implementation only works for unix, for WIN32 the file handles + // in fdset must be handled separately + const struct GNUNET_NETWORK_Handle **nhandles; + const struct GNUNET_DISK_FileHandle **fhandles; + unsigned int nhandles_len; + unsigned int fhandles_len; + + (void) t; + nhandles = NULL; + fhandles = NULL; + nhandles_len = 0; + fhandles_len = 0; + for (int sock = 0; sock != fdset->nsds; ++sock) + { + if (GNUNET_YES == GNUNET_NETWORK_fdset_test_native (fdset, sock)) + { + struct GNUNET_NETWORK_Handle *nhandle; + struct GNUNET_DISK_FileHandle *fhandle; + + nhandle = GNUNET_NETWORK_socket_box_native (sock); + if (NULL != nhandle) + { + GNUNET_array_append (nhandles, nhandles_len, nhandle); + } + else + { + fhandle = GNUNET_DISK_get_handle_from_int_fd (sock); + if (NULL != fhandle) + { + GNUNET_array_append (fhandles, fhandles_len, fhandle); + } + else + { + GNUNET_assert (0); + } + } + } + } + *ntarget = nhandles_len > 0 ? nhandles : NULL; + *ftarget = fhandles_len > 0 ? fhandles : NULL; + *extracted_nhandles = nhandles_len; + *extracted_fhandles = fhandles_len; +} + + /** * Schedule a new task to be run with a specified delay or when any of * the specified file descriptor sets is ready. The delay can be used @@ -1755,6 +1726,9 @@ GNUNET_SCHEDULER_add_file_with_priority (struct GNUNET_TIME_Relative delay, * || any-rs-ready * || any-ws-ready) ) * </code> + * Only allowed to be called as long as the scheduler is running + * (#GNUNET_SCHEDULER_run or #GNUNET_SCHEDULER_run_with_driver has been + * called and has not returned yet). * * @param prio how important is this task? * @param delay how long should we wait? @@ -1774,13 +1748,23 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio, void *task_cls) { struct GNUNET_SCHEDULER_Task *t; - - if ( (NULL == rs) && - (NULL == ws) ) + const struct GNUNET_NETWORK_Handle **read_nhandles; + const struct GNUNET_NETWORK_Handle **write_nhandles; + const struct GNUNET_DISK_FileHandle **read_fhandles; + const struct GNUNET_DISK_FileHandle **write_fhandles; + unsigned int read_nhandles_len, write_nhandles_len, + read_fhandles_len, write_fhandles_len; + int no_fdsets = (NULL == rs) && (NULL == ws); + int no_socket_descriptors = + ((NULL != rs) && (0 == rs->nsds)) && ((NULL != ws) && (0 == ws->nsds)); + + if (no_fdsets || no_socket_descriptors) return GNUNET_SCHEDULER_add_delayed_with_priority (delay, prio, task, task_cls); + /* scheduler must be running */ + GNUNET_assert (NULL != scheduler_driver); GNUNET_assert (NULL != active_task); GNUNET_assert (NULL != task); t = GNUNET_new (struct GNUNET_SCHEDULER_Task); @@ -1788,16 +1772,48 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio, t->callback_cls = task_cls; t->read_fd = -1; t->write_fd = -1; + t->own_handles = GNUNET_YES; + read_nhandles = NULL; + write_nhandles = NULL; + read_fhandles = NULL; + write_fhandles = NULL; + read_nhandles_len = 0; + write_nhandles_len = 0; + read_fhandles_len = 0; + write_fhandles_len = 0; if (NULL != rs) { - t->read_set = GNUNET_NETWORK_fdset_create (); - GNUNET_NETWORK_fdset_copy (t->read_set, rs); + extract_handles (t, + rs, + &read_nhandles, + &read_nhandles_len, + &read_fhandles, + &read_fhandles_len); } if (NULL != ws) { - t->write_set = GNUNET_NETWORK_fdset_create (); - GNUNET_NETWORK_fdset_copy (t->write_set, ws); + extract_handles (t, + ws, + &write_nhandles, + &write_nhandles_len, + &write_fhandles, + &write_fhandles_len); } + init_fd_info (t, + read_nhandles, + read_nhandles_len, + write_nhandles, + write_nhandles_len, + read_fhandles, + read_fhandles_len, + write_fhandles, + write_fhandles_len); + /* free the arrays of pointers to network / file handles, the actual + * handles will be freed in destroy_task */ + GNUNET_array_grow (read_nhandles, read_nhandles_len, 0); + GNUNET_array_grow (write_nhandles, write_nhandles_len, 0); + GNUNET_array_grow (read_fhandles, read_fhandles_len, 0); + GNUNET_array_grow (write_fhandles, write_fhandles_len, 0); #if PROFILE_DELAYS t->start_time = GNUNET_TIME_absolute_get (); #endif @@ -1810,8 +1826,9 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio, GNUNET_CONTAINER_DLL_insert (pending_head, pending_tail, t); + driver_add_multiple (t); max_priority_added = GNUNET_MAX (max_priority_added, - t->priority); + t->priority); LOG (GNUNET_ERROR_TYPE_DEBUG, "Adding task %p\n", t); @@ -1822,17 +1839,18 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio, /** * Function used by event-loop implementations to signal the scheduler - * that a particular @a task is ready due to an event of type @a et. + * that a particular @a task is ready due to an event specified in the + * et field of @a fdi. * * This function will then queue the task to notify the application * that the task is ready (with the respective priority). * - * @param task the task that is ready, NULL for wake up calls - * @param et information about why the task is ready + * @param task the task that is ready + * @param fdi information about the related FD */ void GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task, - enum GNUNET_SCHEDULER_EventType et) + struct GNUNET_SCHEDULER_FdInfo *fdi) { enum GNUNET_SCHEDULER_Reason reason; struct GNUNET_TIME_Absolute now; @@ -1842,17 +1860,20 @@ GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task, if (now.abs_value_us >= task->timeout.abs_value_us) reason |= GNUNET_SCHEDULER_REASON_TIMEOUT; if ( (0 == (reason & GNUNET_SCHEDULER_REASON_READ_READY)) && - (0 != (GNUNET_SCHEDULER_ET_IN & et)) ) + (0 != (GNUNET_SCHEDULER_ET_IN & fdi->et)) ) reason |= GNUNET_SCHEDULER_REASON_READ_READY; if ( (0 == (reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) && - (0 != (GNUNET_SCHEDULER_ET_OUT & et)) ) + (0 != (GNUNET_SCHEDULER_ET_OUT & fdi->et)) ) reason |= GNUNET_SCHEDULER_REASON_WRITE_READY; reason |= GNUNET_SCHEDULER_REASON_PREREQ_DONE; task->reason = reason; - task->fds = &task->fdx; - task->fdx.et = et; - task->fds_len = 1; - queue_ready_task (task); + if (GNUNET_NO == task->in_ready_list) + { + GNUNET_CONTAINER_DLL_remove (pending_head, + pending_tail, + task); + queue_ready_task (task); + } } @@ -1862,15 +1883,16 @@ GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task, * there are tasks left to run just to give other tasks a chance as * well. If we return #GNUNET_YES, the driver should call this * function again as soon as possible, while if we return #GNUNET_NO - * it must block until the operating system has more work as the - * scheduler has no more work to do right now. + * it must block until either the operating system has more work (the + * scheduler has no more work to do right now) or the timeout set by + * the scheduler (using the set_wakeup callback) is reached. * * @param sh scheduler handle that was given to the `loop` * @return #GNUNET_OK if there are more tasks that are ready, * and thus we would like to run more (yield to avoid * blocking other activities for too long) * #GNUNET_NO if we are done running tasks (yield to block) - * #GNUNET_SYSERR on error + * #GNUNET_SYSERR on error, e.g. no tasks were ready */ int GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh) @@ -1894,9 +1916,27 @@ GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh) pending_timeout_last = NULL; queue_ready_task (pos); } + pos = pending_head; + while (NULL != pos) + { + struct GNUNET_SCHEDULER_Task *next = pos->next; + if (now.abs_value_us >= pos->timeout.abs_value_us) + { + pos->reason |= GNUNET_SCHEDULER_REASON_TIMEOUT; + GNUNET_CONTAINER_DLL_remove (pending_head, + pending_tail, + pos); + queue_ready_task (pos); + } + pos = next; + } if (0 == ready_count) - return GNUNET_NO; + { + LOG (GNUNET_ERROR_TYPE_ERROR, + "GNUNET_SCHEDULER_run_from_driver was called, but no tasks are ready!\n"); + return GNUNET_SYSERR; + } /* find out which task priority level we are going to process this time */ @@ -1916,49 +1956,74 @@ GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh) while (NULL != (pos = ready_head[p])) { GNUNET_CONTAINER_DLL_remove (ready_head[p], - ready_tail[p], - pos); + ready_tail[p], + pos); ready_count--; current_priority = pos->priority; current_lifeness = pos->lifeness; active_task = pos; #if PROFILE_DELAYS if (GNUNET_TIME_absolute_get_duration (pos->start_time).rel_value_us > - DELAY_THRESHOLD.rel_value_us) + DELAY_THRESHOLD.rel_value_us) { LOG (GNUNET_ERROR_TYPE_DEBUG, - "Task %p took %s to be scheduled\n", - pos, - GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (pos->start_time), - GNUNET_YES)); + "Task %p took %s to be scheduled\n", + pos, + GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (pos->start_time), + GNUNET_YES)); } #endif tc.reason = pos->reason; GNUNET_NETWORK_fdset_zero (sh->rs); GNUNET_NETWORK_fdset_zero (sh->ws); + // FIXME: do we have to remove FdInfos from fds if they are not ready? tc.fds_len = pos->fds_len; tc.fds = pos->fds; - tc.read_ready = (NULL == pos->read_set) ? sh->rs : pos->read_set; - if ( (-1 != pos->read_fd) && - (0 != (pos->reason & GNUNET_SCHEDULER_REASON_READ_READY)) ) - GNUNET_NETWORK_fdset_set_native (sh->rs, - pos->read_fd); - tc.write_ready = (NULL == pos->write_set) ? sh->ws : pos->write_set; - if ((-1 != pos->write_fd) && - (0 != (pos->reason & GNUNET_SCHEDULER_REASON_WRITE_READY))) - GNUNET_NETWORK_fdset_set_native (sh->ws, - pos->write_fd); + for (unsigned int i = 0; i != pos->fds_len; ++i) + { + struct GNUNET_SCHEDULER_FdInfo *fdi = &pos->fds[i]; + if (0 != (GNUNET_SCHEDULER_ET_IN & fdi->et)) + { + GNUNET_NETWORK_fdset_set_native (sh->rs, + fdi->sock); + } + if (0 != (GNUNET_SCHEDULER_ET_OUT & fdi->et)) + { + GNUNET_NETWORK_fdset_set_native (sh->ws, + fdi->sock); + } + } + tc.read_ready = sh->rs; + tc.write_ready = sh->ws; LOG (GNUNET_ERROR_TYPE_DEBUG, - "Running task: %p\n", - pos); + "Running task %p\n", + pos); + GNUNET_assert (NULL != pos->callback); pos->callback (pos->callback_cls); + if (NULL != pos->fds) + { + int del_result = scheduler_driver->del (scheduler_driver->cls, pos); + if (GNUNET_OK != del_result) + { + LOG (GNUNET_ERROR_TYPE_ERROR, + "driver could not delete task\n"); + GNUNET_assert (0); + } + } active_task = NULL; dump_backtrace (pos); destroy_task (pos); tasks_run++; } + shutdown_if_no_lifeness (); if (0 == ready_count) + { + scheduler_driver->set_wakeup (scheduler_driver->cls, + get_timeout ()); return GNUNET_NO; + } + scheduler_driver->set_wakeup (scheduler_driver->cls, + GNUNET_TIME_absolute_get ()); return GNUNET_OK; } @@ -1981,8 +2046,8 @@ GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh) */ int GNUNET_SCHEDULER_run_with_driver (const struct GNUNET_SCHEDULER_Driver *driver, - GNUNET_SCHEDULER_TaskCallback task, - void *task_cls) + GNUNET_SCHEDULER_TaskCallback task, + void *task_cls) { int ret; struct GNUNET_SIGNAL_Context *shc_int; @@ -1997,7 +2062,6 @@ GNUNET_SCHEDULER_run_with_driver (const struct GNUNET_SCHEDULER_Driver *driver, #endif struct GNUNET_SCHEDULER_Task tsk; const struct GNUNET_DISK_FileHandle *pr; - struct GNUNET_SCHEDULER_Handle sh; /* general set-up */ GNUNET_assert (NULL == active_task); @@ -2009,54 +2073,56 @@ GNUNET_SCHEDULER_run_with_driver (const struct GNUNET_SCHEDULER_Driver *driver, GNUNET_assert (NULL != shutdown_pipe_handle); pr = GNUNET_DISK_pipe_handle (shutdown_pipe_handle, GNUNET_DISK_PIPE_END_READ); - GNUNET_assert (NULL != pr); my_pid = getpid (); + scheduler_driver = driver; /* install signal handlers */ LOG (GNUNET_ERROR_TYPE_DEBUG, "Registering signal handlers\n"); shc_int = GNUNET_SIGNAL_handler_install (SIGINT, - &sighandler_shutdown); + &sighandler_shutdown); shc_term = GNUNET_SIGNAL_handler_install (SIGTERM, - &sighandler_shutdown); + &sighandler_shutdown); #if (SIGTERM != GNUNET_TERM_SIG) shc_gterm = GNUNET_SIGNAL_handler_install (GNUNET_TERM_SIG, - &sighandler_shutdown); + &sighandler_shutdown); #endif #ifndef MINGW shc_pipe = GNUNET_SIGNAL_handler_install (SIGPIPE, - &sighandler_pipe); + &sighandler_pipe); shc_quit = GNUNET_SIGNAL_handler_install (SIGQUIT, - &sighandler_shutdown); + &sighandler_shutdown); shc_hup = GNUNET_SIGNAL_handler_install (SIGHUP, - &sighandler_shutdown); + &sighandler_shutdown); #endif /* Setup initial tasks */ current_priority = GNUNET_SCHEDULER_PRIORITY_DEFAULT; - current_lifeness = GNUNET_YES; + current_lifeness = GNUNET_NO; memset (&tsk, - 0, - sizeof (tsk)); + 0, + sizeof (tsk)); active_task = &tsk; - tsk.sh = &sh; + GNUNET_SCHEDULER_add_now (&GNUNET_OS_install_parent_control_handler, + NULL); + GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, + pr, + &shutdown_cb, + NULL); + current_lifeness = GNUNET_YES; GNUNET_SCHEDULER_add_with_reason_and_priority (task, task_cls, GNUNET_SCHEDULER_REASON_STARTUP, GNUNET_SCHEDULER_PRIORITY_DEFAULT); - GNUNET_SCHEDULER_add_now_with_lifeness (GNUNET_NO, - &GNUNET_OS_install_parent_control_handler, - NULL); active_task = NULL; - driver->set_wakeup (driver->cls, - GNUNET_TIME_absolute_get ()); - + scheduler_driver->set_wakeup (scheduler_driver->cls, + get_timeout ()); /* begin main event loop */ sh.rs = GNUNET_NETWORK_fdset_create (); sh.ws = GNUNET_NETWORK_fdset_create (); - sh.driver = driver; + GNUNET_NETWORK_fdset_handle_set (sh.rs, pr); ret = driver->loop (driver->cls, - &sh); + &sh); GNUNET_NETWORK_fdset_destroy (sh.rs); GNUNET_NETWORK_fdset_destroy (sh.ws); @@ -2073,20 +2139,215 @@ GNUNET_SCHEDULER_run_with_driver (const struct GNUNET_SCHEDULER_Driver *driver, #endif GNUNET_DISK_pipe_close (shutdown_pipe_handle); shutdown_pipe_handle = NULL; + scheduler_driver = NULL; + return ret; +} + + +int +select_add (void *cls, + struct GNUNET_SCHEDULER_Task *task, + struct GNUNET_SCHEDULER_FdInfo *fdi) +{ + struct DriverContext *context = cls; + GNUNET_assert (NULL != context); + GNUNET_assert (NULL != task); + GNUNET_assert (NULL != fdi); + GNUNET_assert (0 != (GNUNET_SCHEDULER_ET_IN & fdi->et) || + 0 != (GNUNET_SCHEDULER_ET_OUT & fdi->et)); + + if (!((NULL != fdi->fd) ^ (NULL != fdi->fh)) || (fdi->sock < 0)) + { + /* exactly one out of {fd, hf} must be != NULL and the OS handle must be valid */ + return GNUNET_SYSERR; + } + + struct Scheduled *scheduled = GNUNET_new (struct Scheduled); + scheduled->task = task; + scheduled->fdi = fdi; + scheduled->et = fdi->et; + + GNUNET_CONTAINER_DLL_insert (context->scheduled_head, + context->scheduled_tail, + scheduled); + return GNUNET_OK; +} + + +int +select_del (void *cls, + struct GNUNET_SCHEDULER_Task *task) +{ + struct DriverContext *context; + struct Scheduled *pos; + int ret; + + GNUNET_assert (NULL != cls); + + context = cls; + ret = GNUNET_SYSERR; + pos = context->scheduled_head; + while (NULL != pos) + { + struct Scheduled *next = pos->next; + if (pos->task == task) + { + GNUNET_CONTAINER_DLL_remove (context->scheduled_head, + context->scheduled_tail, + pos); + GNUNET_free (pos); + ret = GNUNET_OK; + } + pos = next; + } return ret; } +int +select_loop (void *cls, + struct GNUNET_SCHEDULER_Handle *sh) +{ + struct GNUNET_NETWORK_FDSet *rs; + struct GNUNET_NETWORK_FDSet *ws; + struct DriverContext *context; + int select_result; + int tasks_ready; + + context = cls; + GNUNET_assert (NULL != context); + rs = GNUNET_NETWORK_fdset_create (); + ws = GNUNET_NETWORK_fdset_create (); + tasks_ready = GNUNET_NO; + while (NULL != context->scheduled_head || + GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us != context->timeout.rel_value_us) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "select timeout = %s\n", + GNUNET_STRINGS_relative_time_to_string (context->timeout, GNUNET_NO)); + + GNUNET_NETWORK_fdset_zero (rs); + GNUNET_NETWORK_fdset_zero (ws); + struct Scheduled *pos; + for (pos = context->scheduled_head; NULL != pos; pos = pos->next) + { + if (0 != (GNUNET_SCHEDULER_ET_IN & pos->et)) + { + GNUNET_NETWORK_fdset_set_native (rs, pos->fdi->sock); + } + if (0 != (GNUNET_SCHEDULER_ET_OUT & pos->et)) + { + GNUNET_NETWORK_fdset_set_native (ws, pos->fdi->sock); + } + } + if (NULL == scheduler_select) + { + select_result = GNUNET_NETWORK_socket_select (rs, + ws, + NULL, + context->timeout); + } + else + { + select_result = scheduler_select (scheduler_select_cls, + rs, + ws, + NULL, + context->timeout); + } + if (select_result == GNUNET_SYSERR) + { + if (errno == EINTR) + continue; + + LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "select"); +#ifndef MINGW +#if USE_LSOF + char lsof[512]; + + snprintf (lsof, sizeof (lsof), "lsof -p %d", getpid ()); + (void) close (1); + (void) dup2 (2, 1); + if (0 != system (lsof)) + LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, + "system"); +#endif +#endif +#if DEBUG_FDS + struct Scheduled *s; + for (s = context->scheduled_head; NULL != s; s = s->next) + { + int flags = fcntl (s->fdi->sock, F_GETFD); + if ((flags == -1) && (errno == EBADF)) + { + LOG (GNUNET_ERROR_TYPE_ERROR, + "Got invalid file descriptor %d!\n", + s->fdi->sock); + } + } +#endif + GNUNET_assert (0); + GNUNET_NETWORK_fdset_destroy (rs); + GNUNET_NETWORK_fdset_destroy (ws); + return GNUNET_SYSERR; + } + for (pos = context->scheduled_head; NULL != pos; pos = pos->next) + { + int is_ready = GNUNET_NO; + if (0 != (GNUNET_SCHEDULER_ET_IN & pos->et) && + GNUNET_YES == GNUNET_NETWORK_fdset_test_native (rs, pos->fdi->sock)) + { + pos->fdi->et |= GNUNET_SCHEDULER_ET_IN; + is_ready = GNUNET_YES; + } + if (0 != (GNUNET_SCHEDULER_ET_OUT & pos->et) && + GNUNET_YES == GNUNET_NETWORK_fdset_test_native (ws, pos->fdi->sock)) + { + pos->fdi->et |= GNUNET_SCHEDULER_ET_OUT; + is_ready = GNUNET_YES; + } + if (GNUNET_YES == is_ready) + { + GNUNET_SCHEDULER_task_ready (pos->task, pos->fdi); + } + } + tasks_ready = GNUNET_SCHEDULER_run_from_driver (sh); + GNUNET_assert (GNUNET_SYSERR != tasks_ready); + } + GNUNET_NETWORK_fdset_destroy (rs); + GNUNET_NETWORK_fdset_destroy (ws); + return GNUNET_OK; +} + + +void +select_set_wakeup(void *cls, + struct GNUNET_TIME_Absolute dt) +{ + struct DriverContext *context = cls; + GNUNET_assert (NULL != context); + + context->timeout = GNUNET_TIME_absolute_get_remaining (dt); +} + + /** * Obtain the driver for using select() as the event loop. * * @return NULL on error */ -const struct GNUNET_SCHEDULER_Driver * +struct GNUNET_SCHEDULER_Driver * GNUNET_SCHEDULER_driver_select () { - GNUNET_break (0); // not implemented - return NULL; + struct GNUNET_SCHEDULER_Driver *select_driver; + select_driver = GNUNET_new (struct GNUNET_SCHEDULER_Driver); + + select_driver->loop = &select_loop; + select_driver->add = &select_add; + select_driver->del = &select_del; + select_driver->set_wakeup = &select_set_wakeup; + + return select_driver; } diff --git a/src/util/service.c b/src/util/service.c @@ -1932,6 +1932,11 @@ do_send (void *cls) size_t left; const char *buf; + LOG (GNUNET_ERROR_TYPE_DEBUG, + "service: sending message with type %u", + ntohs(client->msg->type)); + + client->send_task = NULL; buf = (const char *) client->msg; left = ntohs (client->msg->size) - client->msg_pos; @@ -1941,6 +1946,8 @@ do_send (void *cls) GNUNET_assert (ret <= (ssize_t) left); if (0 == ret) { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "no data send"); GNUNET_MQ_inject_error (client->mq, GNUNET_MQ_ERROR_WRITE); return; @@ -1958,6 +1965,9 @@ do_send (void *cls) if (EPIPE != errno) GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "send"); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "socket send returned with error code %i", + errno); GNUNET_MQ_inject_error (client->mq, GNUNET_MQ_ERROR_WRITE); return; @@ -1968,7 +1978,7 @@ do_send (void *cls) GNUNET_MQ_impl_send_in_flight (client->mq); } client->msg_pos += ret; - if (left > ret) + if (left > (size_t) ret) { GNUNET_assert (NULL == client->drop_task); client->send_task @@ -1997,6 +2007,7 @@ service_mq_send (struct GNUNET_MQ_Handle *mq, { struct GNUNET_SERVICE_Client *client = impl_state; + (void) mq; if (NULL != client->drop_task) return; /* we're going down right now, do not try to send */ GNUNET_assert (NULL == client->send_task); @@ -2026,6 +2037,7 @@ service_mq_cancel (struct GNUNET_MQ_Handle *mq, { struct GNUNET_SERVICE_Client *client = impl_state; + (void) mq; GNUNET_assert (0 == client->msg_pos); client->msg = NULL; GNUNET_SCHEDULER_cancel (client->send_task); @@ -2402,7 +2414,7 @@ resume_client_receive (void *cls) GNUNET_YES); if (GNUNET_SYSERR == ret) { - if (NULL != c->drop_task) + if (NULL == c->drop_task) GNUNET_SERVICE_client_drop (c); return; } @@ -2431,6 +2443,7 @@ resume_client_receive (void *cls) void GNUNET_SERVICE_client_continue (struct GNUNET_SERVICE_Client *c) { + GNUNET_assert (NULL == c->drop_task); GNUNET_assert (GNUNET_YES == c->needs_continue); GNUNET_assert (NULL == c->recv_task); c->needs_continue = GNUNET_NO; @@ -2513,6 +2526,24 @@ GNUNET_SERVICE_client_drop (struct GNUNET_SERVICE_Client *c) { struct GNUNET_SERVICE_Handle *sh = c->sh; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Client dropped: %p (MQ: %p)\n", + c, + c->mq); + +#if EXECINFO + void *backtrace_array[MAX_TRACE_DEPTH]; + int num_backtrace_strings = backtrace (backtrace_array, MAX_TRACE_DEPTH); + char **backtrace_strings = + backtrace_symbols (backtrace_array, + t->num_backtrace_strings); + for (unsigned int i = 0; i < num_backtrace_strings; i++) + LOG (GNUNET_ERROR_TYPE_DEBUG, + "client drop trace %u: %s\n", + i, + backtrace_strings[i]); +#endif + if (NULL != c->drop_task) { /* asked to drop twice! */ diff --git a/src/util/speedup.c b/src/util/speedup.c @@ -42,6 +42,7 @@ do_speedup (void *cls) { static long long current_offset; + (void) cls; speedup_task = NULL; current_offset += delta.rel_value_us; GNUNET_TIME_set_offset (current_offset); diff --git a/src/util/strings.c b/src/util/strings.c @@ -1069,11 +1069,13 @@ GNUNET_STRINGS_string_to_data (const char *enc, size_t enclen, * (if they weren't NULL). */ int -GNUNET_STRINGS_parse_uri (const char *path, char **scheme_part, - const char **path_part) +GNUNET_STRINGS_parse_uri (const char *path, + char **scheme_part, + const char **path_part) { size_t len; - int i, end; + size_t i; + int end; int pp_state = 0; const char *post_scheme_part = NULL; len = strlen (path); @@ -1082,7 +1084,7 @@ GNUNET_STRINGS_parse_uri (const char *path, char **scheme_part, switch (pp_state) { case 0: - if (path[i] == ':' && i > 0) + if ( (path[i] == ':') && (i > 0) ) { pp_state += 1; continue; diff --git a/src/util/test_crypto_abe.c b/src/util/test_crypto_abe.c @@ -1,86 +0,0 @@ -/* - This file is part of GNUnet. - Copyright (C) 2002, 2003, 2004, 2006 GNUnet e.V. - - GNUnet is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GNUnet is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ -/** - * @author Martin Schanzenbach - * @file util/test_crypto_abe.c - * @brief test for ABE ciphers - */ -#include "platform.h" -#include "gnunet_util_lib.h" - -#define TESTSTRING "Hello World!" - -static int -testAbecipher () -{ - struct GNUNET_CRYPTO_AbeMasterKey *msk; - struct GNUNET_CRYPTO_AbeKey *key; - char *result; - char **attrs; - int size; - char *res; - msk = GNUNET_CRYPTO_cpabe_create_master_key (); - size = GNUNET_CRYPTO_cpabe_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, - "testattr", //Policy - msk, - (void*)&result); - GNUNET_assert (-1 != size); - attrs = GNUNET_malloc (2 * sizeof (char*)); - attrs[0] = "testattr"; - attrs[1] = NULL; - key = GNUNET_CRYPTO_cpabe_create_key (msk, - attrs); - - size = GNUNET_CRYPTO_cpabe_decrypt (result, size, - key, - (void*)&res); - if (strlen (TESTSTRING) + 1 != size) - { - printf ("abeciphertest failed: decryptBlock returned %d\n", size); - return 1; - } - if (0 != strcmp (res, TESTSTRING)) - { - printf ("abeciphertest failed: %s != %s\n", res, TESTSTRING); - return 1; - } - else - return 0; -} - - -int -main (int argc, char *argv[]) -{ - int failureCount = 0; - - GNUNET_log_setup ("test-crypto-abe", "WARNING", NULL); - failureCount += testAbecipher (); - - if (failureCount != 0) - { - printf ("%d TESTS FAILED!\n", failureCount); - return -1; - } - return 0; -} - -/* end of test_crypto_aes.c */ diff --git a/src/util/test_service.c b/src/util/test_service.c @@ -30,10 +30,17 @@ */ #define MY_TYPE 256 +#define TIMEOUT GNUNET_TIME_UNIT_SECONDS + static int global_ret = 1; static struct GNUNET_MQ_Handle *mq; +/** + * Timeout task. + */ +static struct GNUNET_SCHEDULER_Task *tt; + static void handle_recv (void *cls, @@ -45,8 +52,11 @@ handle_recv (void *cls, "Received client message...\n"); GNUNET_SERVICE_client_continue (client); global_ret = 2; - GNUNET_MQ_destroy (mq); - mq = NULL; + if (NULL != mq) + { + GNUNET_MQ_destroy (mq); + mq = NULL; + } } @@ -86,10 +96,29 @@ disconnect_cb (void *cls, { GNUNET_SCHEDULER_shutdown (); global_ret = 0; + if (NULL != tt) + { + GNUNET_SCHEDULER_cancel (tt); + tt = NULL; + } } } +static void +timeout_task (void *cls) +{ + tt = NULL; + if (NULL != mq) + { + GNUNET_MQ_destroy (mq); + mq = NULL; + } + global_ret = 33; + GNUNET_SCHEDULER_shutdown (); +} + + /** * Initialization function of the service. Starts * a client to connect to the service. @@ -106,7 +135,11 @@ service_init (void *cls, const char *service_name = cls; struct GNUNET_MQ_Envelope *env; struct GNUNET_MessageHeader *msg; - + + GNUNET_assert (NULL == tt); + tt = GNUNET_SCHEDULER_add_delayed (TIMEOUT, + &timeout_task, + NULL); mq = GNUNET_CLIENT_connect (cfg, service_name, NULL, diff --git a/src/util/time.c b/src/util/time.c @@ -693,7 +693,7 @@ GNUNET_TIME_year_to_time (unsigned int year) } t.tm_year = year - 1900; t.tm_mday = 1; - t.tm_mon = 1; + t.tm_mon = 0; t.tm_wday = 1; t.tm_yday = 1; tp = mktime (&t); diff --git a/src/vpn/gnunet-helper-vpn.c b/src/vpn/gnunet-helper-vpn.c @@ -649,6 +649,7 @@ main (int argc, char **argv) { fprintf (stderr, "Fatal: prefix_len out of range\n"); + close (fd_tun); return 1; } diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c @@ -2218,6 +2218,9 @@ route_packet (struct DestinationEntry *destination, * * @param cls closure, NULL * @param message message we got from the client (VPN channel interface) + * @return #GNUNET_OK on success, + * #GNUNET_NO to stop further processing (no error) + * #GNUNET_SYSERR to stop further processing with error */ static int message_token (void *cls,