aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-03-04 10:43:15 +0100
committert3sserakt <t3ss@posteo.de>2021-03-04 11:31:11 +0100
commit1d6759045c958205201ae051d196a9e846b9ebd2 (patch)
treeee5ad3fae44ea5cb4792598cf1b7e852c8398df5
parente5d31aa52e4983bffce3eca6ca601bbb8f4a302a (diff)
parentdf757453c5f64540a58b6abb465963ca685de83f (diff)
downloadgnunet-1d6759045c958205201ae051d196a9e846b9ebd2.tar.gz
gnunet-1d6759045c958205201ae051d196a9e846b9ebd2.zip
Merge branch 'master' of ssh://gnunet.org/gnunet
-rw-r--r--configure.ac16
-rw-r--r--debian/libgnunet.install1
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/handbook/Makefile.am40
-rw-r--r--doc/handbook/chapters/developer.texi30
-rw-r--r--doc/handbook/chapters/user.texi109
-rw-r--r--doc/handbook/images/tng.dot55
-rw-r--r--doc/handbook/images/tng.pngbin0 -> 75821 bytes
-rw-r--r--doc/man/Makefile.am1
-rw-r--r--doc/man/gnunet-base32.174
-rw-r--r--doc/tutorial/Makefile.am21
-rw-r--r--po/POTFILES.in114
-rw-r--r--src/include/Makefile.am1
-rw-r--r--src/include/gnu_name_system_record_types.h138
-rw-r--r--src/include/gnunet_gnsrecord_lib.h104
-rw-r--r--src/peerstore/gnunet-service-peerstore.c15
-rw-r--r--src/reclaim/plugin_gnsrecord_reclaim.c3
-rw-r--r--src/transport/gnunet-communicator-tcp.c42
-rw-r--r--src/transport/gnunet-service-tng.c93
-rw-r--r--src/transport/test_transport_api2_tcp_peer1.conf3
-rw-r--r--src/transport/test_transport_api2_tcp_peer2.conf3
-rw-r--r--src/transport/transport-testing2.c83
-rw-r--r--src/transport/transport-testing2.h5
-rw-r--r--src/util/.gitignore1
-rw-r--r--src/util/Makefile.am9
-rw-r--r--src/util/gnunet-base32.c152
-rw-r--r--src/util/gnunet-scrypt.c7
27 files changed, 732 insertions, 390 deletions
diff --git a/configure.ac b/configure.ac
index 68cae8c0e..28c616069 100644
--- a/configure.ac
+++ b/configure.ac
@@ -558,6 +558,18 @@ AS_IF([test "x$include_manpages" = "xyes"],
558# texinfo5 switches are used. This comes with no version checks, is 558# texinfo5 switches are used. This comes with no version checks, is
559# enabled only at distributors action (ie defaults to "no"). 559# enabled only at distributors action (ie defaults to "no").
560# Mantis #3914 for more details (https://bugs.gnunet.org/view.php?id=3914) 560# Mantis #3914 for more details (https://bugs.gnunet.org/view.php?id=3914)
561# While GNU makeinfo 6.5 supports --css-ref=URL,
562# makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other
563# base) does only support --css-include=FILE.
564# The only difference is a shorter html output and
565# in 6.5 the ability to use refs instead of include.
566# We prefer not to break builds in this case, so
567# we use the include version which is backwards compatible
568# and upwards compatible, while the ref variant is neither.
569# In the 5.x version they added `--split=chapters|sections` in
570# addition to `--split=nodes`.
571# Hold on to your hats: In version 6.5 this is already removed, ffs.
572# GNU Texinfo, please be more consistent than 1 version in switches.
561AC_MSG_CHECKING(whether to enable texinfo4 switches) 573AC_MSG_CHECKING(whether to enable texinfo4 switches)
562AC_ARG_ENABLE([texinfo4], 574AC_ARG_ENABLE([texinfo4],
563 [AS_HELP_STRING([--enable-texinfo4], [Use texinfo version 4 specific switches])], 575 [AS_HELP_STRING([--enable-texinfo4], [Use texinfo version 4 specific switches])],
@@ -568,11 +580,15 @@ AS_IF([test "x$activate_texinfo4" = "xyes"],
568 [ 580 [
569 AM_CONDITIONAL([ACTIVATE_TEXINFO4],true) 581 AM_CONDITIONAL([ACTIVATE_TEXINFO4],true)
570 AC_DEFINE([ACTIVATE_TEXINFO4],[1],[Using texinfo version 4 specific switches]) 582 AC_DEFINE([ACTIVATE_TEXINFO4],[1],[Using texinfo version 4 specific switches])
583 TEXINFO_HTMLFLAGS="--no-split --css-include=style.css --css-include=manual.css"
571 ],[ 584 ],[
572 AM_CONDITIONAL([ACTIVATE_TEXINFO4],false) 585 AM_CONDITIONAL([ACTIVATE_TEXINFO4],false)
573 AC_DEFINE([INCLUDE_MANPAGES],[0],[Using texinfo version 5 or later switches]) 586 AC_DEFINE([INCLUDE_MANPAGES],[0],[Using texinfo version 5 or later switches])
587 TEXINFO_HTMLFLAGS="--no-split --css-ref='../style.css' --css-ref='../manual.css'"
588
574 ]) 589 ])
575 590
591AC_SUBST([TEXINFO_HTMLFLAGS])
576 592
577# Adam shostack suggests the following for Windows: 593# Adam shostack suggests the following for Windows:
578# -D_FORTIFY_SOURCE=2 -fstack-protector-all 594# -D_FORTIFY_SOURCE=2 -fstack-protector-all
diff --git a/debian/libgnunet.install b/debian/libgnunet.install
index 7cf63853c..dd216d5ba 100644
--- a/debian/libgnunet.install
+++ b/debian/libgnunet.install
@@ -7,6 +7,7 @@ usr/lib/*/libgnunetutil.so.*
7usr/share/locale/ 7usr/share/locale/
8usr/share/gnunet/config.d/util.conf 8usr/share/gnunet/config.d/util.conf
9usr/bin/gnunet-arm 9usr/bin/gnunet-arm
10usr/bin/gnunet-base32
10usr/bin/gnunet-bugreport 11usr/bin/gnunet-bugreport
11usr/bin/gnunet-config 12usr/bin/gnunet-config
12usr/bin/gnunet-ecc 13usr/bin/gnunet-ecc
diff --git a/doc/Makefile.am b/doc/Makefile.am
index eb23b534b..a9ad69954 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,4 +1,6 @@
1# This Makefile.am is in the public domain 1# This Makefile.am is in the public domain
2
3
2if DOCUMENTATION 4if DOCUMENTATION
3 SUBDIRS = doxygen handbook tutorial 5 SUBDIRS = doxygen handbook tutorial
4endif 6endif
diff --git a/doc/handbook/Makefile.am b/doc/handbook/Makefile.am
index 0435796a9..d7bcab696 100644
--- a/doc/handbook/Makefile.am
+++ b/doc/handbook/Makefile.am
@@ -3,25 +3,8 @@ docdir = $(datadir)/doc/gnunet/
3 3
4infoimagedir = $(infodir)/images 4infoimagedir = $(infodir)/images
5 5
6if ACTIVATE_TEXINFO4 6AM_MAKEINFOHTMLFLAGS = $(TEXINFO_HTMLFLAGS)
7# NOTE: While GNU makeinfo 6.5 supports --css-ref=URL, 7
8# makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other
9# base) does only support --css-include=FILE.
10# The only difference is a shorter html output and
11# in 6.5 the ability to use refs instead of include.
12# We prefer not to break builds in this case, so
13# we use the include version which is backwards compatible
14# and upwards compatible, while the ref variant is neither.
15AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css
16else
17# In the 5.x version they added `--split=chapters|sections` in
18# addition to `--split=nodes`.
19# Hold on to your hats: In version 6.5 this is already removed, ffs.
20# GNU Texinfo, please be more consistent than 1 version in switches.
21# This however is compatible to version 5.2. Thanks, I hate it.
22# AM_MAKEINFOHTMLFLAGS = --split=sections --css-ref="../style.css" --css-ref="../manual.css"
23AM_MAKEINFOHTMLFLAGS = --no-split --css-ref="../style.css" --css-ref="../manual.css"
24endif
25 8
26dist_infoimage_DATA = \ 9dist_infoimage_DATA = \
27 images/gnunet-gtk-0-10-gns-a-done.png \ 10 images/gnunet-gtk-0-10-gns-a-done.png \
@@ -78,6 +61,25 @@ gnunet_TEXINFOS = \
78 agpl-3.0.texi \ 61 agpl-3.0.texi \
79 version.texi 62 version.texi
80 63
64#if ACTIVATE_TEXINFO4
65# NOTE: While GNU makeinfo 6.5 supports --css-ref=URL,
66# makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other
67# base) does only support --css-include=FILE.
68# The only difference is a shorter html output and
69# in 6.5 the ability to use refs instead of include.
70# We prefer not to break builds in this case, so
71# we use the include version which is backwards compatible
72# and upwards compatible, while the ref variant is neither.
73#AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css
74#else
75# In the 5.x version they added `--split=chapters|sections` in
76# addition to `--split=nodes`.
77# Hold on to your hats: In version 6.5 this is already removed, ffs.
78# GNU Texinfo, please be more consistent than 1 version in switches.
79# This however is compatible to version 5.2. Thanks, I hate it.
80# AM_MAKEINFOHTMLFLAGS = --split=sections --css-ref="../style.css" --css-ref="../manual.css"
81#AM_MAKEINFOHTMLFLAGS = --split --css-ref="../style.css" --css-ref="../manual.css"
82#endif
81EXTRA_DIST = \ 83EXTRA_DIST = \
82 $(gnunet_TEXINFOS) \ 84 $(gnunet_TEXINFOS) \
83 htmlxref.cnf \ 85 htmlxref.cnf \
diff --git a/doc/handbook/chapters/developer.texi b/doc/handbook/chapters/developer.texi
index 0d3b4739b..8bc8c8005 100644
--- a/doc/handbook/chapters/developer.texi
+++ b/doc/handbook/chapters/developer.texi
@@ -9485,18 +9485,6 @@ of using plugins for the actual transmission operations and the ATS subsystem
9485to select a plugin and allocate bandwidth. The following key issues have been 9485to select a plugin and allocate bandwidth. The following key issues have been
9486identified with this design: 9486identified with this design:
9487 9487
9488@menu
9489* Issues with TRANSPORT::
9490* Design goals of TNG::
9491* HELLO-NG::
9492* Priorities and preferences::
9493* Communicators::
9494@end menu
9495
9496@node Issues with TRANSPORT
9497@subsection Issues with TRANSPORT
9498
9499
9500@itemize @bullet 9488@itemize @bullet
9501@item Bugs in one plugin can affect the TRANSPORT service and other plugins. 9489@item Bugs in one plugin can affect the TRANSPORT service and other plugins.
9502 There is at least one open bug that affects sockets, where the origin is 9490 There is at least one open bug that affects sockets, where the origin is
@@ -9531,6 +9519,13 @@ identified with this design:
9531@end itemize 9519@end itemize
9532 9520
9533 9521
9522@menu
9523* Design goals of TNG::
9524* HELLO-NG::
9525* Priorities and preferences::
9526* Communicators::
9527@end menu
9528
9534@node Design goals of TNG 9529@node Design goals of TNG
9535@subsection Design goals of TNG 9530@subsection Design goals of TNG
9536 9531
@@ -9564,17 +9559,8 @@ In order to address the above issues, we want to:
9564 9559
9565The new architecture is planned as follows: 9560The new architecture is planned as follows:
9566 9561
9567@verbatim
9568
9569 APPLICATIONS
9570 |
9571 |
9572CORE -- TRANSPORT -- COMMUNICATOR(S) -- NAT
9573 \ /
9574 \ /
9575 PEERSTORE
9576 9562
9577@end verbatim 9563@image{images/tng,5in,,TNG architecture.}
9578 9564
9579TRANSPORT's main objective is to establish bi-directional virtual links using a 9565TRANSPORT's main objective is to establish bi-directional virtual links using a
9580variety of possibly uni-directional communicators. Links undergo the following 9566variety of possibly uni-directional communicators. Links undergo the following
diff --git a/doc/handbook/chapters/user.texi b/doc/handbook/chapters/user.texi
index ebc1a7979..5d5d2fe14 100644
--- a/doc/handbook/chapters/user.texi
+++ b/doc/handbook/chapters/user.texi
@@ -1539,7 +1539,12 @@ authoritative zone (replacing ".+" with the name of the location
1539where the name was encountered) and hence generate a 1539where the name was encountered) and hence generate a
1540valid GNS name. 1540valid GNS name.
1541 1541
1542GNS currently supports the following record types: 1542The GNS currently supports the record types as defined in
1543@uref{https://git.gnunet.org/gana.git/tree/gnu-name-system-record-types/registry.rec, GANA}.
1544In addition, GNS supports DNS record types, such as A, AAAA or TXT.
1545
1546In the following, we discuss GNS records with specific behaviour or special
1547handling of DNS records.
1543 1548
1544@menu 1549@menu
1545* NICK:: 1550* NICK::
@@ -1547,22 +1552,9 @@ GNS currently supports the following record types:
1547* BOX:: 1552* BOX::
1548* LEHO:: 1553* LEHO::
1549* VPN:: 1554* VPN::
1550* A AAAA and TXT::
1551* CNAME:: 1555* CNAME::
1552* GNS2DNS:: 1556* GNS2DNS::
1553* SOA SRV PTR and MX:: 1557* SOA SRV PTR and MX::
1554* PLACE::
1555* PHONE::
1556* ID ATTR::
1557* ID TOKEN::
1558* ID TOKEN METADATA::
1559* CREDENTIAL::
1560* POLICY::
1561* ATTRIBUTE::
1562* ABE KEY::
1563* ABE MASTER::
1564* RECLAIM OIDC CLIENT::
1565* RECLAIM OIDC REDIRECT::
1566@end menu 1558@end menu
1567 1559
1568@node NICK 1560@node NICK
@@ -1658,11 +1650,6 @@ having the following lines in the @file{gnunet.conf} configuration file:
1658TCP_REDIRECTS = 80:localhost4:8080 1650TCP_REDIRECTS = 80:localhost4:8080
1659@end example 1651@end example
1660 1652
1661@node A AAAA and TXT
1662@subsubsection A AAAA and TXT
1663
1664Those records work in exactly the same fashion as in traditional DNS.
1665
1666@node CNAME 1653@node CNAME
1667@subsubsection CNAME 1654@subsubsection CNAME
1668 1655
@@ -1771,90 +1758,6 @@ $ gnunet-namestore -a -n mail -t MX -z bar -e 3600s -V \
1771> "10,mail.bar" 1758> "10,mail.bar"
1772@end example 1759@end example
1773 1760
1774@node PLACE
1775@subsubsection PLACE
1776
1777@c TODO describe record type and give an example of how and
1778@c when to use it
1779Record type for a social place.
1780
1781@node PHONE
1782@subsubsection PHONE
1783
1784@c TODO describe record type and give an example of how and
1785@c when to use it
1786Record type for a phone (of CONVERSATION).
1787
1788@node ID ATTR
1789@subsubsection ID ATTR
1790
1791@c TODO describe record type and give an example of how and
1792@c when to use it
1793Record type for identity attributes (of IDENTITY).
1794
1795@node ID TOKEN
1796@subsubsection ID TOKEN
1797
1798@c TODO describe record type and give an example of how and
1799@c when to use it
1800Record type for an identity token (of IDENTITY-TOKEN).
1801
1802@node ID TOKEN METADATA
1803@subsubsection ID TOKEN METADATA
1804
1805@c TODO describe record type and give an example of how and
1806@c when to use it
1807Record type for the private metadata of an identity token (of IDENTITY-TOKEN).
1808
1809@node CREDENTIAL
1810@subsubsection CREDENTIAL
1811
1812@c TODO describe record type and give an example of how and
1813@c when to use it
1814Record type for credential.
1815
1816@node POLICY
1817@subsubsection POLICY
1818
1819@c TODO describe record type and give an example of how and
1820@c when to use it
1821Record type for policies.
1822
1823@node ATTRIBUTE
1824@subsubsection ATTRIBUTE
1825
1826@c TODO describe record type and give an example of how and
1827@c when to use it
1828Record type for reverse lookups.
1829
1830@node ABE KEY
1831@subsubsection ABE KEY
1832
1833@c TODO describe record type and give an example of how and
1834@c when to use it
1835Record type for ABE records.
1836
1837@node ABE MASTER
1838@subsubsection ABE MASTER
1839
1840@c TODO describe record type and give an example of how and
1841@c when to use it
1842Record type for ABE master keys.
1843
1844@node RECLAIM OIDC CLIENT
1845@subsubsection RECLAIM OIDC CLIENT
1846
1847@c TODO describe record type and give an example of how and
1848@c when to use it
1849Record type for reclaim OIDC clients.
1850
1851@node RECLAIM OIDC REDIRECT
1852@subsubsection RECLAIM OIDC REDIRECT
1853
1854@c TODO describe record type and give an example of how and
1855@c when to use it
1856Record type for reclaim OIDC redirect URIs.
1857
1858@node Synchronizing with legacy DNS 1761@node Synchronizing with legacy DNS
1859@subsection Synchronizing with legacy DNS 1762@subsection Synchronizing with legacy DNS
1860 1763
diff --git a/doc/handbook/images/tng.dot b/doc/handbook/images/tng.dot
new file mode 100644
index 000000000..14e72ee04
--- /dev/null
+++ b/doc/handbook/images/tng.dot
@@ -0,0 +1,55 @@
1// house = application
2// circle (default) = service
3// box = daemon
4// diamond = library
5// black line = dependency
6// blue line = extension via plugin
7// red line = possibly useful
8// dashed = in planning
9
10// this is what we have...o
11digraph tng {
12 // splines = true;
13 compound=true;
14 subgraph cluster0 {
15 label="Our peer";
16 style=dashed;
17 color=black;
18 subgraph cluster1 {
19 style=solid;
20 color=black;
21 tcp;
22 udp;
23 others [style=dotted];
24 label="Communicators";
25 }
26 subgraph cluster2 {
27 style=solid;
28 color=black;
29 dht;
30 fs;
31 cadet;
32 label="Applications";
33 }
34 cadet -> core [ltail=cluster2,label="Communicate with peers"];
35 dht -> transport [ltail=cluster2,label="Suggest connection to peer"];
36 core -> transport [label="Send/receive messages via secure channel"];
37 transport -> tcp [lhead=cluster1,dir=both,label="Offer connectivity/channel to other peer"];
38 udp -> nat [label="Get addresses"];
39 tcp -> nat;
40 }
41 subgraph cluster3 {
42 rank = sink;
43 style=dashed;
44 color=black;
45 peer3;
46 peer1;
47 peer2;
48 label="Other peers";
49 }
50
51
52 tcp -> peer1 [dir=both];
53 udp -> peer2;
54 transport->peer1 [style=invis];
55}
diff --git a/doc/handbook/images/tng.png b/doc/handbook/images/tng.png
new file mode 100644
index 000000000..3b93b77cc
--- /dev/null
+++ b/doc/handbook/images/tng.png
Binary files differ
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index a0283cf44..e7045e8bf 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -50,6 +50,7 @@ man_MANS = \
50 gnunet-arm.1 \ 50 gnunet-arm.1 \
51 gnunet-ats.1 \ 51 gnunet-ats.1 \
52 gnunet-auto-share.1 \ 52 gnunet-auto-share.1 \
53 gnunet-base32.1 \
53 gnunet-bcd.1 \ 54 gnunet-bcd.1 \
54 gnunet-bugreport.1 \ 55 gnunet-bugreport.1 \
55 gnunet-config.1 \ 56 gnunet-config.1 \
diff --git a/doc/man/gnunet-base32.1 b/doc/man/gnunet-base32.1
new file mode 100644
index 000000000..2e1224279
--- /dev/null
+++ b/doc/man/gnunet-base32.1
@@ -0,0 +1,74 @@
1.\" This file is part of GNUnet.
2.\" Copyright (C) 2021 GNUnet e.V.
3.\"
4.\" Permission is granted to copy, distribute and/or modify this document
5.\" under the terms of the GNU Free Documentation License, Version 1.3 or
6.\" any later version published by the Free Software Foundation; with no
7.\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
8.\" copy of the license is included in the file
9.\" FDL-1.3.
10.\"
11.\" A copy of the license is also available from the Free Software
12.\" Foundation Web site at http://www.gnu.org/licenses/fdl.html}.
13.\"
14.\" Alternately, this document is also available under the General
15.\" Public License, version 3 or later, as published by the Free Software
16.\" Foundation. A copy of the license is included in the file
17.\" GPL3.
18.\"
19.\" A copy of the license is also available from the Free Software
20.\" Foundation Web site at http://www.gnu.org/licenses/gpl.html
21.\"
22.\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later
23.\"
24.Dd March 5, 2021
25.Dt GNUNET-BASE32 1
26.Os
27.Sh NAME
28.Nm gnunet-base32
29.Nd encode/decode to Crockford base32 encoding
30.Sh SYNOPSIS
31.Nm
32.Op Fl d | -decode
33.sp
34.Sh DESCRIPTION
35.Nm
36By default, encodes data read from standard input into
37Crockford base32 and writes the result to standard output.
38The inverse operation is performed if the option
39.Fl --decode
40is given. Note that the tool keeps all of the data in
41memory and is largely intended for quick debugging and
42not for high performance.
43.Bl -tag -width indent
44.It Fl d | -decode
45Run in decode mode instead of in encode mode.
46.It Fl h | -help
47Print short help on options.
48.It Fl v | -version
49Print GNUnet version number.
50.El
51.Sh SEE ALSO
52The full documentation for gnunet is maintained as a Texinfo manual.
53If the
54.Xr info 1
55and gnunet programs are properly installed at your site, the command
56.Pp
57.Dl info gnunet
58.Pp
59should give you access to the complete handbook,
60.Pp
61.Dl info gnunet-c-tutorial
62.Pp
63will give you access to a tutorial for developers.
64.sp
65Depending on your installation, this information is also available in
66.Xr gnunet 7 and
67.Xr gnunet-c-tutorial 7 .
68.\".Sh HISTORY
69.\".Sh AUTHORS
70.Sh BUGS
71Report bugs by using
72.Lk https://bugs.gnunet.org
73or by sending electronic mail to
74.Aq Mt gnunet-developers@gnu.org .
diff --git a/doc/tutorial/Makefile.am b/doc/tutorial/Makefile.am
index d0307ecb5..afe4aa6c0 100644
--- a/doc/tutorial/Makefile.am
+++ b/doc/tutorial/Makefile.am
@@ -1,25 +1,8 @@
1# This Makefile.am is in the public domain 1# This Makefile.am is in the public domain
2docdir = $(datadir)/doc/gnunet/ 2docdir = $(datadir)/doc/gnunet/
3 3
4if ACTIVATE_TEXINFO4 4AM_MAKEINFOHTMLFLAGS = $(TEXINFO_HTMLFLAGS)
5# NOTE: While GNU makeinfo 6.5 supports --css-ref=URL, 5
6# makeinfo 4.8 (in NetBSD 8.0, macOS, and maybe other
7# base) does only support --css-include=FILE.
8# The only difference is a shorter html output and
9# in 6.5 the ability to use refs instead of include.
10# We prefer not to break builds in this case, so
11# we use the include version which is backwards compatible
12# and upwards compatible, while the ref variant is neither.
13AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css
14else
15# In the 5.x version they added `--split=chapters|sections` in
16# addition to `--split=nodes`.
17# Hold on to your hats: In version 6.5 this is already removed, ffs.
18# GNU Texinfo, please be more consistent than 1 version in switches.
19# This however is compatible to version 5.2. Thanks, I hate it.
20# AM_MAKEINFOHTMLFLAGS = --split=sections --css-ref="../style.css" --css-ref="../manual.css"
21AM_MAKEINFOHTMLFLAGS = --split --css-ref="../style.css" --css-ref="../manual.css"
22endif
23 6
24gnunet_tutorial_examples = \ 7gnunet_tutorial_examples = \
25 examples/001.c \ 8 examples/001.c \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9dcfb81cf..51ada43b3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,13 +10,21 @@ src/arm/arm_monitor_api.c
10src/arm/gnunet-arm.c 10src/arm/gnunet-arm.c
11src/arm/gnunet-service-arm.c 11src/arm/gnunet-service-arm.c
12src/arm/mockup-service.c 12src/arm/mockup-service.c
13src/ats-tests/ats-testing-experiment.c
14src/ats-tests/ats-testing-log.c
15src/ats-tests/ats-testing-preferences.c
16src/ats-tests/ats-testing-traffic.c
17src/ats-tests/ats-testing.c
18src/ats-tests/gnunet-ats-sim.c
19src/ats-tests/gnunet-solver-eval.c
20src/ats-tool/gnunet-ats.c
13src/ats/ats_api_connectivity.c 21src/ats/ats_api_connectivity.c
14src/ats/ats_api_performance.c 22src/ats/ats_api_performance.c
15src/ats/ats_api_scanner.c 23src/ats/ats_api_scanner.c
16src/ats/ats_api_scheduling.c 24src/ats/ats_api_scheduling.c
17src/ats/gnunet-ats-solver-eval.c 25src/ats/gnunet-ats-solver-eval.c
18src/ats/gnunet-service-ats_addresses.c
19src/ats/gnunet-service-ats.c 26src/ats/gnunet-service-ats.c
27src/ats/gnunet-service-ats_addresses.c
20src/ats/gnunet-service-ats_connectivity.c 28src/ats/gnunet-service-ats_connectivity.c
21src/ats/gnunet-service-ats_normalization.c 29src/ats/gnunet-service-ats_normalization.c
22src/ats/gnunet-service-ats_performance.c 30src/ats/gnunet-service-ats_performance.c
@@ -25,14 +33,6 @@ src/ats/gnunet-service-ats_preferences.c
25src/ats/gnunet-service-ats_reservations.c 33src/ats/gnunet-service-ats_reservations.c
26src/ats/gnunet-service-ats_scheduling.c 34src/ats/gnunet-service-ats_scheduling.c
27src/ats/plugin_ats_proportional.c 35src/ats/plugin_ats_proportional.c
28src/ats-tests/ats-testing.c
29src/ats-tests/ats-testing-experiment.c
30src/ats-tests/ats-testing-log.c
31src/ats-tests/ats-testing-preferences.c
32src/ats-tests/ats-testing-traffic.c
33src/ats-tests/gnunet-ats-sim.c
34src/ats-tests/gnunet-solver-eval.c
35src/ats-tool/gnunet-ats.c
36src/auction/gnunet-auction-create.c 36src/auction/gnunet-auction-create.c
37src/auction/gnunet-auction-info.c 37src/auction/gnunet-auction-info.c
38src/auction/gnunet-auction-join.c 38src/auction/gnunet-auction-join.c
@@ -50,8 +50,8 @@ src/cadet/cadet_api_list_peers.c
50src/cadet/cadet_api_list_tunnels.c 50src/cadet/cadet_api_list_tunnels.c
51src/cadet/cadet_test_lib.c 51src/cadet/cadet_test_lib.c
52src/cadet/desirability_table.c 52src/cadet/desirability_table.c
53src/cadet/gnunet-cadet.c
54src/cadet/gnunet-cadet-profiler.c 53src/cadet/gnunet-cadet-profiler.c
54src/cadet/gnunet-cadet.c
55src/cadet/gnunet-service-cadet.c 55src/cadet/gnunet-service-cadet.c
56src/cadet/gnunet-service-cadet_channel.c 56src/cadet/gnunet-service-cadet_channel.c
57src/cadet/gnunet-service-cadet_connection.c 57src/cadet/gnunet-service-cadet_connection.c
@@ -67,15 +67,15 @@ src/consensus/gnunet-service-consensus.c
67src/consensus/plugin_block_consensus.c 67src/consensus/plugin_block_consensus.c
68src/conversation/conversation_api.c 68src/conversation/conversation_api.c
69src/conversation/conversation_api_call.c 69src/conversation/conversation_api_call.c
70src/conversation/gnunet-conversation.c
71src/conversation/gnunet-conversation-test.c 70src/conversation/gnunet-conversation-test.c
72src/conversation/gnunet_gst.c 71src/conversation/gnunet-conversation.c
73src/conversation/gnunet_gst_test.c
74src/conversation/gnunet-helper-audio-playback.c
75src/conversation/gnunet-helper-audio-playback-gst.c 72src/conversation/gnunet-helper-audio-playback-gst.c
76src/conversation/gnunet-helper-audio-record.c 73src/conversation/gnunet-helper-audio-playback.c
77src/conversation/gnunet-helper-audio-record-gst.c 74src/conversation/gnunet-helper-audio-record-gst.c
75src/conversation/gnunet-helper-audio-record.c
78src/conversation/gnunet-service-conversation.c 76src/conversation/gnunet-service-conversation.c
77src/conversation/gnunet_gst.c
78src/conversation/gnunet_gst_test.c
79src/conversation/microphone.c 79src/conversation/microphone.c
80src/conversation/plugin_gnsrecord_conversation.c 80src/conversation/plugin_gnsrecord_conversation.c
81src/conversation/speaker.c 81src/conversation/speaker.c
@@ -105,7 +105,6 @@ src/dht/dht_api.c
105src/dht/dht_test_lib.c 105src/dht/dht_test_lib.c
106src/dht/gnunet-dht-get.c 106src/dht/gnunet-dht-get.c
107src/dht/gnunet-dht-monitor.c 107src/dht/gnunet-dht-monitor.c
108src/dht/gnunet_dht_profiler.c
109src/dht/gnunet-dht-put.c 108src/dht/gnunet-dht-put.c
110src/dht/gnunet-service-dht.c 109src/dht/gnunet-service-dht.c
111src/dht/gnunet-service-dht_clients.c 110src/dht/gnunet-service-dht_clients.c
@@ -114,6 +113,7 @@ src/dht/gnunet-service-dht_hello.c
114src/dht/gnunet-service-dht_neighbours.c 113src/dht/gnunet-service-dht_neighbours.c
115src/dht/gnunet-service-dht_nse.c 114src/dht/gnunet-service-dht_nse.c
116src/dht/gnunet-service-dht_routing.c 115src/dht/gnunet-service-dht_routing.c
116src/dht/gnunet_dht_profiler.c
117src/dht/plugin_block_dht.c 117src/dht/plugin_block_dht.c
118src/dns/dns_api.c 118src/dns/dns_api.c
119src/dns/gnunet-dns-monitor.c 119src/dns/gnunet-dns-monitor.c
@@ -148,8 +148,8 @@ src/fs/gnunet-auto-share.c
148src/fs/gnunet-daemon-fsprofiler.c 148src/fs/gnunet-daemon-fsprofiler.c
149src/fs/gnunet-directory.c 149src/fs/gnunet-directory.c
150src/fs/gnunet-download.c 150src/fs/gnunet-download.c
151src/fs/gnunet-fs.c
152src/fs/gnunet-fs-profiler.c 151src/fs/gnunet-fs-profiler.c
152src/fs/gnunet-fs.c
153src/fs/gnunet-helper-fs-publish.c 153src/fs/gnunet-helper-fs-publish.c
154src/fs/gnunet-publish.c 154src/fs/gnunet-publish.c
155src/fs/gnunet-search.c 155src/fs/gnunet-search.c
@@ -169,9 +169,9 @@ src/gns/gns_tld_api.c
169src/gns/gnunet-bcd.c 169src/gns/gnunet-bcd.c
170src/gns/gnunet-dns2gns.c 170src/gns/gnunet-dns2gns.c
171src/gns/gnunet-gns-benchmark.c 171src/gns/gnunet-gns-benchmark.c
172src/gns/gnunet-gns.c
173src/gns/gnunet-gns-import.c 172src/gns/gnunet-gns-import.c
174src/gns/gnunet-gns-proxy.c 173src/gns/gnunet-gns-proxy.c
174src/gns/gnunet-gns.c
175src/gns/gnunet-service-gns.c 175src/gns/gnunet-service-gns.c
176src/gns/gnunet-service-gns_interceptor.c 176src/gns/gnunet-service-gns_interceptor.c
177src/gns/gnunet-service-gns_resolver.c 177src/gns/gnunet-service-gns_resolver.c
@@ -189,8 +189,8 @@ src/gnsrecord/json_gnsrecord.c
189src/gnsrecord/plugin_gnsrecord_dns.c 189src/gnsrecord/plugin_gnsrecord_dns.c
190src/hello/address.c 190src/hello/address.c
191src/hello/gnunet-hello.c 191src/hello/gnunet-hello.c
192src/hello/hello.c
193src/hello/hello-ng.c 192src/hello/hello-ng.c
193src/hello/hello.c
194src/hostlist/gnunet-daemon-hostlist.c 194src/hostlist/gnunet-daemon-hostlist.c
195src/hostlist/gnunet-daemon-hostlist_client.c 195src/hostlist/gnunet-daemon-hostlist_client.c
196src/hostlist/gnunet-daemon-hostlist_server.c 196src/hostlist/gnunet-daemon-hostlist_server.c
@@ -205,8 +205,8 @@ src/json/json_generator.c
205src/json/json_helper.c 205src/json/json_helper.c
206src/json/json_mhd.c 206src/json/json_mhd.c
207src/messenger/gnunet-messenger.c 207src/messenger/gnunet-messenger.c
208src/messenger/gnunet-service-messenger_basement.c
209src/messenger/gnunet-service-messenger.c 208src/messenger/gnunet-service-messenger.c
209src/messenger/gnunet-service-messenger_basement.c
210src/messenger/gnunet-service-messenger_contact.c 210src/messenger/gnunet-service-messenger_contact.c
211src/messenger/gnunet-service-messenger_handle.c 211src/messenger/gnunet-service-messenger_handle.c
212src/messenger/gnunet-service-messenger_list_handles.c 212src/messenger/gnunet-service-messenger_list_handles.c
@@ -236,8 +236,8 @@ src/namecache/namecache_api.c
236src/namecache/plugin_namecache_flat.c 236src/namecache/plugin_namecache_flat.c
237src/namecache/plugin_namecache_postgres.c 237src/namecache/plugin_namecache_postgres.c
238src/namecache/plugin_namecache_sqlite.c 238src/namecache/plugin_namecache_sqlite.c
239src/namestore/gnunet-namestore.c
240src/namestore/gnunet-namestore-fcfsd.c 239src/namestore/gnunet-namestore-fcfsd.c
240src/namestore/gnunet-namestore.c
241src/namestore/gnunet-service-namestore.c 241src/namestore/gnunet-service-namestore.c
242src/namestore/gnunet-zoneimport.c 242src/namestore/gnunet-zoneimport.c
243src/namestore/namestore_api.c 243src/namestore/namestore_api.c
@@ -263,17 +263,17 @@ src/nat/gnunet-service-nat_mini.c
263src/nat/gnunet-service-nat_stun.c 263src/nat/gnunet-service-nat_stun.c
264src/nat/nat_api.c 264src/nat/nat_api.c
265src/nat/nat_api_stun.c 265src/nat/nat_api_stun.c
266src/nse/gnunet-nse.c
267src/nse/gnunet-nse-profiler.c 266src/nse/gnunet-nse-profiler.c
267src/nse/gnunet-nse.c
268src/nse/gnunet-service-nse.c 268src/nse/gnunet-service-nse.c
269src/nse/nse_api.c 269src/nse/nse_api.c
270src/nt/nt.c 270src/nt/nt.c
271src/peerinfo/gnunet-service-peerinfo.c
272src/peerinfo/peerinfo_api.c
273src/peerinfo/peerinfo_api_notify.c
274src/peerinfo-tool/gnunet-peerinfo.c 271src/peerinfo-tool/gnunet-peerinfo.c
275src/peerinfo-tool/gnunet-peerinfo_plugins.c 272src/peerinfo-tool/gnunet-peerinfo_plugins.c
276src/peerinfo-tool/plugin_rest_peerinfo.c 273src/peerinfo-tool/plugin_rest_peerinfo.c
274src/peerinfo/gnunet-service-peerinfo.c
275src/peerinfo/peerinfo_api.c
276src/peerinfo/peerinfo_api_notify.c
277src/peerstore/gnunet-peerstore.c 277src/peerstore/gnunet-peerstore.c
278src/peerstore/gnunet-service-peerstore.c 278src/peerstore/gnunet-service-peerstore.c
279src/peerstore/peerstore_api.c 279src/peerstore/peerstore_api.c
@@ -319,27 +319,27 @@ src/rest/gnunet-rest-server.c
319src/rest/plugin_rest_config.c 319src/rest/plugin_rest_config.c
320src/rest/plugin_rest_copying.c 320src/rest/plugin_rest_copying.c
321src/rest/rest.c 321src/rest/rest.c
322src/revocation/gnunet-revocation.c
323src/revocation/gnunet-revocation-tvg.c 322src/revocation/gnunet-revocation-tvg.c
323src/revocation/gnunet-revocation.c
324src/revocation/gnunet-service-revocation.c 324src/revocation/gnunet-service-revocation.c
325src/revocation/plugin_block_revocation.c 325src/revocation/plugin_block_revocation.c
326src/revocation/revocation_api.c 326src/revocation/revocation_api.c
327src/rps/gnunet-rps.c
328src/rps/gnunet-rps-profiler.c 327src/rps/gnunet-rps-profiler.c
328src/rps/gnunet-rps.c
329src/rps/gnunet-service-rps.c 329src/rps/gnunet-service-rps.c
330src/rps/gnunet-service-rps_custommap.c 330src/rps/gnunet-service-rps_custommap.c
331src/rps/gnunet-service-rps_sampler.c 331src/rps/gnunet-service-rps_sampler.c
332src/rps/gnunet-service-rps_sampler_elem.c 332src/rps/gnunet-service-rps_sampler_elem.c
333src/rps/gnunet-service-rps_view.c 333src/rps/gnunet-service-rps_view.c
334src/rps/rps_api.c
335src/rps/rps-sampler_client.c 334src/rps/rps-sampler_client.c
336src/rps/rps-sampler_common.c 335src/rps/rps-sampler_common.c
337src/rps/rps-test_util.c 336src/rps/rps-test_util.c
337src/rps/rps_api.c
338src/scalarproduct/gnunet-scalarproduct.c 338src/scalarproduct/gnunet-scalarproduct.c
339src/scalarproduct/gnunet-service-scalarproduct_alice.c
340src/scalarproduct/gnunet-service-scalarproduct_bob.c
341src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c 339src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
342src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c 340src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
341src/scalarproduct/gnunet-service-scalarproduct_alice.c
342src/scalarproduct/gnunet-service-scalarproduct_bob.c
343src/scalarproduct/scalarproduct_api.c 343src/scalarproduct/scalarproduct_api.c
344src/secretsharing/gnunet-secretsharing-profiler.c 344src/secretsharing/gnunet-secretsharing-profiler.c
345src/secretsharing/gnunet-service-secretsharing.c 345src/secretsharing/gnunet-service-secretsharing.c
@@ -353,12 +353,12 @@ src/set/gnunet-set-ibf-profiler.c
353src/set/gnunet-set-profiler.c 353src/set/gnunet-set-profiler.c
354src/set/ibf.c 354src/set/ibf.c
355src/set/ibf_sim.c 355src/set/ibf_sim.c
356src/set/plugin_block_set_test.c
357src/set/set_api.c
356src/seti/gnunet-service-seti.c 358src/seti/gnunet-service-seti.c
357src/seti/gnunet-seti-profiler.c 359src/seti/gnunet-seti-profiler.c
358src/seti/plugin_block_seti_test.c 360src/seti/plugin_block_seti_test.c
359src/seti/seti_api.c 361src/seti/seti_api.c
360src/set/plugin_block_set_test.c
361src/set/set_api.c
362src/setu/gnunet-service-setu.c 362src/setu/gnunet-service-setu.c
363src/setu/gnunet-service-setu_strata_estimator.c 363src/setu/gnunet-service-setu_strata_estimator.c
364src/setu/gnunet-setu-ibf-profiler.c 364src/setu/gnunet-setu-ibf-profiler.c
@@ -377,15 +377,16 @@ src/statistics/gnunet-statistics.c
377src/statistics/statistics_api.c 377src/statistics/statistics_api.c
378src/template/gnunet-service-template.c 378src/template/gnunet-service-template.c
379src/template/gnunet-template.c 379src/template/gnunet-template.c
380src/testbed-logger/gnunet-service-testbed-logger.c
381src/testbed-logger/testbed_logger_api.c
380src/testbed/generate-underlay-topology.c 382src/testbed/generate-underlay-topology.c
381src/testbed/gnunet-daemon-latency-logger.c 383src/testbed/gnunet-daemon-latency-logger.c
382src/testbed/gnunet-daemon-testbed-blacklist.c 384src/testbed/gnunet-daemon-testbed-blacklist.c
383src/testbed/gnunet-daemon-testbed-underlay.c 385src/testbed/gnunet-daemon-testbed-underlay.c
384src/testbed/gnunet-helper-testbed.c 386src/testbed/gnunet-helper-testbed.c
385src/testbed/gnunet_mpi_test.c
386src/testbed/gnunet-service-test-barriers.c 387src/testbed/gnunet-service-test-barriers.c
387src/testbed/gnunet-service-testbed_barriers.c
388src/testbed/gnunet-service-testbed.c 388src/testbed/gnunet-service-testbed.c
389src/testbed/gnunet-service-testbed_barriers.c
389src/testbed/gnunet-service-testbed_cache.c 390src/testbed/gnunet-service-testbed_cache.c
390src/testbed/gnunet-service-testbed_connectionpool.c 391src/testbed/gnunet-service-testbed_connectionpool.c
391src/testbed/gnunet-service-testbed_cpustatus.c 392src/testbed/gnunet-service-testbed_cpustatus.c
@@ -393,20 +394,19 @@ src/testbed/gnunet-service-testbed_links.c
393src/testbed/gnunet-service-testbed_meminfo.c 394src/testbed/gnunet-service-testbed_meminfo.c
394src/testbed/gnunet-service-testbed_oc.c 395src/testbed/gnunet-service-testbed_oc.c
395src/testbed/gnunet-service-testbed_peers.c 396src/testbed/gnunet-service-testbed_peers.c
396src/testbed/gnunet_testbed_mpi_spawn.c
397src/testbed/gnunet-testbed-profiler.c 397src/testbed/gnunet-testbed-profiler.c
398src/testbed-logger/gnunet-service-testbed-logger.c 398src/testbed/gnunet_mpi_test.c
399src/testbed-logger/testbed_logger_api.c 399src/testbed/gnunet_testbed_mpi_spawn.c
400src/testbed/testbed_api_barriers.c
401src/testbed/testbed_api.c 400src/testbed/testbed_api.c
401src/testbed/testbed_api_barriers.c
402src/testbed/testbed_api_hosts.c 402src/testbed/testbed_api_hosts.c
403src/testbed/testbed_api_operations.c 403src/testbed/testbed_api_operations.c
404src/testbed/testbed_api_peers.c 404src/testbed/testbed_api_peers.c
405src/testbed/testbed_api_sd.c 405src/testbed/testbed_api_sd.c
406src/testbed/testbed_api_services.c 406src/testbed/testbed_api_services.c
407src/testbed/testbed_api_statistics.c 407src/testbed/testbed_api_statistics.c
408src/testbed/testbed_api_testbed.c
409src/testbed/testbed_api_test.c 408src/testbed/testbed_api_test.c
409src/testbed/testbed_api_testbed.c
410src/testbed/testbed_api_topology.c 410src/testbed/testbed_api_topology.c
411src/testbed/testbed_api_underlay.c 411src/testbed/testbed_api_underlay.c
412src/testing/gnunet-testing.c 412src/testing/gnunet-testing.c
@@ -418,34 +418,45 @@ src/transport/gnunet-communicator-tcp.c
418src/transport/gnunet-communicator-udp.c 418src/transport/gnunet-communicator-udp.c
419src/transport/gnunet-communicator-unix.c 419src/transport/gnunet-communicator-unix.c
420src/transport/gnunet-helper-transport-bluetooth.c 420src/transport/gnunet-helper-transport-bluetooth.c
421src/transport/gnunet-helper-transport-wlan.c
422src/transport/gnunet-helper-transport-wlan-dummy.c 421src/transport/gnunet-helper-transport-wlan-dummy.c
422src/transport/gnunet-helper-transport-wlan.c
423src/transport/gnunet-service-tng.c 423src/transport/gnunet-service-tng.c
424src/transport/gnunet-service-transport_ats.c
425src/transport/gnunet-service-transport.c 424src/transport/gnunet-service-transport.c
425src/transport/gnunet-service-transport_ats.c
426src/transport/gnunet-service-transport_hello.c 426src/transport/gnunet-service-transport_hello.c
427src/transport/gnunet-service-transport_manipulation.c 427src/transport/gnunet-service-transport_manipulation.c
428src/transport/gnunet-service-transport_neighbours.c 428src/transport/gnunet-service-transport_neighbours.c
429src/transport/gnunet-service-transport_plugins.c 429src/transport/gnunet-service-transport_plugins.c
430src/transport/gnunet-service-transport_validation.c 430src/transport/gnunet-service-transport_validation.c
431src/transport/gnunet-transport.c
432src/transport/gnunet-transport-profiler.c 431src/transport/gnunet-transport-profiler.c
433src/transport/gnunet-transport-wlan-receiver.c 432src/transport/gnunet-transport-wlan-receiver.c
434src/transport/gnunet-transport-wlan-sender.c 433src/transport/gnunet-transport-wlan-sender.c
434src/transport/gnunet-transport.c
435src/transport/plugin_transport_http_client.c 435src/transport/plugin_transport_http_client.c
436src/transport/plugin_transport_http_common.c 436src/transport/plugin_transport_http_common.c
437src/transport/plugin_transport_http_server.c 437src/transport/plugin_transport_http_server.c
438src/transport/plugin_transport_smtp.c 438src/transport/plugin_transport_smtp.c
439src/transport/plugin_transport_tcp.c 439src/transport/plugin_transport_tcp.c
440src/transport/plugin_transport_template.c 440src/transport/plugin_transport_template.c
441src/transport/plugin_transport_udp_broadcasting.c
442src/transport/plugin_transport_udp.c 441src/transport/plugin_transport_udp.c
442src/transport/plugin_transport_udp_broadcasting.c
443src/transport/plugin_transport_unix.c 443src/transport/plugin_transport_unix.c
444src/transport/plugin_transport_wlan.c 444src/transport/plugin_transport_wlan.c
445src/transport/tcp_connection_legacy.c 445src/transport/tcp_connection_legacy.c
446src/transport/tcp_server_legacy.c 446src/transport/tcp_server_legacy.c
447src/transport/tcp_server_mst_legacy.c 447src/transport/tcp_server_mst_legacy.c
448src/transport/tcp_service_legacy.c 448src/transport/tcp_service_legacy.c
449src/transport/transport-testing-communicator.c
450src/transport/transport-testing-filenames.c
451src/transport/transport-testing-filenames2.c
452src/transport/transport-testing-loggers.c
453src/transport/transport-testing-loggers2.c
454src/transport/transport-testing-main.c
455src/transport/transport-testing-main2.c
456src/transport/transport-testing-send.c
457src/transport/transport-testing-send2.c
458src/transport/transport-testing.c
459src/transport/transport-testing2.c
449src/transport/transport_api2_application.c 460src/transport/transport_api2_application.c
450src/transport/transport_api2_communication.c 461src/transport/transport_api2_communication.c
451src/transport/transport_api2_core.c 462src/transport/transport_api2_core.c
@@ -458,17 +469,6 @@ src/transport/transport_api_manipulation.c
458src/transport/transport_api_monitor_peers.c 469src/transport/transport_api_monitor_peers.c
459src/transport/transport_api_monitor_plugins.c 470src/transport/transport_api_monitor_plugins.c
460src/transport/transport_api_offer_hello.c 471src/transport/transport_api_offer_hello.c
461src/transport/transport-testing2.c
462src/transport/transport-testing.c
463src/transport/transport-testing-communicator.c
464src/transport/transport-testing-filenames2.c
465src/transport/transport-testing-filenames.c
466src/transport/transport-testing-loggers2.c
467src/transport/transport-testing-loggers.c
468src/transport/transport-testing-main2.c
469src/transport/transport-testing-main.c
470src/transport/transport-testing-send2.c
471src/transport/transport-testing-send.c
472src/util/bandwidth.c 472src/util/bandwidth.c
473src/util/benchmark.c 473src/util/benchmark.c
474src/util/bio.c 474src/util/bio.c
@@ -483,8 +483,8 @@ src/util/consttime_memcmp.c
483src/util/container_bloomfilter.c 483src/util/container_bloomfilter.c
484src/util/container_heap.c 484src/util/container_heap.c
485src/util/container_meta_data.c 485src/util/container_meta_data.c
486src/util/container_multihashmap32.c
487src/util/container_multihashmap.c 486src/util/container_multihashmap.c
487src/util/container_multihashmap32.c
488src/util/container_multipeermap.c 488src/util/container_multipeermap.c
489src/util/container_multishortmap.c 489src/util/container_multishortmap.c
490src/util/container_multiuuidmap.c 490src/util/container_multiuuidmap.c
@@ -508,8 +508,8 @@ src/util/dnsparser.c
508src/util/dnsstub.c 508src/util/dnsstub.c
509src/util/getopt.c 509src/util/getopt.c
510src/util/getopt_helpers.c 510src/util/getopt_helpers.c
511src/util/gnunet-config.c
512src/util/gnunet-config-diff.c 511src/util/gnunet-config-diff.c
512src/util/gnunet-config.c
513src/util/gnunet-crypto-tvg.c 513src/util/gnunet-crypto-tvg.c
514src/util/gnunet-ecc.c 514src/util/gnunet-ecc.c
515src/util/gnunet-qr.c 515src/util/gnunet-qr.c
@@ -547,8 +547,8 @@ src/vpn/gnunet-helper-vpn.c
547src/vpn/gnunet-service-vpn.c 547src/vpn/gnunet-service-vpn.c
548src/vpn/gnunet-vpn.c 548src/vpn/gnunet-vpn.c
549src/vpn/vpn_api.c 549src/vpn/vpn_api.c
550src/zonemaster/gnunet-service-zonemaster.c
551src/zonemaster/gnunet-service-zonemaster-monitor.c 550src/zonemaster/gnunet-service-zonemaster-monitor.c
551src/zonemaster/gnunet-service-zonemaster.c
552src/fs/fs_api.h 552src/fs/fs_api.h
553src/testbed/testbed_api.h 553src/testbed/testbed_api.h
554src/testbed/testbed_api_operations.h 554src/testbed/testbed_api_operations.h
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 39a67acc4..048ae00a2 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -53,6 +53,7 @@ gnunetinclude_HEADERS = \
53 gnunet_gnsrecord_lib.h \ 53 gnunet_gnsrecord_lib.h \
54 gnunet_gnsrecord_json_lib.h \ 54 gnunet_gnsrecord_json_lib.h \
55 gnunet_gnsrecord_plugin.h \ 55 gnunet_gnsrecord_plugin.h \
56 gnu_name_system_record_types.h \
56 gnunet_hello_lib.h \ 57 gnunet_hello_lib.h \
57 gnunet_helper_lib.h \ 58 gnunet_helper_lib.h \
58 gnunet_identity_service.h \ 59 gnunet_identity_service.h \
diff --git a/src/include/gnu_name_system_record_types.h b/src/include/gnu_name_system_record_types.h
new file mode 100644
index 000000000..b2cf45dc8
--- /dev/null
+++ b/src/include/gnu_name_system_record_types.h
@@ -0,0 +1,138 @@
1/*
2 This file is part of GNUnet
3 Copyright (C) 2012-2021 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20#ifndef GNU_NAME_SYSTEM_RECORD_TYPES_H
21#define GNU_NAME_SYSTEM_RECORD_TYPES_H
22
23/**
24 * WARNING:
25 * This header is generated!
26 * In order to add GNS record types, you must register
27 * them in GANA, and then use the header generation script
28 * to create an update of this file. You may then replace this
29 * file with the update.
30 */
31
32#ifdef __cplusplus
33extern "C" {
34#if 0 /* keep Emacsens' auto-indent happy */
35}
36#endif
37#endif
38
39
40/**
41 * GNS zone transfer
42 */
43#define GNUNET_GNSRECORD_TYPE_PKEY 65536
44
45/**
46 * GNS nick names
47 */
48#define GNUNET_GNSRECORD_TYPE_NICK 65537
49
50/**
51 * legacy hostnames
52 */
53#define GNUNET_GNSRECORD_TYPE_LEHO 65538
54
55/**
56 * VPN resolution
57 */
58#define GNUNET_GNSRECORD_TYPE_VPN 65539
59
60/**
61 * Delegation to DNS
62 */
63#define GNUNET_GNSRECORD_TYPE_GNS2DNS 65540
64
65/**
66 * Boxed records (see TLSA/SRV handling in GNS)
67 */
68#define GNUNET_GNSRECORD_TYPE_BOX 65541
69
70/**
71 * social place for SecuShare
72 */
73#define GNUNET_GNSRECORD_TYPE_PLACE 65542
74
75/**
76 * Endpoint for conversation
77 */
78#define GNUNET_GNSRECORD_TYPE_PHONE 65543
79
80/**
81 * identity attribute
82 */
83#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE 65544
84
85/**
86 * local ticket reference
87 */
88#define GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET 65545
89
90/**
91 * For ABD policies
92 */
93#define GNUNET_GNSRECORD_TYPE_DELEGATE 65548
94
95/**
96 * For ABD reverse lookups
97 */
98#define GNUNET_GNSRECORD_TYPE_ATTRIBUTE 65549
99
100/**
101 * for reclaim records
102 */
103#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF 65550
104
105/**
106 * For reclaim OIDC client names.
107 */
108#define GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT 65552
109
110/**
111 * Used reclaimID OIDC client redirect URIs.
112 */
113#define GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT 65553
114
115/**
116 * Record type for an attribute attestation (e.g. JWT).
117 */
118#define GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL 65554
119
120/**
121 * Record type for a presentation of a credential.
122 */
123#define GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION 65555
124
125/**
126 * Record type for EDKEY zone delegations.
127 */
128#define GNUNET_GNSRECORD_TYPE_EDKEY 65556
129
130
131#if 0 /* keep Emacsens' auto-indent happy */
132{
133#endif
134#ifdef __cplusplus
135}
136#endif
137
138#endif
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h
index 0bf2ceed7..aff56146e 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -55,109 +55,9 @@ extern "C" {
55#define GNUNET_GNSRECORD_TYPE_ANY 0 55#define GNUNET_GNSRECORD_TYPE_ANY 0
56 56
57/** 57/**
58 * Record type for GNS zone transfer ("PKEY"). 58 * Include the record types generated from GANA
59 */ 59 */
60#define GNUNET_GNSRECORD_TYPE_PKEY GNUNET_IDENTITY_TYPE_ECDSA 60#include "gnu_name_system_record_types.h"
61
62/**
63 * Record type for GNS nick names ("NICK").
64 */
65#define GNUNET_GNSRECORD_TYPE_NICK 65537
66
67/**
68 * Record type for GNS legacy hostnames ("LEHO").
69 */
70#define GNUNET_GNSRECORD_TYPE_LEHO 65538
71
72/**
73 * Record type for VPN resolution
74 */
75#define GNUNET_GNSRECORD_TYPE_VPN 65539
76
77/**
78 * Record type for delegation to DNS.
79 */
80#define GNUNET_GNSRECORD_TYPE_GNS2DNS 65540
81
82/**
83 * Record type for a boxed record (see TLSA/SRV handling in GNS).
84 */
85#define GNUNET_GNSRECORD_TYPE_BOX 65541
86
87/**
88 * Record type for a social place.
89 */
90#define GNUNET_GNSRECORD_TYPE_PLACE 65542
91
92/**
93 * Record type for a phone (of CONVERSATION).
94 */
95#define GNUNET_GNSRECORD_TYPE_PHONE 65543
96
97/**
98 * Record type for identity attributes (of RECLAIM).
99 */
100#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE 65544
101
102/**
103 * Record type for local ticket references
104 */
105#define GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET 65545
106
107/**
108 * 65546 reserved
109 */
110
111/**
112 * 65547 deleted, free to use
113 */
114
115/**
116 * Record type for policies
117 */
118#define GNUNET_GNSRECORD_TYPE_DELEGATE 65548
119
120/**
121 * Record type for reverse lookups
122 */
123#define GNUNET_GNSRECORD_TYPE_ATTRIBUTE 65549
124
125/**
126 * Record type for reclaim records
127 */
128#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF 65550
129
130/**
131 * Record type for RECLAIM master
132 */
133#define GNUNET_GNSRECORD_TYPE_RECLAIM_MASTER 65551
134
135/**
136 * Record type for reclaim OIDC clients
137 */
138#define GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT 65552
139
140/**
141 * Record type for reclaim OIDC redirect URIs
142 */
143#define GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT 65553
144
145/**
146 * Record type for an attribute attestation
147 */
148#define GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL 65554
149
150/**
151 * Record type for a presentation of a credential (used
152 * in a ticket record set)
153 */
154#define GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION 65555
155
156/**
157 * Record type for EDKEY delegations.
158 */
159#define GNUNET_GNSRECORD_TYPE_EDKEY GNUNET_IDENTITY_TYPE_EDDSA
160
161 61
162/** 62/**
163 * Flags that can be set for a record. 63 * Flags that can be set for a record.
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c
index c92e4d3f0..959d088f9 100644
--- a/src/peerstore/gnunet-service-peerstore.c
+++ b/src/peerstore/gnunet-service-peerstore.c
@@ -77,6 +77,8 @@ static unsigned int num_clients;
77static void 77static void
78do_shutdown () 78do_shutdown ()
79{ 79{
80 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
81 "Shutting down peerstore, bye.\n");
80 if (NULL != db_lib_name) 82 if (NULL != db_lib_name)
81 { 83 {
82 GNUNET_break (NULL == GNUNET_PLUGIN_unload (db_lib_name, db)); 84 GNUNET_break (NULL == GNUNET_PLUGIN_unload (db_lib_name, db));
@@ -105,6 +107,8 @@ do_shutdown ()
105static void 107static void
106shutdown_task (void *cls) 108shutdown_task (void *cls)
107{ 109{
110 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
111 "Priming PEERSTORE for shutdown.\n");
108 in_shutdown = GNUNET_YES; 112 in_shutdown = GNUNET_YES;
109 if (0 == num_clients) /* Only when no connected clients. */ 113 if (0 == num_clients) /* Only when no connected clients. */
110 do_shutdown (); 114 do_shutdown ();
@@ -176,6 +180,8 @@ client_connect_cb (void *cls,
176 struct GNUNET_MQ_Handle *mq) 180 struct GNUNET_MQ_Handle *mq)
177{ 181{
178 num_clients++; 182 num_clients++;
183 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
184 "A client connected (now %u)\n", num_clients);
179 return client; 185 return client;
180} 186}
181 187
@@ -195,7 +201,7 @@ client_disconnect_it (void *cls, const struct GNUNET_HashCode *key, void *value)
195 { 201 {
196 GNUNET_assert (GNUNET_YES == 202 GNUNET_assert (GNUNET_YES ==
197 GNUNET_CONTAINER_multihashmap_remove (watchers, key, value)); 203 GNUNET_CONTAINER_multihashmap_remove (watchers, key, value));
198 num_clients++; 204 num_clients++; /* Watchers do not count */
199 } 205 }
200 return GNUNET_OK; 206 return GNUNET_OK;
201} 207}
@@ -212,12 +218,14 @@ client_disconnect_cb (void *cls,
212 struct GNUNET_SERVICE_Client *client, 218 struct GNUNET_SERVICE_Client *client,
213 void *app_cls) 219 void *app_cls)
214{ 220{
215 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "A client disconnected, cleaning up.\n"); 221 num_clients--;
216 if (NULL != watchers) 222 if (NULL != watchers)
217 GNUNET_CONTAINER_multihashmap_iterate (watchers, 223 GNUNET_CONTAINER_multihashmap_iterate (watchers,
218 &client_disconnect_it, 224 &client_disconnect_it,
219 client); 225 client);
220 num_clients--; 226 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
227 "A client disconnected (%u remaining).\n",
228 num_clients);
221 if ((0 == num_clients) && in_shutdown) 229 if ((0 == num_clients) && in_shutdown)
222 do_shutdown (); 230 do_shutdown ();
223} 231}
@@ -540,6 +548,7 @@ run (void *cls,
540 char *database; 548 char *database;
541 549
542 in_shutdown = GNUNET_NO; 550 in_shutdown = GNUNET_NO;
551 num_clients = 0;
543 cfg = c; 552 cfg = c;
544 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, 553 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg,
545 "peerstore", 554 "peerstore",
diff --git a/src/reclaim/plugin_gnsrecord_reclaim.c b/src/reclaim/plugin_gnsrecord_reclaim.c
index 60c49fd6a..9e4f0a5c4 100644
--- a/src/reclaim/plugin_gnsrecord_reclaim.c
+++ b/src/reclaim/plugin_gnsrecord_reclaim.c
@@ -50,7 +50,6 @@ value_to_string (void *cls, uint32_t type, const void *data, size_t data_size)
50 case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE: 50 case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE:
51 case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF: 51 case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF:
52 case GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET: 52 case GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET:
53 case GNUNET_GNSRECORD_TYPE_RECLAIM_MASTER:
54 case GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL: 53 case GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL:
55 case GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION: 54 case GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION:
56 return GNUNET_STRINGS_data_to_string_alloc (data, data_size); 55 return GNUNET_STRINGS_data_to_string_alloc (data, data_size);
@@ -87,7 +86,6 @@ string_to_value (void *cls, uint32_t type, const char *s, void **data,
87 return GNUNET_OK; 86 return GNUNET_OK;
88 case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE: 87 case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE:
89 case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF: 88 case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF:
90 case GNUNET_GNSRECORD_TYPE_RECLAIM_MASTER:
91 case GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET: 89 case GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET:
92 case GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL: 90 case GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL:
93 case GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION: 91 case GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION:
@@ -112,7 +110,6 @@ static struct
112 { "RECLAIM_ATTRIBUTE_REF", GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF }, 110 { "RECLAIM_ATTRIBUTE_REF", GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF },
113 { "RECLAIM_CREDENTIAL", GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL }, 111 { "RECLAIM_CREDENTIAL", GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL },
114 { "RECLAIM_PRESENTATION", GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION }, 112 { "RECLAIM_PRESENTATION", GNUNET_GNSRECORD_TYPE_RECLAIM_PRESENTATION },
115 { "RECLAIM_MASTER", GNUNET_GNSRECORD_TYPE_RECLAIM_MASTER },
116 { "RECLAIM_OIDC_CLIENT", GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT }, 113 { "RECLAIM_OIDC_CLIENT", GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT },
117 { "RECLAIM_OIDC_REDIRECT", GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT }, 114 { "RECLAIM_OIDC_REDIRECT", GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT },
118 { "RECLAIM_TICKET", GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET }, 115 { "RECLAIM_TICKET", GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET },
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index 273dbac48..c8a4c0375 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -739,7 +739,6 @@ struct Addresses
739}; 739};
740 740
741 741
742
743/** 742/**
744 * Maximum queue length before we stop reading towards the transport service. 743 * Maximum queue length before we stop reading towards the transport service.
745 */ 744 */
@@ -953,6 +952,9 @@ queue_destroy (struct Queue *queue)
953 else 952 else
954 GNUNET_free (queue); 953 GNUNET_free (queue);
955 954
955 if (NULL == lt)
956 return;
957
956 if ((! shutdown_running) && (NULL == lt->listen_task)) 958 if ((! shutdown_running) && (NULL == lt->listen_task))
957 { 959 {
958 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 960 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1193,6 +1195,7 @@ setup_cipher (const struct GNUNET_HashCode *dh,
1193 0)); 1195 0));
1194} 1196}
1195 1197
1198
1196/** 1199/**
1197 * Callback called when peerstore store operation for rekey monotime value is finished. 1200 * Callback called when peerstore store operation for rekey monotime value is finished.
1198 * @param cls Queue context the store operation was executed. 1201 * @param cls Queue context the store operation was executed.
@@ -1210,6 +1213,7 @@ rekey_monotime_store_cb (void *cls, int success)
1210 queue->rekey_monotime_sc = NULL; 1213 queue->rekey_monotime_sc = NULL;
1211} 1214}
1212 1215
1216
1213/** 1217/**
1214 * Callback called by peerstore when records for GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_REKEY 1218 * Callback called by peerstore when records for GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_REKEY
1215 * where found. 1219 * where found.
@@ -1266,6 +1270,7 @@ rekey_monotime_cb (void *cls,
1266 queue); 1270 queue);
1267} 1271}
1268 1272
1273
1269/** 1274/**
1270 * Setup cipher of @a queue for decryption. 1275 * Setup cipher of @a queue for decryption.
1271 * 1276 *
@@ -1344,6 +1349,7 @@ do_rekey (struct Queue *queue, const struct TCPRekey *rekey)
1344 setup_in_cipher (&rekey->ephemeral, queue); 1349 setup_in_cipher (&rekey->ephemeral, queue);
1345} 1350}
1346 1351
1352
1347/** 1353/**
1348 * Callback called when peerstore store operation for handshake ack monotime value is finished. 1354 * Callback called when peerstore store operation for handshake ack monotime value is finished.
1349 * @param cls Queue context the store operation was executed. 1355 * @param cls Queue context the store operation was executed.
@@ -1362,6 +1368,7 @@ handshake_ack_monotime_store_cb (void *cls, int success)
1362 queue->handshake_ack_monotime_sc = NULL; 1368 queue->handshake_ack_monotime_sc = NULL;
1363} 1369}
1364 1370
1371
1365/** 1372/**
1366 * Callback called by peerstore when records for GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_HANDSHAKE_ACK 1373 * Callback called by peerstore when records for GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_HANDSHAKE_ACK
1367 * where found. 1374 * where found.
@@ -1420,6 +1427,7 @@ handshake_ack_monotime_cb (void *cls,
1420 queue); 1427 queue);
1421} 1428}
1422 1429
1430
1423/** 1431/**
1424 * Sending challenge with TcpConfirmationAck back to sender of ephemeral key. 1432 * Sending challenge with TcpConfirmationAck back to sender of ephemeral key.
1425 * 1433 *
@@ -1465,6 +1473,7 @@ send_challenge (struct ChallengeNonceP challenge, struct Queue *queue)
1465 "sending challenge done\n"); 1473 "sending challenge done\n");
1466} 1474}
1467 1475
1476
1468/** 1477/**
1469 * Setup cipher for outgoing data stream based on target and 1478 * Setup cipher for outgoing data stream based on target and
1470 * our ephemeral private key. 1479 * our ephemeral private key.
@@ -1545,6 +1554,7 @@ inject_rekey (struct Queue *queue)
1545 setup_out_cipher (queue); 1554 setup_out_cipher (queue);
1546} 1555}
1547 1556
1557
1548/** 1558/**
1549 * We have been notified that our socket is ready to write. 1559 * We have been notified that our socket is ready to write.
1550 * Then reschedule this function to be called again once more is available. 1560 * Then reschedule this function to be called again once more is available.
@@ -1634,6 +1644,7 @@ queue_write (void *cls)
1634 queue); 1644 queue);
1635} 1645}
1636 1646
1647
1637/** 1648/**
1638 * Test if we have received a full message in plaintext. 1649 * Test if we have received a full message in plaintext.
1639 * If so, handle it. 1650 * If so, handle it.
@@ -1975,6 +1986,7 @@ queue_read (void *cls)
1975 queue_finish (queue); 1986 queue_finish (queue);
1976} 1987}
1977 1988
1989
1978/** 1990/**
1979 * Convert a `struct sockaddr_in6 to a `struct sockaddr *` 1991 * Convert a `struct sockaddr_in6 to a `struct sockaddr *`
1980 * 1992 *
@@ -2001,6 +2013,7 @@ tcp_address_to_sockaddr_numeric_v6 (socklen_t *sock_len, struct sockaddr_in6 v6,
2001 return in; 2013 return in;
2002} 2014}
2003 2015
2016
2004/** 2017/**
2005 * Convert a `struct sockaddr_in4 to a `struct sockaddr *` 2018 * Convert a `struct sockaddr_in4 to a `struct sockaddr *`
2006 * 2019 *
@@ -2024,6 +2037,7 @@ tcp_address_to_sockaddr_numeric_v4 (socklen_t *sock_len, struct sockaddr_in v4,
2024 return in; 2037 return in;
2025} 2038}
2026 2039
2040
2027/** 2041/**
2028 * Convert TCP bind specification to a `struct PortOnlyIpv4Ipv6 *` 2042 * Convert TCP bind specification to a `struct PortOnlyIpv4Ipv6 *`
2029 * 2043 *
@@ -2083,6 +2097,7 @@ tcp_address_to_sockaddr_port_only (const char *bindto, unsigned int *port)
2083 return po; 2097 return po;
2084} 2098}
2085 2099
2100
2086/** 2101/**
2087 * This Method extracts the address part of the BINDTO string. 2102 * This Method extracts the address part of the BINDTO string.
2088 * 2103 *
@@ -2117,7 +2132,8 @@ extract_address (const char *bindto)
2117 start++; /* skip over '['*/ 2132 start++; /* skip over '['*/
2118 cp[strlen (cp) - 1] = '\0'; /* eat ']'*/ 2133 cp[strlen (cp) - 1] = '\0'; /* eat ']'*/
2119 } 2134 }
2120 else { 2135 else
2136 {
2121 token = strtok_r (cp, "]", &rest); 2137 token = strtok_r (cp, "]", &rest);
2122 if (strlen (bindto) == strlen (token)) 2138 if (strlen (bindto) == strlen (token))
2123 { 2139 {
@@ -2139,6 +2155,7 @@ extract_address (const char *bindto)
2139 return start; 2155 return start;
2140} 2156}
2141 2157
2158
2142/** 2159/**
2143 * This Method extracts the port part of the BINDTO string. 2160 * This Method extracts the port part of the BINDTO string.
2144 * 2161 *
@@ -2217,6 +2234,7 @@ extract_port (const char *addr_and_port)
2217 return port; 2234 return port;
2218} 2235}
2219 2236
2237
2220/** 2238/**
2221 * Convert TCP bind specification to a `struct sockaddr *` 2239 * Convert TCP bind specification to a `struct sockaddr *`
2222 * 2240 *
@@ -2245,7 +2263,6 @@ tcp_address_to_sockaddr (const char *bindto, socklen_t *sock_len)
2245 bindto); 2263 bindto);
2246 2264
2247 2265
2248
2249 if (1 == inet_pton (AF_INET, start, &v4.sin_addr)) 2266 if (1 == inet_pton (AF_INET, start, &v4.sin_addr))
2250 { 2267 {
2251 // colon = strrchr (cp, ':'); 2268 // colon = strrchr (cp, ':');
@@ -2263,7 +2280,8 @@ tcp_address_to_sockaddr (const char *bindto, socklen_t *sock_len)
2263 port = extract_port (bindto); 2280 port = extract_port (bindto);
2264 in = tcp_address_to_sockaddr_numeric_v6 (sock_len, v6, port); 2281 in = tcp_address_to_sockaddr_numeric_v6 (sock_len, v6, port);
2265 } 2282 }
2266 else{ 2283 else
2284 {
2267 GNUNET_assert (0); 2285 GNUNET_assert (0);
2268 } 2286 }
2269 2287
@@ -2272,6 +2290,7 @@ tcp_address_to_sockaddr (const char *bindto, socklen_t *sock_len)
2272 return in; 2290 return in;
2273} 2291}
2274 2292
2293
2275/** 2294/**
2276 * Signature of functions implementing the sending functionality of a 2295 * Signature of functions implementing the sending functionality of a
2277 * message queue. 2296 * message queue.
@@ -2510,6 +2529,7 @@ start_initial_kx_out (struct Queue *queue)
2510 transmit_kx (queue, &epub); 2529 transmit_kx (queue, &epub);
2511} 2530}
2512 2531
2532
2513/** 2533/**
2514 * Callback called when peerstore store operation for handshake monotime is finished. 2534 * Callback called when peerstore store operation for handshake monotime is finished.
2515 * @param cls Queue context the store operation was executed. 2535 * @param cls Queue context the store operation was executed.
@@ -2527,6 +2547,7 @@ handshake_monotime_store_cb (void *cls, int success)
2527 queue->handshake_monotime_sc = NULL; 2547 queue->handshake_monotime_sc = NULL;
2528} 2548}
2529 2549
2550
2530/** 2551/**
2531 * Callback called by peerstore when records for GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_HANDSHAKE 2552 * Callback called by peerstore when records for GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_HANDSHAKE
2532 * where found. 2553 * where found.
@@ -2585,6 +2606,7 @@ handshake_monotime_cb (void *cls,
2585 queue); 2606 queue);
2586} 2607}
2587 2608
2609
2588/** 2610/**
2589 * We have received the first bytes from the other side on a @a queue. 2611 * We have received the first bytes from the other side on a @a queue.
2590 * Decrypt the @a tc contained in @a ibuf and check the signature. 2612 * Decrypt the @a tc contained in @a ibuf and check the signature.
@@ -2651,6 +2673,7 @@ free_proto_queue (struct ProtoQueue *pq)
2651 GNUNET_free (pq); 2673 GNUNET_free (pq);
2652} 2674}
2653 2675
2676
2654/** 2677/**
2655 * Read from the socket of the proto queue until we have enough data 2678 * Read from the socket of the proto queue until we have enough data
2656 * to upgrade to full queue. 2679 * to upgrade to full queue.
@@ -2892,6 +2915,7 @@ queue_read_kx (void *cls)
2892 queue->read_task = GNUNET_SCHEDULER_add_now (&queue_read, queue); 2915 queue->read_task = GNUNET_SCHEDULER_add_now (&queue_read, queue);
2893} 2916}
2894 2917
2918
2895/** 2919/**
2896 * Function called by the transport service to initialize a 2920 * Function called by the transport service to initialize a
2897 * message queue given address information about another peer. 2921 * message queue given address information about another peer.
@@ -2991,6 +3015,7 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address)
2991 return GNUNET_OK; 3015 return GNUNET_OK;
2992} 3016}
2993 3017
3018
2994/** 3019/**
2995 * Iterator over all ListenTasks to clean up. 3020 * Iterator over all ListenTasks to clean up.
2996 * 3021 *
@@ -3021,6 +3046,7 @@ get_lt_delete_it (void *cls,
3021 return GNUNET_OK; 3046 return GNUNET_OK;
3022} 3047}
3023 3048
3049
3024/** 3050/**
3025 * Iterator over all message queues to clean up. 3051 * Iterator over all message queues to clean up.
3026 * 3052 *
@@ -3042,6 +3068,7 @@ get_queue_delete_it (void *cls,
3042 return GNUNET_OK; 3068 return GNUNET_OK;
3043} 3069}
3044 3070
3071
3045/** 3072/**
3046 * Shutdown the UNIX communicator. 3073 * Shutdown the UNIX communicator.
3047 * 3074 *
@@ -3182,6 +3209,7 @@ nat_address_cb (void *cls,
3182 } 3209 }
3183} 3210}
3184 3211
3212
3185/** 3213/**
3186 * This method adds addresses to the DLL, that are later register at the NAT service. 3214 * This method adds addresses to the DLL, that are later register at the NAT service.
3187 */ 3215 */
@@ -3211,6 +3239,7 @@ add_addr (struct sockaddr *in, socklen_t in_len)
3211 addrs_lens++; 3239 addrs_lens++;
3212} 3240}
3213 3241
3242
3214/** 3243/**
3215 * This method launch network interactions for each address we like to bind to. 3244 * This method launch network interactions for each address we like to bind to.
3216 * 3245 *
@@ -3336,7 +3365,7 @@ init_socket (struct sockaddr *addr,
3336 if (NULL == queue_map) 3365 if (NULL == queue_map)
3337 queue_map = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); 3366 queue_map = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO);
3338 3367
3339 if (NULL == ch ) 3368 if (NULL == ch)
3340 ch = GNUNET_TRANSPORT_communicator_connect (cfg, 3369 ch = GNUNET_TRANSPORT_communicator_connect (cfg,
3341 COMMUNICATOR_CONFIG_SECTION, 3370 COMMUNICATOR_CONFIG_SECTION,
3342 COMMUNICATOR_ADDRESS_PREFIX, 3371 COMMUNICATOR_ADDRESS_PREFIX,
@@ -3360,6 +3389,7 @@ init_socket (struct sockaddr *addr,
3360 3389
3361} 3390}
3362 3391
3392
3363/** 3393/**
3364 * This method reads from the DLL addrs_head to register them at the NAT service. 3394 * This method reads from the DLL addrs_head to register them at the NAT service.
3365 */ 3395 */
@@ -3421,6 +3451,7 @@ nat_register ()
3421 } 3451 }
3422} 3452}
3423 3453
3454
3424/** 3455/**
3425 * This method is the callback called by the resolver API, and wraps method init_socket. 3456 * This method is the callback called by the resolver API, and wraps method init_socket.
3426 * 3457 *
@@ -3476,6 +3507,7 @@ init_socket_resolv (void *cls,
3476 } 3507 }
3477} 3508}
3478 3509
3510
3479/** 3511/**
3480 * Setup communicator and launch network interactions. 3512 * Setup communicator and launch network interactions.
3481 * 3513 *
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index f57d08395..3cba49250 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -2772,6 +2772,11 @@ static unsigned int pa_count;
2772 */ 2772 */
2773static struct GNUNET_TIME_Absolute hello_mono_time; 2773static struct GNUNET_TIME_Absolute hello_mono_time;
2774 2774
2775/**
2776 * Indication if we have received a shutdown signal
2777 * and are in the process of cleaning up.
2778 */
2779static int in_shutdown;
2775 2780
2776/** 2781/**
2777 * Get an offset into the transmission history buffer for `struct 2782 * Get an offset into the transmission history buffer for `struct
@@ -2805,6 +2810,7 @@ free_incoming_request (struct IncomingRequest *ir)
2805 GNUNET_assert (ir_total > 0); 2810 GNUNET_assert (ir_total > 0);
2806 ir_total--; 2811 ir_total--;
2807 GNUNET_PEERSTORE_watch_cancel (ir->wc); 2812 GNUNET_PEERSTORE_watch_cancel (ir->wc);
2813 ir->wc = NULL;
2808 GNUNET_free (ir); 2814 GNUNET_free (ir);
2809} 2815}
2810 2816
@@ -3333,6 +3339,8 @@ free_neighbour (struct Neighbour *neighbour)
3333 GNUNET_CONTAINER_multipeermap_remove (neighbours, 3339 GNUNET_CONTAINER_multipeermap_remove (neighbours,
3334 &neighbour->pid, 3340 &neighbour->pid,
3335 neighbour)); 3341 neighbour));
3342 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3343 "Freeing neighbour\n");
3336 if (NULL != neighbour->reassembly_map) 3344 if (NULL != neighbour->reassembly_map)
3337 { 3345 {
3338 GNUNET_CONTAINER_multihashmap32_iterate (neighbour->reassembly_map, 3346 GNUNET_CONTAINER_multihashmap32_iterate (neighbour->reassembly_map,
@@ -3499,6 +3507,8 @@ check_link_down (void *cls)
3499 struct GNUNET_TIME_Absolute dvh_timeout; 3507 struct GNUNET_TIME_Absolute dvh_timeout;
3500 struct GNUNET_TIME_Absolute q_timeout; 3508 struct GNUNET_TIME_Absolute q_timeout;
3501 3509
3510 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3511 "Checking if link is down\n");
3502 vl->visibility_task = NULL; 3512 vl->visibility_task = NULL;
3503 dvh_timeout = GNUNET_TIME_UNIT_ZERO_ABS; 3513 dvh_timeout = GNUNET_TIME_UNIT_ZERO_ABS;
3504 if (NULL != dv) 3514 if (NULL != dv)
@@ -3660,6 +3670,7 @@ stop_peer_request (void *cls,
3660 struct PeerRequest *pr = value; 3670 struct PeerRequest *pr = value;
3661 3671
3662 GNUNET_PEERSTORE_watch_cancel (pr->wc); 3672 GNUNET_PEERSTORE_watch_cancel (pr->wc);
3673 pr->wc = NULL;
3663 GNUNET_assert ( 3674 GNUNET_assert (
3664 GNUNET_YES == 3675 GNUNET_YES ==
3665 GNUNET_CONTAINER_multipeermap_remove (tc->details.application.requests, 3676 GNUNET_CONTAINER_multipeermap_remove (tc->details.application.requests,
@@ -3671,6 +3682,9 @@ stop_peer_request (void *cls,
3671} 3682}
3672 3683
3673 3684
3685static void
3686do_shutdown (void *cls);
3687
3674/** 3688/**
3675 * Called whenever a client is disconnected. Frees our 3689 * Called whenever a client is disconnected. Frees our
3676 * resources associated with that client. 3690 * resources associated with that client.
@@ -3688,16 +3702,20 @@ client_disconnect_cb (void *cls,
3688 3702
3689 (void) cls; 3703 (void) cls;
3690 (void) client; 3704 (void) client;
3691 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3692 "Client %p disconnected, cleaning up.\n",
3693 tc);
3694 GNUNET_CONTAINER_DLL_remove (clients_head, clients_tail, tc); 3705 GNUNET_CONTAINER_DLL_remove (clients_head, clients_tail, tc);
3695 switch (tc->type) 3706 switch (tc->type)
3696 { 3707 {
3697 case CT_NONE: 3708 case CT_NONE:
3709 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3710 "Unknown Client %p disconnected, cleaning up.\n",
3711 tc);
3698 break; 3712 break;
3699 3713
3700 case CT_CORE: { 3714 case CT_CORE: {
3715 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3716 "CORE Client %p disconnected, cleaning up.\n",
3717 tc);
3718
3701 struct PendingMessage *pm; 3719 struct PendingMessage *pm;
3702 3720
3703 while (NULL != (pm = tc->details.core.pending_msg_head)) 3721 while (NULL != (pm = tc->details.core.pending_msg_head))
@@ -3712,9 +3730,17 @@ client_disconnect_cb (void *cls,
3712 break; 3730 break;
3713 3731
3714 case CT_MONITOR: 3732 case CT_MONITOR:
3733 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3734 "MONITOR Client %p disconnected, cleaning up.\n",
3735 tc);
3736
3715 break; 3737 break;
3716 3738
3717 case CT_COMMUNICATOR: { 3739 case CT_COMMUNICATOR: {
3740 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3741 "COMMUNICATOR Client %p disconnected, cleaning up.\n",
3742 tc);
3743
3718 struct Queue *q; 3744 struct Queue *q;
3719 struct AddressListEntry *ale; 3745 struct AddressListEntry *ale;
3720 3746
@@ -3727,6 +3753,10 @@ client_disconnect_cb (void *cls,
3727 break; 3753 break;
3728 3754
3729 case CT_APPLICATION: 3755 case CT_APPLICATION:
3756 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3757 "APPLICATION Client %p disconnected, cleaning up.\n",
3758 tc);
3759
3730 GNUNET_CONTAINER_multipeermap_iterate (tc->details.application.requests, 3760 GNUNET_CONTAINER_multipeermap_iterate (tc->details.application.requests,
3731 &stop_peer_request, 3761 &stop_peer_request,
3732 tc); 3762 tc);
@@ -3734,6 +3764,12 @@ client_disconnect_cb (void *cls,
3734 break; 3764 break;
3735 } 3765 }
3736 GNUNET_free (tc); 3766 GNUNET_free (tc);
3767 if ((GNUNET_YES == in_shutdown) && (NULL == clients_head))
3768 {
3769 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
3770 "Our last client disconnected\n");
3771 do_shutdown (cls);
3772 }
3737} 3773}
3738 3774
3739 3775
@@ -4163,7 +4199,6 @@ queue_send_msg (struct Queue *queue,
4163 struct GNUNET_TRANSPORT_SendMessageTo *smt; 4199 struct GNUNET_TRANSPORT_SendMessageTo *smt;
4164 struct GNUNET_MQ_Envelope *env; 4200 struct GNUNET_MQ_Envelope *env;
4165 4201
4166 // queue->idle = GNUNET_NO;
4167 GNUNET_log ( 4202 GNUNET_log (
4168 GNUNET_ERROR_TYPE_DEBUG, 4203 GNUNET_ERROR_TYPE_DEBUG,
4169 "Queueing %u bytes of payload for transmission <%llu> on queue %llu to %s\n", 4204 "Queueing %u bytes of payload for transmission <%llu> on queue %llu to %s\n",
@@ -5164,9 +5199,12 @@ handle_del_address (void *cls,
5164 ale->address); 5199 ale->address);
5165 free_address_list_entry (ale); 5200 free_address_list_entry (ale);
5166 GNUNET_SERVICE_client_continue (tc->client); 5201 GNUNET_SERVICE_client_continue (tc->client);
5202 return;
5167 } 5203 }
5168 GNUNET_break (0); 5204 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
5169 GNUNET_SERVICE_client_drop (tc->client); 5205 "Communicator removed address we did not even have.\n");
5206 GNUNET_SERVICE_client_continue (tc->client);
5207 // GNUNET_SERVICE_client_drop (tc->client);
5170} 5208}
5171 5209
5172 5210
@@ -8832,6 +8870,8 @@ transmit_on_queue (void *cls)
8832 queue->idle = GNUNET_YES; 8870 queue->idle = GNUNET_YES;
8833 return; 8871 return;
8834 } 8872 }
8873 /* There is a message pending, we are certainly not idle */
8874 queue->idle = GNUNET_NO;
8835 8875
8836 /* Given selection in `sc`, do transmission */ 8876 /* Given selection in `sc`, do transmission */
8837 pm = sc.best; 8877 pm = sc.best;
@@ -8940,7 +8980,8 @@ transmit_on_queue (void *cls)
8940 8980
8941 OPTIMIZE: Note that in the future this heuristic should likely 8981 OPTIMIZE: Note that in the future this heuristic should likely
8942 be improved further (measure RTT stability, consider message 8982 be improved further (measure RTT stability, consider message
8943 urgency and size when delaying ACKs, etc.) */update_pm_next_attempt (pm, 8983 urgency and size when delaying ACKs, etc.) */
8984 update_pm_next_attempt (pm,
8944 GNUNET_TIME_relative_to_absolute ( 8985 GNUNET_TIME_relative_to_absolute (
8945 GNUNET_TIME_relative_multiply (queue->pd.aged_rtt, 8986 GNUNET_TIME_relative_multiply (queue->pd.aged_rtt,
8946 4))); 8987 4)));
@@ -9072,7 +9113,6 @@ handle_send_message_ack (void *cls,
9072 NULL != queue; 9113 NULL != queue;
9073 queue = queue->next_client) 9114 queue = queue->next_client)
9074 { 9115 {
9075 queue->idle = GNUNET_YES;
9076 schedule_transmit_on_queue (queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT); 9116 schedule_transmit_on_queue (queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT);
9077 } 9117 }
9078 } 9118 }
@@ -9083,7 +9123,6 @@ handle_send_message_ack (void *cls,
9083 "# Transmission throttled due to queue queue limit", 9123 "# Transmission throttled due to queue queue limit",
9084 -1, 9124 -1,
9085 GNUNET_NO); 9125 GNUNET_NO);
9086 qe->queue->idle = GNUNET_YES;
9087 schedule_transmit_on_queue (qe->queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT); 9126 schedule_transmit_on_queue (qe->queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT);
9088 } 9127 }
9089 9128
@@ -10058,13 +10097,17 @@ do_shutdown (void *cls)
10058 struct LearnLaunchEntry *lle; 10097 struct LearnLaunchEntry *lle;
10059 10098
10060 (void) cls; 10099 (void) cls;
10061 10100 GNUNET_CONTAINER_multipeermap_iterate (neighbours,
10062 //GNUNET_CONTAINER_multipeermap_iterate (neighbours, 10101 &free_neighbour_cb, NULL);
10063 //&free_neighbour_cb, NULL); 10102 if (NULL != validation_task)
10064 if (NULL != peerstore)
10065 { 10103 {
10066 GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_NO); 10104 GNUNET_SCHEDULER_cancel (validation_task);
10067 peerstore = NULL; 10105 validation_task = NULL;
10106 }
10107 if (NULL != dvlearn_task)
10108 {
10109 GNUNET_SCHEDULER_cancel (dvlearn_task);
10110 dvlearn_task = NULL;
10068 } 10111 }
10069 if (NULL != GST_stats) 10112 if (NULL != GST_stats)
10070 { 10113 {
@@ -10110,6 +10153,13 @@ do_shutdown (void *cls)
10110 GNUNET_CONTAINER_DLL_remove (lle_head, lle_tail, lle); 10153 GNUNET_CONTAINER_DLL_remove (lle_head, lle_tail, lle);
10111 GNUNET_free (lle); 10154 GNUNET_free (lle);
10112 } 10155 }
10156 if (NULL != peerstore)
10157 {
10158 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
10159 "Disconnecting from PEERSTORE service\n");
10160 GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_NO);
10161 peerstore = NULL;
10162 }
10113 GNUNET_CONTAINER_multishortmap_destroy (dvlearn_map); 10163 GNUNET_CONTAINER_multishortmap_destroy (dvlearn_map);
10114 dvlearn_map = NULL; 10164 dvlearn_map = NULL;
10115 GNUNET_CONTAINER_heap_destroy (validation_heap); 10165 GNUNET_CONTAINER_heap_destroy (validation_heap);
@@ -10117,6 +10167,16 @@ do_shutdown (void *cls)
10117 GNUNET_CONTAINER_multipeermap_iterate (dv_routes, &free_dv_routes_cb, NULL); 10167 GNUNET_CONTAINER_multipeermap_iterate (dv_routes, &free_dv_routes_cb, NULL);
10118 GNUNET_CONTAINER_multipeermap_destroy (dv_routes); 10168 GNUNET_CONTAINER_multipeermap_destroy (dv_routes);
10119 dv_routes = NULL; 10169 dv_routes = NULL;
10170 GNUNET_SCHEDULER_shutdown ();
10171}
10172
10173
10174static void
10175shutdown_task (void *cls)
10176{
10177 in_shutdown = GNUNET_YES;
10178 if (NULL == clients_head)
10179 do_shutdown (cls);
10120} 10180}
10121 10181
10122 10182
@@ -10136,6 +10196,7 @@ run (void *cls,
10136 (void) service; 10196 (void) service;
10137 /* setup globals */ 10197 /* setup globals */
10138 hello_mono_time = GNUNET_TIME_absolute_get_monotonic (c); 10198 hello_mono_time = GNUNET_TIME_absolute_get_monotonic (c);
10199 in_shutdown = GNUNET_NO;
10139 GST_cfg = c; 10200 GST_cfg = c;
10140 backtalkers = GNUNET_CONTAINER_multipeermap_create (16, GNUNET_YES); 10201 backtalkers = GNUNET_CONTAINER_multipeermap_create (16, GNUNET_YES);
10141 pending_acks = GNUNET_CONTAINER_multiuuidmap_create (32768, GNUNET_YES); 10202 pending_acks = GNUNET_CONTAINER_multiuuidmap_create (32768, GNUNET_YES);
@@ -10165,7 +10226,7 @@ run (void *cls,
10165 "My identity is `%s'\n", 10226 "My identity is `%s'\n",
10166 GNUNET_i2s_full (&GST_my_identity)); 10227 GNUNET_i2s_full (&GST_my_identity));
10167 GST_stats = GNUNET_STATISTICS_create ("transport", GST_cfg); 10228 GST_stats = GNUNET_STATISTICS_create ("transport", GST_cfg);
10168 GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL); 10229 GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL);
10169 peerstore = GNUNET_PEERSTORE_connect (GST_cfg); 10230 peerstore = GNUNET_PEERSTORE_connect (GST_cfg);
10170 if (NULL == peerstore) 10231 if (NULL == peerstore)
10171 { 10232 {
diff --git a/src/transport/test_transport_api2_tcp_peer1.conf b/src/transport/test_transport_api2_tcp_peer1.conf
index 417a855ad..745ed6887 100644
--- a/src/transport/test_transport_api2_tcp_peer1.conf
+++ b/src/transport/test_transport_api2_tcp_peer1.conf
@@ -6,12 +6,15 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/
6BINARY = gnunet-service-tng 6BINARY = gnunet-service-tng
7PLUGINS = tcp 7PLUGINS = tcp
8#PREFIX = valgrind --log-file=/tmp/vg_peer1-%p 8#PREFIX = valgrind --log-file=/tmp/vg_peer1-%p
9UNIXPATH = $GNUNET_RUNTIME_DIR/tng-p1.sock
9 10
10[communicator-tcp] 11[communicator-tcp]
11BINARY = gnunet-communicator-tcp 12BINARY = gnunet-communicator-tcp
12BINDTO = 60002 13BINDTO = 60002
13DISABLE_V6 = YES 14DISABLE_V6 = YES
14IMMEDIATE_START = YES 15IMMEDIATE_START = YES
16UNIXPATH = $GNUNET_RUNTIME_DIR/tcp-comm-p1.sock
17#PREFIX = valgrind --log-file=/tmp/vg_cpeer1-%p
15 18
16[peerstore] 19[peerstore]
17IMMEDIATE_START = YES 20IMMEDIATE_START = YES
diff --git a/src/transport/test_transport_api2_tcp_peer2.conf b/src/transport/test_transport_api2_tcp_peer2.conf
index 949bd95f3..022468bcd 100644
--- a/src/transport/test_transport_api2_tcp_peer2.conf
+++ b/src/transport/test_transport_api2_tcp_peer2.conf
@@ -5,12 +5,15 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/
5[transport] 5[transport]
6BINARY = gnunet-service-tng 6BINARY = gnunet-service-tng
7#PREFIX = valgrind --log-file=/tmp/vg_peer2-%p 7#PREFIX = valgrind --log-file=/tmp/vg_peer2-%p
8UNIXPATH = $GNUNET_RUNTIME_DIR/tng-p2.sock
8 9
9[communicator-tcp] 10[communicator-tcp]
10BINARY = gnunet-communicator-tcp 11BINARY = gnunet-communicator-tcp
11BINDTO = 60003 12BINDTO = 60003
12DISABLE_V6 = YES 13DISABLE_V6 = YES
13IMMEDIATE_START = YES 14IMMEDIATE_START = YES
15#PREFIX = valgrind --log-file=/tmp/vg_comm2-%p
16UNIXPATH = $GNUNET_RUNTIME_DIR/tcp-comm-p2.sock
14 17
15[peerstore] 18[peerstore]
16IMMEDIATE_START = YES 19IMMEDIATE_START = YES
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c
index d553a3961..eaa8a5f15 100644
--- a/src/transport/transport-testing2.c
+++ b/src/transport/transport-testing2.c
@@ -328,6 +328,8 @@ notify_disconnect (void *cls,
328 } 328 }
329} 329}
330 330
331static void
332retrieve_hello (void *cls);
331 333
332static void 334static void
333hello_iter_cb (void *cb_cls, 335hello_iter_cb (void *cb_cls,
@@ -338,14 +340,15 @@ hello_iter_cb (void *cb_cls,
338 if ((NULL == record) && (NULL == emsg)) 340 if ((NULL == record) && (NULL == emsg))
339 { 341 {
340 p->pic = NULL; 342 p->pic = NULL;
341 LOG (GNUNET_ERROR_TYPE_DEBUG, "Iteration End\n"); 343 if (NULL != p->start_cb)
344 p->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, p);
342 return; 345 return;
343 } 346 }
344 //Check record type et al? 347 // Check record type et al?
345 p->hello_size = record->value_size; 348 p->hello_size = record->value_size;
346 p->hello = GNUNET_malloc (p->hello_size); 349 p->hello = GNUNET_malloc (p->hello_size);
347 memcpy (p->hello, record->value, p->hello_size); 350 memcpy (p->hello, record->value, p->hello_size);
348 p->hello[p->hello_size-1] = '\0'; 351 p->hello[p->hello_size - 1] = '\0';
349 352
350 GNUNET_PEERSTORE_iterate_cancel (p->pic); 353 GNUNET_PEERSTORE_iterate_cancel (p->pic);
351 p->pic = NULL; 354 p->pic = NULL;
@@ -360,13 +363,12 @@ hello_iter_cb (void *cb_cls,
360 } 363 }
361} 364}
362 365
366
363static void 367static void
364retrieve_hello(void *cls) 368retrieve_hello (void *cls)
365{ 369{
366 struct GNUNET_TRANSPORT_TESTING_PeerContext *p = cls; 370 struct GNUNET_TRANSPORT_TESTING_PeerContext *p = cls;
367 LOG (GNUNET_ERROR_TYPE_DEBUG, 371 p->rh_task = NULL;
368 "Getting hello...\n");
369
370 p->pic = GNUNET_PEERSTORE_iterate (p->ph, 372 p->pic = GNUNET_PEERSTORE_iterate (p->ph,
371 "transport", 373 "transport",
372 &p->id, 374 &p->id,
@@ -377,7 +379,6 @@ retrieve_hello(void *cls)
377} 379}
378 380
379 381
380
381/** 382/**
382 * Start a peer with the given configuration 383 * Start a peer with the given configuration
383 * @param tth the testing handle 384 * @param tth the testing handle
@@ -535,11 +536,8 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct
535 // FIXME Error handling 536 // FIXME Error handling
536 p->ah = GNUNET_TRANSPORT_application_init (p->cfg); 537 p->ah = GNUNET_TRANSPORT_application_init (p->cfg);
537 GNUNET_assert (NULL != p->ah); 538 GNUNET_assert (NULL != p->ah);
538 // FIXME Error handleing 539 // FIXME Error handling
539 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10), 540 p->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, p);
540 retrieve_hello,
541 p);
542 //GNUNET_assert (NULL != p->pic);
543 541
544 return p; 542 return p;
545} 543}
@@ -650,6 +648,11 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct
650 struct GNUNET_TRANSPORT_TESTING_Handle *tth = p->tth; 648 struct GNUNET_TRANSPORT_TESTING_Handle *tth = p->tth;
651 struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc; 649 struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc;
652 struct GNUNET_TRANSPORT_TESTING_ConnectRequest *ccn; 650 struct GNUNET_TRANSPORT_TESTING_ConnectRequest *ccn;
651 /* shutdown */
652 LOG (GNUNET_ERROR_TYPE_DEBUG,
653 "Stopping peer %u (`%s')\n",
654 p->no,
655 GNUNET_i2s (&p->id));
653 656
654 for (cc = tth->cc_head; NULL != cc; cc = ccn) 657 for (cc = tth->cc_head; NULL != cc; cc = ccn)
655 { 658 {
@@ -660,7 +663,7 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct
660 } 663 }
661 if (NULL != p->pic) 664 if (NULL != p->pic)
662 { 665 {
663 //GNUNET_PEERSTORE_iterate_cancel (p->pic); 666 GNUNET_PEERSTORE_iterate_cancel (p->pic);
664 p->pic = NULL; 667 p->pic = NULL;
665 } 668 }
666 if (NULL != p->th) 669 if (NULL != p->th)
@@ -668,19 +671,6 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct
668 GNUNET_TRANSPORT_core_disconnect (p->th); 671 GNUNET_TRANSPORT_core_disconnect (p->th);
669 p->th = NULL; 672 p->th = NULL;
670 } 673 }
671 if (NULL != p->peer)
672 {
673 if (GNUNET_OK !=
674 GNUNET_TESTING_peer_stop (p->peer))
675 {
676 LOG (GNUNET_ERROR_TYPE_DEBUG,
677 "Testing lib failed to stop peer %u (`%s')\n",
678 p->no,
679 GNUNET_i2s (&p->id));
680 }
681 GNUNET_TESTING_peer_destroy (p->peer);
682 p->peer = NULL;
683 }
684 if (NULL != p->ats) 674 if (NULL != p->ats)
685 { 675 {
686 GNUNET_ATS_connectivity_done (p->ats); 676 GNUNET_ATS_connectivity_done (p->ats);
@@ -693,9 +683,25 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct
693 } 683 }
694 if (NULL != p->ph) 684 if (NULL != p->ph)
695 { 685 {
686 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
687 "Disconnecting from PEERSTORE service\n");
696 GNUNET_PEERSTORE_disconnect (p->ph, GNUNET_NO); 688 GNUNET_PEERSTORE_disconnect (p->ph, GNUNET_NO);
697 p->ph = NULL; 689 p->ph = NULL;
698 } 690 }
691
692 if (NULL != p->peer)
693 {
694 if (GNUNET_OK !=
695 GNUNET_TESTING_peer_stop (p->peer))
696 {
697 LOG (GNUNET_ERROR_TYPE_DEBUG,
698 "Testing lib failed to stop peer %u (`%s')\n",
699 p->no,
700 GNUNET_i2s (&p->id));
701 }
702 GNUNET_TESTING_peer_destroy (p->peer);
703 p->peer = NULL;
704 }
699 if (NULL != p->hello) 705 if (NULL != p->hello)
700 { 706 {
701 GNUNET_free (p->hello); 707 GNUNET_free (p->hello);
@@ -718,6 +724,9 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct
718 "Peer %u (`%s') stopped\n", 724 "Peer %u (`%s') stopped\n",
719 p->no, 725 p->no,
720 GNUNET_i2s (&p->id)); 726 GNUNET_i2s (&p->id));
727 if (NULL != p->rh_task)
728 GNUNET_SCHEDULER_cancel (p->rh_task);
729 p->rh_task = NULL;
721 GNUNET_free (p); 730 GNUNET_free (p);
722} 731}
723 732
@@ -728,16 +737,16 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct
728 * FIXME maybe schedule the application_validate somehow 737 * FIXME maybe schedule the application_validate somehow
729 */ 738 */
730/* 739/*
731static void 740 static void
732hello_offered (void *cls) 741 hello_offered (void *cls)
733{ 742 {
734 struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc = cls; 743 struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc = cls;
735 744
736 cc->oh = NULL; 745 cc->oh = NULL;
737 cc->tct = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, 746 cc->tct = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
738 &offer_hello, 747 &offer_hello,
739 cc); 748 cc);
740}*/ 749 }*/
741 750
742 751
743/** 752/**
diff --git a/src/transport/transport-testing2.h b/src/transport/transport-testing2.h
index 8c0f03556..db8700df9 100644
--- a/src/transport/transport-testing2.h
+++ b/src/transport/transport-testing2.h
@@ -145,6 +145,11 @@ struct GNUNET_TRANSPORT_TESTING_PeerContext
145 GNUNET_SCHEDULER_TaskCallback start_cb; 145 GNUNET_SCHEDULER_TaskCallback start_cb;
146 146
147 /** 147 /**
148 * Hello get task
149 */
150 struct GNUNET_SCHEDULER_Task *rh_task;
151
152 /**
148 * Closure for the @a nc and @a nd callbacks 153 * Closure for the @a nc and @a nd callbacks
149 */ 154 */
150 void *cb_cls; 155 void *cb_cls;
diff --git a/src/util/.gitignore b/src/util/.gitignore
index 8556ee7b8..7c7b7045d 100644
--- a/src/util/.gitignore
+++ b/src/util/.gitignore
@@ -80,3 +80,4 @@ python27_location
80perf_malloc 80perf_malloc
81perf_mq 81perf_mq
82perf_scheduler 82perf_scheduler
83gnunet-base32
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 33fe26e34..6b9e083a7 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -152,9 +152,10 @@ libexec_PROGRAMS = \
152 gnunet-timeout 152 gnunet-timeout
153 153
154bin_PROGRAMS = \ 154bin_PROGRAMS = \
155 gnunet-resolver \ 155 gnunet-base32 \
156 gnunet-config \ 156 gnunet-config \
157 gnunet-crypto-tvg \ 157 gnunet-crypto-tvg \
158 gnunet-resolver \
158 $(GNUNET_ECC) \ 159 $(GNUNET_ECC) \
159 $(GNUNET_SCRYPT) \ 160 $(GNUNET_SCRYPT) \
160 gnunet-uri 161 gnunet-uri
@@ -203,6 +204,12 @@ gnunet_ecc_LDADD = \
203 libgnunetutil.la \ 204 libgnunetutil.la \
204 $(GN_LIBINTL) -lgcrypt 205 $(GN_LIBINTL) -lgcrypt
205 206
207gnunet_base32_SOURCES = \
208 gnunet-base32.c
209gnunet_base32_LDADD = \
210 libgnunetutil.la \
211 $(GN_LIBINTL)
212
206gnunet_scrypt_SOURCES = \ 213gnunet_scrypt_SOURCES = \
207 gnunet-scrypt.c 214 gnunet-scrypt.c
208gnunet_scrypt_LDADD = \ 215gnunet_scrypt_LDADD = \
diff --git a/src/util/gnunet-base32.c b/src/util/gnunet-base32.c
new file mode 100644
index 000000000..2c797f56e
--- /dev/null
+++ b/src/util/gnunet-base32.c
@@ -0,0 +1,152 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2021 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20
21/**
22 * @file util/gnunet-base32.c
23 * @brief tool to encode/decode from/to the Crockford Base32 encoding GNUnet uses
24 * @author Christian Grothoff
25 */
26#include "platform.h"
27#include "gnunet_util_lib.h"
28
29
30/**
31 * The main function of gnunet-base32
32 *
33 * @param argc number of arguments from the command line
34 * @param argv command line arguments
35 * @return 0 ok, 1 on error
36 */
37int
38main (int argc,
39 char *const *argv)
40{
41 int decode = 0;
42 const struct GNUNET_GETOPT_CommandLineOption options[] = {
43 GNUNET_GETOPT_option_flag ('d',
44 "decode",
45 gettext_noop ("run decoder modus, otherwise runs as encoder"),
46 &decode),
47 GNUNET_GETOPT_option_help ("Crockford base32 encoder/decoder"),
48 GNUNET_GETOPT_option_version (PACKAGE_VERSION),
49 GNUNET_GETOPT_OPTION_END
50 };
51 int ret;
52 char *in;
53 unsigned int in_size;
54 ssize_t iret;
55 char *out;
56 size_t out_size;
57
58 if (GNUNET_OK !=
59 GNUNET_STRINGS_get_utf8_args (argc, argv,
60 &argc, &argv))
61 return 2;
62 ret = GNUNET_GETOPT_run ("gnunet-base32",
63 options,
64 argc,
65 argv);
66 if (ret < 0)
67 return 1;
68 if (0 == ret)
69 return 0;
70 in_size = 0;
71 in = NULL;
72 iret = 1;
73 while (iret > 0)
74 {
75 /* read in blocks of 4k */
76 char buf[4092];
77
78 iret = read (0,
79 buf,
80 sizeof (buf));
81 if (iret < 0)
82 {
83 GNUNET_free (in);
84 return 2;
85 }
86 if (iret > 0)
87 {
88 if (iret + in_size < in_size)
89 {
90 GNUNET_break (0);
91 GNUNET_free (in);
92 return 1;
93 }
94 GNUNET_array_grow (in,
95 in_size,
96 in_size + iret);
97 memcpy (&in[in_size - iret],
98 buf,
99 iret);
100 }
101 }
102 if (decode)
103 {
104 /* This formula can overestimate by 1 byte, so we try both
105 out_size and out_size-1 below */
106 out_size = in_size * 5 / 8;
107 out = GNUNET_malloc (out_size);
108 if (GNUNET_OK !=
109 GNUNET_STRINGS_string_to_data (in,
110 in_size,
111 out,
112 out_size))
113 {
114 out_size--;
115 if (GNUNET_OK !=
116 GNUNET_STRINGS_string_to_data (in,
117 in_size,
118 out,
119 out_size))
120 {
121 GNUNET_free (out);
122 GNUNET_free (in);
123 return 3;
124 }
125 }
126 }
127 else
128 {
129 out = GNUNET_STRINGS_data_to_string_alloc (in,
130 in_size);
131 out_size = strlen (out);
132 }
133 {
134 size_t pos = 0;
135
136 while (pos < out_size)
137 {
138 iret = write (1,
139 &out[pos],
140 out_size - pos);
141 if (iret <= 0)
142 return 4;
143 pos += iret;
144 }
145 }
146 GNUNET_free (out);
147 GNUNET_free_nz ((void *) argv);
148 return 0;
149}
150
151
152/* end of gnunet-uri.c */
diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c
index 5c3dfc12e..fe8b6769f 100644
--- a/src/util/gnunet-scrypt.c
+++ b/src/util/gnunet-scrypt.c
@@ -290,8 +290,8 @@ run (void *cls,
290int 290int
291main (int argc, char *const *argv) 291main (int argc, char *const *argv)
292{ 292{
293 struct GNUNET_GETOPT_CommandLineOption options[] = 293 struct GNUNET_GETOPT_CommandLineOption options[] = {
294 { GNUNET_GETOPT_option_ulong ( 294 GNUNET_GETOPT_option_ulong (
295 'b', 295 'b',
296 "bits", 296 "bits",
297 "BITS", 297 "BITS",
@@ -315,7 +315,8 @@ main (int argc, char *const *argv)
315 gettext_noop ( 315 gettext_noop (
316 "time to wait between calculations"), 316 "time to wait between calculations"),
317 &proof_find_delay), 317 &proof_find_delay),
318 GNUNET_GETOPT_OPTION_END }; 318 GNUNET_GETOPT_OPTION_END
319 };
319 int ret; 320 int ret;
320 321
321 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) 322 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))