diff options
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. | ||
561 | AC_MSG_CHECKING(whether to enable texinfo4 switches) | 573 | AC_MSG_CHECKING(whether to enable texinfo4 switches) |
562 | AC_ARG_ENABLE([texinfo4], | 574 | AC_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 | ||
591 | AC_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.* | |||
7 | usr/share/locale/ | 7 | usr/share/locale/ |
8 | usr/share/gnunet/config.d/util.conf | 8 | usr/share/gnunet/config.d/util.conf |
9 | usr/bin/gnunet-arm | 9 | usr/bin/gnunet-arm |
10 | usr/bin/gnunet-base32 | ||
10 | usr/bin/gnunet-bugreport | 11 | usr/bin/gnunet-bugreport |
11 | usr/bin/gnunet-config | 12 | usr/bin/gnunet-config |
12 | usr/bin/gnunet-ecc | 13 | usr/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 | |||
2 | if DOCUMENTATION | 4 | if DOCUMENTATION |
3 | SUBDIRS = doxygen handbook tutorial | 5 | SUBDIRS = doxygen handbook tutorial |
4 | endif | 6 | endif |
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 | ||
4 | infoimagedir = $(infodir)/images | 4 | infoimagedir = $(infodir)/images |
5 | 5 | ||
6 | if ACTIVATE_TEXINFO4 | 6 | AM_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. | ||
15 | AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css | ||
16 | else | ||
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" | ||
23 | AM_MAKEINFOHTMLFLAGS = --no-split --css-ref="../style.css" --css-ref="../manual.css" | ||
24 | endif | ||
25 | 8 | ||
26 | dist_infoimage_DATA = \ | 9 | dist_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 | ||
81 | EXTRA_DIST = \ | 83 | EXTRA_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 | |||
9485 | to select a plugin and allocate bandwidth. The following key issues have been | 9485 | to select a plugin and allocate bandwidth. The following key issues have been |
9486 | identified with this design: | 9486 | identified 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 | ||
9565 | The new architecture is planned as follows: | 9560 | The new architecture is planned as follows: |
9566 | 9561 | ||
9567 | @verbatim | ||
9568 | |||
9569 | APPLICATIONS | ||
9570 | | | ||
9571 | | | ||
9572 | CORE -- TRANSPORT -- COMMUNICATOR(S) -- NAT | ||
9573 | \ / | ||
9574 | \ / | ||
9575 | PEERSTORE | ||
9576 | 9562 | ||
9577 | @end verbatim | 9563 | @image{images/tng,5in,,TNG architecture.} |
9578 | 9564 | ||
9579 | TRANSPORT's main objective is to establish bi-directional virtual links using a | 9565 | TRANSPORT's main objective is to establish bi-directional virtual links using a |
9580 | variety of possibly uni-directional communicators. Links undergo the following | 9566 | variety 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 | |||
1539 | where the name was encountered) and hence generate a | 1539 | where the name was encountered) and hence generate a |
1540 | valid GNS name. | 1540 | valid GNS name. |
1541 | 1541 | ||
1542 | GNS currently supports the following record types: | 1542 | The 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}. | ||
1544 | In addition, GNS supports DNS record types, such as A, AAAA or TXT. | ||
1545 | |||
1546 | In the following, we discuss GNS records with specific behaviour or special | ||
1547 | handling 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: | |||
1658 | TCP_REDIRECTS = 80:localhost4:8080 | 1650 | TCP_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 | |||
1664 | Those 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 | ||
1779 | Record 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 | ||
1786 | Record 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 | ||
1793 | Record 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 | ||
1800 | Record 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 | ||
1807 | Record 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 | ||
1814 | Record 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 | ||
1821 | Record 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 | ||
1828 | Record 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 | ||
1835 | Record 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 | ||
1842 | Record 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 | ||
1849 | Record 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 | ||
1856 | Record 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 | ||
11 | digraph 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 | ||
36 | By default, encodes data read from standard input into | ||
37 | Crockford base32 and writes the result to standard output. | ||
38 | The inverse operation is performed if the option | ||
39 | .Fl --decode | ||
40 | is given. Note that the tool keeps all of the data in | ||
41 | memory and is largely intended for quick debugging and | ||
42 | not for high performance. | ||
43 | .Bl -tag -width indent | ||
44 | .It Fl d | -decode | ||
45 | Run in decode mode instead of in encode mode. | ||
46 | .It Fl h | -help | ||
47 | Print short help on options. | ||
48 | .It Fl v | -version | ||
49 | Print GNUnet version number. | ||
50 | .El | ||
51 | .Sh SEE ALSO | ||
52 | The full documentation for gnunet is maintained as a Texinfo manual. | ||
53 | If the | ||
54 | .Xr info 1 | ||
55 | and gnunet programs are properly installed at your site, the command | ||
56 | .Pp | ||
57 | .Dl info gnunet | ||
58 | .Pp | ||
59 | should give you access to the complete handbook, | ||
60 | .Pp | ||
61 | .Dl info gnunet-c-tutorial | ||
62 | .Pp | ||
63 | will give you access to a tutorial for developers. | ||
64 | .sp | ||
65 | Depending 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 | ||
71 | Report bugs by using | ||
72 | .Lk https://bugs.gnunet.org | ||
73 | or 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 |
2 | docdir = $(datadir)/doc/gnunet/ | 2 | docdir = $(datadir)/doc/gnunet/ |
3 | 3 | ||
4 | if ACTIVATE_TEXINFO4 | 4 | AM_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. | ||
13 | AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css | ||
14 | else | ||
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" | ||
21 | AM_MAKEINFOHTMLFLAGS = --split --css-ref="../style.css" --css-ref="../manual.css" | ||
22 | endif | ||
23 | 6 | ||
24 | gnunet_tutorial_examples = \ | 7 | gnunet_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 | |||
10 | src/arm/gnunet-arm.c | 10 | src/arm/gnunet-arm.c |
11 | src/arm/gnunet-service-arm.c | 11 | src/arm/gnunet-service-arm.c |
12 | src/arm/mockup-service.c | 12 | src/arm/mockup-service.c |
13 | src/ats-tests/ats-testing-experiment.c | ||
14 | src/ats-tests/ats-testing-log.c | ||
15 | src/ats-tests/ats-testing-preferences.c | ||
16 | src/ats-tests/ats-testing-traffic.c | ||
17 | src/ats-tests/ats-testing.c | ||
18 | src/ats-tests/gnunet-ats-sim.c | ||
19 | src/ats-tests/gnunet-solver-eval.c | ||
20 | src/ats-tool/gnunet-ats.c | ||
13 | src/ats/ats_api_connectivity.c | 21 | src/ats/ats_api_connectivity.c |
14 | src/ats/ats_api_performance.c | 22 | src/ats/ats_api_performance.c |
15 | src/ats/ats_api_scanner.c | 23 | src/ats/ats_api_scanner.c |
16 | src/ats/ats_api_scheduling.c | 24 | src/ats/ats_api_scheduling.c |
17 | src/ats/gnunet-ats-solver-eval.c | 25 | src/ats/gnunet-ats-solver-eval.c |
18 | src/ats/gnunet-service-ats_addresses.c | ||
19 | src/ats/gnunet-service-ats.c | 26 | src/ats/gnunet-service-ats.c |
27 | src/ats/gnunet-service-ats_addresses.c | ||
20 | src/ats/gnunet-service-ats_connectivity.c | 28 | src/ats/gnunet-service-ats_connectivity.c |
21 | src/ats/gnunet-service-ats_normalization.c | 29 | src/ats/gnunet-service-ats_normalization.c |
22 | src/ats/gnunet-service-ats_performance.c | 30 | src/ats/gnunet-service-ats_performance.c |
@@ -25,14 +33,6 @@ src/ats/gnunet-service-ats_preferences.c | |||
25 | src/ats/gnunet-service-ats_reservations.c | 33 | src/ats/gnunet-service-ats_reservations.c |
26 | src/ats/gnunet-service-ats_scheduling.c | 34 | src/ats/gnunet-service-ats_scheduling.c |
27 | src/ats/plugin_ats_proportional.c | 35 | src/ats/plugin_ats_proportional.c |
28 | src/ats-tests/ats-testing.c | ||
29 | src/ats-tests/ats-testing-experiment.c | ||
30 | src/ats-tests/ats-testing-log.c | ||
31 | src/ats-tests/ats-testing-preferences.c | ||
32 | src/ats-tests/ats-testing-traffic.c | ||
33 | src/ats-tests/gnunet-ats-sim.c | ||
34 | src/ats-tests/gnunet-solver-eval.c | ||
35 | src/ats-tool/gnunet-ats.c | ||
36 | src/auction/gnunet-auction-create.c | 36 | src/auction/gnunet-auction-create.c |
37 | src/auction/gnunet-auction-info.c | 37 | src/auction/gnunet-auction-info.c |
38 | src/auction/gnunet-auction-join.c | 38 | src/auction/gnunet-auction-join.c |
@@ -50,8 +50,8 @@ src/cadet/cadet_api_list_peers.c | |||
50 | src/cadet/cadet_api_list_tunnels.c | 50 | src/cadet/cadet_api_list_tunnels.c |
51 | src/cadet/cadet_test_lib.c | 51 | src/cadet/cadet_test_lib.c |
52 | src/cadet/desirability_table.c | 52 | src/cadet/desirability_table.c |
53 | src/cadet/gnunet-cadet.c | ||
54 | src/cadet/gnunet-cadet-profiler.c | 53 | src/cadet/gnunet-cadet-profiler.c |
54 | src/cadet/gnunet-cadet.c | ||
55 | src/cadet/gnunet-service-cadet.c | 55 | src/cadet/gnunet-service-cadet.c |
56 | src/cadet/gnunet-service-cadet_channel.c | 56 | src/cadet/gnunet-service-cadet_channel.c |
57 | src/cadet/gnunet-service-cadet_connection.c | 57 | src/cadet/gnunet-service-cadet_connection.c |
@@ -67,15 +67,15 @@ src/consensus/gnunet-service-consensus.c | |||
67 | src/consensus/plugin_block_consensus.c | 67 | src/consensus/plugin_block_consensus.c |
68 | src/conversation/conversation_api.c | 68 | src/conversation/conversation_api.c |
69 | src/conversation/conversation_api_call.c | 69 | src/conversation/conversation_api_call.c |
70 | src/conversation/gnunet-conversation.c | ||
71 | src/conversation/gnunet-conversation-test.c | 70 | src/conversation/gnunet-conversation-test.c |
72 | src/conversation/gnunet_gst.c | 71 | src/conversation/gnunet-conversation.c |
73 | src/conversation/gnunet_gst_test.c | ||
74 | src/conversation/gnunet-helper-audio-playback.c | ||
75 | src/conversation/gnunet-helper-audio-playback-gst.c | 72 | src/conversation/gnunet-helper-audio-playback-gst.c |
76 | src/conversation/gnunet-helper-audio-record.c | 73 | src/conversation/gnunet-helper-audio-playback.c |
77 | src/conversation/gnunet-helper-audio-record-gst.c | 74 | src/conversation/gnunet-helper-audio-record-gst.c |
75 | src/conversation/gnunet-helper-audio-record.c | ||
78 | src/conversation/gnunet-service-conversation.c | 76 | src/conversation/gnunet-service-conversation.c |
77 | src/conversation/gnunet_gst.c | ||
78 | src/conversation/gnunet_gst_test.c | ||
79 | src/conversation/microphone.c | 79 | src/conversation/microphone.c |
80 | src/conversation/plugin_gnsrecord_conversation.c | 80 | src/conversation/plugin_gnsrecord_conversation.c |
81 | src/conversation/speaker.c | 81 | src/conversation/speaker.c |
@@ -105,7 +105,6 @@ src/dht/dht_api.c | |||
105 | src/dht/dht_test_lib.c | 105 | src/dht/dht_test_lib.c |
106 | src/dht/gnunet-dht-get.c | 106 | src/dht/gnunet-dht-get.c |
107 | src/dht/gnunet-dht-monitor.c | 107 | src/dht/gnunet-dht-monitor.c |
108 | src/dht/gnunet_dht_profiler.c | ||
109 | src/dht/gnunet-dht-put.c | 108 | src/dht/gnunet-dht-put.c |
110 | src/dht/gnunet-service-dht.c | 109 | src/dht/gnunet-service-dht.c |
111 | src/dht/gnunet-service-dht_clients.c | 110 | src/dht/gnunet-service-dht_clients.c |
@@ -114,6 +113,7 @@ src/dht/gnunet-service-dht_hello.c | |||
114 | src/dht/gnunet-service-dht_neighbours.c | 113 | src/dht/gnunet-service-dht_neighbours.c |
115 | src/dht/gnunet-service-dht_nse.c | 114 | src/dht/gnunet-service-dht_nse.c |
116 | src/dht/gnunet-service-dht_routing.c | 115 | src/dht/gnunet-service-dht_routing.c |
116 | src/dht/gnunet_dht_profiler.c | ||
117 | src/dht/plugin_block_dht.c | 117 | src/dht/plugin_block_dht.c |
118 | src/dns/dns_api.c | 118 | src/dns/dns_api.c |
119 | src/dns/gnunet-dns-monitor.c | 119 | src/dns/gnunet-dns-monitor.c |
@@ -148,8 +148,8 @@ src/fs/gnunet-auto-share.c | |||
148 | src/fs/gnunet-daemon-fsprofiler.c | 148 | src/fs/gnunet-daemon-fsprofiler.c |
149 | src/fs/gnunet-directory.c | 149 | src/fs/gnunet-directory.c |
150 | src/fs/gnunet-download.c | 150 | src/fs/gnunet-download.c |
151 | src/fs/gnunet-fs.c | ||
152 | src/fs/gnunet-fs-profiler.c | 151 | src/fs/gnunet-fs-profiler.c |
152 | src/fs/gnunet-fs.c | ||
153 | src/fs/gnunet-helper-fs-publish.c | 153 | src/fs/gnunet-helper-fs-publish.c |
154 | src/fs/gnunet-publish.c | 154 | src/fs/gnunet-publish.c |
155 | src/fs/gnunet-search.c | 155 | src/fs/gnunet-search.c |
@@ -169,9 +169,9 @@ src/gns/gns_tld_api.c | |||
169 | src/gns/gnunet-bcd.c | 169 | src/gns/gnunet-bcd.c |
170 | src/gns/gnunet-dns2gns.c | 170 | src/gns/gnunet-dns2gns.c |
171 | src/gns/gnunet-gns-benchmark.c | 171 | src/gns/gnunet-gns-benchmark.c |
172 | src/gns/gnunet-gns.c | ||
173 | src/gns/gnunet-gns-import.c | 172 | src/gns/gnunet-gns-import.c |
174 | src/gns/gnunet-gns-proxy.c | 173 | src/gns/gnunet-gns-proxy.c |
174 | src/gns/gnunet-gns.c | ||
175 | src/gns/gnunet-service-gns.c | 175 | src/gns/gnunet-service-gns.c |
176 | src/gns/gnunet-service-gns_interceptor.c | 176 | src/gns/gnunet-service-gns_interceptor.c |
177 | src/gns/gnunet-service-gns_resolver.c | 177 | src/gns/gnunet-service-gns_resolver.c |
@@ -189,8 +189,8 @@ src/gnsrecord/json_gnsrecord.c | |||
189 | src/gnsrecord/plugin_gnsrecord_dns.c | 189 | src/gnsrecord/plugin_gnsrecord_dns.c |
190 | src/hello/address.c | 190 | src/hello/address.c |
191 | src/hello/gnunet-hello.c | 191 | src/hello/gnunet-hello.c |
192 | src/hello/hello.c | ||
193 | src/hello/hello-ng.c | 192 | src/hello/hello-ng.c |
193 | src/hello/hello.c | ||
194 | src/hostlist/gnunet-daemon-hostlist.c | 194 | src/hostlist/gnunet-daemon-hostlist.c |
195 | src/hostlist/gnunet-daemon-hostlist_client.c | 195 | src/hostlist/gnunet-daemon-hostlist_client.c |
196 | src/hostlist/gnunet-daemon-hostlist_server.c | 196 | src/hostlist/gnunet-daemon-hostlist_server.c |
@@ -205,8 +205,8 @@ src/json/json_generator.c | |||
205 | src/json/json_helper.c | 205 | src/json/json_helper.c |
206 | src/json/json_mhd.c | 206 | src/json/json_mhd.c |
207 | src/messenger/gnunet-messenger.c | 207 | src/messenger/gnunet-messenger.c |
208 | src/messenger/gnunet-service-messenger_basement.c | ||
209 | src/messenger/gnunet-service-messenger.c | 208 | src/messenger/gnunet-service-messenger.c |
209 | src/messenger/gnunet-service-messenger_basement.c | ||
210 | src/messenger/gnunet-service-messenger_contact.c | 210 | src/messenger/gnunet-service-messenger_contact.c |
211 | src/messenger/gnunet-service-messenger_handle.c | 211 | src/messenger/gnunet-service-messenger_handle.c |
212 | src/messenger/gnunet-service-messenger_list_handles.c | 212 | src/messenger/gnunet-service-messenger_list_handles.c |
@@ -236,8 +236,8 @@ src/namecache/namecache_api.c | |||
236 | src/namecache/plugin_namecache_flat.c | 236 | src/namecache/plugin_namecache_flat.c |
237 | src/namecache/plugin_namecache_postgres.c | 237 | src/namecache/plugin_namecache_postgres.c |
238 | src/namecache/plugin_namecache_sqlite.c | 238 | src/namecache/plugin_namecache_sqlite.c |
239 | src/namestore/gnunet-namestore.c | ||
240 | src/namestore/gnunet-namestore-fcfsd.c | 239 | src/namestore/gnunet-namestore-fcfsd.c |
240 | src/namestore/gnunet-namestore.c | ||
241 | src/namestore/gnunet-service-namestore.c | 241 | src/namestore/gnunet-service-namestore.c |
242 | src/namestore/gnunet-zoneimport.c | 242 | src/namestore/gnunet-zoneimport.c |
243 | src/namestore/namestore_api.c | 243 | src/namestore/namestore_api.c |
@@ -263,17 +263,17 @@ src/nat/gnunet-service-nat_mini.c | |||
263 | src/nat/gnunet-service-nat_stun.c | 263 | src/nat/gnunet-service-nat_stun.c |
264 | src/nat/nat_api.c | 264 | src/nat/nat_api.c |
265 | src/nat/nat_api_stun.c | 265 | src/nat/nat_api_stun.c |
266 | src/nse/gnunet-nse.c | ||
267 | src/nse/gnunet-nse-profiler.c | 266 | src/nse/gnunet-nse-profiler.c |
267 | src/nse/gnunet-nse.c | ||
268 | src/nse/gnunet-service-nse.c | 268 | src/nse/gnunet-service-nse.c |
269 | src/nse/nse_api.c | 269 | src/nse/nse_api.c |
270 | src/nt/nt.c | 270 | src/nt/nt.c |
271 | src/peerinfo/gnunet-service-peerinfo.c | ||
272 | src/peerinfo/peerinfo_api.c | ||
273 | src/peerinfo/peerinfo_api_notify.c | ||
274 | src/peerinfo-tool/gnunet-peerinfo.c | 271 | src/peerinfo-tool/gnunet-peerinfo.c |
275 | src/peerinfo-tool/gnunet-peerinfo_plugins.c | 272 | src/peerinfo-tool/gnunet-peerinfo_plugins.c |
276 | src/peerinfo-tool/plugin_rest_peerinfo.c | 273 | src/peerinfo-tool/plugin_rest_peerinfo.c |
274 | src/peerinfo/gnunet-service-peerinfo.c | ||
275 | src/peerinfo/peerinfo_api.c | ||
276 | src/peerinfo/peerinfo_api_notify.c | ||
277 | src/peerstore/gnunet-peerstore.c | 277 | src/peerstore/gnunet-peerstore.c |
278 | src/peerstore/gnunet-service-peerstore.c | 278 | src/peerstore/gnunet-service-peerstore.c |
279 | src/peerstore/peerstore_api.c | 279 | src/peerstore/peerstore_api.c |
@@ -319,27 +319,27 @@ src/rest/gnunet-rest-server.c | |||
319 | src/rest/plugin_rest_config.c | 319 | src/rest/plugin_rest_config.c |
320 | src/rest/plugin_rest_copying.c | 320 | src/rest/plugin_rest_copying.c |
321 | src/rest/rest.c | 321 | src/rest/rest.c |
322 | src/revocation/gnunet-revocation.c | ||
323 | src/revocation/gnunet-revocation-tvg.c | 322 | src/revocation/gnunet-revocation-tvg.c |
323 | src/revocation/gnunet-revocation.c | ||
324 | src/revocation/gnunet-service-revocation.c | 324 | src/revocation/gnunet-service-revocation.c |
325 | src/revocation/plugin_block_revocation.c | 325 | src/revocation/plugin_block_revocation.c |
326 | src/revocation/revocation_api.c | 326 | src/revocation/revocation_api.c |
327 | src/rps/gnunet-rps.c | ||
328 | src/rps/gnunet-rps-profiler.c | 327 | src/rps/gnunet-rps-profiler.c |
328 | src/rps/gnunet-rps.c | ||
329 | src/rps/gnunet-service-rps.c | 329 | src/rps/gnunet-service-rps.c |
330 | src/rps/gnunet-service-rps_custommap.c | 330 | src/rps/gnunet-service-rps_custommap.c |
331 | src/rps/gnunet-service-rps_sampler.c | 331 | src/rps/gnunet-service-rps_sampler.c |
332 | src/rps/gnunet-service-rps_sampler_elem.c | 332 | src/rps/gnunet-service-rps_sampler_elem.c |
333 | src/rps/gnunet-service-rps_view.c | 333 | src/rps/gnunet-service-rps_view.c |
334 | src/rps/rps_api.c | ||
335 | src/rps/rps-sampler_client.c | 334 | src/rps/rps-sampler_client.c |
336 | src/rps/rps-sampler_common.c | 335 | src/rps/rps-sampler_common.c |
337 | src/rps/rps-test_util.c | 336 | src/rps/rps-test_util.c |
337 | src/rps/rps_api.c | ||
338 | src/scalarproduct/gnunet-scalarproduct.c | 338 | src/scalarproduct/gnunet-scalarproduct.c |
339 | src/scalarproduct/gnunet-service-scalarproduct_alice.c | ||
340 | src/scalarproduct/gnunet-service-scalarproduct_bob.c | ||
341 | src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c | 339 | src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c |
342 | src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c | 340 | src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c |
341 | src/scalarproduct/gnunet-service-scalarproduct_alice.c | ||
342 | src/scalarproduct/gnunet-service-scalarproduct_bob.c | ||
343 | src/scalarproduct/scalarproduct_api.c | 343 | src/scalarproduct/scalarproduct_api.c |
344 | src/secretsharing/gnunet-secretsharing-profiler.c | 344 | src/secretsharing/gnunet-secretsharing-profiler.c |
345 | src/secretsharing/gnunet-service-secretsharing.c | 345 | src/secretsharing/gnunet-service-secretsharing.c |
@@ -353,12 +353,12 @@ src/set/gnunet-set-ibf-profiler.c | |||
353 | src/set/gnunet-set-profiler.c | 353 | src/set/gnunet-set-profiler.c |
354 | src/set/ibf.c | 354 | src/set/ibf.c |
355 | src/set/ibf_sim.c | 355 | src/set/ibf_sim.c |
356 | src/set/plugin_block_set_test.c | ||
357 | src/set/set_api.c | ||
356 | src/seti/gnunet-service-seti.c | 358 | src/seti/gnunet-service-seti.c |
357 | src/seti/gnunet-seti-profiler.c | 359 | src/seti/gnunet-seti-profiler.c |
358 | src/seti/plugin_block_seti_test.c | 360 | src/seti/plugin_block_seti_test.c |
359 | src/seti/seti_api.c | 361 | src/seti/seti_api.c |
360 | src/set/plugin_block_set_test.c | ||
361 | src/set/set_api.c | ||
362 | src/setu/gnunet-service-setu.c | 362 | src/setu/gnunet-service-setu.c |
363 | src/setu/gnunet-service-setu_strata_estimator.c | 363 | src/setu/gnunet-service-setu_strata_estimator.c |
364 | src/setu/gnunet-setu-ibf-profiler.c | 364 | src/setu/gnunet-setu-ibf-profiler.c |
@@ -377,15 +377,16 @@ src/statistics/gnunet-statistics.c | |||
377 | src/statistics/statistics_api.c | 377 | src/statistics/statistics_api.c |
378 | src/template/gnunet-service-template.c | 378 | src/template/gnunet-service-template.c |
379 | src/template/gnunet-template.c | 379 | src/template/gnunet-template.c |
380 | src/testbed-logger/gnunet-service-testbed-logger.c | ||
381 | src/testbed-logger/testbed_logger_api.c | ||
380 | src/testbed/generate-underlay-topology.c | 382 | src/testbed/generate-underlay-topology.c |
381 | src/testbed/gnunet-daemon-latency-logger.c | 383 | src/testbed/gnunet-daemon-latency-logger.c |
382 | src/testbed/gnunet-daemon-testbed-blacklist.c | 384 | src/testbed/gnunet-daemon-testbed-blacklist.c |
383 | src/testbed/gnunet-daemon-testbed-underlay.c | 385 | src/testbed/gnunet-daemon-testbed-underlay.c |
384 | src/testbed/gnunet-helper-testbed.c | 386 | src/testbed/gnunet-helper-testbed.c |
385 | src/testbed/gnunet_mpi_test.c | ||
386 | src/testbed/gnunet-service-test-barriers.c | 387 | src/testbed/gnunet-service-test-barriers.c |
387 | src/testbed/gnunet-service-testbed_barriers.c | ||
388 | src/testbed/gnunet-service-testbed.c | 388 | src/testbed/gnunet-service-testbed.c |
389 | src/testbed/gnunet-service-testbed_barriers.c | ||
389 | src/testbed/gnunet-service-testbed_cache.c | 390 | src/testbed/gnunet-service-testbed_cache.c |
390 | src/testbed/gnunet-service-testbed_connectionpool.c | 391 | src/testbed/gnunet-service-testbed_connectionpool.c |
391 | src/testbed/gnunet-service-testbed_cpustatus.c | 392 | src/testbed/gnunet-service-testbed_cpustatus.c |
@@ -393,20 +394,19 @@ src/testbed/gnunet-service-testbed_links.c | |||
393 | src/testbed/gnunet-service-testbed_meminfo.c | 394 | src/testbed/gnunet-service-testbed_meminfo.c |
394 | src/testbed/gnunet-service-testbed_oc.c | 395 | src/testbed/gnunet-service-testbed_oc.c |
395 | src/testbed/gnunet-service-testbed_peers.c | 396 | src/testbed/gnunet-service-testbed_peers.c |
396 | src/testbed/gnunet_testbed_mpi_spawn.c | ||
397 | src/testbed/gnunet-testbed-profiler.c | 397 | src/testbed/gnunet-testbed-profiler.c |
398 | src/testbed-logger/gnunet-service-testbed-logger.c | 398 | src/testbed/gnunet_mpi_test.c |
399 | src/testbed-logger/testbed_logger_api.c | 399 | src/testbed/gnunet_testbed_mpi_spawn.c |
400 | src/testbed/testbed_api_barriers.c | ||
401 | src/testbed/testbed_api.c | 400 | src/testbed/testbed_api.c |
401 | src/testbed/testbed_api_barriers.c | ||
402 | src/testbed/testbed_api_hosts.c | 402 | src/testbed/testbed_api_hosts.c |
403 | src/testbed/testbed_api_operations.c | 403 | src/testbed/testbed_api_operations.c |
404 | src/testbed/testbed_api_peers.c | 404 | src/testbed/testbed_api_peers.c |
405 | src/testbed/testbed_api_sd.c | 405 | src/testbed/testbed_api_sd.c |
406 | src/testbed/testbed_api_services.c | 406 | src/testbed/testbed_api_services.c |
407 | src/testbed/testbed_api_statistics.c | 407 | src/testbed/testbed_api_statistics.c |
408 | src/testbed/testbed_api_testbed.c | ||
409 | src/testbed/testbed_api_test.c | 408 | src/testbed/testbed_api_test.c |
409 | src/testbed/testbed_api_testbed.c | ||
410 | src/testbed/testbed_api_topology.c | 410 | src/testbed/testbed_api_topology.c |
411 | src/testbed/testbed_api_underlay.c | 411 | src/testbed/testbed_api_underlay.c |
412 | src/testing/gnunet-testing.c | 412 | src/testing/gnunet-testing.c |
@@ -418,34 +418,45 @@ src/transport/gnunet-communicator-tcp.c | |||
418 | src/transport/gnunet-communicator-udp.c | 418 | src/transport/gnunet-communicator-udp.c |
419 | src/transport/gnunet-communicator-unix.c | 419 | src/transport/gnunet-communicator-unix.c |
420 | src/transport/gnunet-helper-transport-bluetooth.c | 420 | src/transport/gnunet-helper-transport-bluetooth.c |
421 | src/transport/gnunet-helper-transport-wlan.c | ||
422 | src/transport/gnunet-helper-transport-wlan-dummy.c | 421 | src/transport/gnunet-helper-transport-wlan-dummy.c |
422 | src/transport/gnunet-helper-transport-wlan.c | ||
423 | src/transport/gnunet-service-tng.c | 423 | src/transport/gnunet-service-tng.c |
424 | src/transport/gnunet-service-transport_ats.c | ||
425 | src/transport/gnunet-service-transport.c | 424 | src/transport/gnunet-service-transport.c |
425 | src/transport/gnunet-service-transport_ats.c | ||
426 | src/transport/gnunet-service-transport_hello.c | 426 | src/transport/gnunet-service-transport_hello.c |
427 | src/transport/gnunet-service-transport_manipulation.c | 427 | src/transport/gnunet-service-transport_manipulation.c |
428 | src/transport/gnunet-service-transport_neighbours.c | 428 | src/transport/gnunet-service-transport_neighbours.c |
429 | src/transport/gnunet-service-transport_plugins.c | 429 | src/transport/gnunet-service-transport_plugins.c |
430 | src/transport/gnunet-service-transport_validation.c | 430 | src/transport/gnunet-service-transport_validation.c |
431 | src/transport/gnunet-transport.c | ||
432 | src/transport/gnunet-transport-profiler.c | 431 | src/transport/gnunet-transport-profiler.c |
433 | src/transport/gnunet-transport-wlan-receiver.c | 432 | src/transport/gnunet-transport-wlan-receiver.c |
434 | src/transport/gnunet-transport-wlan-sender.c | 433 | src/transport/gnunet-transport-wlan-sender.c |
434 | src/transport/gnunet-transport.c | ||
435 | src/transport/plugin_transport_http_client.c | 435 | src/transport/plugin_transport_http_client.c |
436 | src/transport/plugin_transport_http_common.c | 436 | src/transport/plugin_transport_http_common.c |
437 | src/transport/plugin_transport_http_server.c | 437 | src/transport/plugin_transport_http_server.c |
438 | src/transport/plugin_transport_smtp.c | 438 | src/transport/plugin_transport_smtp.c |
439 | src/transport/plugin_transport_tcp.c | 439 | src/transport/plugin_transport_tcp.c |
440 | src/transport/plugin_transport_template.c | 440 | src/transport/plugin_transport_template.c |
441 | src/transport/plugin_transport_udp_broadcasting.c | ||
442 | src/transport/plugin_transport_udp.c | 441 | src/transport/plugin_transport_udp.c |
442 | src/transport/plugin_transport_udp_broadcasting.c | ||
443 | src/transport/plugin_transport_unix.c | 443 | src/transport/plugin_transport_unix.c |
444 | src/transport/plugin_transport_wlan.c | 444 | src/transport/plugin_transport_wlan.c |
445 | src/transport/tcp_connection_legacy.c | 445 | src/transport/tcp_connection_legacy.c |
446 | src/transport/tcp_server_legacy.c | 446 | src/transport/tcp_server_legacy.c |
447 | src/transport/tcp_server_mst_legacy.c | 447 | src/transport/tcp_server_mst_legacy.c |
448 | src/transport/tcp_service_legacy.c | 448 | src/transport/tcp_service_legacy.c |
449 | src/transport/transport-testing-communicator.c | ||
450 | src/transport/transport-testing-filenames.c | ||
451 | src/transport/transport-testing-filenames2.c | ||
452 | src/transport/transport-testing-loggers.c | ||
453 | src/transport/transport-testing-loggers2.c | ||
454 | src/transport/transport-testing-main.c | ||
455 | src/transport/transport-testing-main2.c | ||
456 | src/transport/transport-testing-send.c | ||
457 | src/transport/transport-testing-send2.c | ||
458 | src/transport/transport-testing.c | ||
459 | src/transport/transport-testing2.c | ||
449 | src/transport/transport_api2_application.c | 460 | src/transport/transport_api2_application.c |
450 | src/transport/transport_api2_communication.c | 461 | src/transport/transport_api2_communication.c |
451 | src/transport/transport_api2_core.c | 462 | src/transport/transport_api2_core.c |
@@ -458,17 +469,6 @@ src/transport/transport_api_manipulation.c | |||
458 | src/transport/transport_api_monitor_peers.c | 469 | src/transport/transport_api_monitor_peers.c |
459 | src/transport/transport_api_monitor_plugins.c | 470 | src/transport/transport_api_monitor_plugins.c |
460 | src/transport/transport_api_offer_hello.c | 471 | src/transport/transport_api_offer_hello.c |
461 | src/transport/transport-testing2.c | ||
462 | src/transport/transport-testing.c | ||
463 | src/transport/transport-testing-communicator.c | ||
464 | src/transport/transport-testing-filenames2.c | ||
465 | src/transport/transport-testing-filenames.c | ||
466 | src/transport/transport-testing-loggers2.c | ||
467 | src/transport/transport-testing-loggers.c | ||
468 | src/transport/transport-testing-main2.c | ||
469 | src/transport/transport-testing-main.c | ||
470 | src/transport/transport-testing-send2.c | ||
471 | src/transport/transport-testing-send.c | ||
472 | src/util/bandwidth.c | 472 | src/util/bandwidth.c |
473 | src/util/benchmark.c | 473 | src/util/benchmark.c |
474 | src/util/bio.c | 474 | src/util/bio.c |
@@ -483,8 +483,8 @@ src/util/consttime_memcmp.c | |||
483 | src/util/container_bloomfilter.c | 483 | src/util/container_bloomfilter.c |
484 | src/util/container_heap.c | 484 | src/util/container_heap.c |
485 | src/util/container_meta_data.c | 485 | src/util/container_meta_data.c |
486 | src/util/container_multihashmap32.c | ||
487 | src/util/container_multihashmap.c | 486 | src/util/container_multihashmap.c |
487 | src/util/container_multihashmap32.c | ||
488 | src/util/container_multipeermap.c | 488 | src/util/container_multipeermap.c |
489 | src/util/container_multishortmap.c | 489 | src/util/container_multishortmap.c |
490 | src/util/container_multiuuidmap.c | 490 | src/util/container_multiuuidmap.c |
@@ -508,8 +508,8 @@ src/util/dnsparser.c | |||
508 | src/util/dnsstub.c | 508 | src/util/dnsstub.c |
509 | src/util/getopt.c | 509 | src/util/getopt.c |
510 | src/util/getopt_helpers.c | 510 | src/util/getopt_helpers.c |
511 | src/util/gnunet-config.c | ||
512 | src/util/gnunet-config-diff.c | 511 | src/util/gnunet-config-diff.c |
512 | src/util/gnunet-config.c | ||
513 | src/util/gnunet-crypto-tvg.c | 513 | src/util/gnunet-crypto-tvg.c |
514 | src/util/gnunet-ecc.c | 514 | src/util/gnunet-ecc.c |
515 | src/util/gnunet-qr.c | 515 | src/util/gnunet-qr.c |
@@ -547,8 +547,8 @@ src/vpn/gnunet-helper-vpn.c | |||
547 | src/vpn/gnunet-service-vpn.c | 547 | src/vpn/gnunet-service-vpn.c |
548 | src/vpn/gnunet-vpn.c | 548 | src/vpn/gnunet-vpn.c |
549 | src/vpn/vpn_api.c | 549 | src/vpn/vpn_api.c |
550 | src/zonemaster/gnunet-service-zonemaster.c | ||
551 | src/zonemaster/gnunet-service-zonemaster-monitor.c | 550 | src/zonemaster/gnunet-service-zonemaster-monitor.c |
551 | src/zonemaster/gnunet-service-zonemaster.c | ||
552 | src/fs/fs_api.h | 552 | src/fs/fs_api.h |
553 | src/testbed/testbed_api.h | 553 | src/testbed/testbed_api.h |
554 | src/testbed/testbed_api_operations.h | 554 | src/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 | ||
33 | extern "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; | |||
77 | static void | 77 | static void |
78 | do_shutdown () | 78 | do_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 () | |||
105 | static void | 107 | static void |
106 | shutdown_task (void *cls) | 108 | shutdown_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 | */ |
2773 | static struct GNUNET_TIME_Absolute hello_mono_time; | 2773 | static 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 | */ | ||
2779 | static 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 | ||
3685 | static void | ||
3686 | do_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 | |||
10174 | static void | ||
10175 | shutdown_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/ | |||
6 | BINARY = gnunet-service-tng | 6 | BINARY = gnunet-service-tng |
7 | PLUGINS = tcp | 7 | PLUGINS = tcp |
8 | #PREFIX = valgrind --log-file=/tmp/vg_peer1-%p | 8 | #PREFIX = valgrind --log-file=/tmp/vg_peer1-%p |
9 | UNIXPATH = $GNUNET_RUNTIME_DIR/tng-p1.sock | ||
9 | 10 | ||
10 | [communicator-tcp] | 11 | [communicator-tcp] |
11 | BINARY = gnunet-communicator-tcp | 12 | BINARY = gnunet-communicator-tcp |
12 | BINDTO = 60002 | 13 | BINDTO = 60002 |
13 | DISABLE_V6 = YES | 14 | DISABLE_V6 = YES |
14 | IMMEDIATE_START = YES | 15 | IMMEDIATE_START = YES |
16 | UNIXPATH = $GNUNET_RUNTIME_DIR/tcp-comm-p1.sock | ||
17 | #PREFIX = valgrind --log-file=/tmp/vg_cpeer1-%p | ||
15 | 18 | ||
16 | [peerstore] | 19 | [peerstore] |
17 | IMMEDIATE_START = YES | 20 | IMMEDIATE_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] |
6 | BINARY = gnunet-service-tng | 6 | BINARY = gnunet-service-tng |
7 | #PREFIX = valgrind --log-file=/tmp/vg_peer2-%p | 7 | #PREFIX = valgrind --log-file=/tmp/vg_peer2-%p |
8 | UNIXPATH = $GNUNET_RUNTIME_DIR/tng-p2.sock | ||
8 | 9 | ||
9 | [communicator-tcp] | 10 | [communicator-tcp] |
10 | BINARY = gnunet-communicator-tcp | 11 | BINARY = gnunet-communicator-tcp |
11 | BINDTO = 60003 | 12 | BINDTO = 60003 |
12 | DISABLE_V6 = YES | 13 | DISABLE_V6 = YES |
13 | IMMEDIATE_START = YES | 14 | IMMEDIATE_START = YES |
15 | #PREFIX = valgrind --log-file=/tmp/vg_comm2-%p | ||
16 | UNIXPATH = $GNUNET_RUNTIME_DIR/tcp-comm-p2.sock | ||
14 | 17 | ||
15 | [peerstore] | 18 | [peerstore] |
16 | IMMEDIATE_START = YES | 19 | IMMEDIATE_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 | ||
331 | static void | ||
332 | retrieve_hello (void *cls); | ||
331 | 333 | ||
332 | static void | 334 | static void |
333 | hello_iter_cb (void *cb_cls, | 335 | hello_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 | |||
363 | static void | 367 | static void |
364 | retrieve_hello(void *cls) | 368 | retrieve_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 | /* |
731 | static void | 740 | static void |
732 | hello_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 | |||
80 | perf_malloc | 80 | perf_malloc |
81 | perf_mq | 81 | perf_mq |
82 | perf_scheduler | 82 | perf_scheduler |
83 | gnunet-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 | ||
154 | bin_PROGRAMS = \ | 154 | bin_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 | ||
207 | gnunet_base32_SOURCES = \ | ||
208 | gnunet-base32.c | ||
209 | gnunet_base32_LDADD = \ | ||
210 | libgnunetutil.la \ | ||
211 | $(GN_LIBINTL) | ||
212 | |||
206 | gnunet_scrypt_SOURCES = \ | 213 | gnunet_scrypt_SOURCES = \ |
207 | gnunet-scrypt.c | 214 | gnunet-scrypt.c |
208 | gnunet_scrypt_LDADD = \ | 215 | gnunet_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 | */ | ||
37 | int | ||
38 | main (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, | |||
290 | int | 290 | int |
291 | main (int argc, char *const *argv) | 291 | main (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)) |