diff options
201 files changed, 4841 insertions, 2565 deletions
diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 000000000..687863811 --- /dev/null +++ b/.dir-locals.el | |||
@@ -0,0 +1,16 @@ | |||
1 | ;; Per-directory local variables for GNU Emacs 23 and later. | ||
2 | |||
3 | ((nil | ||
4 | . ((fill-column . 78) | ||
5 | (tab-width . 4) | ||
6 | (indent-tabs-mode . nil) | ||
7 | (show-trailing-whitespace . t) | ||
8 | (c-basic-offset . 2) | ||
9 | (ispell-check-comments . exclusive) | ||
10 | (ispell-local-dictionary . "american") | ||
11 | (safe-local-variable-values | ||
12 | '((c-default-style . "gnu") | ||
13 | (sentence-end-double-space . f) | ||
14 | (eval add-hook 'prog-mode-hook #'flyspell-prog-mode) | ||
15 | (flyspell-issue-message-flag . f) ; avoid messages for every word | ||
16 | ))))) | ||
@@ -1,3 +1,30 @@ | |||
1 | Wed 03 Apr 2019 01:15:57 PM CEST | ||
2 | Fixed a few test case regressions (GNS, FS). -CG | ||
3 | |||
4 | Mon Apr 1 22:00:00 UTC 2019 | ||
5 | documentation/buildsystem: manpages and other documentation parts | ||
6 | can now be build more controlled again, this fixes the regression | ||
7 | in 0.11.0 where documentation was an on/off switch. | ||
8 | New introduced: --enable-include-manpages. | ||
9 | Fixed: texi2mdoc integration (--enable-texi2mdoc-generation). | ||
10 | buildsystem: decrease python dependency to 3.4 from | ||
11 | previously 3.7. | ||
12 | -ng0 | ||
13 | |||
14 | Tue Mar 12 10:06:17 CET 2019 | ||
15 | REST: Move back from rest-plugin into respective subsystem directories. | ||
16 | |||
17 | Mon Mar 11 02:47:55 CET 2019 | ||
18 | Make configure complain if no working libidn is detected. -CG | ||
19 | |||
20 | Sat Mar 9 15:58:45 2019 +0100 | ||
21 | REST: Config option for address bind. Defaults to localhost. | ||
22 | GNS: dns2gns/gns-proxy config option for address bind. Defaults to localhost. | ||
23 | |||
24 | Sat Mar 9 01:58:22 CET 2019 | ||
25 | gnunet-publish now by default does not expose the creation time, | ||
26 | option -d no longer exists, to enable the old behavior use -E. -CG | ||
27 | |||
1 | Sat Mar 2 14:23:10 2019 +0100 | 28 | Sat Mar 2 14:23:10 2019 +0100 |
2 | utils: gnunet-qr.py now installed under pkgshare instead of bin | 29 | utils: gnunet-qr.py now installed under pkgshare instead of bin |
3 | 30 | ||
@@ -5,12 +32,12 @@ Thu Feb 28 19:07:59 CET 2019 | |||
5 | CADET: Fix in order, unrealiable message ordering | 32 | CADET: Fix in order, unrealiable message ordering |
6 | 33 | ||
7 | Thu 28 Feb 2019 10:54:58 AM CET | 34 | Thu 28 Feb 2019 10:54:58 AM CET |
8 | Releasing GNUnet 0.11.0. -CG | 35 | Releasing GNUnet 0.11.0. -CG |
9 | 36 | ||
10 | Wed Jun 6 08:28:27 CEST 2018 | 37 | Wed Jun 6 08:28:27 CEST 2018 |
11 | Releasing GNUnet 0.11.0pre66. Let's try to keep a better | 38 | Releasing GNUnet 0.11.0pre66. Let's try to keep a better |
12 | ChangeLog again henceforth. -CG | 39 | ChangeLog again henceforth. -CG |
13 | 40 | ||
14 | Sat Jan 7 16:41:34 CET 2017 | 41 | Sat Jan 7 16:41:34 CET 2017 |
15 | Converting NAT library to new NAT service (and | 42 | Converting NAT library to new NAT service (and |
16 | splitting of nat-auto service for auto-configuration). -CG | 43 | splitting of nat-auto service for auto-configuration). -CG |
diff --git a/Makefile.am b/Makefile.am index fd18d7c3c..f54ff203f 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -1,13 +1,21 @@ | |||
1 | # This Makefile.am is in the public domain | 1 | # This Makefile.am is in the public domain |
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | 2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include |
3 | 3 | ||
4 | # only documentation (ALL of the documentation) | ||
4 | if DOCUMENTATION_ONLY | 5 | if DOCUMENTATION_ONLY |
5 | SUBDIRS = doc | 6 | SUBDIRS = doc |
6 | else | 7 | else |
7 | SUBDIRS = m4 src po pkgconfig | 8 | SUBDIRS = m4 src po pkgconfig |
9 | endif | ||
10 | |||
11 | # documentation on / off switch (affects all of the documentation) | ||
8 | if DOCUMENTATION | 12 | if DOCUMENTATION |
9 | SUBDIRS += doc | 13 | SUBDIRS += doc |
10 | endif | 14 | endif |
15 | |||
16 | # only manpages, needs "doc" subdir | ||
17 | if INCLUDE_MANPAGES | ||
18 | SUBDIRS += doc | ||
11 | endif | 19 | endif |
12 | 20 | ||
13 | if !TALER_ONLY | 21 | if !TALER_ONLY |
@@ -1,5 +1,26 @@ | |||
1 | Welcome to GNUnet | 1 | Welcome to GNUnet |
2 | 2 | ||
3 | ToC | ||
4 | === | ||
5 | |||
6 | * ToC | ||
7 | * What is GNUnet? | ||
8 | * Dependencies | ||
9 | o direct dependencies | ||
10 | o test suite dependencies | ||
11 | o optional dependencies | ||
12 | o autotools | ||
13 | * Requirements | ||
14 | * How to install | ||
15 | o binary packages | ||
16 | o Scope of Operating System support | ||
17 | o Building GNUnet from source | ||
18 | * Configuration | ||
19 | * Usage | ||
20 | * Hacking GNUnet | ||
21 | * Running HTTP on port 80 and HTTPS on port 443 | ||
22 | * Further Reading | ||
23 | * Stay tuned | ||
3 | 24 | ||
4 | What is GNUnet? | 25 | What is GNUnet? |
5 | =============== | 26 | =============== |
@@ -31,63 +52,93 @@ Dependencies: | |||
31 | ============= | 52 | ============= |
32 | 53 | ||
33 | These are the direct dependencies for running GNUnet: | 54 | These are the direct dependencies for running GNUnet: |
55 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
34 | 56 | ||
35 | - libmicrohttpd >= 0.9.42 | 57 | - Bash (for some scripts) |
58 | - gettext | ||
59 | - gnutls >= 3.2.12 (highly recommended a gnutls | ||
60 | linked against libunbound) | ||
61 | - A curl build against gnutls, or gnurl: | ||
62 | * libgnurl >= 7.35.0 (recommended, available from | ||
63 | https://gnunet.org/en/gnurl.html) | ||
64 | or | ||
65 | * libcurl >= 7.35.0 (alternative to libgnurl) | ||
36 | - libgcrypt >= 1.6 | 66 | - libgcrypt >= 1.6 |
37 | - libgnurl >= 7.35.0 (recommended, available from https://gnunet.org/en/gnurl.html) | ||
38 | - libcurl >= 7.35.0 (alternative to libgnurl) | ||
39 | - libunistring >= 0.9.2 | 67 | - libunistring >= 0.9.2 |
40 | - gnutls >= 3.2.12 (highly recommended a gnutls linked against libunbound) | ||
41 | - libidn: | 68 | - libidn: |
42 | - libidn2 (prefered) | 69 | * libidn2 (prefered) |
43 | or | 70 | or |
44 | - libidn >= 1.0 | 71 | * libidn >= 1.0 |
45 | - libextractor >= 0.6.1 (highly recommended) | 72 | - libmicrohttpd >= 0.9.52 |
46 | - openssl >= 1.0 (binary, used to generate X.509 certificate | 73 | - makeinfo >= 4.8 |
47 | for gnunet-gns-proxy-setup-ca) | 74 | - make[*3] |
48 | - nss (certutil binary, for | 75 | - nss (certutil binary, for |
49 | gnunet-gns-proxy-setup-ca) | 76 | gnunet-gns-proxy-setup-ca) |
50 | - libltdl >= 2.2 (part of GNU libtool) | 77 | - openssl >= 1.0 (binary, used to generate |
51 | - sqlite >= 3.8 (default database, required) | 78 | X.509 certificate |
52 | - mysql >= 5.1 (alternative to sqlite) | 79 | for gnunet-gns-proxy-setup-ca) |
53 | - postgres >= 9.5 (alternative to sqlite) | 80 | - A Posix shell (for some scripts) |
54 | - Texinfo >= 5.2 [*1] | 81 | - Texinfo >= 5.2 [*1] |
55 | - makeinfo >= 4.8 | 82 | - libltdl >= 2.2 (part of GNU libtool) |
56 | - make[*3] | 83 | - 1 or more databases: |
84 | * sqlite >= 3.8 (default database, required) | ||
85 | and/or | ||
86 | * mysql >= 5.1 (alternative to sqlite) | ||
87 | and/or | ||
88 | * postgres >= 9.5 (alternative to sqlite) | ||
57 | - which (contrib/apparmor(?), gnunet-bugreport, | 89 | - which (contrib/apparmor(?), gnunet-bugreport, |
58 | tests (dns, gns, namestore, | 90 | and possibly more) |
59 | scalarproduct) and possibly more) | ||
60 | - gettext | ||
61 | - zlib | 91 | - zlib |
62 | 92 | ||
63 | |||
64 | These are the dependencies for GNUnet's testsuite: | 93 | These are the dependencies for GNUnet's testsuite: |
94 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
65 | 95 | ||
66 | - Bash (optional (?[*4]), for some tests) | 96 | - Bash (for some tests[*4]) |
67 | - python >= 3.7 (only python 3.7 is supported) | 97 | - A Posix Shell (for some tests) |
68 | - python-future >= 3.7 (only python 3.7 is supported) | 98 | - python >= 3.4 (3.4 and higher technically supported, |
69 | - which | 99 | at least python 3.7 tested to work) |
100 | - base tools | ||
101 | - mostly: | ||
102 | - bc, | ||
103 | - curl, | ||
104 | - sed, | ||
105 | - awk, | ||
106 | - which | ||
70 | 107 | ||
71 | 108 | ||
72 | These are the optional dependencies: | 109 | These are the optional dependencies: |
110 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
111 | |||
112 | - awk (for linting tests) | ||
113 | - Bash (for Docker and Vagrant) | ||
114 | - bluez (for bluetooth support) | ||
115 | - grof (for linting of man pages) | ||
116 | - guile 1.6.4 (or later up to 1.8?, for | ||
117 | gnunet-download-manager) | ||
73 | 118 | ||
119 | - libextractor >= 0.6.1 (highly recommended[*5]) | ||
120 | - libjansson | ||
121 | - libglpk >= 4.45 (for experimental code) | ||
74 | - libopus >= 1.0.1 (for experimental conversation tool) | 122 | - libopus >= 1.0.1 (for experimental conversation tool) |
75 | - libpulse >= 2.0 (for experimental conversation tool) | 123 | - libpulse >= 2.0 (for experimental conversation tool) |
76 | - libogg >= 1.3.0 (for experimental conversation tool) | 124 | - libogg >= 1.3.0 (for experimental conversation tool) |
77 | - libnss (certtool binary (for convenient installation of GNS proxy)) | 125 | - libnss (certtool binary (for convenient |
126 | installation of GNS proxy)) | ||
78 | - libzbar >= 0.10 (for gnunet-qr) | 127 | - libzbar >= 0.10 (for gnunet-qr) |
128 | - libpbc >= 0.5.14 (for Attribute-Based Encryption and | ||
129 | Identity Provider functionality) | ||
130 | - libgabe (for Attribute-Based Encryption and | ||
131 | Identity Provider functionality, from | ||
132 | https://github.com/schanzen/libgabe) | ||
133 | - mandoc (for linting of man pages, generation of | ||
134 | html output of man pages) | ||
135 | - miniupnpc | ||
136 | - perl5 (for some utilities) | ||
79 | - TeX Live >= 2012 (for gnunet-bcd[*]) | 137 | - TeX Live >= 2012 (for gnunet-bcd[*]) |
80 | - texi2mdoc (for automatic mdoc generation [*2]) | 138 | - texi2mdoc (for automatic mdoc generation [*2]) |
81 | - libglpk >= 4.45 (for experimental code) | ||
82 | - perl5 (for some utilities) | ||
83 | - guile 1.6.4 (or later up to 1.8?, for gnunet-download-manager) | ||
84 | - bluez (for bluetooth support) | ||
85 | - miniupnpc | ||
86 | - libpbc >= 0.5.14 (for Attribute-Based Encryption and Identity Provider functionality) | ||
87 | - libgabe (for Attribute-Based Encryption and Identity Provider functionality, | ||
88 | from https://github.com/schanzen/libgabe) | ||
89 | 139 | ||
90 | Recommended autotools for compiling the Git version are: | 140 | Recommended autotools for compiling the Git version are: |
141 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
91 | 142 | ||
92 | - autoconf >= 2.59 | 143 | - autoconf >= 2.59 |
93 | - automake >= 1.11.1 | 144 | - automake >= 1.11.1 |
@@ -115,16 +166,35 @@ Recommended autotools for compiling the Git version are: | |||
115 | fix in. | 166 | fix in. |
116 | 167 | ||
117 | [*4] We are commited to portable tools and solutions | 168 | [*4] We are commited to portable tools and solutions |
118 | where possible. While the shellscripts work with | 169 | where possible. New scripts should be Posix SH |
119 | NetBSD's sh, there's no warranty some bashisms | 170 | compatible, current and older scripts are |
120 | are leftover. | 171 | in the process of being rewritten to comply |
172 | with this requirement. | ||
173 | |||
174 | [*5] While libextractor is optional, it is recommended to | ||
175 | build gnunet against it. If you install it later, | ||
176 | you won't benefit from libextractor. | ||
177 | If you are a distributor, we recommend to split | ||
178 | LE into basis + plugins rather than making LE | ||
179 | an option as an afterthought by the user. | ||
180 | LE itself is very small, but its dependency chain | ||
181 | on first, second, third etc level can be big. | ||
182 | There is a small effect on privacy if your LE build | ||
183 | differs from one which includes all | ||
184 | plugins (plugins are build as shared objects): | ||
185 | if users publish a directory with a mixture of file | ||
186 | types (for example mpeg, jpeg, png, gif) the | ||
187 | configuration of LE could leak which plugins are | ||
188 | installed for which filetypes are not providing | ||
189 | more details. | ||
190 | However, this leak is just a minor concern. | ||
121 | 191 | ||
122 | Requirements | 192 | Requirements |
123 | ============ | 193 | ============ |
124 | 194 | ||
125 | GNUnet's directed acyclic graph (DAG) will require around 0.74 GiB | 195 | GNUnet's directed acyclic graph (DAG) will require around 0.74 GiB |
126 | Diskspace, with GNUNet itself taking around 9.2 MiB reported by the | 196 | Diskspace, with GNUNet itself taking around 8 - 9.2 MiB reported by |
127 | build on GNU Guix. | 197 | the build on GNU Guix. |
128 | 198 | ||
129 | How to install? | 199 | How to install? |
130 | =============== | 200 | =============== |
@@ -365,7 +435,7 @@ together with a description. To publish files on GNUnet, use the | |||
365 | "gnunet-publish" command. | 435 | "gnunet-publish" command. |
366 | 436 | ||
367 | 437 | ||
368 | The GTK+ (or: Gimp Toolkit) user interface is shipped separately. | 438 | The GTK user interface is shipped separately. |
369 | After installing gnunet-gtk, you can invoke the setup tool and | 439 | After installing gnunet-gtk, you can invoke the setup tool and |
370 | the file-sharing GUI with: | 440 | the file-sharing GUI with: |
371 | 441 | ||
@@ -400,13 +470,13 @@ $ make install | |||
400 | $ export $GNUNET_PREFIX=$SOMEWHERE | 470 | $ export $GNUNET_PREFIX=$SOMEWHERE |
401 | $ make check | 471 | $ make check |
402 | 472 | ||
403 | Some of the testcases require python >= 3.7, and the python modules | 473 | Some of the testcases require python >= 3.7, and the python module |
404 | "python-future" (http://python-future.org/) and "pexpect" to be installed. | 474 | "pexpect" to be installed. |
405 | If any testcases fail to pass on your system, run | 475 | If any testcases fail to pass on your system, run |
406 | "contrib/scripts/gnunet-bugreport" (in the repository) or "gnunet-bugreport" | 476 | "contrib/scripts/gnunet-bugreport" (in the repository) or "gnunet-bugreport" |
407 | when you already have GNUnet installed and report its output together with | 477 | when you already have GNUnet installed and report its output together with |
408 | information about the failing testcase(s) to the Mantis bugtracking | 478 | information about the failing testcase(s) to the Mantis bugtracking |
409 | system at https://gnunet.org/bugs/. | 479 | system at https://bugs.gnunet.org/. |
410 | 480 | ||
411 | 481 | ||
412 | Running HTTP on port 80 and HTTPS on port 443 | 482 | Running HTTP on port 80 and HTTPS on port 443 |
@@ -464,13 +534,13 @@ Further Reading | |||
464 | GNUnet or projects around GNUnet. | 534 | GNUnet or projects around GNUnet. |
465 | There are currently 2 ways to get them: | 535 | There are currently 2 ways to get them: |
466 | 536 | ||
467 | * Using git: | 537 | * Using git (NOTE: 1.1 GiB as of 2019-03-09): |
468 | git clone https://git.gnunet.org/bibliography.git | 538 | git clone https://git.gnunet.org/bibliography.git |
469 | * Using Drupal: | 539 | * Using Drupal: |
470 | https://old.gnunet.org/bibliography | 540 | https://old.gnunet.org/bibliography |
471 | 541 | ||
472 | The Drupal access will be replaced by a new interface to our | 542 | The Drupal access will be replaced by a new interface to our |
473 | bibliography in 2019. | 543 | bibliography in the foreseeable future. |
474 | 544 | ||
475 | 545 | ||
476 | Stay tuned | 546 | Stay tuned |
diff --git a/configure.ac b/configure.ac index 851f6543b..793612df3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -208,12 +208,17 @@ AM_CONDITIONAL(HAVE_SSH_KEY, ssh -D 12345 -o "BatchMode yes" -o "UserKnownHosts | |||
208 | rm -f /tmp/gnunet_test_cosks_ssh_garbage | 208 | rm -f /tmp/gnunet_test_cosks_ssh_garbage |
209 | 209 | ||
210 | # autotools' m4 for python has no maximum version! | 210 | # autotools' m4 for python has no maximum version! |
211 | # python3.7 for tests | 211 | # python3.4 - python3.7 for tests |
212 | m4_define_default([_AM_PYTHON_INTERPRETER_LIST],[python3 python3.7 python]) | 212 | m4_define_default([_AM_PYTHON_INTERPRETER_LIST],[python3 python3.4 python3.5 python3.6 python3.7 python]) |
213 | AM_PATH_PYTHON([3.7],, [:]) | 213 | AM_PATH_PYTHON([3.4],, [:]) |
214 | AC_SUBST([PYTHON]) | 214 | AC_SUBST([PYTHON]) |
215 | AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) | 215 | AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) |
216 | 216 | ||
217 | # perl | ||
218 | AC_PATH_PROG( PERL, perl, , | ||
219 | $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) | ||
220 | AC_SUBST([PERL]) | ||
221 | |||
217 | # iptables is a soft requirement to run tests | 222 | # iptables is a soft requirement to run tests |
218 | AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false) | 223 | AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false) |
219 | 224 | ||
@@ -312,6 +317,10 @@ then | |||
312 | fi | 317 | fi |
313 | AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) | 318 | AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) |
314 | 319 | ||
320 | AC_CHECK_DECLS([struct in6_ifreq], [], [], [[#include <linux/if_tun.h>]]) | ||
321 | |||
322 | |||
323 | |||
315 | # should the build process be building the documentation? | 324 | # should the build process be building the documentation? |
316 | AC_MSG_CHECKING(whether to build documentation) | 325 | AC_MSG_CHECKING(whether to build documentation) |
317 | AC_ARG_ENABLE([documentation], | 326 | AC_ARG_ENABLE([documentation], |
@@ -328,13 +337,14 @@ else | |||
328 | AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation]) | 337 | AC_DEFINE([DOCUMENTATION],[0],[Not building the documentation]) |
329 | fi | 338 | fi |
330 | 339 | ||
340 | # FIXME: Something is wrong about this in the output of ./configure runs | ||
331 | AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation) | 341 | AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation) |
332 | AC_ARG_ENABLE([texi2mdoc-generation], | 342 | AC_ARG_ENABLE([texi2mdoc-generation], |
333 | [AS_HELP_STRING([--disable-texi2mdoc-generation], [do not include generated texi2mdoc output in installation])], | 343 | [AS_HELP_STRING([--enable-texi2mdoc-generation], [include generated texi2mdoc output in installation])], |
334 | [texi2mdoc-generation=${enableval}], | 344 | [texi2mdoc_generation=${enableval}], |
335 | [texi2mdoc-generation=yes]) | 345 | [texi2mdoc_generation=no]) |
336 | AC_MSG_RESULT($texi2mdoc-generation) | 346 | AC_MSG_RESULT($texi2mdoc_generation) |
337 | if test "x$texi2mdoc-generation" = "xyes" | 347 | if test "x$texi2mdoc_generation" = "xyes" |
338 | then | 348 | then |
339 | if test "$texi2mdoc" = 0 | 349 | if test "$texi2mdoc" = 0 |
340 | then | 350 | then |
@@ -366,6 +376,21 @@ else | |||
366 | AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation]) | 376 | AC_DEFINE([DOCUMENTATION_ONLY],[0],[Not building only the documentation]) |
367 | fi | 377 | fi |
368 | 378 | ||
379 | # should the build process be including the manpages? (default: yes) | ||
380 | AC_MSG_CHECKING(whether to include man pages) | ||
381 | AC_ARG_ENABLE([include-manpages], | ||
382 | [AS_HELP_STRING([--disable-include-manpages], [Do not include the man pages in build and installation])], | ||
383 | [include_manpages=${enableval}], | ||
384 | [include_manpages=yes]) | ||
385 | AC_MSG_RESULT($include_manpages) | ||
386 | if test "x$include_manpages" = "xyes" | ||
387 | then | ||
388 | AM_CONDITIONAL([INCLUDE_MANPAGES],true) | ||
389 | AC_DEFINE([INCLUDE_MANPAGES],[1],[Including the man pages in the build and installation]) | ||
390 | else | ||
391 | AM_CONDITIONAL([INCLUDE_MANPAGES],false) | ||
392 | AC_DEFINE([INCLUDE_MANPAGES],[0],[Not including the man pages in the build and installation]) | ||
393 | fi | ||
369 | 394 | ||
370 | # Adam shostack suggests the following for Windows: | 395 | # Adam shostack suggests the following for Windows: |
371 | # -D_FORTIFY_SOURCE=2 -fstack-protector-all | 396 | # -D_FORTIFY_SOURCE=2 -fstack-protector-all |
@@ -684,12 +709,12 @@ AM_CONDITIONAL(HAVE_LIBATOMIC, [test "$have_libatomic" = 1]) | |||
684 | LIBS=$SAVE_LIBS | 709 | LIBS=$SAVE_LIBS |
685 | CPPFLAGS=$SAVE_CPPFLAGS | 710 | CPPFLAGS=$SAVE_CPPFLAGS |
686 | 711 | ||
687 | AC_CHECK_HEADERS([glpk.h],[glpk=true],[gplk=false]) | 712 | AC_CHECK_HEADERS([glpk.h],[glpk=true],[glpk=false]) |
688 | # GLPK must support glpk_init_env, version >= 4.43 | 713 | # GLPK must support glpk_init_env, version >= 4.43 |
689 | AC_CHECK_LIB([glpk],[glp_init_env],,[gplk=false]) | 714 | AC_CHECK_LIB([glpk],[glp_init_env],,[glpk=false]) |
690 | # GLPK must support atm MLP presolving, version >= 4.32 | 715 | # GLPK must support atm MLP presolving, version >= 4.32 |
691 | AC_CHECK_MEMBERS(glp_iocp.presolve,,[gplk=false],[[#include <glpk.h>]]) | 716 | AC_CHECK_MEMBERS(glp_iocp.presolve,,[glpk=false],[[#include <glpk.h>]]) |
692 | if test x$gplk = xfalse | 717 | if test "x$glpk" = xfalse |
693 | then | 718 | then |
694 | AM_CONDITIONAL(HAVE_LIBGLPK, false) | 719 | AM_CONDITIONAL(HAVE_LIBGLPK, false) |
695 | AC_MSG_WARN([ERROR: GNUnet requires GLPK >= 4.32]) | 720 | AC_MSG_WARN([ERROR: GNUnet requires GLPK >= 4.32]) |
@@ -905,6 +930,9 @@ AS_IF([test x$working_libidn2 = x0], | |||
905 | * --with-libidn])])])]) | 930 | * --with-libidn])])])]) |
906 | AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1) | 931 | AM_CONDITIONAL(HAVE_LIBIDN, test x$working_libidn1 = x1) |
907 | 932 | ||
933 | AS_IF([test "$working_libidn1" = 0 -a "$working_libidn2" = 0], | ||
934 | [AC_MSG_ERROR([GNUnet requires libidn (or libidn2)])]) | ||
935 | |||
908 | AS_IF([test x$there_can_only_be_one = x0], | 936 | AS_IF([test x$there_can_only_be_one = x0], |
909 | [AC_MSG_FAILURE([Missing dependencies: $MISSING_DEPS])]) | 937 | [AC_MSG_FAILURE([Missing dependencies: $MISSING_DEPS])]) |
910 | 938 | ||
@@ -977,7 +1005,7 @@ AC_HEADER_DIRENT | |||
977 | AC_HEADER_STDC | 1005 | AC_HEADER_STDC |
978 | 1006 | ||
979 | # Check for headers that are ALWAYS required | 1007 | # Check for headers that are ALWAYS required |
980 | AC_CHECK_HEADERS([fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h string.h unistd.h stdarg.h signal.h locale.h sys/stat.h sys/types.h],,AC_MSG_ERROR([Compiling GNUnet requires standard UNIX headers files])) | 1008 | AC_CHECK_HEADERS([fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h string.h unistd.h stdarg.h signal.h locale.h sys/stat.h sys/types.h],,AC_MSG_ERROR([Compiling GNUnet requires standard UNIX headers files: fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h string.h unistd.h stdarg.h signal.h locale.h sys/stat.h sys/types.h])) |
981 | 1009 | ||
982 | 1010 | ||
983 | 1011 | ||
@@ -1158,7 +1186,7 @@ AC_ARG_WITH(microhttpd, | |||
1158 | AC_CHECK_HEADERS([microhttpd.h], | 1186 | AC_CHECK_HEADERS([microhttpd.h], |
1159 | AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, | 1187 | AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, |
1160 | AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], | 1188 | AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], |
1161 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42]) | 1189 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52]) |
1162 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([ | 1190 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
1163 | #include "$native_srcdir/src/include/platform.h" | 1191 | #include "$native_srcdir/src/include/platform.h" |
1164 | #include <microhttpd.h> | 1192 | #include <microhttpd.h> |
@@ -1181,7 +1209,7 @@ AC_ARG_WITH(microhttpd, | |||
1181 | AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, | 1209 | AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, |
1182 | AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], | 1210 | AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], |
1183 | EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH" | 1211 | EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH" |
1184 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42]) | 1212 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52]) |
1185 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([ | 1213 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
1186 | #include "$native_srcdir/src/include/platform.h" | 1214 | #include "$native_srcdir/src/include/platform.h" |
1187 | #include <microhttpd.h> | 1215 | #include <microhttpd.h> |
@@ -1203,12 +1231,12 @@ AC_ARG_WITH(microhttpd, | |||
1203 | AC_CHECK_HEADERS([microhttpd.h], | 1231 | AC_CHECK_HEADERS([microhttpd.h], |
1204 | AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, | 1232 | AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT, |
1205 | AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], | 1233 | AC_CHECK_LIB([microhttpd], [MHD_get_fdset2], |
1206 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.42]) | 1234 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52]) |
1207 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([ | 1235 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
1208 | #include "$native_srcdir/src/include/platform.h" | 1236 | #include "$native_srcdir/src/include/platform.h" |
1209 | #include <microhttpd.h> | 1237 | #include <microhttpd.h> |
1210 | #if (MHD_VERSION < 0x0094200) | 1238 | #if (MHD_VERSION < 0x0094200) |
1211 | #error needs at least version 0.9.42 | 1239 | #error needs at least version 0.9.52 |
1212 | #endif | 1240 | #endif |
1213 | ])], | 1241 | ])], |
1214 | [AC_MSG_RESULT(ok) | 1242 | [AC_MSG_RESULT(ok) |
@@ -1314,6 +1342,7 @@ DATAROOTDIR=$datarootdir | |||
1314 | AC_SUBST(DATAROOTDIR) | 1342 | AC_SUBST(DATAROOTDIR) |
1315 | 1343 | ||
1316 | # test for sudo | 1344 | # test for sudo |
1345 | # TODO: do we need to change anything for "doas" on openbsd? | ||
1317 | AC_MSG_CHECKING(for sudo) | 1346 | AC_MSG_CHECKING(for sudo) |
1318 | AC_ARG_WITH(sudo, | 1347 | AC_ARG_WITH(sudo, |
1319 | [ --with-sudo=PATH path to sudo binary (or just yes)], | 1348 | [ --with-sudo=PATH path to sudo binary (or just yes)], |
@@ -1719,11 +1748,14 @@ AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball ve | |||
1719 | AC_CONFIG_FILES([ | 1748 | AC_CONFIG_FILES([ |
1720 | Makefile | 1749 | Makefile |
1721 | contrib/Makefile | 1750 | contrib/Makefile |
1751 | contrib/scripts/Makefile | ||
1752 | contrib/scripts/gnunet-logread/Makefile | ||
1722 | doc/Makefile | 1753 | doc/Makefile |
1723 | doc/man/Makefile | 1754 | doc/man/Makefile |
1724 | doc/doxygen/Makefile | 1755 | doc/doxygen/Makefile |
1725 | doc/handbook/Makefile | 1756 | doc/handbook/Makefile |
1726 | doc/tutorial/Makefile | 1757 | doc/tutorial/Makefile |
1758 | lint/Makefile | ||
1727 | m4/Makefile | 1759 | m4/Makefile |
1728 | po/Makefile.in | 1760 | po/Makefile.in |
1729 | src/Makefile | 1761 | src/Makefile |
@@ -1819,7 +1851,6 @@ src/vpn/vpn.conf | |||
1819 | src/zonemaster/Makefile | 1851 | src/zonemaster/Makefile |
1820 | src/zonemaster/zonemaster.conf | 1852 | src/zonemaster/zonemaster.conf |
1821 | src/rest/Makefile | 1853 | src/rest/Makefile |
1822 | src/rest-plugins/Makefile | ||
1823 | src/abe/Makefile | 1854 | src/abe/Makefile |
1824 | src/reclaim-attribute/Makefile | 1855 | src/reclaim-attribute/Makefile |
1825 | src/reclaim/Makefile | 1856 | src/reclaim/Makefile |
diff --git a/contrib/Makefile.am b/contrib/Makefile.am index d83fb8846..ff1d1fbbb 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am | |||
@@ -5,13 +5,7 @@ tap32dir = $(pkgdatadir)/openvpn-tap32/tapw32/ | |||
5 | 5 | ||
6 | tap64dir = $(pkgdatadir)/openvpn-tap32/tapw64/ | 6 | tap64dir = $(pkgdatadir)/openvpn-tap32/tapw64/ |
7 | 7 | ||
8 | noinst_SCRIPTS = \ | 8 | SUBDIRS = scripts |
9 | scripts/terminate.py \ | ||
10 | scripts/pydiffer.py \ | ||
11 | scripts/removetrailingwhitespace.py \ | ||
12 | scripts/gnunet_pyexpect.py \ | ||
13 | scripts/gnunet_janitor.py \ | ||
14 | scripts/gnunet-chk.py | ||
15 | 9 | ||
16 | dist_pkgdata_DATA = \ | 10 | dist_pkgdata_DATA = \ |
17 | gns/gns-bcd.html \ | 11 | gns/gns-bcd.html \ |
@@ -35,6 +29,10 @@ tap64_DATA = \ | |||
35 | 3rdparty/Windows/openvpn-tap32/tapw64/OemWin2k.inf | 29 | 3rdparty/Windows/openvpn-tap32/tapw64/OemWin2k.inf |
36 | endif | 30 | endif |
37 | 31 | ||
32 | INITD_FILES = \ | ||
33 | services/openrc/gnunet.initd \ | ||
34 | services/systemd/gnunet.service | ||
35 | |||
38 | EXTRA_DIST = \ | 36 | EXTRA_DIST = \ |
39 | conf/colorit/colorit.conf \ | 37 | conf/colorit/colorit.conf \ |
40 | conf/editors/eclipse/gnunet_codingstyle.xml \ | 38 | conf/editors/eclipse/gnunet_codingstyle.xml \ |
@@ -42,14 +40,6 @@ EXTRA_DIST = \ | |||
42 | conf/gnunet/no_autostart_above_core.conf \ | 40 | conf/gnunet/no_autostart_above_core.conf \ |
43 | conf/nss/nssswitch.conf \ | 41 | conf/nss/nssswitch.conf \ |
44 | conf/wireshark/wireshark.lua \ | 42 | conf/wireshark/wireshark.lua \ |
45 | scripts/coverage.sh \ | ||
46 | scripts/terminate.py.in \ | ||
47 | scripts/gnunet_pyexpect.py.in \ | ||
48 | scripts/gnunet_janitor.py.in \ | ||
49 | scripts/gnunet-chk.py.in \ | ||
50 | scripts/gnunet-bugreport \ | ||
51 | scripts/removetrailingwhitespace.py.in \ | ||
52 | scripts/pydiffer.py.in \ | ||
53 | packages/nix/default.nix \ | 43 | packages/nix/default.nix \ |
54 | packages/nix/gnunet-dev.nix \ | 44 | packages/nix/gnunet-dev.nix \ |
55 | 3rdparty/Windows/openvpn-tap32/tapw32/tap0901.sys \ | 45 | 3rdparty/Windows/openvpn-tap32/tapw32/tap0901.sys \ |
@@ -60,28 +50,8 @@ EXTRA_DIST = \ | |||
60 | 3rdparty/Windows/openvpn-tap32/tapw64/OemWin2k.inf \ | 50 | 3rdparty/Windows/openvpn-tap32/tapw64/OemWin2k.inf \ |
61 | 3rdparty/Windows/openvpn-tap32/INSTALL \ | 51 | 3rdparty/Windows/openvpn-tap32/INSTALL \ |
62 | 3rdparty/Windows/openvpn-tap32/tap32-signed-i386-2.1.zip \ | 52 | 3rdparty/Windows/openvpn-tap32/tap32-signed-i386-2.1.zip \ |
63 | 3rdparty/Windows/openvpn-tap32/tap32-source-2.1.zip | 53 | 3rdparty/Windows/openvpn-tap32/tap32-source-2.1.zip \ |
64 | 54 | $(INITD_FILES) | |
65 | CLEANFILES = \ | ||
66 | $(noinst_SCRIPTS) | ||
67 | |||
68 | do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' | ||
69 | |||
70 | # Use SUFFIX Extension rules, they are more portable for every | ||
71 | # implementation of 'make'. | ||
72 | # You'll also run into the "'%' is a GNU make extension warning" | ||
73 | # if you use this: | ||
74 | # | ||
75 | #%.py: %.py.in Makefile | ||
76 | # $(do_subst) < $< > $@ | ||
77 | # chmod +x $@ | ||
78 | # | ||
79 | # instead of this: | ||
80 | SUFFIXES = .py.in .py | ||
81 | |||
82 | .py.in.py: | ||
83 | $(do_subst) < $< > $@ | ||
84 | chmod +x $@ | ||
85 | 55 | ||
86 | check_PROGRAMS = \ | 56 | check_PROGRAMS = \ |
87 | test_gnunet_prefix | 57 | test_gnunet_prefix |
@@ -104,6 +74,7 @@ test_gnunet_prefix_LDADD = \ | |||
104 | $(LIBLTDL) -lunistring $(XLIB) | 74 | $(LIBLTDL) -lunistring $(XLIB) |
105 | 75 | ||
106 | pkghellodir= $(pkgdatadir)/hellos | 76 | pkghellodir= $(pkgdatadir)/hellos |
77 | pkginitddir= $(pkgdatadir)/services | ||
107 | 78 | ||
108 | install-data-local: | 79 | install-data-local: |
109 | $(mkinstalldirs) $(DESTDIR)$(pkghellodir) | 80 | $(mkinstalldirs) $(DESTDIR)$(pkghellodir) |
@@ -114,6 +85,10 @@ install-data-local: | |||
114 | fi \ | 85 | fi \ |
115 | done | 86 | done |
116 | install scripts/gnunet-bugreport $(DESTDIR)$(bindir)/gnunet-bugreport | 87 | install scripts/gnunet-bugreport $(DESTDIR)$(bindir)/gnunet-bugreport |
88 | mkdir -p $(DESTDIR)$(pkgdatadir)/services/openrc | ||
89 | mkdir -p $(DESTDIR)$(pkgdatadir)/services/systemd | ||
90 | install services/openrc/gnunet.initd $(DESTDIR)$(pkginitddir)/openrc/ | ||
91 | install services/systemd/gnunet.service $(DESTDIR)$(pkginitddir)/systemd/ | ||
117 | 92 | ||
118 | dist-hook: | 93 | dist-hook: |
119 | if test -d $(srcdir)/hellos; then \ | 94 | if test -d $(srcdir)/hellos; then \ |
diff --git a/contrib/ci/docker/docker-entrypoint.sh b/contrib/ci/docker/docker-entrypoint.sh index 807d86d6f..db916cce7 100644 --- a/contrib/ci/docker/docker-entrypoint.sh +++ b/contrib/ci/docker/docker-entrypoint.sh | |||
@@ -1,3 +1,3 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | gnunet-arm -s > $HOME/gnunet.log 2>&1 | 2 | gnunet-arm -s > $HOME/gnunet.log 2>&1 |
3 | exec bash \ No newline at end of file | 3 | exec bash |
diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index d1678a4a6..adcd7132c 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile | |||
@@ -35,9 +35,9 @@ RUN apt-get update && \ | |||
35 | # Install GNUrl | 35 | # Install GNUrl |
36 | ENV GNURL_VERSION=7.57.0 | 36 | ENV GNURL_VERSION=7.57.0 |
37 | 37 | ||
38 | RUN wget -O /tmp/gnurl.tar.bz2 https://gnunet.org/sites/default/files/gnurl-${GNURL_VERSION}.tar.bz2 | 38 | RUN wget -O /tmp/gnurl.tar.xz https://ftpmirror.gnu.org/gnu/gnunet/gnurl-${GNURL_VERSION}.tar.xz |
39 | RUN cd /tmp && \ | 39 | RUN cd /tmp && \ |
40 | tar xvf gnurl.tar.bz2 && \ | 40 | tar xvf gnurl.tar.xz && \ |
41 | cd gnurl-${GNURL_VERSION} && \ | 41 | cd gnurl-${GNURL_VERSION} && \ |
42 | autoreconf -i && \ | 42 | autoreconf -i && \ |
43 | ./configure \ | 43 | ./configure \ |
diff --git a/contrib/gnunet_infrastructure/handbook_pull.sh b/contrib/gnunet_infrastructure/handbook_pull.sh new file mode 100755 index 000000000..16c7430ae --- /dev/null +++ b/contrib/gnunet_infrastructure/handbook_pull.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # This essentially could be solved by: | ||
4 | # git config pull.rebase true | ||
5 | # git config rebase.autoStash true | ||
6 | # but chances are that this is easy to | ||
7 | # forget. | ||
8 | # so execute this file on the server | ||
9 | # instead of setting a git config. | ||
10 | |||
11 | echo "Running git pull with autoStash and rebase" | ||
12 | echo "If anything breaks in the future, delete" | ||
13 | echo "and repeat - it was once considered to" | ||
14 | echo "be responsible for non-trivial conflicts!" | ||
15 | echo "We apply this because we need to build the" | ||
16 | echo "handbook and tutorial without manual interventions." | ||
17 | |||
18 | git pull --rebase --autostash | ||
diff --git a/contrib/packages/guix/guix-env-py2.scm b/contrib/packages/guix/guix-env-py2.scm index 6085f96a9..11e5451e2 100644 --- a/contrib/packages/guix/guix-env-py2.scm +++ b/contrib/packages/guix/guix-env-py2.scm | |||
@@ -102,7 +102,6 @@ | |||
102 | ("zlib" ,zlib) | 102 | ("zlib" ,zlib) |
103 | ("perl" ,perl) | 103 | ("perl" ,perl) |
104 | ("python-2" ,python-2) ; tests and gnunet-qr | 104 | ("python-2" ,python-2) ; tests and gnunet-qr |
105 | ("python2-future" ,python2-future) | ||
106 | ("jansson" ,jansson) | 105 | ("jansson" ,jansson) |
107 | ("nss" ,nss) | 106 | ("nss" ,nss) |
108 | ("glib" ,glib "bin") | 107 | ("glib" ,glib "bin") |
diff --git a/contrib/packages/guix/notest-guix-env.scm b/contrib/packages/guix/notest-guix-env.scm index ffb0ec889..1fafd961d 100644 --- a/contrib/packages/guix/notest-guix-env.scm +++ b/contrib/packages/guix/notest-guix-env.scm | |||
@@ -100,7 +100,6 @@ | |||
100 | ("zlib" ,zlib) | 100 | ("zlib" ,zlib) |
101 | ("perl" ,perl) | 101 | ("perl" ,perl) |
102 | ("python-2" ,python-2) ; tests and gnunet-qr | 102 | ("python-2" ,python-2) ; tests and gnunet-qr |
103 | ("python2-future" ,python2-future) | ||
104 | ("jansson" ,jansson) | 103 | ("jansson" ,jansson) |
105 | ("nss" ,nss) | 104 | ("nss" ,nss) |
106 | ("glib" ,glib "bin") | 105 | ("glib" ,glib "bin") |
diff --git a/contrib/scripts/Makefile.am b/contrib/scripts/Makefile.am new file mode 100644 index 000000000..a9eadf337 --- /dev/null +++ b/contrib/scripts/Makefile.am | |||
@@ -0,0 +1,43 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include | ||
3 | |||
4 | SUBDIRS = gnunet-logread | ||
5 | |||
6 | noinst_SCRIPTS = \ | ||
7 | terminate.py \ | ||
8 | pydiffer.py \ | ||
9 | removetrailingwhitespace.py \ | ||
10 | gnunet_pyexpect.py \ | ||
11 | gnunet_janitor.py \ | ||
12 | gnunet-chk.py | ||
13 | |||
14 | EXTRA_DIST = \ | ||
15 | coverage.sh \ | ||
16 | terminate.py.in \ | ||
17 | gnunet_pyexpect.py.in \ | ||
18 | gnunet_janitor.py.in \ | ||
19 | gnunet-chk.py.in \ | ||
20 | gnunet-bugreport \ | ||
21 | removetrailingwhitespace.py.in \ | ||
22 | pydiffer.py.in | ||
23 | |||
24 | CLEANFILES = \ | ||
25 | $(noinst_SCRIPTS) | ||
26 | |||
27 | do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' | ||
28 | |||
29 | # Use SUFFIX Extension rules, they are more portable for every | ||
30 | # implementation of 'make'. | ||
31 | # You'll also run into the "'%' is a GNU make extension warning" | ||
32 | # if you use this: | ||
33 | # | ||
34 | #%.py: %.py.in Makefile | ||
35 | # $(do_subst) < $< > $@ | ||
36 | # chmod +x $@ | ||
37 | # | ||
38 | # instead of this: | ||
39 | SUFFIXES = .py.in .py | ||
40 | |||
41 | .py.in.py: | ||
42 | $(do_subst) < $< > $@ | ||
43 | chmod +x $@ | ||
diff --git a/contrib/scripts/build_cscope.sh b/contrib/scripts/build_cscope.sh new file mode 100644 index 000000000..ee48f9b54 --- /dev/null +++ b/contrib/scripts/build_cscope.sh | |||
@@ -0,0 +1,4 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | find . -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -o -name "*.py" -o -name "*.sh" > cscope.files | ||
4 | cscope -q -R -b -i cscope.files | ||
diff --git a/contrib/scripts/debug b/contrib/scripts/debug index 3de2c9a14..c20ebd7dc 100755 --- a/contrib/scripts/debug +++ b/contrib/scripts/debug | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # /proc/sys/kernel/core_pattern should be core.%p.%E | 2 | # /proc/sys/kernel/core_pattern should be core.%p.%E |
3 | 3 | ||
4 | COREPID=$1 | 4 | COREPID=$1 |
diff --git a/contrib/scripts/texinfo-hacks.el b/contrib/scripts/doc/texinfo-hacks.el index bfb5c98fa..bfb5c98fa 100644 --- a/contrib/scripts/texinfo-hacks.el +++ b/contrib/scripts/doc/texinfo-hacks.el | |||
diff --git a/contrib/scripts/documentation/gnunet-doc.scm b/contrib/scripts/documentation/gnunet-doc.scm deleted file mode 100644 index 077efacad..000000000 --- a/contrib/scripts/documentation/gnunet-doc.scm +++ /dev/null | |||
@@ -1,182 +0,0 @@ | |||
1 | ;;; This file is part of GNUnet. | ||
2 | ;;; Copyright (C) 2016, 2017 GNUnet e.V. | ||
3 | ;;; | ||
4 | ;;; GNUnet is free software: you can redistribute it and/or modify it | ||
5 | ;;; under the terms of the GNU Affero General Public License as published | ||
6 | ;;; by the Free Software Foundation, either version 3 of the License, or | ||
7 | ;;; (at your option) any later version. | ||
8 | ;;; | ||
9 | ;;; GNUnet is distributed in the hope that it will be useful, but | ||
10 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | ;;; Affero General Public License for more details. | ||
13 | ;;; | ||
14 | ;;; You should have received a copy of the GNU Affero General Public License | ||
15 | ;;; along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | ;;; | ||
17 | |||
18 | (use-modules | ||
19 | (ice-9 popen) | ||
20 | (ice-9 match) | ||
21 | (ice-9 rdelim) | ||
22 | (guix packages) | ||
23 | (guix build-system gnu) | ||
24 | (guix gexp) | ||
25 | ((guix build utils) #:select (with-directory-excursion)) | ||
26 | (guix git-download) | ||
27 | (guix utils) ; current-source-directory | ||
28 | (gnu packages) | ||
29 | (gnu packages aidc) | ||
30 | (gnu packages autotools) | ||
31 | (gnu packages backup) | ||
32 | (gnu packages base) | ||
33 | (gnu packages compression) | ||
34 | (gnu packages curl) | ||
35 | (gnu packages databases) | ||
36 | (gnu packages file) | ||
37 | (gnu packages gettext) | ||
38 | (gnu packages glib) | ||
39 | (gnu packages gnome) | ||
40 | (gnu packages gnunet) | ||
41 | (gnu packages gnupg) | ||
42 | (gnu packages gnuzilla) | ||
43 | (gnu packages groff) | ||
44 | (gnu packages gstreamer) | ||
45 | (gnu packages gtk) | ||
46 | (gnu packages guile) | ||
47 | (gnu packages graphviz) | ||
48 | (gnu packages image) | ||
49 | (gnu packages image-viewers) | ||
50 | (gnu packages libidn) | ||
51 | (gnu packages libunistring) | ||
52 | (gnu packages linux) | ||
53 | (gnu packages maths) | ||
54 | (gnu packages multiprecision) | ||
55 | (gnu packages perl) | ||
56 | (gnu packages pkg-config) | ||
57 | (gnu packages pulseaudio) | ||
58 | (gnu packages python) | ||
59 | (gnu packages tex) | ||
60 | (gnu packages texinfo) | ||
61 | (gnu packages tex) | ||
62 | (gnu packages tls) | ||
63 | (gnu packages video) | ||
64 | (gnu packages web) | ||
65 | (gnu packages xiph) | ||
66 | ;;(gnunet packages texlive) ;GNUnet module including texlive-2012 WIP | ||
67 | ((guix licenses) #:prefix license:)) | ||
68 | |||
69 | ;;(define %source-dir (string-append (current-source-directory) | ||
70 | ;; "/../../../")) | ||
71 | (define %source-dir (dirname (current-filename))) | ||
72 | |||
73 | (define gnunet-doc | ||
74 | (let* ((revision "2") | ||
75 | (select? (delay (or (git-predicate | ||
76 | (string-append (current-source-directory) | ||
77 | "/../../../")) | ||
78 | source-file?)))) | ||
79 | (package | ||
80 | (name "gnunet-doc") | ||
81 | (version (string-append "0.10.1-" revision "." "dev")) | ||
82 | (source | ||
83 | (local-file ;;"../../.." | ||
84 | ;;%source-dir | ||
85 | ;;(string-append (getcwd) "/../../../") | ||
86 | (string-append (getcwd)) ;drrty hack and this assumes one static position FIXME! | ||
87 | #:recursive? #t)) | ||
88 | ;;#:select? (git-predicate %source-dir))) | ||
89 | ;;#:select? (force select?))) | ||
90 | (build-system gnu-build-system) | ||
91 | (inputs | ||
92 | `(("glpk" ,glpk) | ||
93 | ("gnurl" ,gnurl) | ||
94 | ("gstreamer" ,gstreamer) | ||
95 | ("gst-plugins-base" ,gst-plugins-base) | ||
96 | ("gnutls/dane" ,gnutls/dane) | ||
97 | ("libextractor" ,libextractor) | ||
98 | ("libgcrypt" ,libgcrypt) | ||
99 | ("libidn" ,libidn) | ||
100 | ("libmicrohttpd" ,libmicrohttpd) | ||
101 | ("libltdl" ,libltdl) | ||
102 | ("libunistring" ,libunistring) | ||
103 | ("openssl" ,openssl) | ||
104 | ("opus" ,opus) | ||
105 | ("pulseaudio" ,pulseaudio) | ||
106 | ("sqlite" ,sqlite) | ||
107 | ("postgresql" ,postgresql) | ||
108 | ("mysql" ,mariadb) | ||
109 | ("zlib" ,zlib) | ||
110 | ("perl" ,perl) | ||
111 | ("python-2" ,python-2) ; tests and gnunet-qr | ||
112 | ("jansson" ,jansson) | ||
113 | ("nss" ,nss) | ||
114 | ("glib" ,glib "bin") | ||
115 | ("gmp" ,gmp) | ||
116 | ("bluez" ,bluez) ; for optional bluetooth feature | ||
117 | ("glib" ,glib) | ||
118 | ;;("texlive-minimal" ,texlive-minimal) ; optional. | ||
119 | ("texlive" ,texlive) ;TODO: Stabilize Texlive-2012 package | ||
120 | ("libogg" ,libogg))) | ||
121 | (native-inputs | ||
122 | `(("pkg-config" ,pkg-config) | ||
123 | ("autoconf" ,autoconf) | ||
124 | ("automake" ,automake) | ||
125 | ("gnu-gettext" ,gnu-gettext) | ||
126 | ("graphviz" ,graphviz) ; dot | ||
127 | ("texinfo-5" ,texinfo-5) ; Debian stable | ||
128 | ("which" ,which) | ||
129 | ("libtool" ,libtool))) | ||
130 | (arguments | ||
131 | `(#:configure-flags | ||
132 | (list "--enable-documentation") | ||
133 | #:tests? #f ;Don't run tests | ||
134 | #:phases | ||
135 | (modify-phases %standard-phases | ||
136 | (add-after 'unpack 'autoconf | ||
137 | (lambda _ | ||
138 | (substitute* "bootstrap" | ||
139 | (("contrib/pogen.sh") "sh contrib/pogen.sh")) | ||
140 | (for-each (lambda (f) (chmod f #o755)) | ||
141 | (find-files "po" "")) | ||
142 | (zero? (system* "sh" "bootstrap")))) | ||
143 | (add-after 'build 'run-gendocs | ||
144 | (lambda _ | ||
145 | (chdir "doc/documentation") | ||
146 | ;;(zero? (system* "make" "dev-build")))) | ||
147 | (zero? (system* "sh" "run-gendocs.sh")))) | ||
148 | ;; (zero? (system* "make" "pdf")) | ||
149 | ;; (zero? (system* "make" "html")) | ||
150 | ;; (zero? (system* "make" "info")))) | ||
151 | ;;(zero? (system* "make" "doc-all-give-me-the-noise")))) | ||
152 | (replace 'install | ||
153 | (lambda _ | ||
154 | (zero? (system* "make" "doc-gendoc-install"))))))) | ||
155 | ;;(lambda* (#:key outputs #:allow-other-keys) | ||
156 | ;; (let* ((out (assoc-ref outputs "out")) | ||
157 | ;; (doc (string-append out "/share/doc/gnunet"))) | ||
158 | ;; (mkdir-p doc) | ||
159 | ;; (copy-recursively "images" | ||
160 | ;; (string-append doc | ||
161 | ;; "/images")) | ||
162 | ;; (mkdir-p (string-append doc "/gnunet")) | ||
163 | ;; (install-file "gnunet.pdf" doc) | ||
164 | ;; (install-file "gnunet.info" doc) | ||
165 | ;; (install-file "gnunet.log" doc) ;TODO: Move to 'dev' output? | ||
166 | ;; (copy-recursively "gnunet" | ||
167 | ;; (string-append doc | ||
168 | ;; "/gnunet")) | ||
169 | ;; (install-file "gnunet-c-tutorial.pdf" doc) | ||
170 | ;; (install-file "gnunet-c-tutorial.info" doc) | ||
171 | ;; (install-file "gnunet-c-tutorial.log" doc) ;TODO: Move to 'dev' output? | ||
172 | ;; (copy-recursively "gnunet-c-tutorial" | ||
173 | ;; (string-append doc | ||
174 | ;; "/gnunet-c-tutorial"))) | ||
175 | ;; #t))))) | ||
176 | (synopsis "Documentation of GNUnet") | ||
177 | (description | ||
178 | "GNUnet documentation build") | ||
179 | (license (list license:fdl1.3+ license:gpl3+)) | ||
180 | (home-page "https://gnunet.org/")))) | ||
181 | |||
182 | gnunet-doc | ||
diff --git a/contrib/scripts/find_typedefs.py b/contrib/scripts/find_typedefs.py index b344cee2b..804eae235 100644 --- a/contrib/scripts/find_typedefs.py +++ b/contrib/scripts/find_typedefs.py | |||
@@ -1,7 +1,5 @@ | |||
1 | # XXX (F841): local variable 'li' is assigned to but never used | 1 | # XXX (F841): local variable 'li' is assigned to but never used |
2 | 2 | ||
3 | from __future__ import print_function | ||
4 | from __future__ import unicode_literals | ||
5 | import os | 3 | import os |
6 | import re | 4 | import re |
7 | import sys | 5 | import sys |
diff --git a/contrib/scripts/gdb-iterate-dll.py b/contrib/scripts/gdb-iterate-dll.py index 388ef6e11..79d46aa96 100644 --- a/contrib/scripts/gdb-iterate-dll.py +++ b/contrib/scripts/gdb-iterate-dll.py | |||
@@ -1,6 +1,3 @@ | |||
1 | from __future__ import print_function | ||
2 | from __future__ import unicode_literals | ||
3 | from builtins import str | ||
4 | from gdb import * | 1 | from gdb import * |
5 | 2 | ||
6 | 3 | ||
diff --git a/contrib/scripts/gnunet-bugreport b/contrib/scripts/gnunet-bugreport index e7d9caa7e..0e268bba7 100755 --- a/contrib/scripts/gnunet-bugreport +++ b/contrib/scripts/gnunet-bugreport | |||
@@ -1,5 +1,34 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | progname=${0##*/} | ||
4 | |||
5 | statusmsg() | ||
6 | { | ||
7 | echo " $@" | ||
8 | } | ||
9 | |||
10 | infomsg() | ||
11 | { | ||
12 | statusmsg "INFO: $@" | ||
13 | } | ||
14 | |||
15 | warningmsg() | ||
16 | { | ||
17 | statusmsg "WARNING: $@" | ||
18 | } | ||
19 | |||
20 | errormsg() | ||
21 | { | ||
22 | statusmsg "ERROR: $@" | ||
23 | } | ||
24 | |||
25 | linemsg() | ||
26 | { | ||
27 | statusmsg "=========================================" | ||
28 | } | ||
29 | |||
30 | # It is okay to assume which(1) here because we provide | ||
31 | # more than 1 fallback. | ||
3 | TEST=`type type|grep not` | 32 | TEST=`type type|grep not` |
4 | if test -n "$TEST"; then | 33 | if test -n "$TEST"; then |
5 | WHICH=which | 34 | WHICH=which |
@@ -7,229 +36,343 @@ else | |||
7 | WHICH=type | 36 | WHICH=type |
8 | fi | 37 | fi |
9 | 38 | ||
10 | echo "Please submit the following information with your bug report: " | 39 | os_check() |
11 | echo "--------------------------------------------------------------" | 40 | { |
12 | OS=`uname -s 2>/dev/null` | 41 | OS=`uname -s 2>/dev/null` |
13 | echo "OS : $OS" | 42 | infomsg "OS : $OS" |
14 | REL=`uname -r 2>/dev/null` | 43 | REL=`uname -r 2>/dev/null` |
15 | echo "OS RELEASE : $REL" | 44 | infomsg "OS RELEASE : $REL" |
16 | HW=`uname -m 2>/dev/null` | 45 | HW=`uname -m 2>/dev/null` |
17 | echo "HARDWARE : $HW" | 46 | infomsg "HARDWARE : $HW" |
47 | } | ||
18 | 48 | ||
19 | TEST=`$WHICH gcc 2>/dev/null` | 49 | # We shouldn't use awk to test for awk... but if |
20 | if test -n "$TEST"; then | 50 | # awk isn't there it can't be found. |
21 | VERS=`gcc --version 2>/dev/null | head -n 1` | 51 | awk_check() |
22 | echo "gcc : $VERS" | 52 | { |
23 | else | 53 | if test -n "`awk 2>&1 | tail -1 | awk '{print $1}'`"; then |
24 | echo "gcc : Not Found"; | 54 | infomsg "awk : Found" |
25 | fi | 55 | else |
56 | warningmsg "awk : Not found!" | ||
57 | fi | ||
58 | } | ||
26 | 59 | ||
27 | TEST=`$WHICH cc 2>/dev/null` | 60 | gcc_check() |
28 | if test -n "$TEST"; then | 61 | { |
29 | VERS=`cc --version 2>/dev/null | head -n 1` | 62 | TEST=`$WHICH gcc 2>/dev/null` |
30 | echo "cc : $VERS" | 63 | if test -n "$TEST"; then |
31 | else | 64 | VERS=`gcc --version 2>/dev/null | head -n 1` |
32 | echo "cc : Not Found"; | 65 | infomsg "gcc : $VERS" |
33 | fi | 66 | # The elif will work in bourne shells, no other shells tested. |
67 | elif test -n "`gcc 2>&1 | tail -1 | awk '{print $1}'`"; then | ||
68 | VERS=`gcc --version 2>/dev/null | head -n 1` | ||
69 | infomsg "gcc : $VERS" | ||
70 | else | ||
71 | warningmsg "gcc : Not Found"; | ||
72 | fi | ||
73 | } | ||
34 | 74 | ||
35 | TEST=`$WHICH c++ 2>/dev/null` | 75 | cc_check() |
36 | if test -n "$TEST"; then | 76 | { |
37 | VERS=`c++ --version 2>/dev/null | head -n 1` | 77 | TEST=`$WHICH cc 2>/dev/null` |
38 | echo "c++ : $VERS" | 78 | if test -n "$TEST"; then |
39 | else | 79 | VERS=`cc --version 2>/dev/null | head -n 1` |
40 | echo "c++ : Not Found"; | 80 | infomsg "cc : $VERS" |
41 | fi | 81 | else |
82 | warningmsg "cc : Not Found"; | ||
83 | fi | ||
84 | } | ||
42 | 85 | ||
43 | TEST=`$WHICH gmake 2>/dev/null` | 86 | cplusplus_check() |
44 | if test -n "$TEST" ; then | 87 | { |
45 | gmake --version 2>/dev/null |\ | 88 | TEST=`$WHICH c++ 2>/dev/null` |
46 | awk -F, '{print $1}' |\ | 89 | if test -n "$TEST"; then |
47 | awk '/GNU Make/{print "GNU gmake :",$NF}' | 90 | VERS=`c++ --version 2>/dev/null | head -n 1` |
48 | else | 91 | infomsg "c++ : $VERS" |
49 | TEST=`make --version 2>/dev/null` | 92 | else |
50 | if test -n "$TEST"; then | 93 | warningmsg "c++ : Not Found"; |
51 | make --version 2>/dev/null |\ | 94 | fi |
52 | awk -F, '{print $1}' |\ | 95 | } |
53 | awk '/GNU Make/{print "make :",$NF}' | ||
54 | else | ||
55 | echo "make : Not Found" | ||
56 | fi | ||
57 | fi | ||
58 | 96 | ||
59 | TEST=`$WHICH autoconf 2>/dev/null` | 97 | gmake_check() |
60 | if test -n "$TEST"; then | 98 | { |
61 | autoconf --version |\ | 99 | TEST=`$WHICH gmake 2>/dev/null` |
62 | head -n 1 |\ | 100 | if test -n "$TEST" ; then |
63 | awk '{\ | 101 | gmake --version 2>/dev/null |\ |
102 | awk -F, '{print $1}' |\ | ||
103 | awk '/GNU Make/{print "GNU gmake :",$NF}' | ||
104 | else | ||
105 | # FIX this test. | ||
106 | TEST=`make --version 2>/dev/null` | ||
107 | if test -n "$TEST"; then | ||
108 | make --version 2>/dev/null |\ | ||
109 | awk -F, '{print $1}' |\ | ||
110 | awk '/GNU Make/{print "gmake :",$NF}' | ||
111 | else | ||
112 | warningmsg "gmake : Not Found" | ||
113 | fi | ||
114 | fi | ||
115 | } | ||
116 | |||
117 | # Applies for NetBSD make and possibly every make. | ||
118 | make_check() | ||
119 | { | ||
120 | if test -n "`make 2>/dev/null`"; then | ||
121 | infomsg "make : Found" | ||
122 | else | ||
123 | warningmsg "make : Not Found" | ||
124 | fi | ||
125 | } | ||
126 | |||
127 | autoconf_check() | ||
128 | { | ||
129 | TEST=`$WHICH autoconf 2>/dev/null` | ||
130 | if test -n "$TEST"; then | ||
131 | autoconf --version |\ | ||
132 | head -n 1 |\ | ||
133 | awk '{\ | ||
64 | if (length($4) == 0) {\ | 134 | if (length($4) == 0) {\ |
65 | print "autoconf : "$3\ | 135 | print "autoconf : "$3\ |
66 | } else {\ | 136 | } else {\ |
67 | print "autoconf : "$4\ | 137 | print "autoconf : "$4\ |
68 | }}' | 138 | }}' |
69 | else | 139 | else |
70 | echo "autoconf : Not Found" | 140 | warningmsg "autoconf : Not Found" |
71 | fi | 141 | fi |
142 | } | ||
72 | 143 | ||
73 | TEST=`$WHICH automake 2>/dev/null` | 144 | automake_check() |
74 | if test -n "$TEST"; then | 145 | { |
75 | automake --version 2>/dev/null |\ | 146 | TEST=`$WHICH automake 2>/dev/null` |
76 | head -n 1 |\ | 147 | if test -n "$TEST"; then |
77 | awk '{print "automake : "$4}' | 148 | automake --version 2>/dev/null |\ |
78 | else | 149 | head -n 1 |\ |
79 | echo "automake : Not Found" | 150 | awk '{print "automake : "$4}' |
80 | fi | 151 | else |
152 | warningmsg "automake : Not Found" | ||
153 | fi | ||
154 | } | ||
81 | 155 | ||
82 | TEST=`$WHICH libtool 2>/dev/null` | 156 | # TODO: More libtool variants. |
83 | if test -n "$TEST"; then | 157 | libtool_check() |
84 | libtool --version 2>/dev/null |\ | 158 | { |
85 | head -n 1 |\ | 159 | TEST=`$WHICH libtool 2>/dev/null` |
86 | awk '{print "libtool : "$4}' | 160 | if test -n "$TEST"; then |
87 | else | 161 | libtool --version 2>/dev/null |\ |
88 | echo "libtool : Not Found" | 162 | head -n 1 |\ |
89 | fi | 163 | awk '{print "libtool : "$4}' |
164 | else | ||
165 | warningmsg "libtool : Not Found" | ||
166 | fi | ||
167 | } | ||
90 | 168 | ||
91 | TEST=`$WHICH extract 2>/dev/null` | 169 | libextractor_check() |
92 | if test -n "$TEST"; then | 170 | { |
93 | extract -v 2>/dev/null |\ | 171 | TEST=`$WHICH extract 2>/dev/null` |
94 | head -n 1 |\ | 172 | if test -n "$TEST"; then |
95 | awk '{print "libextractor : "$2}' | 173 | extract -v 2>/dev/null |\ |
96 | else | 174 | head -n 1 |\ |
97 | echo "libextractor : Not Found" | 175 | awk '{print "libextractor : "$2}' |
98 | fi | 176 | else |
177 | warningmsg "libextractor : Not Found" | ||
178 | fi | ||
179 | } | ||
99 | 180 | ||
100 | if test -x gnunetd; then | 181 | gnunet08_check() |
101 | gnunetd -v | sed -e "s/v//" 2>/dev/null |\ | 182 | { |
102 | awk '{print "GNUnet 0.8 : "$2 (may conflict!)}' | 183 | if test -x gnunetd; then |
103 | else | 184 | gnunetd -v | sed -e "s/v//" 2>/dev/null |\ |
104 | echo "GNUnet 0.8 : Not Found (good)" | 185 | awk '{print "GNUnet 0.8 : "$2 (may conflict!)}' |
105 | fi | 186 | else |
187 | infomsg "GNUnet 0.8 : Not Found (good)" | ||
188 | fi | ||
189 | } | ||
106 | 190 | ||
107 | TEST=`$WHICH gnunet-arm 2>/dev/null` | 191 | gnunet09x_check() |
108 | if test -n "$TEST"; then | 192 | { |
109 | gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\ | 193 | TEST=`$WHICH gnunet-arm 2>/dev/null` |
110 | awk '{print "GNUnet 0.9 : "$2}' | 194 | if test -n "$TEST"; then |
111 | else | 195 | gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\ |
112 | echo "GNUnet 0.9 : Not Found" | 196 | awk '{print "GNUnet 0.9 : "$2}' |
113 | fi | 197 | else |
198 | infomsg "GNUnet 0.9 : Not Found (good)" | ||
199 | fi | ||
200 | } | ||
114 | 201 | ||
115 | TEST=`$WHICH libgcrypt-config 2> /dev/null` | 202 | gnunet011x_check() |
116 | if test -n "$TEST"; then | 203 | { |
117 | libgcrypt-config --version 2> /dev/null | \ | 204 | TEST=`$WHICH gnunet-arm 2>/dev/null` |
118 | awk '{print "libgcrypt : "$1}' | 205 | if test -n "$TEST"; then |
119 | else | 206 | gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\ |
120 | echo "libgcrypt : Not Found" | 207 | awk '{print "GNUnet 0.11.x : "$2}' |
121 | fi | 208 | else |
209 | warningmsg "GNUnet 0.11.x : Not Found" | ||
210 | fi | ||
211 | } | ||
122 | 212 | ||
123 | TEST=`$WHICH mysql_config 2> /dev/null` | 213 | gcrypt_check() |
124 | if test -n "$TEST"; then | 214 | { |
125 | mysql_config --version 2> /dev/null | \ | 215 | TEST=`$WHICH libgcrypt-config 2> /dev/null` |
126 | awk '{print "mysql : "$1}' | 216 | if test -n "$TEST"; then |
127 | else | 217 | libgcrypt-config --version 2> /dev/null | \ |
128 | echo "mysql : Not Found" | 218 | awk '{print "libgcrypt : "$1}' |
129 | fi | 219 | else |
220 | warningmsg "libgcrypt : Not Found" | ||
221 | fi | ||
222 | } | ||
130 | 223 | ||
131 | TEST=`$WHICH pkg-config 2> /dev/null` | 224 | mysql_check() |
132 | if test -n "$TEST"; then | 225 | { |
133 | pkg-config --version 2> /dev/null | \ | 226 | TEST=`$WHICH mysql_config 2> /dev/null` |
134 | awk '{print "pkg-config : "$1}' | 227 | if test -n "$TEST"; then |
135 | else | 228 | mysql_config --version 2> /dev/null | \ |
136 | echo "pkg-config : Not Found" | 229 | awk '{print "mysql : "$1}' |
137 | fi | 230 | else |
231 | infomsg "mysql : Not Found" | ||
232 | fi | ||
233 | } | ||
138 | 234 | ||
139 | TEST=`$WHICH pkg-config 2> /dev/null` | 235 | pkgconf_check() |
140 | if test -n "$TEST"; then | 236 | { |
141 | pkg-config --modversion glib-2.0 2> /dev/null | \ | 237 | TEST=`$WHICH pkgconf 2> /dev/null` |
142 | awk '{print "glib2 : "$1}' | 238 | if test -n "$TEST"; then |
143 | else | 239 | pkgconf --version 2> /dev/null | awk '{print "pkgconf : "$1}' |
144 | echo "glib2 : Not Found" | 240 | else |
145 | fi | 241 | infomsg "pkgconf : Not Found" |
242 | fi | ||
243 | } | ||
244 | |||
245 | pkgconfig_check() | ||
246 | { | ||
247 | TEST=`$WHICH pkg-config 2> /dev/null` | ||
248 | if test -n "$TEST"; then | ||
249 | pkg-config --version 2> /dev/null | \ | ||
250 | awk '{print "pkg-config : "$1}' | ||
251 | else | ||
252 | infomsg "pkg-config : Not Found" | ||
253 | fi | ||
254 | } | ||
146 | 255 | ||
147 | TEST=`$WHICH pkg-config 2> /dev/null` | 256 | glib2_check() |
148 | if test -n "$TEST"; then | 257 | { |
149 | pkg-config --modversion gtk+-2.0 2> /dev/null | \ | 258 | TEST=`$WHICH pkg-config 2> /dev/null` |
150 | awk '{print "gtk2+ : "$1}' | 259 | if test -n "$TEST"; then |
151 | else | 260 | pkg-config --modversion glib-2.0 2> /dev/null | \ |
152 | echo "gtk2+ : Not Found" | 261 | awk '{print "glib2 : "$1}' |
153 | fi | 262 | else |
263 | infomsg "glib2 : Not Found" | ||
264 | fi | ||
265 | } | ||
154 | 266 | ||
155 | TEST=`$WHICH dpkg 2> /dev/null` | 267 | gtk2_check() |
156 | if test -n "$TEST"; then | 268 | { |
157 | LINES=`dpkg -s libgmp-dev | grep Version | wc -l 2> /dev/null` | 269 | TEST=`$WHICH pkg-config 2> /dev/null` |
158 | if test "$LINES" = "1" | 270 | if test -n "$TEST"; then |
159 | then | 271 | pkg-config --modversion gtk+-2.0 2> /dev/null | \ |
160 | VERSION=`dpkg -s libgmp-dev | grep Version | awk '{print $2}'` | 272 | awk '{print "gtk2+ : "$1}' |
161 | echo "GMP : libgmp-dev-$VERSION.deb" | 273 | else |
162 | else | 274 | infomsg "gtk2+ : Not Found" |
163 | echo "GMP : dpkg: libgmp-dev not installed" | 275 | fi |
164 | fi | 276 | } |
165 | else | ||
166 | TEST=`$WHICH rpm 2> /dev/null` | ||
167 | if test -n "$TEST"; then | ||
168 | rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \ | ||
169 | awk '{print "GMP : "$1.rpm}' | ||
170 | else | ||
171 | echo "GMP : Test not available" | ||
172 | fi | ||
173 | fi | ||
174 | 277 | ||
175 | TEST=`$WHICH dpkg 2> /dev/null` | 278 | gmp_check() |
176 | if test -n "$TEST"; then | 279 | { |
177 | LINES=`dpkg -s libunistring-dev | grep Version | wc -l` | 280 | TEST=`$WHICH dpkg 2> /dev/null` |
178 | if test "$LINES" = "1" | 281 | if test -n "$TEST"; then |
179 | then | 282 | LINES=`dpkg -s libgmp-dev | grep Version | wc -l 2> /dev/null` |
180 | VERSION=`dpkg -s libunistring-dev | grep Version | awk '{print $2}'` | 283 | if test "$LINES" = "1" |
181 | echo "libunistring : libunistring3-dev-$VERSION.deb" | 284 | then |
182 | else | 285 | VERSION=`dpkg -s libgmp-dev | grep Version | awk '{print $2}'` |
183 | echo "libunistring : dpkg: libunistring3-dev not installed" | 286 | infomsg "GMP : libgmp-dev-$VERSION.deb" |
184 | fi | 287 | else |
185 | else | 288 | errormsg "GMP : dpkg: libgmp-dev not installed" |
186 | TEST=`$WHICH rpm 2> /dev/null` | 289 | fi |
187 | if test -n "$TEST"; then | 290 | fi |
188 | rpm -q unistring | sed -e "s/unistring-//" 2> /dev/null | \ | 291 | TEST=`$WHICH rpm 2> /dev/null` |
189 | awk '{print "libunistring : "$1.rpm}' | 292 | if test -n "$TEST"; then |
190 | else | 293 | rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \ |
191 | echo "libunistring : Test not available" | 294 | awk '{print "GMP : "$1.rpm}' |
192 | fi | 295 | else |
193 | fi | 296 | warningmsg "GMP : Test not available" |
297 | fi | ||
298 | } | ||
194 | 299 | ||
195 | TEST=`$WHICH pkg_add 2> /dev/null` | 300 | libunistring_check() |
196 | if test -n "$TEST"; then | 301 | { |
197 | VERSION_UNISTRING=`pkg_info -Nb libunistring` | 302 | TEST=`$WHICH dpkg 2> /dev/null` |
198 | VERSION_GMP=`pkg_info -Nb gmp` | 303 | if test -n "$TEST"; then |
199 | echo "libunistring :" | 304 | LINES=`dpkg -s libunistring-dev | grep Version | wc -l` |
200 | echo "$VERSION_UNISTRING" | 305 | if test "$LINES" = "1" |
201 | echo "GMP :" | 306 | then |
202 | echo "$VERSION_GMP" | 307 | VERSION=`dpkg -s libunistring-dev | grep Version | awk '{print $2}'` |
203 | fi | 308 | infomsg "libunistring : libunistring3-dev-$VERSION.deb" |
309 | else | ||
310 | errormsg "libunistring : dpkg: libunistring3-dev not installed" | ||
311 | fi | ||
312 | else | ||
313 | TEST=`$WHICH rpm 2> /dev/null` | ||
314 | if test -n "$TEST"; then | ||
315 | rpm -q unistring | sed -e "s/unistring-//" 2> /dev/null | \ | ||
316 | awk '{print "libunistring : "$1.rpm}' | ||
317 | else | ||
318 | infomsg "libunistring : Test not available" | ||
319 | fi | ||
320 | fi | ||
321 | } | ||
204 | 322 | ||
205 | TEST=`$WHICH gettext 2> /dev/null` | 323 | pkgadd_check() |
206 | if test -n "$TEST"; then | 324 | { |
207 | gettext --version | head -n1 2> /dev/null | \ | 325 | TEST=`$WHICH pkg_add 2> /dev/null` |
208 | awk '{print "GNU gettext : "$4}' | 326 | if test -n "$TEST"; then |
209 | else | 327 | VERSION_UNISTRING=`pkg_info -Nb libunistring` |
210 | echo "GNU gettext : Not found" | 328 | VERSION_GMP=`pkg_info -Nb gmp` |
211 | fi | 329 | echo "libunistring :" |
330 | echo "$VERSION_UNISTRING" | ||
331 | echo "GMP :" | ||
332 | echo "$VERSION_GMP" | ||
333 | fi | ||
334 | } | ||
212 | 335 | ||
336 | gettext_check() | ||
337 | { | ||
338 | TEST=`$WHICH gettext 2> /dev/null` | ||
339 | if test -n "$TEST"; then | ||
340 | gettext --version | head -n1 2> /dev/null | \ | ||
341 | awk '{print "GNU gettext : "$4}' | ||
342 | else | ||
343 | errormsg "GNU gettext : Not found" | ||
344 | fi | ||
345 | } | ||
213 | 346 | ||
214 | TEST=`$WHICH curl-config 2> /dev/null` | 347 | # Merge curl_check + gnurl_check -> error if neither is |
215 | if test -n "$TEST"; then | 348 | # found (yes those systems exist) |
216 | curl-config --version | head -n1 2> /dev/null | \ | 349 | curl_check() |
217 | awk '{print "libcurl : "$2}' | 350 | { |
218 | else | 351 | TEST=`$WHICH curl-config 2> /dev/null` |
219 | echo "libcurl : Not found" | 352 | if test -n "$TEST"; then |
220 | fi | 353 | curl-config --version | head -n1 2> /dev/null | \ |
354 | awk '{print "libcurl : "$2}' | ||
355 | else | ||
356 | infomsg "libcurl : Not found" | ||
357 | fi | ||
358 | } | ||
221 | 359 | ||
222 | TEST=`$WHICH gnurl-config 2> /dev/null` | 360 | gnurl_check() |
223 | if test -n "$TEST"; then | 361 | { |
224 | gnurl-config --version | head -n1 2> /dev/null | \ | 362 | TEST=`$WHICH gnurl-config 2> /dev/null` |
225 | awk '{print "libgnurl : "$2}' | 363 | if test -n "$TEST"; then |
226 | else | 364 | gnurl-config --version | head -n1 2> /dev/null | \ |
227 | echo "libgnurl : Not found" | 365 | awk '{print "libgnurl : "$2}' |
228 | fi | 366 | else |
367 | infomsg "libgnurl : Not found" | ||
368 | fi | ||
369 | } | ||
229 | 370 | ||
230 | echo -n "libmicrohttpd : " | 371 | libmicrohttpd_check() |
231 | TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX` | 372 | { |
232 | cat - >$TMPFILE.c <<EOF | 373 | echo -n "libmicrohttpd : " |
374 | TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX` | ||
375 | cat - >$TMPFILE.c <<EOF | ||
233 | #include <microhttpd.h> | 376 | #include <microhttpd.h> |
234 | #include <stdio.h> | 377 | #include <stdio.h> |
235 | int main() | 378 | int main() |
@@ -239,13 +382,16 @@ int main() | |||
239 | } | 382 | } |
240 | EOF | 383 | EOF |
241 | 384 | ||
242 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 385 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" |
243 | rm -f $TMPFILE $TMPFILE.bin | 386 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" |
244 | 387 | rm -f $TMPFILE $TMPFILE.bin | |
388 | } | ||
245 | 389 | ||
246 | echo -n "GNU GLPK : " | 390 | glpk_check() |
247 | TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX` | 391 | { |
248 | cat - >$TMPFILE.c <<EOF | 392 | echo -n "GNU GLPK : " |
393 | TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX` | ||
394 | cat - >$TMPFILE.c <<EOF | ||
249 | #include <glpk.h> | 395 | #include <glpk.h> |
250 | #include <stdio.h> | 396 | #include <stdio.h> |
251 | int main() | 397 | int main() |
@@ -255,13 +401,16 @@ int main() | |||
255 | } | 401 | } |
256 | EOF | 402 | EOF |
257 | 403 | ||
258 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 404 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" |
259 | rm -f $TMPFILE $TMPFILE.bin | 405 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" |
260 | 406 | rm -f $TMPFILE $TMPFILE.bin | |
407 | } | ||
261 | 408 | ||
262 | echo -n "GnuTLS : " | 409 | gnutls_check() |
263 | TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX` | 410 | { |
264 | cat - >$TMPFILE.c <<EOF | 411 | echo -n "GnuTLS : " |
412 | TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX` | ||
413 | cat - >$TMPFILE.c <<EOF | ||
265 | #include <gnutls/gnutls.h> | 414 | #include <gnutls/gnutls.h> |
266 | #include <stdio.h> | 415 | #include <stdio.h> |
267 | int main() | 416 | int main() |
@@ -271,8 +420,49 @@ int main() | |||
271 | } | 420 | } |
272 | EOF | 421 | EOF |
273 | 422 | ||
274 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" | 423 | gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" |
275 | rm -f $TMPFILE $TMPFILE.bin | 424 | cc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found" |
425 | rm -f $TMPFILE $TMPFILE.bin | ||
426 | } | ||
276 | 427 | ||
428 | main() | ||
429 | { | ||
430 | infomsg "${progname} 0.11.0" | ||
431 | infomsg | ||
432 | infomsg "Please submit the following" | ||
433 | infomsg "information with your bug report:" | ||
434 | linemsg | ||
435 | os_check | ||
436 | awk_check | ||
437 | gcc_check | ||
438 | cc_check | ||
439 | cplusplus_check | ||
440 | gmake_check | ||
441 | make_check | ||
442 | autoconf_check | ||
443 | automake_check | ||
444 | libtool_check | ||
445 | libextractor_check | ||
446 | gnunet08_check | ||
447 | gnunet09x_check | ||
448 | gnunet011x_check | ||
449 | gcrypt_check | ||
450 | mysql_check | ||
451 | pkgconf_check | ||
452 | pkgconfig_check | ||
453 | glib2_check | ||
454 | gtk2_check | ||
455 | gmp_check | ||
456 | libunistring_check | ||
457 | pkgadd_check | ||
458 | gettext_check | ||
459 | curl_check | ||
460 | gnurl_check | ||
461 | libmicrohttpd_check | ||
462 | glpk_check | ||
463 | gnutls_check | ||
464 | linemsg | ||
465 | infomsg "Bug report saved in ./my_gnunet_bugreport.log" | ||
466 | } | ||
277 | 467 | ||
278 | echo "--------------------------------------------------------------" | 468 | main "$@" 2>&1 | tee "my_gnunet_bugreport.log" |
diff --git a/contrib/scripts/gnunet-chk.py.in b/contrib/scripts/gnunet-chk.py.in index 1f5a0726c..0fb591627 100755 --- a/contrib/scripts/gnunet-chk.py.in +++ b/contrib/scripts/gnunet-chk.py.in | |||
@@ -21,12 +21,6 @@ | |||
21 | # Brief: Computes GNUNET style Content Hash Key for a given file | 21 | # Brief: Computes GNUNET style Content Hash Key for a given file |
22 | # Author: Sree Harsha Totakura | 22 | # Author: Sree Harsha Totakura |
23 | 23 | ||
24 | from __future__ import print_function | ||
25 | from __future__ import division | ||
26 | from builtins import str | ||
27 | from builtins import range | ||
28 | from past.utils import old_div | ||
29 | from builtins import object | ||
30 | from hashlib import sha512 | 24 | from hashlib import sha512 |
31 | import logging | 25 | import logging |
32 | import os | 26 | import os |
@@ -254,7 +248,7 @@ def compute_chk_offset_(depth, end_offset): | |||
254 | bds = compute_tree_size_(depth) | 248 | bds = compute_tree_size_(depth) |
255 | if (depth > 0): | 249 | if (depth > 0): |
256 | end_offset -= 1 | 250 | end_offset -= 1 |
257 | ret = old_div(end_offset, bds) | 251 | ret = end_offset // bds |
258 | return ret % CHK_PER_INODE | 252 | return ret % CHK_PER_INODE |
259 | 253 | ||
260 | 254 | ||
@@ -278,7 +272,7 @@ def compute_iblock_size_(depth, offset): | |||
278 | ret = CHK_PER_INODE | 272 | ret = CHK_PER_INODE |
279 | else: | 273 | else: |
280 | bds /= CHK_PER_INODE | 274 | bds /= CHK_PER_INODE |
281 | ret = old_div(mod, bds) | 275 | ret = mod // bds |
282 | if (mod % bds) is not 0: | 276 | if (mod % bds) is not 0: |
283 | ret += 1 | 277 | ret += 1 |
284 | return ret | 278 | return ret |
diff --git a/contrib/scripts/gnunet-logread/.gitignore b/contrib/scripts/gnunet-logread/.gitignore new file mode 100644 index 000000000..070182b2f --- /dev/null +++ b/contrib/scripts/gnunet-logread/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | gnunet-logread | ||
2 | gnunet-logread-ipc-sdedit | ||
diff --git a/contrib/scripts/gnunet-logread/Makefile.am b/contrib/scripts/gnunet-logread/Makefile.am new file mode 100644 index 000000000..82c99494c --- /dev/null +++ b/contrib/scripts/gnunet-logread/Makefile.am | |||
@@ -0,0 +1,22 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include | ||
3 | |||
4 | do_subst = $(SED) -e 's,[@]PERL[@],$(PERL),g' | ||
5 | |||
6 | SUFFIXES = .in | ||
7 | |||
8 | gnunet-logread: gnunet-logread.in Makefile | ||
9 | $(do_subst) < $(srcdir)/gnunet-logread.in > gnunet-logread | ||
10 | chmod +x gnunet-logread | ||
11 | |||
12 | gnunet-logread-ipc-sdedit: gnunet-logread-ipc-sdedit.in Makefile | ||
13 | $(do_subst) < $(srcdir)/gnunet-logread-ipc-sdedit.in > gnunet-logread-ipc-sdedit | ||
14 | chmod +x gnunet-logread-ipc-sdedit | ||
15 | |||
16 | CLEANFILES= \ | ||
17 | gnunet-logread \ | ||
18 | gnunet-logread-ipc-sdedit | ||
19 | |||
20 | noinst_SCRIPTS = \ | ||
21 | $(CLEANFILES) \ | ||
22 | gnunet-logread-ipc | ||
diff --git a/contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit b/contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit.in index f8b7dc735..f8b7dc735 100755 --- a/contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit +++ b/contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit.in | |||
diff --git a/contrib/scripts/gnunet-logread/gnunet-logread b/contrib/scripts/gnunet-logread/gnunet-logread.in index 9b1c65401..9b1c65401 100755 --- a/contrib/scripts/gnunet-logread/gnunet-logread +++ b/contrib/scripts/gnunet-logread/gnunet-logread.in | |||
diff --git a/contrib/scripts/gnunet_janitor.py.in b/contrib/scripts/gnunet_janitor.py.in index 4ae9ad124..79e32fb90 100644 --- a/contrib/scripts/gnunet_janitor.py.in +++ b/contrib/scripts/gnunet_janitor.py.in | |||
@@ -22,7 +22,6 @@ | |||
22 | # gnunet janitor can be used by invoking `make' like this: | 22 | # gnunet janitor can be used by invoking `make' like this: |
23 | # TESTS_ENVIRONMENT='${top_srcdir}/contrib/scripts/gnunet_janitor.py &&' make check | 23 | # TESTS_ENVIRONMENT='${top_srcdir}/contrib/scripts/gnunet_janitor.py &&' make check |
24 | 24 | ||
25 | from __future__ import print_function | ||
26 | import os | 25 | import os |
27 | import re | 26 | import re |
28 | import subprocess | 27 | import subprocess |
diff --git a/contrib/scripts/gnunet_pyexpect.py.in b/contrib/scripts/gnunet_pyexpect.py.in index 4202da8d0..188436f51 100644 --- a/contrib/scripts/gnunet_pyexpect.py.in +++ b/contrib/scripts/gnunet_pyexpect.py.in | |||
@@ -18,8 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # Testcase for gnunet-peerinfo | 20 | # Testcase for gnunet-peerinfo |
21 | from __future__ import print_function | 21 | |
22 | from builtins import object | ||
23 | import os | 22 | import os |
24 | import re | 23 | import re |
25 | import subprocess | 24 | import subprocess |
diff --git a/contrib/scripts/lint-python.sh b/contrib/scripts/lint-python.sh deleted file mode 100755 index 9f7e0462d..000000000 --- a/contrib/scripts/lint-python.sh +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # check python style (and 2 to 3 migration) | ||
3 | |||
4 | rm python-lint.log | ||
5 | |||
6 | if [ -e "python" ] | ||
7 | then | ||
8 | python --version >> python-lint.log | ||
9 | fi | ||
10 | |||
11 | if [ -e "python2" ] | ||
12 | then | ||
13 | python2 --version >> python-lint.log | ||
14 | fi | ||
15 | |||
16 | if [ -e "python3" ] | ||
17 | then | ||
18 | python3 --version >> python-lint.log | ||
19 | fi | ||
20 | |||
21 | flake8 >> python-lint.log | ||
22 | |||
23 | 2to3 -v -d . >> python-lint.log | ||
24 | 2to3 -v -p . >> python-lint.log | ||
diff --git a/contrib/scripts/lint/lint-man.sh b/contrib/scripts/lint/lint-man.sh new file mode 100755 index 000000000..8915e9ece --- /dev/null +++ b/contrib/scripts/lint/lint-man.sh | |||
@@ -0,0 +1,38 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # SPDX-License-Identifier: 0BSD | ||
4 | # spit out ONLY error messages using groff. | ||
5 | |||
6 | existence() | ||
7 | { | ||
8 | command -v "$1" >/dev/null 2>&1 | ||
9 | } | ||
10 | |||
11 | if existence groff; | ||
12 | then | ||
13 | echo "groff check" | ||
14 | for f in `find . -name \*\.[1-9]`; | ||
15 | do | ||
16 | LC_ALL=en_US.UTF-8 \ | ||
17 | MANROFFSEQ='' \ | ||
18 | MANWIDTH=80 \ | ||
19 | groff -m mandoc -b -z -w w $f; | ||
20 | done | ||
21 | # FIXME below, grande stupidity. | ||
22 | rm groff_lint.log | ||
23 | echo "Wrong use of B" | ||
24 | for f in `find . -name \*\.[1-9]`; | ||
25 | do | ||
26 | awk '/^\.B$/ {print FILENAME":"NR":"$0}' $f >> groff_lint.log || true | ||
27 | done | ||
28 | fi | ||
29 | |||
30 | echo "mandoc check" | ||
31 | # spit out ONLY error messages with mandoc: | ||
32 | if existence mandoc; | ||
33 | then | ||
34 | mandoc -T lint `find . -name \*\.[1-9]` | ||
35 | fi | ||
36 | |||
37 | #LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 /run/current-system/profile/bin/man --warnings -E UTF-8 -l -Tutf8 -Z <*.5> >report5.log | ||
38 | #LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 /run/current-system/profile/bin/man --warnings -E UTF-8 -l -Tutf8 -Z <*.1> >report1.log | ||
diff --git a/contrib/scripts/lint/lint-python.sh b/contrib/scripts/lint/lint-python.sh new file mode 100755 index 000000000..0e46719ff --- /dev/null +++ b/contrib/scripts/lint/lint-python.sh | |||
@@ -0,0 +1,79 @@ | |||
1 | #!/bin/sh | ||
2 | # check python style (and 2 to 3 migration) | ||
3 | # | ||
4 | # behold, the worst lowest effort shell script | ||
5 | # ...given that we have more generic checking | ||
6 | # for executables in other scripts already | ||
7 | |||
8 | existence() | ||
9 | { | ||
10 | command -v "$1" >/dev/null 2>&1 | ||
11 | } | ||
12 | |||
13 | # It is assumed that you are in 'lint'. | ||
14 | LOGFILE="python-lint.log" | ||
15 | |||
16 | # invoke from root of source! | ||
17 | if [ $(basename $(pwd)) = "scripts" ] | ||
18 | then | ||
19 | return 1 | ||
20 | else | ||
21 | if [ -e "${LOGFILE}" ] | ||
22 | then | ||
23 | rm ${LOGFILE} | ||
24 | fi | ||
25 | |||
26 | if existence python; | ||
27 | then | ||
28 | python --version >> ${LOGFILE} | ||
29 | fi | ||
30 | |||
31 | if existence python2; | ||
32 | then | ||
33 | python2 --version >> ${LOGFILE} | ||
34 | fi | ||
35 | |||
36 | if existence python3; | ||
37 | then | ||
38 | python3 --version >> ${LOGFILE} | ||
39 | fi | ||
40 | |||
41 | if existence python3.7; | ||
42 | then | ||
43 | python3.7 --version >> ${LOGFILE} | ||
44 | fi | ||
45 | |||
46 | if existence flake8; | ||
47 | then | ||
48 | echo >> ${LOGFILE} | ||
49 | echo "flake8:" >> ${LOGFILE} | ||
50 | echo >> ${LOGFILE} | ||
51 | flake8 >> ${LOGFILE} | ||
52 | fi | ||
53 | |||
54 | if existence flake8-3.7; | ||
55 | then | ||
56 | echo >> ${LOGFILE} | ||
57 | echo "flake8:" >> ${LOGFILE} | ||
58 | echo >> ${LOGFILE} | ||
59 | flake8-3.7 >> ${LOGFILE} | ||
60 | fi | ||
61 | |||
62 | if existence 2to3; | ||
63 | then | ||
64 | echo >> ${LOGFILE} | ||
65 | echo "2to3" >> ${LOGFILE} | ||
66 | echo >> ${LOGFILE} | ||
67 | 2to3 -v -d . >> ${LOGFILE} | ||
68 | 2to3 -v -p . >> ${LOGFILE} | ||
69 | fi | ||
70 | |||
71 | if existence 2to3-3.7; | ||
72 | then | ||
73 | echo >> ${LOGFILE} | ||
74 | echo "2to3" >> ${LOGFILE} | ||
75 | echo >> ${LOGFILE} | ||
76 | 2to3-3.7 -v -d . >> ${LOGFILE} | ||
77 | 2to3-3.7 -v -p . >> ${LOGFILE} | ||
78 | fi | ||
79 | fi | ||
diff --git a/contrib/scripts/process_log.sh b/contrib/scripts/process_log.sh index c25c515c2..7b2363a0e 100755 --- a/contrib/scripts/process_log.sh +++ b/contrib/scripts/process_log.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | 2 | ||
3 | # Usage: service should print "STARTING SERVICE (srvc) for peer [PEER]" where: | 3 | # Usage: service should print "STARTING SERVICE (srvc) for peer [PEER]" where: |
4 | # - "srvc" is the service name (in lowercase, as in the log output). | 4 | # - "srvc" is the service name (in lowercase, as in the log output). |
@@ -23,8 +23,16 @@ rm __tmp_peers | |||
23 | sed -e "$SED_EXPR" log > .log | 23 | sed -e "$SED_EXPR" log > .log |
24 | echo "$0 sed regex: $SED_EXPR" >> .log | 24 | echo "$0 sed regex: $SED_EXPR" >> .log |
25 | 25 | ||
26 | SIZE=`stat -c%s .log` | 26 | if [ -n "$(uname -a | grep -q 'Linux')" ]; then |
27 | # GNU coreutils: | ||
28 | SIZE=`stat -c%s .log` | ||
29 | else | ||
30 | # NetBSD, FreeBSD (and others?): | ||
31 | SIZE=`stat -f%z .log` | ||
32 | fi | ||
33 | |||
34 | # echo $SIZE | ||
27 | 35 | ||
28 | if [[ "`ps aux | grep "kwrite .lo[g]"`" = "" && "$SIZE" < 10000000 ]]; then | 36 | if [ "`ps aux | grep "kwrite .lo[g]"`" = "" -a "$SIZE" -lt "10000000" ]; then |
29 | kwrite .log --geometry 960x1140-960 & | 37 | kwrite .log --geometry 960x1140-960 & |
30 | fi | 38 | fi |
diff --git a/contrib/scripts/pydiffer.py.in b/contrib/scripts/pydiffer.py.in index 1dbe856db..35d9ffa35 100644 --- a/contrib/scripts/pydiffer.py.in +++ b/contrib/scripts/pydiffer.py.in | |||
@@ -1,5 +1,5 @@ | |||
1 | #!@PYTHON@ | 1 | #!@PYTHON@ |
2 | from __future__ import print_function | 2 | |
3 | import os | 3 | import os |
4 | import sys | 4 | import sys |
5 | import difflib | 5 | import difflib |
diff --git a/contrib/scripts/pydmesg b/contrib/scripts/pydmesg index d60e08fe3..9b21359f0 100755 --- a/contrib/scripts/pydmesg +++ b/contrib/scripts/pydmesg | |||
@@ -8,8 +8,6 @@ | |||
8 | pydmesg: dmesg with human-readable timestamps | 8 | pydmesg: dmesg with human-readable timestamps |
9 | """ | 9 | """ |
10 | 10 | ||
11 | from __future__ import with_statement | ||
12 | |||
13 | import re | 11 | import re |
14 | import subprocess | 12 | import subprocess |
15 | import sys | 13 | import sys |
diff --git a/contrib/scripts/revisionary.sh b/contrib/scripts/revisionary.sh index 5778cf148..a39660d52 100755 --- a/contrib/scripts/revisionary.sh +++ b/contrib/scripts/revisionary.sh | |||
@@ -16,7 +16,7 @@ CMD_TEST="cd src/transport ; make test_transport_api_tcp; ./test_transport_api_t | |||
16 | LOGGING=" 1> /dev/null 2> errors.txt" | 16 | LOGGING=" 1> /dev/null 2> errors.txt" |
17 | LOGFILE="log.txt" | 17 | LOGFILE="log.txt" |
18 | 18 | ||
19 | function output () | 19 | output () |
20 | { | 20 | { |
21 | eval echo $1 | 21 | eval echo $1 |
22 | eval echo $1 >> $LOGFILE | 22 | eval echo $1 >> $LOGFILE |
diff --git a/contrib/scripts/terminate.py.in b/contrib/scripts/terminate.py.in index 9ed356502..161b4db61 100644 --- a/contrib/scripts/terminate.py.in +++ b/contrib/scripts/terminate.py.in | |||
@@ -21,7 +21,6 @@ | |||
21 | # For other platforms it's equivalent to Popen.kill () | 21 | # For other platforms it's equivalent to Popen.kill () |
22 | # Requires pywin32 on W32. | 22 | # Requires pywin32 on W32. |
23 | 23 | ||
24 | from builtins import object | ||
25 | import sys | 24 | import sys |
26 | import subprocess | 25 | import subprocess |
27 | import os | 26 | import os |
diff --git a/contrib/scripts/testbed_cleanup.sh b/contrib/scripts/testbed_cleanup.sh index 57413fba0..ee0200d44 100755 --- a/contrib/scripts/testbed_cleanup.sh +++ b/contrib/scripts/testbed_cleanup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | 2 | ||
3 | ################################################################################### | 3 | ################################################################################### |
4 | # Script to clean a previous run of testbed which has crashed. This scripts kills # | 4 | # Script to clean a previous run of testbed which has crashed. This scripts kills # |
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg new file mode 100644 index 000000000..a5b78fb7e --- /dev/null +++ b/contrib/uncrustify.cfg | |||
@@ -0,0 +1,80 @@ | |||
1 | # Almost the GNU format | ||
2 | |||
3 | indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs | ||
4 | input_tab_size = 8 # original tab size | ||
5 | output_tab_size = 8 # new tab size | ||
6 | indent_columns = 2 | ||
7 | # indent_label = 2 # pos: absolute col, neg: relative column | ||
8 | indent_align_string = False # align broken strings | ||
9 | indent_brace = 2 | ||
10 | |||
11 | nl_enum_brace = remove # "enum {" vs "enum \n {" | ||
12 | nl_union_brace = remove # "union {" vs "union \n {" | ||
13 | nl_struct_brace = remove # "struct {" vs "struct \n {" | ||
14 | nl_do_brace = add # "do {" vs "do \n {" | ||
15 | nl_if_brace = add # "if () {" vs "if () \n {" | ||
16 | nl_for_brace = add # "for () {" vs "for () \n {" | ||
17 | nl_else_brace = add # "else {" vs "else \n {" | ||
18 | nl_while_brace = add # "while () {" vs "while () \n {" | ||
19 | nl_switch_brace = add # "switch () {" vs "switch () \n {" | ||
20 | nl_func_var_def_blk = 1 | ||
21 | nl_before_case = 1 | ||
22 | nl_fcall_brace = add # "foo() {" vs "foo()\n{" | ||
23 | nl_fdef_brace = add # "int foo() {" vs "int foo()\n{" | ||
24 | # nl_after_return = TRUE | ||
25 | nl_brace_while = add | ||
26 | nl_brace_else = add | ||
27 | nl_squeeze_ifdef = TRUE | ||
28 | |||
29 | # mod_paren_on_return = ignore # "return 1;" vs "return (1);" | ||
30 | # mod_full_brace_if = ignore # "if (a) a--;" vs "if (a) { a--; }" | ||
31 | # mod_full_brace_for = ignore # "for () a--;" vs "for () { a--; }" | ||
32 | # mod_full_brace_do = ignore # "do a--; while ();" vs "do { a--; } while ();" | ||
33 | # mod_full_brace_while = ignore # "while (a) a--;" vs "while (a) { a--; }" | ||
34 | |||
35 | sp_before_semi = remove | ||
36 | sp_paren_paren = remove # space between (( and )) | ||
37 | sp_return_paren = remove # "return (1);" vs "return(1);" | ||
38 | sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)" | ||
39 | sp_before_sparen = force # "if (" vs "if(" | ||
40 | sp_after_sparen = force # "if () {" vs "if (){" | ||
41 | sp_after_cast = remove # "(int) a" vs "(int)a" | ||
42 | sp_inside_braces = force # "{ 1 }" vs "{1}" | ||
43 | sp_inside_braces_struct = force # "{ 1 }" vs "{1}" | ||
44 | sp_inside_braces_enum = force # "{ 1 }" vs "{1}" | ||
45 | sp_inside_paren = remove | ||
46 | sp_inside_fparen = remove | ||
47 | sp_inside_sparen = remove | ||
48 | #sp_type_func = ignore | ||
49 | sp_assign = force | ||
50 | sp_arith = force | ||
51 | sp_bool = force | ||
52 | sp_compare = force | ||
53 | sp_after_comma = force | ||
54 | sp_func_def_paren = remove # "int foo (){" vs "int foo(){" | ||
55 | sp_func_call_paren = remove # "foo (" vs "foo(" | ||
56 | sp_func_proto_paren = remove # "int foo ();" vs "int foo();" | ||
57 | |||
58 | # align_with_tabs = FALSE # use tabs to align | ||
59 | # align_on_tabstop = FALSE # align on tabstops | ||
60 | # align_enum_equ_span = 4 | ||
61 | # align_nl_cont = TRUE | ||
62 | # align_var_def_span = 2 | ||
63 | # align_var_def_inline = TRUE | ||
64 | # align_var_def_star = TRUE | ||
65 | # align_var_def_colon = TRUE | ||
66 | # align_assign_span = 1 | ||
67 | # align_struct_init_span = 3 | ||
68 | # align_var_struct_span = 3 | ||
69 | # align_right_cmt_span = 3 | ||
70 | # align_pp_define_span = 3 | ||
71 | # align_pp_define_gap = 4 | ||
72 | # align_number_right = TRUE | ||
73 | # align_typedef_span = 5 | ||
74 | # align_typedef_gap = 3 | ||
75 | |||
76 | # cmt_star_cont = TRUE | ||
77 | |||
78 | eat_blanks_before_close_brace = TRUE | ||
79 | eat_blanks_after_open_brace = TRUE | ||
80 | |||
diff --git a/doc/Makefile.am b/doc/Makefile.am index 4443b42f8..eb23b534b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am | |||
@@ -1,9 +1,14 @@ | |||
1 | # This Makefile.am is in the public domain | 1 | # This Makefile.am is in the public domain |
2 | if DOCUMENTATION | 2 | if DOCUMENTATION |
3 | SUBDIRS = man doxygen handbook tutorial | 3 | SUBDIRS = doxygen handbook tutorial |
4 | endif | 4 | endif |
5 | |||
5 | if !DOCUMENTATION | 6 | if !DOCUMENTATION |
6 | SUBDIRS = man doxygen | 7 | SUBDIRS = doxygen |
8 | endif | ||
9 | |||
10 | if INCLUDE_MANPAGES | ||
11 | SUBDIRS += man | ||
7 | endif | 12 | endif |
8 | 13 | ||
9 | EXTRA_DIST = \ | 14 | EXTRA_DIST = \ |
@@ -7,5 +7,5 @@ | |||
7 | * | 7 | * |
8 | * Some additional documentation can be found under [Files](files.html), in the src/include/ directory. | 8 | * Some additional documentation can be found under [Files](files.html), in the src/include/ directory. |
9 | * | 9 | * |
10 | * See also the [handbooks](https://gnunet.org/handbooks) on installation, and for user and developer documentation. | 10 | * See also the [handbooks](https://docs.gnunet.org/) on installation, and for user and developer documentation. |
11 | */ | 11 | */ |
diff --git a/doc/handbook/Makefile.am b/doc/handbook/Makefile.am index 57a85bd56..a50a58937 100644 --- a/doc/handbook/Makefile.am +++ b/doc/handbook/Makefile.am | |||
@@ -18,7 +18,7 @@ infoimagedir = $(infodir)/images | |||
18 | # we use the include version which is backwards compatible | 18 | # we use the include version which is backwards compatible |
19 | # and upwards compatible, while the ref variant is neither. | 19 | # and upwards compatible, while the ref variant is neither. |
20 | 20 | ||
21 | AM_MAKEINFOHTMLFLAGS = --no-split --css-include=manual.css | 21 | AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css |
22 | 22 | ||
23 | dist_infoimage_DATA = \ | 23 | dist_infoimage_DATA = \ |
24 | images/gnunet-gtk-0-10-gns-a-done.png \ | 24 | images/gnunet-gtk-0-10-gns-a-done.png \ |
@@ -154,13 +154,6 @@ version.texi/replacement/revert: | |||
154 | @echo "@set VERSION GPACKAGE_VERSION" > gversion.texi | 154 | @echo "@set VERSION GPACKAGE_VERSION" > gversion.texi |
155 | @echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi | 155 | @echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi |
156 | 156 | ||
157 | if TEXI2MDOC_GENERATION | ||
158 | gnunet-documentation.7: version.texi/replacement | ||
159 | @echo Attempting to output an mdoc formatted section 7 document | ||
160 | @texi2mdoc -I$(pwd):$(pwd)/chapters gnunet.texi > ../man/gnunet-documentation.7 | ||
161 | |||
162 | # TODO: (Maybe) other outputs resulting from this. | ||
163 | endif | ||
164 | 157 | ||
165 | # FIXME: rm *.html and *.pdf | 158 | # FIXME: rm *.html and *.pdf |
166 | #doc-clean: | 159 | #doc-clean: |
diff --git a/doc/handbook/chapters/developer.texi b/doc/handbook/chapters/developer.texi index cd81fcfb7..6c426ebad 100644 --- a/doc/handbook/chapters/developer.texi +++ b/doc/handbook/chapters/developer.texi | |||
@@ -202,7 +202,8 @@ Gtk+-based user interfaces, including: | |||
202 | @item @command{gnunet-statistics-gtk} (statistics over time), | 202 | @item @command{gnunet-statistics-gtk} (statistics over time), |
203 | @item @command{gnunet-peerinfo-gtk} | 203 | @item @command{gnunet-peerinfo-gtk} |
204 | (information about current connections and known peers), | 204 | (information about current connections and known peers), |
205 | @item @command{gnunet-chat-gtk} (chat GUI) and | 205 | @item @command{gnunet-namestore-gtk} (GNS record editor), |
206 | @item @command{gnunet-conversation-gtk} (voice chat GUI) and | ||
206 | @item @command{gnunet-setup} (setup tool for "everything") | 207 | @item @command{gnunet-setup} (setup tool for "everything") |
207 | @end itemize | 208 | @end itemize |
208 | 209 | ||
@@ -2176,7 +2177,7 @@ work): | |||
2176 | @example | 2177 | @example |
2177 | export PYPI=@value{PYPI-URL} | 2178 | export PYPI=@value{PYPI-URL} |
2178 | wget $PYPI/z/zope.interface/zope.interface-3.8.0.tar.gz | 2179 | wget $PYPI/z/zope.interface/zope.interface-3.8.0.tar.gz |
2179 | tar zvfz zope.interface-3.8.0.tar.gz | 2180 | tar xzvf zope.interface-3.8.0.tar.gz |
2180 | cd zope.interface-3.8.0 | 2181 | cd zope.interface-3.8.0 |
2181 | sudo python setup.py install | 2182 | sudo python setup.py install |
2182 | @end example | 2183 | @end example |
@@ -2401,10 +2402,11 @@ the program at various levels. | |||
2401 | @file{gnunet_common.h} defines several @strong{log levels}: | 2402 | @file{gnunet_common.h} defines several @strong{log levels}: |
2402 | @table @asis | 2403 | @table @asis |
2403 | 2404 | ||
2404 | @item ERROR for errors (really problematic situations, often leading to | 2405 | @item ERROR for errors |
2405 | crashes) | 2406 | (really problematic situations, often leading to crashes) |
2406 | @item WARNING for warnings (troubling situations that might have | 2407 | @item WARNING for warnings |
2407 | negative consequences, although not fatal) | 2408 | (troubling situations that might have negative consequences, although |
2409 | not fatal) | ||
2408 | @item INFO for various information. | 2410 | @item INFO for various information. |
2409 | Used somewhat rarely, as GNUnet statistics is used to hold and display | 2411 | Used somewhat rarely, as GNUnet statistics is used to hold and display |
2410 | most of the information that users might find interesting. | 2412 | most of the information that users might find interesting. |
@@ -2830,7 +2832,7 @@ which both ensure correct alignment when sending structs over the network. | |||
2830 | @c *********************************************************************** | 2832 | @c *********************************************************************** |
2831 | @node Client - Establish connection | 2833 | @node Client - Establish connection |
2832 | @subsubsection Client - Establish connection | 2834 | @subsubsection Client - Establish connection |
2833 | @c %**end of header | 2835 | |
2834 | 2836 | ||
2835 | 2837 | ||
2836 | At first, on the client side, the underlying API is employed to create a | 2838 | At first, on the client side, the underlying API is employed to create a |
@@ -2845,7 +2847,7 @@ client = GNUNET_CLIENT_connect ("transport", cfg); | |||
2845 | @c *********************************************************************** | 2847 | @c *********************************************************************** |
2846 | @node Client - Initialize request message | 2848 | @node Client - Initialize request message |
2847 | @subsubsection Client - Initialize request message | 2849 | @subsubsection Client - Initialize request message |
2848 | @c %**end of header | 2850 | |
2849 | 2851 | ||
2850 | When the connection is ready, we initialize the message. In this step, | 2852 | When the connection is ready, we initialize the message. In this step, |
2851 | all the fields of the message should be properly initialized, namely the | 2853 | all the fields of the message should be properly initialized, namely the |
@@ -2878,7 +2880,7 @@ Big Endian and Little Endian. | |||
2878 | @c *********************************************************************** | 2880 | @c *********************************************************************** |
2879 | @node Client - Send request and receive response | 2881 | @node Client - Send request and receive response |
2880 | @subsubsection Client - Send request and receive response | 2882 | @subsubsection Client - Send request and receive response |
2881 | @c %**end of header | 2883 | |
2882 | 2884 | ||
2883 | @b{FIXME: This is very outdated, see the tutorial for the current API!} | 2885 | @b{FIXME: This is very outdated, see the tutorial for the current API!} |
2884 | 2886 | ||
@@ -2913,7 +2915,7 @@ int main(int argc, char**argv) @{ | |||
2913 | @c *********************************************************************** | 2915 | @c *********************************************************************** |
2914 | @node Server - Add new handles for specified messages | 2916 | @node Server - Add new handles for specified messages |
2915 | @subsubsection Server - Add new handles for specified messages | 2917 | @subsubsection Server - Add new handles for specified messages |
2916 | @c %**end of header | 2918 | |
2917 | 2919 | ||
2918 | in the function above the argument @code{run} is used to initiate | 2920 | in the function above the argument @code{run} is used to initiate |
2919 | transport service,and defined like this: | 2921 | transport service,and defined like this: |
@@ -2971,7 +2973,7 @@ depicted as @code{@{NULL, NULL, 0, 0@}} is set in the last area. | |||
2971 | @c *********************************************************************** | 2973 | @c *********************************************************************** |
2972 | @node Server - Process request message | 2974 | @node Server - Process request message |
2973 | @subsubsection Server - Process request message | 2975 | @subsubsection Server - Process request message |
2974 | @c %**end of header | 2976 | |
2975 | 2977 | ||
2976 | After the initialization of transport service, the request message would | 2978 | After the initialization of transport service, the request message would |
2977 | be processed. Before handling the main message data, the validity of this | 2979 | be processed. Before handling the main message data, the validity of this |
@@ -3022,7 +3024,7 @@ message. | |||
3022 | @c *********************************************************************** | 3024 | @c *********************************************************************** |
3023 | @node Server - Response to client | 3025 | @node Server - Response to client |
3024 | @subsubsection Server - Response to client | 3026 | @subsubsection Server - Response to client |
3025 | @c %**end of header | 3027 | |
3026 | 3028 | ||
3027 | Once the processing of current request is done, the server should give the | 3029 | Once the processing of current request is done, the server should give the |
3028 | response to the client. A new @code{struct AddressLookupMessage} would be | 3030 | response to the client. A new @code{struct AddressLookupMessage} would be |
@@ -3058,7 +3060,7 @@ to send the message. | |||
3058 | @c *********************************************************************** | 3060 | @c *********************************************************************** |
3059 | @node Server - Notification of clients | 3061 | @node Server - Notification of clients |
3060 | @subsubsection Server - Notification of clients | 3062 | @subsubsection Server - Notification of clients |
3061 | @c %**end of header | 3063 | |
3062 | 3064 | ||
3063 | Often a service needs to (repeatedly) transmit notifications to a client | 3065 | Often a service needs to (repeatedly) transmit notifications to a client |
3064 | or a group of clients. In these cases, the client typically has once | 3066 | or a group of clients. In these cases, the client typically has once |
@@ -3087,7 +3089,7 @@ messages to the server. | |||
3087 | @node Conversion between Network Byte Order (Big Endian) and Host Byte Order | 3089 | @node Conversion between Network Byte Order (Big Endian) and Host Byte Order |
3088 | @subsubsection Conversion between Network Byte Order (Big Endian) and Host Byte Order | 3090 | @subsubsection Conversion between Network Byte Order (Big Endian) and Host Byte Order |
3089 | @c %** subsub? it's a referenced page on the ipc document. | 3091 | @c %** subsub? it's a referenced page on the ipc document. |
3090 | @c %**end of header | 3092 | |
3091 | 3093 | ||
3092 | Here we can simply comprehend big endian and little endian as Network Byte | 3094 | Here we can simply comprehend big endian and little endian as Network Byte |
3093 | Order and Host Byte Order respectively. What is the difference between | 3095 | Order and Host Byte Order respectively. What is the difference between |
@@ -3143,7 +3145,7 @@ byte order. | |||
3143 | @cindex Cryptography API | 3145 | @cindex Cryptography API |
3144 | @node Cryptography API | 3146 | @node Cryptography API |
3145 | @subsection Cryptography API | 3147 | @subsection Cryptography API |
3146 | @c %**end of header | 3148 | |
3147 | 3149 | ||
3148 | The gnunetutil APIs provides the cryptographic primitives used in GNUnet. | 3150 | The gnunetutil APIs provides the cryptographic primitives used in GNUnet. |
3149 | GNUnet uses 2048 bit RSA keys for the session key exchange and for signing | 3151 | GNUnet uses 2048 bit RSA keys for the session key exchange and for signing |
@@ -3180,7 +3182,7 @@ should be considered secure for traditional applications of RSA. | |||
3180 | @cindex Message Queue API | 3182 | @cindex Message Queue API |
3181 | @node Message Queue API | 3183 | @node Message Queue API |
3182 | @subsection Message Queue API | 3184 | @subsection Message Queue API |
3183 | @c %**end of header | 3185 | |
3184 | 3186 | ||
3185 | @strong{ Introduction }@ | 3187 | @strong{ Introduction }@ |
3186 | Often, applications need to queue messages that | 3188 | Often, applications need to queue messages that |
@@ -3324,7 +3326,7 @@ callback. When canceling an envelope, it is not necessary@ to call | |||
3324 | @cindex Service API | 3326 | @cindex Service API |
3325 | @node Service API | 3327 | @node Service API |
3326 | @subsection Service API | 3328 | @subsection Service API |
3327 | @c %**end of header | 3329 | |
3328 | 3330 | ||
3329 | Most GNUnet code lives in the form of services. Services are processes | 3331 | Most GNUnet code lives in the form of services. Services are processes |
3330 | that offer an API for other components of the system to build on. Those | 3332 | that offer an API for other components of the system to build on. Those |
@@ -3400,7 +3402,7 @@ clients to set (possibly persistent) statistic values before terminating. | |||
3400 | @c *********************************************************************** | 3402 | @c *********************************************************************** |
3401 | @node Optimizing Memory Consumption of GNUnet's (Multi-) Hash Maps | 3403 | @node Optimizing Memory Consumption of GNUnet's (Multi-) Hash Maps |
3402 | @subsection Optimizing Memory Consumption of GNUnet's (Multi-) Hash Maps | 3404 | @subsection Optimizing Memory Consumption of GNUnet's (Multi-) Hash Maps |
3403 | @c %**end of header | 3405 | |
3404 | 3406 | ||
3405 | A commonly used data structure in GNUnet is a (multi-)hash map. It is most | 3407 | A commonly used data structure in GNUnet is a (multi-)hash map. It is most |
3406 | often used to map a peer identity to some data structure, but also to map | 3408 | often used to map a peer identity to some data structure, but also to map |
@@ -3424,7 +3426,7 @@ the hash map. | |||
3424 | 3426 | ||
3425 | @node Analysis | 3427 | @node Analysis |
3426 | @subsubsection Analysis | 3428 | @subsubsection Analysis |
3427 | @c %**end of header | 3429 | |
3428 | 3430 | ||
3429 | The main reason for the "excessive" memory consumption by the hash map is | 3431 | The main reason for the "excessive" memory consumption by the hash map is |
3430 | that GNUnet uses 512-bit cryptographic hash codes --- and the | 3432 | that GNUnet uses 512-bit cryptographic hash codes --- and the |
@@ -3475,7 +3477,7 @@ we tend to really try to keep the entries small. | |||
3475 | @c *********************************************************************** | 3477 | @c *********************************************************************** |
3476 | @node Solution | 3478 | @node Solution |
3477 | @subsubsection Solution | 3479 | @subsubsection Solution |
3478 | @c %**end of header | 3480 | |
3479 | 3481 | ||
3480 | The solution that has now been implemented is to @strong{optionally} | 3482 | The solution that has now been implemented is to @strong{optionally} |
3481 | allow the hash map to not make a (deep) copy of the hash but instead have | 3483 | allow the hash map to not make a (deep) copy of the hash but instead have |
@@ -3493,7 +3495,7 @@ pointer and undefined behavior of the (multi-)hash map API. | |||
3493 | @c *********************************************************************** | 3495 | @c *********************************************************************** |
3494 | @node Migration | 3496 | @node Migration |
3495 | @subsubsection Migration | 3497 | @subsubsection Migration |
3496 | @c %**end of header | 3498 | |
3497 | 3499 | ||
3498 | To use the new feature, first check that the values contain the respective | 3500 | To use the new feature, first check that the values contain the respective |
3499 | key (and never modify it). Then, all calls to | 3501 | key (and never modify it). Then, all calls to |
@@ -3542,7 +3544,7 @@ removed from the map, undefined behavior is likely to be observed. | |||
3542 | @c *********************************************************************** | 3544 | @c *********************************************************************** |
3543 | @node Conclusion | 3545 | @node Conclusion |
3544 | @subsubsection Conclusion | 3546 | @subsubsection Conclusion |
3545 | @c %**end of header | 3547 | |
3546 | 3548 | ||
3547 | The new optimization can is often applicable and can result in a | 3549 | The new optimization can is often applicable and can result in a |
3548 | reduction in memory consumption of up to 30% in practice. However, it | 3550 | reduction in memory consumption of up to 30% in practice. However, it |
@@ -3555,10 +3557,11 @@ at least until benchmarks exist). | |||
3555 | @c *********************************************************************** | 3557 | @c *********************************************************************** |
3556 | @node Availability | 3558 | @node Availability |
3557 | @subsubsection Availability | 3559 | @subsubsection Availability |
3558 | @c %**end of header | ||
3559 | 3560 | ||
3560 | The new multi hash map code was committed in SVN 24319 (will be in GNUnet | 3561 | |
3561 | 0.9.4). Various subsystems (transport, core, dht, file-sharing) were | 3562 | The new multi hash map code was committed in SVN 24319 (which made its |
3563 | way into GNUnet version 0.9.4). | ||
3564 | Various subsystems (transport, core, dht, file-sharing) were | ||
3562 | previously audited and modified to take advantage of the new capability. | 3565 | previously audited and modified to take advantage of the new capability. |
3563 | In particular, memory consumption of the file-sharing service is expected | 3566 | In particular, memory consumption of the file-sharing service is expected |
3564 | to drop by 20-30% due to this change. | 3567 | to drop by 20-30% due to this change. |
@@ -3567,7 +3570,7 @@ to drop by 20-30% due to this change. | |||
3567 | @cindex CONTAINER_MDLL API | 3570 | @cindex CONTAINER_MDLL API |
3568 | @node CONTAINER_MDLL API | 3571 | @node CONTAINER_MDLL API |
3569 | @subsection CONTAINER_MDLL API | 3572 | @subsection CONTAINER_MDLL API |
3570 | @c %**end of header | 3573 | |
3571 | 3574 | ||
3572 | This text documents the GNUNET_CONTAINER_MDLL API. The | 3575 | This text documents the GNUNET_CONTAINER_MDLL API. The |
3573 | GNUNET_CONTAINER_MDLL API is similar to the GNUNET_CONTAINER_DLL API in | 3576 | GNUNET_CONTAINER_MDLL API is similar to the GNUNET_CONTAINER_DLL API in |
@@ -3633,7 +3636,7 @@ Iterating over the list should be done by directly accessing the | |||
3633 | @cindex ARM | 3636 | @cindex ARM |
3634 | @node Automatic Restart Manager (ARM) | 3637 | @node Automatic Restart Manager (ARM) |
3635 | @section Automatic Restart Manager (ARM) | 3638 | @section Automatic Restart Manager (ARM) |
3636 | @c %**end of header | 3639 | |
3637 | 3640 | ||
3638 | GNUnet's Automated Restart Manager (ARM) is the GNUnet service responsible | 3641 | GNUnet's Automated Restart Manager (ARM) is the GNUnet service responsible |
3639 | for system initialization and service babysitting. ARM starts and halts | 3642 | for system initialization and service babysitting. ARM starts and halts |
@@ -3654,7 +3657,7 @@ about how ARM works and how to interact with it. | |||
3654 | @c *********************************************************************** | 3657 | @c *********************************************************************** |
3655 | @node Basic functionality | 3658 | @node Basic functionality |
3656 | @subsection Basic functionality | 3659 | @subsection Basic functionality |
3657 | @c %**end of header | 3660 | |
3658 | 3661 | ||
3659 | @itemize @bullet | 3662 | @itemize @bullet |
3660 | @item ARM source code can be found under "src/arm".@ Service processes are | 3663 | @item ARM source code can be found under "src/arm".@ Service processes are |
@@ -3678,7 +3681,7 @@ it to start a service "resolver", stops the "resolver" then stops "ARM". | |||
3678 | @c *********************************************************************** | 3681 | @c *********************************************************************** |
3679 | @node Key configuration options | 3682 | @node Key configuration options |
3680 | @subsection Key configuration options | 3683 | @subsection Key configuration options |
3681 | @c %**end of header | 3684 | |
3682 | 3685 | ||
3683 | Configurations for ARM and services should be available in a .conf file | 3686 | Configurations for ARM and services should be available in a .conf file |
3684 | (As an example, see test_arm_api_data.conf). When running ARM, the | 3687 | (As an example, see test_arm_api_data.conf). When running ARM, the |
@@ -3747,7 +3750,7 @@ services that are going to run. | |||
3747 | @c *********************************************************************** | 3750 | @c *********************************************************************** |
3748 | @node ARM - Availability | 3751 | @node ARM - Availability |
3749 | @subsection ARM - Availability | 3752 | @subsection ARM - Availability |
3750 | @c %**end of header | 3753 | |
3751 | 3754 | ||
3752 | As mentioned before, one of the features provided by ARM is starting | 3755 | As mentioned before, one of the features provided by ARM is starting |
3753 | services on demand. Consider the example of one service "client" that | 3756 | services on demand. Consider the example of one service "client" that |
@@ -3835,7 +3838,7 @@ problematic service. | |||
3835 | @cindex TRANSPORT Subsystem | 3838 | @cindex TRANSPORT Subsystem |
3836 | @node TRANSPORT Subsystem | 3839 | @node TRANSPORT Subsystem |
3837 | @section TRANSPORT Subsystem | 3840 | @section TRANSPORT Subsystem |
3838 | @c %**end of header | 3841 | |
3839 | 3842 | ||
3840 | This chapter documents how the GNUnet transport subsystem works. The | 3843 | This chapter documents how the GNUnet transport subsystem works. The |
3841 | GNUnet transport subsystem consists of three main components: the | 3844 | GNUnet transport subsystem consists of three main components: the |
@@ -3893,7 +3896,7 @@ transport service. | |||
3893 | 3896 | ||
3894 | @node Address validation protocol | 3897 | @node Address validation protocol |
3895 | @subsection Address validation protocol | 3898 | @subsection Address validation protocol |
3896 | @c %**end of header | 3899 | |
3897 | 3900 | ||
3898 | This section documents how the GNUnet transport service validates | 3901 | This section documents how the GNUnet transport service validates |
3899 | connections with other peers. It is a high-level description of the | 3902 | connections with other peers. It is a high-level description of the |
@@ -3956,7 +3959,7 @@ implementation details). | |||
3956 | @cindex NAT library | 3959 | @cindex NAT library |
3957 | @node NAT library | 3960 | @node NAT library |
3958 | @section NAT library | 3961 | @section NAT library |
3959 | @c %**end of header | 3962 | |
3960 | 3963 | ||
3961 | The goal of the GNUnet NAT library is to provide a general-purpose API for | 3964 | The goal of the GNUnet NAT library is to provide a general-purpose API for |
3962 | NAT traversal @strong{without} third-party support. So protocols that | 3965 | NAT traversal @strong{without} third-party support. So protocols that |
@@ -4003,7 +4006,7 @@ This way, it is easy to test if the current NAT configuration is valid. | |||
4003 | 4006 | ||
4004 | @node Distance-Vector plugin | 4007 | @node Distance-Vector plugin |
4005 | @section Distance-Vector plugin | 4008 | @section Distance-Vector plugin |
4006 | @c %**end of header | 4009 | |
4007 | 4010 | ||
4008 | The Distance Vector (DV) transport is a transport mechanism that allows | 4011 | The Distance Vector (DV) transport is a transport mechanism that allows |
4009 | peers to act as relays for each other, thereby connecting peers that would | 4012 | peers to act as relays for each other, thereby connecting peers that would |
@@ -4072,7 +4075,8 @@ message, and delivers it to Carol as though it came directly from Alice. | |||
4072 | @cindex SMTP plugin | 4075 | @cindex SMTP plugin |
4073 | @node SMTP plugin | 4076 | @node SMTP plugin |
4074 | @section SMTP plugin | 4077 | @section SMTP plugin |
4075 | @c %**end of header | 4078 | |
4079 | @c TODO: Update! | ||
4076 | 4080 | ||
4077 | This section describes the new SMTP transport plugin for GNUnet as it | 4081 | This section describes the new SMTP transport plugin for GNUnet as it |
4078 | exists in the 0.7.x and 0.8.x branch. SMTP support is currently not | 4082 | exists in the 0.7.x and 0.8.x branch. SMTP support is currently not |
@@ -4080,6 +4084,9 @@ available in GNUnet 0.9.x. This page also describes the transport layer | |||
4080 | abstraction (as it existed in 0.7.x and 0.8.x) in more detail and gives | 4084 | abstraction (as it existed in 0.7.x and 0.8.x) in more detail and gives |
4081 | some benchmarking results. The performance results presented are quite | 4085 | some benchmarking results. The performance results presented are quite |
4082 | old and maybe outdated at this point. | 4086 | old and maybe outdated at this point. |
4087 | For the readers in the year 2019, you will notice by the mention of | ||
4088 | version 0.7, 0.8, and 0.9 that this section has to be taken with your | ||
4089 | usual grain of salt and be updated eventually. | ||
4083 | 4090 | ||
4084 | @itemize @bullet | 4091 | @itemize @bullet |
4085 | @item Why use SMTP for a peer-to-peer transport? | 4092 | @item Why use SMTP for a peer-to-peer transport? |
@@ -4101,7 +4108,7 @@ old and maybe outdated at this point. | |||
4101 | 4108 | ||
4102 | @node Why use SMTP for a peer-to-peer transport? | 4109 | @node Why use SMTP for a peer-to-peer transport? |
4103 | @subsection Why use SMTP for a peer-to-peer transport? | 4110 | @subsection Why use SMTP for a peer-to-peer transport? |
4104 | @c %**end of header | 4111 | |
4105 | 4112 | ||
4106 | There are many reasons why one would not want to use SMTP: | 4113 | There are many reasons why one would not want to use SMTP: |
4107 | 4114 | ||
@@ -4136,7 +4143,7 @@ type of situation. | |||
4136 | 4143 | ||
4137 | @node How does it work? | 4144 | @node How does it work? |
4138 | @subsection How does it work? | 4145 | @subsection How does it work? |
4139 | @c %**end of header | 4146 | |
4140 | 4147 | ||
4141 | When a GNUnet peer needs to send a message to another GNUnet peer that has | 4148 | When a GNUnet peer needs to send a message to another GNUnet peer that has |
4142 | advertised (only) an SMTP transport address, GNUnet base64-encodes the | 4149 | advertised (only) an SMTP transport address, GNUnet base64-encodes the |
@@ -4149,7 +4156,7 @@ GNUnet E-mail messages by searching for a generic filter. | |||
4149 | 4156 | ||
4150 | @node How do I configure my peer? | 4157 | @node How do I configure my peer? |
4151 | @subsection How do I configure my peer? | 4158 | @subsection How do I configure my peer? |
4152 | @c %**end of header | 4159 | |
4153 | 4160 | ||
4154 | First, you need to configure @code{procmail} to filter your inbound E-mail | 4161 | First, you need to configure @code{procmail} to filter your inbound E-mail |
4155 | for GNUnet traffic. The GNUnet messages must be delivered into a pipe, for | 4162 | for GNUnet traffic. The GNUnet messages must be delivered into a pipe, for |
@@ -4194,7 +4201,7 @@ This should be it, but you may probably want to test it first. | |||
4194 | 4201 | ||
4195 | @node How do I test if it works? | 4202 | @node How do I test if it works? |
4196 | @subsection How do I test if it works? | 4203 | @subsection How do I test if it works? |
4197 | @c %**end of header | 4204 | |
4198 | 4205 | ||
4199 | Any transport can be subjected to some rudimentary tests using the | 4206 | Any transport can be subjected to some rudimentary tests using the |
4200 | @code{gnunet-transport-check} tool. The tool sends a message to the local | 4207 | @code{gnunet-transport-check} tool. The tool sends a message to the local |
@@ -4217,7 +4224,7 @@ to send and receive messages. | |||
4217 | 4224 | ||
4218 | @node How fast is it? | 4225 | @node How fast is it? |
4219 | @subsection How fast is it? | 4226 | @subsection How fast is it? |
4220 | @c %**end of header | 4227 | |
4221 | 4228 | ||
4222 | We have measured the performance of the UDP, TCP and SMTP transport layer | 4229 | We have measured the performance of the UDP, TCP and SMTP transport layer |
4223 | directly and when used from an application using the GNUnet core. | 4230 | directly and when used from an application using the GNUnet core. |
@@ -4284,7 +4291,7 @@ benchmarking results. | |||
4284 | @cindex Bluetooth plugin | 4291 | @cindex Bluetooth plugin |
4285 | @node Bluetooth plugin | 4292 | @node Bluetooth plugin |
4286 | @section Bluetooth plugin | 4293 | @section Bluetooth plugin |
4287 | @c %**end of header | 4294 | |
4288 | 4295 | ||
4289 | This page describes the new Bluetooth transport plugin for GNUnet. The | 4296 | This page describes the new Bluetooth transport plugin for GNUnet. The |
4290 | plugin is still in the testing stage so don't expect it to work | 4297 | plugin is still in the testing stage so don't expect it to work |
@@ -4310,7 +4317,7 @@ ask on the IRC channel. | |||
4310 | 4317 | ||
4311 | @node What do I need to use the Bluetooth plugin transport? | 4318 | @node What do I need to use the Bluetooth plugin transport? |
4312 | @subsection What do I need to use the Bluetooth plugin transport? | 4319 | @subsection What do I need to use the Bluetooth plugin transport? |
4313 | @c %**end of header | 4320 | |
4314 | 4321 | ||
4315 | If you are a GNU/Linux user and you want to use the Bluetooth | 4322 | If you are a GNU/Linux user and you want to use the Bluetooth |
4316 | transport plugin you should install the | 4323 | transport plugin you should install the |
@@ -4337,7 +4344,7 @@ protocol so we cannot turn on your device programatically! | |||
4337 | @c FIXME: Change to unique title | 4344 | @c FIXME: Change to unique title |
4338 | @node How does it work2? | 4345 | @node How does it work2? |
4339 | @subsection How does it work2? | 4346 | @subsection How does it work2? |
4340 | @c %**end of header | 4347 | |
4341 | 4348 | ||
4342 | The Bluetooth transport plugin uses virtually the same code as the WLAN | 4349 | The Bluetooth transport plugin uses virtually the same code as the WLAN |
4343 | plugin and only the helper binary is different. The helper takes a single | 4350 | plugin and only the helper binary is different. The helper takes a single |
@@ -4367,7 +4374,7 @@ discovery. | |||
4367 | 4374 | ||
4368 | @node What possible errors should I be aware of? | 4375 | @node What possible errors should I be aware of? |
4369 | @subsection What possible errors should I be aware of? | 4376 | @subsection What possible errors should I be aware of? |
4370 | @c %**end of header | 4377 | |
4371 | 4378 | ||
4372 | @emph{This section is dedicated for GNU/Linux users} | 4379 | @emph{This section is dedicated for GNU/Linux users} |
4373 | 4380 | ||
@@ -4406,7 +4413,7 @@ the device and to send some particular commands to it. | |||
4406 | @c FIXME: A more unique name | 4413 | @c FIXME: A more unique name |
4407 | @node How do I configure my peer2? | 4414 | @node How do I configure my peer2? |
4408 | @subsection How do I configure my peer2? | 4415 | @subsection How do I configure my peer2? |
4409 | @c %**end of header | 4416 | |
4410 | 4417 | ||
4411 | On GNU/Linux, you just have to be sure that the interface name | 4418 | On GNU/Linux, you just have to be sure that the interface name |
4412 | corresponds to the one that you want to use. | 4419 | corresponds to the one that you want to use. |
@@ -4440,7 +4447,7 @@ transport service. | |||
4440 | 4447 | ||
4441 | @node How can I test it? | 4448 | @node How can I test it? |
4442 | @subsection How can I test it? | 4449 | @subsection How can I test it? |
4443 | @c %**end of header | 4450 | |
4444 | 4451 | ||
4445 | If you have two Bluetooth devices on the same machine and you are using | 4452 | If you have two Bluetooth devices on the same machine and you are using |
4446 | GNU/Linux you must: | 4453 | GNU/Linux you must: |
@@ -4487,7 +4494,7 @@ transport service. | |||
4487 | 4494 | ||
4488 | @node The implementation of the Bluetooth transport plugin | 4495 | @node The implementation of the Bluetooth transport plugin |
4489 | @subsection The implementation of the Bluetooth transport plugin | 4496 | @subsection The implementation of the Bluetooth transport plugin |
4490 | @c %**end of header | 4497 | |
4491 | 4498 | ||
4492 | This page describes the implementation of the Bluetooth transport plugin. | 4499 | This page describes the implementation of the Bluetooth transport plugin. |
4493 | 4500 | ||
@@ -4521,7 +4528,7 @@ platforms. | |||
4521 | 4528 | ||
4522 | @node Linux functionality | 4529 | @node Linux functionality |
4523 | @subsubsection Linux functionality | 4530 | @subsubsection Linux functionality |
4524 | @c %**end of header | 4531 | |
4525 | 4532 | ||
4526 | In order to implement the plugin functionality on GNU/Linux I | 4533 | In order to implement the plugin functionality on GNU/Linux I |
4527 | used the BlueZ stack. | 4534 | used the BlueZ stack. |
@@ -4617,7 +4624,7 @@ support for @strong{broadcast messages}.} | |||
4617 | 4624 | ||
4618 | @node Details about the broadcast implementation | 4625 | @node Details about the broadcast implementation |
4619 | @subsubsection Details about the broadcast implementation | 4626 | @subsubsection Details about the broadcast implementation |
4620 | @c %**end of header | 4627 | |
4621 | 4628 | ||
4622 | First I want to point out that the broadcast functionality for the CONTROL | 4629 | First I want to point out that the broadcast functionality for the CONTROL |
4623 | messages is not implemented in a conventional way. Since the inquiry scan | 4630 | messages is not implemented in a conventional way. Since the inquiry scan |
@@ -4664,7 +4671,7 @@ simply use the socket. | |||
4664 | 4671 | ||
4665 | @node Windows functionality | 4672 | @node Windows functionality |
4666 | @subsubsection Windows functionality | 4673 | @subsubsection Windows functionality |
4667 | @c %**end of header | 4674 | |
4668 | 4675 | ||
4669 | For Windows I decided to use the Microsoft Bluetooth stack which has the | 4676 | For Windows I decided to use the Microsoft Bluetooth stack which has the |
4670 | advantage of coming standard from Windows XP SP2. The main disadvantage is | 4677 | advantage of coming standard from Windows XP SP2. The main disadvantage is |
@@ -4719,7 +4726,7 @@ broadcast messages. When it receives a broadcast message it will skip it. | |||
4719 | 4726 | ||
4720 | @node Pending features | 4727 | @node Pending features |
4721 | @subsubsection Pending features | 4728 | @subsubsection Pending features |
4722 | @c %**end of header | 4729 | |
4723 | 4730 | ||
4724 | @itemize @bullet | 4731 | @itemize @bullet |
4725 | @item Implement the broadcast functionality on Windows @emph{(currently | 4732 | @item Implement the broadcast functionality on Windows @emph{(currently |
@@ -4735,7 +4742,7 @@ contact me. | |||
4735 | 4742 | ||
4736 | @node WLAN plugin | 4743 | @node WLAN plugin |
4737 | @section WLAN plugin | 4744 | @section WLAN plugin |
4738 | @c %**end of header | 4745 | |
4739 | 4746 | ||
4740 | This section documents how the wlan transport plugin works. Parts which | 4747 | This section documents how the wlan transport plugin works. Parts which |
4741 | are not implemented yet or could be better implemented are described at | 4748 | are not implemented yet or could be better implemented are described at |
@@ -4744,7 +4751,7 @@ the end. | |||
4744 | @cindex ATS Subsystem | 4751 | @cindex ATS Subsystem |
4745 | @node ATS Subsystem | 4752 | @node ATS Subsystem |
4746 | @section ATS Subsystem | 4753 | @section ATS Subsystem |
4747 | @c %**end of header | 4754 | |
4748 | 4755 | ||
4749 | ATS stands for "automatic transport selection", and the function of ATS in | 4756 | ATS stands for "automatic transport selection", and the function of ATS in |
4750 | GNUnet is to decide on which address (and thus transport plugin) should | 4757 | GNUnet is to decide on which address (and thus transport plugin) should |
@@ -4767,7 +4774,7 @@ superior. | |||
4767 | @cindex CORE Subsystem | 4774 | @cindex CORE Subsystem |
4768 | @node CORE Subsystem | 4775 | @node CORE Subsystem |
4769 | @section CORE Subsystem | 4776 | @section CORE Subsystem |
4770 | @c %**end of header | 4777 | |
4771 | 4778 | ||
4772 | The CORE subsystem in GNUnet is responsible for securing link-layer | 4779 | The CORE subsystem in GNUnet is responsible for securing link-layer |
4773 | communications between nodes in the GNUnet overlay network. CORE builds | 4780 | communications between nodes in the GNUnet overlay network. CORE builds |
@@ -4811,7 +4818,7 @@ message counters and ephemeral keys) | |||
4811 | @cindex core subsystem limitations | 4818 | @cindex core subsystem limitations |
4812 | @node Limitations | 4819 | @node Limitations |
4813 | @subsection Limitations | 4820 | @subsection Limitations |
4814 | @c %**end of header | 4821 | |
4815 | 4822 | ||
4816 | CORE does not perform | 4823 | CORE does not perform |
4817 | @uref{http://en.wikipedia.org/wiki/Routing, routing}; using CORE it is | 4824 | @uref{http://en.wikipedia.org/wiki/Routing, routing}; using CORE it is |
@@ -4845,7 +4852,7 @@ control is needed, applications should use the CADET service. | |||
4845 | @cindex when is a peer connected | 4852 | @cindex when is a peer connected |
4846 | @node When is a peer "connected"? | 4853 | @node When is a peer "connected"? |
4847 | @subsection When is a peer "connected"? | 4854 | @subsection When is a peer "connected"? |
4848 | @c %**end of header | 4855 | |
4849 | 4856 | ||
4850 | In addition to the security features mentioned above, CORE also provides | 4857 | In addition to the security features mentioned above, CORE also provides |
4851 | one additional key feature to applications using it, and that is a | 4858 | one additional key feature to applications using it, and that is a |
@@ -4878,7 +4885,7 @@ connection. | |||
4878 | @cindex libgnunetcore | 4885 | @cindex libgnunetcore |
4879 | @node libgnunetcore | 4886 | @node libgnunetcore |
4880 | @subsection libgnunetcore | 4887 | @subsection libgnunetcore |
4881 | @c %**end of header | 4888 | |
4882 | 4889 | ||
4883 | The CORE API (defined in @file{gnunet_core_service.h}) is the basic | 4890 | The CORE API (defined in @file{gnunet_core_service.h}) is the basic |
4884 | messaging API used by P2P applications built using GNUnet. It provides | 4891 | messaging API used by P2P applications built using GNUnet. It provides |
@@ -4943,7 +4950,7 @@ re-established, the applications will be receive matching connect events. | |||
4943 | @cindex core clinet-service protocol | 4950 | @cindex core clinet-service protocol |
4944 | @node The CORE Client-Service Protocol | 4951 | @node The CORE Client-Service Protocol |
4945 | @subsection The CORE Client-Service Protocol | 4952 | @subsection The CORE Client-Service Protocol |
4946 | @c %**end of header | 4953 | |
4947 | 4954 | ||
4948 | This section describes the protocol between an application using the CORE | 4955 | This section describes the protocol between an application using the CORE |
4949 | service (the client) and the CORE service process itself. | 4956 | service (the client) and the CORE service process itself. |
@@ -4957,7 +4964,7 @@ service (the client) and the CORE service process itself. | |||
4957 | 4964 | ||
4958 | @node Setup2 | 4965 | @node Setup2 |
4959 | @subsubsection Setup2 | 4966 | @subsubsection Setup2 |
4960 | @c %**end of header | 4967 | |
4961 | 4968 | ||
4962 | When a client connects to the CORE service, it first sends a | 4969 | When a client connects to the CORE service, it first sends a |
4963 | @code{InitMessage} which specifies options for the connection and a set of | 4970 | @code{InitMessage} which specifies options for the connection and a set of |
@@ -4986,7 +4993,7 @@ both CORE and the client can send messages. | |||
4986 | 4993 | ||
4987 | @node Notifications | 4994 | @node Notifications |
4988 | @subsubsection Notifications | 4995 | @subsubsection Notifications |
4989 | @c %**end of header | 4996 | |
4990 | 4997 | ||
4991 | The CORE will send @code{ConnectNotifyMessage}s and | 4998 | The CORE will send @code{ConnectNotifyMessage}s and |
4992 | @code{DisconnectNotifyMessage}s whenever peers connect or disconnect from | 4999 | @code{DisconnectNotifyMessage}s whenever peers connect or disconnect from |
@@ -5002,7 +5009,7 @@ identity given is that of the receiver. | |||
5002 | 5009 | ||
5003 | @node Sending | 5010 | @node Sending |
5004 | @subsubsection Sending | 5011 | @subsubsection Sending |
5005 | @c %**end of header | 5012 | |
5006 | 5013 | ||
5007 | When a client wants to transmit a message, it first requests a | 5014 | When a client wants to transmit a message, it first requests a |
5008 | transmission slot by sending a @code{SendMessageRequest} which specifies | 5015 | transmission slot by sending a @code{SendMessageRequest} which specifies |
@@ -5022,7 +5029,7 @@ for each request). | |||
5022 | @cindex CORE Peer-to-Peer Protocol | 5029 | @cindex CORE Peer-to-Peer Protocol |
5023 | @node The CORE Peer-to-Peer Protocol | 5030 | @node The CORE Peer-to-Peer Protocol |
5024 | @subsection The CORE Peer-to-Peer Protocol | 5031 | @subsection The CORE Peer-to-Peer Protocol |
5025 | @c %**end of header | 5032 | |
5026 | 5033 | ||
5027 | 5034 | ||
5028 | @menu | 5035 | @menu |
@@ -5035,7 +5042,7 @@ for each request). | |||
5035 | @cindex EphemeralKeyMessage creation | 5042 | @cindex EphemeralKeyMessage creation |
5036 | @node Creating the EphemeralKeyMessage | 5043 | @node Creating the EphemeralKeyMessage |
5037 | @subsubsection Creating the EphemeralKeyMessage | 5044 | @subsubsection Creating the EphemeralKeyMessage |
5038 | @c %**end of header | 5045 | |
5039 | 5046 | ||
5040 | When the CORE service starts, each peer creates a fresh ephemeral (ECC) | 5047 | When the CORE service starts, each peer creates a fresh ephemeral (ECC) |
5041 | public-private key pair and signs the corresponding | 5048 | public-private key pair and signs the corresponding |
@@ -5076,7 +5083,7 @@ connection using the new ephemeral key | |||
5076 | 5083 | ||
5077 | @node Establishing a connection | 5084 | @node Establishing a connection |
5078 | @subsubsection Establishing a connection | 5085 | @subsubsection Establishing a connection |
5079 | @c %**end of header | 5086 | |
5080 | 5087 | ||
5081 | Peers begin their interaction by sending a @code{EphemeralKeyMessage} to | 5088 | Peers begin their interaction by sending a @code{EphemeralKeyMessage} to |
5082 | the other peer once the TRANSPORT service notifies the CORE service about | 5089 | the other peer once the TRANSPORT service notifies the CORE service about |
@@ -5094,7 +5101,7 @@ connection to @code{KX_STATE_UP}. | |||
5094 | 5101 | ||
5095 | @node Encryption and Decryption | 5102 | @node Encryption and Decryption |
5096 | @subsubsection Encryption and Decryption | 5103 | @subsubsection Encryption and Decryption |
5097 | @c %**end of header | 5104 | |
5098 | 5105 | ||
5099 | All functions related to the key exchange and encryption/decryption of | 5106 | All functions related to the key exchange and encryption/decryption of |
5100 | messages can be found in @file{gnunet-service-core_kx.c} (except for the | 5107 | messages can be found in @file{gnunet-service-core_kx.c} (except for the |
@@ -5122,7 +5129,7 @@ older than 12 hours. | |||
5122 | 5129 | ||
5123 | @node Type maps | 5130 | @node Type maps |
5124 | @subsubsection Type maps | 5131 | @subsubsection Type maps |
5125 | @c %**end of header | 5132 | |
5126 | 5133 | ||
5127 | Once an encrypted connection has been established, peers begin to exchange | 5134 | Once an encrypted connection has been established, peers begin to exchange |
5128 | type maps. Type maps are used to allow the CORE service to determine which | 5135 | type maps. Type maps are used to allow the CORE service to determine which |
@@ -5155,6 +5162,8 @@ receiving a type map by sending back a | |||
5155 | retransmit the type map (with exponential back-off). | 5162 | retransmit the type map (with exponential back-off). |
5156 | 5163 | ||
5157 | @cindex CADET Subsystem | 5164 | @cindex CADET Subsystem |
5165 | @cindex CADET | ||
5166 | @cindex cadet | ||
5158 | @node CADET Subsystem | 5167 | @node CADET Subsystem |
5159 | @section CADET Subsystem | 5168 | @section CADET Subsystem |
5160 | 5169 | ||
@@ -5221,6 +5230,7 @@ Should a message get lost on TRANSPORT/CORE level, if a channel is | |||
5221 | created with as reliable, CADET will retransmit the lost message and | 5230 | created with as reliable, CADET will retransmit the lost message and |
5222 | deliver it in order to the destination application. | 5231 | deliver it in order to the destination application. |
5223 | 5232 | ||
5233 | @pindex GNUNET_CADET_connect | ||
5224 | To communicate with other peers using CADET, it is necessary to first | 5234 | To communicate with other peers using CADET, it is necessary to first |
5225 | connect to the service using @code{GNUNET_CADET_connect}. | 5235 | connect to the service using @code{GNUNET_CADET_connect}. |
5226 | This function takes several parameters in form of callbacks, to allow the | 5236 | This function takes several parameters in form of callbacks, to allow the |
@@ -5232,7 +5242,8 @@ CADET, even do one connection per listening port). | |||
5232 | The function returns a handle which has to be used for any further | 5242 | The function returns a handle which has to be used for any further |
5233 | interaction with the service. | 5243 | interaction with the service. |
5234 | 5244 | ||
5235 | To connect to a remote peer a client has to call the | 5245 | @pindex GNUNET_CADET_channel_create |
5246 | To connect to a remote peer, a client has to call the | ||
5236 | @code{GNUNET_CADET_channel_create} function. The most important parameters | 5247 | @code{GNUNET_CADET_channel_create} function. The most important parameters |
5237 | given are the remote peer's identity (it public key) and a port, which | 5248 | given are the remote peer's identity (it public key) and a port, which |
5238 | specifies which application on the remote peer to connect to, similar to | 5249 | specifies which application on the remote peer to connect to, similar to |
@@ -5242,6 +5253,7 @@ exchanges to assure and authenticated, secure and verified communication. | |||
5242 | Similar to @code{GNUNET_CADET_connect},@code{GNUNET_CADET_create_channel} | 5253 | Similar to @code{GNUNET_CADET_connect},@code{GNUNET_CADET_create_channel} |
5243 | returns a handle to interact with the created channel. | 5254 | returns a handle to interact with the created channel. |
5244 | 5255 | ||
5256 | @pindex GNUNET_CADET_notify_transmit_ready | ||
5245 | For every message the client wants to send to the remote application, | 5257 | For every message the client wants to send to the remote application, |
5246 | @code{GNUNET_CADET_notify_transmit_ready} must be called, indicating the | 5258 | @code{GNUNET_CADET_notify_transmit_ready} must be called, indicating the |
5247 | channel on which the message should be sent and the size of the message | 5259 | channel on which the message should be sent and the size of the message |
@@ -5258,6 +5270,7 @@ case. To be alerted when a channel is online, a client can call | |||
5258 | means that the channel is online. The callback can give 0 bytes to CADET | 5270 | means that the channel is online. The callback can give 0 bytes to CADET |
5259 | if no message is to be sent, this is OK. | 5271 | if no message is to be sent, this is OK. |
5260 | 5272 | ||
5273 | @pindex GNUNET_CADET_notify_transmit_cancel | ||
5261 | If a transmission was requested but before the callback fires it is no | 5274 | If a transmission was requested but before the callback fires it is no |
5262 | longer needed, it can be canceled with | 5275 | longer needed, it can be canceled with |
5263 | @code{GNUNET_CADET_notify_transmit_ready_cancel}, which uses the handle | 5276 | @code{GNUNET_CADET_notify_transmit_ready_cancel}, which uses the handle |
@@ -5266,6 +5279,7 @@ As in the case of CORE, only one message can be requested at a time: a | |||
5266 | client must not call @code{GNUNET_CADET_notify_transmit_ready} again until | 5279 | client must not call @code{GNUNET_CADET_notify_transmit_ready} again until |
5267 | the callback is called or the request is canceled. | 5280 | the callback is called or the request is canceled. |
5268 | 5281 | ||
5282 | @pindex GNUNET_CADET_channel_destroy | ||
5269 | When a channel is no longer needed, a client can call | 5283 | When a channel is no longer needed, a client can call |
5270 | @code{GNUNET_CADET_channel_destroy} to get rid of it. | 5284 | @code{GNUNET_CADET_channel_destroy} to get rid of it. |
5271 | Note that CADET will try to transmit all pending traffic before notifying | 5285 | Note that CADET will try to transmit all pending traffic before notifying |
@@ -5277,6 +5291,7 @@ on any incoming or outgoing channels are given to the client when CADET | |||
5277 | executes the callbacks given to it at the time of | 5291 | executes the callbacks given to it at the time of |
5278 | @code{GNUNET_CADET_connect}. | 5292 | @code{GNUNET_CADET_connect}. |
5279 | 5293 | ||
5294 | @pindex GNUNET_CADET_disconnect | ||
5280 | Finally, when an application no longer wants to use CADET, it should call | 5295 | Finally, when an application no longer wants to use CADET, it should call |
5281 | @code{GNUNET_CADET_disconnect}, but first all channels and pending | 5296 | @code{GNUNET_CADET_disconnect}, but first all channels and pending |
5282 | transmissions must be closed (otherwise CADET will complain). | 5297 | transmissions must be closed (otherwise CADET will complain). |
@@ -5394,7 +5409,7 @@ to all the other peers, who will calculate the estimate from it. | |||
5394 | @node Target value | 5409 | @node Target value |
5395 | @subsubsection Target value | 5410 | @subsubsection Target value |
5396 | 5411 | ||
5397 | @c %**end of header | 5412 | |
5398 | 5413 | ||
5399 | The target value itself is generated by hashing the current time, rounded | 5414 | The target value itself is generated by hashing the current time, rounded |
5400 | down to an agreed value. If the rounding amount is 1h (default) and the | 5415 | down to an agreed value. If the rounding amount is 1h (default) and the |
@@ -5404,7 +5419,7 @@ Every repetition is called a round. | |||
5404 | 5419 | ||
5405 | @node Timing | 5420 | @node Timing |
5406 | @subsubsection Timing | 5421 | @subsubsection Timing |
5407 | @c %**end of header | 5422 | |
5408 | 5423 | ||
5409 | The NSE subsystem has some timing control to avoid everybody broadcasting | 5424 | The NSE subsystem has some timing control to avoid everybody broadcasting |
5410 | its ID all at one. Once each peer has the target random value, it | 5425 | its ID all at one. Once each peer has the target random value, it |
@@ -5421,7 +5436,7 @@ peers closest to the target value start broadcasting their ID the first. | |||
5421 | @node Controlled Flooding | 5436 | @node Controlled Flooding |
5422 | @subsubsection Controlled Flooding | 5437 | @subsubsection Controlled Flooding |
5423 | 5438 | ||
5424 | @c %**end of header | 5439 | |
5425 | 5440 | ||
5426 | When a peer receives a value, first it verifies that it is closer than the | 5441 | When a peer receives a value, first it verifies that it is closer than the |
5427 | closest value it had so far, otherwise it answers the incoming message | 5442 | closest value it had so far, otherwise it answers the incoming message |
@@ -5440,7 +5455,7 @@ to the neighbors. | |||
5440 | @node Calculating the estimate | 5455 | @node Calculating the estimate |
5441 | @subsubsection Calculating the estimate | 5456 | @subsubsection Calculating the estimate |
5442 | 5457 | ||
5443 | @c %**end of header | 5458 | |
5444 | 5459 | ||
5445 | Once the closest ID has been spread across the network each peer gets the | 5460 | Once the closest ID has been spread across the network each peer gets the |
5446 | exact distance between this ID and the target value of the round and | 5461 | exact distance between this ID and the target value of the round and |
@@ -5459,7 +5474,7 @@ means a factor of two in the size estimate. | |||
5459 | @node libgnunetnse | 5474 | @node libgnunetnse |
5460 | @subsection libgnunetnse | 5475 | @subsection libgnunetnse |
5461 | 5476 | ||
5462 | @c %**end of header | 5477 | |
5463 | 5478 | ||
5464 | The NSE subsystem has the simplest API of all services, with only two | 5479 | The NSE subsystem has the simplest API of all services, with only two |
5465 | calls: @code{GNUNET_NSE_connect} and @code{GNUNET_NSE_disconnect}. | 5480 | calls: @code{GNUNET_NSE_connect} and @code{GNUNET_NSE_disconnect}. |
@@ -5485,7 +5500,7 @@ is no longer called with new estimates. | |||
5485 | @node Results | 5500 | @node Results |
5486 | @subsubsection Results | 5501 | @subsubsection Results |
5487 | 5502 | ||
5488 | @c %**end of header | 5503 | |
5489 | 5504 | ||
5490 | The callback provides two values: the average and the | 5505 | The callback provides two values: the average and the |
5491 | @uref{http://en.wikipedia.org/wiki/Standard_deviation, standard deviation} | 5506 | @uref{http://en.wikipedia.org/wiki/Standard_deviation, standard deviation} |
@@ -5523,7 +5538,7 @@ changing rapidly). | |||
5523 | @node libgnunetnse - Examples | 5538 | @node libgnunetnse - Examples |
5524 | @subsubsection libgnunetnse -Examples | 5539 | @subsubsection libgnunetnse -Examples |
5525 | 5540 | ||
5526 | @c %**end of header | 5541 | |
5527 | 5542 | ||
5528 | Let's close with a couple examples. | 5543 | Let's close with a couple examples. |
5529 | 5544 | ||
@@ -5550,7 +5565,7 @@ case a 5 sigma minimum would be 2 million and a 6 sigma minimum, | |||
5550 | @node The NSE Client-Service Protocol | 5565 | @node The NSE Client-Service Protocol |
5551 | @subsection The NSE Client-Service Protocol | 5566 | @subsection The NSE Client-Service Protocol |
5552 | 5567 | ||
5553 | @c %**end of header | 5568 | |
5554 | 5569 | ||
5555 | As with the API, the client-service protocol is very simple, only has 2 | 5570 | As with the API, the client-service protocol is very simple, only has 2 |
5556 | different messages, defined in @code{src/nse/nse.h}: | 5571 | different messages, defined in @code{src/nse/nse.h}: |
@@ -5571,8 +5586,8 @@ simply disconnects from the service, with no message involved. | |||
5571 | @node The NSE Peer-to-Peer Protocol | 5586 | @node The NSE Peer-to-Peer Protocol |
5572 | @subsection The NSE Peer-to-Peer Protocol | 5587 | @subsection The NSE Peer-to-Peer Protocol |
5573 | 5588 | ||
5574 | @c %**end of header | ||
5575 | 5589 | ||
5590 | @pindex GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD | ||
5576 | The NSE subsystem only has one message in the P2P protocol, the | 5591 | The NSE subsystem only has one message in the P2P protocol, the |
5577 | @code{GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD} message. | 5592 | @code{GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD} message. |
5578 | 5593 | ||
@@ -5626,7 +5641,7 @@ traffic spikes and minimize cross-messages. | |||
5626 | @node HOSTLIST Subsystem | 5641 | @node HOSTLIST Subsystem |
5627 | @section HOSTLIST Subsystem | 5642 | @section HOSTLIST Subsystem |
5628 | 5643 | ||
5629 | @c %**end of header | 5644 | |
5630 | 5645 | ||
5631 | Peers in the GNUnet overlay network need address information so that they | 5646 | Peers in the GNUnet overlay network need address information so that they |
5632 | can connect with other peers. GNUnet uses so called HELLO messages to | 5647 | can connect with other peers. GNUnet uses so called HELLO messages to |
@@ -5664,7 +5679,7 @@ manual effort or the use of a HOSTLIST to obtain HELLOs. | |||
5664 | @node HELLOs | 5679 | @node HELLOs |
5665 | @subsection HELLOs | 5680 | @subsection HELLOs |
5666 | 5681 | ||
5667 | @c %**end of header | 5682 | |
5668 | 5683 | ||
5669 | The basic information peers require to connect to other peers are | 5684 | The basic information peers require to connect to other peers are |
5670 | contained in so called HELLO messages you can think of as a business card. | 5685 | contained in so called HELLO messages you can think of as a business card. |
@@ -5676,7 +5691,7 @@ contact other peers. | |||
5676 | @node Overview for the HOSTLIST subsystem | 5691 | @node Overview for the HOSTLIST subsystem |
5677 | @subsection Overview for the HOSTLIST subsystem | 5692 | @subsection Overview for the HOSTLIST subsystem |
5678 | 5693 | ||
5679 | @c %**end of header | 5694 | |
5680 | 5695 | ||
5681 | The HOSTLIST subsystem provides a way to distribute and obtain contact | 5696 | The HOSTLIST subsystem provides a way to distribute and obtain contact |
5682 | information to connect to other peers using a simple HTTP GET request. | 5697 | information to connect to other peers using a simple HTTP GET request. |
@@ -5702,7 +5717,7 @@ service. | |||
5702 | @node Features | 5717 | @node Features |
5703 | @subsubsection Features | 5718 | @subsubsection Features |
5704 | 5719 | ||
5705 | @c %**end of header | 5720 | |
5706 | 5721 | ||
5707 | The HOSTLIST daemon can: | 5722 | The HOSTLIST daemon can: |
5708 | 5723 | ||
@@ -5720,7 +5735,7 @@ peers | |||
5720 | @node HOSTLIST - Limitations | 5735 | @node HOSTLIST - Limitations |
5721 | @subsubsection HOSTLIST - Limitations | 5736 | @subsubsection HOSTLIST - Limitations |
5722 | 5737 | ||
5723 | @c %**end of header | 5738 | |
5724 | 5739 | ||
5725 | The HOSTLIST daemon does not: | 5740 | The HOSTLIST daemon does not: |
5726 | 5741 | ||
@@ -5732,7 +5747,7 @@ The HOSTLIST daemon does not: | |||
5732 | @node Interacting with the HOSTLIST daemon | 5747 | @node Interacting with the HOSTLIST daemon |
5733 | @subsection Interacting with the HOSTLIST daemon | 5748 | @subsection Interacting with the HOSTLIST daemon |
5734 | 5749 | ||
5735 | @c %**end of header | 5750 | |
5736 | 5751 | ||
5737 | The HOSTLIST subsystem is currently implemented as a daemon, so there is | 5752 | The HOSTLIST subsystem is currently implemented as a daemon, so there is |
5738 | no need for the user to interact with it and therefore there is no | 5753 | no need for the user to interact with it and therefore there is no |
@@ -5760,7 +5775,7 @@ download frequency). | |||
5760 | @node Hostlist security address validation | 5775 | @node Hostlist security address validation |
5761 | @subsection Hostlist security address validation | 5776 | @subsection Hostlist security address validation |
5762 | 5777 | ||
5763 | @c %**end of header | 5778 | |
5764 | 5779 | ||
5765 | Since information obtained from other parties cannot be trusted without | 5780 | Since information obtained from other parties cannot be trusted without |
5766 | validation, we have to distinguish between @emph{validated} and | 5781 | validation, we have to distinguish between @emph{validated} and |
@@ -5781,12 +5796,13 @@ to the TRANSPORT server to validate the addresses. | |||
5781 | @node The HOSTLIST daemon | 5796 | @node The HOSTLIST daemon |
5782 | @subsection The HOSTLIST daemon | 5797 | @subsection The HOSTLIST daemon |
5783 | 5798 | ||
5784 | @c %**end of header | 5799 | |
5785 | 5800 | ||
5786 | The hostlist daemon is the main component of the HOSTLIST subsystem. It is | 5801 | The hostlist daemon is the main component of the HOSTLIST subsystem. It is |
5787 | started by the ARM service and (if configured) starts the HOSTLIST client | 5802 | started by the ARM service and (if configured) starts the HOSTLIST client |
5788 | and server components. | 5803 | and server components. |
5789 | 5804 | ||
5805 | @pindex GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT | ||
5790 | If the daemon provides a hostlist itself it can advertise it's own | 5806 | If the daemon provides a hostlist itself it can advertise it's own |
5791 | hostlist to other peers. To do so it sends a | 5807 | hostlist to other peers. To do so it sends a |
5792 | @code{GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT} message to other peers | 5808 | @code{GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT} message to other peers |
@@ -5811,7 +5827,7 @@ subsystems and disconnecting from CORE. | |||
5811 | @node The HOSTLIST server | 5827 | @node The HOSTLIST server |
5812 | @subsection The HOSTLIST server | 5828 | @subsection The HOSTLIST server |
5813 | 5829 | ||
5814 | @c %**end of header | 5830 | |
5815 | 5831 | ||
5816 | The server provides a way for other peers to obtain HELLOs. Basically it | 5832 | The server provides a way for other peers to obtain HELLOs. Basically it |
5817 | is a small web server other peers can connect to and download a list of | 5833 | is a small web server other peers can connect to and download a list of |
@@ -5827,7 +5843,7 @@ to other peers connecting on CORE level. | |||
5827 | @node The HTTP Server | 5843 | @node The HTTP Server |
5828 | @subsubsection The HTTP Server | 5844 | @subsubsection The HTTP Server |
5829 | 5845 | ||
5830 | @c %**end of header | 5846 | |
5831 | 5847 | ||
5832 | During startup, the server starts a web server listening on the port | 5848 | During startup, the server starts a web server listening on the port |
5833 | specified with the HTTPPORT value (default 8080). In addition it connects | 5849 | specified with the HTTPPORT value (default 8080). In addition it connects |
@@ -5853,7 +5869,7 @@ The connection will be closed immediately if no hostlist is available. | |||
5853 | @node Advertising the URL | 5869 | @node Advertising the URL |
5854 | @subsubsection Advertising the URL | 5870 | @subsubsection Advertising the URL |
5855 | 5871 | ||
5856 | @c %**end of header | 5872 | |
5857 | 5873 | ||
5858 | The server also advertises the URL to download the hostlist to other peers | 5874 | The server also advertises the URL to download the hostlist to other peers |
5859 | if hostlist advertisement is enabled. | 5875 | if hostlist advertisement is enabled. |
@@ -5865,7 +5881,7 @@ peer using the CORE service. | |||
5865 | @node The HOSTLIST client | 5881 | @node The HOSTLIST client |
5866 | @subsection The HOSTLIST client | 5882 | @subsection The HOSTLIST client |
5867 | 5883 | ||
5868 | @c %**end of header | 5884 | |
5869 | 5885 | ||
5870 | The client provides the functionality to download the list of HELLOs from | 5886 | The client provides the functionality to download the list of HELLOs from |
5871 | a set of URLs. | 5887 | a set of URLs. |
@@ -5889,7 +5905,7 @@ The client supports two modes of operation: | |||
5889 | @node Bootstrapping | 5905 | @node Bootstrapping |
5890 | @subsubsection Bootstrapping | 5906 | @subsubsection Bootstrapping |
5891 | 5907 | ||
5892 | @c %**end of header | 5908 | |
5893 | 5909 | ||
5894 | For bootstrapping, it schedules a task to download the hostlist from the | 5910 | For bootstrapping, it schedules a task to download the hostlist from the |
5895 | set of known URLs. | 5911 | set of known URLs. |
@@ -5918,7 +5934,7 @@ quality of this URL is updated. | |||
5918 | @node Learning | 5934 | @node Learning |
5919 | @subsubsection Learning | 5935 | @subsubsection Learning |
5920 | 5936 | ||
5921 | @c %**end of header | 5937 | |
5922 | 5938 | ||
5923 | The client also manages hostlist advertisements from other peers. The | 5939 | The client also manages hostlist advertisements from other peers. The |
5924 | HOSTLIST daemon forwards @code{GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT} | 5940 | HOSTLIST daemon forwards @code{GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT} |
@@ -5937,7 +5953,7 @@ never discarded. | |||
5937 | @node Usage | 5953 | @node Usage |
5938 | @subsection Usage | 5954 | @subsection Usage |
5939 | 5955 | ||
5940 | @c %**end of header | 5956 | |
5941 | 5957 | ||
5942 | To start HOSTLIST by default, it has to be added to the DEFAULTSERVICES | 5958 | To start HOSTLIST by default, it has to be added to the DEFAULTSERVICES |
5943 | section for the ARM services. This is done in the default configuration. | 5959 | section for the ARM services. This is done in the default configuration. |
@@ -5951,7 +5967,7 @@ Configuring your peer to provide a hostlist | |||
5951 | @node IDENTITY Subsystem | 5967 | @node IDENTITY Subsystem |
5952 | @section IDENTITY Subsystem | 5968 | @section IDENTITY Subsystem |
5953 | 5969 | ||
5954 | @c %**end of header | 5970 | |
5955 | 5971 | ||
5956 | Identities of "users" in GNUnet are called egos. | 5972 | Identities of "users" in GNUnet are called egos. |
5957 | Egos can be used as pseudonyms ("fake names") or be tied to an | 5973 | Egos can be used as pseudonyms ("fake names") or be tied to an |
@@ -6007,7 +6023,7 @@ between anonymous and pseudonymous egos. | |||
6007 | @cindex libgnunetidentity | 6023 | @cindex libgnunetidentity |
6008 | @node libgnunetidentity | 6024 | @node libgnunetidentity |
6009 | @subsection libgnunetidentity | 6025 | @subsection libgnunetidentity |
6010 | @c %**end of header | 6026 | |
6011 | 6027 | ||
6012 | 6028 | ||
6013 | @menu | 6029 | @menu |
@@ -6021,7 +6037,7 @@ between anonymous and pseudonymous egos. | |||
6021 | @node Connecting to the service | 6037 | @node Connecting to the service |
6022 | @subsubsection Connecting to the service | 6038 | @subsubsection Connecting to the service |
6023 | 6039 | ||
6024 | @c %**end of header | 6040 | |
6025 | 6041 | ||
6026 | First, typical clients connect to the identity service using | 6042 | First, typical clients connect to the identity service using |
6027 | @code{GNUNET_IDENTITY_connect}. This function takes a callback as a | 6043 | @code{GNUNET_IDENTITY_connect}. This function takes a callback as a |
@@ -6057,7 +6073,7 @@ ego's handle. | |||
6057 | @node Operations on Egos | 6073 | @node Operations on Egos |
6058 | @subsubsection Operations on Egos | 6074 | @subsubsection Operations on Egos |
6059 | 6075 | ||
6060 | @c %**end of header | 6076 | |
6061 | 6077 | ||
6062 | Given an ego handle, the main operations are to get its associated private | 6078 | Given an ego handle, the main operations are to get its associated private |
6063 | key using @code{GNUNET_IDENTITY_ego_get_private_key} or its associated | 6079 | key using @code{GNUNET_IDENTITY_ego_get_private_key} or its associated |
@@ -6080,7 +6096,7 @@ only the continuation will no longer be called. | |||
6080 | @node The anonymous Ego | 6096 | @node The anonymous Ego |
6081 | @subsubsection The anonymous Ego | 6097 | @subsubsection The anonymous Ego |
6082 | 6098 | ||
6083 | @c %**end of header | 6099 | |
6084 | 6100 | ||
6085 | A special way to obtain an ego handle is to call | 6101 | A special way to obtain an ego handle is to call |
6086 | @code{GNUNET_IDENTITY_ego_get_anonymous}, which returns an ego for the | 6102 | @code{GNUNET_IDENTITY_ego_get_anonymous}, which returns an ego for the |
@@ -6115,7 +6131,7 @@ using @code{GNUNET_IDENTITY_get}. | |||
6115 | @node The IDENTITY Client-Service Protocol | 6131 | @node The IDENTITY Client-Service Protocol |
6116 | @subsection The IDENTITY Client-Service Protocol | 6132 | @subsection The IDENTITY Client-Service Protocol |
6117 | 6133 | ||
6118 | @c %**end of header | 6134 | |
6119 | 6135 | ||
6120 | A client connecting to the identity service first sends a message with | 6136 | A client connecting to the identity service first sends a message with |
6121 | type | 6137 | type |
@@ -6206,7 +6222,7 @@ private key.} | |||
6206 | @node Editing Zone Information | 6222 | @node Editing Zone Information |
6207 | @subsubsection Editing Zone Information | 6223 | @subsubsection Editing Zone Information |
6208 | 6224 | ||
6209 | @c %**end of header | 6225 | |
6210 | 6226 | ||
6211 | NAMESTORE provides functions to lookup records stored under a label in a | 6227 | NAMESTORE provides functions to lookup records stored under a label in a |
6212 | zone and to store records under a label in a zone. | 6228 | zone and to store records under a label in a zone. |
@@ -6246,7 +6262,7 @@ the operation. | |||
6246 | @node Iterating Zone Information | 6262 | @node Iterating Zone Information |
6247 | @subsubsection Iterating Zone Information | 6263 | @subsubsection Iterating Zone Information |
6248 | 6264 | ||
6249 | @c %**end of header | 6265 | |
6250 | 6266 | ||
6251 | A client can iterate over all information in a zone or all zones managed | 6267 | A client can iterate over all information in a zone or all zones managed |
6252 | by NAMESTORE. | 6268 | by NAMESTORE. |
@@ -6266,7 +6282,7 @@ NULL value to indicate. | |||
6266 | @node Monitoring Zone Information | 6282 | @node Monitoring Zone Information |
6267 | @subsubsection Monitoring Zone Information | 6283 | @subsubsection Monitoring Zone Information |
6268 | 6284 | ||
6269 | @c %**end of header | 6285 | |
6270 | 6286 | ||
6271 | Clients can also monitor zones to be notified about changes. Here the | 6287 | Clients can also monitor zones to be notified about changes. Here the |
6272 | clients uses the @code{GNUNET_NAMESTORE_zone_monitor_start} function and | 6288 | clients uses the @code{GNUNET_NAMESTORE_zone_monitor_start} function and |
@@ -6287,7 +6303,7 @@ from the function to start the monitoring. | |||
6287 | @node PEERINFO Subsystem | 6303 | @node PEERINFO Subsystem |
6288 | @section PEERINFO Subsystem | 6304 | @section PEERINFO Subsystem |
6289 | 6305 | ||
6290 | @c %**end of header | 6306 | |
6291 | 6307 | ||
6292 | The PEERINFO subsystem is used to store verified (validated) information | 6308 | The PEERINFO subsystem is used to store verified (validated) information |
6293 | about known peers in a persistent way. It obtains these addresses for | 6309 | about known peers in a persistent way. It obtains these addresses for |
@@ -6320,7 +6336,7 @@ service providing this functionality. | |||
6320 | @node PEERINFO - Features | 6336 | @node PEERINFO - Features |
6321 | @subsection PEERINFO - Features | 6337 | @subsection PEERINFO - Features |
6322 | 6338 | ||
6323 | @c %**end of header | 6339 | |
6324 | 6340 | ||
6325 | @itemize @bullet | 6341 | @itemize @bullet |
6326 | @item Persistent storage | 6342 | @item Persistent storage |
@@ -6340,7 +6356,7 @@ service providing this functionality. | |||
6340 | @node DeveloperPeer Information | 6356 | @node DeveloperPeer Information |
6341 | @subsection DeveloperPeer Information | 6357 | @subsection DeveloperPeer Information |
6342 | 6358 | ||
6343 | @c %**end of header | 6359 | |
6344 | 6360 | ||
6345 | The PEERINFO subsystem stores these information in the form of HELLO | 6361 | The PEERINFO subsystem stores these information in the form of HELLO |
6346 | messages you can think of as business cards. | 6362 | messages you can think of as business cards. |
@@ -6374,7 +6390,7 @@ subsystem using these information to maintain connections to other peers. | |||
6374 | @node Startup | 6390 | @node Startup |
6375 | @subsection Startup | 6391 | @subsection Startup |
6376 | 6392 | ||
6377 | @c %**end of header | 6393 | |
6378 | 6394 | ||
6379 | During startup the PEERINFO services loads persistent HELLOs from disk. | 6395 | During startup the PEERINFO services loads persistent HELLOs from disk. |
6380 | First PEERINFO parses the directory configured in the HOSTS value of the | 6396 | First PEERINFO parses the directory configured in the HOSTS value of the |
@@ -6390,7 +6406,7 @@ The use of these HELLOs can be prevented by setting the | |||
6390 | @node Managing Information | 6406 | @node Managing Information |
6391 | @subsection Managing Information | 6407 | @subsection Managing Information |
6392 | 6408 | ||
6393 | @c %**end of header | 6409 | |
6394 | 6410 | ||
6395 | The PEERINFO services stores information about known PEERS and a single | 6411 | The PEERINFO services stores information about known PEERS and a single |
6396 | HELLO message for every peer. | 6412 | HELLO message for every peer. |
@@ -6412,7 +6428,7 @@ from the disk. | |||
6412 | @node Obtaining Information | 6428 | @node Obtaining Information |
6413 | @subsection Obtaining Information | 6429 | @subsection Obtaining Information |
6414 | 6430 | ||
6415 | @c %**end of header | 6431 | |
6416 | 6432 | ||
6417 | When a client requests information from PEERINFO, PEERINFO performs a | 6433 | When a client requests information from PEERINFO, PEERINFO performs a |
6418 | lookup for the respective peer or all peers if desired and transmits this | 6434 | lookup for the respective peer or all peers if desired and transmits this |
@@ -6429,7 +6445,7 @@ merge for example) or a new peer was added. | |||
6429 | @node The PEERINFO Client-Service Protocol | 6445 | @node The PEERINFO Client-Service Protocol |
6430 | @subsection The PEERINFO Client-Service Protocol | 6446 | @subsection The PEERINFO Client-Service Protocol |
6431 | 6447 | ||
6432 | @c %**end of header | 6448 | |
6433 | 6449 | ||
6434 | To connect and disconnect to and from the PEERINFO Service PEERINFO | 6450 | To connect and disconnect to and from the PEERINFO Service PEERINFO |
6435 | utilizes the util client/server infrastructure, so no special messages | 6451 | utilizes the util client/server infrastructure, so no special messages |
@@ -6461,7 +6477,7 @@ message, it can proceed with the next request if any is pending. | |||
6461 | @node libgnunetpeerinfo | 6477 | @node libgnunetpeerinfo |
6462 | @subsection libgnunetpeerinfo | 6478 | @subsection libgnunetpeerinfo |
6463 | 6479 | ||
6464 | @c %**end of header | 6480 | |
6465 | 6481 | ||
6466 | The PEERINFO API consists mainly of three different functionalities: | 6482 | The PEERINFO API consists mainly of three different functionalities: |
6467 | 6483 | ||
@@ -6480,7 +6496,7 @@ The PEERINFO API consists mainly of three different functionalities: | |||
6480 | @node Connecting to the PEERINFO Service | 6496 | @node Connecting to the PEERINFO Service |
6481 | @subsubsection Connecting to the PEERINFO Service | 6497 | @subsubsection Connecting to the PEERINFO Service |
6482 | 6498 | ||
6483 | @c %**end of header | 6499 | |
6484 | 6500 | ||
6485 | To connect to the PEERINFO service the function | 6501 | To connect to the PEERINFO service the function |
6486 | @code{GNUNET_PEERINFO_connect} is used, taking a configuration handle as | 6502 | @code{GNUNET_PEERINFO_connect} is used, taking a configuration handle as |
@@ -6491,7 +6507,7 @@ handle returned from the connect function has to be called. | |||
6491 | @node Adding Information to the PEERINFO Service | 6507 | @node Adding Information to the PEERINFO Service |
6492 | @subsubsection Adding Information to the PEERINFO Service | 6508 | @subsubsection Adding Information to the PEERINFO Service |
6493 | 6509 | ||
6494 | @c %**end of header | 6510 | |
6495 | 6511 | ||
6496 | @code{GNUNET_PEERINFO_add_peer} adds a new peer to the PEERINFO subsystem | 6512 | @code{GNUNET_PEERINFO_add_peer} adds a new peer to the PEERINFO subsystem |
6497 | storage. This function takes the PEERINFO handle as an argument, the HELLO | 6513 | storage. This function takes the PEERINFO handle as an argument, the HELLO |
@@ -6506,7 +6522,7 @@ can tell PEERINFO to notify if new peer information are available. | |||
6506 | @node Obtaining Information from the PEERINFO Service | 6522 | @node Obtaining Information from the PEERINFO Service |
6507 | @subsubsection Obtaining Information from the PEERINFO Service | 6523 | @subsubsection Obtaining Information from the PEERINFO Service |
6508 | 6524 | ||
6509 | @c %**end of header | 6525 | |
6510 | 6526 | ||
6511 | To iterate over information in PEERINFO you use | 6527 | To iterate over information in PEERINFO you use |
6512 | @code{GNUNET_PEERINFO_iterate}. | 6528 | @code{GNUNET_PEERINFO_iterate}. |
@@ -6531,7 +6547,7 @@ with @code{GNUNET_PEERINFO_notify_cancel}. | |||
6531 | @node PEERSTORE Subsystem | 6547 | @node PEERSTORE Subsystem |
6532 | @section PEERSTORE Subsystem | 6548 | @section PEERSTORE Subsystem |
6533 | 6549 | ||
6534 | @c %**end of header | 6550 | |
6535 | 6551 | ||
6536 | GNUnet's PEERSTORE subsystem offers persistent per-peer storage for other | 6552 | GNUnet's PEERSTORE subsystem offers persistent per-peer storage for other |
6537 | GNUnet subsystems. GNUnet subsystems can use PEERSTORE to persistently | 6553 | GNUnet subsystems. GNUnet subsystems can use PEERSTORE to persistently |
@@ -6555,7 +6571,7 @@ Each data record stored with PEERSTORE contains the following fields: | |||
6555 | @node Functionality | 6571 | @node Functionality |
6556 | @subsection Functionality | 6572 | @subsection Functionality |
6557 | 6573 | ||
6558 | @c %**end of header | 6574 | |
6559 | 6575 | ||
6560 | Subsystems can store any type of value under a (subsystem, peerid, key) | 6576 | Subsystems can store any type of value under a (subsystem, peerid, key) |
6561 | combination. A "replace" flag set during store operations forces the | 6577 | combination. A "replace" flag set during store operations forces the |
@@ -6581,7 +6597,7 @@ request to PEERSTORE. | |||
6581 | @node Architecture | 6597 | @node Architecture |
6582 | @subsection Architecture | 6598 | @subsection Architecture |
6583 | 6599 | ||
6584 | @c %**end of header | 6600 | |
6585 | 6601 | ||
6586 | PEERSTORE implements the following components: | 6602 | PEERSTORE implements the following components: |
6587 | 6603 | ||
@@ -6597,7 +6613,7 @@ only an "sqlite" plugin is implemented. | |||
6597 | @node libgnunetpeerstore | 6613 | @node libgnunetpeerstore |
6598 | @subsection libgnunetpeerstore | 6614 | @subsection libgnunetpeerstore |
6599 | 6615 | ||
6600 | @c %**end of header | 6616 | |
6601 | 6617 | ||
6602 | libgnunetpeerstore is the library containing the PEERSTORE API. Subsystems | 6618 | libgnunetpeerstore is the library containing the PEERSTORE API. Subsystems |
6603 | wishing to communicate with the PEERSTORE service use this API to open a | 6619 | wishing to communicate with the PEERSTORE service use this API to open a |
@@ -6645,7 +6661,7 @@ destroyed as well. | |||
6645 | @node SET Subsystem | 6661 | @node SET Subsystem |
6646 | @section SET Subsystem | 6662 | @section SET Subsystem |
6647 | 6663 | ||
6648 | @c %**end of header | 6664 | |
6649 | 6665 | ||
6650 | The SET service implements efficient set operations between two peers | 6666 | The SET service implements efficient set operations between two peers |
6651 | over a mesh tunnel. | 6667 | over a mesh tunnel. |
@@ -6668,7 +6684,7 @@ The size of an element's data is limited to around 62 KB. | |||
6668 | @node Local Sets | 6684 | @node Local Sets |
6669 | @subsection Local Sets | 6685 | @subsection Local Sets |
6670 | 6686 | ||
6671 | @c %**end of header | 6687 | |
6672 | 6688 | ||
6673 | Sets created by a local client can be modified and reused for multiple | 6689 | Sets created by a local client can be modified and reused for multiple |
6674 | operations. As each set operation requires potentially expensive special | 6690 | operations. As each set operation requires potentially expensive special |
@@ -6682,7 +6698,7 @@ type. | |||
6682 | @node Set Modifications | 6698 | @node Set Modifications |
6683 | @subsection Set Modifications | 6699 | @subsection Set Modifications |
6684 | 6700 | ||
6685 | @c %**end of header | 6701 | |
6686 | 6702 | ||
6687 | Even when set operations are active, one can add to and remove elements | 6703 | Even when set operations are active, one can add to and remove elements |
6688 | from a set. | 6704 | from a set. |
@@ -6695,7 +6711,7 @@ attaching @emph{generation information} to each element and operation. | |||
6695 | @node Set Operations | 6711 | @node Set Operations |
6696 | @subsection Set Operations | 6712 | @subsection Set Operations |
6697 | 6713 | ||
6698 | @c %**end of header | 6714 | |
6699 | 6715 | ||
6700 | Set operations can be started in two ways: Either by accepting an | 6716 | Set operations can be started in two ways: Either by accepting an |
6701 | operation request from a remote peer, or by requesting a set operation | 6717 | operation request from a remote peer, or by requesting a set operation |
@@ -6712,7 +6728,7 @@ request (providing a local set for the operation) or reject it. | |||
6712 | @node Result Elements | 6728 | @node Result Elements |
6713 | @subsection Result Elements | 6729 | @subsection Result Elements |
6714 | 6730 | ||
6715 | @c %**end of header | 6731 | |
6716 | 6732 | ||
6717 | The SET service has three @emph{result modes} that determine how an | 6733 | The SET service has three @emph{result modes} that determine how an |
6718 | operation's result set is delivered to the client: | 6734 | operation's result set is delivered to the client: |
@@ -6737,7 +6753,7 @@ actually interested in the result of the set operation. | |||
6737 | @node libgnunetset | 6753 | @node libgnunetset |
6738 | @subsection libgnunetset | 6754 | @subsection libgnunetset |
6739 | 6755 | ||
6740 | @c %**end of header | 6756 | |
6741 | 6757 | ||
6742 | @menu | 6758 | @menu |
6743 | * Sets:: | 6759 | * Sets:: |
@@ -6750,7 +6766,7 @@ actually interested in the result of the set operation. | |||
6750 | @node Sets | 6766 | @node Sets |
6751 | @subsubsection Sets | 6767 | @subsubsection Sets |
6752 | 6768 | ||
6753 | @c %**end of header | 6769 | |
6754 | 6770 | ||
6755 | New sets are created with @code{GNUNET_SET_create}. Both the local peer's | 6771 | New sets are created with @code{GNUNET_SET_create}. Both the local peer's |
6756 | configuration (as each set has its own client connection) and the | 6772 | configuration (as each set has its own client connection) and the |
@@ -6766,7 +6782,7 @@ Elements are added and removed with @code{GNUNET_SET_add_element} and | |||
6766 | @node Listeners | 6782 | @node Listeners |
6767 | @subsubsection Listeners | 6783 | @subsubsection Listeners |
6768 | 6784 | ||
6769 | @c %**end of header | 6785 | |
6770 | 6786 | ||
6771 | Listeners are created with @code{GNUNET_SET_listen}. Each time time a | 6787 | Listeners are created with @code{GNUNET_SET_listen}. Each time time a |
6772 | remote peer suggests a set operation with an application id and operation | 6788 | remote peer suggests a set operation with an application id and operation |
@@ -6779,7 +6795,7 @@ until the client calls @code{GNUNET_SET_commit} | |||
6779 | @node Operations | 6795 | @node Operations |
6780 | @subsubsection Operations | 6796 | @subsubsection Operations |
6781 | 6797 | ||
6782 | @c %**end of header | 6798 | |
6783 | 6799 | ||
6784 | Operations to be initiated by the local peer are created with | 6800 | Operations to be initiated by the local peer are created with |
6785 | @code{GNUNET_SET_prepare}. Note that the operation will not be started | 6801 | @code{GNUNET_SET_prepare}. Note that the operation will not be started |
@@ -6789,7 +6805,7 @@ until the client calls @code{GNUNET_SET_commit} | |||
6789 | @node Supplying a Set | 6805 | @node Supplying a Set |
6790 | @subsubsection Supplying a Set | 6806 | @subsubsection Supplying a Set |
6791 | 6807 | ||
6792 | @c %**end of header | 6808 | |
6793 | 6809 | ||
6794 | To create symmetry between the two ways of starting a set operation | 6810 | To create symmetry between the two ways of starting a set operation |
6795 | (accepting and initiating it), the operation handles returned by | 6811 | (accepting and initiating it), the operation handles returned by |
@@ -6803,7 +6819,7 @@ operation. | |||
6803 | @node The Result Callback | 6819 | @node The Result Callback |
6804 | @subsubsection The Result Callback | 6820 | @subsubsection The Result Callback |
6805 | 6821 | ||
6806 | @c %**end of header | 6822 | |
6807 | 6823 | ||
6808 | Clients must specify both a result mode and a result callback with | 6824 | Clients must specify both a result mode and a result callback with |
6809 | @code{GNUNET_SET_accept} and @code{GNUNET_SET_prepare}. The result | 6825 | @code{GNUNET_SET_accept} and @code{GNUNET_SET_prepare}. The result |
@@ -6817,7 +6833,7 @@ or if it is in the difference between the original set and the final set. | |||
6817 | @node The SET Client-Service Protocol | 6833 | @node The SET Client-Service Protocol |
6818 | @subsection The SET Client-Service Protocol | 6834 | @subsection The SET Client-Service Protocol |
6819 | 6835 | ||
6820 | @c %**end of header | 6836 | |
6821 | 6837 | ||
6822 | @menu | 6838 | @menu |
6823 | * Creating Sets:: | 6839 | * Creating Sets:: |
@@ -6831,7 +6847,7 @@ or if it is in the difference between the original set and the final set. | |||
6831 | @node Creating Sets | 6847 | @node Creating Sets |
6832 | @subsubsection Creating Sets | 6848 | @subsubsection Creating Sets |
6833 | 6849 | ||
6834 | @c %**end of header | 6850 | |
6835 | 6851 | ||
6836 | For each set of a client, there exists a client connection to the service. | 6852 | For each set of a client, there exists a client connection to the service. |
6837 | Sets are created by sending the @code{GNUNET_SERVICE_SET_CREATE} message | 6853 | Sets are created by sending the @code{GNUNET_SERVICE_SET_CREATE} message |
@@ -6842,7 +6858,7 @@ the client. | |||
6842 | @node Listeners2 | 6858 | @node Listeners2 |
6843 | @subsubsection Listeners2 | 6859 | @subsubsection Listeners2 |
6844 | 6860 | ||
6845 | @c %**end of header | 6861 | |
6846 | 6862 | ||
6847 | Each listener also requires a seperate client connection. By sending the | 6863 | Each listener also requires a seperate client connection. By sending the |
6848 | @code{GNUNET_SERVICE_SET_LISTEN} message, the client notifies the service | 6864 | @code{GNUNET_SERVICE_SET_LISTEN} message, the client notifies the service |
@@ -6856,7 +6872,7 @@ is supplied for the set operation. | |||
6856 | @node Initiating Operations | 6872 | @node Initiating Operations |
6857 | @subsubsection Initiating Operations | 6873 | @subsubsection Initiating Operations |
6858 | 6874 | ||
6859 | @c %**end of header | 6875 | |
6860 | 6876 | ||
6861 | Operations with remote peers are initiated by sending a | 6877 | Operations with remote peers are initiated by sending a |
6862 | @code{GNUNET_SERVICE_SET_EVALUATE} message to the service. The@ client | 6878 | @code{GNUNET_SERVICE_SET_EVALUATE} message to the service. The@ client |
@@ -6865,7 +6881,7 @@ connection that this message is sent by determines the set to use. | |||
6865 | @node Modifying Sets | 6881 | @node Modifying Sets |
6866 | @subsubsection Modifying Sets | 6882 | @subsubsection Modifying Sets |
6867 | 6883 | ||
6868 | @c %**end of header | 6884 | |
6869 | 6885 | ||
6870 | Sets are modified with the @code{GNUNET_SERVICE_SET_ADD} and | 6886 | Sets are modified with the @code{GNUNET_SERVICE_SET_ADD} and |
6871 | @code{GNUNET_SERVICE_SET_REMOVE} messages. | 6887 | @code{GNUNET_SERVICE_SET_REMOVE} messages. |
@@ -6878,7 +6894,7 @@ Sets are modified with the @code{GNUNET_SERVICE_SET_ADD} and | |||
6878 | 6894 | ||
6879 | @node Results and Operation Status | 6895 | @node Results and Operation Status |
6880 | @subsubsection Results and Operation Status | 6896 | @subsubsection Results and Operation Status |
6881 | @c %**end of header | 6897 | |
6882 | 6898 | ||
6883 | The service notifies the client of result elements and success/failure of | 6899 | The service notifies the client of result elements and success/failure of |
6884 | a set operation with the @code{GNUNET_SERVICE_SET_RESULT} message. | 6900 | a set operation with the @code{GNUNET_SERVICE_SET_RESULT} message. |
@@ -6886,7 +6902,7 @@ a set operation with the @code{GNUNET_SERVICE_SET_RESULT} message. | |||
6886 | @node Iterating Sets | 6902 | @node Iterating Sets |
6887 | @subsubsection Iterating Sets | 6903 | @subsubsection Iterating Sets |
6888 | 6904 | ||
6889 | @c %**end of header | 6905 | |
6890 | 6906 | ||
6891 | All elements of a set can be requested by sending | 6907 | All elements of a set can be requested by sending |
6892 | @code{GNUNET_SERVICE_SET_ITER_REQUEST}. The server responds with | 6908 | @code{GNUNET_SERVICE_SET_ITER_REQUEST}. The server responds with |
@@ -6899,7 +6915,7 @@ iteration may be active for a set at any given time. | |||
6899 | @node The SET Intersection Peer-to-Peer Protocol | 6915 | @node The SET Intersection Peer-to-Peer Protocol |
6900 | @subsection The SET Intersection Peer-to-Peer Protocol | 6916 | @subsection The SET Intersection Peer-to-Peer Protocol |
6901 | 6917 | ||
6902 | @c %**end of header | 6918 | |
6903 | 6919 | ||
6904 | The intersection protocol operates over CADET and starts with a | 6920 | The intersection protocol operates over CADET and starts with a |
6905 | GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST being sent by the peer | 6921 | GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST being sent by the peer |
@@ -6931,7 +6947,7 @@ just the initial handshake. | |||
6931 | @node The Bloom filter exchange | 6947 | @node The Bloom filter exchange |
6932 | @subsubsection The Bloom filter exchange | 6948 | @subsubsection The Bloom filter exchange |
6933 | 6949 | ||
6934 | @c %**end of header | 6950 | |
6935 | 6951 | ||
6936 | In this phase, each peer transmits a Bloom filter over the remaining | 6952 | In this phase, each peer transmits a Bloom filter over the remaining |
6937 | keys of the local set to the other peer using a | 6953 | keys of the local set to the other peer using a |
@@ -6958,7 +6974,7 @@ this time as the sender. | |||
6958 | @node Salt | 6974 | @node Salt |
6959 | @subsubsection Salt | 6975 | @subsubsection Salt |
6960 | 6976 | ||
6961 | @c %**end of header | 6977 | |
6962 | 6978 | ||
6963 | Bloomfilter operations are probabilistic: With some non-zero probability | 6979 | Bloomfilter operations are probabilistic: With some non-zero probability |
6964 | the test may incorrectly say an element is in the set, even though it is | 6980 | the test may incorrectly say an element is in the set, even though it is |
@@ -6978,7 +6994,7 @@ sets of the same size, and where the XOR over all keys computes the same | |||
6978 | @node The SET Union Peer-to-Peer Protocol | 6994 | @node The SET Union Peer-to-Peer Protocol |
6979 | @subsection The SET Union Peer-to-Peer Protocol | 6995 | @subsection The SET Union Peer-to-Peer Protocol |
6980 | 6996 | ||
6981 | @c %**end of header | 6997 | |
6982 | 6998 | ||
6983 | The SET union protocol is based on Eppstein's efficient set reconciliation | 6999 | The SET union protocol is based on Eppstein's efficient set reconciliation |
6984 | without prior context. You should read this paper first if you want to | 7000 | without prior context. You should read this paper first if you want to |
@@ -7021,7 +7037,7 @@ succeeding if they failed due to collisions before. | |||
7021 | @node STATISTICS Subsystem | 7037 | @node STATISTICS Subsystem |
7022 | @section STATISTICS Subsystem | 7038 | @section STATISTICS Subsystem |
7023 | 7039 | ||
7024 | @c %**end of header | 7040 | |
7025 | 7041 | ||
7026 | In GNUnet, the STATISTICS subsystem offers a central place for all | 7042 | In GNUnet, the STATISTICS subsystem offers a central place for all |
7027 | subsystems to publish unsigned 64-bit integer run-time statistics. | 7043 | subsystems to publish unsigned 64-bit integer run-time statistics. |
@@ -7073,7 +7089,7 @@ to STATISTICS during shutdown. | |||
7073 | @node libgnunetstatistics | 7089 | @node libgnunetstatistics |
7074 | @subsection libgnunetstatistics | 7090 | @subsection libgnunetstatistics |
7075 | 7091 | ||
7076 | @c %**end of header | 7092 | |
7077 | 7093 | ||
7078 | @strong{libgnunetstatistics} is the library containing the API for the | 7094 | @strong{libgnunetstatistics} is the library containing the API for the |
7079 | STATISTICS subsystem. Any process requiring to use STATISTICS should use | 7095 | STATISTICS subsystem. Any process requiring to use STATISTICS should use |
@@ -7104,7 +7120,7 @@ functions from the API can be used. | |||
7104 | @node Statistics retrieval | 7120 | @node Statistics retrieval |
7105 | @subsubsection Statistics retrieval | 7121 | @subsubsection Statistics retrieval |
7106 | 7122 | ||
7107 | @c %**end of header | 7123 | |
7108 | 7124 | ||
7109 | Once a connection to the statistics service is obtained, information | 7125 | Once a connection to the statistics service is obtained, information |
7110 | about any other system which uses statistics can be retrieved with the | 7126 | about any other system which uses statistics can be retrieved with the |
@@ -7127,7 +7143,7 @@ when we want to shutdown and cleanup everything. | |||
7127 | @node Setting statistics and updating them | 7143 | @node Setting statistics and updating them |
7128 | @subsubsection Setting statistics and updating them | 7144 | @subsubsection Setting statistics and updating them |
7129 | 7145 | ||
7130 | @c %**end of header | 7146 | |
7131 | 7147 | ||
7132 | So far we have seen how to retrieve statistics, here we will learn how we | 7148 | So far we have seen how to retrieve statistics, here we will learn how we |
7133 | can set statistics and update them so that other subsystems can retrieve | 7149 | can set statistics and update them so that other subsystems can retrieve |
@@ -7157,7 +7173,7 @@ to worry about sending requests too quickly. | |||
7157 | @node Watches | 7173 | @node Watches |
7158 | @subsubsection Watches | 7174 | @subsubsection Watches |
7159 | 7175 | ||
7160 | @c %**end of header | 7176 | |
7161 | 7177 | ||
7162 | As interesting feature of STATISTICS lies in serving notifications | 7178 | As interesting feature of STATISTICS lies in serving notifications |
7163 | whenever a statistic of our interest is modified. | 7179 | whenever a statistic of our interest is modified. |
@@ -7177,7 +7193,7 @@ parameters that are used for registering the watch. | |||
7177 | 7193 | ||
7178 | @node The STATISTICS Client-Service Protocol | 7194 | @node The STATISTICS Client-Service Protocol |
7179 | @subsection The STATISTICS Client-Service Protocol | 7195 | @subsection The STATISTICS Client-Service Protocol |
7180 | @c %**end of header | 7196 | |
7181 | 7197 | ||
7182 | 7198 | ||
7183 | @menu | 7199 | @menu |
@@ -7189,7 +7205,7 @@ parameters that are used for registering the watch. | |||
7189 | @node Statistics retrieval2 | 7205 | @node Statistics retrieval2 |
7190 | @subsubsection Statistics retrieval2 | 7206 | @subsubsection Statistics retrieval2 |
7191 | 7207 | ||
7192 | @c %**end of header | 7208 | |
7193 | 7209 | ||
7194 | To retrieve statistics, the client transmits a message of type | 7210 | To retrieve statistics, the client transmits a message of type |
7195 | @code{GNUNET_MESSAGE_TYPE_STATISTICS_GET} containing the given subsystem | 7211 | @code{GNUNET_MESSAGE_TYPE_STATISTICS_GET} containing the given subsystem |
@@ -7203,7 +7219,7 @@ type @code{GNUNET_MESSAGE_TYPE_STATISTICS_END}. | |||
7203 | @node Setting and updating statistics | 7219 | @node Setting and updating statistics |
7204 | @subsubsection Setting and updating statistics | 7220 | @subsubsection Setting and updating statistics |
7205 | 7221 | ||
7206 | @c %**end of header | 7222 | |
7207 | 7223 | ||
7208 | The subsystem name, parameter name, its value and the persistence flag are | 7224 | The subsystem name, parameter name, its value and the persistence flag are |
7209 | communicated to the service through the message | 7225 | communicated to the service through the message |
@@ -7226,7 +7242,7 @@ the message should be treated as an update value. | |||
7226 | @node Watching for updates | 7242 | @node Watching for updates |
7227 | @subsubsection Watching for updates | 7243 | @subsubsection Watching for updates |
7228 | 7244 | ||
7229 | @c %**end of header | 7245 | |
7230 | 7246 | ||
7231 | The function registers the watch at the service by sending a message of | 7247 | The function registers the watch at the service by sending a message of |
7232 | type @code{GNUNET_MESSAGE_TYPE_STATISTICS_WATCH}. The service then sends | 7248 | type @code{GNUNET_MESSAGE_TYPE_STATISTICS_WATCH}. The service then sends |
@@ -7239,7 +7255,7 @@ parameter's value is changed. | |||
7239 | @node Distributed Hash Table (DHT) | 7255 | @node Distributed Hash Table (DHT) |
7240 | @section Distributed Hash Table (DHT) | 7256 | @section Distributed Hash Table (DHT) |
7241 | 7257 | ||
7242 | @c %**end of header | 7258 | |
7243 | 7259 | ||
7244 | GNUnet includes a generic distributed hash table that can be used by | 7260 | GNUnet includes a generic distributed hash table that can be used by |
7245 | developers building P2P applications in the framework. | 7261 | developers building P2P applications in the framework. |
@@ -7285,7 +7301,7 @@ loss of performance or quality of service is expected in this case). | |||
7285 | @node Block library and plugins | 7301 | @node Block library and plugins |
7286 | @subsection Block library and plugins | 7302 | @subsection Block library and plugins |
7287 | 7303 | ||
7288 | @c %**end of header | 7304 | |
7289 | 7305 | ||
7290 | @menu | 7306 | @menu |
7291 | * What is a Block?:: | 7307 | * What is a Block?:: |
@@ -7298,7 +7314,7 @@ loss of performance or quality of service is expected in this case). | |||
7298 | @node What is a Block? | 7314 | @node What is a Block? |
7299 | @subsubsection What is a Block? | 7315 | @subsubsection What is a Block? |
7300 | 7316 | ||
7301 | @c %**end of header | 7317 | |
7302 | 7318 | ||
7303 | Blocks are small (< 63k) pieces of data stored under a key (struct | 7319 | Blocks are small (< 63k) pieces of data stored under a key (struct |
7304 | GNUNET_HashCode). Blocks have a type (enum GNUNET_BlockType) which defines | 7320 | GNUNET_HashCode). Blocks have a type (enum GNUNET_BlockType) which defines |
@@ -7315,7 +7331,7 @@ available for any type of block. | |||
7315 | @node The API of libgnunetblock | 7331 | @node The API of libgnunetblock |
7316 | @subsubsection The API of libgnunetblock | 7332 | @subsubsection The API of libgnunetblock |
7317 | 7333 | ||
7318 | @c %**end of header | 7334 | |
7319 | 7335 | ||
7320 | The block library requires for each (family of) block type(s) a block | 7336 | The block library requires for each (family of) block type(s) a block |
7321 | plugin (implementing @file{gnunet_block_plugin.h}) that provides basic | 7337 | plugin (implementing @file{gnunet_block_plugin.h}) that provides basic |
@@ -7347,7 +7363,7 @@ If a plugin fails to do this, responses may loop in the network. | |||
7347 | 7363 | ||
7348 | @node Queries | 7364 | @node Queries |
7349 | @subsubsection Queries | 7365 | @subsubsection Queries |
7350 | @c %**end of header | 7366 | |
7351 | 7367 | ||
7352 | The query format for any block in GNUnet consists of four main components. | 7368 | The query format for any block in GNUnet consists of four main components. |
7353 | First, the type of the desired block must be specified. Second, the query | 7369 | First, the type of the desired block must be specified. Second, the query |
@@ -7375,7 +7391,7 @@ Depending on the results from the plugin, the DHT will then discard the | |||
7375 | @node Sample Code | 7391 | @node Sample Code |
7376 | @subsubsection Sample Code | 7392 | @subsubsection Sample Code |
7377 | 7393 | ||
7378 | @c %**end of header | 7394 | |
7379 | 7395 | ||
7380 | The source code in @strong{plugin_block_test.c} is a good starting point | 7396 | The source code in @strong{plugin_block_test.c} is a good starting point |
7381 | for new block plugins --- it does the minimal work by implementing a | 7397 | for new block plugins --- it does the minimal work by implementing a |
@@ -7386,7 +7402,7 @@ block plugin. | |||
7386 | @node Conclusion2 | 7402 | @node Conclusion2 |
7387 | @subsubsection Conclusion2 | 7403 | @subsubsection Conclusion2 |
7388 | 7404 | ||
7389 | @c %**end of header | 7405 | |
7390 | 7406 | ||
7391 | In conclusion, GNUnet subsystems that want to use the DHT need to define a | 7407 | In conclusion, GNUnet subsystems that want to use the DHT need to define a |
7392 | block format and write a plugin to match queries and replies. For testing, | 7408 | block format and write a plugin to match queries and replies. For testing, |
@@ -7400,7 +7416,7 @@ of error checking that results from this primitive implementation. | |||
7400 | @node libgnunetdht | 7416 | @node libgnunetdht |
7401 | @subsection libgnunetdht | 7417 | @subsection libgnunetdht |
7402 | 7418 | ||
7403 | @c %**end of header | 7419 | |
7404 | 7420 | ||
7405 | The DHT API itself is pretty simple and offers the usual GET and PUT | 7421 | The DHT API itself is pretty simple and offers the usual GET and PUT |
7406 | functions that work as expected. The specified block type refers to the | 7422 | functions that work as expected. The specified block type refers to the |
@@ -7418,7 +7434,7 @@ data stored in the network. | |||
7418 | @node GET | 7434 | @node GET |
7419 | @subsubsection GET | 7435 | @subsubsection GET |
7420 | 7436 | ||
7421 | @c %**end of header | 7437 | |
7422 | 7438 | ||
7423 | When using GET, the main consideration for developers (other than the | 7439 | When using GET, the main consideration for developers (other than the |
7424 | block library) should be that after issuing a GET, the DHT will | 7440 | block library) should be that after issuing a GET, the DHT will |
@@ -7446,7 +7462,7 @@ bandwidth consumption. | |||
7446 | @node PUT | 7462 | @node PUT |
7447 | @subsubsection PUT | 7463 | @subsubsection PUT |
7448 | 7464 | ||
7449 | @c %**end of header | 7465 | |
7450 | 7466 | ||
7451 | @c inconsistent use of ``must'' above it's written ``MUST'' | 7467 | @c inconsistent use of ``must'' above it's written ``MUST'' |
7452 | In contrast to GET operations, developers @strong{must} manually re-run | 7468 | In contrast to GET operations, developers @strong{must} manually re-run |
@@ -7468,7 +7484,7 @@ DHT PUT operations should be repeated at least every 1-2 hours. | |||
7468 | @node MONITOR | 7484 | @node MONITOR |
7469 | @subsubsection MONITOR | 7485 | @subsubsection MONITOR |
7470 | 7486 | ||
7471 | @c %**end of header | 7487 | |
7472 | 7488 | ||
7473 | The DHT API also allows applications to monitor messages crossing the | 7489 | The DHT API also allows applications to monitor messages crossing the |
7474 | local DHT service. | 7490 | local DHT service. |
@@ -7491,7 +7507,7 @@ number of workers will process the distributed workload. | |||
7491 | @node DHT Routing Options | 7507 | @node DHT Routing Options |
7492 | @subsubsection DHT Routing Options | 7508 | @subsubsection DHT Routing Options |
7493 | 7509 | ||
7494 | @c %**end of header | 7510 | |
7495 | 7511 | ||
7496 | There are two important options for GET and PUT requests: | 7512 | There are two important options for GET and PUT requests: |
7497 | 7513 | ||
@@ -7521,7 +7537,7 @@ in the future offer performance improvements for clique topologies. | |||
7521 | @node The DHT Client-Service Protocol | 7537 | @node The DHT Client-Service Protocol |
7522 | @subsection The DHT Client-Service Protocol | 7538 | @subsection The DHT Client-Service Protocol |
7523 | 7539 | ||
7524 | @c %**end of header | 7540 | |
7525 | 7541 | ||
7526 | @menu | 7542 | @menu |
7527 | * PUTting data into the DHT:: | 7543 | * PUTting data into the DHT:: |
@@ -7532,7 +7548,7 @@ in the future offer performance improvements for clique topologies. | |||
7532 | @node PUTting data into the DHT | 7548 | @node PUTting data into the DHT |
7533 | @subsubsection PUTting data into the DHT | 7549 | @subsubsection PUTting data into the DHT |
7534 | 7550 | ||
7535 | @c %**end of header | 7551 | |
7536 | 7552 | ||
7537 | To store (PUT) data into the DHT, the client sends a | 7553 | To store (PUT) data into the DHT, the client sends a |
7538 | @code{struct GNUNET_DHT_ClientPutMessage} to the service. | 7554 | @code{struct GNUNET_DHT_ClientPutMessage} to the service. |
@@ -7553,7 +7569,7 @@ in the P2P interaction. | |||
7553 | @node GETting data from the DHT | 7569 | @node GETting data from the DHT |
7554 | @subsubsection GETting data from the DHT | 7570 | @subsubsection GETting data from the DHT |
7555 | 7571 | ||
7556 | @c %**end of header | 7572 | |
7557 | 7573 | ||
7558 | To retrieve (GET) data from the DHT, the client sends a | 7574 | To retrieve (GET) data from the DHT, the client sends a |
7559 | @code{struct GNUNET_DHT_ClientGetMessage} to the service. The message | 7575 | @code{struct GNUNET_DHT_ClientGetMessage} to the service. The message |
@@ -7592,7 +7608,7 @@ service --- and to stop them individually. | |||
7592 | @node Monitoring the DHT | 7608 | @node Monitoring the DHT |
7593 | @subsubsection Monitoring the DHT | 7609 | @subsubsection Monitoring the DHT |
7594 | 7610 | ||
7595 | @c %**end of header | 7611 | |
7596 | 7612 | ||
7597 | To begin monitoring, the client sends a | 7613 | To begin monitoring, the client sends a |
7598 | @code{struct GNUNET_DHT_MonitorStartStop} message to the DHT service. | 7614 | @code{struct GNUNET_DHT_MonitorStartStop} message to the DHT service. |
@@ -7607,7 +7623,7 @@ these messages contains all of the information about the event. | |||
7607 | 7623 | ||
7608 | @node The DHT Peer-to-Peer Protocol | 7624 | @node The DHT Peer-to-Peer Protocol |
7609 | @subsection The DHT Peer-to-Peer Protocol | 7625 | @subsection The DHT Peer-to-Peer Protocol |
7610 | @c %**end of header | 7626 | |
7611 | 7627 | ||
7612 | 7628 | ||
7613 | @menu | 7629 | @menu |
@@ -7619,7 +7635,7 @@ these messages contains all of the information about the event. | |||
7619 | @node Routing GETs or PUTs | 7635 | @node Routing GETs or PUTs |
7620 | @subsubsection Routing GETs or PUTs | 7636 | @subsubsection Routing GETs or PUTs |
7621 | 7637 | ||
7622 | @c %**end of header | 7638 | |
7623 | 7639 | ||
7624 | When routing GETs or PUTs, the DHT service selects a suitable subset of | 7640 | When routing GETs or PUTs, the DHT service selects a suitable subset of |
7625 | neighbours for forwarding. The exact number of neighbours can be zero or | 7641 | neighbours for forwarding. The exact number of neighbours can be zero or |
@@ -7634,7 +7650,7 @@ traversed; those peers are also excluded from the selection. | |||
7634 | @node PUTting data into the DHT2 | 7650 | @node PUTting data into the DHT2 |
7635 | @subsubsection PUTting data into the DHT2 | 7651 | @subsubsection PUTting data into the DHT2 |
7636 | 7652 | ||
7637 | @c %**end of header | 7653 | |
7638 | 7654 | ||
7639 | To PUT data into the DHT, the service sends a @code{struct PeerPutMessage} | 7655 | To PUT data into the DHT, the service sends a @code{struct PeerPutMessage} |
7640 | of type @code{GNUNET_MESSAGE_TYPE_DHT_P2P_PUT} to the respective | 7656 | of type @code{GNUNET_MESSAGE_TYPE_DHT_P2P_PUT} to the respective |
@@ -7656,7 +7672,7 @@ its own identity (this is done to reduce bandwidth). | |||
7656 | @node GETting data from the DHT2 | 7672 | @node GETting data from the DHT2 |
7657 | @subsubsection GETting data from the DHT2 | 7673 | @subsubsection GETting data from the DHT2 |
7658 | 7674 | ||
7659 | @c %**end of header | 7675 | |
7660 | 7676 | ||
7661 | A peer can search the DHT by sending @code{struct PeerGetMessage}s of type | 7677 | A peer can search the DHT by sending @code{struct PeerGetMessage}s of type |
7662 | @code{GNUNET_MESSAGE_TYPE_DHT_P2P_GET} to other peers. In addition to the | 7678 | @code{GNUNET_MESSAGE_TYPE_DHT_P2P_GET} to other peers. In addition to the |
@@ -7695,7 +7711,7 @@ The DHT service may also cache forwarded results locally if the | |||
7695 | @node GNU Name System (GNS) | 7711 | @node GNU Name System (GNS) |
7696 | @section GNU Name System (GNS) | 7712 | @section GNU Name System (GNS) |
7697 | 7713 | ||
7698 | @c %**end of header | 7714 | |
7699 | 7715 | ||
7700 | The GNU Name System (GNS) is a decentralized database that enables users | 7716 | The GNU Name System (GNS) is a decentralized database that enables users |
7701 | to securely resolve names to values. | 7717 | to securely resolve names to values. |
@@ -7750,7 +7766,7 @@ record types. | |||
7750 | @node libgnunetgns | 7766 | @node libgnunetgns |
7751 | @subsection libgnunetgns | 7767 | @subsection libgnunetgns |
7752 | 7768 | ||
7753 | @c %**end of header | 7769 | |
7754 | 7770 | ||
7755 | The GNS API itself is extremely simple. Clients first connect to the | 7771 | The GNS API itself is extremely simple. Clients first connect to the |
7756 | GNS service using @code{GNUNET_GNS_connect}. | 7772 | GNS service using @code{GNUNET_GNS_connect}. |
@@ -7768,7 +7784,7 @@ Once finished, clients disconnect using @code{GNUNET_GNS_disconnect}. | |||
7768 | @node Looking up records | 7784 | @node Looking up records |
7769 | @subsubsection Looking up records | 7785 | @subsubsection Looking up records |
7770 | 7786 | ||
7771 | @c %**end of header | 7787 | |
7772 | 7788 | ||
7773 | @code{GNUNET_GNS_lookup} takes a number of arguments: | 7789 | @code{GNUNET_GNS_lookup} takes a number of arguments: |
7774 | 7790 | ||
@@ -7810,7 +7826,7 @@ must no longer be canceled. | |||
7810 | @node Accessing the records | 7826 | @node Accessing the records |
7811 | @subsubsection Accessing the records | 7827 | @subsubsection Accessing the records |
7812 | 7828 | ||
7813 | @c %**end of header | 7829 | |
7814 | 7830 | ||
7815 | The @code{libgnunetgnsrecord} library provides an API to manipulate the | 7831 | The @code{libgnunetgnsrecord} library provides an API to manipulate the |
7816 | GNS record array that is given to proc. In particular, it offers | 7832 | GNS record array that is given to proc. In particular, it offers |
@@ -7824,7 +7840,7 @@ functions for parsing (and serializing) common types of DNS records. | |||
7824 | @node Creating records | 7840 | @node Creating records |
7825 | @subsubsection Creating records | 7841 | @subsubsection Creating records |
7826 | 7842 | ||
7827 | @c %**end of header | 7843 | |
7828 | 7844 | ||
7829 | Creating GNS records is typically done by building the respective record | 7845 | Creating GNS records is typically done by building the respective record |
7830 | information (possibly with the help of @code{libgnunetgnsrecord} and | 7846 | information (possibly with the help of @code{libgnunetgnsrecord} and |
@@ -7835,7 +7851,7 @@ operation. | |||
7835 | @node Future work | 7851 | @node Future work |
7836 | @subsubsection Future work | 7852 | @subsubsection Future work |
7837 | 7853 | ||
7838 | @c %**end of header | 7854 | |
7839 | 7855 | ||
7840 | In the future, we want to expand @code{libgnunetgns} to allow | 7856 | In the future, we want to expand @code{libgnunetgns} to allow |
7841 | applications to observe shortening operations performed during GNS | 7857 | applications to observe shortening operations performed during GNS |
@@ -7845,7 +7861,7 @@ this happens. | |||
7845 | @node libgnunetgnsrecord | 7861 | @node libgnunetgnsrecord |
7846 | @subsection libgnunetgnsrecord | 7862 | @subsection libgnunetgnsrecord |
7847 | 7863 | ||
7848 | @c %**end of header | 7864 | |
7849 | 7865 | ||
7850 | The @code{libgnunetgnsrecord} library is used to manipulate GNS | 7866 | The @code{libgnunetgnsrecord} library is used to manipulate GNS |
7851 | records (in plaintext or in their encrypted format). | 7867 | records (in plaintext or in their encrypted format). |
@@ -7871,7 +7887,7 @@ standard GNS record types. | |||
7871 | @node Value handling | 7887 | @node Value handling |
7872 | @subsubsection Value handling | 7888 | @subsubsection Value handling |
7873 | 7889 | ||
7874 | @c %**end of header | 7890 | |
7875 | 7891 | ||
7876 | @code{GNUNET_GNSRECORD_value_to_string} can be used to convert | 7892 | @code{GNUNET_GNSRECORD_value_to_string} can be used to convert |
7877 | the (binary) representation of a GNS record value to a human readable, | 7893 | the (binary) representation of a GNS record value to a human readable, |
@@ -7886,7 +7902,7 @@ a GNS record value. | |||
7886 | @node Type handling | 7902 | @node Type handling |
7887 | @subsubsection Type handling | 7903 | @subsubsection Type handling |
7888 | 7904 | ||
7889 | @c %**end of header | 7905 | |
7890 | 7906 | ||
7891 | @code{GNUNET_GNSRECORD_typename_to_number} can be used to obtain the | 7907 | @code{GNUNET_GNSRECORD_typename_to_number} can be used to obtain the |
7892 | numeric value associated with a given typename. For example, given the | 7908 | numeric value associated with a given typename. For example, given the |
@@ -7904,7 +7920,7 @@ typename "A". | |||
7904 | @node GNS plugins | 7920 | @node GNS plugins |
7905 | @subsection GNS plugins | 7921 | @subsection GNS plugins |
7906 | 7922 | ||
7907 | @c %**end of header | 7923 | |
7908 | 7924 | ||
7909 | Adding a new GNS record type typically involves writing (or extending) a | 7925 | Adding a new GNS record type typically involves writing (or extending) a |
7910 | GNSRECORD plugin. The plugin needs to implement the | 7926 | GNSRECORD plugin. The plugin needs to implement the |
@@ -7930,7 +7946,7 @@ typenames and numbers documented in the previous subsection. | |||
7930 | 7946 | ||
7931 | @node The GNS Client-Service Protocol | 7947 | @node The GNS Client-Service Protocol |
7932 | @subsection The GNS Client-Service Protocol | 7948 | @subsection The GNS Client-Service Protocol |
7933 | @c %**end of header | 7949 | |
7934 | 7950 | ||
7935 | The GNS client-service protocol consists of two simple messages, the | 7951 | The GNS client-service protocol consists of two simple messages, the |
7936 | @code{LOOKUP} message and the @code{LOOKUP_RESULT}. Each @code{LOOKUP} | 7952 | @code{LOOKUP} message and the @code{LOOKUP_RESULT}. Each @code{LOOKUP} |
@@ -7950,7 +7966,7 @@ They can thus be deserialized using | |||
7950 | @node Hijacking the DNS-Traffic using gnunet-service-dns | 7966 | @node Hijacking the DNS-Traffic using gnunet-service-dns |
7951 | @subsection Hijacking the DNS-Traffic using gnunet-service-dns | 7967 | @subsection Hijacking the DNS-Traffic using gnunet-service-dns |
7952 | 7968 | ||
7953 | @c %**end of header | 7969 | |
7954 | 7970 | ||
7955 | This section documents how the gnunet-service-dns (and the | 7971 | This section documents how the gnunet-service-dns (and the |
7956 | gnunet-helper-dns) intercepts DNS queries from the local system. | 7972 | gnunet-helper-dns) intercepts DNS queries from the local system. |
@@ -7987,7 +8003,7 @@ interface with the original nameserver as source address. | |||
7987 | @node Network Setup Details | 8003 | @node Network Setup Details |
7988 | @subsubsection Network Setup Details | 8004 | @subsubsection Network Setup Details |
7989 | 8005 | ||
7990 | @c %**end of header | 8006 | |
7991 | 8007 | ||
7992 | The DNS interceptor adds the following rules to the Linux kernel: | 8008 | The DNS interceptor adds the following rules to the Linux kernel: |
7993 | @example | 8009 | @example |
@@ -8008,7 +8024,7 @@ arbitrarily). The third line adds a routing policy based on this mark | |||
8008 | @node Serving DNS lookups via GNS on W32 | 8024 | @node Serving DNS lookups via GNS on W32 |
8009 | @subsection Serving DNS lookups via GNS on W32 | 8025 | @subsection Serving DNS lookups via GNS on W32 |
8010 | 8026 | ||
8011 | @c %**end of header | 8027 | |
8012 | 8028 | ||
8013 | This section documents how the libw32nsp (and | 8029 | This section documents how the libw32nsp (and |
8014 | gnunet-gns-helper-service-w32) do DNS resolutions of DNS queries on the | 8030 | gnunet-gns-helper-service-w32) do DNS resolutions of DNS queries on the |
@@ -8078,10 +8094,9 @@ This includes some of well known utilities, like "ping" and "nslookup". | |||
8078 | @node Importing DNS Zones into GNS | 8094 | @node Importing DNS Zones into GNS |
8079 | @subsection Importing DNS Zones into GNS | 8095 | @subsection Importing DNS Zones into GNS |
8080 | 8096 | ||
8081 | @c %**end of header | ||
8082 | |||
8083 | This section discusses the challenges and problems faced when writing the | 8097 | This section discusses the challenges and problems faced when writing the |
8084 | Ascension tool. It also takes a look at possible improvements in the future. | 8098 | Ascension tool. It also takes a look at possible improvements in the |
8099 | future. | ||
8085 | 8100 | ||
8086 | @menu | 8101 | @menu |
8087 | * Conversions between DNS and GNS:: | 8102 | * Conversions between DNS and GNS:: |
@@ -8089,29 +8104,31 @@ Ascension tool. It also takes a look at possible improvements in the future. | |||
8089 | * Performance:: | 8104 | * Performance:: |
8090 | @end menu | 8105 | @end menu |
8091 | 8106 | ||
8107 | @cindex DNS Conversion | ||
8092 | @node Conversions between DNS and GNS | 8108 | @node Conversions between DNS and GNS |
8093 | @subsubsection Conversions between DNS and GNS | 8109 | @subsubsection Conversions between DNS and GNS |
8094 | 8110 | ||
8095 | The differences between the two name systems lies in the details | 8111 | The differences between the two name systems lies in the details |
8096 | and is not always transparent. For instance an SRV record is converted to a | 8112 | and is not always transparent. |
8097 | GNS only BOX record. | 8113 | For instance an SRV record is converted to a GNS only BOX record. |
8098 | 8114 | ||
8099 | This is done by converting to a BOX record from an existing SRV record: | 8115 | This is done by converting to a BOX record from an existing SRV record: |
8100 | 8116 | ||
8101 | @example | 8117 | @example |
8102 | # SRV | 8118 | # SRV |
8103 | # _service._proto.name. TTL class SRV priority weight port target | 8119 | # _service._proto.name. TTL class SRV priority weight port target |
8104 | _sip._tcp.example.com. 14000 IN SRV 0 0 5060 www.example.com. | 8120 | _sip._tcp.example.com. 14000 IN SRV 0 0 5060 www.example.com. |
8105 | # BOX | 8121 | # BOX |
8106 | # TTL BOX flags port protocol recordtype priority weight port target | 8122 | # TTL BOX flags port protocol recordtype priority weight port target |
8107 | 14000 BOX n 5060 6 33 0 0 5060 www.example.com | 8123 | 14000 BOX n 5060 6 33 0 0 5060 www.example.com |
8108 | @end example | 8124 | @end example |
8109 | 8125 | ||
8110 | Other records that have such a transformation is the MX record type, as well as | 8126 | Other records that have such a transformation is the MX record type, |
8111 | the SOA record type. | 8127 | as well as the SOA record type. |
8128 | |||
8129 | Transformation of a SOA record into GNS works as described in the | ||
8130 | following example. Very important to note are the rname and mname keys. | ||
8112 | 8131 | ||
8113 | Transformation of a SOA record into GNS works as described in the following | ||
8114 | example. Very important to note are the rname and mname keys. | ||
8115 | @example | 8132 | @example |
8116 | # BIND syntax for a clean SOA record | 8133 | # BIND syntax for a clean SOA record |
8117 | @ IN SOA master.example.com. hostmaster.example.com. ( | 8134 | @ IN SOA master.example.com. hostmaster.example.com. ( |
@@ -8235,7 +8252,7 @@ that uses the C API would be cleaner and better. | |||
8235 | @node GNS Namecache | 8252 | @node GNS Namecache |
8236 | @section GNS Namecache | 8253 | @section GNS Namecache |
8237 | 8254 | ||
8238 | @c %**end of header | 8255 | |
8239 | 8256 | ||
8240 | The NAMECACHE subsystem is responsible for caching (encrypted) resolution | 8257 | The NAMECACHE subsystem is responsible for caching (encrypted) resolution |
8241 | results of the GNU Name System (GNS). GNS makes zone information available | 8258 | results of the GNU Name System (GNS). GNS makes zone information available |
@@ -8274,7 +8291,7 @@ plugin API. | |||
8274 | @node libgnunetnamecache | 8291 | @node libgnunetnamecache |
8275 | @subsection libgnunetnamecache | 8292 | @subsection libgnunetnamecache |
8276 | 8293 | ||
8277 | @c %**end of header | 8294 | |
8278 | 8295 | ||
8279 | The NAMECACHE API consists of five simple functions. First, there is | 8296 | The NAMECACHE API consists of five simple functions. First, there is |
8280 | @code{GNUNET_NAMECACHE_connect} to connect to the NAMECACHE service. | 8297 | @code{GNUNET_NAMECACHE_connect} to connect to the NAMECACHE service. |
@@ -8297,7 +8314,7 @@ The maximum size of a block that can be stored in the NAMECACHE is | |||
8297 | @node The NAMECACHE Client-Service Protocol | 8314 | @node The NAMECACHE Client-Service Protocol |
8298 | @subsection The NAMECACHE Client-Service Protocol | 8315 | @subsection The NAMECACHE Client-Service Protocol |
8299 | 8316 | ||
8300 | @c %**end of header | 8317 | |
8301 | 8318 | ||
8302 | All messages in the NAMECACHE IPC protocol start with the | 8319 | All messages in the NAMECACHE IPC protocol start with the |
8303 | @code{struct GNUNET_NAMECACHE_Header} which adds a request | 8320 | @code{struct GNUNET_NAMECACHE_Header} which adds a request |
@@ -8315,7 +8332,7 @@ out-of-order. | |||
8315 | @node Lookup | 8332 | @node Lookup |
8316 | @subsubsection Lookup | 8333 | @subsubsection Lookup |
8317 | 8334 | ||
8318 | @c %**end of header | 8335 | |
8319 | 8336 | ||
8320 | The @code{struct LookupBlockMessage} is used to lookup a block stored in | 8337 | The @code{struct LookupBlockMessage} is used to lookup a block stored in |
8321 | the cache. | 8338 | the cache. |
@@ -8329,7 +8346,7 @@ of the block. | |||
8329 | @node Store | 8346 | @node Store |
8330 | @subsubsection Store | 8347 | @subsubsection Store |
8331 | 8348 | ||
8332 | @c %**end of header | 8349 | |
8333 | 8350 | ||
8334 | The @code{struct BlockCacheMessage} is used to cache a block in the | 8351 | The @code{struct BlockCacheMessage} is used to cache a block in the |
8335 | NAMECACHE. | 8352 | NAMECACHE. |
@@ -8341,7 +8358,7 @@ message as well. | |||
8341 | 8358 | ||
8342 | @node The NAMECACHE Plugin API | 8359 | @node The NAMECACHE Plugin API |
8343 | @subsection The NAMECACHE Plugin API | 8360 | @subsection The NAMECACHE Plugin API |
8344 | @c %**end of header | 8361 | |
8345 | 8362 | ||
8346 | The NAMECACHE plugin API consists of two functions, @code{cache_block} to | 8363 | The NAMECACHE plugin API consists of two functions, @code{cache_block} to |
8347 | store a block in the database, and @code{lookup_block} to lookup a block | 8364 | store a block in the database, and @code{lookup_block} to lookup a block |
@@ -8356,7 +8373,7 @@ in the database. | |||
8356 | @node Lookup2 | 8373 | @node Lookup2 |
8357 | @subsubsection Lookup2 | 8374 | @subsubsection Lookup2 |
8358 | 8375 | ||
8359 | @c %**end of header | 8376 | |
8360 | 8377 | ||
8361 | The @code{lookup_block} function is expected to return at most one block | 8378 | The @code{lookup_block} function is expected to return at most one block |
8362 | to the iterator, and return @code{GNUNET_NO} if there were no non-expired | 8379 | to the iterator, and return @code{GNUNET_NO} if there were no non-expired |
@@ -8367,7 +8384,7 @@ supposed to return the result with the largest expiration time. | |||
8367 | @node Store2 | 8384 | @node Store2 |
8368 | @subsubsection Store2 | 8385 | @subsubsection Store2 |
8369 | 8386 | ||
8370 | @c %**end of header | 8387 | |
8371 | 8388 | ||
8372 | The @code{cache_block} function is expected to try to store the block in | 8389 | The @code{cache_block} function is expected to try to store the block in |
8373 | the database, and return @code{GNUNET_SYSERR} if this was not possible | 8390 | the database, and return @code{GNUNET_SYSERR} if this was not possible |
@@ -8384,7 +8401,7 @@ block is more recent during the store operation. | |||
8384 | @cindex REVOCATION Subsystem | 8401 | @cindex REVOCATION Subsystem |
8385 | @node REVOCATION Subsystem | 8402 | @node REVOCATION Subsystem |
8386 | @section REVOCATION Subsystem | 8403 | @section REVOCATION Subsystem |
8387 | @c %**end of header | 8404 | |
8388 | 8405 | ||
8389 | The REVOCATION subsystem is responsible for key revocation of Egos. | 8406 | The REVOCATION subsystem is responsible for key revocation of Egos. |
8390 | If a user learns that theis private key has been compromised or has lost | 8407 | If a user learns that theis private key has been compromised or has lost |
@@ -8404,7 +8421,7 @@ propagate revocation messages. | |||
8404 | @node Dissemination | 8421 | @node Dissemination |
8405 | @subsection Dissemination | 8422 | @subsection Dissemination |
8406 | 8423 | ||
8407 | @c %**end of header | 8424 | |
8408 | 8425 | ||
8409 | When a revocation is performed, the revocation is first of all | 8426 | When a revocation is performed, the revocation is first of all |
8410 | disseminated by flooding the overlay network. | 8427 | disseminated by flooding the overlay network. |
@@ -8428,7 +8445,7 @@ The SET service is used to perform this operation efficiently. | |||
8428 | @node Revocation Message Design Requirements | 8445 | @node Revocation Message Design Requirements |
8429 | @subsection Revocation Message Design Requirements | 8446 | @subsection Revocation Message Design Requirements |
8430 | 8447 | ||
8431 | @c %**end of header | 8448 | |
8432 | 8449 | ||
8433 | However, flooding is also quite costly, creating O(|E|) messages on a | 8450 | However, flooding is also quite costly, creating O(|E|) messages on a |
8434 | network with |E| edges. | 8451 | network with |E| edges. |
@@ -8450,7 +8467,7 @@ revocation message ahead of time and store it in a secure location. | |||
8450 | @node libgnunetrevocation | 8467 | @node libgnunetrevocation |
8451 | @subsection libgnunetrevocation | 8468 | @subsection libgnunetrevocation |
8452 | 8469 | ||
8453 | @c %**end of header | 8470 | |
8454 | 8471 | ||
8455 | The REVOCATION API consists of two parts, to query and to issue | 8472 | The REVOCATION API consists of two parts, to query and to issue |
8456 | revocations. | 8473 | revocations. |
@@ -8465,7 +8482,7 @@ revocations. | |||
8465 | @node Querying for revoked keys | 8482 | @node Querying for revoked keys |
8466 | @subsubsection Querying for revoked keys | 8483 | @subsubsection Querying for revoked keys |
8467 | 8484 | ||
8468 | @c %**end of header | 8485 | |
8469 | 8486 | ||
8470 | @code{GNUNET_REVOCATION_query} is used to check if a given ECDSA public | 8487 | @code{GNUNET_REVOCATION_query} is used to check if a given ECDSA public |
8471 | key has been revoked. | 8488 | key has been revoked. |
@@ -8476,7 +8493,7 @@ the return value. | |||
8476 | @node Preparing revocations | 8493 | @node Preparing revocations |
8477 | @subsubsection Preparing revocations | 8494 | @subsubsection Preparing revocations |
8478 | 8495 | ||
8479 | @c %**end of header | 8496 | |
8480 | 8497 | ||
8481 | It is often desirable to create a revocation record ahead-of-time and | 8498 | It is often desirable to create a revocation record ahead-of-time and |
8482 | store it in an off-line location to be used later in an emergency. | 8499 | store it in an off-line location to be used later in an emergency. |
@@ -8544,7 +8561,7 @@ successfully. | |||
8544 | @node The REVOCATION Peer-to-Peer Protocol | 8561 | @node The REVOCATION Peer-to-Peer Protocol |
8545 | @subsection The REVOCATION Peer-to-Peer Protocol | 8562 | @subsection The REVOCATION Peer-to-Peer Protocol |
8546 | 8563 | ||
8547 | @c %**end of header | 8564 | |
8548 | 8565 | ||
8549 | Revocation uses two disjoint ways to spread revocation information among | 8566 | Revocation uses two disjoint ways to spread revocation information among |
8550 | peers. | 8567 | peers. |
@@ -8579,7 +8596,7 @@ larger hashed peer identity. | |||
8579 | @node File-sharing (FS) Subsystem | 8596 | @node File-sharing (FS) Subsystem |
8580 | @section File-sharing (FS) Subsystem | 8597 | @section File-sharing (FS) Subsystem |
8581 | 8598 | ||
8582 | @c %**end of header | 8599 | |
8583 | 8600 | ||
8584 | This chapter describes the details of how the file-sharing service works. | 8601 | This chapter describes the details of how the file-sharing service works. |
8585 | As with all services, it is split into an API (libgnunetfs), the service | 8602 | As with all services, it is split into an API (libgnunetfs), the service |
@@ -8617,7 +8634,7 @@ NOTE: The documentation in this chapter is quite incomplete. | |||
8617 | @node Encoding for Censorship-Resistant Sharing (ECRS) | 8634 | @node Encoding for Censorship-Resistant Sharing (ECRS) |
8618 | @subsection Encoding for Censorship-Resistant Sharing (ECRS) | 8635 | @subsection Encoding for Censorship-Resistant Sharing (ECRS) |
8619 | 8636 | ||
8620 | @c %**end of header | 8637 | |
8621 | 8638 | ||
8622 | When GNUnet shares files, it uses a content encoding that is called ECRS, | 8639 | When GNUnet shares files, it uses a content encoding that is called ECRS, |
8623 | the Encoding for Censorship-Resistant Sharing. | 8640 | the Encoding for Censorship-Resistant Sharing. |
@@ -8639,7 +8656,7 @@ thus did not warrant space in the research report. | |||
8639 | @node Namespace Advertisements | 8656 | @node Namespace Advertisements |
8640 | @subsubsection Namespace Advertisements | 8657 | @subsubsection Namespace Advertisements |
8641 | 8658 | ||
8642 | @c %**end of header | 8659 | |
8643 | @c %**FIXME: all zeroses -> ? | 8660 | @c %**FIXME: all zeroses -> ? |
8644 | 8661 | ||
8645 | An @code{SBlock} with identifier all zeros is a signed | 8662 | An @code{SBlock} with identifier all zeros is a signed |
@@ -8654,7 +8671,7 @@ can search for @code{SBlock}s in order to find out more about a namespace. | |||
8654 | @node KSBlocks | 8671 | @node KSBlocks |
8655 | @subsubsection KSBlocks | 8672 | @subsubsection KSBlocks |
8656 | 8673 | ||
8657 | @c %**end of header | 8674 | |
8658 | 8675 | ||
8659 | GNUnet implements @code{KSBlocks} which are @code{KBlocks} that, instead | 8676 | GNUnet implements @code{KSBlocks} which are @code{KBlocks} that, instead |
8660 | of encrypting a CHK and metadata, encrypt an @code{SBlock} instead. | 8677 | of encrypting a CHK and metadata, encrypt an @code{SBlock} instead. |
@@ -8680,7 +8697,7 @@ Collections are also advertised using @code{KSBlock}s. | |||
8680 | @node File-sharing persistence directory structure | 8697 | @node File-sharing persistence directory structure |
8681 | @subsection File-sharing persistence directory structure | 8698 | @subsection File-sharing persistence directory structure |
8682 | 8699 | ||
8683 | @c %**end of header | 8700 | |
8684 | 8701 | ||
8685 | This section documents how the file-sharing library implements | 8702 | This section documents how the file-sharing library implements |
8686 | persistence of file-sharing operations and specifically the resulting | 8703 | persistence of file-sharing operations and specifically the resulting |
@@ -8766,7 +8783,7 @@ Note that unindex operations cannot have associated child operations. | |||
8766 | @node REGEX Subsystem | 8783 | @node REGEX Subsystem |
8767 | @section REGEX Subsystem | 8784 | @section REGEX Subsystem |
8768 | 8785 | ||
8769 | @c %**end of header | 8786 | |
8770 | 8787 | ||
8771 | Using the REGEX subsystem, you can discover peers that offer a particular | 8788 | Using the REGEX subsystem, you can discover peers that offer a particular |
8772 | service using regular expressions. | 8789 | service using regular expressions. |
@@ -8789,7 +8806,7 @@ thesis. | |||
8789 | @node How to run the regex profiler | 8806 | @node How to run the regex profiler |
8790 | @subsection How to run the regex profiler | 8807 | @subsection How to run the regex profiler |
8791 | 8808 | ||
8792 | @c %**end of header | 8809 | |
8793 | 8810 | ||
8794 | The gnunet-regex-profiler can be used to profile the usage of mesh/regex | 8811 | The gnunet-regex-profiler can be used to profile the usage of mesh/regex |
8795 | for a given set of regular expressions and strings. | 8812 | for a given set of regular expressions and strings. |
@@ -8922,7 +8939,7 @@ regular expressions. | |||
8922 | @node REST Subsystem | 8939 | @node REST Subsystem |
8923 | @section REST Subsystem | 8940 | @section REST Subsystem |
8924 | 8941 | ||
8925 | @c %**end of header | 8942 | |
8926 | 8943 | ||
8927 | Using the REST subsystem, you can expose REST-based APIs or services. | 8944 | Using the REST subsystem, you can expose REST-based APIs or services. |
8928 | The REST service is designed as a pluggable architecture. | 8945 | The REST service is designed as a pluggable architecture. |
diff --git a/doc/handbook/chapters/installation.texi b/doc/handbook/chapters/installation.texi index a907a1046..ad848b4a0 100644 --- a/doc/handbook/chapters/installation.texi +++ b/doc/handbook/chapters/installation.texi | |||
@@ -12,9 +12,9 @@ package manager. | |||
12 | * Create @code{gnunet} user and group:: | 12 | * Create @code{gnunet} user and group:: |
13 | * Preparing and Compiling the Source Code:: | 13 | * Preparing and Compiling the Source Code:: |
14 | * Installation:: | 14 | * Installation:: |
15 | * MOVED FROM USER Checking the Installation:: | 15 | * Checking the Installation:: |
16 | * MOVED FROM USER The graphical configuration interface:: | 16 | * The graphical configuration interface:: |
17 | * MOVED FROM USER Config Leftovers:: | 17 | * Config Leftovers:: |
18 | @end menu | 18 | @end menu |
19 | 19 | ||
20 | @c ----------------------------------------------------------------------- | 20 | @c ----------------------------------------------------------------------- |
@@ -27,36 +27,54 @@ link to the project websites. | |||
27 | 27 | ||
28 | The mandatory libraries and applications are | 28 | The mandatory libraries and applications are |
29 | @itemize @bullet | 29 | @itemize @bullet |
30 | @item libtool | ||
31 | @item autoconf 2.59 or above | 30 | @item autoconf 2.59 or above |
32 | @item automake 1.11.1 or above | 31 | @item automake 1.11.1 or above |
33 | @item pkg-config | 32 | @item gettext |
33 | @item glibc (read below, other libcs should work) | ||
34 | @item gnutls 3.2.12 or above, recommended to be linked against libunbound | ||
35 | @item iptables (on Linux systems) | ||
36 | @item libtool 2.2 or above | ||
37 | @item libltdl (part of libtool) | ||
34 | @item libgcrypt 1.6 or above | 38 | @item libgcrypt 1.6 or above |
35 | @item libextractor | 39 | @item libextractor |
36 | @item libidn | 40 | @item libidn2 or libidn |
37 | @item libmicrohttpd 0.9.52 or above | 41 | @item libmicrohttpd 0.9.52 or above |
38 | @item libnss | ||
39 | @item libunistring | 42 | @item libunistring |
40 | @item gettext | ||
41 | @item glibc | ||
42 | @item libgmp | 43 | @item libgmp |
43 | @item gnutls | 44 | @item libgnurl or libcurl (libcurl has to be linked to GnuTLS) 7.35.0 or above |
44 | @item libcurl (has to be linked to GnuTLS) or libgnurl | 45 | @item Texinfo 5.2 or above (for building the documentation) |
46 | @item Texlive 2012 or above (for building the documentation, and for gnunet-bcd) | ||
47 | @item makeinfo 4.8 or above | ||
45 | @item zlib | 48 | @item zlib |
46 | @end itemize | 49 | @end itemize |
47 | 50 | ||
51 | Glibc is required for certain NSS features: | ||
52 | |||
53 | @example | ||
54 | One mechanism of integrating GNS with legacy applications via NSS is | ||
55 | not available if this is disabled. But applications that don't use the | ||
56 | glibc for NS resolution won't work anyway with this, so little is lost | ||
57 | on BSD systems. | ||
58 | GNS via direct use or via the HTTP or DNS proxies is unaffected. | ||
59 | @end example | ||
60 | |||
61 | Other libcs should work, the resulting builds just don't include the | ||
62 | glibc NSS specific code. One example is the build against NetBSD's libc | ||
63 | as detailed in @uref{https://bugs.gnunet.org/view.php?id=5605}. | ||
64 | |||
48 | In addition GNUnet needs one of of these three databases | 65 | In addition GNUnet needs one of of these three databases |
49 | @itemize @bullet | 66 | @itemize @bullet |
50 | @item sqlite + libsqlite (the default, requires no further configuration) | 67 | @item sqlite + libsqlite 3.8 or above (the default, requires no further configuration) |
51 | @item postgres + libpq | 68 | @item postgres + libpq |
52 | @item mysql + libmysqlclient | 69 | @item mysql + libmysqlclient |
53 | @end itemize | 70 | @end itemize |
54 | 71 | ||
55 | These are the dependencies only required for certain features | 72 | These are the dependencies only required for certain features |
56 | @itemize @bullet | 73 | @itemize @bullet |
57 | @item Texinfo (for building the documentation) | 74 | @item guile 1.6.4 for gnunet-download-manager |
58 | @item Texlive (for building the documentation) | ||
59 | @item miniupnpc (for traversing NAT boxes more reliably) | 75 | @item miniupnpc (for traversing NAT boxes more reliably) |
76 | @item libnss | ||
77 | @item libglpk 4.45 or above for experimental code | ||
60 | @item libopus (for running the GNUnet conversation telephony application) | 78 | @item libopus (for running the GNUnet conversation telephony application) |
61 | @item libpulse (for running the GNUnet conversation telephony application) | 79 | @item libpulse (for running the GNUnet conversation telephony application) |
62 | @item libogg (for running the GNUnet conversation telephony application) | 80 | @item libogg (for running the GNUnet conversation telephony application) |
@@ -65,6 +83,24 @@ These are the dependencies only required for certain features | |||
65 | (for attribute-based encryption and the identity provider subsystem) | 83 | (for attribute-based encryption and the identity provider subsystem) |
66 | @item libgabe | 84 | @item libgabe |
67 | (for attribute-based encryption and the identity provider subsystem) | 85 | (for attribute-based encryption and the identity provider subsystem) |
86 | @item texi2mdoc (for automatic mdoc generation) | ||
87 | @item perl5 for some utilities | ||
88 | @end itemize | ||
89 | |||
90 | These are the test suite requirements: | ||
91 | @itemize @bullet | ||
92 | @item python3.7 | ||
93 | @item gnunet (installation first) | ||
94 | @item which(1) | ||
95 | @item a shell (possibly Bash, maybe just POSIX sh) | ||
96 | @end itemize | ||
97 | |||
98 | These are runtime requirements: | ||
99 | @itemize @bullet | ||
100 | @item nss (the certutil binary, for gnunet-gns-proxy-setup-ca) | ||
101 | @item openssl (openssl binary, for gnunet-gns-proxy-setup-ca) | ||
102 | @item python2.7 for gnunet-qr (at the moment only python2.7 supported) | ||
103 | @item python-zbar 0.10 or above for gnunet-qr | ||
68 | @end itemize | 104 | @end itemize |
69 | 105 | ||
70 | @c ----------------------------------------------------------------------- | 106 | @c ----------------------------------------------------------------------- |
@@ -82,7 +118,7 @@ The archive can be found at | |||
82 | @uref{https://ftpmirror.gnu.org/gnu/gnunet/}. Extract it using a graphical | 118 | @uref{https://ftpmirror.gnu.org/gnu/gnunet/}. Extract it using a graphical |
83 | archive tool or @code{tar}: | 119 | archive tool or @code{tar}: |
84 | @example | 120 | @example |
85 | tar xzvf gnunet-0.11.0pre66.tar.gz | 121 | tar xzvf gnunet-@value{VERSION}.tar.gz |
86 | @end example | 122 | @end example |
87 | 123 | ||
88 | In the next chapter we will assume that the source code is available | 124 | In the next chapter we will assume that the source code is available |
@@ -116,17 +152,24 @@ running @code{configure} the following options can be specified to | |||
116 | customize the compilation and installation process: | 152 | customize the compilation and installation process: |
117 | 153 | ||
118 | @itemize @bullet | 154 | @itemize @bullet |
119 | @item @code{--disable-documentation} - don't build the configuration documents | 155 | @item @code{--disable-documentation} - don't build the documentation |
120 | @item @code{--enable-looging=[LOGLEVEL]} - choose a loglevel (@code{debug}, @code{info}, @code{warning} or @code{error}) | 156 | @item @code{--enable-looging=[LOGLEVEL]} - choose a loglevel (@code{debug}, @code{info}, @code{warning} or @code{error}) |
121 | @item @code{--prefix=[PATH]} - the directory where the GNUnet libraries and binaries will be installed | 157 | @item @code{--prefix=[PATH]} - the directory where the GNUnet libraries and binaries will be installed |
122 | @item @code{--with-extractor=[PATH]} - the path to libextractor | 158 | @item @code{--with-extractor=[PATH]} - the path to libextractor |
123 | @item @code{--with-libidn=[PATH]} - the path to libidn | 159 | @item @code{--with-libidn=[PATH]} - the path to libidn |
160 | @item @code{--with-libidn2=[PATH]} - the path to libidn2 (takes priority over libidn if both are found) | ||
124 | @item @code{--with-microhttpd=[PATH]} - the path to libmicrohttpd | 161 | @item @code{--with-microhttpd=[PATH]} - the path to libmicrohttpd |
125 | @item @code{--with-sqlite=[PATH]} - the path to libsqlite | 162 | @item @code{--with-sqlite=[PATH]} - the path to libsqlite |
126 | @item @code{--with-zlib=[PATH]} - the path to zlib | 163 | @item @code{--with-zlib=[PATH]} - the path to zlib |
127 | @item @code{--with-sudo=[PATH]} - path to the sudo binary (no need to run @code{make install} as root if specified) | 164 | @item @code{--with-sudo=[PATH]} - path to the sudo binary (no need to run @code{make install} as root if specified) |
128 | @end itemize | 165 | @end itemize |
129 | 166 | ||
167 | Note that the list above is not always up to date and you | ||
168 | should check the output of @code{./configure --help}, read | ||
169 | the @file{configure.ac} or send an email asking for assistance | ||
170 | if you are in doubt of any configure options or require fixes | ||
171 | for your operating system. | ||
172 | |||
130 | The following example configures the installation prefix | 173 | The following example configures the installation prefix |
131 | @code{/usr/lib} and disables building the documentation | 174 | @code{/usr/lib} and disables building the documentation |
132 | @example | 175 | @example |
@@ -216,9 +259,9 @@ PLUGINS = tcp | |||
216 | 259 | ||
217 | 260 | ||
218 | 261 | ||
219 | @node MOVED FROM USER Checking the Installation | 262 | @node Checking the Installation |
220 | @section MOVED FROM USER Checking the Installation | 263 | @section Checking the Installation |
221 | @c %**end of header | 264 | |
222 | 265 | ||
223 | This section describes a quick, casual way to check if your GNUnet | 266 | This section describes a quick, casual way to check if your GNUnet |
224 | installation works. However, if it does not, we do not cover | 267 | installation works. However, if it does not, we do not cover |
@@ -240,7 +283,7 @@ as part of this handbook!. | |||
240 | @cindex GTK user interface | 283 | @cindex GTK user interface |
241 | @node gnunet-gtk | 284 | @node gnunet-gtk |
242 | @subsection gnunet-gtk | 285 | @subsection gnunet-gtk |
243 | @c %**end of header | 286 | |
244 | 287 | ||
245 | The @command{gnunet-gtk} package contains several graphical | 288 | The @command{gnunet-gtk} package contains several graphical |
246 | user interfaces for the respective GNUnet applications. | 289 | user interfaces for the respective GNUnet applications. |
@@ -251,17 +294,24 @@ Currently these interfaces cover: | |||
251 | @item Peer Information | 294 | @item Peer Information |
252 | @item GNU Name System | 295 | @item GNU Name System |
253 | @item File Sharing | 296 | @item File Sharing |
254 | @item Identity Management | ||
255 | @item Conversation | 297 | @item Conversation |
298 | @item Setup | ||
256 | @end itemize | 299 | @end itemize |
257 | 300 | ||
301 | Previously, many of these interfaces were combined into one application | ||
302 | called @command{gnunet-gtk}, with different tabs for each interface. This | ||
303 | combined application has been removed in version 0.11.0, but each of the | ||
304 | interfaces is still available as a standalone application | ||
305 | (@command{gnunet-statistics-gtk} for statistics, @command{gnunet-fs-gtk} | ||
306 | for filesharing, etc). | ||
307 | |||
258 | @node Statistics | 308 | @node Statistics |
259 | @subsection Statistics | 309 | @subsection Statistics |
260 | @c %**end of header | 310 | |
261 | 311 | ||
262 | We assume that you have started gnunet via @code{gnunet-arm} or via your | 312 | We assume that you have started gnunet via @code{gnunet-arm} or via your |
263 | system-provided method for starting services. | 313 | system-provided method for starting services. |
264 | First, you should launch GNUnet gtk. | 314 | First, you should launch GNUnet's graphical statistics interface. |
265 | You can do this from the command-line by typing | 315 | You can do this from the command-line by typing |
266 | 316 | ||
267 | @example | 317 | @example |
@@ -274,7 +324,7 @@ least if your peer has been running for more than a few seconds). The | |||
274 | lines indicate how many other peers your peer is connected to (via | 324 | lines indicate how many other peers your peer is connected to (via |
275 | different mechanisms) and how large the entire overlay network is | 325 | different mechanisms) and how large the entire overlay network is |
276 | currently estimated to be. The X-axis represents time (in seconds | 326 | currently estimated to be. The X-axis represents time (in seconds |
277 | since the start of @command{gnunet-gtk}). | 327 | since the start of @command{gnunet-statistics-gtk}). |
278 | 328 | ||
279 | You can click on "Traffic" to see information about the amount of | 329 | You can click on "Traffic" to see information about the amount of |
280 | bandwidth your peer has consumed, and on "Storage" to check the amount | 330 | bandwidth your peer has consumed, and on "Storage" to check the amount |
@@ -290,10 +340,10 @@ whatever it is you are looking at the Gtk+ interface describes a | |||
290 | 340 | ||
291 | @node Peer Information | 341 | @node Peer Information |
292 | @subsection Peer Information | 342 | @subsection Peer Information |
293 | @c %**end of header | ||
294 | 343 | ||
295 | First, you should launch the graphical user interface. You can do | 344 | |
296 | this from the command-line by typing | 345 | First, you should launch the peer information graphical user interface. |
346 | You can do this from the command-line by typing | ||
297 | 347 | ||
298 | @example | 348 | @example |
299 | $ gnunet-peerinfo-gtk | 349 | $ gnunet-peerinfo-gtk |
@@ -310,8 +360,8 @@ configuration. | |||
310 | 360 | ||
311 | @c NOTE: Inserted from Installation Handbook in original ``order'': | 361 | @c NOTE: Inserted from Installation Handbook in original ``order'': |
312 | @c FIXME: Move this to User Handbook. | 362 | @c FIXME: Move this to User Handbook. |
313 | @node MOVED FROM USER The graphical configuration interface | 363 | @node The graphical configuration interface |
314 | @section MOVED FROM USER The graphical configuration interface | 364 | @section The graphical configuration interface |
315 | 365 | ||
316 | If you also would like to use @command{gnunet-gtk} and | 366 | If you also would like to use @command{gnunet-gtk} and |
317 | @command{gnunet-setup} (highly recommended for beginners), do: | 367 | @command{gnunet-setup} (highly recommended for beginners), do: |
@@ -347,7 +397,7 @@ If you also would like to use @command{gnunet-gtk} and | |||
347 | * Configuring the GNUnet VPN:: | 397 | * Configuring the GNUnet VPN:: |
348 | * Bandwidth Configuration:: | 398 | * Bandwidth Configuration:: |
349 | * Configuring NAT:: | 399 | * Configuring NAT:: |
350 | * Peer configuration for distributions:: | 400 | * Peer configuration for distributors (e.g. Operating Systems):: |
351 | @end menu | 401 | @end menu |
352 | 402 | ||
353 | @node Configuring your peer | 403 | @node Configuring your peer |
@@ -358,7 +408,7 @@ This chapter will describe the various configuration options in GNUnet. | |||
358 | The easiest way to configure your peer is to use the | 408 | The easiest way to configure your peer is to use the |
359 | @command{gnunet-setup} tool. | 409 | @command{gnunet-setup} tool. |
360 | @command{gnunet-setup} is part of the @command{gnunet-gtk} | 410 | @command{gnunet-setup} is part of the @command{gnunet-gtk} |
361 | application. You might have to install it separately. | 411 | package. You might have to install it separately. |
362 | 412 | ||
363 | Many of the specific sections from this chapter actually are linked from | 413 | Many of the specific sections from this chapter actually are linked from |
364 | within @command{gnunet-setup} to help you while using the setup tool. | 414 | within @command{gnunet-setup} to help you while using the setup tool. |
@@ -837,7 +887,7 @@ a @code{gn090} table here, it probably works. | |||
837 | 887 | ||
838 | @node Configuring the datacache | 888 | @node Configuring the datacache |
839 | @subsection Configuring the datacache | 889 | @subsection Configuring the datacache |
840 | @c %**end of header | 890 | |
841 | 891 | ||
842 | The datacache is what GNUnet uses for storing temporary data. This data is | 892 | The datacache is what GNUnet uses for storing temporary data. This data is |
843 | expected to be wiped completely each time GNUnet is restarted (or the | 893 | expected to be wiped completely each time GNUnet is restarted (or the |
@@ -889,7 +939,8 @@ strength of the adversary). | |||
889 | @node Configuring logging | 939 | @node Configuring logging |
890 | @subsection Configuring logging | 940 | @subsection Configuring logging |
891 | 941 | ||
892 | Logging in GNUnet 0.9.0 is controlled via the "-L" and "-l" options. | 942 | Since version 0.9.0, logging in GNUnet is controlled via the |
943 | @code{-L} and @code{-l} options. | ||
893 | Using @code{-L}, a log level can be specified. With log level | 944 | Using @code{-L}, a log level can be specified. With log level |
894 | @code{ERROR} only serious errors are logged. | 945 | @code{ERROR} only serious errors are logged. |
895 | The default log level is @code{WARNING} which causes anything of | 946 | The default log level is @code{WARNING} which causes anything of |
@@ -1765,7 +1816,7 @@ The other options as shown on the gnunet-setup tool are: | |||
1765 | @node IPv4 address for interface | 1816 | @node IPv4 address for interface |
1766 | @subsubsection IPv4 address for interface | 1817 | @subsubsection IPv4 address for interface |
1767 | 1818 | ||
1768 | This is the IPv4 address the VPN interface will get. You should pick an | 1819 | This is the IPv4 address the VPN interface will get. You should pick a |
1769 | 'private' IPv4 network that is not yet in use for you system. For example, | 1820 | 'private' IPv4 network that is not yet in use for you system. For example, |
1770 | if you use @code{10.0.0.1/255.255.0.0} already, you might use | 1821 | if you use @code{10.0.0.1/255.255.0.0} already, you might use |
1771 | @code{10.1.0.1/255.255.0.0}. | 1822 | @code{10.1.0.1/255.255.0.0}. |
@@ -1920,29 +1971,29 @@ connect to NATed peers using autonomous NAT traversal, you need to check | |||
1920 | the "Enable connecting to NATed peers using ICMP method" box. | 1971 | the "Enable connecting to NATed peers using ICMP method" box. |
1921 | 1972 | ||
1922 | 1973 | ||
1923 | @node Peer configuration for distributions | 1974 | @node Peer configuration for distributors (e.g. Operating Systems) |
1924 | @subsection Peer configuration for distributions | 1975 | @subsection Peer configuration for distributors (e.g. Operating Systems) |
1925 | 1976 | ||
1926 | The "GNUNET_DATA_HOME" in "[path]" in @file{/etc/gnunet.conf} should be | 1977 | The "GNUNET_DATA_HOME" in "[path]" in @file{/etc/gnunet.conf} should be |
1927 | manually set to "/var/lib/gnunet/data/" as the default | 1978 | manually set to "/var/lib/gnunet/data/" as the default |
1928 | "~/.local/share/gnunet/" is probably not that appropriate in this case. | 1979 | "~/.local/share/gnunet/" is probably not that appropriate in this case. |
1929 | Similarly, distributions may consider pointing "GNUNET_RUNTIME_DIR" to | 1980 | Similarly, distributors may consider pointing "GNUNET_RUNTIME_DIR" to |
1930 | "/var/run/gnunet/" and "GNUNET_HOME" to "/var/lib/gnunet/". Also, should a | 1981 | "/var/run/gnunet/" and "GNUNET_HOME" to "/var/lib/gnunet/". Also, should a |
1931 | distribution decide to override system defaults, all of these changes | 1982 | distributor decide to override system defaults, all of these changes |
1932 | should be done in a custom @file{/etc/gnunet.conf} and not in the files | 1983 | should be done in a custom @file{/etc/gnunet.conf} and not in the files |
1933 | in the @file{config.d/} directory. | 1984 | in the @file{config.d/} directory. |
1934 | 1985 | ||
1935 | Given the proposed access permissions, the "gnunet-setup" tool must be | 1986 | Given the proposed access permissions, the "gnunet-setup" tool must be |
1936 | run as use "gnunet" (and with option "-c /etc/gnunet.conf" so that it | 1987 | run as use "gnunet" (and with option "-c /etc/gnunet.conf" so that it |
1937 | modifies the system configuration). As always, gnunet-setup should be run | 1988 | modifies the system configuration). As always, gnunet-setup should be run |
1938 | after the GNUnet peer was stopped using "gnunet-arm -e". Distributions | 1989 | after the GNUnet peer was stopped using "gnunet-arm -e". Distributors |
1939 | might want to include a wrapper for gnunet-setup that allows the | 1990 | might want to include a wrapper for gnunet-setup that allows the |
1940 | desktop-user to "sudo" (i.e. using gtksudo) to the "gnunet" user account | 1991 | desktop-user to "sudo" (i.e. using gtksudo) to the "gnunet" user account |
1941 | and then runs "gnunet-arm -e", "gnunet-setup" and "gnunet-arm -s" in | 1992 | and then runs "gnunet-arm -e", "gnunet-setup" and "gnunet-arm -s" in |
1942 | sequence. | 1993 | sequence. |
1943 | 1994 | ||
1944 | @node MOVED FROM USER Config Leftovers | 1995 | @node Config Leftovers |
1945 | @section MOVED FROM USER Config Leftovers | 1996 | @section Config Leftovers |
1946 | 1997 | ||
1947 | This section describes how to start a GNUnet peer. It assumes that you | 1998 | This section describes how to start a GNUnet peer. It assumes that you |
1948 | have already compiled and installed GNUnet and its' dependencies. | 1999 | have already compiled and installed GNUnet and its' dependencies. |
@@ -2201,7 +2252,7 @@ However, as TCP is generally less efficient and it is rarely the case | |||
2201 | that a single GNUnet peer is supposed to serve an entire local network, | 2252 | that a single GNUnet peer is supposed to serve an entire local network, |
2202 | the default configuration should disable TCP access to all GNUnet | 2253 | the default configuration should disable TCP access to all GNUnet |
2203 | services on systems with support for UNIX domain sockets. | 2254 | services on systems with support for UNIX domain sockets. |
2204 | As of GNUnet 0.9.2, configuration files with TCP access disabled should be | 2255 | Since GNUnet 0.9.2, configuration files with TCP access disabled should be |
2205 | generated by default. Users can re-enable TCP access to particular | 2256 | generated by default. Users can re-enable TCP access to particular |
2206 | services simply by specifying a non-zero port number in the section of | 2257 | services simply by specifying a non-zero port number in the section of |
2207 | the respective service. | 2258 | the respective service. |
diff --git a/doc/handbook/chapters/keyconcepts.texi b/doc/handbook/chapters/keyconcepts.texi index 829fed82e..4b49a7ffb 100644 --- a/doc/handbook/chapters/keyconcepts.texi +++ b/doc/handbook/chapters/keyconcepts.texi | |||
@@ -246,7 +246,7 @@ encryption as the link-encryption between the nodes. GNUnet has | |||
246 | encryption on the network layer (link encryption, confidentiality, | 246 | encryption on the network layer (link encryption, confidentiality, |
247 | authentication) and again on the application layer (provided | 247 | authentication) and again on the application layer (provided |
248 | by @command{gnunet-publish}, @command{gnunet-download}, | 248 | by @command{gnunet-publish}, @command{gnunet-download}, |
249 | @command{gnunet-search} and @command{gnunet-gtk}). | 249 | @command{gnunet-search} and @command{gnunet-fs-gtk}). |
250 | 250 | ||
251 | Refer to the following paper for more: | 251 | Refer to the following paper for more: |
252 | Christian Grothoff, Krista Grothoff, Tzvetan Horozov, | 252 | Christian Grothoff, Krista Grothoff, Tzvetan Horozov, |
diff --git a/doc/handbook/chapters/preface.texi b/doc/handbook/chapters/preface.texi index 386cefa6d..636458eeb 100644 --- a/doc/handbook/chapters/preface.texi +++ b/doc/handbook/chapters/preface.texi | |||
@@ -1,13 +1,17 @@ | |||
1 | @node Preface | 1 | @node Preface |
2 | @chapter Preface | 2 | @chapter Preface |
3 | 3 | ||
4 | This collection of manuals describes how to use GNUnet, a framework | 4 | @c FIXME: Do we have to mention that this is Free Software? |
5 | @c FIXME: where did 'Free Software' in this sentence fit before | ||
6 | @c FIXME: we changed it? | ||
7 | This collection of manuals describes GNUnet, a framework | ||
5 | for secure peer-to-peer networking with the high-level goal to provide | 8 | for secure peer-to-peer networking with the high-level goal to provide |
6 | a strong foundation Free Software for a global, distributed network | 9 | a strong foundation for a global, distributed network |
7 | that provides security and privacy. GNUnet in that sense aims to | 10 | that provides security and privacy. |
8 | replace the current Internet protocol stack. Along with an | 11 | GNUnet in that sense aims to replace the current Internet protocol stack. |
9 | application for secure publication of files, it has grown to include | 12 | Along with an application for secure publication of files, it has grown to |
10 | all kinds of basic applications for the foundation of a new Internet. | 13 | include all kinds of basic applications for the foundation of a new |
14 | Internet. | ||
11 | 15 | ||
12 | @menu | 16 | @menu |
13 | * About this book:: | 17 | * About this book:: |
@@ -22,47 +26,74 @@ all kinds of basic applications for the foundation of a new Internet. | |||
22 | 26 | ||
23 | The books (described as ``book'' or ``books'' in the following) | 27 | The books (described as ``book'' or ``books'' in the following) |
24 | bundled as the ``GNUnet Reference Manual'' are based on the historic | 28 | bundled as the ``GNUnet Reference Manual'' are based on the historic |
25 | work of all contributors to GNUnet's documentation. It is our hope | 29 | work of all contributors to previous documentation of GNUnet. |
30 | It is our hope | ||
26 | that the content is described in a way that does not require any | 31 | that the content is described in a way that does not require any |
27 | academic background, although some concepts will require further | 32 | academic background, although some concepts will require further |
28 | reading. | 33 | reading. |
29 | 34 | ||
30 | Our (long-term) goal with these books is to keep them self-contained. If | 35 | Our (long-term) goal with these books is to keep them |
31 | you see references to Wikipedia and other external sources (except for | 36 | self-contained. If you see references to Wikipedia and other external |
32 | our academic papers) it means that we are working on a solution to | 37 | sources (except for our academic papers) it means that we are working |
33 | describe the explanations found there which fits our use-case and licensing. | 38 | on a solution to describe the explanations found there which fits our |
34 | 39 | use-case and licensing. | |
35 | The first chapter (``Preface'') as well as the the second | 40 | |
36 | chapter (``Philosophy'') give an introduction to GNUnet as a project, | 41 | Previously the documentation was contained in Drupal books, on the |
37 | what GNUnet tries to achieve. | 42 | old website. This format was considered unmaintainable for the future, so |
43 | Texinfo was chosen. You might find old and very old sections in | ||
44 | here in addition to more recent content. It took a long time to | ||
45 | finish the move to Texinfo (from Drupal to LaTeX to wrong Texinfo | ||
46 | output dump to good Texinfo) and only recently (late 2018, early | ||
47 | 2019) content checking started. We apologize to the reader for | ||
48 | any inconvenience and hope you apply logic where bad advice from | ||
49 | 10 years ago can be found (pipe to sudo to install software is | ||
50 | one example). Patches (contributions) to this documentation are more | ||
51 | than welcome! | ||
52 | |||
53 | The first chapter (``Preface'') as well as the the second chapter | ||
54 | (``Philosophy'') give an introduction to GNUnet as a project, what | ||
55 | GNUnet tries to achieve. ``Key Concepts'' explains the key concepts | ||
56 | in GNUnet. | ||
57 | These three chapters are the most complete in the documentation. | ||
58 | They are followed by chapters which explain specific parts of | ||
59 | GNUnet (and need more work): | ||
60 | ``Installing GNUnet'', ``GNUnet Contributors Handbook'' and | ||
61 | ``GNUnet Developer Handbook''. | ||
38 | 62 | ||
39 | @node Contributing to this book | 63 | @node Contributing to this book |
40 | @section Contributing to this book | 64 | @section Contributing to this book |
41 | 65 | ||
66 | @c FIXME: There's a good amount of repetition here, we should | ||
67 | @c FIXME: fix this. | ||
42 | The GNUnet Reference Manual is a collective work produced by various | 68 | The GNUnet Reference Manual is a collective work produced by various |
43 | people throughout the years. The version you are reading is derived | 69 | people throughout the years. |
44 | from many individual efforts hosted on our website. This was a failed | 70 | |
45 | experiment, and with the conversion to Texinfo we hope to address this | 71 | The version you are reading is derived |
46 | in the longterm. Texinfo is the documentation language of the GNU project. | 72 | from many individual efforts hosted on one of our old websites. |
73 | In the end it was considered to be impractical to read by | ||
74 | those who required the information. | ||
75 | With the conversion to Texinfo --- the version you are reading | ||
76 | right now --- we hope to address this in the longterm. | ||
77 | Texinfo is the documentation language of the GNU project. | ||
78 | |||
47 | While it can be intimidating at first and look scary or complicated, | 79 | While it can be intimidating at first and look scary or complicated, |
48 | it is just another way to express text format instructions. We encourage | 80 | it is just another way to express text format instructions. |
49 | you to take this opportunity and learn about Texinfo, learn about GNUnet, | 81 | |
50 | and one word at a time we will arrive at a book which explains GNUnet in | 82 | We encourage you to take this opportunity and learn about Texinfo, |
51 | the least complicated way to you. Even when you don't want or can't learn | 83 | learn about GNUnet, and one word at a time we will arrive at a |
52 | Texinfo, you can contribute. Send us an Email or join our IRC chat room | 84 | book which explains GNUnet in the least complicated way to you. |
53 | on freenode and talk with us about the documentation (the prefered way | 85 | |
54 | to reach out is the mailinglist, since you can communicate with us | 86 | Even when you don't want to or can't learn Texinfo, you can contribute. |
55 | without waiting on someone in the chatroom). One way or another you | 87 | Send us an Email or join our IRC chat room on freenode and talk with |
56 | can help shape the understanding of GNUnet without the ability to read | 88 | us about the documentation (the prefered way to reach out is the |
57 | and understand its sourcecode. | 89 | mailinglist, since you can communicate with us without waiting on |
90 | someone in the chatroom). | ||
91 | One way or another you can help shape the understanding of GNUnet | ||
92 | without the ability to read and understand its sourcecode. | ||
58 | 93 | ||
59 | @node Introduction | 94 | @node Introduction |
60 | @section Introduction | 95 | @section Introduction |
61 | 96 | ||
62 | @c In less than 2 printed pages describe the history of GNUnet here, | ||
63 | @c what we have now and what's still missing (could be split into | ||
64 | @c subchapters). | ||
65 | |||
66 | GNUnet in its current version is the result of almost 20 years of work | 97 | GNUnet in its current version is the result of almost 20 years of work |
67 | from many contributors. So far, most contributions were made by | 98 | from many contributors. So far, most contributions were made by |
68 | volunteers or people paid to do fundamental research. At this stage, | 99 | volunteers or people paid to do fundamental research. At this stage, |
@@ -109,12 +140,17 @@ social network, resulting in a significant growth of the core team. | |||
109 | In 2013, we launched @uref{https://taler.net, GNU Taler} to address | 140 | In 2013, we launched @uref{https://taler.net, GNU Taler} to address |
110 | the challenge of convenient | 141 | the challenge of convenient |
111 | and privacy-preserving online payments. In 2015, the | 142 | and privacy-preserving online payments. In 2015, the |
112 | @c TODO: Maybe even markup for the E if it renders in most outputs. | 143 | @c XXX: It is not correct to refer to pEp as pEp stylistic, |
113 | @uref{https://pep.foundation/, pEp} (pretty Easy privacy) project | 144 | @c XXX: but the correct version would lead to problems with |
145 | @c XXX: some of our outputs and/or older versions of texinfo | ||
146 | @c XXX: and devices that display versions on consoles etc. | ||
147 | @c XXX: This is why we keep the pEp until proven that p(tripple bar)p | ||
148 | @c XXX: does not create broken outputs. | ||
149 | @uref{https://pep.foundation/, pretty Easy privacy} (pEp) project | ||
114 | announced that they will use GNUnet as the technology for their | 150 | announced that they will use GNUnet as the technology for their |
115 | meta-data protection layer, ultimately resulting in GNUnet e.V. | 151 | meta-data protection layer, ultimately resulting in GNUnet e.V. |
116 | entering into a formal long-term collaboration with the pEp | 152 | entering into a formal long-term collaboration with the pEp |
117 | foundation. In 2016, Taler Systems SA, a first startup using GNUnet | 153 | Foundation. In 2016, Taler Systems SA, a first startup using GNUnet |
118 | technology, was founded with support from the community. | 154 | technology, was founded with support from the community. |
119 | 155 | ||
120 | GNUnet is not merely a technical project, but also a political | 156 | GNUnet is not merely a technical project, but also a political |
@@ -131,7 +167,7 @@ Similarly its flaws are not limited to the protocol design. Thus, | |||
131 | technical excellence by itself will not suffice to create a better | 167 | technical excellence by itself will not suffice to create a better |
132 | network. We also need to build a community that is wise, humble and | 168 | network. We also need to build a community that is wise, humble and |
133 | has a sense of humor to achieve our goal to create a technical | 169 | has a sense of humor to achieve our goal to create a technical |
134 | foundation for a society we would like to live in. | 170 | foundation for a society we would like to live in. |
135 | 171 | ||
136 | 172 | ||
137 | @node Project governance | 173 | @node Project governance |
@@ -142,15 +178,12 @@ follows the governance model of a benevolent dictator. This means | |||
142 | that ultimately, the GNU project appoints the GNU maintainer and can | 178 | that ultimately, the GNU project appoints the GNU maintainer and can |
143 | overrule decisions made by the GNUnet maintainer. Similarly, the | 179 | overrule decisions made by the GNUnet maintainer. Similarly, the |
144 | GNUnet maintainer can overrule any decisions made by individual | 180 | GNUnet maintainer can overrule any decisions made by individual |
145 | @c TODO: Should we mention if this is just about GNUnet? Other projects | ||
146 | @c TODO: in GNU seem to have rare issues (GCC, the 2018 documentation | ||
147 | @c TODO: discussion. | ||
148 | developers. Still, in practice neither has happened in the last 20 | 181 | developers. Still, in practice neither has happened in the last 20 |
149 | years, and we hope to keep it that way. | 182 | years for GNUnet, and we hope to keep it that way. |
150 | 183 | ||
151 | @c TODO: Actually we are a Swiss association, or just a German association | 184 | @c TODO: Actually we are a Swiss association, or just a German association |
152 | @c TODO: with Swiss bylaws/Satzung? | 185 | @c TODO: with Swiss bylaws/Satzung? |
153 | @c TODO: Rewrite one of the 'GNUnet eV may also' sentences. | 186 | @c TODO: Rewrite one of the 'GNUnet eV may also' sentences? |
154 | The GNUnet project is supported by GNUnet e.V., a German association | 187 | The GNUnet project is supported by GNUnet e.V., a German association |
155 | where any developer can become a member. GNUnet e.V. serves as a | 188 | where any developer can become a member. GNUnet e.V. serves as a |
156 | legal entity to hold the copyrights to GNUnet. GNUnet e.V. may also | 189 | legal entity to hold the copyrights to GNUnet. GNUnet e.V. may also |
diff --git a/doc/handbook/chapters/user.texi b/doc/handbook/chapters/user.texi index 1300b2bb6..37c5849ab 100644 --- a/doc/handbook/chapters/user.texi +++ b/doc/handbook/chapters/user.texi | |||
@@ -1,6 +1,6 @@ | |||
1 | @node Using GNUnet | 1 | @node Using GNUnet |
2 | @chapter Using GNUnet | 2 | @chapter Using GNUnet |
3 | @c %**end of header | 3 | |
4 | 4 | ||
5 | This tutorial is supposed to give a first introduction for users | 5 | This tutorial is supposed to give a first introduction for users |
6 | trying to do something real with GNUnet. Installation and | 6 | trying to do something real with GNUnet. Installation and |
@@ -47,7 +47,7 @@ $ gnunet-arm -e | |||
47 | 47 | ||
48 | @node First steps - Using the GNU Name System | 48 | @node First steps - Using the GNU Name System |
49 | @section First steps - Using the GNU Name System | 49 | @section First steps - Using the GNU Name System |
50 | @c %**end of header | 50 | |
51 | 51 | ||
52 | @menu | 52 | @menu |
53 | * Preliminaries:: | 53 | * Preliminaries:: |
@@ -65,7 +65,7 @@ $ gnunet-arm -e | |||
65 | 65 | ||
66 | @node Preliminaries | 66 | @node Preliminaries |
67 | @subsection Preliminaries | 67 | @subsection Preliminaries |
68 | @c %**end of header | 68 | |
69 | 69 | ||
70 | ``.pin'' is a default zone which points to a zone managed by gnunet.org. | 70 | ``.pin'' is a default zone which points to a zone managed by gnunet.org. |
71 | Use @code{gnunet-config -s gns} to view the GNS configuration, including | 71 | Use @code{gnunet-config -s gns} to view the GNS configuration, including |
@@ -106,7 +106,7 @@ rules - GO0T87F9BPMF8NKD5A54L2AH1T0GRML539TPFSRMCEA98182QD30 | |||
106 | 106 | ||
107 | @node The GNS Tab | 107 | @node The GNS Tab |
108 | @subsection The GNS Tab | 108 | @subsection The GNS Tab |
109 | @c %**end of header | 109 | |
110 | 110 | ||
111 | Maintaing your zones is through the NAMESTORE service and is discussed | 111 | Maintaing your zones is through the NAMESTORE service and is discussed |
112 | here. You can manage your zone using @command{gnunet-identity} and | 112 | here. You can manage your zone using @command{gnunet-identity} and |
@@ -138,7 +138,7 @@ bottom of the window contains the existing entries in the selected zone. | |||
138 | 138 | ||
139 | @node Creating a Record | 139 | @node Creating a Record |
140 | @subsection Creating a Record | 140 | @subsection Creating a Record |
141 | @c %**end of header | 141 | |
142 | 142 | ||
143 | We will begin by creating a simple record in your master zone. | 143 | We will begin by creating a simple record in your master zone. |
144 | To do this, click on the text "<new name>" in the table. The field is | 144 | To do this, click on the text "<new name>" in the table. The field is |
@@ -168,7 +168,7 @@ to edit it later. | |||
168 | 168 | ||
169 | @node Resolving GNS records | 169 | @node Resolving GNS records |
170 | @subsection Resolving GNS records | 170 | @subsection Resolving GNS records |
171 | @c %**end of header | 171 | |
172 | 172 | ||
173 | Next, you should try resolving your own GNS records. The method we | 173 | Next, you should try resolving your own GNS records. The method we |
174 | found to be the most uncomplicated is to do this by explicitly | 174 | found to be the most uncomplicated is to do this by explicitly |
@@ -191,7 +191,7 @@ the application. | |||
191 | 191 | ||
192 | @node Integration with Browsers | 192 | @node Integration with Browsers |
193 | @subsection Integration with Browsers | 193 | @subsection Integration with Browsers |
194 | @c %**end of header | 194 | |
195 | 195 | ||
196 | While we recommend integrating GNS using the NSS module in the | 196 | While we recommend integrating GNS using the NSS module in the |
197 | GNU libc Name Service Switch, you can also integrate GNS | 197 | GNU libc Name Service Switch, you can also integrate GNS |
@@ -271,7 +271,7 @@ apt-get install texlive-full | |||
271 | 271 | ||
272 | @noindent | 272 | @noindent |
273 | Start creating a business card by clicking the "Copy" button | 273 | Start creating a business card by clicking the "Copy" button |
274 | in @command{gnunet-gtk}'s GNS tab. Next, you should start | 274 | in @command{gnunet-namestore-gtk}. Next, you should start |
275 | the @command{gnunet-bcd} program (in the terminal, on the command-line). | 275 | the @command{gnunet-bcd} program (in the terminal, on the command-line). |
276 | You do not need to pass any options, and please be not surprised if | 276 | You do not need to pass any options, and please be not surprised if |
277 | there is no output: | 277 | there is no output: |
@@ -286,7 +286,7 @@ where @code{gnunet-bcd} is running a Web server! | |||
286 | 286 | ||
287 | First, you might want to fill in the "GNS Public Key" field by | 287 | First, you might want to fill in the "GNS Public Key" field by |
288 | right-clicking and selecting "Paste", filling in the public key | 288 | right-clicking and selecting "Paste", filling in the public key |
289 | from the copy you made in @command{gnunet-gtk}. | 289 | from the copy you made in @command{gnunet-namestore-gtk}. |
290 | Then, fill in all of the other fields, including your @b{GNS NICKname}. | 290 | Then, fill in all of the other fields, including your @b{GNS NICKname}. |
291 | Adding a GPG fingerprint is optional. | 291 | Adding a GPG fingerprint is optional. |
292 | Once finished, click "Submit Query". | 292 | Once finished, click "Submit Query". |
@@ -302,7 +302,7 @@ You can now go back to the shell running @code{gnunet-bcd} and press | |||
302 | 302 | ||
303 | @node Be Social | 303 | @node Be Social |
304 | @subsection Be Social | 304 | @subsection Be Social |
305 | @c %**end of header | 305 | |
306 | 306 | ||
307 | Next, you should print out your business card and be social. | 307 | Next, you should print out your business card and be social. |
308 | Find a friend, help them install GNUnet and exchange business cards with | 308 | Find a friend, help them install GNUnet and exchange business cards with |
@@ -424,7 +424,7 @@ performed by using the @command{-p} option of @command{gnunet-revocation}. | |||
424 | 424 | ||
425 | @node What's Next? | 425 | @node What's Next? |
426 | @subsection What's Next? | 426 | @subsection What's Next? |
427 | @c %**end of header | 427 | |
428 | 428 | ||
429 | This may seem not like much of an application yet, but you have | 429 | This may seem not like much of an application yet, but you have |
430 | just been one of the first to perform a decentralized secure name | 430 | just been one of the first to perform a decentralized secure name |
@@ -443,7 +443,7 @@ using this new public key infrastructure. | |||
443 | @pindex gnunet-conservation-gtk | 443 | @pindex gnunet-conservation-gtk |
444 | @node First steps - Using GNUnet Conversation | 444 | @node First steps - Using GNUnet Conversation |
445 | @section First steps - Using GNUnet Conversation | 445 | @section First steps - Using GNUnet Conversation |
446 | @c %**end of header | 446 | |
447 | 447 | ||
448 | First, you should launch the graphical user interface. You can do | 448 | First, you should launch the graphical user interface. You can do |
449 | this from the command-line by typing | 449 | this from the command-line by typing |
@@ -459,7 +459,7 @@ $ gnunet-conversation-gtk | |||
459 | 459 | ||
460 | @node Testing your Audio Equipment | 460 | @node Testing your Audio Equipment |
461 | @subsection Testing your Audio Equipment | 461 | @subsection Testing your Audio Equipment |
462 | @c %**end of header | 462 | |
463 | 463 | ||
464 | First, you should use @code{gnunet-conversation-test} to check that your | 464 | First, you should use @code{gnunet-conversation-test} to check that your |
465 | microphone and speaker are working correctly. You will be prompted to | 465 | microphone and speaker are working correctly. You will be prompted to |
@@ -471,7 +471,7 @@ that the correct device is being associated with GNUnet's audio tools. | |||
471 | 471 | ||
472 | @node GNS Zones | 472 | @node GNS Zones |
473 | @subsection GNS Zones | 473 | @subsection GNS Zones |
474 | @c %**end of header | 474 | |
475 | 475 | ||
476 | @code{gnunet-conversation} uses GNS for addressing. This means that | 476 | @code{gnunet-conversation} uses GNS for addressing. This means that |
477 | you need to have a GNS zone created before using it. Information | 477 | you need to have a GNS zone created before using it. Information |
@@ -485,7 +485,7 @@ about how to create GNS zones can be found here. | |||
485 | 485 | ||
486 | @node Picking an Identity | 486 | @node Picking an Identity |
487 | @subsubsection Picking an Identity | 487 | @subsubsection Picking an Identity |
488 | @c %**end of header | 488 | |
489 | 489 | ||
490 | To make a call with @code{gnunet-conversation}, you first | 490 | To make a call with @code{gnunet-conversation}, you first |
491 | need to choose an identity. This identity is both the caller ID | 491 | need to choose an identity. This identity is both the caller ID |
@@ -542,7 +542,7 @@ manually. Save the record. | |||
542 | 542 | ||
543 | @node Calling somebody | 543 | @node Calling somebody |
544 | @subsubsection Calling somebody | 544 | @subsubsection Calling somebody |
545 | @c %**end of header | 545 | |
546 | 546 | ||
547 | Now you can call a buddy. Obviously, your buddy will have to have GNUnet | 547 | Now you can call a buddy. Obviously, your buddy will have to have GNUnet |
548 | installed and must have performed the same steps. Also, you must have | 548 | installed and must have performed the same steps. Also, you must have |
@@ -568,7 +568,7 @@ Either of you can end the call using @command{/cancel}. You can exit | |||
568 | 568 | ||
569 | @node First steps - Using the GNUnet VPN | 569 | @node First steps - Using the GNUnet VPN |
570 | @section First steps - Using the GNUnet VPN | 570 | @section First steps - Using the GNUnet VPN |
571 | @c %**end of header | 571 | |
572 | 572 | ||
573 | 573 | ||
574 | @menu | 574 | @menu |
@@ -581,7 +581,7 @@ Either of you can end the call using @command{/cancel}. You can exit | |||
581 | 581 | ||
582 | @node VPN Preliminaries | 582 | @node VPN Preliminaries |
583 | @subsection VPN Preliminaries | 583 | @subsection VPN Preliminaries |
584 | @c %**end of header | 584 | |
585 | 585 | ||
586 | To test the GNUnet VPN, we should first run a web server. | 586 | To test the GNUnet VPN, we should first run a web server. |
587 | The easiest way to do this is to just start @code{gnunet-bcd}, | 587 | The easiest way to do this is to just start @code{gnunet-bcd}, |
@@ -622,7 +622,7 @@ to install the NSS plugins in the proper location. | |||
622 | 622 | ||
623 | @node GNUnet-Exit configuration | 623 | @node GNUnet-Exit configuration |
624 | @subsection GNUnet-Exit configuration | 624 | @subsection GNUnet-Exit configuration |
625 | @c %**end of header | 625 | |
626 | 626 | ||
627 | Stop your peer (as user @code{gnunet}, run @command{gnunet-arm -e}) and | 627 | Stop your peer (as user @code{gnunet}, run @command{gnunet-arm -e}) and |
628 | run @command{gnunet-setup}. In @command{gnunet-setup}, make sure to | 628 | run @command{gnunet-setup}. In @command{gnunet-setup}, make sure to |
@@ -638,10 +638,10 @@ Now exit @command{gnunet-setup} and restart your peer | |||
638 | 638 | ||
639 | @node GNS configuration | 639 | @node GNS configuration |
640 | @subsection GNS configuration | 640 | @subsection GNS configuration |
641 | @c %**end of header | 641 | |
642 | 642 | ||
643 | Now, using your normal user (not the @code{gnunet} system user), run | 643 | Now, using your normal user (not the @code{gnunet} system user), run |
644 | @command{gnunet-gtk}. Select the GNS icon and add a new label www in your | 644 | @command{gnunet-namestore-gtk}. Add a new label www in your |
645 | master zone. For the record type, select @code{VPN}. You should then | 645 | master zone. For the record type, select @code{VPN}. You should then |
646 | see the VPN dialog: | 646 | see the VPN dialog: |
647 | 647 | ||
@@ -654,11 +654,11 @@ identifier that we used in the Exit setup earlier, so here supply "bcd". | |||
654 | If you want others to be able to use the service, you should probably make | 654 | If you want others to be able to use the service, you should probably make |
655 | the record public. For non-public services, you should use a passphrase | 655 | the record public. For non-public services, you should use a passphrase |
656 | instead of the string "bcd". Save the record and | 656 | instead of the string "bcd". Save the record and |
657 | exit @command{gnunet-gtk}. | 657 | exit @command{gnunet-namestore-gtk}. |
658 | 658 | ||
659 | @node Accessing the service | 659 | @node Accessing the service |
660 | @subsection Accessing the service | 660 | @subsection Accessing the service |
661 | @c %**end of header | 661 | |
662 | 662 | ||
663 | You should now be able to access your webserver. Type in: | 663 | You should now be able to access your webserver. Type in: |
664 | 664 | ||
@@ -681,7 +681,7 @@ your business card. | |||
681 | 681 | ||
682 | @node Using a Browser | 682 | @node Using a Browser |
683 | @subsection Using a Browser | 683 | @subsection Using a Browser |
684 | @c %**end of header | 684 | |
685 | 685 | ||
686 | Sadly, modern browsers tend to bypass the Name Services Switch and | 686 | Sadly, modern browsers tend to bypass the Name Services Switch and |
687 | attempt DNS resolution directly. You can either run | 687 | attempt DNS resolution directly. You can either run |
@@ -693,7 +693,7 @@ using the HTTP proxy with Chrome does work. | |||
693 | 693 | ||
694 | @node File-sharing | 694 | @node File-sharing |
695 | @section File-sharing | 695 | @section File-sharing |
696 | @c %**end of header | 696 | |
697 | 697 | ||
698 | This chapter documents the GNUnet file-sharing application. The original | 698 | This chapter documents the GNUnet file-sharing application. The original |
699 | file-sharing implementation for GNUnet was designed to provide | 699 | file-sharing implementation for GNUnet was designed to provide |
@@ -726,7 +726,7 @@ files. | |||
726 | 726 | ||
727 | @node fs-Searching | 727 | @node fs-Searching |
728 | @subsection Searching | 728 | @subsection Searching |
729 | @c %**end of header | 729 | |
730 | 730 | ||
731 | The command @command{gnunet-search} can be used to search | 731 | The command @command{gnunet-search} can be used to search |
732 | for content on GNUnet. The format is: | 732 | for content on GNUnet. The format is: |
@@ -784,7 +784,7 @@ the file in bytes. | |||
784 | 784 | ||
785 | @node fs-Downloading | 785 | @node fs-Downloading |
786 | @subsection Downloading | 786 | @subsection Downloading |
787 | @c %**end of header | 787 | |
788 | 788 | ||
789 | In order to download a file, you need the whole line returned by | 789 | In order to download a file, you need the whole line returned by |
790 | @command{gnunet-search}. | 790 | @command{gnunet-search}. |
@@ -823,7 +823,7 @@ current number of bytes downloaded whenever new data was received. | |||
823 | 823 | ||
824 | @node fs-Publishing | 824 | @node fs-Publishing |
825 | @subsection Publishing | 825 | @subsection Publishing |
826 | @c %**end of header | 826 | |
827 | 827 | ||
828 | The command @command{gnunet-publish} can be used to add content | 828 | The command @command{gnunet-publish} can be used to add content |
829 | to the network. The basic format of the command is | 829 | to the network. The basic format of the command is |
@@ -844,7 +844,7 @@ $ gnunet-publish -m "description:GNU License" -k gpl -k test -m "mimetype:text/p | |||
844 | 844 | ||
845 | @node Important command-line options | 845 | @node Important command-line options |
846 | @subsubsection Important command-line options | 846 | @subsubsection Important command-line options |
847 | @c %**end of header | 847 | |
848 | 848 | ||
849 | The option @code{-k} is used to specify keywords for the file that | 849 | The option @code{-k} is used to specify keywords for the file that |
850 | should be inserted. You can supply any number of keywords, | 850 | should be inserted. You can supply any number of keywords, |
@@ -871,7 +871,7 @@ man gnunet-publish | |||
871 | 871 | ||
872 | @node Indexing vs. Inserting | 872 | @node Indexing vs. Inserting |
873 | @subsubsection Indexing vs Inserting | 873 | @subsubsection Indexing vs Inserting |
874 | @c %**end of header | 874 | |
875 | 875 | ||
876 | By default, GNUnet indexes a file instead of making a full copy. | 876 | By default, GNUnet indexes a file instead of making a full copy. |
877 | This is much more efficient, but requires the file to stay unaltered | 877 | This is much more efficient, but requires the file to stay unaltered |
@@ -907,7 +907,7 @@ able to crack the encryption (e.g. by guessing the keyword. | |||
907 | 907 | ||
908 | @node fs-Concepts | 908 | @node fs-Concepts |
909 | @subsection Concepts | 909 | @subsection Concepts |
910 | @c %**end of header | 910 | |
911 | 911 | ||
912 | For better results with filesharing it is useful to understand the | 912 | For better results with filesharing it is useful to understand the |
913 | following concepts. | 913 | following concepts. |
@@ -936,7 +936,7 @@ concepts that are used to achieve these goals. | |||
936 | 936 | ||
937 | @node Files | 937 | @node Files |
938 | @subsubsection Files | 938 | @subsubsection Files |
939 | @c %**end of header | 939 | |
940 | 940 | ||
941 | A file in GNUnet is just a sequence of bytes. Any file-format is allowed | 941 | A file in GNUnet is just a sequence of bytes. Any file-format is allowed |
942 | and the maximum file size is theoretically @math{2^64 - 1} bytes, except | 942 | and the maximum file size is theoretically @math{2^64 - 1} bytes, except |
@@ -946,7 +946,7 @@ using GNU libextractor to obtain keywords. | |||
946 | 946 | ||
947 | @node Keywords | 947 | @node Keywords |
948 | @subsubsection Keywords | 948 | @subsubsection Keywords |
949 | @c %**end of header | 949 | |
950 | 950 | ||
951 | Keywords are the most simple mechanism to find files on GNUnet. | 951 | Keywords are the most simple mechanism to find files on GNUnet. |
952 | Keywords are @strong{case-sensitive} and the search string | 952 | Keywords are @strong{case-sensitive} and the search string |
@@ -963,7 +963,7 @@ request. | |||
963 | 963 | ||
964 | @node Directories | 964 | @node Directories |
965 | @subsubsection Directories | 965 | @subsubsection Directories |
966 | @c %**end of header | 966 | |
967 | 967 | ||
968 | A directory in GNUnet is a list of file identifiers with meta data. | 968 | A directory in GNUnet is a list of file identifiers with meta data. |
969 | The file identifiers provide sufficient information about the files | 969 | The file identifiers provide sufficient information about the files |
@@ -986,7 +986,7 @@ other meta information, and possibly even the full original file | |||
986 | 986 | ||
987 | @node Pseudonyms | 987 | @node Pseudonyms |
988 | @subsubsection Pseudonyms | 988 | @subsubsection Pseudonyms |
989 | @c %**end of header | 989 | |
990 | 990 | ||
991 | @b{Please note that the text in this subsection is outdated and needs} | 991 | @b{Please note that the text in this subsection is outdated and needs} |
992 | @b{to be rewritten for version 0.10!} | 992 | @b{to be rewritten for version 0.10!} |
@@ -1005,7 +1005,7 @@ to copy around). | |||
1005 | 1005 | ||
1006 | @node Namespaces | 1006 | @node Namespaces |
1007 | @subsubsection Namespaces | 1007 | @subsubsection Namespaces |
1008 | @c %**end of header | 1008 | |
1009 | 1009 | ||
1010 | @b{Please note that the text in this subsection is outdated and needs} | 1010 | @b{Please note that the text in this subsection is outdated and needs} |
1011 | @b{to be rewritten for version 0.10!} | 1011 | @b{to be rewritten for version 0.10!} |
@@ -1020,7 +1020,7 @@ same entity (which does not have to be the same person). | |||
1020 | 1020 | ||
1021 | @node Advertisements | 1021 | @node Advertisements |
1022 | @subsubsection Advertisements | 1022 | @subsubsection Advertisements |
1023 | @c %**end of header | 1023 | |
1024 | 1024 | ||
1025 | @b{Please note that the text in this subsection is outdated and needs} | 1025 | @b{Please note that the text in this subsection is outdated and needs} |
1026 | @b{to be rewritten for version 0.10!} | 1026 | @b{to be rewritten for version 0.10!} |
@@ -1045,7 +1045,7 @@ confusion. | |||
1045 | 1045 | ||
1046 | @node Anonymity level | 1046 | @node Anonymity level |
1047 | @subsubsection Anonymity level | 1047 | @subsubsection Anonymity level |
1048 | @c %**end of header | 1048 | |
1049 | 1049 | ||
1050 | The anonymity level determines how hard it should be for an adversary to | 1050 | The anonymity level determines how hard it should be for an adversary to |
1051 | determine the identity of the publisher or the searcher/downloader. An | 1051 | determine the identity of the publisher or the searcher/downloader. An |
@@ -1059,7 +1059,7 @@ it can also significantly hurt performance. | |||
1059 | 1059 | ||
1060 | @node Content Priority | 1060 | @node Content Priority |
1061 | @subsubsection Content Priority | 1061 | @subsubsection Content Priority |
1062 | @c %**end of header | 1062 | |
1063 | 1063 | ||
1064 | Depending on the peer's configuration, GNUnet peers migrate content | 1064 | Depending on the peer's configuration, GNUnet peers migrate content |
1065 | between peers. Content in this sense are individual blocks of a file, | 1065 | between peers. Content in this sense are individual blocks of a file, |
@@ -1076,7 +1076,7 @@ when the block was published initially. | |||
1076 | 1076 | ||
1077 | @node Replication | 1077 | @node Replication |
1078 | @subsubsection Replication | 1078 | @subsubsection Replication |
1079 | @c %**end of header | 1079 | |
1080 | 1080 | ||
1081 | When peers migrate content to other systems, the replication level | 1081 | When peers migrate content to other systems, the replication level |
1082 | of a block is used to decide which blocks need to be migrated most | 1082 | of a block is used to decide which blocks need to be migrated most |
@@ -1088,7 +1088,7 @@ selection is simply random. | |||
1088 | 1088 | ||
1089 | @node Namespace Management | 1089 | @node Namespace Management |
1090 | @subsection Namespace Management | 1090 | @subsection Namespace Management |
1091 | @c %**end of header | 1091 | |
1092 | 1092 | ||
1093 | @b{Please note that the text in this subsection is outdated and needs} | 1093 | @b{Please note that the text in this subsection is outdated and needs} |
1094 | @b{to be rewritten for version 0.10!} | 1094 | @b{to be rewritten for version 0.10!} |
@@ -1108,7 +1108,7 @@ lists all locally available pseudonyms. | |||
1108 | 1108 | ||
1109 | @node Creating Pseudonyms | 1109 | @node Creating Pseudonyms |
1110 | @subsubsection Creating Pseudonyms | 1110 | @subsubsection Creating Pseudonyms |
1111 | @c %**end of header | 1111 | |
1112 | 1112 | ||
1113 | @b{Please note that the text in this subsection is outdated and needs} | 1113 | @b{Please note that the text in this subsection is outdated and needs} |
1114 | @b{to be rewritten for version 0.10!} | 1114 | @b{to be rewritten for version 0.10!} |
@@ -1123,7 +1123,7 @@ used. | |||
1123 | 1123 | ||
1124 | @node Deleting Pseudonyms | 1124 | @node Deleting Pseudonyms |
1125 | @subsubsection Deleting Pseudonyms | 1125 | @subsubsection Deleting Pseudonyms |
1126 | @c %**end of header | 1126 | |
1127 | 1127 | ||
1128 | @b{Please note that the text in this subsection is outdated and needs} | 1128 | @b{Please note that the text in this subsection is outdated and needs} |
1129 | @b{to be rewritten for version 0.10!} | 1129 | @b{to be rewritten for version 0.10!} |
@@ -1137,7 +1137,7 @@ unavailable. | |||
1137 | 1137 | ||
1138 | @node Advertising namespaces | 1138 | @node Advertising namespaces |
1139 | @subsubsection Advertising namespaces | 1139 | @subsubsection Advertising namespaces |
1140 | @c %**end of header | 1140 | |
1141 | 1141 | ||
1142 | @b{Please note that the text in this subsection is outdated and needs} | 1142 | @b{Please note that the text in this subsection is outdated and needs} |
1143 | @b{to be rewritten for version 0.10!} | 1143 | @b{to be rewritten for version 0.10!} |
@@ -1157,7 +1157,7 @@ the quality of the content found in it. | |||
1157 | 1157 | ||
1158 | @node Namespace names | 1158 | @node Namespace names |
1159 | @subsubsection Namespace names | 1159 | @subsubsection Namespace names |
1160 | @c %**end of header | 1160 | |
1161 | 1161 | ||
1162 | @b{Please note that the text in this subsection is outdated and needs} | 1162 | @b{Please note that the text in this subsection is outdated and needs} |
1163 | @b{to be rewritten for version 0.10!} | 1163 | @b{to be rewritten for version 0.10!} |
@@ -1172,7 +1172,7 @@ to the NICKNAME to get a unique identifier. | |||
1172 | 1172 | ||
1173 | @node Namespace root | 1173 | @node Namespace root |
1174 | @subsubsection Namespace root | 1174 | @subsubsection Namespace root |
1175 | @c %**end of header | 1175 | |
1176 | 1176 | ||
1177 | @b{Please note that the text in this subsection is outdated and needs} | 1177 | @b{Please note that the text in this subsection is outdated and needs} |
1178 | @b{to be rewritten for version 0.10!} | 1178 | @b{to be rewritten for version 0.10!} |
@@ -1185,7 +1185,7 @@ entry point to the content of the namespace. | |||
1185 | 1185 | ||
1186 | @node File-Sharing URIs | 1186 | @node File-Sharing URIs |
1187 | @subsection File-Sharing URIs | 1187 | @subsection File-Sharing URIs |
1188 | @c %**end of header | 1188 | |
1189 | 1189 | ||
1190 | GNUnet (currently) uses four different types of URIs for | 1190 | GNUnet (currently) uses four different types of URIs for |
1191 | file-sharing. They all begin with "gnunet://fs/". | 1191 | file-sharing. They all begin with "gnunet://fs/". |
@@ -1207,7 +1207,7 @@ into two OR-ed keywords 'foo' and 'bar', not into '"foo bar"'. | |||
1207 | 1207 | ||
1208 | @node Encoding of hash values in URIs | 1208 | @node Encoding of hash values in URIs |
1209 | @subsubsection Encoding of hash values in URIs | 1209 | @subsubsection Encoding of hash values in URIs |
1210 | @c %**end of header | 1210 | |
1211 | 1211 | ||
1212 | Most URIs include some hash values. Hashes are encoded using | 1212 | Most URIs include some hash values. Hashes are encoded using |
1213 | base32hex (RFC 2938). | 1213 | base32hex (RFC 2938). |
@@ -1215,7 +1215,7 @@ base32hex (RFC 2938). | |||
1215 | @cindex chk-uri | 1215 | @cindex chk-uri |
1216 | @node Content Hash Key (chk) | 1216 | @node Content Hash Key (chk) |
1217 | @subsubsection Content Hash Key (chk) | 1217 | @subsubsection Content Hash Key (chk) |
1218 | @c %**end of header | 1218 | |
1219 | 1219 | ||
1220 | A chk-URI is used to (uniquely) identify a file or directory | 1220 | A chk-URI is used to (uniquely) identify a file or directory |
1221 | and to allow peers to download the file. Files are stored in | 1221 | and to allow peers to download the file. Files are stored in |
@@ -1232,7 +1232,7 @@ of the encrypted block). | |||
1232 | @cindex loc-uri | 1232 | @cindex loc-uri |
1233 | @node Location identifiers (loc) | 1233 | @node Location identifiers (loc) |
1234 | @subsubsection Location identifiers (loc) | 1234 | @subsubsection Location identifiers (loc) |
1235 | @c %**end of header | 1235 | |
1236 | 1236 | ||
1237 | For non-anonymous file-sharing, loc-URIs are used to specify which | 1237 | For non-anonymous file-sharing, loc-URIs are used to specify which |
1238 | peer is offering the data (in addition to specifying all of the | 1238 | peer is offering the data (in addition to specifying all of the |
@@ -1248,7 +1248,7 @@ base32hex) and EXPTIME specifies when the signature expires | |||
1248 | @cindex ksk-uri | 1248 | @cindex ksk-uri |
1249 | @node Keyword queries (ksk) | 1249 | @node Keyword queries (ksk) |
1250 | @subsubsection Keyword queries (ksk) | 1250 | @subsubsection Keyword queries (ksk) |
1251 | @c %**end of header | 1251 | |
1252 | 1252 | ||
1253 | A keyword-URI is used to specify that the desired operation | 1253 | A keyword-URI is used to specify that the desired operation |
1254 | is the search using a particular keyword. The format is simply | 1254 | is the search using a particular keyword. The format is simply |
@@ -1263,7 +1263,7 @@ Furthermore they must not contain '++'. | |||
1263 | @cindex sks-uri | 1263 | @cindex sks-uri |
1264 | @node Namespace content (sks) | 1264 | @node Namespace content (sks) |
1265 | @subsubsection Namespace content (sks) | 1265 | @subsubsection Namespace content (sks) |
1266 | @c %**end of header | 1266 | |
1267 | 1267 | ||
1268 | @b{Please note that the text in this subsection is outdated and needs} | 1268 | @b{Please note that the text in this subsection is outdated and needs} |
1269 | @b{to be rewritten for version 0.10!} | 1269 | @b{to be rewritten for version 0.10!} |
@@ -1298,7 +1298,7 @@ looking for for testing, we need to begin by publishing a file. | |||
1298 | 1298 | ||
1299 | @node gtk-Publishing | 1299 | @node gtk-Publishing |
1300 | @subsubsection Publishing | 1300 | @subsubsection Publishing |
1301 | @c %**end of header | 1301 | |
1302 | 1302 | ||
1303 | To publish a file, select "File Sharing" in the menu bar just below the | 1303 | To publish a file, select "File Sharing" in the menu bar just below the |
1304 | "Statistics" icon, and then select "Publish" from the menu. | 1304 | "Statistics" icon, and then select "Publish" from the menu. |
@@ -1361,7 +1361,7 @@ with progress indicators): | |||
1361 | 1361 | ||
1362 | @node gtk-Searching | 1362 | @node gtk-Searching |
1363 | @subsubsection Searching | 1363 | @subsubsection Searching |
1364 | @c %**end of header | 1364 | |
1365 | 1365 | ||
1366 | Below the menu bar, there are four entry widges labeled "Namespace", | 1366 | Below the menu bar, there are four entry widges labeled "Namespace", |
1367 | "Keywords", "Anonymity" and "Mime-type" (from left to right). These | 1367 | "Keywords", "Anonymity" and "Mime-type" (from left to right). These |
@@ -1386,7 +1386,7 @@ a little area for downloading appears. | |||
1386 | 1386 | ||
1387 | @node gtk-Downloading | 1387 | @node gtk-Downloading |
1388 | @subsubsection Downloading | 1388 | @subsubsection Downloading |
1389 | @c %**end of header | 1389 | |
1390 | 1390 | ||
1391 | In the downloading area, you can select the target directory (default is | 1391 | In the downloading area, you can select the target directory (default is |
1392 | "Downloads") and specify the desired filename (by default the filename it | 1392 | "Downloads") and specify the desired filename (by default the filename it |
@@ -1413,7 +1413,7 @@ That's it, you now know the basics for file-sharing with GNUnet! | |||
1413 | 1413 | ||
1414 | @node The GNU Name System | 1414 | @node The GNU Name System |
1415 | @section The GNU Name System | 1415 | @section The GNU Name System |
1416 | @c %**end of header | 1416 | |
1417 | 1417 | ||
1418 | 1418 | ||
1419 | The GNU Name System (GNS) is secure and decentralized naming system. | 1419 | The GNU Name System (GNS) is secure and decentralized naming system. |
@@ -1915,8 +1915,8 @@ Ascension | |||
1915 | Usage: | 1915 | Usage: |
1916 | ascension <domain> [-d] [-p] | 1916 | ascension <domain> [-d] [-p] |
1917 | ascension <domain> <port> [-d] [-p] | 1917 | ascension <domain> <port> [-d] [-p] |
1918 | ascension <domain> -ns <transferns> [-d] [-p] | 1918 | ascension <domain> -n <transferns> [-d] [-p] |
1919 | ascension <domain> -ns <transferns> <port> [-d] [-p] | 1919 | ascension <domain> -n <transferns> <port> [-d] [-p] |
1920 | ascension -p | --public | 1920 | ascension -p | --public |
1921 | ascension -h | --help | 1921 | ascension -h | --help |
1922 | ascension -v | --version | 1922 | ascension -v | --version |
@@ -1940,7 +1940,7 @@ To migrate the Syrian top level domain - one of the few top level domains that | |||
1940 | still supports zone transfers - into GNS use the following command: | 1940 | still supports zone transfers - into GNS use the following command: |
1941 | 1941 | ||
1942 | @example | 1942 | @example |
1943 | $ ascension sy. -ns ns1.tld.sy. -p | 1943 | $ ascension sy. -n ns1.tld.sy. -p |
1944 | @end example | 1944 | @end example |
1945 | 1945 | ||
1946 | The -p flag will tell GNS to put these records on the DHT so that other users | 1946 | The -p flag will tell GNS to put these records on the DHT so that other users |
@@ -1982,10 +1982,14 @@ and enable the service, so that your zone is migrated automatically. | |||
1982 | @section reclaimID Identity Provider | 1982 | @section reclaimID Identity Provider |
1983 | 1983 | ||
1984 | The reclaimID Identity Provider (IdP) is a decentralized IdP service. | 1984 | The reclaimID Identity Provider (IdP) is a decentralized IdP service. |
1985 | It allows its users to manage and authorize third parties to access their identity attributes such as email or shipping addresses. | 1985 | It allows its users to manage and authorize third parties to access |
1986 | 1986 | their identity attributes such as email or shipping addresses. | |
1987 | It basically mimics the concepts of centralized IdPs, such as those offered by Google or Facebook. | 1987 | |
1988 | Like other IdPs, reclaimID features an (optional) OpenID-Connect 1.0-compliant protocol layer that can be used for websites to integrate reclaimID as an Identity Provider with little effort. | 1988 | It basically mimics the concepts of centralized IdPs, such as those |
1989 | offered by Google or Facebook. | ||
1990 | Like other IdPs, reclaimID features an (optional) OpenID-Connect | ||
1991 | 1.0-compliant protocol layer that can be used for websites to | ||
1992 | integrate reclaimID as an Identity Provider with little effort. | ||
1989 | 1993 | ||
1990 | @menu | 1994 | @menu |
1991 | * Managing Attributes:: | 1995 | * Managing Attributes:: |
diff --git a/doc/handbook/gnunet.texi b/doc/handbook/gnunet.texi index a479d2059..75a9f1f2b 100644 --- a/doc/handbook/gnunet.texi +++ b/doc/handbook/gnunet.texi | |||
@@ -14,7 +14,7 @@ | |||
14 | @c @set OPENPGP-SIGNING-KEY-ID | 14 | @c @set OPENPGP-SIGNING-KEY-ID |
15 | 15 | ||
16 | @copying | 16 | @copying |
17 | Copyright @copyright{} 2001-2018 GNUnet e.V. | 17 | Copyright @copyright{} 2001-2019 GNUnet e.V. |
18 | 18 | ||
19 | Permission is granted to copy, distribute and/or modify this document | 19 | Permission is granted to copy, distribute and/or modify this document |
20 | under the terms of the GNU Free Documentation License, Version 1.3 or | 20 | under the terms of the GNU Free Documentation License, Version 1.3 or |
@@ -72,11 +72,11 @@ This document is the Reference Manual for GNUnet version @value{VERSION}. | |||
72 | 72 | ||
73 | @menu | 73 | @menu |
74 | 74 | ||
75 | * Preface:: Chapter 0 | 75 | * Preface:: Preface |
76 | * Philosophy:: About GNUnet | 76 | * Philosophy:: About GNUnet |
77 | * Key Concepts:: Key concepts of GNUnet | 77 | * Key Concepts:: Key concepts of GNUnet |
78 | @c * Vocabulary:: Vocabulary | 78 | @c * Vocabulary:: Vocabulary |
79 | * Installing GNUnet:: Installing GNUnet | 79 | * Installing GNUnet:: Installing GNUnet |
80 | * Using GNUnet:: Using GNUnet | 80 | * Using GNUnet:: Using GNUnet |
81 | @c * Configuration Handbook:: Configuring GNUnet | 81 | @c * Configuration Handbook:: Configuring GNUnet |
82 | * GNUnet Contributors Handbook:: Contributing to GNUnet | 82 | * GNUnet Contributors Handbook:: Contributing to GNUnet |
@@ -122,9 +122,9 @@ Installing GNUnet | |||
122 | * Create @code{gnunet} user and group:: | 122 | * Create @code{gnunet} user and group:: |
123 | * Preparing and Compiling the Source Code:: | 123 | * Preparing and Compiling the Source Code:: |
124 | * Installation:: | 124 | * Installation:: |
125 | * MOVED FROM USER Checking the Installation:: | 125 | * Checking the Installation:: |
126 | * MOVED FROM USER The graphical configuration interface:: | 126 | * The graphical configuration interface:: |
127 | * MOVED FROM USER Config Leftovers:: | 127 | * Config Leftovers:: |
128 | 128 | ||
129 | Using GNUnet | 129 | Using GNUnet |
130 | 130 | ||
diff --git a/doc/handbook/manual.css b/doc/handbook/manual.css index 404525dc2..0fe08b83c 100644 --- a/doc/handbook/manual.css +++ b/doc/handbook/manual.css | |||
@@ -1,6 +1,6 @@ | |||
1 | /* Style-sheet to use for manuals (copied from Emacs) */ | 1 | /* Style-sheet to use for manuals (copied from Emacs) */ |
2 | 2 | ||
3 | @import url('/style.css'); | 3 | @import url('style.css'); |
4 | 4 | ||
5 | /* makeinfo 6.5 converts @quotation to <blockquote>. Highlight them. */ | 5 | /* makeinfo 6.5 converts @quotation to <blockquote>. Highlight them. */ |
6 | blockquote { | 6 | blockquote { |
diff --git a/doc/handbook/run-gendocs.sh b/doc/handbook/run-gendocs.sh index 5e60a2d0f..e52ae0d23 100755 --- a/doc/handbook/run-gendocs.sh +++ b/doc/handbook/run-gendocs.sh | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | make version.texi/replacement | 3 | make version.texi/replacement |
4 | 4 | ||
5 | ./gendocs.sh --email gnunet-developers@gnu.org gnunet-c-tutorial "GNUnet C Tutorial" -o "manual/gnunet-c-tutorial" | 5 | #./gendocs.sh --email gnunet-developers@gnu.org gnunet-c-tutorial "GNUnet C Tutorial" -o "manual/gnunet-c-tutorial" |
6 | #cd manual | 6 | #cd manual |
7 | #mkdir gnunet-c-tutorial | 7 | #mkdir gnunet-c-tutorial |
8 | #mv * gnunet-c-tutorial/ | 8 | #mv * gnunet-c-tutorial/ |
diff --git a/doc/handbook/style.css b/doc/handbook/style.css index 0c4525437..e5271197b 100644 --- a/doc/handbook/style.css +++ b/doc/handbook/style.css | |||
@@ -1,6 +1,6 @@ | |||
1 | /* This stylesheet is used by manuals and a few older resources. */ | 1 | /* This stylesheet is used by manuals and a few older resources. */ |
2 | 2 | ||
3 | @import url('/reset.css'); | 3 | @import url('reset.css'); |
4 | 4 | ||
5 | 5 | ||
6 | /*** PAGE LAYOUT ***/ | 6 | /*** PAGE LAYOUT ***/ |
diff --git a/doc/man/.gitignore b/doc/man/.gitignore index ffd69e11b..38ed67872 100644 --- a/doc/man/.gitignore +++ b/doc/man/.gitignore | |||
@@ -1 +1,5 @@ | |||
1 | gnunet.conf.5 | 1 | gnunet.conf.5 |
2 | groff_lint.log | ||
3 | *.html | ||
4 | gnunet-c-tutorial.7 | ||
5 | gnunet-documentation.7 | ||
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 53d97b6b9..509e33be7 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am | |||
@@ -5,7 +5,23 @@ do_subst = $(SED) -e 's,[@]SYSCONFDIR[@],$(sysconfdir),g' | |||
5 | gnunet.conf.5: gnunet.conf.5.in Makefile | 5 | gnunet.conf.5: gnunet.conf.5.in Makefile |
6 | $(do_subst) < $(srcdir)/gnunet.conf.5.in > gnunet.conf.5 | 6 | $(do_subst) < $(srcdir)/gnunet.conf.5.in > gnunet.conf.5 |
7 | 7 | ||
8 | CLEANFILES = gnunet.conf.5 | 8 | if TEXI2MDOC_GENERATION |
9 | gnunet-c-tutorial.7: Makefile gnunet-tutorial.7 | ||
10 | @echo generated texi2mdoc output || true | ||
11 | |||
12 | gnunet-tutorial.7: Makefile | ||
13 | $(SH) $(srcdir)/texi2mdoc-generation.sh || true | ||
14 | |||
15 | endif | ||
16 | |||
17 | CLEANFILES = gnunet.conf.5 *.html | ||
18 | |||
19 | if TEXI2MDOC_GENERATION | ||
20 | CLEANFILES += gnunet-documentation.7 gnunet-c-tutorial.7 | ||
21 | endif | ||
22 | |||
23 | html: | ||
24 | $(SH) $(srcdir)/produce_html.sh | ||
9 | 25 | ||
10 | man_MANS = \ | 26 | man_MANS = \ |
11 | gnunet.conf.5 \ | 27 | gnunet.conf.5 \ |
@@ -26,6 +42,7 @@ man_MANS = \ | |||
26 | gnunet-fs.1 \ | 42 | gnunet-fs.1 \ |
27 | gnunet-gns.1 \ | 43 | gnunet-gns.1 \ |
28 | gnunet-gns-proxy.1 \ | 44 | gnunet-gns-proxy.1 \ |
45 | gnunet-gns-proxy-setup-ca.1 \ | ||
29 | gnunet-identity.1 \ | 46 | gnunet-identity.1 \ |
30 | gnunet-cadet.1 \ | 47 | gnunet-cadet.1 \ |
31 | gnunet-namecache.1 \ | 48 | gnunet-namecache.1 \ |
@@ -34,6 +51,7 @@ man_MANS = \ | |||
34 | gnunet-nat.1 \ | 51 | gnunet-nat.1 \ |
35 | gnunet-nat-auto.1 \ | 52 | gnunet-nat-auto.1 \ |
36 | gnunet-nat-server.1 \ | 53 | gnunet-nat-server.1 \ |
54 | gnunet-nse.1 \ | ||
37 | gnunet-peerinfo.1 \ | 55 | gnunet-peerinfo.1 \ |
38 | gnunet-publish.1 \ | 56 | gnunet-publish.1 \ |
39 | gnunet-qr.1 \ | 57 | gnunet-qr.1 \ |
@@ -53,10 +71,15 @@ man_MANS = \ | |||
53 | gnunet-vpn.1 \ | 71 | gnunet-vpn.1 \ |
54 | gnunet-zoneimport.1 | 72 | gnunet-zoneimport.1 |
55 | 73 | ||
74 | if TEXI2MDOC_GENERATION | ||
75 | man_MANS += gnunet-c-tutorial.7 gnunet-documentation.7 | ||
76 | endif | ||
77 | |||
56 | EXTRA_DIST = ${man_MANS} \ | 78 | EXTRA_DIST = ${man_MANS} \ |
57 | gnunet.conf.5.in | 79 | gnunet.conf.5.in \ |
80 | texi2mdoc-generation.sh \ | ||
81 | README | ||
58 | 82 | ||
59 | if TEXI2MDOC_GENERATION | 83 | if TEXI2MDOC_GENERATION |
60 | EXTRA_DIST += gnunet-documentation.7 \ | 84 | EXTRA_DIST += gnunet-documentation.7 gnunet-c-tutorial.7 |
61 | gnunet-c-tutorial.7 | ||
62 | endif | 85 | endif |
diff --git a/doc/man/README b/doc/man/README new file mode 100644 index 000000000..fb95a11f2 --- /dev/null +++ b/doc/man/README | |||
@@ -0,0 +1,8 @@ | |||
1 | Please note that new edits in files which already are in mdoc format | ||
2 | should only be done in mdoc format. | ||
3 | |||
4 | TODO: | ||
5 | |||
6 | * incomplete pages: | ||
7 | - gnunet-timeout | ||
8 | \ No newline at end of file | ||
diff --git a/doc/man/gnunet-arm.1 b/doc/man/gnunet-arm.1 index b17e74a73..c25b10bb5 100644 --- a/doc/man/gnunet-arm.1 +++ b/doc/man/gnunet-arm.1 | |||
@@ -1,78 +1,134 @@ | |||
1 | .TH GNUNET\-ARM 1 "January 4, 2012" "GNUnet" | 1 | .\" This file is part of GNUnet. |
2 | .SH NAME | 2 | .\" Copyright (C) 2001-2019 GNUnet e.V. |
3 | gnunet\-arm \- control GNUnet services | 3 | .\" |
4 | .SH SYNOPSIS | 4 | .\" Permission is granted to copy, distribute and/or modify this document |
5 | .B gnunet\-arm | 5 | .\" under the terms of the GNU Free Documentation License, Version 1.3 or |
6 | .RI [ options ] | 6 | .\" any later version published by the Free Software Foundation; with no |
7 | .SH DESCRIPTION | 7 | .\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A |
8 | \fBgnunet\-arm\fP can be used to start or stop GNUnet services, including | 8 | .\" copy of the license is included in the file |
9 | the ARM service itself. The ARM service is a supervisor for GNUnet's | 9 | .\" ``FDL-1.3''. |
10 | service processes. ARM starts services on-demand or as configured and | 10 | .\" |
11 | re-starts them if they crash. | 11 | .\" A copy of the license is also available from the Free Software |
12 | .SH OPTIONS | 12 | .\" Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}. |
13 | .B | 13 | .\" |
14 | .IP "\-c FILENAME, \-\-config=FILENAME" | 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 @url{http://www.gnu.org/licenses/gpl.html}. | ||
21 | .\" | ||
22 | .\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later | ||
23 | .\" | ||
24 | .Dd January 4, 2012 | ||
25 | .Dt GNUNET-ARM 1 | ||
26 | .Os | ||
27 | .Sh NAME | ||
28 | .Nm gnunet-arm | ||
29 | .Nd | ||
30 | control GNUnet services | ||
31 | .Sh SYNOPSIS | ||
32 | .Nm | ||
33 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
34 | .Op Fl d | \-delete | ||
35 | .Op Fl e | \-end | ||
36 | .Op Fl E | \-no-stderr | ||
37 | .Op Fl h | \-help | ||
38 | .Op Fl i Ar SERVICE | Fl \-init= Ns Ar SERVICE | ||
39 | .Op Fl I | \-info | ||
40 | .Op Fl k Ar SERVICE | Fl \-kill= Ns Ar SERVICE | ||
41 | .Op Fl l Ar FILENAME | Fl \-logfile= Ns Ar FILENAME | ||
42 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL | ||
43 | .Op Fl m | \-monitor | ||
44 | .Op Fl O | \-no-stdout | ||
45 | .Op Fl q | \-quiet | ||
46 | .Op Fl r | \-restart | ||
47 | .Op Fl s | \-start | ||
48 | .Op Fl T DELAY | \-timeout= Ns Ar TIMEOUT | ||
49 | .Op Fl v | \-version | ||
50 | .Sh DESCRIPTION | ||
51 | .Nm | ||
52 | can be used to start or stop GNUnet services, including the ARM service itself. | ||
53 | The ARM service is a supervisor for GNUnet's service processes. | ||
54 | ARM starts services on-demand or as configured and restarts them if they crash. | ||
55 | .Bl -tag -width Ds | ||
56 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
15 | Use the configuration file FILENAME. | 57 | Use the configuration file FILENAME. |
16 | .B | 58 | .It Fl d | \-delete |
17 | .IP "\-e, \-\-end" | 59 | Delete config file and directory on exit. |
18 | Shutdown all GNUnet services (including ARM itself). Running | 60 | .It Fl e | \-end |
19 | "gnunet-arm \-e" is the usual way to shutdown a GNUnet peer. | 61 | Shutdown all GNUnet services (including ARM itself). |
20 | .B | 62 | Running "gnunet-arm \-e" is the usual way to shutdown a GNUnet peer. |
21 | .IP "\-h, \-\-help" | 63 | .It Fl E | \-no-stderr |
64 | Don't let gnunet-arm inherit standard error. | ||
65 | .It Fl h | \-help | ||
22 | Print short help on options. | 66 | Print short help on options. |
23 | .B | 67 | .It Fl i Ar SERVICE | Fl \-init= Ns Ar SERVICE |
24 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 68 | Starts the specified SERVICE if it is not already running. |
25 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 69 | More specifically, this makes the service behave as if it were in the default services list. |
26 | .B | 70 | .It Fl I | \-info |
27 | .IP "\-i SERVICE, \-\-init=SERVICE" | ||
28 | Starts the specified SERVICE if it is not already running. More specifically, | ||
29 | this makes the service behave as if it were in the default services list. | ||
30 | .B | ||
31 | .IP "\-k SERVICE, \-\-kill=SERVICE" | ||
32 | Stop the specified SERVICE if it is running. While this will kill the service | ||
33 | right now, the service may be restarted immediately if other services depend | ||
34 | on it (service is then started 'on-demand'). If the service used to be a 'default' | ||
35 | service, its default-service status will be revoked. If the | ||
36 | service was not a default service, it will just be (temporarily) stopped, | ||
37 | but could be re-started on-demand at any time. | ||
38 | .B | ||
39 | .IP "\-m, \-\-monitor" | ||
40 | Monitor service activity of ARM. In this mode, the command will not terminate | ||
41 | until the user presses CTRL-C. | ||
42 | .B | ||
43 | .IP "\-s, \-\-start" | ||
44 | Start all GNUnet default services on this system (and also ARM). Naturally, | ||
45 | if a service is demanded by a default service, it will then also be started. | ||
46 | Running "gnunet-arm \-s" is the usual way to start a GNUnet peer. | ||
47 | .B | ||
48 | .IP "\-I, \-\-info" | ||
49 | List all running services. | 71 | List all running services. |
50 | .B | 72 | .It Fl k Ar SERVICE | Fl \-kill= Ns Ar SERVICE |
51 | .IP "\-v, \-\-version" | 73 | Stop the specified SERVICE if it is running. |
74 | While this will kill the service right now, the service may be restarted immediately if other services depend on it (service is then started 'on-demand'). | ||
75 | If the service used to be a 'default' service, its default-service status will be revoked. | ||
76 | If the service was not a default service, it will just be (temporarily) stopped, but could be re-started on-demand at any time. | ||
77 | .It Fl l Ar FILENAME | Fl \-logfile= Ns Ar FILENAME | ||
78 | Write logs to FILENAME. | ||
79 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL | ||
80 | Use LOGLEVEL for logging. | ||
81 | Valid values are DEBUG, INFO, WARNING and ERROR. | ||
82 | .It Fl m | \-monitor | ||
83 | Monitor service activity of ARM. | ||
84 | In this mode, the command will not terminate until the user presses CTRL-C. | ||
85 | .It Fl O | \-no-stdout | ||
86 | Don't let gnunet-arm inherit standard output | ||
87 | .It Fl q | \-quiet | ||
88 | Don't print status messages. | ||
89 | .It Fl r | \-restart | ||
90 | Stop and start all GNUnet default services. | ||
91 | .It Fl s | \-start | ||
92 | Start all GNUnet default services on this system (and also ARM). | ||
93 | Naturally, if a service is demanded by a default service, it will then also be started. | ||
94 | Running "gnunet-arm \-s" is the usual way to start a GNUnet peer. | ||
95 | .It Fl T DELAY | \-timeout= Ns Ar DELAY | ||
96 | Exit with error status if operation does not finish after DELAY | ||
97 | .It Fl v | \-version | ||
52 | Print GNUnet version number. | 98 | Print GNUnet version number. |
53 | .SH BUGS | 99 | .El |
54 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 100 | .Sh EXAMPLES |
55 | electronic mail to <gnunet\-developers@gnu.org> | 101 | Start the gnunet-arm for the user: |
56 | .SH SEE ALSO | 102 | .Pp |
57 | gnunet\-config(1), gnunet\-setup(1) | 103 | .Dl gnunet-arm -s |
58 | .PP | 104 | .Pp |
59 | The full documentation for | 105 | Stop the gnunet-arm for the user: |
60 | .B gnunet | 106 | .Pp |
61 | is maintained as a Texinfo manual. | 107 | .Dl $ gnunet-arm -e |
108 | .Sh SEE ALSO | ||
109 | .Xr gnunet-config 1 , | ||
110 | .Xr gnunet-setup 1 | ||
111 | .sp | ||
112 | The full documentation for gnunet is maintained as a Texinfo manual. | ||
62 | If the | 113 | If the |
63 | .B info | 114 | .Xr info 1 |
64 | and | 115 | and gnunet programs are properly installed at your site, the command |
65 | .B gnunet | 116 | .Pp |
66 | programs are properly installed at your site, the command | 117 | .Dl info gnunet |
67 | .IP | 118 | .Pp |
68 | .B info gnunet | ||
69 | .PP | ||
70 | should give you access to the complete handbook, | 119 | should give you access to the complete handbook, |
71 | .IP | 120 | .Pp |
72 | .B info gnunet-c-tutorial | 121 | .Dl info gnunet-c-tutorial |
73 | .PP | 122 | .Pp |
74 | will give you access to a tutorial for developers. | 123 | will give you access to a tutorial for developers. |
75 | .PP | 124 | .sp |
76 | Depending on your installation, this information is also | 125 | Depending on your installation, this information is also available in |
77 | available in | 126 | .Xr gnunet 7 and |
78 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 127 | .Xr gnunet-c-tutorial 7 . |
128 | .\".Sh HISTORY | ||
129 | .\".Sh AUTHORS | ||
130 | .Sh BUGS | ||
131 | Report bugs by using | ||
132 | .Lk https://bugs.gnunet.org | ||
133 | or by sending electronic mail to | ||
134 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-ats.1 b/doc/man/gnunet-ats.1 index c098ed576..1e7b7731c 100644 --- a/doc/man/gnunet-ats.1 +++ b/doc/man/gnunet-ats.1 | |||
@@ -1,85 +1,110 @@ | |||
1 | .TH GNUNET\-ATS 1 "October 16, 2015" "GNUnet" | 1 | .\" This file is part of GNUnet. |
2 | .SH NAME | 2 | .\" Copyright (C) 2001-2019 GNUnet e.V. |
3 | gnunet\-ats \- display information about transport resource allocation | 3 | .\" |
4 | .SH SYNOPSIS | 4 | .\" Permission is granted to copy, distribute and/or modify this document |
5 | .B gnunet\-ats | 5 | .\" under the terms of the GNU Free Documentation License, Version 1.3 or |
6 | .RI [ options ] | 6 | .\" any later version published by the Free Software Foundation; with no |
7 | .br | 7 | .\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A |
8 | .SH DESCRIPTION | 8 | .\" copy of the license is included in the file |
9 | \fBgnunet\-ats\fP can be used to display information about the GNUnet's | 9 | .\" ``FDL-1.3''. |
10 | transport selection mechanism. It shows information about the | 10 | .\" |
11 | addresses and the assigned input and output bandwidth. | 11 | .\" A copy of the license is also available from the Free Software |
12 | .SH OPTIONS | 12 | .\" Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}. |
13 | .B | 13 | .\" |
14 | .IP "\-a, \-\-aa" | 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 @url{http://www.gnu.org/licenses/gpl.html}. | ||
21 | .\" | ||
22 | .\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later | ||
23 | .\" | ||
24 | .Dd October 16, 2015 | ||
25 | .Dt GNUNET-ATS 1 | ||
26 | .Os | ||
27 | .Sh NAME | ||
28 | .Nm gnunet-ats | ||
29 | .Nd | ||
30 | display information about transport resource allocation | ||
31 | .Sh SYNOPSIS | ||
32 | .Nm | ||
33 | .Op Fl a | \-all | ||
34 | .Op Fl C Ar PEERID | Fl \-connect= Ns Ar PEERID | ||
35 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
36 | .Op Fl h | \-help | ||
37 | .Op Fl i Ar PEERID | Fl \-id= Ns Ar PEERID | ||
38 | .Op Fl k Ar VALUE | Fl \-value= Ns Ar VALUE | ||
39 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL | ||
40 | .Op Fl m | \-monitor | ||
41 | .Op Fl n | \-numeric | ||
42 | .Op Fl p Ar PREFERENCE | Fl \-preference= Ns Ar PREFERENCE | ||
43 | .Op Fl q | \-quotas | ||
44 | .Op Fl t Ar TYPE | Fl \-type= Ns Ar TYPE | ||
45 | .Op Fl u | \-used | ||
46 | .Op Fl V | \-verbose | ||
47 | .Op Fl v | \-version | ||
48 | .Sh DESCRIPTION | ||
49 | .Nm | ||
50 | can be used to display information about the GNUnet's transport selection mechanism. | ||
51 | It shows information about the addresses and the assigned input and output bandwidth. | ||
52 | .Sh OPTIONS | ||
53 | .Bl -tag -width Ds | ||
54 | .It Fl a | \-all | ||
15 | List all addresses currently known to ats. | 55 | List all addresses currently known to ats. |
16 | .B | 56 | .It Fl C Ar PEERID | Fl \-connect= Ns Ar PEERID |
17 | .IP "\-c FILENAME, \-\-config=FILENAME" | 57 | Ask ATS to suggest an address for PEERID to transport to establish a connection. |
58 | Note that you can use the gnunet-transport commandline tool to force disconnects. | ||
59 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
18 | Use the configuration file FILENAME. | 60 | Use the configuration file FILENAME. |
19 | .B | 61 | .It Fl h | \-help |
20 | .IP "\-C, \-\-connect=PEERID" | ||
21 | Ask ATS to suggest an address for PEERID to transport to establish a | ||
22 | connection. | ||
23 | Note that you can use the gnunet\-transport command\-line tool to | ||
24 | force disconnects. | ||
25 | .B | ||
26 | .IP "\-h, \-\-help" | ||
27 | Print short help on options. | 62 | Print short help on options. |
28 | .B | 63 | .It Fl i Ar PEERID | Fl \-id= Ns Ar PEERID |
29 | .IP "\-i, \-\-id=PEERID" | 64 | Print information for a specific peer identity only. |
30 | Print information for a specific peer identity only | 65 | .It Fl k Ar VALUE | Fl \-value= Ns Ar VALUE |
31 | .B | 66 | Value to set for when changing preference values. |
32 | .IP "\-k, \-\-value=VALUE" | 67 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
33 | Value to set for when changing preference values | ||
34 | .B | ||
35 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | ||
36 | Use LOGLEVEL for logging. | 68 | Use LOGLEVEL for logging. |
37 | Valid values are DEBUG, INFO, WARNING and ERROR. | 69 | Valid values are DEBUG, INFO, WARNING and ERROR. |
38 | .B | 70 | .It Fl m | \-monitor |
39 | .IP "\-m, \-\-monitor" | 71 | Monitor changes to the bandwidth assignments continuously. |
40 | Monitor changes to the bandwidth assignments continuously | 72 | .It Fl n | \-numeric |
41 | .B | 73 | Do not resolve IP addresses to hostnames. |
42 | .IP "\-n, \-\-numeric" | 74 | .It Fl p Ar PREFERENCE | Fl \-preference= Ns Ar PREFERENCE |
43 | Do not resolve IP addresses to hostnames | 75 | Set preference values, -i, -k and -t required. |
44 | .B | 76 | .It Fl q | \-quotas |
45 | .IP "\-k, \-\-preference=E" | ||
46 | Set preference values, \-i, \-k and \-t required | ||
47 | .B | ||
48 | .IP "\-q, \-\-quotas" | ||
49 | Print quotas for all network types | 77 | Print quotas for all network types |
50 | .B | 78 | .It Fl t Ar TYPE | Fl \-type= Ns Ar TYPE |
51 | .IP "\-t, \-\-type=VALUE" | ||
52 | Preference type to change: latency | bandwidth | 79 | Preference type to change: latency | bandwidth |
53 | .B | 80 | .It Fl u | \-used |
54 | .IP "\-u, \-\-used" | ||
55 | Print addresses actively used only | 81 | Print addresses actively used only |
56 | .B | 82 | .It Fl V | \-verbose |
57 | .IP "\-V, \-\-verbose" | ||
58 | Print verbose output (include ATS address properties) | 83 | Print verbose output (include ATS address properties) |
59 | .B | 84 | .It v | \-version |
60 | .IP "\-v, \-\-version" | ||
61 | Print GNUnet version number. | 85 | Print GNUnet version number. |
62 | .SH BUGS | 86 | .El |
63 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 87 | .Sh SEE ALSO |
64 | electronic mail to <bug\-gnunet@gnu.org> | 88 | .Xr gnunet-transport 1 |
65 | .SH SEE ALSO | 89 | .sp |
66 | gnunet\-transport(1) | 90 | The full documentation for gnunet is maintained as a Texinfo manual. |
67 | The full documentation for | 91 | If the |
68 | .B gnunet | 92 | .Xr info 1 |
69 | is maintained as a Texinfo manual. If the | 93 | and gnunet programs are properly installed at your site, the command |
70 | .B info | 94 | .Pp |
71 | and | 95 | .Dl info gnunet |
72 | .B gnunet | 96 | .Pp |
73 | programs are properly installed at your site, the command | ||
74 | .IP | ||
75 | .B info gnunet | ||
76 | .PP | ||
77 | should give you access to the complete handbook, | 97 | should give you access to the complete handbook, |
78 | .IP | 98 | .Pp |
79 | .B info gnunet-c-tutorial | 99 | .Dl info gnunet-c-tutorial |
80 | .PP | 100 | .Pp |
81 | will give you access to a tutorial for developers. | 101 | will give you access to a tutorial for developers. |
82 | .PP | 102 | .Pp |
83 | Depending on your installation, this information is also | 103 | Depending on your installation, this information is also available in |
84 | available in | 104 | .Xr gnunet 7 and |
85 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 105 | .Xr gnunet-c-tutorial 7 . |
106 | .Sh BUGS | ||
107 | Report bugs by using | ||
108 | .Lk https://bugs.gnunet.org | ||
109 | or by sending electronic mail to | ||
110 | .Aq Mt bug-gnunet@gnu.org . | ||
diff --git a/doc/man/gnunet-bcd.1 b/doc/man/gnunet-bcd.1 index 02b4397de..9b37a097b 100644 --- a/doc/man/gnunet-bcd.1 +++ b/doc/man/gnunet-bcd.1 | |||
@@ -13,19 +13,14 @@ installed. If it does not work for you, try installing the full | |||
13 | TeXLive distribution first, for example using the package\-manager | 13 | TeXLive distribution first, for example using the package\-manager |
14 | apt: "apt-get install texlive-full". | 14 | apt: "apt-get install texlive-full". |
15 | .SH OPTIONS | 15 | .SH OPTIONS |
16 | .B | ||
17 | .IP "\-p PORT, \-\-port=PORT" | 16 | .IP "\-p PORT, \-\-port=PORT" |
18 | Run the HTTP server on port PORT. | 17 | Run the HTTP server on port PORT. |
19 | .B | ||
20 | .IP "\-c FILENAME, \-\-config=FILENAME" | 18 | .IP "\-c FILENAME, \-\-config=FILENAME" |
21 | Use the configuration file FILENAME. | 19 | Use the configuration file FILENAME. |
22 | .B | ||
23 | .IP "\-h, \-\-help" | 20 | .IP "\-h, \-\-help" |
24 | Print short help on options. | 21 | Print short help on options. |
25 | .B | ||
26 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 22 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
27 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 23 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. |
28 | .B | ||
29 | .IP "\-v, \-\-version" | 24 | .IP "\-v, \-\-version" |
30 | Print GNUnet version number. | 25 | Print GNUnet version number. |
31 | .SH BUGS | 26 | .SH BUGS |
diff --git a/doc/man/gnunet-cadet.1 b/doc/man/gnunet-cadet.1 index 8404f085c..44d7fffca 100644 --- a/doc/man/gnunet-cadet.1 +++ b/doc/man/gnunet-cadet.1 | |||
@@ -21,42 +21,30 @@ For one\-to\-many communication \fBgnunet\-social\fP may be better | |||
21 | suited, however. | 21 | suited, however. |
22 | 22 | ||
23 | .SH SPECIFIC OPTIONS | 23 | .SH SPECIFIC OPTIONS |
24 | .B | ||
25 | .IP "\-C CONNECTION_ID, \-\-connection=CONNECTION_ID" | 24 | .IP "\-C CONNECTION_ID, \-\-connection=CONNECTION_ID" |
26 | Provide information about a particular connection. | 25 | Provide information about a particular connection. |
27 | .B | ||
28 | .IP "\-d, \-\-dump" | 26 | .IP "\-d, \-\-dump" |
29 | Dump debug information to STDERR. | 27 | Dump debug information to STDERR. |
30 | .B | ||
31 | .IP "\-e, \-\-echo" | 28 | .IP "\-e, \-\-echo" |
32 | Activate echo mode. | 29 | Activate echo mode. |
33 | .B | ||
34 | .IP "\-o SHARED_SECRET, \-\-open-port=SHARED_SECRET" | 30 | .IP "\-o SHARED_SECRET, \-\-open-port=SHARED_SECRET" |
35 | Listen for connections using a shared secret among sender and recipient. | 31 | Listen for connections using a shared secret among sender and recipient. |
36 | .B | ||
37 | .IP "\-p PEER_ID, \-\-peer=PEER_ID" | 32 | .IP "\-p PEER_ID, \-\-peer=PEER_ID" |
38 | Provide information about a patricular peer. | 33 | Provide information about a patricular peer. |
39 | .B | ||
40 | .IP "\-P, \-\-peers" | 34 | .IP "\-P, \-\-peers" |
41 | Provide information about all peers. | 35 | Provide information about all peers. |
42 | .B | ||
43 | .IP "\-T, \-\-tunnels" | 36 | .IP "\-T, \-\-tunnels" |
44 | Provide information about all tunnels. | 37 | Provide information about all tunnels. |
45 | 38 | ||
46 | .SH STANDARD OPTIONS | 39 | .SH STANDARD OPTIONS |
47 | .B | ||
48 | .IP "\-c FILENAME, \-\-config=FILENAME" | 40 | .IP "\-c FILENAME, \-\-config=FILENAME" |
49 | Use the configuration file FILENAME. | 41 | Use the configuration file FILENAME. |
50 | .B | ||
51 | .IP "\-h, \-\-help" | 42 | .IP "\-h, \-\-help" |
52 | Print short help on options. | 43 | Print short help on options. |
53 | .B | ||
54 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" | 44 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" |
55 | Configure logging to write logs to LOGFILE. | 45 | Configure logging to write logs to LOGFILE. |
56 | .B | ||
57 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 46 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
58 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 47 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. |
59 | .B | ||
60 | .IP "\-v, \-\-version" | 48 | .IP "\-v, \-\-version" |
61 | Print GNUnet version number. | 49 | Print GNUnet version number. |
62 | 50 | ||
diff --git a/doc/man/gnunet-config.1 b/doc/man/gnunet-config.1 index f1443283f..8eca8de10 100644 --- a/doc/man/gnunet-config.1 +++ b/doc/man/gnunet-config.1 | |||
@@ -7,38 +7,28 @@ gnunet\-config \- manipulate GNUnet configuration files | |||
7 | .SH DESCRIPTION | 7 | .SH DESCRIPTION |
8 | \fBgnunet\-config\fP can be used to read or modify GNUnet configuration files. | 8 | \fBgnunet\-config\fP can be used to read or modify GNUnet configuration files. |
9 | .SH OPTIONS | 9 | .SH OPTIONS |
10 | .B | ||
11 | .IP "\-f, \-\-filename" | 10 | .IP "\-f, \-\-filename" |
12 | When accessing a specific option using \-s and \-o, perform expansions as if the | 11 | Try to perform expansions as if the option values represent filenames (will |
13 | value represents a filename. | 12 | also be applied even if the option is not really a filename). |
14 | .B | ||
15 | .IP "\-s SECTION, \-\-section=SECTION" | 13 | .IP "\-s SECTION, \-\-section=SECTION" |
16 | Which configuration section should be accessed or edited. Required option. | 14 | Which configuration section should be accessed or edited. Required option. |
17 | .B | ||
18 | .IP "\-S, \-\-list\-sections" | 15 | .IP "\-S, \-\-list\-sections" |
19 | List available configuration sections for use with \-\-section. | 16 | List available configuration sections for use with \-\-section. |
20 | .B | ||
21 | .IP "\-W, \-\-rewrite" | 17 | .IP "\-W, \-\-rewrite" |
22 | Consider differences to defaults only. | 18 | Consider differences to defaults only. |
23 | .B | ||
24 | .IP "\-o OPTION, \-\-option=OPTION" | 19 | .IP "\-o OPTION, \-\-option=OPTION" |
25 | Which configuration option should be accessed or edited. Required to set a value. | 20 | Which configuration option should be accessed or edited. Required to set a value. |
26 | If not given, all values of a given section will be printed in the | 21 | If not given, all values of a given section will be printed in the |
27 | format "OPTION = VALUE". | 22 | format "OPTION = VALUE". |
28 | .B | ||
29 | .IP "\-V VALUE, \-\-value VALUE" | 23 | .IP "\-V VALUE, \-\-value VALUE" |
30 | Configuration value to store in the given section under the given option. | 24 | Configuration value to store in the given section under the given option. |
31 | Must only be given together with \-s and \-o options. | 25 | Must only be given together with \-s and \-o options. |
32 | .B | ||
33 | .IP "\-c FILENAME, \-\-config=FILENAME" | 26 | .IP "\-c FILENAME, \-\-config=FILENAME" |
34 | Use the configuration file FILENAME. | 27 | Use the configuration file FILENAME. |
35 | .B | ||
36 | .IP "\-h, \-\-help" | 28 | .IP "\-h, \-\-help" |
37 | Print short help on options. | 29 | Print short help on options. |
38 | .B | ||
39 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 30 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
40 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 31 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. |
41 | .B | ||
42 | .IP "\-v, \-\-version" | 32 | .IP "\-v, \-\-version" |
43 | Print GNUnet version number. | 33 | Print GNUnet version number. |
44 | .SH BUGS | 34 | .SH BUGS |
diff --git a/doc/man/gnunet-conversation-test.1 b/doc/man/gnunet-conversation-test.1 index 5c08d3dab..477da5042 100644 --- a/doc/man/gnunet-conversation-test.1 +++ b/doc/man/gnunet-conversation-test.1 | |||
@@ -17,17 +17,13 @@ known to your computer). | |||
17 | You can use gnunet\-conversation\-test without having a peer running | 17 | You can use gnunet\-conversation\-test without having a peer running |
18 | on your computer. | 18 | on your computer. |
19 | .SH OPTIONS | 19 | .SH OPTIONS |
20 | .B | ||
21 | .IP "\-c FILENAME, \-\-config=FILENAME" | 20 | .IP "\-c FILENAME, \-\-config=FILENAME" |
22 | Use the configuration file FILENAME. | 21 | Use the configuration file FILENAME. |
23 | .B | ||
24 | .IP "\-h, \-\-help" | 22 | .IP "\-h, \-\-help" |
25 | Print short help on options. | 23 | Print short help on options. |
26 | .B | ||
27 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 24 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
28 | Use LOGLEVEL for logging. | 25 | Use LOGLEVEL for logging. |
29 | Valid values are DEBUG, INFO, WARNING and ERROR. | 26 | Valid values are DEBUG, INFO, WARNING and ERROR. |
30 | .B | ||
31 | .IP "\-v, \-\-version" | 27 | .IP "\-v, \-\-version" |
32 | Print GNUnet version number. | 28 | Print GNUnet version number. |
33 | .SH BUGS | 29 | .SH BUGS |
diff --git a/doc/man/gnunet-conversation.1 b/doc/man/gnunet-conversation.1 index 5925871da..3815b3887 100644 --- a/doc/man/gnunet-conversation.1 +++ b/doc/man/gnunet-conversation.1 | |||
@@ -15,25 +15,19 @@ your zone in the GNU Name System (using gnunet\-namestore). | |||
15 | gnunet\-conversation has an interactive help system via the /help | 15 | gnunet\-conversation has an interactive help system via the /help |
16 | command. | 16 | command. |
17 | .SH OPTIONS | 17 | .SH OPTIONS |
18 | .B | ||
19 | .IP "\-c FILENAME, \-\-config=FILENAME" | 18 | .IP "\-c FILENAME, \-\-config=FILENAME" |
20 | Use the configuration file FILENAME. | 19 | Use the configuration file FILENAME. |
21 | .B | ||
22 | .IP "\-e NAME, \-\-ego=NAME" | 20 | .IP "\-e NAME, \-\-ego=NAME" |
23 | Specifies the NAME of the ego to use (for caller ID). | 21 | Specifies the NAME of the ego to use (for caller ID). |
24 | .B | ||
25 | .IP "\-h, \-\-help" | 22 | .IP "\-h, \-\-help" |
26 | Print short help on options. | 23 | Print short help on options. |
27 | .B | ||
28 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 24 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
29 | Use LOGLEVEL for logging. | 25 | Use LOGLEVEL for logging. |
30 | Valid values are DEBUG, INFO, WARNING and ERROR. | 26 | Valid values are DEBUG, INFO, WARNING and ERROR. |
31 | .B | ||
32 | .IP "\-p LINE, \-\-phone=LINE" | 27 | .IP "\-p LINE, \-\-phone=LINE" |
33 | Optional argument that can be used to specify the phone LINE to be used with | 28 | Optional argument that can be used to specify the phone LINE to be used with |
34 | the conversation service. | 29 | the conversation service. |
35 | The default LINE is zero, which should be fine for most users. | 30 | The default LINE is zero, which should be fine for most users. |
36 | .B | ||
37 | .IP "\-v, \-\-version" | 31 | .IP "\-v, \-\-version" |
38 | Print GNUnet version number. | 32 | Print GNUnet version number. |
39 | .SH BUGS | 33 | .SH BUGS |
diff --git a/doc/man/gnunet-dns2gns.1 b/doc/man/gnunet-dns2gns.1 index 552df25b6..f61a0a8b3 100644 --- a/doc/man/gnunet-dns2gns.1 +++ b/doc/man/gnunet-dns2gns.1 | |||
@@ -1,60 +1,60 @@ | |||
1 | .TH GNUNET\-DNS2GNS 1 "March 5, 2018" "GNUnet" | 1 | .Dd March 5, 2018 |
2 | 2 | .Dt GNUNET-DNS2GNS 1 | |
3 | .SH NAME | 3 | .Os |
4 | gnunet\-dns2gns \- run a DNS-to-GNS proxy | 4 | .Sh NAME |
5 | 5 | .Nm gnunet-dns2gns | |
6 | .SH SYNOPSIS | 6 | .Nd |
7 | .B gnunet\-dns2gns | 7 | run a DNS-to-GNS proxy |
8 | .RI [ options ] | 8 | .Sh SYNOPSIS |
9 | .br | 9 | .Nm |
10 | 10 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | |
11 | .SH DESCRIPTION | 11 | .Op Fl d Ar IP | Fl \-dns= Ns Ar IP |
12 | Most users will not want to run an DNS to GNS proxy/gateway and thus will not | 12 | .Op Fl h | \-help |
13 | need this program. | 13 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
14 | 14 | .Op Fl v | \-version | |
15 | \fBgnunet\-dns2gns\fP runs a DNS resolver which delegates requests GNS if | 15 | .Sh DESCRIPTION |
16 | the TLD matches one configured for GNS. All other requests are forwarded | 16 | .Nm |
17 | to DNS. This DNS proxy is useful for enabling non-personalized | 17 | runs a DNS resolver which delegates requests GNS if the TLD matches one configured for GNS. |
18 | GNS\-resolution to an entire network or to offer GNS\-resolution to DNS users. | 18 | All other requests are forwarded to DNS. |
19 | 19 | This DNS proxy is useful for enabling non-personalized GNS\-resolution to an entire network or to offer GNS\-resolution to DNS users. | |
20 | .SH OPTIONS | 20 | .Bl -tag -width Ds |
21 | .B | 21 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
22 | .IP "\-c FILENAME, \-\-config=FILENAME" | ||
23 | Use the configuration file FILENAME. | 22 | Use the configuration file FILENAME. |
24 | .B | 23 | .It Fl d Ar IP | Fl \-dns= Ns Ar IP |
25 | .IP "\-d IP, \-\-dns=IP" | ||
26 | IP address of a recursive DNS resolver that should be used for non-GADS hostnames. | 24 | IP address of a recursive DNS resolver that should be used for non-GADS hostnames. |
27 | .B | 25 | .It Fl h | \-help |
28 | .IP "\-h, \-\-help" | ||
29 | Print short help on options. | 26 | Print short help on options. |
30 | .B | 27 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
31 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 28 | Use LOGLEVEL for logging. |
32 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 29 | Valid values are DEBUG, INFO, WARNING and ERROR. |
33 | .B | 30 | .It Fl v | \-version |
34 | .IP "\-v, \-\-version" | ||
35 | Print GNUnet version number. | 31 | Print GNUnet version number. |
36 | 32 | .El | |
37 | .SH BUGS | 33 | .Sh SEE ALSO |
38 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 34 | .Xr gnunet-gns-fcfs 1 , |
39 | electronic mail to <bug\-gnunet@gnu.org> | 35 | .Xr gnunet-gns 1 , |
40 | .SH SEE ALSO | 36 | .Xr gnunet-identity 1 |
41 | gnunet\-gns\-fcfs(1), gnunet\-gns(1), gnunet\-identity(1) | 37 | .sp |
42 | The full documentation for | 38 | The full documentation for gnunet is maintained as a Texinfo manual. |
43 | .B gnunet | 39 | If the |
44 | is maintained as a Texinfo manual. If the | 40 | .Xr info 1 |
45 | .B info | 41 | and gnunet programs are properly installed at your site, the command |
46 | and | 42 | .Pp |
47 | .B gnunet | 43 | .Dl info gnunet |
48 | programs are properly installed at your site, the command | 44 | .Pp |
49 | .IP | ||
50 | .B info gnunet | ||
51 | .PP | ||
52 | should give you access to the complete handbook, | 45 | should give you access to the complete handbook, |
53 | .IP | 46 | .Pp |
54 | .B info gnunet-c-tutorial | 47 | .Dl info gnunet-c-tutorial |
55 | .PP | 48 | .Pp |
56 | will give you access to a tutorial for developers. | 49 | will give you access to a tutorial for developers. |
57 | .PP | 50 | .sp |
58 | Depending on your installation, this information is also | 51 | Depending on your installation, this information is also available in |
59 | available in | 52 | .Xr gnunet 7 and |
60 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 53 | .Xr gnunet-c-tutorial 7 . |
54 | .\".Sh HISTORY | ||
55 | .\".Sh AUTHORS | ||
56 | .Sh BUGS | ||
57 | Report bugs by using | ||
58 | .Lk https://bugs.gnunet.org | ||
59 | or by sending electronic mail to | ||
60 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-ecc.1 b/doc/man/gnunet-ecc.1 index aedc0bc49..2aa7743b2 100644 --- a/doc/man/gnunet-ecc.1 +++ b/doc/man/gnunet-ecc.1 | |||
@@ -17,33 +17,25 @@ take a while. If the option \-p is given, the corresponding public | |||
17 | key will be printed to the console. | 17 | key will be printed to the console. |
18 | 18 | ||
19 | .SH OPTIONS | 19 | .SH OPTIONS |
20 | .B | ||
21 | .IP "\-g COUNT, \-\-generate-keys=COUNT" | 20 | .IP "\-g COUNT, \-\-generate-keys=COUNT" |
22 | Create COUNT public-private key pairs and write them to FILENAME. | 21 | Create COUNT public-private key pairs and write them to FILENAME. |
23 | Used for creating a file for testing. | 22 | Used for creating a file for testing. |
24 | .B | ||
25 | .IP "\-p, \-\-print-public-key" | 23 | .IP "\-p, \-\-print-public-key" |
26 | Print the corresponding public key to stdout. This is the value used | 24 | Print the corresponding public key to stdout. This is the value used |
27 | for PKEY records in GNS. | 25 | for PKEY records in GNS. |
28 | .B | ||
29 | .IP "\-P, \-\-print-private-key" | 26 | .IP "\-P, \-\-print-private-key" |
30 | Print the corresponding private key to stdout. This is the value used | 27 | Print the corresponding private key to stdout. This is the value used |
31 | for PKEY records in GNS. | 28 | for PKEY records in GNS. |
32 | .B | ||
33 | .IP "\-x, \-\-print-hex" | 29 | .IP "\-x, \-\-print-hex" |
34 | Print the corresponding public key to stdout in HEX format. Useful | 30 | Print the corresponding public key to stdout in HEX format. Useful |
35 | for comparing to Ed25519 keys in X.509 tools. | 31 | for comparing to Ed25519 keys in X.509 tools. |
36 | .B | ||
37 | .IP "\-c FILENAME, \-\-config=FILENAME" | 32 | .IP "\-c FILENAME, \-\-config=FILENAME" |
38 | Use the configuration file FILENAME. | 33 | Use the configuration file FILENAME. |
39 | .B | ||
40 | .IP "\-h, \-\-help" | 34 | .IP "\-h, \-\-help" |
41 | Print short help on options. | 35 | Print short help on options. |
42 | .B | ||
43 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 36 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
44 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and | 37 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and |
45 | ERROR. | 38 | ERROR. |
46 | .B | ||
47 | .IP "\-v, \-\-version" | 39 | .IP "\-v, \-\-version" |
48 | Print GNUnet version number. | 40 | Print GNUnet version number. |
49 | 41 | ||
diff --git a/doc/man/gnunet-gns-proxy-setup-ca.1 b/doc/man/gnunet-gns-proxy-setup-ca.1 new file mode 100644 index 000000000..54df856eb --- /dev/null +++ b/doc/man/gnunet-gns-proxy-setup-ca.1 | |||
@@ -0,0 +1,64 @@ | |||
1 | .Dd March 6, 2019 | ||
2 | .Dt GNUNET-GNS-PROXY-SETUP-CA 1 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm gnunet-gns-proxy-setup-ca | ||
6 | .Nd generate an X509 certificate for gnunet-gns-proxy and install it | ||
7 | .Sh SYNOPSIS | ||
8 | .Nm | ||
9 | .Op Fl c Ar FILE | ||
10 | .\".Op Fl f Ar FILE | ||
11 | .Op Fl h | ||
12 | .Op Fl v | ||
13 | .Op Fl V | ||
14 | .Sh DESCRIPTION | ||
15 | .Nm | ||
16 | is a shell script to generate X509 certificates for your gnunet-gns-proxy and to install it for both GNUnet and your web browser. | ||
17 | It currently supports Firefox and Chrome based browsers through the help of external helpers: certutil (nss) is used for the import into webbrowsers, openssl is used to generated the CA. | ||
18 | .Bl -tag -width Ds | ||
19 | .It Fl c Ar FILE | ||
20 | Use the configuration file FILE. | ||
21 | .\" .It Fl f | ||
22 | .\" Perform expansions of the variables used in the config value of gns-proxy. | ||
23 | .\" This will usually expand $GNUNET_DATA_HOME to represents its path. | ||
24 | .It Fl h | ||
25 | Print short help on options | ||
26 | .It Fl v | ||
27 | Print the version | ||
28 | .It Fl V | ||
29 | be verbose | ||
30 | .El | ||
31 | .Sh FILES | ||
32 | .Pa gnunet.conf | ||
33 | .Sh SEE ALSO | ||
34 | .Xr gnunet-gns 1 , | ||
35 | .Xr gnunet-gns-proxy 1 , | ||
36 | .Xr gnunet.conf 5 | ||
37 | .sp | ||
38 | The full documentation for gnunet is maintained as a Texinfo manual. | ||
39 | If the | ||
40 | .Xr info 1 | ||
41 | and gnunet programs are properly installed at your site, the command | ||
42 | .Bd -literal -offset indent -compact | ||
43 | info gnunet | ||
44 | .Ed | ||
45 | should give you access to the complete handbook, | ||
46 | .Bd -literal -offset indent -compact | ||
47 | info gnunet-c-tutorial | ||
48 | .Ed | ||
49 | will give you access to a tutorial for developers. | ||
50 | .sp | ||
51 | Depending on your installation, this information is also | ||
52 | available in | ||
53 | .Xr gnunet 7 and | ||
54 | .Xr gnunet-c-tutorial 7 . | ||
55 | .Sh HISTORY | ||
56 | This man page first appeared in GNUnet 0.11.1. | ||
57 | .Sh AUTHORS | ||
58 | This page was written by | ||
59 | .An ng0 Aq Mt ng0@gnunet.org . | ||
60 | .Sh BUGS | ||
61 | Report bugs by using | ||
62 | .Lk https://bugs.gnunet.org | ||
63 | or by sending electronic mail to | ||
64 | .Aq Mt bug-gnunet@gnu.org . | ||
diff --git a/doc/man/gnunet-gns-proxy.1 b/doc/man/gnunet-gns-proxy.1 index 6c12e2c09..603c5a28c 100644 --- a/doc/man/gnunet-gns-proxy.1 +++ b/doc/man/gnunet-gns-proxy.1 | |||
@@ -15,26 +15,20 @@ CA certificate has to be generated that is used by the proxy. Thus | |||
15 | of this proxy or the \-\-authority switch is used to specify an | 15 | of this proxy or the \-\-authority switch is used to specify an |
16 | appropriate CA certificate that is already trusted by the browser. | 16 | appropriate CA certificate that is already trusted by the browser. |
17 | .SH OPTIONS | 17 | .SH OPTIONS |
18 | .B | ||
19 | .IP "\-c FILENAME, \-\-config=FILENAME" | 18 | .IP "\-c FILENAME, \-\-config=FILENAME" |
20 | Use the configuration file FILENAME. | 19 | Use the configuration file FILENAME. |
21 | .B | ||
22 | .IP "\-a AUTHORITY, \-\-authority=AUTHORITY" | 20 | .IP "\-a AUTHORITY, \-\-authority=AUTHORITY" |
23 | Path to a PEM CA file that contains the certificate and private key of | 21 | Path to a PEM CA file that contains the certificate and private key of |
24 | the CA to use to assert the validity of GNS names. The default port is | 22 | the CA to use to assert the validity of GNS names. The default port is |
25 | specified in the configuration file for the gns service under | 23 | specified in the configuration file for the gns service under |
26 | "[gns-proxy]" PROXY_CACERT. | 24 | "[gns-proxy]" PROXY_CACERT. |
27 | .B | ||
28 | .IP "\-p PORT, \-\-port=PORT" | 25 | .IP "\-p PORT, \-\-port=PORT" |
29 | The port this proxy should listen on. Default is 7777. | 26 | The port this proxy should listen on. Default is 7777. |
30 | .B | ||
31 | .IP "\-h, \-\-help" | 27 | .IP "\-h, \-\-help" |
32 | Print short help on options. | 28 | Print short help on options. |
33 | .B | ||
34 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 29 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
35 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and | 30 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and |
36 | ERROR. | 31 | ERROR. |
37 | .B | ||
38 | .IP "\-v, \-\-version" | 32 | .IP "\-v, \-\-version" |
39 | Print GNUnet version number. | 33 | Print GNUnet version number. |
40 | .SH BUGS | 34 | .SH BUGS |
diff --git a/doc/man/gnunet-gns.1 b/doc/man/gnunet-gns.1 index 597297629..750c72d95 100644 --- a/doc/man/gnunet-gns.1 +++ b/doc/man/gnunet-gns.1 | |||
@@ -8,33 +8,26 @@ gnunet\-gns \- Access to GNU Name System | |||
8 | \fBgnunet\-gns\fP can be used to lookup and process GNU Name Service | 8 | \fBgnunet\-gns\fP can be used to lookup and process GNU Name Service |
9 | names. | 9 | names. |
10 | .SH OPTIONS | 10 | .SH OPTIONS |
11 | .B | ||
12 | .IP "\-c FILENAME, \-\-config=FILENAME" | 11 | .IP "\-c FILENAME, \-\-config=FILENAME" |
13 | Use the configuration file FILENAME. | 12 | Use the configuration file FILENAME. |
14 | .B | ||
15 | .IP "\-r, \-\-raw" | 13 | .IP "\-r, \-\-raw" |
16 | No unneeded output. | 14 | No unneeded output. |
17 | This is a quiet mode where only important information is displayed. | 15 | This is a quiet mode where only important information is displayed. |
18 | For example a lookup for an IP address will only yield the IP address, | 16 | For example a lookup for an IP address will only yield the IP address, |
19 | no descriptive text. | 17 | no descriptive text. |
20 | .B | ||
21 | .IP "\-h, \-\-help" | 18 | .IP "\-h, \-\-help" |
22 | Print short help on options. | 19 | Print short help on options. |
23 | .B | ||
24 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 20 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
25 | Use LOGLEVEL for logging. | 21 | Use LOGLEVEL for logging. |
26 | Valid values are DEBUG, INFO, WARNING and ERROR. | 22 | Valid values are DEBUG, INFO, WARNING and ERROR. |
27 | .B | ||
28 | .IP "\-u NAME, \-\-lookup=NAME" | 23 | .IP "\-u NAME, \-\-lookup=NAME" |
29 | Name to lookup. | 24 | Name to lookup. |
30 | Resolve the specified name using the GNU Name System. | 25 | Resolve the specified name using the GNU Name System. |
31 | .B | ||
32 | .IP "\-t TYPE, \-\-type=TYPE" | 26 | .IP "\-t TYPE, \-\-type=TYPE" |
33 | Resource Record Type (TYPE) to look for. | 27 | Resource Record Type (TYPE) to look for. |
34 | Supported TYPE's are: A, AAAA, CNAME, NS, PKEY, PSEU, TLSA, SRV, SOA, | 28 | Supported TYPE's are: A, AAAA, CNAME, NS, PKEY, PSEU, TLSA, SRV, SOA, |
35 | MX, LEHO, VPN, REV, PTR, TXT. | 29 | MX, LEHO, VPN, REV, PTR, TXT. |
36 | Defaults to "A". | 30 | Defaults to "A". |
37 | .B | ||
38 | .IP "\-v, \-\-version" | 31 | .IP "\-v, \-\-version" |
39 | Print GNUnet version number. | 32 | Print GNUnet version number. |
40 | .SH RETURN VALUE | 33 | .SH RETURN VALUE |
diff --git a/doc/man/gnunet-namecache.1 b/doc/man/gnunet-namecache.1 index 78acb017b..06946e387 100644 --- a/doc/man/gnunet-namecache.1 +++ b/doc/man/gnunet-namecache.1 | |||
@@ -13,23 +13,17 @@ gnunet\-namecache \- inspect namecache | |||
13 | namecache. | 13 | namecache. |
14 | 14 | ||
15 | .SH OPTIONS | 15 | .SH OPTIONS |
16 | .B | ||
17 | .IP "\-c FILENAME, \-\-config=FILENAME" | 16 | .IP "\-c FILENAME, \-\-config=FILENAME" |
18 | Use the configuration file FILENAME. | 17 | Use the configuration file FILENAME. |
19 | .B | ||
20 | .IP "\-h, \-\-help" | 18 | .IP "\-h, \-\-help" |
21 | Print short help on options. | 19 | Print short help on options. |
22 | .B | ||
23 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 20 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
24 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and | 21 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and |
25 | ERROR. | 22 | ERROR. |
26 | .B | ||
27 | .IP "\-n NAME, \-\-name=NAME" | 23 | .IP "\-n NAME, \-\-name=NAME" |
28 | Name (label) of the record to display (mandatory option) | 24 | Name (label) of the record to display (mandatory option) |
29 | .B | ||
30 | .IP "\-v, \-\-version" | 25 | .IP "\-v, \-\-version" |
31 | Print GNUnet version number. | 26 | Print GNUnet version number. |
32 | .B | ||
33 | .IP "\-z PKEY, \-\-zone=PKEY" | 27 | .IP "\-z PKEY, \-\-zone=PKEY" |
34 | Specifies the public key of the zone to inspect (mandatory option) | 28 | Specifies the public key of the zone to inspect (mandatory option) |
35 | 29 | ||
diff --git a/doc/man/gnunet-namestore-fcfsd.1 b/doc/man/gnunet-namestore-fcfsd.1 index a6c9d2b32..c1eca224f 100644 --- a/doc/man/gnunet-namestore-fcfsd.1 +++ b/doc/man/gnunet-namestore-fcfsd.1 | |||
@@ -27,20 +27,15 @@ pseudonym (using "gnunet\-identity \-C NAME"), and use it with the | |||
27 | "-z" option. After that, you can start the FCFSD service (possibly using | 27 | "-z" option. After that, you can start the FCFSD service (possibly using |
28 | gnunet\-arm). | 28 | gnunet\-arm). |
29 | .SH OPTIONS | 29 | .SH OPTIONS |
30 | .B | ||
31 | .IP "\-c FILENAME, \-\-config=FILENAME" | 30 | .IP "\-c FILENAME, \-\-config=FILENAME" |
32 | Use the configuration file FILENAME. | 31 | Use the configuration file FILENAME. |
33 | .B | ||
34 | .IP "\-h, \-\-help" | 32 | .IP "\-h, \-\-help" |
35 | Print short help on options. | 33 | Print short help on options. |
36 | .B | ||
37 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 34 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
38 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and | 35 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and |
39 | ERROR. | 36 | ERROR. |
40 | .B | ||
41 | .IP "\-v, \-\-version" | 37 | .IP "\-v, \-\-version" |
42 | Print GNUnet version number. | 38 | Print GNUnet version number. |
43 | .B | ||
44 | .IP "\-z EGO, \-\-zone=EGO" | 39 | .IP "\-z EGO, \-\-zone=EGO" |
45 | Specifies for which EGO should FCFSD manage the zone. | 40 | Specifies for which EGO should FCFSD manage the zone. |
46 | .SH BUGS | 41 | .SH BUGS |
diff --git a/doc/man/gnunet-namestore.1 b/doc/man/gnunet-namestore.1 index 7517a4f5e..6a824cc47 100644 --- a/doc/man/gnunet-namestore.1 +++ b/doc/man/gnunet-namestore.1 | |||
@@ -12,13 +12,10 @@ gnunet\-namestore \- manipulate GNU Name System (GNS) zone data | |||
12 | \fBgnunet\-namestore\fP can be used to manipulate records in a GNS zone. | 12 | \fBgnunet\-namestore\fP can be used to manipulate records in a GNS zone. |
13 | 13 | ||
14 | .SH OPTIONS | 14 | .SH OPTIONS |
15 | .B | ||
16 | .IP "\-a, \-\-add" | 15 | .IP "\-a, \-\-add" |
17 | Desired operation is adding a record | 16 | Desired operation is adding a record |
18 | .B | ||
19 | .IP "\-c FILENAME, \-\-config=FILENAME" | 17 | .IP "\-c FILENAME, \-\-config=FILENAME" |
20 | Use the configuration file FILENAME. | 18 | Use the configuration file FILENAME. |
21 | .B | ||
22 | .IP "\-d, \-\-delete" | 19 | .IP "\-d, \-\-delete" |
23 | Desired operation is deleting records under the given name that match | 20 | Desired operation is deleting records under the given name that match |
24 | the specified type (\-t) and value (\-V). If type or value are not | 21 | the specified type (\-t) and value (\-V). If type or value are not |
@@ -26,41 +23,31 @@ specified, it means that all types (or values) should be assumed to | |||
26 | match (and possibly multiple or all values under the given label will | 23 | match (and possibly multiple or all values under the given label will |
27 | be deleted). Specifying a label (\-n) is mandatory. Note that | 24 | be deleted). Specifying a label (\-n) is mandatory. Note that |
28 | matching by expiration time or flags is (currently) not supported. | 25 | matching by expiration time or flags is (currently) not supported. |
29 | .B | ||
30 | .IP "\-D, \-\-display" | 26 | .IP "\-D, \-\-display" |
31 | Desired operation is listing of matching records | 27 | Desired operation is listing of matching records |
32 | .B | ||
33 | .IP "\-e TIME, \-\-expiration=TIME" | 28 | .IP "\-e TIME, \-\-expiration=TIME" |
34 | Specifies expiration time of record to add; format is relative time, | 29 | Specifies expiration time of record to add; format is relative time, |
35 | i.e "1 h" or "7 d 30 m". Supported units are "ms", "s", "min" or | 30 | i.e "1 h" or "7 d 30 m". Supported units are "ms", "s", "min" or |
36 | "minutes", "h" (hours), "d" (days) and "a" (years). | 31 | "minutes", "h" (hours), "d" (days) and "a" (years). |
37 | .B | ||
38 | .IP "\-h, \-\-help" | 32 | .IP "\-h, \-\-help" |
39 | Print short help on options. | 33 | Print short help on options. |
40 | .B | ||
41 | .IP "\-i NICKNAME, \-\-nick=NICKNAME" | 34 | .IP "\-i NICKNAME, \-\-nick=NICKNAME" |
42 | Set the desired NICKNAME for the zone. The nickname will be included | 35 | Set the desired NICKNAME for the zone. The nickname will be included |
43 | in all (public) records and used as the suggested name for this zone. | 36 | in all (public) records and used as the suggested name for this zone. |
44 | .B | ||
45 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 37 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
46 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and | 38 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and |
47 | ERROR. | 39 | ERROR. |
48 | .B | ||
49 | .IP "\-m, \-\-monitor" | 40 | .IP "\-m, \-\-monitor" |
50 | Monitor changes to the zone on an ongoing basis (in contrast to \-D, | 41 | Monitor changes to the zone on an ongoing basis (in contrast to \-D, |
51 | which merely displays the current records) | 42 | which merely displays the current records) |
52 | .B | ||
53 | .IP "\-n NAME, \-\-name=NAME" | 43 | .IP "\-n NAME, \-\-name=NAME" |
54 | Label or name of the record to add/delete/display | 44 | Label or name of the record to add/delete/display |
55 | .B | ||
56 | .IP "\-p, \-\-public" | 45 | .IP "\-p, \-\-public" |
57 | Create a record that is public (shared with other users that know the | 46 | Create a record that is public (shared with other users that know the |
58 | label) | 47 | label) |
59 | .B | ||
60 | .IP "\-r PKEY, \-\-reverse=PKEY" | 48 | .IP "\-r PKEY, \-\-reverse=PKEY" |
61 | Determine our GNS name for the given public key (reverse lookup of the | 49 | Determine our GNS name for the given public key (reverse lookup of the |
62 | PKEY) in the given zone. | 50 | PKEY) in the given zone. |
63 | .B | ||
64 | .IP "\-R RECORDLINE, \-\-replace=RECORDLINE" | 51 | .IP "\-R RECORDLINE, \-\-replace=RECORDLINE" |
65 | Sets record set to values given in RECORDLINE. This option can be specified multiple | 52 | Sets record set to values given in RECORDLINE. This option can be specified multiple |
66 | times to provide multiple records for the record set. Existing records under the | 53 | times to provide multiple records for the record set. Existing records under the |
@@ -69,29 +56,23 @@ same label will be deleted. The format for the RECORDLINE is | |||
69 | be given explicitly, seconds is always implied), TYPE is the | 56 | be given explicitly, seconds is always implied), TYPE is the |
70 | DNS/GNS record type, FLAGS is "(N)ORMAL", "(S)HADOW" or "(P)UBLIC". The VALUE | 57 | DNS/GNS record type, FLAGS is "(N)ORMAL", "(S)HADOW" or "(P)UBLIC". The VALUE |
71 | follows the usual human-readable value format(s) of DNS/GNS. | 58 | follows the usual human-readable value format(s) of DNS/GNS. |
72 | .B | ||
73 | .IP "\-s, \-\-shadow" | 59 | .IP "\-s, \-\-shadow" |
74 | Create a record that is a shadow record. Shadow records are only used | 60 | Create a record that is a shadow record. Shadow records are only used |
75 | once all other records of the same type under the same label have | 61 | once all other records of the same type under the same label have |
76 | expired. | 62 | expired. |
77 | .B | ||
78 | .IP "\-t TYPE, \-\-type=TYPE" | 63 | .IP "\-t TYPE, \-\-type=TYPE" |
79 | Type of the record to add/delete/display (i.e. "A", "AAAA", "NS", | 64 | Type of the record to add/delete/display (i.e. "A", "AAAA", "NS", |
80 | "PKEY", "MX" etc.) | 65 | "PKEY", "MX" etc.) |
81 | .B | ||
82 | .IP "\-u URI, \-\-uri=URI" | 66 | .IP "\-u URI, \-\-uri=URI" |
83 | Add PKEY record from gnunet://gns/-URI to our zone; the record type is | 67 | Add PKEY record from gnunet://gns/-URI to our zone; the record type is |
84 | always PKEY, if no expiration is given FOREVER is used | 68 | always PKEY, if no expiration is given FOREVER is used |
85 | .B | ||
86 | .IP "\-v, \-\-version" | 69 | .IP "\-v, \-\-version" |
87 | Print GNUnet version number. | 70 | Print GNUnet version number. |
88 | .B | ||
89 | .IP "\-V VALUE, \-\-value=VALUE" | 71 | .IP "\-V VALUE, \-\-value=VALUE" |
90 | Value to store or remove from the GNS zone. Specific format depends | 72 | Value to store or remove from the GNS zone. Specific format depends |
91 | on the record type. A records expect a dotted decimal IPv4 address, | 73 | on the record type. A records expect a dotted decimal IPv4 address, |
92 | AAAA records an IPv6 address, PKEY a public key in GNUnet's printable | 74 | AAAA records an IPv6 address, PKEY a public key in GNUnet's printable |
93 | format, and CNAME and NS records should be a domain name. | 75 | format, and CNAME and NS records should be a domain name. |
94 | .B | ||
95 | .IP "\-z EGO, \-\-zone=EGO" | 76 | .IP "\-z EGO, \-\-zone=EGO" |
96 | Specifies the name of the ego controlling the private key for the zone | 77 | Specifies the name of the ego controlling the private key for the zone |
97 | (mandatory option) | 78 | (mandatory option) |
diff --git a/doc/man/gnunet-nat-auto.1 b/doc/man/gnunet-nat-auto.1 index 8514a5c99..efd4b5df1 100644 --- a/doc/man/gnunet-nat-auto.1 +++ b/doc/man/gnunet-nat-auto.1 | |||
@@ -8,22 +8,17 @@ gnunet\-nat\-auto \- autoconfigure and test NAT traversal | |||
8 | This tool allows testing various NAT traversal functions, as well | 8 | This tool allows testing various NAT traversal functions, as well |
9 | as attempting auto\-configuration. | 9 | as attempting auto\-configuration. |
10 | .SH OPTIONS | 10 | .SH OPTIONS |
11 | .B | ||
12 | .IP "\-a, \-\-auto" | 11 | .IP "\-a, \-\-auto" |
13 | Attempt auto\-configuration for NAT traversal. | 12 | Attempt auto\-configuration for NAT traversal. |
14 | .B | ||
15 | .IP "\-c FILENAME, \-\-config=FILENAME" | 13 | .IP "\-c FILENAME, \-\-config=FILENAME" |
16 | Use the configuration file FILENAME. | 14 | Use the configuration file FILENAME. |
17 | .B | ||
18 | .IP "\-S NAME, \-\-section=NAME" | 15 | .IP "\-S NAME, \-\-section=NAME" |
19 | Name of the configuration section with details about the configuration | 16 | Name of the configuration section with details about the configuration |
20 | to test. For example "transport-tcp". | 17 | to test. For example "transport-tcp". |
21 | .IP "\-t, \-\-tcp" | 18 | .IP "\-t, \-\-tcp" |
22 | Use TCP. | 19 | Use TCP. |
23 | .B | ||
24 | .IP "\-u, \-\-udp" | 20 | .IP "\-u, \-\-udp" |
25 | Use UDP. | 21 | Use UDP. |
26 | .B | ||
27 | .IP "\-w, \-\-write" | 22 | .IP "\-w, \-\-write" |
28 | Write configuration to configuration file, useful in combination with | 23 | Write configuration to configuration file, useful in combination with |
29 | autoconfiguration (\-a). | 24 | autoconfiguration (\-a). |
diff --git a/doc/man/gnunet-nat-server.1 b/doc/man/gnunet-nat-server.1 index f31e69b26..8cb995f7c 100644 --- a/doc/man/gnunet-nat-server.1 +++ b/doc/man/gnunet-nat-server.1 | |||
@@ -41,7 +41,6 @@ gnunet\-nat\-server is run on should be specified in the NATSERVER | |||
41 | option in the [setup] section of the configuration file of hosts that | 41 | option in the [setup] section of the configuration file of hosts that |
42 | are supposed to autoconfigure with this server. | 42 | are supposed to autoconfigure with this server. |
43 | .SH OPTIONS | 43 | .SH OPTIONS |
44 | .B | ||
45 | .IP "\-c FILENAME, \-\-config=FILENAME" | 44 | .IP "\-c FILENAME, \-\-config=FILENAME" |
46 | Use the configuration file FILENAME. | 45 | Use the configuration file FILENAME. |
47 | .SH BUGS | 46 | .SH BUGS |
diff --git a/doc/man/gnunet-nat.1 b/doc/man/gnunet-nat.1 index 4a6a56e97..fe9272ea5 100644 --- a/doc/man/gnunet-nat.1 +++ b/doc/man/gnunet-nat.1 | |||
@@ -8,38 +8,28 @@ gnunet\-nat \- interact with the NAT service | |||
8 | This tool allows testing various NAT traversal functions, as well as | 8 | This tool allows testing various NAT traversal functions, as well as |
9 | attempting auto\-configuration. | 9 | attempting auto\-configuration. |
10 | .SH OPTIONS | 10 | .SH OPTIONS |
11 | .B | ||
12 | .IP "\-b ADDRESS, \-\-bind=ADDRESS" | 11 | .IP "\-b ADDRESS, \-\-bind=ADDRESS" |
13 | Assume that the service is (locally) bound to ADDRESS. | 12 | Assume that the service is (locally) bound to ADDRESS. |
14 | .B | ||
15 | .IP "\-c FILENAME, \-\-config=FILENAME" | 13 | .IP "\-c FILENAME, \-\-config=FILENAME" |
16 | Use the configuration file FILENAME. | 14 | Use the configuration file FILENAME. |
17 | .B | ||
18 | .IP "\-e ADDRESS, \-\-external=ADDRESS" | 15 | .IP "\-e ADDRESS, \-\-external=ADDRESS" |
19 | Assume that ADDRESS is the globally visible address of the peer. | 16 | Assume that ADDRESS is the globally visible address of the peer. |
20 | .B | ||
21 | .IP "\-i ADDRESS, \-\-in=ADDRESS" | 17 | .IP "\-i ADDRESS, \-\-in=ADDRESS" |
22 | Assuming we are listening at ADDRESS for connection reversal requests. | 18 | Assuming we are listening at ADDRESS for connection reversal requests. |
23 | .B | ||
24 | .IP "\-r ADDRESS, \-\-remote=ADDRESS" | 19 | .IP "\-r ADDRESS, \-\-remote=ADDRESS" |
25 | Ask the peer at ADDRESS for connection reversal, using the local | 20 | Ask the peer at ADDRESS for connection reversal, using the local |
26 | address for the target address of the reversal. | 21 | address for the target address of the reversal. |
27 | .B | ||
28 | .IP "\-S NAME, \-\-section=NAME" | 22 | .IP "\-S NAME, \-\-section=NAME" |
29 | Name of section in configuration file to use for additional options. | 23 | Name of section in configuration file to use for additional options. |
30 | .B | ||
31 | .IP "\-s, \-\-stun" | 24 | .IP "\-s, \-\-stun" |
32 | Enable processing of STUN requests. | 25 | Enable processing of STUN requests. |
33 | Will try to read UDP packets from the bind address and handle the | 26 | Will try to read UDP packets from the bind address and handle the |
34 | packets if they are STUN packets. | 27 | packets if they are STUN packets. |
35 | Will only work with UDP. | 28 | Will only work with UDP. |
36 | .B | ||
37 | .IP "\-t, \-\-tcp" | 29 | .IP "\-t, \-\-tcp" |
38 | Use TCP. | 30 | Use TCP. |
39 | .B | ||
40 | .IP "\-u, \-\-udp" | 31 | .IP "\-u, \-\-udp" |
41 | Use UDP. | 32 | Use UDP. |
42 | .B | ||
43 | .IP "\-W, \-\-watch" | 33 | .IP "\-W, \-\-watch" |
44 | Watch for connection reversal requests. | 34 | Watch for connection reversal requests. |
45 | .SH EXAMPLES | 35 | .SH EXAMPLES |
diff --git a/doc/man/gnunet-nse.1 b/doc/man/gnunet-nse.1 new file mode 100644 index 000000000..151ba4957 --- /dev/null +++ b/doc/man/gnunet-nse.1 | |||
@@ -0,0 +1,65 @@ | |||
1 | .Dd March 6, 2019 | ||
2 | .Dt GNUNET-NSE 1 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm gnunet-nse | ||
6 | .Nd show network size estimates from NSE service | ||
7 | .Sh SYNOPSIS | ||
8 | .Nm | ||
9 | .Op Fl c Ar file | Fl -config Ns = Ns file | ||
10 | .Op Fl h | \-help | ||
11 | .Op Fl l file | Fl -logfile Ns = Ns file | ||
12 | .Op Fl L Ar loglevel | Fl -loglevel Ns = Ns loglevel | ||
13 | .Op Fl v | \-version | ||
14 | .Sh DESCRIPTION | ||
15 | .Nm | ||
16 | is a command line tool to show network size estimates from the NSE service of GNUnet. | ||
17 | .Bl -tag -width Ds | ||
18 | .It Fl c Ar file | Fl -config Ns = Ns file | ||
19 | Use the configuration file FILENAME. | ||
20 | .It Fl h | \-help | ||
21 | Print short help on options. | ||
22 | .It Fl l file | Fl -logfile Ns = Ns file | ||
23 | Configure logging to write logs to LOGFILE. | ||
24 | .It Fl L Ar loglevel | Fl -loglevel Ns = Ns loglevel | ||
25 | Use LOGLEVEL for logging. | ||
26 | Valid values are DEBUG, INFO, WARNING and ERROR. | ||
27 | .It Fl v | \-version | ||
28 | Print GNUnet version number. | ||
29 | .El | ||
30 | .Sh FILES | ||
31 | .Pa gnunet.conf | ||
32 | Configuration file for gnunet. | ||
33 | .Sh SEE ALSO | ||
34 | .Xr gnunet.conf 5 | ||
35 | .sp | ||
36 | The full documentation for gnunet is maintained as a Texinfo manual. | ||
37 | If the | ||
38 | .Xr info 1 | ||
39 | gnunet programs are properly installed at your site, the command | ||
40 | .Bd -literal -offset indent -compact | ||
41 | info gnunet | ||
42 | .Ed | ||
43 | should give you access to the complete handbook, | ||
44 | .Bd -literal -offset indent -compact | ||
45 | info gnunet-c-tutorial | ||
46 | .Ed | ||
47 | will give you access to a tutorial for developers. | ||
48 | .sp | ||
49 | Depending on your installation, this information is also | ||
50 | available in | ||
51 | .Xr gnunet 7 and | ||
52 | .Xr gnunet-c-tutorial 7 . | ||
53 | .Sh HISTORY | ||
54 | This man page first appeared in GNUnet 0.11.1. | ||
55 | .Sh AUTHORS | ||
56 | This page was originally written by | ||
57 | .An Bertrand Marc Aq Mt bmarc@debian.org | ||
58 | for Debian's gnunet package (man page date: 2014). | ||
59 | Further edits and conversion to mdoc were done by | ||
60 | .An ng0 Aq Mt ng0@gnunet.org . | ||
61 | .Sh BUGS | ||
62 | Report bugs by using | ||
63 | .Lk https://bugs.gnunet.org | ||
64 | or by sending electronic mail to | ||
65 | .Aq Mt bug-gnunet@gnu.org . | ||
diff --git a/doc/man/gnunet-peerinfo.1 b/doc/man/gnunet-peerinfo.1 index bd37fa635..88094fa10 100644 --- a/doc/man/gnunet-peerinfo.1 +++ b/doc/man/gnunet-peerinfo.1 | |||
@@ -8,39 +8,28 @@ gnunet\-peerinfo \- Display information about other peers. | |||
8 | .PP | 8 | .PP |
9 | \fBgnunet\-peerinfo\fP display the known addresses and trust of known peers. | 9 | \fBgnunet\-peerinfo\fP display the known addresses and trust of known peers. |
10 | .SH OPTIONS | 10 | .SH OPTIONS |
11 | .B | ||
12 | .IP "\-c FILENAME, \-\-config=FILENAME" | 11 | .IP "\-c FILENAME, \-\-config=FILENAME" |
13 | Load config file (default: ~/.config/gnunet.conf) | 12 | Load config file (default: ~/.config/gnunet.conf) |
14 | .B | ||
15 | .IP "\-g, \-\-get\-hello" | 13 | .IP "\-g, \-\-get\-hello" |
16 | Output HELLO uri(s) | 14 | Output HELLO uri(s) |
17 | .B | ||
18 | .IP "\-h, \-\-help" | 15 | .IP "\-h, \-\-help" |
19 | Print help page | 16 | Print help page |
20 | .B | ||
21 | .IP "\-i, \-\-info" | 17 | .IP "\-i, \-\-info" |
22 | List all known peers (and their addresses) | 18 | List all known peers (and their addresses) |
23 | .B | ||
24 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 19 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
25 | Set the loglevel | 20 | Set the loglevel |
26 | .B | ||
27 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" | 21 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" |
28 | Log messages to LOGFILE | 22 | Log messages to LOGFILE |
29 | .B | ||
30 | .IP "\-n, \-\-numeric" | 23 | .IP "\-n, \-\-numeric" |
31 | Disable resolution of IPs to hostnames | 24 | Disable resolution of IPs to hostnames |
32 | .B | ||
33 | .IP "\-p, \-\-put\-hello=HELLO" | 25 | .IP "\-p, \-\-put\-hello=HELLO" |
34 | Add given HELLO uri to the database | 26 | Add given HELLO uri to the database |
35 | .B | ||
36 | .IP "\-q, \-\-quiet" | 27 | .IP "\-q, \-\-quiet" |
37 | Do not print anything but the peer identities | 28 | Do not print anything but the peer identities |
38 | .B | ||
39 | .IP "\-s, \-\-self" | 29 | .IP "\-s, \-\-self" |
40 | Print only our own identity (together with "\-q", this is the exact | 30 | Print only our own identity (together with "\-q", this is the exact |
41 | line that other peers would have to put in to their friends file in | 31 | line that other peers would have to put in to their friends file in |
42 | order to consider this peer one of their friends in F2F mode). | 32 | order to consider this peer one of their friends in F2F mode). |
43 | .B | ||
44 | .IP "\-v, \-\-version" | 33 | .IP "\-v, \-\-version" |
45 | Print the version number | 34 | Print the version number |
46 | .SH BUGS | 35 | .SH BUGS |
diff --git a/doc/man/gnunet-publish.1 b/doc/man/gnunet-publish.1 index b07208732..5f774580b 100644 --- a/doc/man/gnunet-publish.1 +++ b/doc/man/gnunet-publish.1 | |||
@@ -112,9 +112,9 @@ default is ~/.config/gnunet.conf). | |||
112 | Disable use of GNU libextractor for finding additional keywords and | 112 | Disable use of GNU libextractor for finding additional keywords and |
113 | metadata. | 113 | metadata. |
114 | .TP | 114 | .TP |
115 | \fB\-d\fR, \fB\-\-disable\-creation\-time\fR | 115 | \fB\-E\fR, \fB\-\-enable\-creation\-time\fR |
116 | Disable use of creation time timestamp in metadata. | 116 | Enable use of creation time timestamp in metadata. |
117 | Useful to make created directories deterministic and to avoid leaking | 117 | Setting this information will leak |
118 | information about the time at which a file was made available. | 118 | information about the time at which a file was made available. |
119 | .TP | 119 | .TP |
120 | \fB\-e\fR, \fB\-\-extract\fR | 120 | \fB\-e\fR, \fB\-\-extract\fR |
diff --git a/doc/man/gnunet-qr.1 b/doc/man/gnunet-qr.1 index 0145a3523..2aabe6b22 100644 --- a/doc/man/gnunet-qr.1 +++ b/doc/man/gnunet-qr.1 | |||
@@ -1,49 +1,53 @@ | |||
1 | .TH GNUNET\-QR 1 "September 13, 2014" "GNUnet" | 1 | .Dd September 13, 2014 |
2 | .SH NAME | 2 | .Dt GNUNET-QR 1 |
3 | gnunet\-qr \- Scan a QR code using a video device and import. | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-qr | 5 | .Nm gnunet-qr |
6 | .RI [ options ] | 6 | .Nd |
7 | .br | 7 | scan a QR code using a video device and import |
8 | .SH DESCRIPTION | 8 | .Sh SYNOPSIS |
9 | \fBgnunet\-qr\fP is a command line tool to scan a QR code using a | 9 | .Nm |
10 | video device and import. | 10 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
11 | .SH OPTIONS | 11 | .Op Fl d Ar DEVICE | Fl \-device= Ns Ar DEVICE |
12 | .B | 12 | .Op Fl h | \-help |
13 | .IP "\-c FILENAME, \-\-config=FILENAME" | 13 | .Op Fl s | \-silent |
14 | .Op Fl v | \-verbose | ||
15 | .Sh DESCRIPTION | ||
16 | .Nm | ||
17 | is a command line tool to scan a QR code using a video device and import. | ||
18 | .Bl -tag -width Ds | ||
19 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
14 | Use the configuration file FILENAME. | 20 | Use the configuration file FILENAME. |
15 | .B | 21 | .It Fl d Ar DEVICE | Fl \-device= Ns Ar DEVICE |
16 | .IP "\-d DEVICE, \-\-device=DEVICE" | ||
17 | Use device DEVICE. | 22 | Use device DEVICE. |
18 | .B | 23 | .It Fl h | \-help |
19 | .IP "\-h, \-\-help" | ||
20 | Print short help on options. | 24 | Print short help on options. |
21 | .B | 25 | .It Fl s | \-silent |
22 | .IP "\-s, \-\-silent" | ||
23 | Do not show preview windows. | 26 | Do not show preview windows. |
24 | .B | 27 | .It Fl v | \-verbose |
25 | .IP "\-v, \-\-verbose" | ||
26 | Be verbose. | 28 | Be verbose. |
27 | .SH BUGS | 29 | .El |
28 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 30 | .Sh SEE ALSO |
29 | electronic mail to <gnunet\-developers@gnu.org> | 31 | The full documentation for gnunet is maintained as a Texinfo manual. |
30 | .SH SEE ALSO | 32 | If the |
31 | The full documentation for | 33 | .Xr info 1 |
32 | .B gnunet | 34 | and gnunet programs are properly installed at your site, the command |
33 | is maintained as a Texinfo manual. If the | 35 | .Pp |
34 | .B info | 36 | .Dl info gnunet |
35 | and | 37 | .Pp |
36 | .B gnunet | ||
37 | programs are properly installed at your site, the command | ||
38 | .IP | ||
39 | .B info gnunet | ||
40 | .PP | ||
41 | should give you access to the complete handbook, | 38 | should give you access to the complete handbook, |
42 | .IP | 39 | .Pp |
43 | .B info gnunet-c-tutorial | 40 | .Dl info gnunet-c-tutorial |
44 | .PP | 41 | .Pp |
45 | will give you access to a tutorial for developers. | 42 | will give you access to a tutorial for developers. |
46 | .PP | 43 | .sp |
47 | Depending on your installation, this information is also | 44 | Depending on your installation, this information is also available in |
48 | available in | 45 | .Xr gnunet 7 and |
49 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 46 | .Xr gnunet-c-tutorial 7 . |
47 | .\".Sh HISTORY | ||
48 | .\".Sh AUTHORS | ||
49 | .Sh BUGS | ||
50 | Report bugs by using | ||
51 | .Lk https://bugs.gnunet.org | ||
52 | or by sending electronic mail to | ||
53 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-resolver.1 b/doc/man/gnunet-resolver.1 index 66f1ba9a8..494131d01 100644 --- a/doc/man/gnunet-resolver.1 +++ b/doc/man/gnunet-resolver.1 | |||
@@ -7,23 +7,17 @@ gnunet\-resolver \- build-in GNUnet stub resolver | |||
7 | .SH DESCRIPTION | 7 | .SH DESCRIPTION |
8 | \fBgnunet\-resolver\fP uses build-in GNUnet stub resolver. | 8 | \fBgnunet\-resolver\fP uses build-in GNUnet stub resolver. |
9 | .SH OPTIONS | 9 | .SH OPTIONS |
10 | .B | ||
11 | .IP "\-c FILENAME, \-\-config=FILENAME" | 10 | .IP "\-c FILENAME, \-\-config=FILENAME" |
12 | Use the configuration file FILENAME. | 11 | Use the configuration file FILENAME. |
13 | .B | ||
14 | .IP "\-h, \-\-help" | 12 | .IP "\-h, \-\-help" |
15 | Print short help on options. | 13 | Print short help on options. |
16 | .B | ||
17 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 14 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
18 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and | 15 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and |
19 | ERROR. | 16 | ERROR. |
20 | .B | ||
21 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" | 17 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" |
22 | Configure logging to write logs to LOGFILE. | 18 | Configure logging to write logs to LOGFILE. |
23 | .B | ||
24 | .IP "\-r, \-\-reverse" | 19 | .IP "\-r, \-\-reverse" |
25 | Perform a reverse lookup. | 20 | Perform a reverse lookup. |
26 | .B | ||
27 | .IP "\-v, \-\-version" | 21 | .IP "\-v, \-\-version" |
28 | Print GNUnet version number. | 22 | Print GNUnet version number. |
29 | .SH BUGS | 23 | .SH BUGS |
diff --git a/doc/man/gnunet-revocation.1 b/doc/man/gnunet-revocation.1 index f21f82612..6fae373e7 100644 --- a/doc/man/gnunet-revocation.1 +++ b/doc/man/gnunet-revocation.1 | |||
@@ -28,19 +28,15 @@ expensive. Depending on your CPU, the calculation can take days or | |||
28 | weeks. | 28 | weeks. |
29 | 29 | ||
30 | .SH OPTIONS | 30 | .SH OPTIONS |
31 | .B | ||
32 | .IP "\-t KEY, \-\-test=KEY" | 31 | .IP "\-t KEY, \-\-test=KEY" |
33 | Check if the given KEY (ASCII\-encoded public key required) has been | 32 | Check if the given KEY (ASCII\-encoded public key required) has been |
34 | revoked. | 33 | revoked. |
35 | .B | ||
36 | .IP "\-R NAME, \-\-revoke=NAME" | 34 | .IP "\-R NAME, \-\-revoke=NAME" |
37 | Calculate or perform revocation for the ego with the given NAME. | 35 | Calculate or perform revocation for the ego with the given NAME. |
38 | .B | ||
39 | .IP "\-p, \-\-perform" | 36 | .IP "\-p, \-\-perform" |
40 | Actually perform the revocation as soon as possible (do not just | 37 | Actually perform the revocation as soon as possible (do not just |
41 | generate a revocation certificate, use it). Must be supplied to | 38 | generate a revocation certificate, use it). Must be supplied to |
42 | actually perform the revocation. | 39 | actually perform the revocation. |
43 | .B | ||
44 | .IP "\-f NAME, \-\-filename=NAME" | 40 | .IP "\-f NAME, \-\-filename=NAME" |
45 | Use NAME as the name of the file that is to contain the revocation | 41 | Use NAME as the name of the file that is to contain the revocation |
46 | certificate. Intermediate computation results will be stored here, as | 42 | certificate. Intermediate computation results will be stored here, as |
@@ -51,17 +47,13 @@ be performed instantly. If the given file contains anything (a valid | |||
51 | certificate, with or without the completed proof-of-work) there is no | 47 | certificate, with or without the completed proof-of-work) there is no |
52 | need to supply the "\-R" option or to still have the private key of | 48 | need to supply the "\-R" option or to still have the private key of |
53 | the ego to perform the revocation. | 49 | the ego to perform the revocation. |
54 | .B | ||
55 | .IP "\-c FILENAME, \-\-config=FILENAME" | 50 | .IP "\-c FILENAME, \-\-config=FILENAME" |
56 | Use the configuration file FILENAME. | 51 | Use the configuration file FILENAME. |
57 | .B | ||
58 | .IP "\-h, \-\-help" | 52 | .IP "\-h, \-\-help" |
59 | Print short help on options. | 53 | Print short help on options. |
60 | .B | ||
61 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 54 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
62 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and | 55 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and |
63 | ERROR. | 56 | ERROR. |
64 | .B | ||
65 | .IP "\-v, \-\-version" | 57 | .IP "\-v, \-\-version" |
66 | Print GNUnet version number. | 58 | Print GNUnet version number. |
67 | 59 | ||
diff --git a/doc/man/gnunet-scalarproduct.1 b/doc/man/gnunet-scalarproduct.1 index 1c8938daf..34d5e4ef0 100644 --- a/doc/man/gnunet-scalarproduct.1 +++ b/doc/man/gnunet-scalarproduct.1 | |||
@@ -42,34 +42,26 @@ The protocol by definition relies on \fBAlice\fP and \fBBob\fP being | |||
42 | benign, thus \fBBob\fP can arbitrarily falsify his information. Both | 42 | benign, thus \fBBob\fP can arbitrarily falsify his information. Both |
43 | peers collaborate to achieve a correct result. | 43 | peers collaborate to achieve a correct result. |
44 | .SH OPTIONS | 44 | .SH OPTIONS |
45 | .B | ||
46 | .IP "\-e ELEMENTS, \-\-elements=ELEMENTS" | 45 | .IP "\-e ELEMENTS, \-\-elements=ELEMENTS" |
47 | The element-vector the vectorproduct should be computed over in signed | 46 | The element-vector the vectorproduct should be computed over in signed |
48 | decimal form, eg: \"42,1,-3,3,7\". Zero value elements will be automatically masked. | 47 | decimal form, eg: \"42,1,-3,3,7\". Zero value elements will be automatically masked. |
49 | .B | ||
50 | .IP "\-m MASK, \-\-mask=MASK" | 48 | .IP "\-m MASK, \-\-mask=MASK" |
51 | Elements in the vector can be masked. There must be at least two | 49 | Elements in the vector can be masked. There must be at least two |
52 | elements left in the vector to compute a vectorproduct. Non-Zero | 50 | elements left in the vector to compute a vectorproduct. Non-Zero |
53 | values indicate an element is not maskes. | 51 | values indicate an element is not maskes. |
54 | .B | ||
55 | .IP "\-k KEY, \-\-key=KEY" | 52 | .IP "\-k KEY, \-\-key=KEY" |
56 | The session key, a shared string of arbitrary length from which the | 53 | The session key, a shared string of arbitrary length from which the |
57 | SID will be generated | 54 | SID will be generated |
58 | .B | ||
59 | .IP "\-c FILENAME, \-\-config=FILENAME" | 55 | .IP "\-c FILENAME, \-\-config=FILENAME" |
60 | Use the configuration file FILENAME. | 56 | Use the configuration file FILENAME. |
61 | .B | ||
62 | .IP "\-p PEERID, \-\-peer=PEERID" | 57 | .IP "\-p PEERID, \-\-peer=PEERID" |
63 | The remote peer\'s ASCII-armored gnunet-peer ID as output by | 58 | The remote peer\'s ASCII-armored gnunet-peer ID as output by |
64 | gnunet-peerinfo. If this option is not given, the peer will take the | 59 | gnunet-peerinfo. If this option is not given, the peer will take the |
65 | \fBBob\fP\'s role. | 60 | \fBBob\fP\'s role. |
66 | .B | ||
67 | .IP "\-h, \-\-help" | 61 | .IP "\-h, \-\-help" |
68 | Print short help on options. | 62 | Print short help on options. |
69 | .B | ||
70 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 63 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
71 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 64 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. |
72 | .B | ||
73 | .IP "\-v, \-\-version" | 65 | .IP "\-v, \-\-version" |
74 | Print GNUnet version number. | 66 | Print GNUnet version number. |
75 | .SH BUGS | 67 | .SH BUGS |
diff --git a/doc/man/gnunet-scrypt.1 b/doc/man/gnunet-scrypt.1 index 01ac4205a..545af37e9 100644 --- a/doc/man/gnunet-scrypt.1 +++ b/doc/man/gnunet-scrypt.1 | |||
@@ -5,34 +5,24 @@ gnunet\-scrypt \- Manipulate GNUnet proof of work files. | |||
5 | .B gnunet\-scrypt | 5 | .B gnunet\-scrypt |
6 | .RI [ options ] | 6 | .RI [ options ] |
7 | .SH DESCRIPTION | 7 | .SH DESCRIPTION |
8 | \fBgnunet\-scrypt\fP is a command line tool to manipulate GNUnet proof | 8 | \fBgnunet\-scrypt\fP is a command line tool to manipulate GNUnet proof of work files. |
9 | of work files. | ||
10 | .SH OPTIONS | 9 | .SH OPTIONS |
11 | .B | ||
12 | .IP "\-b BITS, \-\-bits=BITS" | 10 | .IP "\-b BITS, \-\-bits=BITS" |
13 | Number of bits to require for the proof of work. | 11 | Number of bits to require for the proof of work. |
14 | .B | ||
15 | .IP "\-c FILENAME, \-\-config=FILENAME" | 12 | .IP "\-c FILENAME, \-\-config=FILENAME" |
16 | Use the configuration file FILENAME. | 13 | Use the configuration file FILENAME. |
17 | .B | ||
18 | .IP "\-h, \-\-help" | 14 | .IP "\-h, \-\-help" |
19 | Print short help on options. | 15 | Print short help on options. |
20 | .B | ||
21 | .IP "\-k FILE, \-\-keyfile=FILE" | 16 | .IP "\-k FILE, \-\-keyfile=FILE" |
22 | File with private key, otherwise default is used. | 17 | File with private key, otherwise default is used. |
23 | .B | ||
24 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 18 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" |
25 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 19 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. |
26 | .B | ||
27 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" | 20 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" |
28 | Configure logging to write logs to LOGFILE. | 21 | Configure logging to write logs to LOGFILE. |
29 | .B | ||
30 | .IP "\-o FILE, \-\-outfile=FILE" | 22 | .IP "\-o FILE, \-\-outfile=FILE" |
31 | File with proof of work, otherwise default is used. | 23 | File with proof of work, otherwise default is used. |
32 | .B | ||
33 | .IP "\-t TIME, \-\-timeout=TIME" | 24 | .IP "\-t TIME, \-\-timeout=TIME" |
34 | Time to wait between calculations. | 25 | Time to wait between calculations. |
35 | .B | ||
36 | .IP "\-v, \-\-version" | 26 | .IP "\-v, \-\-version" |
37 | Print GNUnet version number. | 27 | Print GNUnet version number. |
38 | .SH BUGS | 28 | .SH BUGS |
diff --git a/doc/man/gnunet-statistics.1 b/doc/man/gnunet-statistics.1 index e61a8493c..c0d5e8fe3 100644 --- a/doc/man/gnunet-statistics.1 +++ b/doc/man/gnunet-statistics.1 | |||
@@ -1,73 +1,91 @@ | |||
1 | .TH GNUNET-STATISTICS 1 "January 4, 2012" "GNUnet" | 1 | .Dd January 4, 2012 |
2 | .SH NAME | 2 | .Dt GNUNET-STATISTICS 1 |
3 | gnunet\-statistics \- Display statistics about your GNUnet system | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-statistics | 5 | .Nm gnunet-statistics |
6 | .RI [ options ] | 6 | .Nd display statistics about your GNUnet system |
7 | .RI [ VALUE ] | 7 | .Sh SYNOPSIS |
8 | .SH DESCRIPTION | 8 | .Nm |
9 | \fBgnunet\-statistics\fP is used to display detailed information about | 9 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
10 | various aspect of GNUnet's operation. This tool only works if the | 10 | .Op Fl h | \-help |
11 | "statistics" service is available. | 11 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
12 | gnunet\-statistics can be used to set a value by giving the options | 12 | .Op Fl l Ar FILENAME | Fl \-logfile= Ns Ar FILENAME |
13 | \-n, \-s and also a VALUE. | 13 | .Op Fl n Ar NAME | Fl \-name= Ns Ar NAME |
14 | .SH OPTIONS | 14 | .Op Fl o Ar PORT | Fl \-port= Ns Ar PORT |
15 | .B | 15 | .Op Fl p | \-persistent |
16 | .IP "\-c FILENAME, \-\-config=FILENAME" | 16 | .Op Fl q | \-quiet |
17 | .Op Fl r Ar REMOTE | Fl \-remote= Ns Ar REMOTE | ||
18 | .Op Fl S Ar SEPARATOR | Fl \-csv-separator= Ns Ar SEPARATOR | ||
19 | .Op Fl s Ar SUBSYSTEM | Fl \-subsystem= Ns Ar SUBSYSTEM | ||
20 | .Op Fl t Ar PATH | Fl \-testbed= Ns Ar PATH | ||
21 | .Op Fl v | \-version | ||
22 | .Op Fl w | \-watch | ||
23 | .Ao Ar VALUE Ac | ||
24 | .Sh DESCRIPTION | ||
25 | .Nm | ||
26 | is used to display detailed information about various aspect of GNUnet's operation. | ||
27 | This tool only works if the "statistics" service is available. | ||
28 | gnunet-statistics can be used to set a value by giving the options \-n, \-s and also a VALUE. | ||
29 | .Bl -tag -width Ds | ||
30 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
17 | Use the configuration file FILENAME. | 31 | Use the configuration file FILENAME. |
18 | .B | 32 | .It Fl h | \-help |
19 | .IP "\-h, \-\-help" | ||
20 | Print short help on options. | 33 | Print short help on options. |
21 | .B | 34 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
22 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | ||
23 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 35 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. |
24 | .B | 36 | .It Fl l Ar FILENAME | Fl \-logfile= Ns Ar FILENAME |
25 | .IP "\-n NAME, \-\-name=NAME" | 37 | Configure logging to write logs to FILENAME |
26 | Each statistic has a name that is unique with in its subsystem. With | 38 | .It Fl n Ar NAME | Fl \-name= Ns Ar NAME |
27 | this option, the output can be restricted to statistics that have a | 39 | Each statistic has a NAME that is unique with in its subsystem. |
28 | particular name. | 40 | With this option, the output can be restricted to statistics that have a particular NAME. |
29 | .B | 41 | .It Fl o Ar PORT | Fl \-port= Ns Ar PORT |
30 | .IP "\-p, \-\-persistent" | 42 | PORT for remote host |
31 | When setting a value, make the value persistent. If the value used to | 43 | .It Fl p | \-persistent |
32 | be persistent and this flag is not given, it will be marked as | 44 | When setting a value, make the value persistent. |
33 | non\-persistent. | 45 | If the value used to be persistent and this flag is not given, it will be marked as non-persistent. |
34 | .B | 46 | .It Fl q | \-quiet |
35 | .IP "\-s SUBSYSTEM, \-\-subsystem=SUBSYSTEM" | 47 | Just print the statistics value |
36 | Statistics are kept for various subsystems. With this option, the | 48 | .It Fl r Ar REMOTE | Fl \-remote= Ns Ar REMOTE |
37 | output can be restricted to a particular subsystem only. | 49 | Connect to a remote host given as REMOTE. |
38 | .B | 50 | .It Fl S Ar SEPARATOR | Fl \-csv-separator= Ns Ar SEPARATOR |
39 | .IP "\-S SEPARATOR, \-\-csv-separator=SEPARATOR" | ||
40 | Specify a separator for generating csv-output. | 51 | Specify a separator for generating csv-output. |
41 | .B | 52 | .It Fl s Ar SUBSYSTEM | Fl \-subsystem= Ns Ar SUBSYSTEM |
42 | .IP "\-t TESTBED_PATH, \-\-subsystem=TESTBED_PATH" | 53 | Statistics are kept for various subsystems. |
54 | With this option, the output can be restricted to a particular subsystem only. | ||
55 | .It Fl t Ar PATH | Fl \-testbed= Ns Ar PATH | ||
43 | When running testbed, you can get statistics of all peers with specefying the | 56 | When running testbed, you can get statistics of all peers with specefying the |
44 | folder containing the data of all testbed nodes like \fBgnunet\-statistics -t /tmp/testbedARtmQv\fP. | 57 | folder containing the data of all testbed nodes like |
45 | .B | 58 | .Pp |
46 | .IP "\-v, \-\-version" | 59 | .Dl $ gnunet-statistics -t /tmp/testbedARtmQv |
60 | .Pp | ||
61 | .It Fl v | \-version | ||
47 | Print GNUnet version number. | 62 | Print GNUnet version number. |
48 | .SH BUGS | 63 | .It Fl w | \-watch |
49 | Report bugs by using Mantis <https://gnunet.org/mantis/> or by sending | 64 | Watch value continuously. |
50 | electronic mail to <gnunet\-developers@gnu.org> | 65 | .El |
51 | .SH SEE ALSO | 66 | .Sh SEE ALSO |
52 | gnunet\-service\-statistics(1) | 67 | .Xr gnunet-service-statistics 1 |
53 | .PP | 68 | .sp |
54 | The full documentation for | 69 | The full documentation for gnunet is maintained as a Texinfo manual. |
55 | .B gnunet | ||
56 | is maintained as a Texinfo manual. | ||
57 | If the | 70 | If the |
58 | .B info | 71 | .Xr info 1 |
59 | and | 72 | and gnunet programs are properly installed at your site, the command |
60 | .B gnunet | 73 | .Pp |
61 | programs are properly installed at your site, the command | 74 | .Dl info gnunet |
62 | .IP | 75 | .Pp |
63 | .B info gnunet | ||
64 | .PP | ||
65 | should give you access to the complete handbook, | 76 | should give you access to the complete handbook, |
66 | .IP | 77 | .Pp |
67 | .B info gnunet-c-tutorial | 78 | .Dl info gnunet-c-tutorial |
68 | .PP | 79 | .Pp |
69 | will give you access to a tutorial for developers. | 80 | will give you access to a tutorial for developers. |
70 | .PP | 81 | .sp |
71 | Depending on your installation, this information is also | 82 | Depending on your installation, this information is also available in |
72 | available in | 83 | .Xr gnunet 7 and |
73 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 84 | .Xr gnunet-c-tutorial 7 . |
85 | .\".Sh HISTORY | ||
86 | .\".Sh AUTHORS | ||
87 | .Sh BUGS | ||
88 | Report bugs by using | ||
89 | .Lk https://bugs.gnunet.org | ||
90 | or by sending electronic mail to | ||
91 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-testbed-profiler.1 b/doc/man/gnunet-testbed-profiler.1 index b1dde99dd..fe9d713b3 100644 --- a/doc/man/gnunet-testbed-profiler.1 +++ b/doc/man/gnunet-testbed-profiler.1 | |||
@@ -1,61 +1,67 @@ | |||
1 | .TH GNUNET\-TESTBED\-PROFILER 1 "September 13, 2014" "GNUnet" | 1 | .Dd September 13, 2014 |
2 | .SH NAME | 2 | .Dt GNUNET-TESTBED-PROFILER 1 |
3 | gnunet\-testbed\-profiler \- Profiling driver for the testbed. | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-testbed\-profiler | 5 | .Nm gnunet-testbed-profiler |
6 | .RI [ options ] | 6 | .Nd |
7 | .br | 7 | profiling driver for the testbed |
8 | .SH DESCRIPTION | 8 | .Sh SYNOPSIS |
9 | \fBgnunet\-testbed\-profiler\fP is a command line profiling driver for the testbed. | 9 | .Nm |
10 | .SH OPTIONS | 10 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
11 | .B | 11 | .Op Fl e Ar COUNT | Fl \-num-errors= Ns Ar COUNT |
12 | .IP "\-c FILENAME, \-\-config=FILENAME" | 12 | .Op Fl H Ar FILENAME | Fl \-hosts= Ns Ar FILENAME |
13 | .Op Fl h | \-help | ||
14 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL | ||
15 | .Op Fl l Ar LOGFILE | Fl \-logfile= Ns Ar LOGFILE | ||
16 | .Op Fl n | \-non-interactive | ||
17 | .Op Fl p Ar COUNT | Fl \-num-peers= Ns Ar COUNT | ||
18 | .Op Fl v | \-version | ||
19 | .Sh DESCRIPTION | ||
20 | .Nm | ||
21 | is a command line profiling driver for the testbed. | ||
22 | .Sh OPTIONS | ||
23 | .Bl -tag -width Ds | ||
24 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
13 | Use the configuration file FILENAME. | 25 | Use the configuration file FILENAME. |
14 | .B | 26 | .It Fl e Ar COUNT | Fl \-num-errors= Ns Ar COUNT |
15 | .IP "\-e COUNT, \-\-num\-errors=COUNT" | ||
16 | Tolerate COUNT number of continious timeout failures. | 27 | Tolerate COUNT number of continious timeout failures. |
17 | .B | 28 | .It Fl H Ar FILENAME | Fl \-hosts= Ns Ar FILENAME |
18 | .IP "\-H FILENAME, \-\-hosts=FILENAME" | ||
19 | Name of the file with the login information for the testbed. | 29 | Name of the file with the login information for the testbed. |
20 | .B | 30 | .It Fl h | \-help |
21 | .IP "\-h, \-\-help" | ||
22 | Print short help on options. | 31 | Print short help on options. |
23 | .B | 32 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
24 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 33 | Use LOGLEVEL for logging. |
25 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 34 | Valid values are DEBUG, INFO, WARNING and ERROR. |
26 | .B | 35 | .It Fl l Ar LOGFILE | Fl \-logfile= Ns Ar LOGFILE |
27 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" | ||
28 | Configure logging to write logs to LOGFILE. | 36 | Configure logging to write logs to LOGFILE. |
29 | .B | 37 | .It Fl n | \-non-interactive |
30 | .IP "\-n, \-\-non\-interactive" | 38 | Run profiler in non-interactive mode where upon testbed setup the profiler does not wait for a keystroke but continues to run until a termination signal is received. |
31 | Run profiler in non-interactive mode where upon testbed setup the | 39 | .It Fl p Ar COUNT | Fl \-num-peers= Ns Ar COUNT |
32 | profiler does not wait for a keystroke but continues to run until a | ||
33 | termination signal is received. | ||
34 | .B | ||
35 | .IP "\-p COUNT, \-\-num\-peers=COUNT" | ||
36 | Create COUNT number of peers. | 40 | Create COUNT number of peers. |
37 | .B | 41 | .It Fl v | \-version |
38 | .IP "\-v, \-\-version" | ||
39 | Print GNUnet version number. | 42 | Print GNUnet version number. |
40 | .SH BUGS | 43 | .El |
41 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending electronic mail to <gnunet\-developers@gnu.org> | 44 | .Sh SEE ALSO |
42 | .SH "SEE ALSO" | 45 | The full documentation for gnunet is maintained as a Texinfo manual. |
43 | The full documentation for | 46 | If the |
44 | .B gnunet | 47 | .Xr info 1 |
45 | is maintained as a Texinfo manual. If the | 48 | and gnunet programs are properly installed at your site, the command |
46 | .B info | 49 | .Pp |
47 | and | 50 | .Dl info gnunet |
48 | .B gnunet | 51 | .Pp |
49 | programs are properly installed at your site, the command | ||
50 | .IP | ||
51 | .B info gnunet | ||
52 | .PP | ||
53 | should give you access to the complete handbook, | 52 | should give you access to the complete handbook, |
54 | .IP | 53 | .Pp |
55 | .B info gnunet-c-tutorial | 54 | .Dl info gnunet-c-tutorial |
56 | .PP | 55 | .Pp |
57 | will give you access to a tutorial for developers. | 56 | will give you access to a tutorial for developers. |
58 | .PP | 57 | .sp |
59 | Depending on your installation, this information is also | 58 | Depending on your installation, this information is also available in |
60 | available in | 59 | .Xr gnunet 7 and |
61 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 60 | .Xr gnunet-c-tutorial 7 . |
61 | .\".Sh HISTORY | ||
62 | .\".Sh AUTHORS | ||
63 | .Sh BUGS | ||
64 | Report bugs by using | ||
65 | .Lk https://bugs.gnunet.org | ||
66 | or by sending electronic mail to | ||
67 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-testing-run-service.1 b/doc/man/gnunet-testing-run-service.1 index 43fdb8ecf..903810c7f 100644 --- a/doc/man/gnunet-testing-run-service.1 +++ b/doc/man/gnunet-testing-run-service.1 | |||
@@ -1,52 +1,53 @@ | |||
1 | .TH GNUNET-TESTING-RUN-SERVICE 1 "August 25, 2013" "GNUnet" | 1 | .Dd August 25, 2013 |
2 | .SH NAME | 2 | .Dt GNUNET-TESTING-RUN-SERVICE 1 |
3 | gnunet\-testing\-run\-service \- Command line tool to start a service for testing. | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-testing\-run\-service | 5 | .Nm gnunet-testing-run-service |
6 | .RI [ options ] | 6 | .Nd |
7 | .SH DESCRIPTION | 7 | command line tool to start a service for testing |
8 | \fBgnunet\-testing\-run\-service\fP is a command line tool to start a | 8 | .Sh SYNOPSIS |
9 | service for testing. It starts a peer, running only the service | 9 | .Nm |
10 | specified on the command line, outputs the path to the temporary | 10 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
11 | configuration file to stdout. | 11 | .Op Fl h | \-help |
12 | .PP | 12 | .Op Fl s Ar SERVICE | Fl \-service= Ns Ar SERVICE |
13 | The peer will run until this program is killed, or stdin is | 13 | .Sh DESCRIPTION |
14 | closed. When reading the character 'r' from stdin, the running service | 14 | .Nm |
15 | is restarted with the same configuration. | 15 | is a command line tool to start a service for testing. |
16 | .PP | 16 | It starts a peer, running only the service specified on the command line, outputs the path to the temporary configuration file to stdout. |
17 | This executable is intended to be used by gnunet-java, in order to | 17 | .Pp |
18 | reliably start and stop services for test cases. | 18 | The peer will run until this program is killed, or stdin is closed. |
19 | .SH OPTIONS | 19 | When reading the character 'r' from stdin, the running service is restarted with the same configuration. |
20 | .B | 20 | .Pp |
21 | .IP "\-c FILENAME, \-\-config=FILENAME" | 21 | This executable is intended to be used by gnunet-java, in order to reliably start and stop services for test cases. |
22 | .Bl -tag -width Ds | ||
23 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
22 | Name of the template configuration file to use (optional). | 24 | Name of the template configuration file to use (optional). |
23 | .B | 25 | .It Fl h | \-help |
24 | .IP "\-h, \-\-help" | ||
25 | Print short help on options. | 26 | Print short help on options. |
26 | .B | 27 | .It Fl s Ar SERVICE | Fl \-service= Ns Ar SERVICE |
27 | .IP "\-s SERVICE, \-\-service=SERVICE" | ||
28 | Name of the service to run. | 28 | Name of the service to run. |
29 | .SH BUGS | 29 | .El |
30 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 30 | .Sh SEE ALSO |
31 | electronic mail to <gnunet\-developers@gnu.org> | 31 | The full documentation for gnunet is maintained as a Texinfo manual. |
32 | .SH SEE ALSO | ||
33 | The full documentation for | ||
34 | .B gnunet | ||
35 | is maintained as a Texinfo manual. | ||
36 | If the | 32 | If the |
37 | .B info | 33 | .Xr info 1 |
38 | and | 34 | and gnunet programs are properly installed at your site, the command |
39 | .B gnunet | 35 | .Pp |
40 | programs are properly installed at your site, the command | 36 | .Dl info gnunet |
41 | .IP | 37 | .Pp |
42 | .B info gnunet | ||
43 | .PP | ||
44 | should give you access to the complete handbook, | 38 | should give you access to the complete handbook, |
45 | .IP | 39 | .Pp |
46 | .B info gnunet-c-tutorial | 40 | .Dl info gnunet-c-tutorial |
47 | .PP | 41 | .Pp |
48 | will give you access to a tutorial for developers. | 42 | will give you access to a tutorial for developers. |
49 | .PP | 43 | .sp |
50 | Depending on your installation, this information is also | 44 | Depending on your installation, this information is also available in |
51 | available in | 45 | .Xr gnunet 7 and |
52 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 46 | .Xr gnunet-c-tutorial 7 . |
47 | .\".Sh HISTORY | ||
48 | .\".Sh AUTHORS | ||
49 | .Sh BUGS | ||
50 | Report bugs by using | ||
51 | .Lk https://bugs.gnunet.org | ||
52 | or by sending electronic mail to | ||
53 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-testing.1 b/doc/man/gnunet-testing.1 index 357d0df44..182da613d 100644 --- a/doc/man/gnunet-testing.1 +++ b/doc/man/gnunet-testing.1 | |||
@@ -1,65 +1,69 @@ | |||
1 | .TH GNUNET\-TESTING 1 "January 4, 2012" "GNUnet" | 1 | .Dd January 4, 2012 |
2 | .SH NAME | 2 | .Dt GNUNET-TESTING 1 |
3 | gnunet\-testing \- Command line tool to access the testing library. | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-testing | 5 | .Nm gnunet-testing |
6 | .RI [ options ] | 6 | .Nd |
7 | .br | 7 | command line tool to access the testing library |
8 | .SH DESCRIPTION | 8 | .Sh SYNOPSIS |
9 | \fBgnunet\-testing\fP is a command line tool to access the testing | 9 | .Nm |
10 | library. | 10 | .Op Fl C | \-cfg |
11 | .SH OPTIONS | 11 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
12 | .B | 12 | .Op Fl H | \-hostkeys |
13 | .IP "\-C, \-\-cfg" | 13 | .Op Fl h | \-help |
14 | .Op Fl k | \-key | ||
15 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL | ||
16 | .Op Fl l Ar LOGFILE | Fl \-logfile= Ns Ar LOFILE | ||
17 | .Op Fl n | \-number | ||
18 | .Op Fl t | \-template | ||
19 | .Op Fl v | \-version | ||
20 | .Sh DESCRIPTION | ||
21 | .Nm | ||
22 | is a command line tool to access the testing library. | ||
23 | .Sh OPTIONS | ||
24 | .Bl -tag -width Ds | ||
25 | .It Fl C | \-cfg | ||
14 | Create unique configuration files. | 26 | Create unique configuration files. |
15 | .B | 27 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
16 | .IP "\-c FILENAME, \-\-config=FILENAME" | ||
17 | Use the configuration file FILENAME. | 28 | Use the configuration file FILENAME. |
18 | .B | 29 | .It Fl H | \-hostkeys |
19 | .IP "\-H, \-\-hostkeys" | ||
20 | Host key file. | 30 | Host key file. |
21 | .B | 31 | .It Fl h | \-help |
22 | .IP "\-h, \-\-help" | ||
23 | Print short help on options. | 32 | Print short help on options. |
24 | .B | 33 | .It Fl k | \-key |
25 | .IP "\-k, \-\-key" | ||
26 | Create hostkey files from pre-computed hostkey list. | 34 | Create hostkey files from pre-computed hostkey list. |
27 | .B | 35 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
28 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | ||
29 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 36 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. |
30 | .B | 37 | .It Fl l Ar LOGFILE | Fl \-logfile= Ns Ar LOFILE |
31 | .IP "\-l LOGFILE, \-\-logfile=LOGFILE" | ||
32 | Configure logging to write logs to LOGFILE. | 38 | Configure logging to write logs to LOGFILE. |
33 | .B | 39 | .It Fl n | \-number |
34 | .IP "\-n, \-\-number" | ||
35 | Number of unique configuration files or hostkeys to create. | 40 | Number of unique configuration files or hostkeys to create. |
36 | .B | 41 | .It Fl t | \-template |
37 | .IP "\-t, \-\-template" | ||
38 | Configuration template. | 42 | Configuration template. |
39 | .B | 43 | .It Fl v | \-version |
40 | .IP "\-v, \-\-version" | ||
41 | Print GNUnet version number. | 44 | Print GNUnet version number. |
42 | .SH BUGS | 45 | .El |
43 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 46 | .Sh SEE ALSO |
44 | electronic mail to <gnunet\-developers@gnu.org> | 47 | The full documentation for gnunet is maintained as a Texinfo manual. |
45 | .SH SEE ALSO | ||
46 | The full documentation for | ||
47 | .B gnunet | ||
48 | is maintained as a Texinfo manual. | ||
49 | If the | 48 | If the |
50 | .B info | 49 | .Xr info 1 |
51 | and | 50 | and gnunet programs are properly installed at your site, the command |
52 | .B gnunet | 51 | .Pp |
53 | programs are properly installed at your site, the command | 52 | .Dl info gnunet |
54 | .IP | 53 | .Pp |
55 | .B info gnunet | ||
56 | .PP | ||
57 | should give you access to the complete handbook, | 54 | should give you access to the complete handbook, |
58 | .IP | 55 | .Pp |
59 | .B info gnunet-c-tutorial | 56 | .Dl info gnunet-c-tutorial |
60 | .PP | 57 | .Pp |
61 | will give you access to a tutorial for developers. | 58 | will give you access to a tutorial for developers. |
62 | .PP | 59 | .sp |
63 | Depending on your installation, this information is also | 60 | Depending on your installation, this information is also available in |
64 | available in | 61 | .Xr gnunet 7 and |
65 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 62 | .Xr gnunet-c-tutorial 7 . |
63 | .\".Sh HISTORY | ||
64 | .\".Sh AUTHORS | ||
65 | .Sh BUGS | ||
66 | Report bugs by using | ||
67 | .Lk https://bugs.gnunet.org | ||
68 | or by sending electronic mail to | ||
69 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-timeout.1 b/doc/man/gnunet-timeout.1 index 653f211cd..15abfe351 100644 --- a/doc/man/gnunet-timeout.1 +++ b/doc/man/gnunet-timeout.1 | |||
@@ -1,36 +1,42 @@ | |||
1 | .TH GNUNET-TIMOUET 1 "June 5, 2018" "GNUnet" | 1 | .Dd June 5, 2018 |
2 | .SH NAME | 2 | .Dt GNUNET-TIMEOUT 1 |
3 | gnunet\-timeout \- run process with timeout | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-timeout | 5 | .Nm gnunet-timeout |
6 | .RI TIMEOUT PROGRAM ARGS | 6 | .Nd |
7 | .SH DESCRIPTION | 7 | run process with timeout |
8 | \fBgnunet\-timeout\fP can be used to run another process with a | 8 | .Sh SYNOPSIS |
9 | timeout. Provided as the standard "timout" utility may not be | 9 | .Nm |
10 | available on all platforms. | 10 | .Ao Ar duration Ac |
11 | .SH BUGS | 11 | .Ao Ar command Ac |
12 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 12 | .Ao args ... Ac |
13 | electronic mail to <gnunet\-developers@gnu.org> | 13 | .Sh DESCRIPTION |
14 | .SH SEE ALSO | 14 | .Nm |
15 | timeout(1) | 15 | can be used to run another process with a timeout. |
16 | .PP | 16 | It is provided because the standard "timout" utility may not be available on all platforms. |
17 | The full documentation for | 17 | .Sh SEE ALSO |
18 | .B gnunet | 18 | .Xr timeout 1 |
19 | is maintained as a Texinfo manual. | 19 | .sp |
20 | The full documentation for gnunet is maintained as a Texinfo manual. | ||
20 | If the | 21 | If the |
21 | .B info | 22 | .Xr info 1 |
22 | and | 23 | and gnunet programs are properly installed at your site, the command |
23 | .B gnunet | 24 | .Pp |
24 | programs are properly installed at your site, the command | 25 | .Dl info gnunet |
25 | .IP | 26 | .Pp |
26 | .B info gnunet | ||
27 | .PP | ||
28 | should give you access to the complete handbook, | 27 | should give you access to the complete handbook, |
29 | .IP | 28 | .Pp |
30 | .B info gnunet-c-tutorial | 29 | .Dl info gnunet-c-tutorial |
31 | .PP | 30 | .Pp |
32 | will give you access to a tutorial for developers. | 31 | will give you access to a tutorial for developers. |
33 | .PP | 32 | .sp |
34 | Depending on your installation, this information is also | 33 | Depending on your installation, this information is also available in |
35 | available in | 34 | .Xr gnunet 7 and |
36 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 35 | .Xr gnunet-c-tutorial 7 . |
36 | .\".Sh HISTORY | ||
37 | .\".Sh AUTHORS | ||
38 | .Sh BUGS | ||
39 | Report bugs by using | ||
40 | .Lk https://bugs.gnunet.org | ||
41 | or by sending electronic mail to | ||
42 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-transport-certificate-creation.1 b/doc/man/gnunet-transport-certificate-creation.1 index 9dc572acf..e896363e4 100644 --- a/doc/man/gnunet-transport-certificate-creation.1 +++ b/doc/man/gnunet-transport-certificate-creation.1 | |||
@@ -1,35 +1,40 @@ | |||
1 | .TH GNUNET\-TRANSPORT-CERTIFICATE-CREATION 1 "January 31, 2014" "GNUnet" | 1 | .Dd January 31, 2014 |
2 | .SH NAME | 2 | .Dt GNUNET-TRANSPORT-CERTIFICATE-CREATION 1 |
3 | gnunet\-transport\-certificate\-creation \- create certificate for HTTPS transport | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-transport\-certificate\-creation | 5 | .Nm gnunet-transport-certificate-creation |
6 | .I privatekey certificate | 6 | .Nd |
7 | .SH DESCRIPTION | 7 | create certificate for HTTPS transport |
8 | \fBgnunet\-transport\-certificate\-creation\fP uses openssl to generate a RSA | 8 | .Sh SYNOPSIS |
9 | private key and then a self-signed certificate for HTTPS transport. | 9 | .Nm |
10 | .SH BUGS | 10 | .Op privatekey |
11 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 11 | .Op certificate |
12 | electronic mail to <gnunet\-developers@gnu.org> | 12 | .Sh DESCRIPTION |
13 | .SH SEE ALSO | 13 | .Nm |
14 | gnunet\-transport(1) | 14 | uses openssl to generate a RSA private key and then a self-signed certificate for HTTPS transport. |
15 | .PP | 15 | .Sh SEE ALSO |
16 | The full documentation for | 16 | .Xr gnunet-transport 1 |
17 | .B gnunet | 17 | .sp |
18 | is maintained as a Texinfo manual. | 18 | The full documentation for gnunet is maintained as a Texinfo manual. |
19 | If the | 19 | If the |
20 | .B info | 20 | .Xr info 1 |
21 | and | 21 | and gnunet programs are properly installed at your site, the command |
22 | .B gnunet | 22 | .Pp |
23 | programs are properly installed at your site, the command | 23 | .Dl info gnunet |
24 | .IP | 24 | .Pp |
25 | .B info gnunet | ||
26 | .PP | ||
27 | should give you access to the complete handbook, | 25 | should give you access to the complete handbook, |
28 | .IP | 26 | .Pp |
29 | .B info gnunet-c-tutorial | 27 | .Dl info gnunet-c-tutorial |
30 | .PP | 28 | .Pp |
31 | will give you access to a tutorial for developers. | 29 | will give you access to a tutorial for developers. |
32 | .PP | 30 | .sp |
33 | Depending on your installation, this information is also | 31 | Depending on your installation, this information is also available in |
34 | available in | 32 | .Xr gnunet 7 and |
35 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 33 | .Xr gnunet-c-tutorial 7 . |
34 | .\".Sh HISTORY | ||
35 | .\".Sh AUTHORS | ||
36 | .Sh BUGS | ||
37 | Report bugs by using | ||
38 | .Lk https://bugs.gnunet.org | ||
39 | or by sending electronic mail to | ||
40 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-transport.1 b/doc/man/gnunet-transport.1 index eef762174..f5ed47ad1 100644 --- a/doc/man/gnunet-transport.1 +++ b/doc/man/gnunet-transport.1 | |||
@@ -1,84 +1,92 @@ | |||
1 | .TH GNUNET\-TRANSPORT "1" "October 17, 2015" "GNUnet" | 1 | .Dd October 17, 2015 |
2 | .SH NAME | 2 | .Dt GNUNET-TRANSPORT 1 |
3 | gnunet\-transport \- measure and control the transport subsystem | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-transport | 5 | .Nm gnunet-transport |
6 | [\fIOPTIONS\fR] | 6 | .Nd |
7 | .SH DESCRIPTION | 7 | measure and control the transport subsystem |
8 | .PP | 8 | .Sh SYNOPSIS |
9 | gnunet\-transport is a tool to access various functions of GNUnet's | 9 | .Nm |
10 | transport subsystem from the command\-line. Most of these are not | 10 | .Op Fl b | \-benchmark |
11 | expected to be useful for end-users. gnunet\-transport can be used to | 11 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
12 | evaluate the performance of the transports, force a peer to connect to | 12 | .Op Fl D | \-disconnect |
13 | another peer (if possible). Other functions should be added in the | 13 | .Op Fl e | \-events |
14 | near future. | 14 | .Op Fl h | \-help |
15 | .TP | 15 | .Op Fl i | \-information |
16 | \fB\-b\fR, \fB\-\-benchmark\fR | 16 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
17 | measure how fast we are receiving data (from all connections). On | 17 | .Op Fl l Ar LOGFILE | Fl \-logfile= Ns Ar LOGFILE |
18 | exit, the data rate will be reported. Runs until aborted with CTRL-C. | 18 | .Op Fl m | \-monitor |
19 | .TP | 19 | .Op Fl p Ar PEER | Fl \-peer= Ns Ar PEER |
20 | \fB\-D\fR, \fB\-\-disconnect\fR | 20 | .Op Fl P | \-plugins |
21 | force disconnection from a peer (used in conjunction with \-p). | 21 | .Op Fl s | \-send |
22 | Note that you can use the gnunet\-ats command\-line tool to suggest connects. | 22 | .Op Fl v | \-version |
23 | .TP | 23 | .Op Fl V | \-verbose |
24 | \fB\-c \fIFILENAME\fR, \fB\-\-config=FILENAME\fR | 24 | .Sh DESCRIPTION |
25 | .Nm | ||
26 | is a tool to access various functions of GNUnet's transport subsystem from the command-line. | ||
27 | Most of these are not expected to be useful for end-users. | ||
28 | gnunet-transport can be used to evaluate the performance of the transports, force a peer to connect to another peer (if possible). | ||
29 | Other functions should be added in the near future. | ||
30 | .Bl -tag -width Ds | ||
31 | .It Fl b | \-benchmark | ||
32 | measure how fast we are receiving data (from all connections). | ||
33 | On exit, the data rate will be reported. | ||
34 | Runs until aborted with CTRL-C. | ||
35 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
25 | configuration file to use | 36 | configuration file to use |
26 | .TP | 37 | .It Fl D | \-disconnect |
27 | \fB\-e \fB\-\-events\fR | 38 | force disconnection from a peer (used in conjunction with \-p). |
39 | Note that you can use the gnunet-ats command-line tool to suggest connects. | ||
40 | .It Fl e | \-events | ||
28 | provide information about all connect and disconnect events (continuously) | 41 | provide information about all connect and disconnect events (continuously) |
29 | .TP | 42 | .It Fl h | \-help |
30 | \fB\-h\fR, \fB\-\-help\fR | ||
31 | print help page | 43 | print help page |
32 | .TP | 44 | .It Fl i | \-information |
33 | \fB\-i\fR, \fB\-\-information\fR | ||
34 | print information about our current connections (once) | 45 | print information about our current connections (once) |
35 | .TP | 46 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
36 | \fB\-L \fILOGLEVEL\fR, \fB\-\-loglevel=LOGLEVEL\fR | ||
37 | Change the loglevel. Possible values for LOGLEVEL are ERROR, WARNING, INFO and DEBUG. | 47 | Change the loglevel. Possible values for LOGLEVEL are ERROR, WARNING, INFO and DEBUG. |
38 | .TP | 48 | .It Fl l Ar LOGFILE | Fl \-logfile= Ns Ar LOGFILE |
39 | \fB\-l \fILOGFILE\fR, \fB\-\-logfile=LOGFILE\fR | ||
40 | configure logging to write logs to LOGFILE | 49 | configure logging to write logs to LOGFILE |
41 | .TP | 50 | .It Fl m | \-monitor |
42 | \fB\-m\fR, \fB\-\-monitor\fR | ||
43 | print information about our current connections (continuously) | 51 | print information about our current connections (continuously) |
44 | .TP | 52 | .It Fl p Ar PEER | Fl \-peer= Ns Ar PEER |
45 | \fB\-p \fIPEER\fR, \fB\-\-peer=PEER\fR | ||
46 | the peer identity to connect to or monitor | 53 | the peer identity to connect to or monitor |
47 | .TP | 54 | .It Fl P | \-plugins |
48 | \fB\-P, \fB\-\-plugins\fR | ||
49 | monitor session state of transport plugins | 55 | monitor session state of transport plugins |
50 | .TP | 56 | .It Fl s | \-send |
51 | \fB\-s\fR, \fB\-\-send\fR | ||
52 | transmit (dummy) traffic as quickly as possible to the peer specified | 57 | transmit (dummy) traffic as quickly as possible to the peer specified |
53 | with the \-p option. The rate will still be limited by the quota(s) | 58 | with the \-p option. The rate will still be limited by the quota(s) |
54 | determined by the peers (ATS subsystem). Will run until CTRL\-C is | 59 | determined by the peers (ATS subsystem). Will run until CTRL\-C is |
55 | pressed or until the connection to the other peer is disrupted. | 60 | pressed or until the connection to the other peer is disrupted. |
56 | .TP | 61 | .It Fl v | \-version |
57 | \fB\-v\fR, \fB\-\-version\fR | ||
58 | print the version number | 62 | print the version number |
59 | .TP | 63 | .It Fl V | \-verbose |
60 | \fB\-V\fR, \fB\-\-verbose\fR | ||
61 | be verbose | 64 | be verbose |
62 | .SH "REPORTING BUGS" | 65 | .El |
63 | Report bugs by using mantis <https://bugs.gnunet.org/> or by sending electronic mail to <gnunet\-developers@gnu.org> | 66 | .Sh SEE ALSO |
64 | .SH "SEE ALSO" | 67 | .Xr gnunet-arm 1 , |
65 | \fBgnunet\-arm\fP(1), \fBgnunet\-ats\fP(1) | 68 | .Xr gnunet-ats 1 |
66 | The full documentation for | 69 | .sp |
67 | .B gnunet | 70 | The full documentation for gnunet is maintained as a Texinfo manual. |
68 | is maintained as a Texinfo manual. If the | 71 | If the |
69 | .B info | 72 | .Xr info 1 |
70 | and | 73 | and gnunet programs are properly installed at your site, the command |
71 | .B gnunet | 74 | .Pp |
72 | programs are properly installed at your site, the command | 75 | .Dl info gnunet |
73 | .IP | 76 | .Pp |
74 | .B info gnunet | ||
75 | .PP | ||
76 | should give you access to the complete handbook, | 77 | should give you access to the complete handbook, |
77 | .IP | 78 | .Pp |
78 | .B info gnunet-c-tutorial | 79 | .Dl info gnunet-c-tutorial |
79 | .PP | 80 | .Pp |
80 | will give you access to a tutorial for developers. | 81 | will give you access to a tutorial for developers. |
81 | .PP | 82 | .sp |
82 | Depending on your installation, this information is also | 83 | Depending on your installation, this information is also available in |
83 | available in | 84 | .Xr gnunet 7 and |
84 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 85 | .Xr gnunet-c-tutorial 7 . |
86 | .\".Sh HISTORY | ||
87 | .\".Sh AUTHORS | ||
88 | .Sh BUGS | ||
89 | Report bugs by using | ||
90 | .Lk https://bugs.gnunet.org | ||
91 | or by sending electronic mail to | ||
92 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-unindex.1 b/doc/man/gnunet-unindex.1 index 6aee4f62e..e953ce23a 100644 --- a/doc/man/gnunet-unindex.1 +++ b/doc/man/gnunet-unindex.1 | |||
@@ -1,58 +1,67 @@ | |||
1 | .TH GNUNET-UNINDEX "1" "September 6, 2009" "GNUnet" | 1 | .Dd September 6, 2009 |
2 | .SH NAME | 2 | .Dt GNUNET-UNINDEX 1 |
3 | gnunet\-unindex \- a command line interface for deleting indexed files from GNUnet | 3 | .Sh NAME |
4 | .SH SYNOPSIS | 4 | .Nm gnunet-unindex |
5 | .B gnunet\-unindex | 5 | .Nd |
6 | [\fIOPTIONS\fR] FILENAME | 6 | a command line interface for deleting indexed files from GNUnet |
7 | .SH DESCRIPTION | 7 | .Sh SYNOPSIS |
8 | .PP | 8 | .Nm |
9 | gnunet\-unindex is used for deleting indexed files from GNUnet. | 9 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
10 | .TP | 10 | .Op Fl h | \-help |
11 | \fB\-c \fIFILENAME\fR, \fB\-\-config=FILENAME\fR | 11 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
12 | use config file (defaults: ~/.config/gnunet.conf) | 12 | .Op Fl v | \-version |
13 | .TP | 13 | .Op Fl V | \-verbose |
14 | \fB\-h\fR, \fB\-\-help\fR | 14 | FILENAME |
15 | .Sh DESCRIPTION | ||
16 | .Nm | ||
17 | is used for deleting indexed files from GNUnet. | ||
18 | .Bl -tag -width Ds | ||
19 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
20 | Use config file FILENAME as config (default: ~/.config/gnunet.conf). | ||
21 | .It Fl h | \-help | ||
15 | print help page | 22 | print help page |
16 | .TP | 23 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
17 | \fB\-L \fILOGLEVEL\fR, \fB\-\-loglevel=LOGLEVEL\fR | 24 | Change the loglevel. |
18 | Change the loglevel. Possible values for LOGLEVEL are NOTHING, | 25 | Possible values for LOGLEVEL are NOTHING, ERROR, WARNING, INFO and DEBUG. |
19 | ERROR, WARNING, INFO and DEBUG. | 26 | .It Fl v | \-version |
20 | .TP | ||
21 | \fB\-v\fR, \fB\-\-version\fR | ||
22 | print the version number | 27 | print the version number |
23 | .TP | 28 | .It Fl V | \-verbose |
24 | \fB\-V\fR, \fB\-\-verbose\fR | ||
25 | be verbose | 29 | be verbose |
26 | .SH NOTES | 30 | .El |
27 | You can only unindex files that you indexed and that you still have | 31 | .Sh NOTES |
28 | available locally in full. You should use gnunet\-unindex on files | 32 | You can only unindex files that you indexed and that you still have available locally in full. |
29 | that you indexed (not inserted) and that you are going to delete or | 33 | You should use gnunet-unindex on files that you indexed (not inserted) and that you are going to delete or move locally. |
30 | move locally. | 34 | .Sh FILES |
31 | .TP | ||
32 | .SH FILES | ||
33 | .TP | 35 | .TP |
34 | ~/.config/gnunet.conf | 36 | ~/.config/gnunet.conf |
35 | GNUnet configuration file | 37 | GNUnet configuration file |
36 | .SH "REPORTING BUGS" | 38 | .Sh SEE ALSO |
37 | Report bugs to <https://bugs.gnunet.org/> or by sending electronic mail to <gnunet\-developers@gnu.org> | 39 | .Xr gnunet-fs-gtk 1 , |
38 | .SH "SEE ALSO" | 40 | .Xr gnunet-publish 1 , |
39 | \fBgnunet\-fs\-gtk\fP(1), \fBgnunet\-publish\fP(1), \fBgnunet\-search\fP(1), \fBgnunet\-download\fP(1), \fBgnunet.conf\fP(5) | 41 | .Xr gnunet-search 1 , |
40 | The full documentation for | 42 | .Xr gnunet-download 1 , |
41 | .B gnunet | 43 | .Xr gnunet.conf 5 |
42 | is maintained as a Texinfo manual. If the | 44 | .sp |
43 | .B info | 45 | The full documentation for gnunet is maintained as a Texinfo manual. |
44 | and | 46 | If the |
45 | .B gnunet | 47 | .Xr info 1 |
46 | programs are properly installed at your site, the command | 48 | and gnunet programs are properly installed at your site, the command |
47 | .IP | 49 | .Pp |
48 | .B info gnunet | 50 | .Dl info gnunet |
49 | .PP | 51 | .Pp |
50 | should give you access to the complete handbook, | 52 | should give you access to the complete handbook, |
51 | .IP | 53 | .Pp |
52 | .B info gnunet-c-tutorial | 54 | .Dl info gnunet-c-tutorial |
53 | .PP | 55 | .Pp |
54 | will give you access to a tutorial for developers. | 56 | will give you access to a tutorial for developers. |
55 | .PP | 57 | .sp |
56 | Depending on your installation, this information is also | 58 | Depending on your installation, this information is also available in |
57 | available in | 59 | .Xr gnunet 7 and |
58 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 60 | .Xr gnunet-c-tutorial 7 . |
61 | .\".Sh HISTORY | ||
62 | .\".Sh AUTHORS | ||
63 | .Sh BUGS | ||
64 | Report bugs by using | ||
65 | .Lk https://bugs.gnunet.org | ||
66 | or by sending electronic mail to | ||
67 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-uri.1 b/doc/man/gnunet-uri.1 index 2fe1a05d2..bb525ef7f 100644 --- a/doc/man/gnunet-uri.1 +++ b/doc/man/gnunet-uri.1 | |||
@@ -1,49 +1,54 @@ | |||
1 | .TH GNUNET-URI 1 "June 26, 2012" "GNUnet" | 1 | .Dd June 26, 2012 |
2 | .SH NAME | 2 | .Dt GNUNET-URI 1 |
3 | gnunet\-uri \- invoke default handler for GNUnet URIs | 3 | .Os |
4 | .SH SYNOPSIS | 4 | .Sh NAME |
5 | .B gnunet\-uri | 5 | .Nm gnunet-uri |
6 | .RI URI | 6 | .Nd |
7 | .SH DESCRIPTION | 7 | invoke default handler for GNUnet URIs |
8 | \fBgnunet\-uri\fP can be used to invoke the correct tool to handle a | 8 | .Sh SYNOPSIS |
9 | GNUnet URI. GNUnet URIs have the format "gnunet://SUBSYSTEM/DETAILS" | 9 | .Nm |
10 | and thus the specific tool to handle the URI depends on the subsystem. | 10 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
11 | gnunet\-uri will determine the correct tool (by looking for SUBSYSTEM | 11 | .Op Fl h | \-help |
12 | in the configuration section "uri") and invoke it. | 12 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
13 | .SH OPTIONS | 13 | .Op Fl v | \-version |
14 | .B | 14 | URI |
15 | .IP "\-c FILENAME, \-\-config=FILENAME" | 15 | .Sh DESCRIPTION |
16 | .Nm | ||
17 | can be used to invoke the correct tool to handle a GNUnet URI. | ||
18 | GNUnet URIs have the format "gnunet://SUBSYSTEM/DETAILS" and thus the specific tool to handle the URI depends on the subsystem. | ||
19 | gnunet-uri will determine the correct tool (by looking for SUBSYSTEM in the configuration section "uri") and invoke it. | ||
20 | .Bl -tag -width Ds | ||
21 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
16 | Use the configuration file FILENAME. | 22 | Use the configuration file FILENAME. |
17 | .B | 23 | .It Fl h | \-help |
18 | .IP "\-h, \-\-help" | ||
19 | Print short help on options. | 24 | Print short help on options. |
20 | .B | 25 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
21 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | 26 | Use LOGLEVEL for logging. |
22 | Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. | 27 | Valid values are DEBUG, INFO, WARNING and ERROR. |
23 | .B | 28 | .It Fl v | \-version |
24 | .IP "\-v, \-\-version" | ||
25 | Print GNUnet version number. | 29 | Print GNUnet version number. |
26 | .SH BUGS | 30 | .El |
27 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 31 | .Sh SEE ALSO |
28 | electronic mail to <gnunet\-developers@gnu.org> | 32 | The full documentation for gnunet is maintained as a Texinfo manual. |
29 | .SH SEE ALSO | ||
30 | The full documentation for | ||
31 | .B gnunet | ||
32 | is maintained as a Texinfo manual. | ||
33 | If the | 33 | If the |
34 | .B info | 34 | .Xr info 1 |
35 | and | 35 | and gnunet programs are properly installed at your site, the command |
36 | .B gnunet | 36 | .Pp |
37 | programs are properly installed at your site, the command | 37 | .Dl info gnunet |
38 | .IP | 38 | .Pp |
39 | .B info gnunet | ||
40 | .PP | ||
41 | should give you access to the complete handbook, | 39 | should give you access to the complete handbook, |
42 | .IP | 40 | .Pp |
43 | .B info gnunet-c-tutorial | 41 | .Dl info gnunet-c-tutorial |
44 | .PP | 42 | .Pp |
45 | will give you access to a tutorial for developers. | 43 | will give you access to a tutorial for developers. |
46 | .PP | 44 | .sp |
47 | Depending on your installation, this information is also | 45 | Depending on your installation, this information is also available in |
48 | available in | 46 | .Xr gnunet 7 and |
49 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 47 | .Xr gnunet-c-tutorial 7 . |
48 | .\".Sh HISTORY | ||
49 | .\".Sh AUTHORS | ||
50 | .Sh BUGS | ||
51 | Report bugs by using | ||
52 | .Lk https://bugs.gnunet.org | ||
53 | or by sending electronic mail to | ||
54 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-vpn.1 b/doc/man/gnunet-vpn.1 index ddb53a7bd..e0fd2b78c 100644 --- a/doc/man/gnunet-vpn.1 +++ b/doc/man/gnunet-vpn.1 | |||
@@ -1,101 +1,98 @@ | |||
1 | .TH GNUNET\-VPN 1 "February 25, 2012" "GNUnet" | 1 | .Dd February 25, 2012 |
2 | .SH NAME | 2 | .Dt GNUNET-VPN 1 |
3 | gnunet\-vpn \- manually setup a GNUnet VPN tunnel | 3 | .Sh NAME |
4 | .SH SYNOPSIS | 4 | .Nm gnunet-vpn |
5 | .B gnunet\-vpn | 5 | .Nd |
6 | .RI [ options ] | 6 | manually setup a GNUnet VPN tunnel |
7 | .br | 7 | .Sh SYNOPSIS |
8 | .SH DESCRIPTION | 8 | .Nm |
9 | \fBgnunet\-vpn\fP can be used to manually setup a VPN tunnel via the | 9 | .Op Fl 4 | \-ipv4 |
10 | GNUnet network. | 10 | .Op Fl 6 | \-ipv6 |
11 | .Op Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME | ||
12 | .Op Fl d Ar TIME | Fl \-duration Ar TIME | ||
13 | .Op Fl h | \-help | ||
14 | .Op Fl i Ar IP | Fl \-ip Ar IP | ||
15 | .Op Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL | ||
16 | .Op Fl p Ar PEERID | Fl \-peer= Ns Ar PEERID | ||
17 | .Op Fl s Ar NAME | Fl \-service= Ns Ar NAME | ||
18 | .Op Fl t | \-tcp | ||
19 | .Op Fl u | \-udp | ||
20 | .Op Fl V | \-verbose | ||
21 | .Op Fl v | \-version | ||
22 | .Sh DESCRIPTION | ||
23 | .Nm | ||
24 | can be used to manually setup a VPN tunnel via the GNUnet network. | ||
11 | There are two main types of tunnels. | 25 | There are two main types of tunnels. |
12 | Tunnels to an exit node which routes the traffic to the global | 26 | Tunnels to an exit node which routes the traffic to the global Internet, and tunnels to a node that runs a service only within GNUnet. |
13 | Internet, and tunnels to a node that runs a service only within | ||
14 | GNUnet. | ||
15 | Depending on the type of tunnel, gnunet\-vpn takes different options. | 27 | Depending on the type of tunnel, gnunet\-vpn takes different options. |
16 | The "\-i" option is required for tunnels to an exit node, whereas the | 28 | The "\-i" option is required for tunnels to an exit node, whereas the "\-p" and "\-s" options in conjunction with either "\-u" or "\-t" are required for tunnels to services. |
17 | "\-p" and "\-s" options in conjunction with either "\-u" or "\-t" are | ||
18 | required for tunnels to services. | ||
19 | For exit tunnels, both UDP and TCP traffic will be redirected. | 29 | For exit tunnels, both UDP and TCP traffic will be redirected. |
20 | For service tunnels, either UDP ("\-u") or TCP ("\-t") traffic will | 30 | For service tunnels, either UDP ("\-u") or TCP ("\-t") traffic will be redirected. |
21 | be redirected. | ||
22 | The tool will display the IP address for this end of the tunnel. | 31 | The tool will display the IP address for this end of the tunnel. |
23 | The address can be displayed as soon as it has been allocated, or only | 32 | The address can be displayed as soon as it has been allocated, or only after ("\-a") the tunnel has been created. |
24 | after ("\-a") the tunnel has been created. | 33 | .Bl -tag -width Ds |
25 | .SH OPTIONS | 34 | .It Fl 4 | \-ipv4 |
26 | .B | ||
27 | .IP "\-4, \-\-ipv4" | ||
28 | Desired IP address on this end of the tunnel should be an IPv4 address. | 35 | Desired IP address on this end of the tunnel should be an IPv4 address. |
29 | .B | 36 | .It Fl 6 | \-ipv6 |
30 | .IP "\-6, \-\-ipv6" | ||
31 | Desired IP address on this end of the tunnel should be an IPv6 address. | 37 | Desired IP address on this end of the tunnel should be an IPv6 address. |
32 | .B | 38 | .It Fl c Ar FILENAME | Fl \-config= Ns Ar FILENAME |
33 | .IP "\-c FILENAME, \-\-config=FILENAME" | ||
34 | Use the configuration file FILENAME. | 39 | Use the configuration file FILENAME. |
35 | .B | 40 | .It Fl d Ar TIME | Fl \-duration Ar TIME |
36 | .IP "\-d TIME, \-\-duration TIME" | ||
37 | The mapping should be established for TIME. | 41 | The mapping should be established for TIME. |
38 | The value given must be a number followed by a space and a time unit, | 42 | The value given must be a number followed by a space and a time unit, for example "500 ms". |
39 | for example "500 ms". | ||
40 | Note that the quotes are required on the shell. | 43 | Note that the quotes are required on the shell. |
41 | Default is 5 minutes. | 44 | Default is 5 minutes. |
42 | .B | 45 | .It Fl h | \-help |
43 | .IP "\-h, \-\-help" | ||
44 | Print short help on options. | 46 | Print short help on options. |
45 | .B | 47 | .It Fl i Ar IP | Fl \-ip Ar IP |
46 | .IP "\-i IP, \-\-ip IP" | ||
47 | Tunnel should be to an exit node and connect to the given IPv4 or IPv6 | 48 | Tunnel should be to an exit node and connect to the given IPv4 or IPv6 |
48 | IP address. | 49 | IP address. |
49 | Note that you can specify an IPv6 address as the target here, even in | 50 | Note that you can specify an IPv6 address as the target here, even in |
50 | combination with "\-4" (4to6) and similarly you can specify an IPv4 | 51 | combination with "\-4" (4to6) and similarly you can specify an IPv4 |
51 | address in combination with "\-6" (6to4). | 52 | address in combination with "\-6" (6to4). |
52 | .B | 53 | .It Fl L Ar LOGLEVEL | Fl \-loglevel= Ns Ar LOGLEVEL |
53 | .IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" | ||
54 | Use LOGLEVEL for logging. | 54 | Use LOGLEVEL for logging. |
55 | Valid values are DEBUG, INFO, WARNING and ERROR. | 55 | Valid values are DEBUG, INFO, WARNING and ERROR. |
56 | .B | 56 | .It Fl p Ar PEERID | Fl \-peer= Ns Ar PEERID |
57 | .IP "\-p PEERID, \-\-peer=PEERID" | ||
58 | Name of the peer offering the service to connect to. | 57 | Name of the peer offering the service to connect to. |
59 | Cannot be used in conjunction with "\-i", requires "\-s". | 58 | Cannot be used in conjunction with "\-i", requires "\-s". |
60 | .B | 59 | .It Fl s Ar NAME | Fl \-service= Ns Ar NAME |
61 | .IP "\-s NAME, \-\-service=NAME" | ||
62 | Name of the service running on the target peer. | 60 | Name of the service running on the target peer. |
63 | Cannot be used in conjunction with "\-i", requires "\-p". | 61 | Cannot be used in conjunction with "\-i", requires "\-p". |
64 | .B | 62 | .It Fl t | \-tcp |
65 | .IP "\-t, \-\-tcp" | ||
66 | Service runs TCP. | 63 | Service runs TCP. |
67 | Either "\-t" or "\-u" must be specified when using "\-s". | 64 | Either "\-t" or "\-u" must be specified when using "\-s". |
68 | .B | 65 | .It Fl u | \-udp |
69 | .IP "\-u, \-\-udp" | ||
70 | Service runs UDP. | 66 | Service runs UDP. |
71 | Either "\-t" or "\-u" must be specified when using "\-s". | 67 | Either "\-t" or "\-u" must be specified when using "\-s". |
72 | .B | 68 | .It Fl V | \-verbose |
73 | .IP "\-V, \-\-verbose" | ||
74 | Be verbose. | 69 | Be verbose. |
75 | .B | 70 | .It Fl v | \-version |
76 | .IP "\-v, \-\-version" | ||
77 | Print GNUnet version number. | 71 | Print GNUnet version number. |
78 | .SH BUGS | 72 | .El |
79 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 73 | .Sh SEE ALSO |
80 | electronic mail to <gnunet\-developers@gnu.org> | 74 | .Xr gnunet-setup 1 |
81 | .SH SEE ALSO | 75 | .sp |
82 | gnunet\-setup(1) | 76 | The full documentation for gnunet is maintained as a Texinfo manual. |
83 | The full documentation for | 77 | If the |
84 | .B gnunet | 78 | .Xr info 1 |
85 | is maintained as a Texinfo manual. If the | 79 | and gnunet programs are properly installed at your site, the command |
86 | .B info | 80 | .Pp |
87 | and | 81 | .Dl info gnunet |
88 | .B gnunet | 82 | .Pp |
89 | programs are properly installed at your site, the command | ||
90 | .IP | ||
91 | .B info gnunet | ||
92 | .PP | ||
93 | should give you access to the complete handbook, | 83 | should give you access to the complete handbook, |
94 | .IP | 84 | .Pp |
95 | .B info gnunet-c-tutorial | 85 | .Dl info gnunet-c-tutorial |
96 | .PP | 86 | .Pp |
97 | will give you access to a tutorial for developers. | 87 | will give you access to a tutorial for developers. |
98 | .PP | 88 | .sp |
99 | Depending on your installation, this information is also | 89 | Depending on your installation, this information is also available in |
100 | available in | 90 | .Xr gnunet 7 and |
101 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 91 | .Xr gnunet-c-tutorial 7 . |
92 | .\".Sh HISTORY | ||
93 | .\".Sh AUTHORS | ||
94 | .Sh BUGS | ||
95 | Report bugs by using | ||
96 | .Lk https://bugs.gnunet.org | ||
97 | or by sending electronic mail to | ||
98 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet-zoneimport.1 b/doc/man/gnunet-zoneimport.1 index 2a67718f9..e99b235b8 100644 --- a/doc/man/gnunet-zoneimport.1 +++ b/doc/man/gnunet-zoneimport.1 | |||
@@ -1,90 +1,106 @@ | |||
1 | .TH GNUNET-ZONEIMPORT 1 "April 23, 2018" "GNUnet" | 1 | .\" This file is part of GNUnet. |
2 | .SH NAME | 2 | .\" Copyright (C) 2018, 2019 GNUnet e.V. |
3 | gnunet\-zoneimport \- import DNS zone into GNS zone | 3 | .\" |
4 | .SH SYNOPSIS | 4 | .\" Permission is granted to copy, distribute and/or modify this document |
5 | .B gnunet\-zoneimport [IP]+ | 5 | .\" under the terms of the GNU Free Documentation License, Version 1.3 or |
6 | .SH DESCRIPTION | 6 | .\" any later version published by the Free Software Foundation; with no |
7 | \fBgnunet\-zoneimport\fP reads a list of domain names (FQDN) from | 7 | .\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A |
8 | stdin and issues DNS queries for each of the domain names given. It | 8 | .\" copy of the license is included in the file |
9 | then checks if a local ego with a name matching the domain | 9 | .\" ``FDL-1.3''. |
10 | exists. Specifically, if the domain name is "example.fr", it will | 10 | .\" |
11 | check if an ego "fr" exists, while for a domain "example.com.fr" it | 11 | .\" A copy of the license is also available from the Free Software |
12 | will look for an ego called "com.fr"). If so, it will convert the DNS | 12 | .\" Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}. |
13 | records into GNS records (in particular converting NS records and glue | 13 | .\" |
14 | records to GNS2DNS records) and add them to the namestore under the | 14 | .\" Alternately, this document is also available under the General |
15 | label ("example" in the examples above). | 15 | .\" Public License, version 3 or later, as published by the Free Software |
16 | .PP | 16 | .\" Foundation. A copy of the license is included in the file |
17 | The arguments given to gnunet\-zoneimport is a list of IP addresses of | 17 | .\" ``GPL3''. |
18 | DNS servers to query. | 18 | .\" |
19 | .PP | 19 | .\" A copy of the license is also available from the Free Software |
20 | gnunet\-zoneimport will usually never terminate: it will check when | 20 | .\" Foundation Web site at @url{http://www.gnu.org/licenses/gpl.html}. |
21 | DNS records expire, and re-issue requests when the old DNS records | 21 | .\" |
22 | have expired so that GNS always has the latest data. | 22 | .\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later |
23 | .PP | 23 | .\" |
24 | gnunet\-zoneimport will issue many DNS queries in parallel, but is | 24 | .Dd April 23, 2018 |
25 | rate-limited in various ways, so most DNS servers should easily handle | 25 | .Dt GNUNET-ZONEIMPORT 1 |
26 | the load. gnunet\-zoneimport will perform a limited number of retries | 26 | .Os |
27 | if queries fail. | 27 | .Sh NAME |
28 | .PP | 28 | .Nm gnunet-zoneimport |
29 | gnunet\-zoneimport operates incrementally. It will check if the | 29 | .Nd |
30 | namestore already has (non-expired) records stored for a given name in | 30 | import DNS zone into GNS zone |
31 | the respective zone and not issue those requests again. Thus, it is | 31 | .Sh SYNOPSIS |
32 | fine to restart gnunet\-zoneimport whenever the list of domain names | 32 | .Nm |
33 | changes. | 33 | .Op Fl c Ar FILENAME | \-config= Ns Ar FILENAME |
34 | .PP | 34 | .Op Fl h | \-help |
35 | Finally, gnunet\-zoneimport keeps information for each domain name in | 35 | .Op Fl m Ar RELATIVETIME | Fl \-minimum-expiration= Ns Ar RELATIVETIME |
36 | memory. This consumes about 200 bytes per domain name, or 1 GB for 5 | 36 | .Op Fl s Ar MAPSIZE | Fl \-size= Ns Ar MAPSIZE |
37 | million labels. | 37 | .Op Ar \IP |
38 | .SH OPTIONS | 38 | .Sh DESCRIPTION |
39 | .B | 39 | .Nm |
40 | .IP "\-c FILENAME, \-\-config=FILENAME" | 40 | reads a list of domain names (FQDN) from stdin and issues DNS queries for each of the domain names given. |
41 | It then checks if a local ego with a name matching the domain exists. | ||
42 | Specifically, if the domain name is "example.fr", it will check if an ego "fr" exists, while for a domain "example.com.fr" it will look for an ego called "com.fr"). | ||
43 | If so, it will convert the DNS records into GNS records (in particular converting NS records and glue records to GNS2DNS records) and add them to the namestore under the label ("example" in the examples above). | ||
44 | .Pp | ||
45 | The arguments given to gnunet-zoneimport is a list of IP addresses of DNS servers to query. | ||
46 | .Pp | ||
47 | gnunet-zoneimport will usually never terminate: it will check when DNS records expire, and re-issue requests when the old DNS records have expired so that GNS always has the latest data. | ||
48 | .Pp | ||
49 | gnunet-zoneimport will issue many DNS queries in parallel, but is rate-limited in various ways, so most DNS servers should easily handle the load. | ||
50 | gnunet-zoneimport will perform a limited number of retries if queries fail. | ||
51 | .Pp | ||
52 | gnunet-zoneimport operates incrementally. | ||
53 | It will check if the namestore already has (non-expired) records stored for a given name in the respective zone and not issue those requests again. | ||
54 | Thus, it is fine to restart gnunet-zoneimport whenever the list of domain names changes. | ||
55 | .Pp | ||
56 | Finally, gnunet-zoneimport keeps information for each domain name in memory. | ||
57 | This consumes about 200 bytes per domain name, or 1 GB for 5 million labels. | ||
58 | .Bl -tag -width Ds | ||
59 | .It Fl c Ar FILENAME | \-config= Ns Ar FILENAME | ||
41 | Use the configuration file FILENAME. | 60 | Use the configuration file FILENAME. |
42 | .B | 61 | .It Fl h | \-help |
43 | .IP "\-h, \-\-help" | ||
44 | Print short help on options. | 62 | Print short help on options. |
45 | .B | 63 | .It Fl m Ar RELATIVETIME | Fl \-minimum-expiration= Ns Ar RELATIVETIME |
46 | .IP "\-m RELATIVETIME, \-\-minimum-expiration=RELATIVETIME" | 64 | Ensure that imported DNS records never have an expiration time that is less than RELATIVETIME into the future. |
47 | .B | 65 | RELATIVETIME is a time given like "1 week" or "1 h". |
48 | Ensure that imported DNS records never have an expiration time that | 66 | If DNS returns records with a shorter lifetime, gnunet\-zoneimport will simply bump the lifetime to the specified value (relative to the time of the import). |
49 | is less than RELATIVETIME into the future. RELATIVETIME is a time | 67 | Default is zero. |
50 | given like "1 week" or "1 h". If DNS returns records with a shorter | 68 | .It Fl s Ar MAPSIZE | Fl \-size= Ns Ar MAPSIZE |
51 | lifetime, gnunet\-zoneimport will simply bump the lifetime to the | 69 | Specifies the size (in number of entries) to use for the main hash map. |
52 | specified value (relative to the time of the import). Default is zero. | 70 | The value provided should be at least twice the number of domain names that will be given to the tool. |
53 | .IP "\-s MAPSIZE, \-\-size=MAPSIZE" | 71 | This option is required for very large zones where the number of records encountered is too large for the automatic growth mechanism to work (that one is limited to at most 16 MB allocations for security reasons). |
54 | Specifies the size (in number of entries) to use for the main hash | 72 | Do not worry about this unless you are importing millions of domain names from a zone. |
55 | map. The value provided should be at least twice the number of domain | 73 | .It Ar \IP |
56 | names that will be given to the tool. This option is required for very | 74 | IP Is the list of IPs given. |
57 | large zones where the number of records encountered is too large for | 75 | .El |
58 | the automatic growth mechanism to work (that one is limited to at most | 76 | .Sh EXAMPLES |
59 | 16 MB allocations for security reasons). Do not worry about this | ||
60 | unless you are importing millions of domain names from a zone. | ||
61 | .SH NOTES | ||
62 | .TP | ||
63 | Typical invocaton would be: | 77 | Typical invocaton would be: |
64 | $ gnunet\-zoneimport 1.2.3.4 < names.txt | 78 | .Pp |
65 | .SH BUGS | 79 | .Dl $ gnunet\-zoneimport 1.2.3.4 < names.txt |
66 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | 80 | .Sh SEE ALSO |
67 | electronic mail to <gnunet\-developers@gnu.org> | 81 | .Xr gnunet-gns 1 , |
68 | .SH SEE ALSO | 82 | .Xr gnunet-namestore 1 |
69 | gnunet\-gns(1), gnunet\-namestore(1) | 83 | .sp |
70 | .PP | 84 | The full documentation for gnunet is maintained as a Texinfo manual. |
71 | The full documentation for | ||
72 | .B gnunet | ||
73 | is maintained as a Texinfo manual. | ||
74 | If the | 85 | If the |
75 | .B info | 86 | .Xr info 1 |
76 | and | 87 | and gnunet programs are properly installed at your site, the command |
77 | .B gnunet | 88 | .Pp |
78 | programs are properly installed at your site, the command | 89 | .Dl info gnunet |
79 | .IP | 90 | .Pp |
80 | .B info gnunet | ||
81 | .PP | ||
82 | should give you access to the complete handbook, | 91 | should give you access to the complete handbook, |
83 | .IP | 92 | .Pp |
84 | .B info gnunet-c-tutorial | 93 | .Dl info gnunet-c-tutorial |
85 | .PP | 94 | .Pp |
86 | will give you access to a tutorial for developers. | 95 | will give you access to a tutorial for developers. |
87 | .PP | 96 | .sp |
88 | Depending on your installation, this information is also | 97 | Depending on your installation, this information is also available in |
89 | available in | 98 | .Xr gnunet 7 and |
90 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 99 | .Xr gnunet-c-tutorial 7 . |
100 | .\".Sh HISTORY | ||
101 | .\".Sh AUTHORS | ||
102 | .Sh BUGS | ||
103 | Report bugs by using | ||
104 | .Lk https://bugs.gnunet.org | ||
105 | or by sending electronic mail to | ||
106 | .Aq Mt gnunet-developers@gnu.org . | ||
diff --git a/doc/man/gnunet.conf.5.in b/doc/man/gnunet.conf.5.in index 560704784..82340996a 100644 --- a/doc/man/gnunet.conf.5.in +++ b/doc/man/gnunet.conf.5.in | |||
@@ -1,4 +1,27 @@ | |||
1 | .\" -*- mode: nroff -*- | 1 | .\" -*- mode: nroff -*- |
2 | .\" This file is part of Ascension. | ||
3 | .\" Copyright (C) 2012-2015,2018,2019 GNUnet e.V. | ||
4 | .\" | ||
5 | .\" Permission is granted to copy, distribute and/or modify this document | ||
6 | .\" under the terms of the GNU Free Documentation License, Version 1.3 or | ||
7 | .\" any later version published by the Free Software Foundation; with no | ||
8 | .\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A | ||
9 | .\" copy of the license is included in the file | ||
10 | .\" ``FDL-1.3''. | ||
11 | .\" | ||
12 | .\" A copy of the license is also available from the Free Software | ||
13 | .\" Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}. | ||
14 | .\" | ||
15 | .\" Alternately, this document is also available under the General | ||
16 | .\" Public License, version 3 or later, as published by the Free Software | ||
17 | .\" Foundation. A copy of the license is included in the file | ||
18 | .\" ``GPL3''. | ||
19 | .\" | ||
20 | .\" A copy of the license is also available from the Free Software | ||
21 | .\" Foundation Web site at @url{http://www.gnu.org/licenses/gpl.html}. | ||
22 | .\" | ||
23 | .\" SPDX-License-Identifier: GPL3.0-or-later OR FDL1.3-or-later | ||
24 | .\" | ||
2 | .TH GNUNET.CONF "5" "October 26, 2018" "GNUnet" | 25 | .TH GNUNET.CONF "5" "October 26, 2018" "GNUnet" |
3 | .SH NAME | 26 | .SH NAME |
4 | gnunet.conf \- GNUnet configuration file | 27 | gnunet.conf \- GNUnet configuration file |
@@ -27,7 +50,7 @@ Default values for all of the options can be found in the files in the | |||
27 | "$GNUNET_PREFIX/share/gnunet/config.d/" directory. A typical setup will | 50 | "$GNUNET_PREFIX/share/gnunet/config.d/" directory. A typical setup will |
28 | work out of the box with those. See the examples section below for | 51 | work out of the box with those. See the examples section below for |
29 | some common setups on top of that. | 52 | some common setups on top of that. |
30 | .SH General OPTIONS | 53 | .SS GENERAL OPTIONS |
31 | Many options will be common between sections. They can be repeated under | 54 | Many options will be common between sections. They can be repeated under |
32 | each section with different values. The "[PATHS]" section is special. | 55 | each section with different values. The "[PATHS]" section is special. |
33 | Here, it is possible to specify values for variables like "GNUNET_HOME". | 56 | Here, it is possible to specify values for variables like "GNUNET_HOME". |
@@ -85,7 +108,7 @@ The following options are generic and shared by all services: | |||
85 | Set to YES if this service should be run per-user, NO if this is a system | 108 | Set to YES if this service should be run per-user, NO if this is a system |
86 | service. End-users should never have to change the defaults GNUnet provides | 109 | service. End-users should never have to change the defaults GNUnet provides |
87 | for this option. | 110 | for this option. |
88 | .SH ATS Options | 111 | .SS ATS OPTIONS |
89 | .IP UNSPECIFIED_QUOTA_IN | 112 | .IP UNSPECIFIED_QUOTA_IN |
90 | quotes in KiB or MiB per seconds. Or use the word "unlimited" | 113 | quotes in KiB or MiB per seconds. Or use the word "unlimited" |
91 | .IP UNSPECIFIED_QUOTA_OUT | 114 | .IP UNSPECIFIED_QUOTA_OUT |
@@ -109,12 +132,11 @@ The following options are generic and shared by all services: | |||
109 | .SH EXAMPLES | 132 | .SH EXAMPLES |
110 | This example is a simple way to get started, using a server that has a known | 133 | This example is a simple way to get started, using a server that has a known |
111 | list of peers to get you started. Most users will be behind a firewall on | 134 | list of peers to get you started. Most users will be behind a firewall on |
112 | IPv4, as such NAT is enabled. Please rememeber to change your IP address | 135 | IPv4, as such NAT is enabled. Please remember to change your IP address |
113 | to the actual external address for your usage. | 136 | to the actual external address for your usage. |
114 | .PP | 137 | .PP |
115 | [hostlist] | 138 | [hostlist] |
116 | OPTIONS = \-b | 139 | OPTIONS = \-b \-e |
117 | SERVERS = http://v9.gnunet.org:58080/ | ||
118 | 140 | ||
119 | [nat] | 141 | [nat] |
120 | BEHIND_NAT = YES | 142 | BEHIND_NAT = YES |
@@ -129,9 +151,6 @@ to the actual external address for your usage. | |||
129 | .TP | 151 | .TP |
130 | ~/.config/gnunet.conf | 152 | ~/.config/gnunet.conf |
131 | GNUnet configuration file | 153 | GNUnet configuration file |
132 | .SH BUGS | ||
133 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | ||
134 | electronic mail to <bug-gnunet@gnu.org> | ||
135 | .SH SEE ALSO | 154 | .SH SEE ALSO |
136 | \fBgnunet\-setup\fP(1), \fBgnunet\-arm\fP(1) | 155 | \fBgnunet\-setup\fP(1), \fBgnunet\-arm\fP(1) |
137 | .PP | 156 | .PP |
@@ -155,3 +174,9 @@ will give you access to a tutorial for developers. | |||
155 | Depending on your installation, this information is also | 174 | Depending on your installation, this information is also |
156 | available in | 175 | available in |
157 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). | 176 | \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7). |
177 | .SH HISTORY | ||
178 | .PP | ||
179 | This man page first appeared in October 2012 in GNUnet. | ||
180 | .SH BUGS | ||
181 | Report bugs by using Mantis <https://bugs.gnunet.org/> or by sending | ||
182 | electronic mail to <bug-gnunet@gnu.org> | ||
diff --git a/doc/man/produce_html.sh b/doc/man/produce_html.sh new file mode 100755 index 000000000..ce6dea304 --- /dev/null +++ b/doc/man/produce_html.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | existence() | ||
4 | { | ||
5 | command -v "$1" >/dev/null 2>&1 | ||
6 | } | ||
7 | |||
8 | if existence mandoc; | ||
9 | then | ||
10 | for f in `find . -name \*\.[1-9]`; | ||
11 | do | ||
12 | mandoc -T html $f > $f.html; | ||
13 | done | ||
14 | fi | ||
diff --git a/doc/man/texi2mdoc-generation.sh b/doc/man/texi2mdoc-generation.sh new file mode 100755 index 000000000..b88987cda --- /dev/null +++ b/doc/man/texi2mdoc-generation.sh | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/bin/sh | ||
2 | # This script is in the public-domain. | ||
3 | # GNUnet e.V. 2019 | ||
4 | # | ||
5 | # Commentary: generate texi2mdoc output. This would be easier with | ||
6 | # bmake / BSDmake, oh well. | ||
7 | # | ||
8 | # Excercise for future readers: don't fix this. | ||
9 | |||
10 | # echo $(pwd) | ||
11 | cd ../tutorial | ||
12 | texi2mdoc -I$(pwd):$(pwd)/chapters gnunet-tutorial.texi > ../man/gnunet-c-tutorial.7 | ||
13 | # echo $(pwd) | ||
14 | cd ../handbook | ||
15 | texi2mdoc -I$(pwd):$(pwd)/chapters gnunet.texi > ../man/gnunet-documentation.7 | ||
diff --git a/doc/tutorial/Makefile.am b/doc/tutorial/Makefile.am index d0fd14a4a..f3908aa99 100644 --- a/doc/tutorial/Makefile.am +++ b/doc/tutorial/Makefile.am | |||
@@ -8,7 +8,7 @@ docdir = $(datadir)/doc/gnunet/ | |||
8 | # $(DOT_FILES:%.dot=%.pdf) | 8 | # $(DOT_FILES:%.dot=%.pdf) |
9 | 9 | ||
10 | # See ../handbook/Makefile.am comment! | 10 | # See ../handbook/Makefile.am comment! |
11 | AM_MAKEINFOHTMLFLAGS = --no-split --css-include=docstyle.css | 11 | AM_MAKEINFOHTMLFLAGS = --no-split --css-include=style.css --css-include=manual.css |
12 | 12 | ||
13 | #DOT_OPTIONS = \ | 13 | #DOT_OPTIONS = \ |
14 | # -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \ | 14 | # -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \ |
@@ -93,12 +93,7 @@ version.texi/replacement/revert: | |||
93 | @echo "@set VERSION GPACKAGE_VERSION" > gversion.texi | 93 | @echo "@set VERSION GPACKAGE_VERSION" > gversion.texi |
94 | @echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi | 94 | @echo "@set EDITION GPACKAGE_VERSION" >> gversion.texi |
95 | 95 | ||
96 | if TEXI2MDOC_GENERATION | 96 | |
97 | gnunet-tutorial.7: version.texi/replacement | ||
98 | @echo Attempting to output an mdoc formatted section 7 document | ||
99 | @texi2mdoc -I$(pwd):$(pwd)/chapters gnunet-c-tutorial.texi > ../man/gnunet-c-tutorial.7 | ||
100 | # TODO: (Maybe) other outputs resulting from this. | ||
101 | endif | ||
102 | 97 | ||
103 | # FIXME: rm *.html and *.pdf | 98 | # FIXME: rm *.html and *.pdf |
104 | #doc-clean: | 99 | #doc-clean: |
diff --git a/doc/tutorial/gnunet-tutorial.texi b/doc/tutorial/gnunet-tutorial.texi index ef3318cad..df75fb995 100644 --- a/doc/tutorial/gnunet-tutorial.texi +++ b/doc/tutorial/gnunet-tutorial.texi | |||
@@ -1,10 +1,10 @@ | |||
1 | \input texinfo | 1 | \input texinfo |
2 | @c %**start of header | 2 | |
3 | @setfilename gnunet-tutorial.info | 3 | @setfilename gnunet-tutorial.info |
4 | @documentencoding UTF-8 | 4 | @documentencoding UTF-8 |
5 | @settitle GNUnet Tutorial | 5 | @settitle GNUnet Tutorial |
6 | @c @exampleindent 2 | 6 | @c @exampleindent 2 |
7 | @c %**end of header | 7 | |
8 | 8 | ||
9 | @include version.texi | 9 | @include version.texi |
10 | 10 | ||
diff --git a/doc/tutorial/manual.css b/doc/tutorial/manual.css index 404525dc2..0fe08b83c 100644 --- a/doc/tutorial/manual.css +++ b/doc/tutorial/manual.css | |||
@@ -1,6 +1,6 @@ | |||
1 | /* Style-sheet to use for manuals (copied from Emacs) */ | 1 | /* Style-sheet to use for manuals (copied from Emacs) */ |
2 | 2 | ||
3 | @import url('/style.css'); | 3 | @import url('style.css'); |
4 | 4 | ||
5 | /* makeinfo 6.5 converts @quotation to <blockquote>. Highlight them. */ | 5 | /* makeinfo 6.5 converts @quotation to <blockquote>. Highlight them. */ |
6 | blockquote { | 6 | blockquote { |
diff --git a/doc/tutorial/run-gendocs.sh b/doc/tutorial/run-gendocs.sh index 5e60a2d0f..b4899722c 100755 --- a/doc/tutorial/run-gendocs.sh +++ b/doc/tutorial/run-gendocs.sh | |||
@@ -7,7 +7,7 @@ make version.texi/replacement | |||
7 | #mkdir gnunet-c-tutorial | 7 | #mkdir gnunet-c-tutorial |
8 | #mv * gnunet-c-tutorial/ | 8 | #mv * gnunet-c-tutorial/ |
9 | #cd .. | 9 | #cd .. |
10 | ./gendocs.sh --email gnunet-developers@gnu.org gnunet "GNUnet Reference Manual" -o "manual/gnunet" | 10 | #./gendocs.sh --email gnunet-developers@gnu.org gnunet "GNUnet Reference Manual" -o "manual/gnunet" |
11 | #cd manual | 11 | #cd manual |
12 | #mkdir handbook | 12 | #mkdir handbook |
13 | #mkdir ../tmp-gnunet | 13 | #mkdir ../tmp-gnunet |
diff --git a/doc/tutorial/style.css b/doc/tutorial/style.css index 0c4525437..e5271197b 100644 --- a/doc/tutorial/style.css +++ b/doc/tutorial/style.css | |||
@@ -1,6 +1,6 @@ | |||
1 | /* This stylesheet is used by manuals and a few older resources. */ | 1 | /* This stylesheet is used by manuals and a few older resources. */ |
2 | 2 | ||
3 | @import url('/reset.css'); | 3 | @import url('reset.css'); |
4 | 4 | ||
5 | 5 | ||
6 | /*** PAGE LAYOUT ***/ | 6 | /*** PAGE LAYOUT ***/ |
diff --git a/lint/.gitignore b/lint/.gitignore new file mode 100644 index 000000000..6dd860453 --- /dev/null +++ b/lint/.gitignore | |||
@@ -0,0 +1 @@ | |||
checkbashisms.pl \ No newline at end of file | |||
diff --git a/lint/Makefile.am b/lint/Makefile.am new file mode 100644 index 000000000..0de8da54a --- /dev/null +++ b/lint/Makefile.am | |||
@@ -0,0 +1,59 @@ | |||
1 | all: check-linters | ||
2 | |||
3 | do_subst = $(SED) -e 's,[@]PERL[@],$(PERL),g' | ||
4 | |||
5 | SUFFIXES = pl.in .pl | ||
6 | |||
7 | checkbashisms.pl: checkbashisms.pl.in Makefile | ||
8 | $(do_subst) < $(srcdir)/checkbashisms.pl.in > checkbashisms.pl | ||
9 | chmod +x checkbashisms.pl | ||
10 | |||
11 | CLEANFILES= \ | ||
12 | checkbashisms.pl | ||
13 | |||
14 | noinst_SCRIPTS = \ | ||
15 | $(CLEANFILES) | ||
16 | |||
17 | # Check for bashisms in shell scripts | ||
18 | # Very verbose, need to exclude more files. | ||
19 | check-bashism: | ||
20 | printf "Run checkbashism on all .sh files.\n" | ||
21 | printf "Currently this expects checkbashism.pl at a fixed location." | ||
22 | find '..' -type f ! -path '*/.*' ! -path '*/_*' -name '*.sh' -print0 | xargs -0 $(srcdir)/checkbashisms.pl -f 2>&1 | tee $(srcdir)/bashism.log || true | ||
23 | |||
24 | check-python: | ||
25 | printf "Running flake8 and 2to3 if detected.\n" | ||
26 | $(top_srcdir)/contrib/scripts/lint-python.sh || true | ||
27 | |||
28 | check-man: | ||
29 | printf "Running lint-man.sh in doc/man.\n" | ||
30 | @cd $(top_srcdir)/doc/man ; ../../contrib/scripts/lint-man.sh || true | ||
31 | |||
32 | # exception to add: ignore license files. | ||
33 | # exception to add: uref's can go above 79 chars. | ||
34 | check-texinfo: | ||
35 | printf "Running basic texinfo linters\n" | ||
36 | printf "...lines containing tabstops?\n" 2>&1 | tee $(top_srcdir)/doc/handbook/texinfo_handbook.log || true | ||
37 | printf "...lines containing tabstops?\n" 2>&1 | tee $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true | ||
38 | @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/\t/ {print FILENAME":"NR":"$$0}' > $(srcdir)/texinfo_handbook.log || true | ||
39 | @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/\t/ {print FILENAME":"NR":"$$0}' > $(srcdir)/texinfo_tutorial.log || true | ||
40 | printf "...line length over 79 chars?\n" 2>&1 | tee $(top_srcdir)/doc/handbook/texinfo_handbook.log || true | ||
41 | @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk 'length>79 {print FILENAME":"NR":"$$0}' > $(srcdir)/texinfo_handbook.log || true | ||
42 | printf "...line length over 79 chars?\n" 2>&1 | tee $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true | ||
43 | @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk 'length>79 {print FILENAME":"NR":"$$0}' > $(srcdir)/texinfo_tutorial.log || true | ||
44 | printf "...lines containing macros incompatible with old makeinfo?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true | ||
45 | @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@geq\{\}/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_handbook.log || true | ||
46 | printf "...lines containing macros incompatible with old makeinfo?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true | ||
47 | @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@geq\{\}/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_tutorial.log || true | ||
48 | printf "...lines containing macros incompatible with texi2mdoc?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true | ||
49 | @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@footnote\{/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_handbook.log || true | ||
50 | printf "...lines containing macros incompatible with texi2mdoc?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true | ||
51 | @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/@footnote\{/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_tutorial.log || true | ||
52 | printf "...lines telling us what is left TODO or to fix?\n" 2>&1 | tee -a $(top_srcdir)/doc/handbook/texinfo_handbook.log || true | ||
53 | @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/TODO/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_handbook.log || true | ||
54 | @cd $(top_srcdir)/doc/handbook ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/XXX/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_handbook.log || true | ||
55 | printf "...lines telling us what is left TODO or to fix?\n" 2>&1 | tee -a $(top_srcdir)/doc/tutorial/texinfo_tutorial.log || true | ||
56 | @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/TODO/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_tutorial.log || true | ||
57 | @cd $(top_srcdir)/doc/tutorial ; find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 awk '/XXX/ {print FILENAME":"NR":"$$0}' >> $(srcdir)/texinfo_tutorial.log || true | ||
58 | |||
59 | check-linters: check-bashism check-python check-man check-texinfo | ||
diff --git a/lint/checkbashisms.1 b/lint/checkbashisms.1 new file mode 100644 index 000000000..6df5f3c78 --- /dev/null +++ b/lint/checkbashisms.1 | |||
@@ -0,0 +1,68 @@ | |||
1 | .TH CHECKBASHISMS 1 "Debian Utilities" "DEBIAN" \" -*- nroff -*- | ||
2 | .SH NAME | ||
3 | checkbashisms \- check for bashisms in /bin/sh scripts | ||
4 | .SH SYNOPSIS | ||
5 | \fBcheckbashisms\fR \fIscript\fR ... | ||
6 | .br | ||
7 | \fBcheckbashisms \-\-help\fR|\fB\-\-version\fR | ||
8 | .SH DESCRIPTION | ||
9 | \fBcheckbashisms\fR, based on one of the checks from the \fBlintian\fR | ||
10 | system, performs basic checks on \fI/bin/sh\fR shell scripts for the | ||
11 | possible presence of bashisms. It takes the names of the shell | ||
12 | scripts on the command line, and outputs warnings if possible bashisms | ||
13 | are detected. | ||
14 | .PP | ||
15 | Note that the definition of a bashism in this context roughly equates | ||
16 | to "a shell feature that is not required to be supported by POSIX"; this | ||
17 | means that some issues flagged may be permitted under optional sections | ||
18 | of POSIX, such as XSI or User Portability. | ||
19 | .PP | ||
20 | In cases where POSIX and Debian Policy disagree, \fBcheckbashisms\fR by | ||
21 | default allows extensions permitted by Policy but may also provide | ||
22 | options for stricter checking. | ||
23 | .SH OPTIONS | ||
24 | .TP | ||
25 | .BR \-\-help ", " \-h | ||
26 | Show a summary of options. | ||
27 | .TP | ||
28 | .BR \-\-newline ", " \-n | ||
29 | Check for "\fBecho \-n\fR" usage (non POSIX but required by Debian Policy 10.4.) | ||
30 | .TP | ||
31 | .BR \-\-posix ", " \-p | ||
32 | Check for issues which are non POSIX but required to be supported by Debian | ||
33 | Policy 10.4 (implies \fB\-n\fR). | ||
34 | .TP | ||
35 | .BR \-\-force ", " \-f | ||
36 | Force each script to be checked, even if it would normally not be (for | ||
37 | instance, it has a bash or non POSIX shell shebang or appears to be a | ||
38 | shell wrapper). | ||
39 | .TP | ||
40 | .BR \-\-extra ", " \-x | ||
41 | Highlight lines which, whilst they do not contain bashisms, may be | ||
42 | useful in determining whether a particular issue is a false positive | ||
43 | which may be ignored. | ||
44 | For example, the use of "\fB$BASH_ENV\fR" may be preceded by checking | ||
45 | whether "\fB$BASH\fR" is set. | ||
46 | .TP | ||
47 | .BR \-\-version ", " \-v | ||
48 | Show version and copyright information. | ||
49 | .SH "EXIT VALUES" | ||
50 | The exit value will be 0 if no possible bashisms or other problems | ||
51 | were detected. Otherwise it will be the sum of the following error | ||
52 | values: | ||
53 | .TP | ||
54 | 1 | ||
55 | A possible bashism was detected. | ||
56 | .TP | ||
57 | 2 | ||
58 | A file was skipped for some reason, for example, because it was | ||
59 | unreadable or not found. The warning message will give details. | ||
60 | .TP | ||
61 | 4 | ||
62 | No bashisms were detected in a bash script. | ||
63 | .SH "SEE ALSO" | ||
64 | .BR lintian (1) | ||
65 | .SH AUTHOR | ||
66 | \fBcheckbashisms\fR was originally written as a shell script by Yann Dirson | ||
67 | <\fIdirson@debian.org\fR> and rewritten in Perl with many more features by | ||
68 | Julian Gilbey <\fIjdg@debian.org\fR>. | ||
diff --git a/lint/checkbashisms.pl.in b/lint/checkbashisms.pl.in new file mode 100755 index 000000000..0b8b06f86 --- /dev/null +++ b/lint/checkbashisms.pl.in | |||
@@ -0,0 +1,814 @@ | |||
1 | #!@PERL@ | ||
2 | |||
3 | # This script is essentially copied from /usr/share/lintian/checks/scripts, | ||
4 | # which is: | ||
5 | # Copyright (C) 1998 Richard Braakman | ||
6 | # Copyright (C) 2002 Josip Rodin | ||
7 | # This version is | ||
8 | # Copyright (C) 2003 Julian Gilbey | ||
9 | # | ||
10 | # This program is free software; you can redistribute it and/or modify | ||
11 | # it under the terms of the GNU General Public License as published by | ||
12 | # the Free Software Foundation; either version 2 of the License, or | ||
13 | # (at your option) any later version. | ||
14 | # | ||
15 | # This program is distributed in the hope that it will be useful, | ||
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | # GNU General Public License for more details. | ||
19 | # | ||
20 | # You should have received a copy of the GNU General Public License | ||
21 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
22 | |||
23 | use strict; | ||
24 | use warnings; | ||
25 | use Getopt::Long qw(:config bundling permute no_getopt_compat); | ||
26 | use File::Temp qw/tempfile/; | ||
27 | |||
28 | sub init_hashes; | ||
29 | |||
30 | (my $progname = $0) =~ s|.*/||; | ||
31 | |||
32 | my $usage = <<"EOF"; | ||
33 | Usage: $progname [-n] [-f] [-x] script ... | ||
34 | or: $progname --help | ||
35 | or: $progname --version | ||
36 | This script performs basic checks for the presence of bashisms | ||
37 | in /bin/sh scripts and the lack of bashisms in /bin/bash ones. | ||
38 | EOF | ||
39 | |||
40 | my $version = <<"EOF"; | ||
41 | This is $progname, from the Debian devscripts package, version ###VERSION### | ||
42 | This code is copyright 2003 by Julian Gilbey <jdg\@debian.org>, | ||
43 | based on original code which is copyright 1998 by Richard Braakman | ||
44 | and copyright 2002 by Josip Rodin. | ||
45 | This program comes with ABSOLUTELY NO WARRANTY. | ||
46 | You are free to redistribute this code under the terms of the | ||
47 | GNU General Public License, version 2, or (at your option) any later version. | ||
48 | EOF | ||
49 | |||
50 | my ($opt_echo, $opt_force, $opt_extra, $opt_posix); | ||
51 | my ($opt_help, $opt_version); | ||
52 | my @filenames; | ||
53 | |||
54 | # Detect if STDIN is a pipe | ||
55 | if (scalar(@ARGV) == 0 && (-p STDIN or -f STDIN)) { | ||
56 | push(@ARGV, '-'); | ||
57 | } | ||
58 | |||
59 | ## | ||
60 | ## handle command-line options | ||
61 | ## | ||
62 | $opt_help = 1 if int(@ARGV) == 0; | ||
63 | |||
64 | GetOptions( | ||
65 | "help|h" => \$opt_help, | ||
66 | "version|v" => \$opt_version, | ||
67 | "newline|n" => \$opt_echo, | ||
68 | "force|f" => \$opt_force, | ||
69 | "extra|x" => \$opt_extra, | ||
70 | "posix|p" => \$opt_posix, | ||
71 | ) | ||
72 | or die | ||
73 | "Usage: $progname [options] filelist\nRun $progname --help for more details\n"; | ||
74 | |||
75 | if ($opt_help) { print $usage; exit 0; } | ||
76 | if ($opt_version) { print $version; exit 0; } | ||
77 | |||
78 | $opt_echo = 1 if $opt_posix; | ||
79 | |||
80 | my $mode = 0; | ||
81 | my $issues = 0; | ||
82 | my $status = 0; | ||
83 | my $makefile = 0; | ||
84 | my (%bashisms, %string_bashisms, %singlequote_bashisms); | ||
85 | |||
86 | my $LEADIN | ||
87 | = qr'(?:(?:^|[`&;(|{])\s*|(?:(?:if|elif|while)(?:\s+!)?|then|do|shell)\s+)'; | ||
88 | init_hashes; | ||
89 | |||
90 | my @bashisms_keys = sort keys %bashisms; | ||
91 | my @string_bashisms_keys = sort keys %string_bashisms; | ||
92 | my @singlequote_bashisms_keys = sort keys %singlequote_bashisms; | ||
93 | |||
94 | foreach my $filename (@ARGV) { | ||
95 | my $check_lines_count = -1; | ||
96 | |||
97 | my $display_filename = $filename; | ||
98 | |||
99 | if ($filename eq '-') { | ||
100 | my $tmp_fh; | ||
101 | ($tmp_fh, $filename) | ||
102 | = tempfile("chkbashisms_tmp.XXXX", TMPDIR => 1, UNLINK => 1); | ||
103 | while (my $line = <STDIN>) { | ||
104 | print $tmp_fh $line; | ||
105 | } | ||
106 | close($tmp_fh); | ||
107 | $display_filename = "(stdin)"; | ||
108 | } | ||
109 | |||
110 | if (!$opt_force) { | ||
111 | $check_lines_count = script_is_evil_and_wrong($filename); | ||
112 | } | ||
113 | |||
114 | if ($check_lines_count == 0 or $check_lines_count == 1) { | ||
115 | warn | ||
116 | "script $display_filename does not appear to be a /bin/sh script; skipping\n"; | ||
117 | next; | ||
118 | } | ||
119 | |||
120 | if ($check_lines_count != -1) { | ||
121 | warn | ||
122 | "script $display_filename appears to be a shell wrapper; only checking the first " | ||
123 | . "$check_lines_count lines\n"; | ||
124 | } | ||
125 | |||
126 | unless (open C, '<', $filename) { | ||
127 | warn "cannot open script $display_filename for reading: $!\n"; | ||
128 | $status |= 2; | ||
129 | next; | ||
130 | } | ||
131 | |||
132 | $issues = 0; | ||
133 | $mode = 0; | ||
134 | my $cat_string = ""; | ||
135 | my $cat_indented = 0; | ||
136 | my $quote_string = ""; | ||
137 | my $last_continued = 0; | ||
138 | my $continued = 0; | ||
139 | my $found_rules = 0; | ||
140 | my $buffered_orig_line = ""; | ||
141 | my $buffered_line = ""; | ||
142 | my %start_lines; | ||
143 | |||
144 | while (<C>) { | ||
145 | next unless ($check_lines_count == -1 or $. <= $check_lines_count); | ||
146 | |||
147 | if ($. == 1) { # This should be an interpreter line | ||
148 | if (m,^\#!\s*(?:\S+/env\s+)?(\S+),) { | ||
149 | my $interpreter = $1; | ||
150 | |||
151 | if ($interpreter =~ m,(?:^|/)make$,) { | ||
152 | init_hashes if !$makefile++; | ||
153 | $makefile = 1; | ||
154 | } else { | ||
155 | init_hashes if $makefile--; | ||
156 | $makefile = 0; | ||
157 | } | ||
158 | next if $opt_force; | ||
159 | |||
160 | if ($interpreter =~ m,(?:^|/)bash$,) { | ||
161 | $mode = 1; | ||
162 | } elsif ($interpreter !~ m,(?:^|/)(sh|dash|posh)$,) { | ||
163 | ### ksh/zsh? | ||
164 | warn | ||
165 | "script $display_filename does not appear to be a /bin/sh script; skipping\n"; | ||
166 | $status |= 2; | ||
167 | last; | ||
168 | } | ||
169 | } else { | ||
170 | warn | ||
171 | "script $display_filename does not appear to have a \#! interpreter line;\nyou may get strange results\n"; | ||
172 | } | ||
173 | } | ||
174 | |||
175 | chomp; | ||
176 | my $orig_line = $_; | ||
177 | |||
178 | # We want to remove end-of-line comments, so need to skip | ||
179 | # comments that appear inside balanced pairs | ||
180 | # of single or double quotes | ||
181 | |||
182 | # Remove comments in the "quoted" part of a line that starts | ||
183 | # in a quoted block? The problem is that we have no idea | ||
184 | # whether the program interpreting the block treats the | ||
185 | # quote character as part of the comment or as a quote | ||
186 | # terminator. We err on the side of caution and assume it | ||
187 | # will be treated as part of the comment. | ||
188 | # s/^(?:.*?[^\\])?$quote_string(.*)$/$1/ if $quote_string ne ""; | ||
189 | |||
190 | # skip comment lines | ||
191 | if ( m,^\s*\#, | ||
192 | && $quote_string eq '' | ||
193 | && $buffered_line eq '' | ||
194 | && $cat_string eq '') { | ||
195 | next; | ||
196 | } | ||
197 | |||
198 | # Remove quoted strings so we can more easily ignore comments | ||
199 | # inside them | ||
200 | s/(^|[^\\](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; | ||
201 | s/(^|[^\\](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; | ||
202 | |||
203 | # If inside a quoted string, remove everything before the quote | ||
204 | s/^.+?\'// | ||
205 | if ($quote_string eq "'"); | ||
206 | s/^.+?[^\\]\"// | ||
207 | if ($quote_string eq '"'); | ||
208 | |||
209 | # If the remaining string contains what looks like a comment, | ||
210 | # eat it. In either case, swap the unmodified script line | ||
211 | # back in for processing. | ||
212 | if (m/(?:^|[^[\\])[\s\&;\(\)](\#.*$)/) { | ||
213 | $_ = $orig_line; | ||
214 | s/\Q$1\E//; # eat comments | ||
215 | } else { | ||
216 | $_ = $orig_line; | ||
217 | } | ||
218 | |||
219 | # Handle line continuation | ||
220 | if (!$makefile && $cat_string eq '' && m/\\$/) { | ||
221 | chop; | ||
222 | $buffered_line .= $_; | ||
223 | $buffered_orig_line .= $orig_line . "\n"; | ||
224 | next; | ||
225 | } | ||
226 | |||
227 | if ($buffered_line ne '') { | ||
228 | $_ = $buffered_line . $_; | ||
229 | $orig_line = $buffered_orig_line . $orig_line; | ||
230 | $buffered_line = ''; | ||
231 | $buffered_orig_line = ''; | ||
232 | } | ||
233 | |||
234 | if ($makefile) { | ||
235 | $last_continued = $continued; | ||
236 | if (/[^\\]\\$/) { | ||
237 | $continued = 1; | ||
238 | } else { | ||
239 | $continued = 0; | ||
240 | } | ||
241 | |||
242 | # Don't match lines that look like a rule if we're in a | ||
243 | # continuation line before the start of the rules | ||
244 | if (/^[\w%-]+:+\s.*?;?(.*)$/ | ||
245 | and !($last_continued and !$found_rules)) { | ||
246 | $found_rules = 1; | ||
247 | $_ = $1 if $1; | ||
248 | } | ||
249 | |||
250 | last | ||
251 | if m%^\s*(override\s|export\s)?\s*SHELL\s*:?=\s*(/bin/)?bash\s*%; | ||
252 | |||
253 | # Remove "simple" target names | ||
254 | s/^[\w%.-]+(?:\s+[\w%.-]+)*::?//; | ||
255 | s/^\t//; | ||
256 | s/(?<!\$)\$\((\w+)\)/\${$1}/g; | ||
257 | s/(\$){2}/$1/g; | ||
258 | s/^[\s\t]*[@-]{1,2}//; | ||
259 | } | ||
260 | |||
261 | if ( | ||
262 | $cat_string ne "" | ||
263 | && (m/^\Q$cat_string\E$/ | ||
264 | || ($cat_indented && m/^\t*\Q$cat_string\E$/)) | ||
265 | ) { | ||
266 | $cat_string = ""; | ||
267 | next; | ||
268 | } | ||
269 | my $within_another_shell = 0; | ||
270 | if (m,(^|\s+)((/usr)?/bin/)?((b|d)?a|k|z|t?c)sh\s+-c\s*.+,) { | ||
271 | $within_another_shell = 1; | ||
272 | } | ||
273 | # if cat_string is set, we are in a HERE document and need not | ||
274 | # check for things | ||
275 | if ($cat_string eq "" and !$within_another_shell) { | ||
276 | my $found = 0; | ||
277 | my $match = ''; | ||
278 | my $explanation = ''; | ||
279 | my $line = $_; | ||
280 | |||
281 | # Remove "" / '' as they clearly aren't quoted strings | ||
282 | # and not considering them makes the matching easier | ||
283 | $line =~ s/(^|[^\\])(\'\')+/$1/g; | ||
284 | $line =~ s/(^|[^\\])(\"\")+/$1/g; | ||
285 | |||
286 | if ($quote_string ne "") { | ||
287 | my $otherquote = ($quote_string eq "\"" ? "\'" : "\""); | ||
288 | # Inside a quoted block | ||
289 | if ($line =~ /(?:^|^.*?[^\\])$quote_string(.*)$/) { | ||
290 | my $rest = $1; | ||
291 | my $templine = $line; | ||
292 | |||
293 | # Remove quoted strings delimited with $otherquote | ||
294 | $templine | ||
295 | =~ s/(^|[^\\])$otherquote[^$quote_string]*?[^\\]$otherquote/$1/g; | ||
296 | # Remove quotes that are themselves quoted | ||
297 | # "a'b" | ||
298 | $templine | ||
299 | =~ s/(^|[^\\])$otherquote.*?$quote_string.*?[^\\]$otherquote/$1/g; | ||
300 | # "\"" | ||
301 | $templine | ||
302 | =~ s/(^|[^\\])$quote_string\\$quote_string$quote_string/$1/g; | ||
303 | |||
304 | # After all that, were there still any quotes left? | ||
305 | my $count = () = $templine =~ /(^|[^\\])$quote_string/g; | ||
306 | next if $count == 0; | ||
307 | |||
308 | $count = () = $rest =~ /(^|[^\\])$quote_string/g; | ||
309 | if ($count % 2 == 0) { | ||
310 | # Quoted block ends on this line | ||
311 | # Ignore everything before the closing quote | ||
312 | $line = $rest || ''; | ||
313 | $quote_string = ""; | ||
314 | } else { | ||
315 | next; | ||
316 | } | ||
317 | } else { | ||
318 | # Still inside the quoted block, skip this line | ||
319 | next; | ||
320 | } | ||
321 | } | ||
322 | |||
323 | # Check even if we removed the end of a quoted block | ||
324 | # in the previous check, as a single line can end one | ||
325 | # block and begin another | ||
326 | if ($quote_string eq "") { | ||
327 | # Possible start of a quoted block | ||
328 | for my $quote ("\"", "\'") { | ||
329 | my $templine = $line; | ||
330 | my $otherquote = ($quote eq "\"" ? "\'" : "\""); | ||
331 | |||
332 | # Remove balanced quotes and their content | ||
333 | while (1) { | ||
334 | my ($length_single, $length_double) = (0, 0); | ||
335 | |||
336 | # Determine which one would match first: | ||
337 | if ($templine | ||
338 | =~ m/(^.+?(?:^|[^\\\"](?:\\\\)*)\')[^\']*\'/) { | ||
339 | $length_single = length($1); | ||
340 | } | ||
341 | if ($templine | ||
342 | =~ m/(^.*?(?:^|[^\\\'](?:\\\\)*)\")(?:\\.|[^\\\"])+\"/ | ||
343 | ) { | ||
344 | $length_double = length($1); | ||
345 | } | ||
346 | |||
347 | # Now simplify accordingly (shorter is preferred): | ||
348 | if ( | ||
349 | $length_single != 0 | ||
350 | && ( $length_single < $length_double | ||
351 | || $length_double == 0) | ||
352 | ) { | ||
353 | $templine =~ s/(^|[^\\\"](?:\\\\)*)\'[^\']*\'/$1/; | ||
354 | } elsif ($length_double != 0) { | ||
355 | $templine | ||
356 | =~ s/(^|[^\\\'](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1/; | ||
357 | } else { | ||
358 | last; | ||
359 | } | ||
360 | } | ||
361 | |||
362 | # Don't flag quotes that are themselves quoted | ||
363 | # "a'b" | ||
364 | $templine =~ s/$otherquote.*?$quote.*?$otherquote//g; | ||
365 | # "\"" | ||
366 | $templine =~ s/(^|[^\\])$quote\\$quote$quote/$1/g; | ||
367 | # \' or \" | ||
368 | $templine =~ s/\\[\'\"]//g; | ||
369 | my $count = () = $templine =~ /(^|(?!\\))$quote/g; | ||
370 | |||
371 | # If there's an odd number of non-escaped | ||
372 | # quotes in the line it's almost certainly the | ||
373 | # start of a quoted block. | ||
374 | if ($count % 2 == 1) { | ||
375 | $quote_string = $quote; | ||
376 | $start_lines{'quote_string'} = $.; | ||
377 | $line =~ s/^(.*)$quote.*$/$1/; | ||
378 | last; | ||
379 | } | ||
380 | } | ||
381 | } | ||
382 | |||
383 | # since this test is ugly, I have to do it by itself | ||
384 | # detect source (.) trying to pass args to the command it runs | ||
385 | # The first expression weeds out '. "foo bar"' | ||
386 | if ( not $found | ||
387 | and not | ||
388 | m/$LEADIN\.\s+(\"[^\"]+\"|\'[^\']+\'|\$\([^)]+\)+(?:\/[^\s;]+)?)\s*(\&|\||\d?>|<|;|\Z)/o | ||
389 | and m/$LEADIN(\.\s+[^\s;\`:]+\s+([^\s;]+))/o) { | ||
390 | if ($2 =~ /^(\&|\||\d?>|<)/) { | ||
391 | # everything is ok | ||
392 | ; | ||
393 | } else { | ||
394 | $found = 1; | ||
395 | $match = $1; | ||
396 | $explanation = "sourced script with arguments"; | ||
397 | output_explanation($display_filename, $orig_line, | ||
398 | $explanation); | ||
399 | } | ||
400 | } | ||
401 | |||
402 | # Remove "quoted quotes". They're likely to be inside | ||
403 | # another pair of quotes; we're not interested in | ||
404 | # them for their own sake and removing them makes finding | ||
405 | # the limits of the outer pair far easier. | ||
406 | $line =~ s/(^|[^\\\'\"])\"\'\"/$1/g; | ||
407 | $line =~ s/(^|[^\\\'\"])\'\"\'/$1/g; | ||
408 | |||
409 | foreach my $re (@singlequote_bashisms_keys) { | ||
410 | my $expl = $singlequote_bashisms{$re}; | ||
411 | if ($line =~ m/($re)/) { | ||
412 | $found = 1; | ||
413 | $match = $1; | ||
414 | $explanation = $expl; | ||
415 | output_explanation($display_filename, $orig_line, | ||
416 | $explanation); | ||
417 | } | ||
418 | } | ||
419 | |||
420 | my $re = '(?<![\$\\\])\$\'[^\']+\''; | ||
421 | if ($line =~ m/(.*)($re)/o) { | ||
422 | my $count = () = $1 =~ /(^|[^\\])\'/g; | ||
423 | if ($count % 2 == 0) { | ||
424 | output_explanation($display_filename, $orig_line, | ||
425 | q<$'...' should be "$(printf '...')">); | ||
426 | } | ||
427 | } | ||
428 | |||
429 | # $cat_line contains the version of the line we'll check | ||
430 | # for heredoc delimiters later. Initially, remove any | ||
431 | # spaces between << and the delimiter to make the following | ||
432 | # updates to $cat_line easier. However, don't remove the | ||
433 | # spaces if the delimiter starts with a -, as that changes | ||
434 | # how the delimiter is searched. | ||
435 | my $cat_line = $line; | ||
436 | $cat_line =~ s/(<\<-?)\s+(?!-)/$1/g; | ||
437 | |||
438 | # Ignore anything inside single quotes; it could be an | ||
439 | # argument to grep or the like. | ||
440 | $line =~ s/(^|[^\\\"](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; | ||
441 | |||
442 | # As above, with the exception that we don't remove the string | ||
443 | # if the quote is immediately preceded by a < or a -, so we | ||
444 | # can match "foo <<-?'xyz'" as a heredoc later | ||
445 | # The check is a little more greedy than we'd like, but the | ||
446 | # heredoc test itself will weed out any false positives | ||
447 | $cat_line =~ s/(^|[^<\\\"-](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g; | ||
448 | |||
449 | $re = '(?<![\$\\\])\$\"[^\"]+\"'; | ||
450 | if ($line =~ m/(.*)($re)/o) { | ||
451 | my $count = () = $1 =~ /(^|[^\\])\"/g; | ||
452 | if ($count % 2 == 0) { | ||
453 | output_explanation($display_filename, $orig_line, | ||
454 | q<$"foo" should be eval_gettext "foo">); | ||
455 | } | ||
456 | } | ||
457 | |||
458 | foreach my $re (@string_bashisms_keys) { | ||
459 | my $expl = $string_bashisms{$re}; | ||
460 | if ($line =~ m/($re)/) { | ||
461 | $found = 1; | ||
462 | $match = $1; | ||
463 | $explanation = $expl; | ||
464 | output_explanation($display_filename, $orig_line, | ||
465 | $explanation); | ||
466 | } | ||
467 | } | ||
468 | |||
469 | # We've checked for all the things we still want to notice in | ||
470 | # double-quoted strings, so now remove those strings as well. | ||
471 | $line =~ s/(^|[^\\\'](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; | ||
472 | $cat_line =~ s/(^|[^<\\\'-](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g; | ||
473 | foreach my $re (@bashisms_keys) { | ||
474 | my $expl = $bashisms{$re}; | ||
475 | if ($line =~ m/($re)/) { | ||
476 | $found = 1; | ||
477 | $match = $1; | ||
478 | $explanation = $expl; | ||
479 | output_explanation($display_filename, $orig_line, | ||
480 | $explanation); | ||
481 | } | ||
482 | } | ||
483 | # This check requires the value to be compared, which could | ||
484 | # be done in the regex itself but requires "use re 'eval'". | ||
485 | # So it's better done in its own | ||
486 | if ($line =~ m/$LEADIN((?:exit|return)\s+(\d{3,}))/o && $2 > 255) { | ||
487 | $explanation = 'exit|return status code greater than 255'; | ||
488 | output_explanation($display_filename, $orig_line, | ||
489 | $explanation); | ||
490 | } | ||
491 | |||
492 | # Only look for the beginning of a heredoc here, after we've | ||
493 | # stripped out quoted material, to avoid false positives. | ||
494 | if ($cat_line | ||
495 | =~ m/(?:^|[^<])\<\<(\-?)\s*(?:(?!<|'|")((?:[^\s;>|]+(?:(?<=\\)[\s;>|])?)+)|[\'\"](.*?)[\'\"])/ | ||
496 | ) { | ||
497 | $cat_indented = ($1 && $1 eq '-') ? 1 : 0; | ||
498 | my $quoted = defined($3); | ||
499 | $cat_string = $quoted ? $3 : $2; | ||
500 | unless ($quoted) { | ||
501 | # Now strip backslashes. Keep the position of the | ||
502 | # last match in a variable, as s/// resets it back | ||
503 | # to undef, but we don't want that. | ||
504 | my $pos = 0; | ||
505 | pos($cat_string) = $pos; | ||
506 | while ($cat_string =~ s/\G(.*?)\\/$1/) { | ||
507 | # position += length of match + the character | ||
508 | # that followed the backslash: | ||
509 | $pos += length($1) + 1; | ||
510 | pos($cat_string) = $pos; | ||
511 | } | ||
512 | } | ||
513 | $start_lines{'cat_string'} = $.; | ||
514 | } | ||
515 | } | ||
516 | } | ||
517 | |||
518 | warn | ||
519 | "error: $display_filename: Unterminated heredoc found, EOF reached. Wanted: <$cat_string>, opened in line $start_lines{'cat_string'}\n" | ||
520 | if ($cat_string ne ''); | ||
521 | warn | ||
522 | "error: $display_filename: Unterminated quoted string found, EOF reached. Wanted: <$quote_string>, opened in line $start_lines{'quote_string'}\n" | ||
523 | if ($quote_string ne ''); | ||
524 | warn "error: $display_filename: EOF reached while on line continuation.\n" | ||
525 | if ($buffered_line ne ''); | ||
526 | |||
527 | close C; | ||
528 | |||
529 | if ($mode && !$issues) { | ||
530 | warn "could not find any possible bashisms in bash script $filename\n"; | ||
531 | $status |= 4; | ||
532 | } | ||
533 | } | ||
534 | |||
535 | exit $status; | ||
536 | |||
537 | sub output_explanation { | ||
538 | my ($filename, $line, $explanation) = @_; | ||
539 | |||
540 | if ($mode) { | ||
541 | # When examining a bash script, just flag that there are indeed | ||
542 | # bashisms present | ||
543 | $issues = 1; | ||
544 | } else { | ||
545 | warn "possible bashism in $filename line $. ($explanation):\n$line\n"; | ||
546 | $status |= 1; | ||
547 | } | ||
548 | } | ||
549 | |||
550 | # Returns non-zero if the given file is not actually a shell script, | ||
551 | # just looks like one. | ||
552 | sub script_is_evil_and_wrong { | ||
553 | my ($filename) = @_; | ||
554 | my $ret = -1; | ||
555 | # lintian's version of this function aborts if the file | ||
556 | # can't be opened, but we simply return as the next | ||
557 | # test in the calling code handles reporting the error | ||
558 | # itself | ||
559 | open(IN, '<', $filename) or return $ret; | ||
560 | my $i = 0; | ||
561 | my $var = "0"; | ||
562 | my $backgrounded = 0; | ||
563 | local $_; | ||
564 | while (<IN>) { | ||
565 | chomp; | ||
566 | next if /^#/o; | ||
567 | next if /^$/o; | ||
568 | last if (++$i > 55); | ||
569 | if ( | ||
570 | m~ | ||
571 | # the exec should either be "eval"ed or a new statement | ||
572 | (^\s*|\beval\s*[\'\"]|(;|&&|\b(then|else))\s*) | ||
573 | |||
574 | # eat anything between the exec and $0 | ||
575 | exec\s*.+\s* | ||
576 | |||
577 | # optionally quoted executable name (via $0) | ||
578 | .?\$$var.?\s* | ||
579 | |||
580 | # optional "end of options" indicator | ||
581 | (--\s*)? | ||
582 | |||
583 | # Match expressions of the form '${1+$@}', '${1:+"$@"', | ||
584 | # '"${1+$@', "$@", etc where the quotes (before the dollar | ||
585 | # sign(s)) are optional and the second (or only if the $1 | ||
586 | # clause is omitted) parameter may be $@ or $*. | ||
587 | # | ||
588 | # Finally the whole subexpression may be omitted for scripts | ||
589 | # which do not pass on their parameters (i.e. after re-execing | ||
590 | # they take their parameters (and potentially data) from stdin | ||
591 | .?(\$\{1:?\+.?)?(\$(\@|\*))?~x | ||
592 | ) { | ||
593 | $ret = $. - 1; | ||
594 | last; | ||
595 | } elsif (/^\s*(\w+)=\$0;/) { | ||
596 | $var = $1; | ||
597 | } elsif ( | ||
598 | m~ | ||
599 | # Match scripts which use "foo $0 $@ &\nexec true\n" | ||
600 | # Program name | ||
601 | \S+\s+ | ||
602 | |||
603 | # As above | ||
604 | .?\$$var.?\s* | ||
605 | (--\s*)? | ||
606 | .?(\$\{1:?\+.?)?(\$(\@|\*))?.?\s*\&~x | ||
607 | ) { | ||
608 | |||
609 | $backgrounded = 1; | ||
610 | } elsif ( | ||
611 | $backgrounded | ||
612 | and m~ | ||
613 | # the exec should either be "eval"ed or a new statement | ||
614 | (^\s*|\beval\s*[\'\"]|(;|&&|\b(then|else))\s*) | ||
615 | exec\s+true(\s|\Z)~x | ||
616 | ) { | ||
617 | |||
618 | $ret = $. - 1; | ||
619 | last; | ||
620 | } elsif (m~\@DPATCH\@~) { | ||
621 | $ret = $. - 1; | ||
622 | last; | ||
623 | } | ||
624 | |||
625 | } | ||
626 | close IN; | ||
627 | return $ret; | ||
628 | } | ||
629 | |||
630 | sub init_hashes { | ||
631 | |||
632 | %bashisms = ( | ||
633 | qr'(?:^|\s+)function [^<>\(\)\[\]\{\};|\s]+(\s|\(|\Z)' => | ||
634 | q<'function' is useless>, | ||
635 | $LEADIN . qr'select\s+\w+' => q<'select' is not POSIX>, | ||
636 | qr'(test|-o|-a)\s*[^\s]+\s+==\s' => q<should be 'b = a'>, | ||
637 | qr'\[\s+[^\]]+\s+==\s' => q<should be 'b = a'>, | ||
638 | qr'\s\|\&' => q<pipelining is not POSIX>, | ||
639 | qr'[^\\\$]\{([^\s\\\}]*?,)+[^\\\}\s]*\}' => q<brace expansion>, | ||
640 | qr'\{\d+\.\.\d+(?:\.\.\d+)?\}' => | ||
641 | q<brace expansion, {a..b[..c]}should be $(seq a [c] b)>, | ||
642 | qr'(?i)\{[a-z]\.\.[a-z](?:\.\.\d+)?\}' => q<brace expansion>, | ||
643 | qr'(?:^|\s+)\w+\[\d+\]=' => q<bash arrays, H[0]>, | ||
644 | $LEADIN | ||
645 | . qr'read\s+(?:-[a-qs-zA-Z\d-]+)' => | ||
646 | q<read with option other than -r>, | ||
647 | $LEADIN | ||
648 | . qr'read\s*(?:-\w+\s*)*(?:\".*?\"|[\'].*?[\'])?\s*(?:;|$)' => | ||
649 | q<read without variable>, | ||
650 | $LEADIN . qr'echo\s+(-n\s+)?-n?en?\s' => q<echo -e>, | ||
651 | $LEADIN . qr'exec\s+-[acl]' => q<exec -c/-l/-a name>, | ||
652 | $LEADIN . qr'let\s' => q<let ...>, | ||
653 | qr'(?<![\$\(])\(\(.*\)\)' => q<'((' should be '$(('>, | ||
654 | qr'(?:^|\s+)(\[|test)\s+-a' => q<test with unary -a (should be -e)>, | ||
655 | qr'\&>' => q<should be \>word 2\>&1>, | ||
656 | qr'(<\&|>\&)\s*((-|\d+)[^\s;|)}`&\\\\]|[^-\d\s]+(?<!\$)(?!\d))' => | ||
657 | q<should be \>word 2\>&1>, | ||
658 | qr'\[\[(?!:)' => | ||
659 | q<alternative test command ([[ foo ]] should be [ foo ])>, | ||
660 | qr'/dev/(tcp|udp)' => q</dev/(tcp|udp)>, | ||
661 | $LEADIN . qr'builtin\s' => q<builtin>, | ||
662 | $LEADIN . qr'caller\s' => q<caller>, | ||
663 | $LEADIN . qr'compgen\s' => q<compgen>, | ||
664 | $LEADIN . qr'complete\s' => q<complete>, | ||
665 | $LEADIN . qr'declare\s' => q<declare>, | ||
666 | $LEADIN . qr'dirs(\s|\Z)' => q<dirs>, | ||
667 | $LEADIN . qr'disown\s' => q<disown>, | ||
668 | $LEADIN . qr'enable\s' => q<enable>, | ||
669 | $LEADIN . qr'mapfile\s' => q<mapfile>, | ||
670 | $LEADIN . qr'readarray\s' => q<readarray>, | ||
671 | $LEADIN . qr'shopt(\s|\Z)' => q<shopt>, | ||
672 | $LEADIN . qr'suspend\s' => q<suspend>, | ||
673 | $LEADIN . qr'time\s' => q<time>, | ||
674 | $LEADIN . qr'type\s' => q<type>, | ||
675 | $LEADIN . qr'typeset\s' => q<typeset>, | ||
676 | $LEADIN . qr'ulimit(\s|\Z)' => q<ulimit>, | ||
677 | $LEADIN . qr'set\s+-[BHT]+' => q<set -[BHT]>, | ||
678 | $LEADIN . qr'alias\s+-p' => q<alias -p>, | ||
679 | $LEADIN . qr'unalias\s+-a' => q<unalias -a>, | ||
680 | $LEADIN . qr'local\s+-[a-zA-Z]+' => q<local -opt>, | ||
681 | # function '=' is special-cased due to bash arrays (think of "foo=()") | ||
682 | qr'(?:^|\s)\s*=\s*\(\s*\)\s*([\{|\(]|\Z)' => | ||
683 | q<function names should only contain [a-z0-9_]>, | ||
684 | qr'(?:^|\s)(?<func>function\s)?\s*(?:[^<>\(\)\[\]\{\};|\s]*[^<>\(\)\[\]\{\};|\s\w][^<>\(\)\[\]\{\};|\s]*)(?(<func>)(?=)|(?<!=))\s*(?(<func>)(?:\(\s*\))?|\(\s*\))\s*([\{|\(]|\Z)' | ||
685 | => q<function names should only contain [a-z0-9_]>, | ||
686 | $LEADIN . qr'(push|pop)d(\s|\Z)' => q<(push|pop)d>, | ||
687 | $LEADIN . qr'export\s+-[^p]' => q<export only takes -p as an option>, | ||
688 | qr'(?:^|\s+)[<>]\(.*?\)' => q<\<() process substitution>, | ||
689 | $LEADIN . qr'readonly\s+-[af]' => q<readonly -[af]>, | ||
690 | $LEADIN . qr'(sh|\$\{?SHELL\}?) -[rD]' => q<sh -[rD]>, | ||
691 | $LEADIN . qr'(sh|\$\{?SHELL\}?) --\w+' => q<sh --long-option>, | ||
692 | $LEADIN . qr'(sh|\$\{?SHELL\}?) [-+]O' => q<sh [-+]O>, | ||
693 | qr'\[\^[^]]+\]' => q<[^] should be [!]>, | ||
694 | $LEADIN | ||
695 | . qr'printf\s+-v' => | ||
696 | q<'printf -v var ...' should be var='$(printf ...)'>, | ||
697 | $LEADIN . qr'coproc\s' => q<coproc>, | ||
698 | qr';;?&' => q<;;& and ;& special case operators>, | ||
699 | $LEADIN . qr'jobs\s' => q<jobs>, | ||
700 | # $LEADIN . qr'jobs\s+-[^lp]\s' => q<'jobs' with option other than -l or -p>, | ||
701 | $LEADIN | ||
702 | . qr'command\s+-[^p]\s' => q<'command' with option other than -p>, | ||
703 | $LEADIN | ||
704 | . qr'setvar\s' => | ||
705 | q<setvar 'foo' 'bar' should be eval 'foo="'"$bar"'"'>, | ||
706 | $LEADIN | ||
707 | . qr'trap\s+["\']?.*["\']?\s+.*(?:ERR|DEBUG|RETURN)' => | ||
708 | q<trap with ERR|DEBUG|RETURN>, | ||
709 | $LEADIN | ||
710 | . qr'(?:exit|return)\s+-\d' => | ||
711 | q<exit|return with negative status code>, | ||
712 | $LEADIN | ||
713 | . qr'(?:exit|return)\s+--' => | ||
714 | q<'exit --' should be 'exit' (idem for return)>, | ||
715 | $LEADIN | ||
716 | . qr'sleep\s+(?:-|\d+(?:[.a-z]|\s+\d))' => | ||
717 | q<sleep only takes one integer>, | ||
718 | $LEADIN . qr'hash(\s|\Z)' => q<hash>, | ||
719 | qr'(?:[:=\s])~(?:[+-]|[+-]?\d+)(?:[/\s]|\Z)' => | ||
720 | q<non-standard tilde expansion>, | ||
721 | ); | ||
722 | |||
723 | %string_bashisms = ( | ||
724 | qr'\$\[[^][]+\]' => q<'$[' should be '$(('>, | ||
725 | qr'\$\{(?:\w+|@|\*)\:(?:\d+|\$\{?\w+\}?)+(?::(?:\d+|\$\{?\w+\}?)+)?\}' | ||
726 | => q<${foo:3[:1]}>, | ||
727 | qr'\$\{!\w+[\@*]\}' => q<${!prefix[*|@]>, | ||
728 | qr'\$\{!\w+\}' => q<${!name}>, | ||
729 | qr'\$\{(?:\w+|@|\*)([,^]{1,2}.*?)\}' => | ||
730 | q<${parm,[,][pat]} or ${parm^[^][pat]}>, | ||
731 | qr'\$\{[@*]([#%]{1,2}.*?)\}' => q<${[@|*]#[#]pat} or ${[@|*]%[%]pat}>, | ||
732 | qr'\$\{#[@*]\}' => q<${#@} or ${#*}>, | ||
733 | qr'\$\{(?:\w+|@|\*)(/.+?){1,2}\}' => q<${parm/?/pat[/str]}>, | ||
734 | qr'\$\{\#?\w+\[.+\](?:[/,:#%^].+?)?\}' => | ||
735 | q<bash arrays, ${name[0|*|@]}>, | ||
736 | qr'\$\{?RANDOM\}?\b' => q<$RANDOM>, | ||
737 | qr'\$\{?(OS|MACH)TYPE\}?\b' => q<$(OS|MACH)TYPE>, | ||
738 | qr'\$\{?HOST(TYPE|NAME)\}?\b' => q<$HOST(TYPE|NAME)>, | ||
739 | qr'\$\{?DIRSTACK\}?\b' => q<$DIRSTACK>, | ||
740 | qr'\$\{?EUID\}?\b' => q<$EUID should be "$(id -u)">, | ||
741 | qr'\$\{?UID\}?\b' => q<$UID should be "$(id -ru)">, | ||
742 | qr'\$\{?SECONDS\}?\b' => q<$SECONDS>, | ||
743 | qr'\$\{?BASH_[A-Z]+\}?\b' => q<$BASH_SOMETHING>, | ||
744 | qr'\$\{?SHELLOPTS\}?\b' => q<$SHELLOPTS>, | ||
745 | qr'\$\{?PIPESTATUS\}?\b' => q<$PIPESTATUS>, | ||
746 | qr'\$\{?SHLVL\}?\b' => q<$SHLVL>, | ||
747 | qr'\$\{?FUNCNAME\}?\b' => q<$FUNCNAME>, | ||
748 | qr'\$\{?TMOUT\}?\b' => q<$TMOUT>, | ||
749 | qr'(?:^|\s+)TMOUT=' => q<TMOUT=>, | ||
750 | qr'\$\{?TIMEFORMAT\}?\b' => q<$TIMEFORMAT>, | ||
751 | qr'(?:^|\s+)TIMEFORMAT=' => q<TIMEFORMAT=>, | ||
752 | qr'(?<![$\\])\$\{?_\}?\b' => q<$_>, | ||
753 | qr'(?:^|\s+)GLOBIGNORE=' => q<GLOBIGNORE=>, | ||
754 | qr'<<<' => q<\<\<\< here string>, | ||
755 | $LEADIN | ||
756 | . qr'echo\s+(?:-[^e\s]+\s+)?\"[^\"]*(\\[abcEfnrtv0])+.*?[\"]' => | ||
757 | q<unsafe echo with backslash>, | ||
758 | qr'\$\(\([\s\w$*/+-]*\w\+\+.*?\)\)' => | ||
759 | q<'$((n++))' should be '$n; $((n=n+1))'>, | ||
760 | qr'\$\(\([\s\w$*/+-]*\+\+\w.*?\)\)' => | ||
761 | q<'$((++n))' should be '$((n=n+1))'>, | ||
762 | qr'\$\(\([\s\w$*/+-]*\w\-\-.*?\)\)' => | ||
763 | q<'$((n--))' should be '$n; $((n=n-1))'>, | ||
764 | qr'\$\(\([\s\w$*/+-]*\-\-\w.*?\)\)' => | ||
765 | q<'$((--n))' should be '$((n=n-1))'>, | ||
766 | qr'\$\(\([\s\w$*/+-]*\*\*.*?\)\)' => q<exponentiation is not POSIX>, | ||
767 | $LEADIN . qr'printf\s["\'][^"\']*?%q.+?["\']' => q<printf %q>, | ||
768 | ); | ||
769 | |||
770 | %singlequote_bashisms = ( | ||
771 | $LEADIN | ||
772 | . qr'echo\s+(?:-[^e\s]+\s+)?\'[^\']*(\\[abcEfnrtv0])+.*?[\']' => | ||
773 | q<unsafe echo with backslash>, | ||
774 | $LEADIN | ||
775 | . qr'source\s+[\"\']?(?:\.\/|\/|\$|[\w~.-])\S*' => | ||
776 | q<should be '.', not 'source'>, | ||
777 | ); | ||
778 | |||
779 | if ($opt_echo) { | ||
780 | $bashisms{ $LEADIN . qr'echo\s+-[A-Za-z]*n' } = q<echo -n>; | ||
781 | } | ||
782 | if ($opt_posix) { | ||
783 | $bashisms{ $LEADIN . qr'local\s+\w+(\s+\W|\s*[;&|)]|$)' } | ||
784 | = q<local foo>; | ||
785 | $bashisms{ $LEADIN . qr'local\s+\w+=' } = q<local foo=bar>; | ||
786 | $bashisms{ $LEADIN . qr'local\s+\w+\s+\w+' } = q<local x y>; | ||
787 | $bashisms{ $LEADIN . qr'((?:test|\[)\s+.+\s-[ao])\s' } = q<test -a/-o>; | ||
788 | $bashisms{ $LEADIN . qr'kill\s+-[^sl]\w*' } = q<kill -[0-9] or -[A-Z]>; | ||
789 | $bashisms{ $LEADIN . qr'trap\s+["\']?.*["\']?\s+.*[1-9]' } | ||
790 | = q<trap with signal numbers>; | ||
791 | } | ||
792 | |||
793 | if ($makefile) { | ||
794 | $string_bashisms{qr'(\$\(|\`)\s*\<\s*([^\s\)]{2,}|[^DF])\s*(\)|\`)'} | ||
795 | = q<'$(\< foo)' should be '$(cat foo)'>; | ||
796 | } else { | ||
797 | $bashisms{ $LEADIN . qr'\w+\+=' } = q<should be VAR="${VAR}foo">; | ||
798 | $string_bashisms{qr'(\$\(|\`)\s*\<\s*\S+\s*(\)|\`)'} | ||
799 | = q<'$(\< foo)' should be '$(cat foo)'>; | ||
800 | } | ||
801 | |||
802 | if ($opt_extra) { | ||
803 | $string_bashisms{qr'\$\{?BASH\}?\b'} = q<$BASH>; | ||
804 | $string_bashisms{qr'(?:^|\s+)RANDOM='} = q<RANDOM=>; | ||
805 | $string_bashisms{qr'(?:^|\s+)(OS|MACH)TYPE='} = q<(OS|MACH)TYPE=>; | ||
806 | $string_bashisms{qr'(?:^|\s+)HOST(TYPE|NAME)='} = q<HOST(TYPE|NAME)=>; | ||
807 | $string_bashisms{qr'(?:^|\s+)DIRSTACK='} = q<DIRSTACK=>; | ||
808 | $string_bashisms{qr'(?:^|\s+)EUID='} = q<EUID=>; | ||
809 | $string_bashisms{qr'(?:^|\s+)UID='} = q<UID=>; | ||
810 | $string_bashisms{qr'(?:^|\s+)BASH(_[A-Z]+)?='} = q<BASH(_SOMETHING)=>; | ||
811 | $string_bashisms{qr'(?:^|\s+)SHELLOPTS='} = q<SHELLOPTS=>; | ||
812 | $string_bashisms{qr'\$\{?POSIXLY_CORRECT\}?\b'} = q<$POSIXLY_CORRECT>; | ||
813 | } | ||
814 | } | ||
diff --git a/m4/perl.m4 b/m4/perl.m4 new file mode 100644 index 000000000..6f855c7a6 --- /dev/null +++ b/m4/perl.m4 | |||
@@ -0,0 +1,48 @@ | |||
1 | # serial 9 | ||
2 | |||
3 | dnl From Jim Meyering. | ||
4 | dnl Find a new-enough version of Perl. | ||
5 | |||
6 | # Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2018 Free Software Foundation, | ||
7 | # Inc. | ||
8 | # | ||
9 | # This file is free software; the Free Software Foundation | ||
10 | # gives unlimited permission to copy and/or distribute it, | ||
11 | # with or without modifications, as long as this notice is preserved. | ||
12 | |||
13 | # GNUnet e.V. comment of origin: gnulib | ||
14 | |||
15 | AC_DEFUN([gl_PERL], | ||
16 | [ | ||
17 | dnl FIXME: don't hard-code 5.005 | ||
18 | AC_MSG_CHECKING([for perl5.005 or newer]) | ||
19 | if test "${PERL+set}" = set; then | ||
20 | # 'PERL' is set in the user's environment. | ||
21 | candidate_perl_names="$PERL" | ||
22 | perl_specified=yes | ||
23 | else | ||
24 | candidate_perl_names='perl perl5' | ||
25 | perl_specified=no | ||
26 | fi | ||
27 | |||
28 | found=no | ||
29 | AC_SUBST([PERL]) | ||
30 | PERL="$am_missing_run perl" | ||
31 | for perl in $candidate_perl_names; do | ||
32 | # Run test in a subshell; some versions of sh will print an error if | ||
33 | # an executable is not found, even if stderr is redirected. | ||
34 | if ( $perl -e 'require 5.005; use File::Compare' ) > /dev/null 2>&1; then | ||
35 | PERL=$perl | ||
36 | found=yes | ||
37 | break | ||
38 | fi | ||
39 | done | ||
40 | |||
41 | AC_MSG_RESULT([$found]) | ||
42 | test $found = no && AC_MSG_WARN([ | ||
43 | WARNING: You don't seem to have perl5.005 or newer installed, or you lack | ||
44 | a usable version of the Perl File::Compare module. As a result, | ||
45 | you may be unable to run a few tests or to regenerate certain | ||
46 | files if you modify the sources from which they are derived. | ||
47 | ] ) | ||
48 | ]) | ||
diff --git a/po/POTFILES.in b/po/POTFILES.in index deeffe180..67c22aaed 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -4,14 +4,6 @@ src/arm/arm_monitor_api.c | |||
4 | src/arm/gnunet-arm.c | 4 | src/arm/gnunet-arm.c |
5 | src/arm/gnunet-service-arm.c | 5 | src/arm/gnunet-service-arm.c |
6 | src/arm/mockup-service.c | 6 | src/arm/mockup-service.c |
7 | src/ats-tests/ats-testing-experiment.c | ||
8 | src/ats-tests/ats-testing-log.c | ||
9 | src/ats-tests/ats-testing-preferences.c | ||
10 | src/ats-tests/ats-testing-traffic.c | ||
11 | src/ats-tests/ats-testing.c | ||
12 | src/ats-tests/gnunet-ats-sim.c | ||
13 | src/ats-tests/gnunet-solver-eval.c | ||
14 | src/ats-tool/gnunet-ats.c | ||
15 | src/ats/ats_api2_application.c | 7 | src/ats/ats_api2_application.c |
16 | src/ats/ats_api2_transport.c | 8 | src/ats/ats_api2_transport.c |
17 | src/ats/ats_api_connectivity.c | 9 | src/ats/ats_api_connectivity.c |
@@ -19,10 +11,10 @@ src/ats/ats_api_performance.c | |||
19 | src/ats/ats_api_scanner.c | 11 | src/ats/ats_api_scanner.c |
20 | src/ats/ats_api_scheduling.c | 12 | src/ats/ats_api_scheduling.c |
21 | src/ats/gnunet-ats-solver-eval.c | 13 | src/ats/gnunet-ats-solver-eval.c |
22 | src/ats/gnunet-service-ats-new.c | ||
23 | src/ats/gnunet-service-ats.c | ||
24 | src/ats/gnunet-service-ats_addresses.c | 14 | src/ats/gnunet-service-ats_addresses.c |
15 | src/ats/gnunet-service-ats.c | ||
25 | src/ats/gnunet-service-ats_connectivity.c | 16 | src/ats/gnunet-service-ats_connectivity.c |
17 | src/ats/gnunet-service-ats-new.c | ||
26 | src/ats/gnunet-service-ats_normalization.c | 18 | src/ats/gnunet-service-ats_normalization.c |
27 | src/ats/gnunet-service-ats_performance.c | 19 | src/ats/gnunet-service-ats_performance.c |
28 | src/ats/gnunet-service-ats_plugins.c | 20 | src/ats/gnunet-service-ats_plugins.c |
@@ -34,6 +26,14 @@ src/ats/plugin_ats2_simple.c | |||
34 | src/ats/plugin_ats_mlp.c | 26 | src/ats/plugin_ats_mlp.c |
35 | src/ats/plugin_ats_proportional.c | 27 | src/ats/plugin_ats_proportional.c |
36 | src/ats/plugin_ats_ril.c | 28 | src/ats/plugin_ats_ril.c |
29 | src/ats-tests/ats-testing.c | ||
30 | src/ats-tests/ats-testing-experiment.c | ||
31 | src/ats-tests/ats-testing-log.c | ||
32 | src/ats-tests/ats-testing-preferences.c | ||
33 | src/ats-tests/ats-testing-traffic.c | ||
34 | src/ats-tests/gnunet-ats-sim.c | ||
35 | src/ats-tests/gnunet-solver-eval.c | ||
36 | src/ats-tool/gnunet-ats.c | ||
37 | src/auction/gnunet-auction-create.c | 37 | src/auction/gnunet-auction-create.c |
38 | src/auction/gnunet-auction-info.c | 38 | src/auction/gnunet-auction-info.c |
39 | src/auction/gnunet-auction-join.c | 39 | 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-profiler.c | ||
54 | src/cadet/gnunet-cadet.c | 53 | src/cadet/gnunet-cadet.c |
54 | src/cadet/gnunet-cadet-profiler.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-test.c | ||
71 | src/conversation/gnunet-conversation.c | 70 | src/conversation/gnunet-conversation.c |
72 | src/conversation/gnunet-helper-audio-playback-gst.c | 71 | src/conversation/gnunet-conversation-test.c |
72 | src/conversation/gnunet_gst.c | ||
73 | src/conversation/gnunet_gst_test.c | ||
73 | src/conversation/gnunet-helper-audio-playback.c | 74 | src/conversation/gnunet-helper-audio-playback.c |
74 | src/conversation/gnunet-helper-audio-record-gst.c | 75 | src/conversation/gnunet-helper-audio-playback-gst.c |
75 | src/conversation/gnunet-helper-audio-record.c | 76 | src/conversation/gnunet-helper-audio-record.c |
77 | src/conversation/gnunet-helper-audio-record-gst.c | ||
76 | src/conversation/gnunet-service-conversation.c | 78 | 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 |
@@ -92,6 +92,7 @@ src/credential/credential_serialization.c | |||
92 | src/credential/gnunet-credential.c | 92 | src/credential/gnunet-credential.c |
93 | src/credential/gnunet-service-credential.c | 93 | src/credential/gnunet-service-credential.c |
94 | src/credential/plugin_gnsrecord_credential.c | 94 | src/credential/plugin_gnsrecord_credential.c |
95 | src/credential/plugin_rest_credential.c | ||
95 | src/curl/curl.c | 96 | src/curl/curl.c |
96 | src/curl/curl_reschedule.c | 97 | src/curl/curl_reschedule.c |
97 | src/datacache/datacache.c | 98 | src/datacache/datacache.c |
@@ -111,6 +112,7 @@ src/dht/dht_api.c | |||
111 | src/dht/dht_test_lib.c | 112 | src/dht/dht_test_lib.c |
112 | src/dht/gnunet-dht-get.c | 113 | src/dht/gnunet-dht-get.c |
113 | src/dht/gnunet-dht-monitor.c | 114 | src/dht/gnunet-dht-monitor.c |
115 | src/dht/gnunet_dht_profiler.c | ||
114 | src/dht/gnunet-dht-put.c | 116 | src/dht/gnunet-dht-put.c |
115 | src/dht/gnunet-service-dht.c | 117 | src/dht/gnunet-service-dht.c |
116 | src/dht/gnunet-service-dht_clients.c | 118 | src/dht/gnunet-service-dht_clients.c |
@@ -119,7 +121,6 @@ src/dht/gnunet-service-dht_hello.c | |||
119 | src/dht/gnunet-service-dht_neighbours.c | 121 | src/dht/gnunet-service-dht_neighbours.c |
120 | src/dht/gnunet-service-dht_nse.c | 122 | src/dht/gnunet-service-dht_nse.c |
121 | src/dht/gnunet-service-dht_routing.c | 123 | src/dht/gnunet-service-dht_routing.c |
122 | src/dht/gnunet_dht_profiler.c | ||
123 | src/dht/plugin_block_dht.c | 124 | src/dht/plugin_block_dht.c |
124 | src/dns/dns_api.c | 125 | src/dns/dns_api.c |
125 | src/dns/gnunet-dns-monitor.c | 126 | src/dns/gnunet-dns-monitor.c |
@@ -129,8 +130,8 @@ src/dns/gnunet-service-dns.c | |||
129 | src/dns/gnunet-zonewalk.c | 130 | src/dns/gnunet-zonewalk.c |
130 | src/dns/plugin_block_dns.c | 131 | src/dns/plugin_block_dns.c |
131 | src/exit/gnunet-daemon-exit.c | 132 | src/exit/gnunet-daemon-exit.c |
132 | src/exit/gnunet-helper-exit-windows.c | ||
133 | src/exit/gnunet-helper-exit.c | 133 | src/exit/gnunet-helper-exit.c |
134 | src/exit/gnunet-helper-exit-windows.c | ||
134 | src/fragmentation/defragmentation.c | 135 | src/fragmentation/defragmentation.c |
135 | src/fragmentation/fragmentation.c | 136 | src/fragmentation/fragmentation.c |
136 | src/fs/fs_api.c | 137 | src/fs/fs_api.c |
@@ -155,8 +156,8 @@ src/fs/gnunet-auto-share.c | |||
155 | src/fs/gnunet-daemon-fsprofiler.c | 156 | src/fs/gnunet-daemon-fsprofiler.c |
156 | src/fs/gnunet-directory.c | 157 | src/fs/gnunet-directory.c |
157 | src/fs/gnunet-download.c | 158 | src/fs/gnunet-download.c |
158 | src/fs/gnunet-fs-profiler.c | ||
159 | src/fs/gnunet-fs.c | 159 | src/fs/gnunet-fs.c |
160 | src/fs/gnunet-fs-profiler.c | ||
160 | src/fs/gnunet-helper-fs-publish.c | 161 | src/fs/gnunet-helper-fs-publish.c |
161 | src/fs/gnunet-publish.c | 162 | src/fs/gnunet-publish.c |
162 | src/fs/gnunet-search.c | 163 | src/fs/gnunet-search.c |
@@ -176,10 +177,10 @@ src/gns/gns_tld_api.c | |||
176 | src/gns/gnunet-bcd.c | 177 | src/gns/gnunet-bcd.c |
177 | src/gns/gnunet-dns2gns.c | 178 | src/gns/gnunet-dns2gns.c |
178 | src/gns/gnunet-gns-benchmark.c | 179 | src/gns/gnunet-gns-benchmark.c |
180 | src/gns/gnunet-gns.c | ||
179 | src/gns/gnunet-gns-helper-service-w32.c | 181 | src/gns/gnunet-gns-helper-service-w32.c |
180 | src/gns/gnunet-gns-import.c | 182 | src/gns/gnunet-gns-import.c |
181 | src/gns/gnunet-gns-proxy.c | 183 | src/gns/gnunet-gns-proxy.c |
182 | src/gns/gnunet-gns.c | ||
183 | src/gns/gnunet-service-gns.c | 184 | src/gns/gnunet-service-gns.c |
184 | src/gns/gnunet-service-gns_interceptor.c | 185 | src/gns/gnunet-service-gns_interceptor.c |
185 | src/gns/gnunet-service-gns_resolver.c | 186 | src/gns/gnunet-service-gns_resolver.c |
@@ -187,19 +188,20 @@ src/gns/nss/nss_gns.c | |||
187 | src/gns/nss/nss_gns_query.c | 188 | src/gns/nss/nss_gns_query.c |
188 | src/gns/plugin_block_gns.c | 189 | src/gns/plugin_block_gns.c |
189 | src/gns/plugin_gnsrecord_gns.c | 190 | src/gns/plugin_gnsrecord_gns.c |
190 | src/gns/w32nsp-install.c | 191 | src/gns/plugin_rest_gns.c |
191 | src/gns/w32nsp-resolve.c | ||
192 | src/gns/w32nsp-uninstall.c | ||
193 | src/gns/w32nsp.c | ||
194 | src/gnsrecord/gnsrecord.c | 192 | src/gnsrecord/gnsrecord.c |
195 | src/gnsrecord/gnsrecord_crypto.c | 193 | src/gnsrecord/gnsrecord_crypto.c |
196 | src/gnsrecord/gnsrecord_misc.c | 194 | src/gnsrecord/gnsrecord_misc.c |
197 | src/gnsrecord/gnsrecord_serialization.c | 195 | src/gnsrecord/gnsrecord_serialization.c |
198 | src/gnsrecord/plugin_gnsrecord_dns.c | 196 | src/gnsrecord/plugin_gnsrecord_dns.c |
197 | src/gns/w32nsp.c | ||
198 | src/gns/w32nsp-install.c | ||
199 | src/gns/w32nsp-resolve.c | ||
200 | src/gns/w32nsp-uninstall.c | ||
199 | src/hello/address.c | 201 | src/hello/address.c |
200 | src/hello/gnunet-hello.c | 202 | src/hello/gnunet-hello.c |
201 | src/hello/hello-ng.c | ||
202 | src/hello/hello.c | 203 | src/hello/hello.c |
204 | src/hello/hello-ng.c | ||
203 | src/hostlist/gnunet-daemon-hostlist.c | 205 | src/hostlist/gnunet-daemon-hostlist.c |
204 | src/hostlist/gnunet-daemon-hostlist_client.c | 206 | src/hostlist/gnunet-daemon-hostlist_client.c |
205 | src/hostlist/gnunet-daemon-hostlist_server.c | 207 | src/hostlist/gnunet-daemon-hostlist_server.c |
@@ -207,6 +209,7 @@ src/identity/gnunet-identity.c | |||
207 | src/identity/gnunet-service-identity.c | 209 | src/identity/gnunet-service-identity.c |
208 | src/identity/identity_api.c | 210 | src/identity/identity_api.c |
209 | src/identity/identity_api_lookup.c | 211 | src/identity/identity_api_lookup.c |
212 | src/identity/plugin_rest_identity.c | ||
210 | src/json/json.c | 213 | src/json/json.c |
211 | src/json/json_generator.c | 214 | src/json/json_generator.c |
212 | src/json/json_gnsrecord.c | 215 | src/json/json_gnsrecord.c |
@@ -222,8 +225,8 @@ src/namecache/namecache_api.c | |||
222 | src/namecache/plugin_namecache_flat.c | 225 | src/namecache/plugin_namecache_flat.c |
223 | src/namecache/plugin_namecache_postgres.c | 226 | src/namecache/plugin_namecache_postgres.c |
224 | src/namecache/plugin_namecache_sqlite.c | 227 | src/namecache/plugin_namecache_sqlite.c |
225 | src/namestore/gnunet-namestore-fcfsd.c | ||
226 | src/namestore/gnunet-namestore.c | 228 | src/namestore/gnunet-namestore.c |
229 | src/namestore/gnunet-namestore-fcfsd.c | ||
227 | src/namestore/gnunet-service-namestore.c | 230 | src/namestore/gnunet-service-namestore.c |
228 | src/namestore/gnunet-zoneimport.c | 231 | src/namestore/gnunet-zoneimport.c |
229 | src/namestore/namestore_api.c | 232 | src/namestore/namestore_api.c |
@@ -231,6 +234,7 @@ src/namestore/namestore_api_monitor.c | |||
231 | src/namestore/plugin_namestore_heap.c | 234 | src/namestore/plugin_namestore_heap.c |
232 | src/namestore/plugin_namestore_postgres.c | 235 | src/namestore/plugin_namestore_postgres.c |
233 | src/namestore/plugin_namestore_sqlite.c | 236 | src/namestore/plugin_namestore_sqlite.c |
237 | src/namestore/plugin_rest_namestore.c | ||
234 | src/nat-auto/gnunet-nat-auto.c | 238 | src/nat-auto/gnunet-nat-auto.c |
235 | src/nat-auto/gnunet-nat-auto_legacy.c | 239 | src/nat-auto/gnunet-nat-auto_legacy.c |
236 | src/nat-auto/gnunet-nat-server.c | 240 | src/nat-auto/gnunet-nat-server.c |
@@ -238,10 +242,10 @@ src/nat-auto/gnunet-service-nat-auto.c | |||
238 | src/nat-auto/gnunet-service-nat-auto_legacy.c | 242 | src/nat-auto/gnunet-service-nat-auto_legacy.c |
239 | src/nat-auto/nat_auto_api.c | 243 | src/nat-auto/nat_auto_api.c |
240 | src/nat-auto/nat_auto_api_test.c | 244 | src/nat-auto/nat_auto_api_test.c |
241 | src/nat/gnunet-helper-nat-client-windows.c | ||
242 | src/nat/gnunet-helper-nat-client.c | 245 | src/nat/gnunet-helper-nat-client.c |
243 | src/nat/gnunet-helper-nat-server-windows.c | 246 | src/nat/gnunet-helper-nat-client-windows.c |
244 | src/nat/gnunet-helper-nat-server.c | 247 | src/nat/gnunet-helper-nat-server.c |
248 | src/nat/gnunet-helper-nat-server-windows.c | ||
245 | src/nat/gnunet-nat.c | 249 | src/nat/gnunet-nat.c |
246 | src/nat/gnunet-service-nat.c | 250 | src/nat/gnunet-service-nat.c |
247 | src/nat/gnunet-service-nat_externalip.c | 251 | src/nat/gnunet-service-nat_externalip.c |
@@ -250,16 +254,17 @@ src/nat/gnunet-service-nat_mini.c | |||
250 | src/nat/gnunet-service-nat_stun.c | 254 | src/nat/gnunet-service-nat_stun.c |
251 | src/nat/nat_api.c | 255 | src/nat/nat_api.c |
252 | src/nat/nat_api_stun.c | 256 | src/nat/nat_api_stun.c |
253 | src/nse/gnunet-nse-profiler.c | ||
254 | src/nse/gnunet-nse.c | 257 | src/nse/gnunet-nse.c |
258 | src/nse/gnunet-nse-profiler.c | ||
255 | src/nse/gnunet-service-nse.c | 259 | src/nse/gnunet-service-nse.c |
256 | src/nse/nse_api.c | 260 | src/nse/nse_api.c |
257 | src/nt/nt.c | 261 | src/nt/nt.c |
258 | src/peerinfo-tool/gnunet-peerinfo.c | ||
259 | src/peerinfo-tool/gnunet-peerinfo_plugins.c | ||
260 | src/peerinfo/gnunet-service-peerinfo.c | 262 | src/peerinfo/gnunet-service-peerinfo.c |
261 | src/peerinfo/peerinfo_api.c | 263 | src/peerinfo/peerinfo_api.c |
262 | src/peerinfo/peerinfo_api_notify.c | 264 | src/peerinfo/peerinfo_api_notify.c |
265 | src/peerinfo/plugin_rest_peerinfo.c | ||
266 | src/peerinfo-tool/gnunet-peerinfo.c | ||
267 | src/peerinfo-tool/gnunet-peerinfo_plugins.c | ||
263 | src/peerstore/gnunet-peerstore.c | 268 | src/peerstore/gnunet-peerstore.c |
264 | src/peerstore/gnunet-service-peerstore.c | 269 | src/peerstore/gnunet-service-peerstore.c |
265 | src/peerstore/peerstore_api.c | 270 | src/peerstore/peerstore_api.c |
@@ -278,8 +283,12 @@ src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c | |||
278 | src/reclaim-attribute/reclaim_attribute.c | 283 | src/reclaim-attribute/reclaim_attribute.c |
279 | src/reclaim/gnunet-reclaim.c | 284 | src/reclaim/gnunet-reclaim.c |
280 | src/reclaim/gnunet-service-reclaim.c | 285 | src/reclaim/gnunet-service-reclaim.c |
286 | src/reclaim/json_reclaim.c | ||
287 | src/reclaim/oidc_helper.c | ||
281 | src/reclaim/plugin_gnsrecord_reclaim.c | 288 | src/reclaim/plugin_gnsrecord_reclaim.c |
282 | src/reclaim/plugin_reclaim_sqlite.c | 289 | src/reclaim/plugin_reclaim_sqlite.c |
290 | src/reclaim/plugin_rest_openid_connect.c | ||
291 | src/reclaim/plugin_rest_reclaim.c | ||
283 | src/reclaim/reclaim_api.c | 292 | src/reclaim/reclaim_api.c |
284 | src/regex/gnunet-daemon-regexprofiler.c | 293 | src/regex/gnunet-daemon-regexprofiler.c |
285 | src/regex/gnunet-regex-profiler.c | 294 | src/regex/gnunet-regex-profiler.c |
@@ -295,38 +304,29 @@ src/regex/regex_internal_dht.c | |||
295 | src/regex/regex_test_graph.c | 304 | src/regex/regex_test_graph.c |
296 | src/regex/regex_test_lib.c | 305 | src/regex/regex_test_lib.c |
297 | src/regex/regex_test_random.c | 306 | src/regex/regex_test_random.c |
298 | src/rest-plugins/json_reclaim.c | ||
299 | src/rest-plugins/oidc_helper.c | ||
300 | src/rest-plugins/plugin_rest_copying.c | ||
301 | src/rest-plugins/plugin_rest_credential.c | ||
302 | src/rest-plugins/plugin_rest_gns.c | ||
303 | src/rest-plugins/plugin_rest_identity.c | ||
304 | src/rest-plugins/plugin_rest_namestore.c | ||
305 | src/rest-plugins/plugin_rest_openid_connect.c | ||
306 | src/rest-plugins/plugin_rest_peerinfo.c | ||
307 | src/rest-plugins/plugin_rest_reclaim.c | ||
308 | src/rest/gnunet-rest-server.c | 307 | src/rest/gnunet-rest-server.c |
308 | src/rest/plugin_rest_copying.c | ||
309 | src/rest/rest.c | 309 | src/rest/rest.c |
310 | src/revocation/gnunet-revocation.c | 310 | src/revocation/gnunet-revocation.c |
311 | src/revocation/gnunet-service-revocation.c | 311 | src/revocation/gnunet-service-revocation.c |
312 | src/revocation/plugin_block_revocation.c | 312 | src/revocation/plugin_block_revocation.c |
313 | src/revocation/revocation_api.c | 313 | src/revocation/revocation_api.c |
314 | src/rps/gnunet-rps-profiler.c | ||
315 | src/rps/gnunet-rps.c | 314 | src/rps/gnunet-rps.c |
315 | src/rps/gnunet-rps-profiler.c | ||
316 | src/rps/gnunet-service-rps.c | 316 | src/rps/gnunet-service-rps.c |
317 | src/rps/gnunet-service-rps_custommap.c | 317 | src/rps/gnunet-service-rps_custommap.c |
318 | src/rps/gnunet-service-rps_sampler.c | 318 | src/rps/gnunet-service-rps_sampler.c |
319 | src/rps/gnunet-service-rps_sampler_elem.c | 319 | src/rps/gnunet-service-rps_sampler_elem.c |
320 | src/rps/gnunet-service-rps_view.c | 320 | src/rps/gnunet-service-rps_view.c |
321 | src/rps/rps_api.c | ||
321 | src/rps/rps-sampler_client.c | 322 | src/rps/rps-sampler_client.c |
322 | src/rps/rps-sampler_common.c | 323 | src/rps/rps-sampler_common.c |
323 | src/rps/rps-test_util.c | 324 | src/rps/rps-test_util.c |
324 | src/rps/rps_api.c | ||
325 | src/scalarproduct/gnunet-scalarproduct.c | 325 | src/scalarproduct/gnunet-scalarproduct.c |
326 | src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c | ||
327 | src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c | ||
328 | src/scalarproduct/gnunet-service-scalarproduct_alice.c | 326 | src/scalarproduct/gnunet-service-scalarproduct_alice.c |
329 | src/scalarproduct/gnunet-service-scalarproduct_bob.c | 327 | src/scalarproduct/gnunet-service-scalarproduct_bob.c |
328 | src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c | ||
329 | src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c | ||
330 | src/scalarproduct/scalarproduct_api.c | 330 | src/scalarproduct/scalarproduct_api.c |
331 | src/secretsharing/gnunet-secretsharing-profiler.c | 331 | src/secretsharing/gnunet-secretsharing-profiler.c |
332 | src/secretsharing/gnunet-service-secretsharing.c | 332 | src/secretsharing/gnunet-service-secretsharing.c |
@@ -352,16 +352,15 @@ src/statistics/gnunet-statistics.c | |||
352 | src/statistics/statistics_api.c | 352 | src/statistics/statistics_api.c |
353 | src/template/gnunet-service-template.c | 353 | src/template/gnunet-service-template.c |
354 | src/template/gnunet-template.c | 354 | src/template/gnunet-template.c |
355 | src/testbed-logger/gnunet-service-testbed-logger.c | ||
356 | src/testbed-logger/testbed_logger_api.c | ||
357 | src/testbed/generate-underlay-topology.c | 355 | src/testbed/generate-underlay-topology.c |
358 | src/testbed/gnunet-daemon-latency-logger.c | 356 | src/testbed/gnunet-daemon-latency-logger.c |
359 | src/testbed/gnunet-daemon-testbed-blacklist.c | 357 | src/testbed/gnunet-daemon-testbed-blacklist.c |
360 | src/testbed/gnunet-daemon-testbed-underlay.c | 358 | src/testbed/gnunet-daemon-testbed-underlay.c |
361 | src/testbed/gnunet-helper-testbed.c | 359 | src/testbed/gnunet-helper-testbed.c |
360 | src/testbed/gnunet_mpi_test.c | ||
362 | src/testbed/gnunet-service-test-barriers.c | 361 | src/testbed/gnunet-service-test-barriers.c |
363 | src/testbed/gnunet-service-testbed.c | ||
364 | src/testbed/gnunet-service-testbed_barriers.c | 362 | src/testbed/gnunet-service-testbed_barriers.c |
363 | src/testbed/gnunet-service-testbed.c | ||
365 | src/testbed/gnunet-service-testbed_cache.c | 364 | src/testbed/gnunet-service-testbed_cache.c |
366 | src/testbed/gnunet-service-testbed_connectionpool.c | 365 | src/testbed/gnunet-service-testbed_connectionpool.c |
367 | src/testbed/gnunet-service-testbed_cpustatus.c | 366 | src/testbed/gnunet-service-testbed_cpustatus.c |
@@ -369,19 +368,20 @@ src/testbed/gnunet-service-testbed_links.c | |||
369 | src/testbed/gnunet-service-testbed_meminfo.c | 368 | src/testbed/gnunet-service-testbed_meminfo.c |
370 | src/testbed/gnunet-service-testbed_oc.c | 369 | src/testbed/gnunet-service-testbed_oc.c |
371 | src/testbed/gnunet-service-testbed_peers.c | 370 | src/testbed/gnunet-service-testbed_peers.c |
372 | src/testbed/gnunet-testbed-profiler.c | ||
373 | src/testbed/gnunet_mpi_test.c | ||
374 | src/testbed/gnunet_testbed_mpi_spawn.c | 371 | src/testbed/gnunet_testbed_mpi_spawn.c |
375 | src/testbed/testbed_api.c | 372 | src/testbed/gnunet-testbed-profiler.c |
373 | src/testbed-logger/gnunet-service-testbed-logger.c | ||
374 | src/testbed-logger/testbed_logger_api.c | ||
376 | src/testbed/testbed_api_barriers.c | 375 | src/testbed/testbed_api_barriers.c |
376 | src/testbed/testbed_api.c | ||
377 | src/testbed/testbed_api_hosts.c | 377 | src/testbed/testbed_api_hosts.c |
378 | src/testbed/testbed_api_operations.c | 378 | src/testbed/testbed_api_operations.c |
379 | src/testbed/testbed_api_peers.c | 379 | src/testbed/testbed_api_peers.c |
380 | src/testbed/testbed_api_sd.c | 380 | src/testbed/testbed_api_sd.c |
381 | src/testbed/testbed_api_services.c | 381 | src/testbed/testbed_api_services.c |
382 | src/testbed/testbed_api_statistics.c | 382 | src/testbed/testbed_api_statistics.c |
383 | src/testbed/testbed_api_test.c | ||
384 | src/testbed/testbed_api_testbed.c | 383 | src/testbed/testbed_api_testbed.c |
384 | src/testbed/testbed_api_test.c | ||
385 | src/testbed/testbed_api_topology.c | 385 | src/testbed/testbed_api_topology.c |
386 | src/testbed/testbed_api_underlay.c | 386 | src/testbed/testbed_api_underlay.c |
387 | src/testing/gnunet-testing.c | 387 | src/testing/gnunet-testing.c |
@@ -393,29 +393,29 @@ src/transport/gnunet-communicator-tcp.c | |||
393 | src/transport/gnunet-communicator-udp.c | 393 | src/transport/gnunet-communicator-udp.c |
394 | src/transport/gnunet-communicator-unix.c | 394 | src/transport/gnunet-communicator-unix.c |
395 | src/transport/gnunet-helper-transport-bluetooth.c | 395 | src/transport/gnunet-helper-transport-bluetooth.c |
396 | src/transport/gnunet-helper-transport-wlan-dummy.c | ||
397 | src/transport/gnunet-helper-transport-wlan.c | 396 | src/transport/gnunet-helper-transport-wlan.c |
397 | src/transport/gnunet-helper-transport-wlan-dummy.c | ||
398 | src/transport/gnunet-service-tng.c | 398 | src/transport/gnunet-service-tng.c |
399 | src/transport/gnunet-service-transport.c | ||
400 | src/transport/gnunet-service-transport_ats.c | 399 | src/transport/gnunet-service-transport_ats.c |
400 | src/transport/gnunet-service-transport.c | ||
401 | src/transport/gnunet-service-transport_hello.c | 401 | src/transport/gnunet-service-transport_hello.c |
402 | src/transport/gnunet-service-transport_manipulation.c | 402 | src/transport/gnunet-service-transport_manipulation.c |
403 | src/transport/gnunet-service-transport_neighbours.c | 403 | src/transport/gnunet-service-transport_neighbours.c |
404 | src/transport/gnunet-service-transport_plugins.c | 404 | src/transport/gnunet-service-transport_plugins.c |
405 | src/transport/gnunet-service-transport_validation.c | 405 | src/transport/gnunet-service-transport_validation.c |
406 | src/transport/gnunet-transport.c | ||
406 | src/transport/gnunet-transport-certificate-creation.c | 407 | src/transport/gnunet-transport-certificate-creation.c |
407 | src/transport/gnunet-transport-profiler.c | 408 | src/transport/gnunet-transport-profiler.c |
408 | src/transport/gnunet-transport-wlan-receiver.c | 409 | src/transport/gnunet-transport-wlan-receiver.c |
409 | src/transport/gnunet-transport-wlan-sender.c | 410 | src/transport/gnunet-transport-wlan-sender.c |
410 | src/transport/gnunet-transport.c | ||
411 | src/transport/plugin_transport_http_client.c | 411 | src/transport/plugin_transport_http_client.c |
412 | src/transport/plugin_transport_http_common.c | 412 | src/transport/plugin_transport_http_common.c |
413 | src/transport/plugin_transport_http_server.c | 413 | src/transport/plugin_transport_http_server.c |
414 | src/transport/plugin_transport_smtp.c | 414 | src/transport/plugin_transport_smtp.c |
415 | src/transport/plugin_transport_tcp.c | 415 | src/transport/plugin_transport_tcp.c |
416 | src/transport/plugin_transport_template.c | 416 | src/transport/plugin_transport_template.c |
417 | src/transport/plugin_transport_udp.c | ||
418 | src/transport/plugin_transport_udp_broadcasting.c | 417 | src/transport/plugin_transport_udp_broadcasting.c |
418 | src/transport/plugin_transport_udp.c | ||
419 | src/transport/plugin_transport_unix.c | 419 | src/transport/plugin_transport_unix.c |
420 | src/transport/plugin_transport_wlan.c | 420 | src/transport/plugin_transport_wlan.c |
421 | src/transport/plugin_transport_xt.c | 421 | src/transport/plugin_transport_xt.c |
@@ -424,11 +424,6 @@ src/transport/tcp_connection_legacy.c | |||
424 | src/transport/tcp_server_legacy.c | 424 | src/transport/tcp_server_legacy.c |
425 | src/transport/tcp_server_mst_legacy.c | 425 | src/transport/tcp_server_mst_legacy.c |
426 | src/transport/tcp_service_legacy.c | 426 | src/transport/tcp_service_legacy.c |
427 | src/transport/transport-testing-filenames.c | ||
428 | src/transport/transport-testing-loggers.c | ||
429 | src/transport/transport-testing-main.c | ||
430 | src/transport/transport-testing-send.c | ||
431 | src/transport/transport-testing.c | ||
432 | src/transport/transport_api2_address.c | 427 | src/transport/transport_api2_address.c |
433 | src/transport/transport_api2_communication.c | 428 | src/transport/transport_api2_communication.c |
434 | src/transport/transport_api2_core.c | 429 | src/transport/transport_api2_core.c |
@@ -441,6 +436,11 @@ src/transport/transport_api_manipulation.c | |||
441 | src/transport/transport_api_monitor_peers.c | 436 | src/transport/transport_api_monitor_peers.c |
442 | src/transport/transport_api_monitor_plugins.c | 437 | src/transport/transport_api_monitor_plugins.c |
443 | src/transport/transport_api_offer_hello.c | 438 | src/transport/transport_api_offer_hello.c |
439 | src/transport/transport-testing.c | ||
440 | src/transport/transport-testing-filenames.c | ||
441 | src/transport/transport-testing-loggers.c | ||
442 | src/transport/transport-testing-main.c | ||
443 | src/transport/transport-testing-send.c | ||
444 | src/util/bandwidth.c | 444 | src/util/bandwidth.c |
445 | src/util/benchmark.c | 445 | src/util/benchmark.c |
446 | src/util/bio.c | 446 | src/util/bio.c |
@@ -453,8 +453,8 @@ src/util/configuration_loader.c | |||
453 | src/util/container_bloomfilter.c | 453 | src/util/container_bloomfilter.c |
454 | src/util/container_heap.c | 454 | src/util/container_heap.c |
455 | src/util/container_meta_data.c | 455 | src/util/container_meta_data.c |
456 | src/util/container_multihashmap.c | ||
457 | src/util/container_multihashmap32.c | 456 | src/util/container_multihashmap32.c |
457 | src/util/container_multihashmap.c | ||
458 | src/util/container_multipeermap.c | 458 | src/util/container_multipeermap.c |
459 | src/util/container_multishortmap.c | 459 | src/util/container_multishortmap.c |
460 | src/util/crypto_abe.c | 460 | src/util/crypto_abe.c |
@@ -476,16 +476,16 @@ src/util/dnsparser.c | |||
476 | src/util/dnsstub.c | 476 | src/util/dnsstub.c |
477 | src/util/getopt.c | 477 | src/util/getopt.c |
478 | src/util/getopt_helpers.c | 478 | src/util/getopt_helpers.c |
479 | src/util/gnunet-config-diff.c | ||
480 | src/util/gnunet-config.c | 479 | src/util/gnunet-config.c |
480 | src/util/gnunet-config-diff.c | ||
481 | src/util/gnunet-ecc.c | 481 | src/util/gnunet-ecc.c |
482 | src/util/gnunet-helper-w32-console.c | 482 | src/util/gnunet-helper-w32-console.c |
483 | src/util/gnunet-qr.c | 483 | src/util/gnunet-qr.c |
484 | src/util/gnunet-resolver.c | 484 | src/util/gnunet-resolver.c |
485 | src/util/gnunet-scrypt.c | 485 | src/util/gnunet-scrypt.c |
486 | src/util/gnunet-service-resolver.c | 486 | src/util/gnunet-service-resolver.c |
487 | src/util/gnunet-timeout-w32.c | ||
488 | src/util/gnunet-timeout.c | 487 | src/util/gnunet-timeout.c |
488 | src/util/gnunet-timeout-w32.c | ||
489 | src/util/gnunet-uri.c | 489 | src/util/gnunet-uri.c |
490 | src/util/helper.c | 490 | src/util/helper.c |
491 | src/util/load.c | 491 | src/util/load.c |
@@ -514,13 +514,13 @@ src/util/tun.c | |||
514 | src/util/w32cat.c | 514 | src/util/w32cat.c |
515 | src/util/win.c | 515 | src/util/win.c |
516 | src/util/winproc.c | 516 | src/util/winproc.c |
517 | src/vpn/gnunet-helper-vpn-windows.c | ||
518 | src/vpn/gnunet-helper-vpn.c | 517 | src/vpn/gnunet-helper-vpn.c |
518 | src/vpn/gnunet-helper-vpn-windows.c | ||
519 | src/vpn/gnunet-service-vpn.c | 519 | src/vpn/gnunet-service-vpn.c |
520 | src/vpn/gnunet-vpn.c | 520 | src/vpn/gnunet-vpn.c |
521 | src/vpn/vpn_api.c | 521 | src/vpn/vpn_api.c |
522 | src/zonemaster/gnunet-service-zonemaster-monitor.c | ||
523 | src/zonemaster/gnunet-service-zonemaster.c | 522 | src/zonemaster/gnunet-service-zonemaster.c |
523 | src/zonemaster/gnunet-service-zonemaster-monitor.c | ||
524 | src/fs/fs_api.h | 524 | src/fs/fs_api.h |
525 | src/include/compat.h | 525 | src/include/compat.h |
526 | src/include/gnunet_common.h | 526 | src/include/gnunet_common.h |
diff --git a/pre-commit b/pre-commit index 777728a6b..c67fcaf0c 100755 --- a/pre-commit +++ b/pre-commit | |||
@@ -2,6 +2,8 @@ | |||
2 | # Run this script to indent the GNUnet code. When run without arguments, | 2 | # Run this script to indent the GNUnet code. When run without arguments, |
3 | # it indents the ENTIRE src/ tree. Run with 'src/XXX' to indent the | 3 | # it indents the ENTIRE src/ tree. Run with 'src/XXX' to indent the |
4 | # src/XXX directory. | 4 | # src/XXX directory. |
5 | # | ||
6 | # This script is in the public domain. | ||
5 | if test $# = 0 | 7 | if test $# = 0 |
6 | then | 8 | then |
7 | PATHS=src/ | 9 | PATHS=src/ |
@@ -12,10 +14,9 @@ find $PATHS -name "*.c" -exec indent {} \; | |||
12 | find $PATHS -name "*.h" -exec indent {} \; | 14 | find $PATHS -name "*.h" -exec indent {} \; |
13 | find $PATHS -name "*.c" -exec indent {} \; | 15 | find $PATHS -name "*.c" -exec indent {} \; |
14 | find $PATHS -name "*.h" -exec indent {} \; | 16 | find $PATHS -name "*.h" -exec indent {} \; |
15 | find $PATHS -name "*.c" -exec contrib/removetrailingwhitespace.py {} \; | 17 | find $PATHS -name "*.c" -exec contrib/scripts/removetrailingwhitespace.py {} \; |
16 | find $PATHS -name "*.h" -exec contrib/removetrailingwhitespace.py {} \; | 18 | find $PATHS -name "*.h" -exec contrib/scripts/removetrailingwhitespace.py {} \; |
17 | if test -x "`which 'dos2unix'`" | 19 | if test -n "`dos2unix -V | head -n1 | awk '{print $1 $2}'`"; then |
18 | then | ||
19 | find $PATHS -name "*.c" -exec dos2unix {} \; | 20 | find $PATHS -name "*.c" -exec dos2unix {} \; |
20 | find $PATHS -name "*.h" -exec dos2unix {} \; | 21 | find $PATHS -name "*.h" -exec dos2unix {} \; |
21 | fi | 22 | fi |
diff --git a/src/Makefile.am b/src/Makefile.am index 03738e4ed..c1c708aa6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -60,7 +60,7 @@ endif | |||
60 | 60 | ||
61 | if HAVE_MHD | 61 | if HAVE_MHD |
62 | if HAVE_JSON | 62 | if HAVE_JSON |
63 | REST_DIR = rest rest-plugins | 63 | REST_DIR = rest |
64 | endif | 64 | endif |
65 | endif | 65 | endif |
66 | 66 | ||
@@ -81,6 +81,8 @@ SUBDIRS = \ | |||
81 | statistics \ | 81 | statistics \ |
82 | arm \ | 82 | arm \ |
83 | $(TESTING) \ | 83 | $(TESTING) \ |
84 | $(JSON_DIR) \ | ||
85 | $(REST_DIR) \ | ||
84 | peerinfo \ | 86 | peerinfo \ |
85 | $(SQLITE_DIR) \ | 87 | $(SQLITE_DIR) \ |
86 | $(MYSQL_DIR) \ | 88 | $(MYSQL_DIR) \ |
@@ -121,9 +123,7 @@ SUBDIRS = \ | |||
121 | exit \ | 123 | exit \ |
122 | pt \ | 124 | pt \ |
123 | secretsharing \ | 125 | secretsharing \ |
124 | $(EXP_DIR) \ | 126 | $(EXP_DIR) \ |
125 | $(JSON_DIR) \ | ||
126 | $(REST_DIR) \ | ||
127 | integration-tests | 127 | integration-tests |
128 | 128 | ||
129 | endif | 129 | endif |
diff --git a/src/arm/test_gnunet_arm.py.in b/src/arm/test_gnunet_arm.py.in index 10bb58a9c..1d067b5d9 100644 --- a/src/arm/test_gnunet_arm.py.in +++ b/src/arm/test_gnunet_arm.py.in | |||
@@ -1,5 +1,5 @@ | |||
1 | #!@PYTHON@ | 1 | #!@PYTHON@ |
2 | from __future__ import print_function | 2 | |
3 | import os | 3 | import os |
4 | import sys | 4 | import sys |
5 | import shutil | 5 | import shutil |
diff --git a/src/cadet/loopcheck.sh b/src/cadet/loopcheck.sh index ddc8c191c..9b867e95b 100755 --- a/src/cadet/loopcheck.sh +++ b/src/cadet/loopcheck.sh | |||
@@ -1,4 +1,41 @@ | |||
1 | #!/bin/sh | 1 | #!/usr/bin/env bash |
2 | # This script is in the public domain | ||
3 | # POSIX shell solution for named pipes and pipestatus, | ||
4 | # http://shell.cfajohnson.com/cus-faq-2.html#Q11 | ||
5 | # run() { | ||
6 | # j=1 | ||
7 | # while eval "\${pipestatus_$j+:} false"; do | ||
8 | # unset pipestatus_$j | ||
9 | # j=$(($j+1)) | ||
10 | # done | ||
11 | # j=1 com= k=1 l= | ||
12 | # for a; do | ||
13 | # if [ "x$a" = 'x|' ]; then | ||
14 | # com="$com { $l "'3>&- | ||
15 | # echo "pipestatus_'$j'=$?" >&3 | ||
16 | # } 4>&- |' | ||
17 | # j=$(($j+1)) l= | ||
18 | # else | ||
19 | # l="$l \"\$$k\"" | ||
20 | # fi | ||
21 | # k=$(($k+1)) | ||
22 | # done | ||
23 | # com="$com $l"' 3>&- >&4 4>&- | ||
24 | # echo "pipestatus_'$j'=$?"' | ||
25 | # exec 4>&1 | ||
26 | # eval "$(exec 3>&1; eval "$com")" | ||
27 | # exec 4>&- | ||
28 | # j=1 | ||
29 | # while eval "\${pipestatus_$j+:} false"; do | ||
30 | # eval "[ \$pipestatus_$j -eq 0 ]" || return 1 | ||
31 | # j=$(($j+1)) | ||
32 | # done | ||
33 | # return 0 | ||
34 | # } | ||
35 | |||
36 | # # https://mywiki.wooledge.org/Bashism has another solution: | ||
37 | # # mkfifo fifo; command2 <fifo & command1 >fifo; echo "$?" | ||
38 | |||
2 | while true; do | 39 | while true; do |
3 | if [ "$1" = "" ]; then | 40 | if [ "$1" = "" ]; then |
4 | echo All | 41 | echo All |
@@ -7,6 +44,7 @@ while true; do | |||
7 | echo One | 44 | echo One |
8 | LOGFILE="test_`date "+%m.%d-%H:%M:%S"`.log" | 45 | LOGFILE="test_`date "+%m.%d-%H:%M:%S"`.log" |
9 | taskset 01 $1 2>&1 | tee $LOGFILE | grep -v DEBUG; | 46 | taskset 01 $1 2>&1 | tee $LOGFILE | grep -v DEBUG; |
47 | # TODO: Replace $PIPESTATUS with more portable code | ||
10 | if [ "${PIPESTATUS[0]}" != "0" ]; then | 48 | if [ "${PIPESTATUS[0]}" != "0" ]; then |
11 | echo "Failed"; | 49 | echo "Failed"; |
12 | date; | 50 | date; |
@@ -15,5 +53,5 @@ while true; do | |||
15 | fi | 53 | fi |
16 | grep cadet test_*.log | grep -B 10 ERROR && break | 54 | grep cadet test_*.log | grep -B 10 ERROR && break |
17 | grep cadet test_*.log | grep -B 10 Assert && break | 55 | grep cadet test_*.log | grep -B 10 Assert && break |
18 | ls core* &> /dev/null && break | 56 | ls core* > /dev/null 2>&1 && break |
19 | done | 57 | done |
diff --git a/src/cadet/run_profiler.sh b/src/cadet/run_profiler.sh index 81ea4a761..4273dcd27 100755 --- a/src/cadet/run_profiler.sh +++ b/src/cadet/run_profiler.sh | |||
@@ -22,4 +22,4 @@ echo "using $PEERS peers, $LINKS links"; | |||
22 | 22 | ||
23 | sed -e "s/%LINKS%/$LINKS/;s/%NSE%/$NSE/" profiler.conf > .profiler.conf | 23 | sed -e "s/%LINKS%/$LINKS/;s/%NSE%/$NSE/" profiler.conf > .profiler.conf |
24 | 24 | ||
25 | ./gnunet-cadet-profiler $ROUNDTIME $PEERS $PINGS $4 |& tee log | grep -v DEBUG | 25 | ./gnunet-cadet-profiler $ROUNDTIME $PEERS $PINGS $4 2>&1 | tee log | grep -v DEBUG |
diff --git a/src/consensus/consensus-simulation.py.in b/src/consensus/consensus-simulation.py.in index 161015d00..39daf81c6 100644 --- a/src/consensus/consensus-simulation.py.in +++ b/src/consensus/consensus-simulation.py.in | |||
@@ -17,16 +17,9 @@ | |||
17 | # | 17 | # |
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | 19 | ||
20 | from __future__ import absolute_import | ||
21 | from __future__ import print_function | ||
22 | from __future__ import division | ||
23 | from builtins import str | ||
24 | from builtins import range | ||
25 | from past.utils import old_div | ||
26 | import argparse | 20 | import argparse |
27 | import random | 21 | import random |
28 | from math import ceil, log, floor | 22 | from math import ceil, log, floor |
29 | from past.builtins import xrange | ||
30 | 23 | ||
31 | 24 | ||
32 | def bsc(n): | 25 | def bsc(n): |
@@ -43,14 +36,12 @@ def bsc(n): | |||
43 | 36 | ||
44 | def simulate(k, n, verbose): | 37 | def simulate(k, n, verbose): |
45 | assert k < n | 38 | assert k < n |
46 | largest_arc = old_div(int(2**ceil(log(n, 2))), 2) | 39 | largest_arc = int(2**ceil(log(n, 2))) // 2 |
47 | num_ghosts = (2 * largest_arc) - n | 40 | num_ghosts = (2 * largest_arc) - n |
48 | if verbose: | 41 | if verbose: |
49 | print("we have", num_ghosts, "ghost peers") | 42 | print("we have", num_ghosts, "ghost peers") |
50 | # n.b. all peers with idx<k are evil | 43 | # n.b. all peers with idx<k are evil |
51 | peers = list(range(n)) | 44 | peers = list(range(n)) |
52 | # py2-3 compatible, backwards. | ||
53 | # refer to http://python-future.org/compatible_idioms.html#xrange | ||
54 | info = [1 << x for x in range(n)] | 45 | info = [1 << x for x in range(n)] |
55 | 46 | ||
56 | def done_p(): | 47 | def done_p(): |
@@ -111,4 +102,4 @@ if __name__ == "__main__": | |||
111 | sum = 0.0 | 102 | sum = 0.0 |
112 | for n in range(0, args.r): | 103 | for n in range(0, args.r): |
113 | sum += simulate(args.k, args.n, args.verbose) | 104 | sum += simulate(args.k, args.n, args.verbose) |
114 | print(old_div(sum, args.r)) | 105 | print(sum // args.r) |
diff --git a/src/conversation/test.sh b/src/conversation/test.sh index ca4d15ac1..20e82bc88 100644 --- a/src/conversation/test.sh +++ b/src/conversation/test.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | 2 | ||
3 | export GST_DEBUG_DUMP_DOT_DIR=/tmp/ | 3 | export GST_DEBUG_DUMP_DOT_DIR=/tmp/ |
4 | GST_DEBUG_DUMP_DOT_DIR=/tmp/ ./gnunet-helper-audio-record |GST_DEBUG_DUMP_DOT_DIR=/tmp/ ./gnunet-helper-audio-playback | 4 | GST_DEBUG_DUMP_DOT_DIR=/tmp/ ./gnunet-helper-audio-record |GST_DEBUG_DUMP_DOT_DIR=/tmp/ ./gnunet-helper-audio-playback |
diff --git a/src/credential/Makefile.am b/src/credential/Makefile.am index b96e33b5c..aaac0d2c2 100644 --- a/src/credential/Makefile.am +++ b/src/credential/Makefile.am | |||
@@ -90,3 +90,19 @@ if HAVE_SQLITE | |||
90 | TESTS = $(check_SCRIPTS) | 90 | TESTS = $(check_SCRIPTS) |
91 | endif | 91 | endif |
92 | endif | 92 | endif |
93 | |||
94 | #libgnunet_plugin_rest_credential_la_SOURCES = \ | ||
95 | # plugin_rest_credential.c | ||
96 | #libgnunet_plugin_rest_credential_la_LIBADD = \ | ||
97 | # $(top_builddir)/src/credential/libgnunetcredential.la \ | ||
98 | # $(top_builddir)/src/rest/libgnunetrest.la \ | ||
99 | # $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
100 | # $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
101 | # $(LTLIBINTL) -ljansson -lmicrohttpd | ||
102 | #libgnunet_plugin_rest_credential_la_LDFLAGS = \ | ||
103 | # $(GN_PLUGIN_LDFLAGS) | ||
104 | |||
105 | |||
106 | |||
107 | |||
108 | |||
diff --git a/src/rest-plugins/plugin_rest_credential.c b/src/credential/plugin_rest_credential.c index 78267b54e..78267b54e 100644 --- a/src/rest-plugins/plugin_rest_credential.c +++ b/src/credential/plugin_rest_credential.c | |||
diff --git a/src/credential/test_credential_collect.sh b/src/credential/test_credential_collect.sh index 6c713063f..0ae063eda 100755 --- a/src/credential/test_credential_collect.sh +++ b/src/credential/test_credential_collect.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f` | |||
20 | # (3) PKEY3.user -> PKEY4 | 20 | # (3) PKEY3.user -> PKEY4 |
21 | 21 | ||
22 | 22 | ||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 23 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
24 | 24 | ||
25 | TEST_ATTR="test" | 25 | TEST_ATTR="test" |
26 | TEST_ATTR2="test2" | 26 | TEST_ATTR2="test2" |
diff --git a/src/credential/test_credential_collect_rest.sh b/src/credential/test_credential_collect_rest.sh index 0b31f85bc..fe59d9399 100755 --- a/src/credential/test_credential_collect_rest.sh +++ b/src/credential/test_credential_collect_rest.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f` | |||
22 | # (5) GNUnet.developer -> Alice | 22 | # (5) GNUnet.developer -> Alice |
23 | 23 | ||
24 | 24 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 25 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
27 | gnunet-identity -C service -c test_credential_lookup.conf | 27 | gnunet-identity -C service -c test_credential_lookup.conf |
28 | gnunet-identity -C alice -c test_credential_lookup.conf | 28 | gnunet-identity -C alice -c test_credential_lookup.conf |
@@ -82,9 +82,10 @@ gnunet-arm -e -c test_credential_lookup.conf | |||
82 | echo "Done" | 82 | echo "Done" |
83 | if [ "$RES_CRED" != "Failed." ] | 83 | if [ "$RES_CRED" != "Failed." ] |
84 | then | 84 | then |
85 | echo -e "${RES_CRED}" | 85 | # TODO: replace echo -e bashism. |
86 | exit 0 | 86 | echo -e "${RES_CRED}" |
87 | exit 0 | ||
87 | else | 88 | else |
88 | echo "FAIL: Failed to verify credential $RES_CRED." | 89 | echo "FAIL: Failed to verify credential $RES_CRED." |
89 | exit 1 | 90 | exit 1 |
90 | fi | 91 | fi |
diff --git a/src/credential/test_credential_issue.sh b/src/credential/test_credential_issue.sh index 158d91c5b..f06de5d42 100755 --- a/src/credential/test_credential_issue.sh +++ b/src/credential/test_credential_issue.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f` | |||
20 | # (3) PKEY3.user -> PKEY4 | 20 | # (3) PKEY3.user -> PKEY4 |
21 | 21 | ||
22 | 22 | ||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 23 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
24 | 24 | ||
25 | TEST_ATTR="test" | 25 | TEST_ATTR="test" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
diff --git a/src/credential/test_credential_issue_rest.sh b/src/credential/test_credential_issue_rest.sh index 15cd55083..c518c08ec 100755 --- a/src/credential/test_credential_issue_rest.sh +++ b/src/credential/test_credential_issue_rest.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f` | |||
20 | # (3) PKEY3.user -> PKEY4 | 20 | # (3) PKEY3.user -> PKEY4 |
21 | 21 | ||
22 | 22 | ||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 23 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
24 | 24 | ||
25 | TEST_ATTR="test" | 25 | TEST_ATTR="test" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
diff --git a/src/credential/test_credential_verify.sh b/src/credential/test_credential_verify.sh index d042bcfe6..49d4d4afb 100755 --- a/src/credential/test_credential_verify.sh +++ b/src/credential/test_credential_verify.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f` | |||
22 | # (5) GNUnet.developer -> Alice | 22 | # (5) GNUnet.developer -> Alice |
23 | 23 | ||
24 | 24 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 25 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
27 | gnunet-identity -C service -c test_credential_lookup.conf | 27 | gnunet-identity -C service -c test_credential_lookup.conf |
28 | gnunet-identity -C alice -c test_credential_lookup.conf | 28 | gnunet-identity -C alice -c test_credential_lookup.conf |
@@ -73,6 +73,7 @@ gnunet-arm -e -c test_credential_lookup.conf | |||
73 | 73 | ||
74 | if [ "$RES_CRED" != "Failed." ] | 74 | if [ "$RES_CRED" != "Failed." ] |
75 | then | 75 | then |
76 | # TODO: replace echo -e bashism | ||
76 | echo -e "${RES_CRED}" | 77 | echo -e "${RES_CRED}" |
77 | exit 0 | 78 | exit 0 |
78 | else | 79 | else |
diff --git a/src/credential/test_credential_verify_and.sh b/src/credential/test_credential_verify_and.sh index 9d5c1962e..7e8dc1392 100755 --- a/src/credential/test_credential_verify_and.sh +++ b/src/credential/test_credential_verify_and.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f` | |||
22 | # (5) GNUnet.developer -> Alice | 22 | # (5) GNUnet.developer -> Alice |
23 | 23 | ||
24 | 24 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 25 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
27 | gnunet-identity -C service -c test_credential_lookup.conf | 27 | gnunet-identity -C service -c test_credential_lookup.conf |
28 | gnunet-identity -C alice -c test_credential_lookup.conf | 28 | gnunet-identity -C alice -c test_credential_lookup.conf |
@@ -73,6 +73,7 @@ gnunet-arm -e -c test_credential_lookup.conf | |||
73 | 73 | ||
74 | if [ "$RES_CRED" != "Failed." ] | 74 | if [ "$RES_CRED" != "Failed." ] |
75 | then | 75 | then |
76 | # TODO: echo -e bashism | ||
76 | echo -e "${RES_CRED}" | 77 | echo -e "${RES_CRED}" |
77 | exit 0 | 78 | exit 0 |
78 | else | 79 | else |
diff --git a/src/credential/test_credential_verify_rest.sh b/src/credential/test_credential_verify_rest.sh index 6133ea25e..99db5da8a 100755 --- a/src/credential/test_credential_verify_rest.sh +++ b/src/credential/test_credential_verify_rest.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f` | |||
22 | # (5) GNUnet.developer -> Alice | 22 | # (5) GNUnet.developer -> Alice |
23 | 23 | ||
24 | 24 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 25 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
27 | gnunet-identity -C service -c test_credential_lookup.conf | 27 | gnunet-identity -C service -c test_credential_lookup.conf |
28 | gnunet-identity -C alice -c test_credential_lookup.conf | 28 | gnunet-identity -C alice -c test_credential_lookup.conf |
@@ -79,6 +79,7 @@ gnunet-arm -e -c test_credential_lookup.conf | |||
79 | 79 | ||
80 | if [ "$RES_CRED" != "Failed." ] | 80 | if [ "$RES_CRED" != "Failed." ] |
81 | then | 81 | then |
82 | # TODO: replace echo -e bashism | ||
82 | echo -e "${RES_CRED}" | 83 | echo -e "${RES_CRED}" |
83 | exit 0 | 84 | exit 0 |
84 | else | 85 | else |
diff --git a/src/credential/test_credential_verify_simple.sh b/src/credential/test_credential_verify_simple.sh index bcb3f9877..41afb47b0 100755 --- a/src/credential/test_credential_verify_simple.sh +++ b/src/credential/test_credential_verify_simple.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -18,7 +18,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f` | |||
18 | # (3) Isser.user -> Subject | 18 | # (3) Isser.user -> Subject |
19 | 19 | ||
20 | 20 | ||
21 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 21 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
22 | gnunet-arm -s -c test_credential_lookup.conf | 22 | gnunet-arm -s -c test_credential_lookup.conf |
23 | gnunet-identity -C testissuer -c test_credential_lookup.conf | 23 | gnunet-identity -C testissuer -c test_credential_lookup.conf |
24 | gnunet-identity -C testsubject -c test_credential_lookup.conf | 24 | gnunet-identity -C testsubject -c test_credential_lookup.conf |
diff --git a/src/dht/test_dht_tools.py.in b/src/dht/test_dht_tools.py.in index 38a9f9622..2d9379a42 100644 --- a/src/dht/test_dht_tools.py.in +++ b/src/dht/test_dht_tools.py.in | |||
@@ -11,8 +11,7 @@ | |||
11 | # | 11 | # |
12 | # The code does NOT depend on DHT routing or any actual P2P functionality. | 12 | # The code does NOT depend on DHT routing or any actual P2P functionality. |
13 | # | 13 | # |
14 | from __future__ import print_function | 14 | |
15 | from __future__ import absolute_import | ||
16 | import os | 15 | import os |
17 | import sys | 16 | import sys |
18 | import shutil | 17 | import shutil |
diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c index f236924bb..fb970224a 100644 --- a/src/dns/gnunet-helper-dns.c +++ b/src/dns/gnunet-helper-dns.c | |||
@@ -83,7 +83,7 @@ | |||
83 | */ | 83 | */ |
84 | #define MAX_SIZE 65536 | 84 | #define MAX_SIZE 65536 |
85 | 85 | ||
86 | #ifndef _LINUX_IN6_H | 86 | #if !HAVE_DECL_STRUCT_IN6_IFREQ |
87 | /** | 87 | /** |
88 | * This is in linux/include/net/ipv6.h, but not always exported... | 88 | * This is in linux/include/net/ipv6.h, but not always exported... |
89 | */ | 89 | */ |
diff --git a/src/dns/test_gnunet_dns.sh b/src/dns/test_gnunet_dns.sh index 57b9716f5..0fa338c9b 100755 --- a/src/dns/test_gnunet_dns.sh +++ b/src/dns/test_gnunet_dns.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | 2 | ||
3 | ME=`whoami` | 3 | ME=`whoami` |
4 | if [ "$ME" != "root" ] | 4 | if [ "$ME" != "root" ] |
@@ -26,12 +26,17 @@ then | |||
26 | echo "This test requires nslookup. Skipping." | 26 | echo "This test requires nslookup. Skipping." |
27 | exit 77 | 27 | exit 77 |
28 | fi | 28 | fi |
29 | if ! iptables -t mangle --list &> /dev/null | 29 | if [ ! -x `which iptables` ] |
30 | then | ||
31 | echo "This test requires iptables. Skipping." | ||
32 | exit 77 | ||
33 | fi | ||
34 | if ! iptables -t mangle --list > /dev/null 2>&1 | ||
30 | then | 35 | then |
31 | echo "This test requires iptables with 'mangle' support. Skipping." | 36 | echo "This test requires iptables with 'mangle' support. Skipping." |
32 | exit 77 | 37 | exit 77 |
33 | fi | 38 | fi |
34 | if grep % /etc/resolv.conf &> /dev/null | 39 | if grep % /etc/resolv.conf > /dev/null 2>&1 |
35 | then | 40 | then |
36 | echo "This system seems to use a DNS server on an IPv6 link-local address, which is not supported. Skipping." | 41 | echo "This system seems to use a DNS server on an IPv6 link-local address, which is not supported. Skipping." |
37 | exit 77 | 42 | exit 77 |
@@ -52,5 +57,6 @@ else | |||
52 | echo "Test run, with success." | 57 | echo "Test run, with success." |
53 | ret=0 | 58 | ret=0 |
54 | fi | 59 | fi |
60 | # TODO: jobs is a possible bashism. Fix. | ||
55 | kill `jobs -p` | 61 | kill `jobs -p` |
56 | exit $ret | 62 | exit $ret |
diff --git a/src/exit/install-exit-helper.sh b/src/exit/install-exit-helper.sh index 76af4efa7..d9ae14106 100755 --- a/src/exit/install-exit-helper.sh +++ b/src/exit/install-exit-helper.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # $1 - bindir | 2 | # $1 - bindir |
3 | # $2 - sudo binary (optional) | 3 | # $2 - sudo binary (optional) |
4 | $2 chown root:root $1/gnunet-helper-exit || true | 4 | $2 chown root:root $1/gnunet-helper-exit || true |
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index eb8a7ed19..fbf32c2a7 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -122,7 +122,7 @@ static int extract_only; | |||
122 | /** | 122 | /** |
123 | * Command-line option to disable adding creation time. | 123 | * Command-line option to disable adding creation time. |
124 | */ | 124 | */ |
125 | static int do_disable_creation_time; | 125 | static int enable_creation_time; |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * Handle to the directory scanner (for recursive insertions). | 128 | * Handle to the directory scanner (for recursive insertions). |
@@ -419,7 +419,7 @@ publish_inspector (void *cls, | |||
419 | GNUNET_CONTAINER_meta_data_destroy (meta); | 419 | GNUNET_CONTAINER_meta_data_destroy (meta); |
420 | meta = NULL; | 420 | meta = NULL; |
421 | } | 421 | } |
422 | if (!do_disable_creation_time) | 422 | if (enable_creation_time) |
423 | GNUNET_CONTAINER_meta_data_add_publication_date (m); | 423 | GNUNET_CONTAINER_meta_data_add_publication_date (m); |
424 | if (extract_only) | 424 | if (extract_only) |
425 | { | 425 | { |
@@ -902,15 +902,15 @@ main (int argc, | |||
902 | "LEVEL", | 902 | "LEVEL", |
903 | gettext_noop ("set the desired LEVEL of sender-anonymity"), | 903 | gettext_noop ("set the desired LEVEL of sender-anonymity"), |
904 | &bo.anonymity_level), | 904 | &bo.anonymity_level), |
905 | GNUNET_GETOPT_option_flag ('d', | ||
906 | "disable-creation-time", | ||
907 | gettext_noop ("disable adding the creation time to the " | ||
908 | "metadata of the uploaded file"), | ||
909 | &do_disable_creation_time), | ||
910 | GNUNET_GETOPT_option_flag ('D', | 905 | GNUNET_GETOPT_option_flag ('D', |
911 | "disable-extractor", | 906 | "disable-extractor", |
912 | gettext_noop ("do not use libextractor to add keywords or metadata"), | 907 | gettext_noop ("do not use libextractor to add keywords or metadata"), |
913 | &disable_extractor), | 908 | &disable_extractor), |
909 | GNUNET_GETOPT_option_flag ('E', | ||
910 | "enable-creation-time", | ||
911 | gettext_noop ("enable adding the creation time to the " | ||
912 | "metadata of the uploaded file"), | ||
913 | &enable_creation_time), | ||
914 | GNUNET_GETOPT_option_flag ('e', | 914 | GNUNET_GETOPT_option_flag ('e', |
915 | "extract", | 915 | "extract", |
916 | gettext_noop ("print list of extracted keywords that would " | 916 | gettext_noop ("print list of extracted keywords that would " |
diff --git a/src/fs/test_gnunet_fs_psd.py.in b/src/fs/test_gnunet_fs_psd.py.in index d5a036c28..a1e4db9d5 100755 --- a/src/fs/test_gnunet_fs_psd.py.in +++ b/src/fs/test_gnunet_fs_psd.py.in | |||
@@ -18,7 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # Testcase for file-sharing command-line tools (publish, search, download) | 20 | # Testcase for file-sharing command-line tools (publish, search, download) |
21 | from __future__ import print_function | 21 | |
22 | import sys | 22 | import sys |
23 | import os | 23 | import os |
24 | import subprocess | 24 | import subprocess |
diff --git a/src/fs/test_gnunet_fs_rec.py.in b/src/fs/test_gnunet_fs_rec.py.in index 59063a9ee..0f881564f 100755 --- a/src/fs/test_gnunet_fs_rec.py.in +++ b/src/fs/test_gnunet_fs_rec.py.in | |||
@@ -11,7 +11,7 @@ | |||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | # Affero General Public License for more details. | 13 | # Affero General Public License for more details. |
14 | # | 14 | # |
15 | # You should have received a copy of the GNU Affero General Public License | 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/>. | 16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | # | 17 | # |
@@ -65,7 +65,7 @@ tar.extractall() | |||
65 | # first, basic publish-search-download run | 65 | # first, basic publish-search-download run |
66 | try: | 66 | try: |
67 | pub = pexpect() | 67 | pub = pexpect() |
68 | pub.spawn(None, [publish, '-c', 'test_gnunet_fs_rec_data.conf', '-d', '-k', 'testdir', 'dir/'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 68 | pub.spawn(None, [publish, '-c', 'test_gnunet_fs_rec_data.conf', '-k', 'testdir', 'dir/'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
69 | # Can't say much for publishing, except that the last one is the toplevel directory | 69 | # Can't say much for publishing, except that the last one is the toplevel directory |
70 | pub.expect("stdout", re.compile(r"Publishing `.+' done\.\r?\n")) | 70 | pub.expect("stdout", re.compile(r"Publishing `.+' done\.\r?\n")) |
71 | pub.expect("stdout", re.compile(r"URI is `gnunet://fs/chk/[A-Z0-9]{103}\.[A-Z0-9]{103}\.\d+'\.\r?\n")) | 71 | pub.expect("stdout", re.compile(r"URI is `gnunet://fs/chk/[A-Z0-9]{103}\.[A-Z0-9]{103}\.\d+'\.\r?\n")) |
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 434d50f34..6ebbbcaff 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -89,9 +89,16 @@ bin_PROGRAMS += gnunet-bcd | |||
89 | endif | 89 | endif |
90 | endif | 90 | endif |
91 | 91 | ||
92 | if HAVE_MHD | ||
93 | if HAVE_JSON | ||
94 | REST_PLUGIN = libgnunet_plugin_rest_gns.la | ||
95 | endif | ||
96 | endif | ||
97 | |||
92 | plugin_LTLIBRARIES = \ | 98 | plugin_LTLIBRARIES = \ |
93 | libgnunet_plugin_block_gns.la \ | 99 | libgnunet_plugin_block_gns.la \ |
94 | libgnunet_plugin_gnsrecord_gns.la | 100 | libgnunet_plugin_gnsrecord_gns.la \ |
101 | $(REST_PLUGIN) | ||
95 | 102 | ||
96 | 103 | ||
97 | bin_SCRIPTS = \ | 104 | bin_SCRIPTS = \ |
@@ -104,6 +111,21 @@ gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile | |||
104 | $(do_subst) < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca | 111 | $(do_subst) < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca |
105 | chmod +x gnunet-gns-proxy-setup-ca | 112 | chmod +x gnunet-gns-proxy-setup-ca |
106 | 113 | ||
114 | |||
115 | libgnunet_plugin_rest_gns_la_SOURCES = \ | ||
116 | plugin_rest_gns.c | ||
117 | libgnunet_plugin_rest_gns_la_LIBADD = \ | ||
118 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
119 | libgnunetgns.la \ | ||
120 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
121 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
122 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
123 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
124 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
125 | libgnunet_plugin_rest_gns_la_LDFLAGS = \ | ||
126 | $(GN_PLUGIN_LDFLAGS) | ||
127 | |||
128 | |||
107 | libgnunet_plugin_gnsrecord_gns_la_SOURCES = \ | 129 | libgnunet_plugin_gnsrecord_gns_la_SOURCES = \ |
108 | plugin_gnsrecord_gns.c | 130 | plugin_gnsrecord_gns.c |
109 | libgnunet_plugin_gnsrecord_gns_la_LIBADD = \ | 131 | libgnunet_plugin_gnsrecord_gns_la_LIBADD = \ |
diff --git a/src/gns/gns.conf.in b/src/gns/gns.conf.in index 2e6a02b07..3252e4888 100644 --- a/src/gns/gns.conf.in +++ b/src/gns/gns.conf.in | |||
@@ -32,6 +32,8 @@ INTERCEPT_DNS = NO | |||
32 | BINARY = gnunet-gns-proxy | 32 | BINARY = gnunet-gns-proxy |
33 | START_ON_DEMAND = NO | 33 | START_ON_DEMAND = NO |
34 | RUN_PER_USER = YES | 34 | RUN_PER_USER = YES |
35 | BIND_TO=127.0.0.1 | ||
36 | BIND_TO6=::1 | ||
35 | 37 | ||
36 | # Where is the certificate for the GNS proxy stored? | 38 | # Where is the certificate for the GNS proxy stored? |
37 | PROXY_CACERT = $GNUNET_DATA_HOME/gns/gns_ca_cert.pem | 39 | PROXY_CACERT = $GNUNET_DATA_HOME/gns/gns_ca_cert.pem |
@@ -42,6 +44,8 @@ PROXY_UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-gns-proxy.sock | |||
42 | BINARY = gnunet-dns2gns | 44 | BINARY = gnunet-dns2gns |
43 | START_ON_DEMAND = NO | 45 | START_ON_DEMAND = NO |
44 | RUN_PER_USER = YES | 46 | RUN_PER_USER = YES |
47 | BIND_TO=127.0.0.1 | ||
48 | BIND_TO6=::1 | ||
45 | 49 | ||
46 | # -d: DNS resolver to use, -s: suffix to use, -f: fcfs suffix to use | 50 | # -d: DNS resolver to use, -s: suffix to use, -f: fcfs suffix to use |
47 | OPTIONS = -d 8.8.8.8 | 51 | OPTIONS = -d 8.8.8.8 |
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index 68d090579..d2eabf02c 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -92,6 +92,17 @@ struct Request | |||
92 | uint16_t original_request_id; | 92 | uint16_t original_request_id; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | /** | ||
96 | * The address to bind to | ||
97 | */ | ||
98 | static in_addr_t address; | ||
99 | |||
100 | /** | ||
101 | * The IPv6 address to bind to | ||
102 | */ | ||
103 | static struct in6_addr address6; | ||
104 | |||
105 | |||
95 | 106 | ||
96 | /** | 107 | /** |
97 | * Handle to GNS resolver. | 108 | * Handle to GNS resolver. |
@@ -578,6 +589,7 @@ run (void *cls, | |||
578 | const char *cfgfile, | 589 | const char *cfgfile, |
579 | const struct GNUNET_CONFIGURATION_Handle *c) | 590 | const struct GNUNET_CONFIGURATION_Handle *c) |
580 | { | 591 | { |
592 | char *addr_str; | ||
581 | (void) cls; | 593 | (void) cls; |
582 | (void) args; | 594 | (void) args; |
583 | (void) cfgfile; | 595 | (void) cfgfile; |
@@ -602,6 +614,52 @@ run (void *cls, | |||
602 | gns = NULL; | 614 | gns = NULL; |
603 | return; | 615 | return; |
604 | } | 616 | } |
617 | |||
618 | /* Get address to bind to */ | ||
619 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (c, "dns2gns", | ||
620 | "BIND_TO", | ||
621 | &addr_str)) | ||
622 | { | ||
623 | //No address specified | ||
624 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
625 | "Don't know what to bind to...\n"); | ||
626 | GNUNET_free (addr_str); | ||
627 | GNUNET_SCHEDULER_shutdown (); | ||
628 | return; | ||
629 | } | ||
630 | if (1 != inet_pton (AF_INET, addr_str, &address)) | ||
631 | { | ||
632 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
633 | "Unable to parse address %s\n", | ||
634 | addr_str); | ||
635 | GNUNET_free (addr_str); | ||
636 | GNUNET_SCHEDULER_shutdown (); | ||
637 | return; | ||
638 | } | ||
639 | GNUNET_free (addr_str); | ||
640 | /* Get address to bind to */ | ||
641 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (c, "dns2gns", | ||
642 | "BIND_TO6", | ||
643 | &addr_str)) | ||
644 | { | ||
645 | //No address specified | ||
646 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
647 | "Don't know what to bind6 to...\n"); | ||
648 | GNUNET_free (addr_str); | ||
649 | GNUNET_SCHEDULER_shutdown (); | ||
650 | return; | ||
651 | } | ||
652 | if (1 != inet_pton (AF_INET6, addr_str, &address6)) | ||
653 | { | ||
654 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
655 | "Unable to parse IPv6 address %s\n", | ||
656 | addr_str); | ||
657 | GNUNET_free (addr_str); | ||
658 | GNUNET_SCHEDULER_shutdown (); | ||
659 | return; | ||
660 | } | ||
661 | GNUNET_free (addr_str); | ||
662 | |||
605 | listen_socket4 = GNUNET_NETWORK_socket_create (PF_INET, | 663 | listen_socket4 = GNUNET_NETWORK_socket_create (PF_INET, |
606 | SOCK_DGRAM, | 664 | SOCK_DGRAM, |
607 | IPPROTO_UDP); | 665 | IPPROTO_UDP); |
@@ -611,6 +669,7 @@ run (void *cls, | |||
611 | 669 | ||
612 | memset (&v4, 0, sizeof (v4)); | 670 | memset (&v4, 0, sizeof (v4)); |
613 | v4.sin_family = AF_INET; | 671 | v4.sin_family = AF_INET; |
672 | v4.sin_addr.s_addr = address; | ||
614 | #if HAVE_SOCKADDR_IN_SIN_LEN | 673 | #if HAVE_SOCKADDR_IN_SIN_LEN |
615 | v4.sin_len = sizeof (v4); | 674 | v4.sin_len = sizeof (v4); |
616 | #endif | 675 | #endif |
@@ -634,6 +693,7 @@ run (void *cls, | |||
634 | 693 | ||
635 | memset (&v6, 0, sizeof (v6)); | 694 | memset (&v6, 0, sizeof (v6)); |
636 | v6.sin6_family = AF_INET6; | 695 | v6.sin6_family = AF_INET6; |
696 | v6.sin6_addr = address6; | ||
637 | #if HAVE_SOCKADDR_IN_SIN_LEN | 697 | #if HAVE_SOCKADDR_IN_SIN_LEN |
638 | v6.sin6_len = sizeof (v6); | 698 | v6.sin6_len = sizeof (v6); |
639 | #endif | 699 | #endif |
diff --git a/src/gns/gnunet-gns-proxy-setup-ca.in b/src/gns/gnunet-gns-proxy-setup-ca.in index 0a6fab18a..184da4853 100644 --- a/src/gns/gnunet-gns-proxy-setup-ca.in +++ b/src/gns/gnunet-gns-proxy-setup-ca.in | |||
@@ -1,78 +1,252 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # This shell script will generate an X509 certificate for your gnunet-gns-proxy | ||
3 | # and install it (for both GNUnet and your browser). | ||
4 | # | 2 | # |
3 | # This shell script will generate an X509 certificate for | ||
4 | # your gnunet-gns-proxy and install it (for both GNUnet | ||
5 | # and your browser). | ||
6 | # | ||
7 | # TODO: Implement support for more browsers | ||
8 | # TODO: Debug and switch to the new version | ||
9 | # TODO - The only remaining task is fixing the getopts | ||
10 | # TODO: Error checks | ||
11 | # | ||
12 | # The current version partially reuses and recycles | ||
13 | # code from build.sh by NetBSD (although not entirely | ||
14 | # used because it needs debugging): | ||
15 | # | ||
16 | # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. | ||
17 | # All rights reserved. | ||
18 | # | ||
19 | # This code is derived from software contributed to | ||
20 | # The NetBSD Foundation by Todd Vierling and Luke Mewburn. | ||
21 | |||
22 | # Redistribution and use in source and binary forms, with or | ||
23 | # without modification, are permitted provided that the following | ||
24 | # conditions are met: | ||
25 | # 1. Redistributions of source code must retain the above | ||
26 | # copyright notice, this list of conditions and the following | ||
27 | # disclaimer. | ||
28 | # 2. Redistributions in binary form must reproduce the above | ||
29 | # copyright notice, this list of conditions and the following | ||
30 | # disclaimer in the documentation and/or other materials | ||
31 | # provided with the distribution. | ||
5 | 32 | ||
6 | OPENSSLCFG=@pkgdatadir@/openssl.cnf | 33 | # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND |
7 | if ! which openssl > /dev/null | 34 | # CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, |
8 | then | 35 | # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
9 | echo "'openssl' command not found. Please install it." | 36 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
10 | exit 1 | 37 | # DISCLAIMED. |
11 | fi | 38 | # IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR |
12 | 39 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
13 | echo "Generating CA" | 40 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
14 | options='' | 41 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
15 | while getopts "c:" opt; do | 42 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
16 | case $opt in | 43 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
17 | c) | 44 | # LIABILITY, OR TORT |
18 | options="$options -c $OPTARG" | 45 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
19 | ;; | 46 | # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
20 | \?) | 47 | # OF SUCH DAMAGE. |
21 | echo "Invalid option: -$OPTARG" >&2 | 48 | |
22 | exit 1 | 49 | progname=${0##*/} |
23 | ;; | 50 | |
24 | :) | 51 | setdefaults() |
25 | echo "Option -$OPTARG requires an argument." >&2 | 52 | { |
26 | exit 1 | 53 | verbosity=0 |
27 | ;; | 54 | runcmd= |
28 | esac | 55 | } |
29 | done | 56 | |
30 | 57 | statusmsg() | |
31 | GNSCERT=`mktemp /tmp/gnscertXXXXXX.pem` | 58 | { |
32 | GNSCAKY=`mktemp /tmp/gnscakeyXXXXXX.pem` | 59 | ${runcmd} echo " $@" |
33 | GNSCANO=`mktemp /tmp/gnscakeynoencXXXXXX.pem` | 60 | } |
34 | GNS_CA_CERT_PEM=`gnunet-config -s gns-proxy -o PROXY_CACERT -f $options` | 61 | |
35 | mkdir -p `dirname $GNS_CA_CERT_PEM` | 62 | infomsg() |
36 | 63 | { | |
37 | openssl req -config $OPENSSLCFG -new -x509 -days 3650 -extensions v3_ca -keyout $GNSCAKY -out $GNSCERT -subj "/C=ZZ/L=World/O=GNU/OU=GNUnet/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNU Name System" | 64 | if [ $verbosity = 1 ]; then |
38 | 65 | statusmsg "INFO: $@" | |
39 | echo "Removing passphrase from key" | ||
40 | openssl rsa -passin pass:"GNU Name System" -in $GNSCAKY -out $GNSCANO | ||
41 | |||
42 | echo "Making private key available to gnunet-gns-proxy" | ||
43 | cat $GNSCERT $GNSCANO > $GNS_CA_CERT_PEM | ||
44 | |||
45 | if ! which certutil > /dev/null | ||
46 | then | ||
47 | echo "The 'certutil' command was not found. Not importing into browsers." | ||
48 | echo "For 'certutil' install nss." | ||
49 | else | ||
50 | echo "Importing CA into browsers" | ||
51 | for f in ~/.mozilla/firefox/*.*/ | ||
52 | do | ||
53 | if [ -d $f ]; then | ||
54 | echo "Importing CA info Firefox at $f" | ||
55 | # delete old certificate (if any) | ||
56 | certutil -D -n "GNS Proxy CA" -d "$f" >/dev/null 2>/dev/null | ||
57 | # add new certificate | ||
58 | certutil -A -n "GNS Proxy CA" -t CT,, -d "$f" < $GNSCERT | ||
59 | fi | 66 | fi |
60 | done | 67 | } |
61 | 68 | ||
62 | if [ -d ~/.pki/nssdb/ ]; then | 69 | warningmsg() |
63 | echo "Importing CA into Chrome at ~/.pki/nssdb/" | 70 | { |
64 | # delete old certificate (if any) | 71 | statusmsg "WARNING: $@" |
65 | certutil -D -n "GNS Proxy CA" -d ~/.pki/nssdb/ >/dev/null 2>/dev/null | 72 | } |
66 | # add new certificate | 73 | |
67 | certutil -A -n "GNS Proxy CA" -t CT,, -d ~/.pki/nssdb/ < $GNSCERT | 74 | errormsg() |
68 | fi | 75 | { |
69 | fi | 76 | statusmsg "ERROR: $@" |
70 | 77 | } | |
71 | echo "Cleaning up." | 78 | |
72 | rm -f $GNSCAKY $GNSCANO $GNSCERT | 79 | linemsg() |
73 | 80 | { | |
74 | echo "===================================" | 81 | statusmsg "=========================================" |
75 | echo "You can now start gnunet-gns-proxy." | 82 | } |
76 | echo "Afterwards, configure your browser " | 83 | |
77 | echo " to use a SOCKS proxy on port 7777." | 84 | |
78 | echo "===================================" | 85 | usage() |
86 | { | ||
87 | if [ -n "$*" ]; then | ||
88 | echo "" | ||
89 | echo "${progname}: $*" | ||
90 | fi | ||
91 | cat <<_usage_ | ||
92 | |||
93 | Usage: ${progname} [-hv] [-c FILE] [...] | ||
94 | |||
95 | Options: | ||
96 | -c FILE Use the configuration file FILE. | ||
97 | -h Print this help message. | ||
98 | -v Print the version and exit. | ||
99 | -V be verbose | ||
100 | |||
101 | _usage_ | ||
102 | exit 1 | ||
103 | } | ||
104 | |||
105 | |||
106 | generate_ca() | ||
107 | { | ||
108 | echo "" | ||
109 | infomsg "Generating CA" | ||
110 | TMPDIR=${TMPDIR:-/tmp} | ||
111 | if [ -e "$TMPDIR" ]; then | ||
112 | GNSCERT=`mktemp -t certXXXXXXXX.pem` || exit 1 | ||
113 | GNSCAKY=`mktemp -t cakyXXXXXXXX.pem` || exit 1 | ||
114 | GNSCANO=`mktemp -t canoXXXXXXXX.pem` || exit 1 | ||
115 | else | ||
116 | # This warning is mostly pointless. | ||
117 | warning "You need to export the TMPDIR variable" | ||
118 | fi | ||
119 | |||
120 | # # ------------- gnutls | ||
121 | # | ||
122 | # if ! which certutil > /dev/null | ||
123 | # then | ||
124 | # warningmsg "The 'certutil' command was not found." | ||
125 | # warningmsg "Not importing into browsers." | ||
126 | # warningmsg "For 'certutil' install nss." | ||
127 | # else | ||
128 | # # Generate CA key | ||
129 | # # pkcs#8 password-protects key | ||
130 | # certtool --pkcs8 --generate-privkey --sec-param high --outfile ca-key.pem | ||
131 | # # self-sign the CA to create public certificate | ||
132 | # certtool --generate-self-signed --load-privkey ca-key.pem --template ca.cfg --outfile ca.pem | ||
133 | |||
134 | # ------------- openssl | ||
135 | |||
136 | OPENSSLCFG=@pkgdatadir@/openssl.cnf | ||
137 | if test -z "`openssl version`" > /dev/null | ||
138 | then | ||
139 | warningmsg "'openssl' command not found. Please install it." | ||
140 | infomsg "Cleaning up." | ||
141 | rm -f $GNSCAKY $GNSCANO $GNSCERT | ||
142 | exit 1 | ||
143 | fi | ||
144 | if [ -n "${GNUNET_CONFIG_FILE}" ]; then | ||
145 | GNUNET_CONFIG="-c ${GNUNET_CONFIG_FILE}" | ||
146 | else | ||
147 | GNUNET_CONFIG="" | ||
148 | fi | ||
149 | GNS_CA_CERT_PEM=`gnunet-config ${GNUNET_CONFIG} -s gns-proxy -o PROXY_CACERT -f ${options}` | ||
150 | mkdir -p `dirname $GNS_CA_CERT_PEM` | ||
151 | |||
152 | openssl req -config $OPENSSLCFG -new -x509 -days 3650 -extensions v3_ca -keyout $GNSCAKY -out $GNSCERT -subj "/C=ZZ/L=World/O=GNU/OU=GNUnet/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNU Name System" | ||
153 | |||
154 | infomsg "Removing passphrase from key" | ||
155 | openssl rsa -passin pass:"GNU Name System" -in $GNSCAKY -out $GNSCANO | ||
156 | |||
157 | infomsg "Making private key available to gnunet-gns-proxy" | ||
158 | cat $GNSCERT $GNSCANO > $GNS_CA_CERT_PEM | ||
159 | } | ||
160 | |||
161 | importbrowsers() | ||
162 | { | ||
163 | # Don't check with -H, -H defies any method to not | ||
164 | # print the output on screen! Let's hope that every | ||
165 | # certutil gets build with some kind of build flags | ||
166 | # which end up being printed here: | ||
167 | if test -z "`certutil --build-flags`" > /dev/null 2>&1 | ||
168 | then | ||
169 | warningmsg "The 'certutil' command was not found." | ||
170 | warningmsg "Not importing into browsers." | ||
171 | warningmsg "For 'certutil' install nss." | ||
172 | else | ||
173 | infomsg "Importing CA into browsers" | ||
174 | # TODO: Error handling? | ||
175 | for f in ~/.mozilla/firefox/*.*/ | ||
176 | do | ||
177 | if [ -d $f ]; then | ||
178 | infomsg "Importing CA into Firefox at $f" | ||
179 | # delete old certificate (if any) | ||
180 | certutil -D -n "GNS Proxy CA" -d "$f" >/dev/null 2>/dev/null | ||
181 | # add new certificate | ||
182 | certutil -A -n "GNS Proxy CA" -t CT,, -d "$f" < $GNSCERT | ||
183 | fi | ||
184 | done | ||
185 | # TODO: Error handling? | ||
186 | if [ -d ~/.pki/nssdb/ ]; then | ||
187 | infomsg "Importing CA into Chrome at ~/.pki/nssdb/" | ||
188 | # delete old certificate (if any) | ||
189 | certutil -D -n "GNS Proxy CA" -d ~/.pki/nssdb/ >/dev/null 2>/dev/null | ||
190 | # add new certificate | ||
191 | certutil -A -n "GNS Proxy CA" -t CT,, -d ~/.pki/nssdb/ < $GNSCERT | ||
192 | fi | ||
193 | fi | ||
194 | } | ||
195 | |||
196 | print_version() | ||
197 | { | ||
198 | GNUNET_ARM_VERSION=`gnunet-arm -v` | ||
199 | echo $GNUNET_ARM_VERSION | ||
200 | } | ||
201 | |||
202 | clean_up() | ||
203 | { | ||
204 | infomsg "Cleaning up." | ||
205 | rm -f $GNSCAKY $GNSCANO $GNSCERT | ||
206 | if [ -e $SETUP_TMPDIR ]; then | ||
207 | rm -rf $SETUP_TMPDIR | ||
208 | fi | ||
209 | |||
210 | linemsg | ||
211 | statusmsg "You can now start gnunet-gns-proxy." | ||
212 | statusmsg "Afterwards, configure your browser " | ||
213 | statusmsg "to use a SOCKS proxy on port 7777. " | ||
214 | linemsg | ||
215 | } | ||
216 | |||
217 | main() | ||
218 | { | ||
219 | while getopts "vhVc:" opt; do | ||
220 | case $opt in | ||
221 | v) | ||
222 | print_version | ||
223 | exit 0 | ||
224 | ;; | ||
225 | h) | ||
226 | usage | ||
227 | ;; | ||
228 | V) | ||
229 | verbosity=1 | ||
230 | ;; | ||
231 | c) | ||
232 | options="$options -c $OPTARG" | ||
233 | infomsg "Using configuration file $OPTARG" | ||
234 | GNUNET_CONFIG_FILE=${OPTARG} | ||
235 | ;; | ||
236 | \?) | ||
237 | echo "Invalid option: -$OPTARG" >&2 | ||
238 | usage | ||
239 | ;; | ||
240 | :) | ||
241 | echo "Option -$OPTARG requires an argument." >&2 | ||
242 | usage | ||
243 | ;; | ||
244 | esac | ||
245 | done | ||
246 | setdefaults | ||
247 | generate_ca | ||
248 | importbrowsers | ||
249 | clean_up | ||
250 | } | ||
251 | |||
252 | main "$@" | ||
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 65a7b6018..bae222499 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -661,6 +661,15 @@ struct Socks5Request | |||
661 | 661 | ||
662 | /* *********************** Globals **************************** */ | 662 | /* *********************** Globals **************************** */ |
663 | 663 | ||
664 | /** | ||
665 | * The address to bind to | ||
666 | */ | ||
667 | static in_addr_t address; | ||
668 | |||
669 | /** | ||
670 | * The IPv6 address to bind to | ||
671 | */ | ||
672 | static struct in6_addr address6; | ||
664 | 673 | ||
665 | /** | 674 | /** |
666 | * The port the proxy is running on (default 7777) | 675 | * The port the proxy is running on (default 7777) |
@@ -2182,7 +2191,7 @@ create_response (void *cls, | |||
2182 | } | 2191 | } |
2183 | MHD_get_connection_values (con, | 2192 | MHD_get_connection_values (con, |
2184 | MHD_HEADER_KIND, | 2193 | MHD_HEADER_KIND, |
2185 | &con_val_iter, | 2194 | (MHD_KeyValueIterator) &con_val_iter, |
2186 | s5r); | 2195 | s5r); |
2187 | curl_easy_setopt (s5r->curl, | 2196 | curl_easy_setopt (s5r->curl, |
2188 | CURLOPT_HTTPHEADER, | 2197 | CURLOPT_HTTPHEADER, |
@@ -3516,6 +3525,7 @@ bind_v4 () | |||
3516 | memset (&sa4, 0, sizeof (sa4)); | 3525 | memset (&sa4, 0, sizeof (sa4)); |
3517 | sa4.sin_family = AF_INET; | 3526 | sa4.sin_family = AF_INET; |
3518 | sa4.sin_port = htons (port); | 3527 | sa4.sin_port = htons (port); |
3528 | sa4.sin_addr.s_addr = address; | ||
3519 | #if HAVE_SOCKADDR_IN_SIN_LEN | 3529 | #if HAVE_SOCKADDR_IN_SIN_LEN |
3520 | sa4.sin_len = sizeof (sa4); | 3530 | sa4.sin_len = sizeof (sa4); |
3521 | #endif | 3531 | #endif |
@@ -3553,6 +3563,7 @@ bind_v6 () | |||
3553 | memset (&sa6, 0, sizeof (sa6)); | 3563 | memset (&sa6, 0, sizeof (sa6)); |
3554 | sa6.sin6_family = AF_INET6; | 3564 | sa6.sin6_family = AF_INET6; |
3555 | sa6.sin6_port = htons (port); | 3565 | sa6.sin6_port = htons (port); |
3566 | sa6.sin6_addr = address6; | ||
3556 | #if HAVE_SOCKADDR_IN_SIN_LEN | 3567 | #if HAVE_SOCKADDR_IN_SIN_LEN |
3557 | sa6.sin6_len = sizeof (sa6); | 3568 | sa6.sin6_len = sizeof (sa6); |
3558 | #endif | 3569 | #endif |
@@ -3591,10 +3602,56 @@ run (void *cls, | |||
3591 | { | 3602 | { |
3592 | char* cafile_cfg = NULL; | 3603 | char* cafile_cfg = NULL; |
3593 | char* cafile; | 3604 | char* cafile; |
3605 | char* addr_str; | ||
3594 | struct MhdHttpList *hd; | 3606 | struct MhdHttpList *hd; |
3595 | 3607 | ||
3596 | cfg = c; | 3608 | cfg = c; |
3597 | 3609 | ||
3610 | /* Get address to bind to */ | ||
3611 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "gns-proxy", | ||
3612 | "BIND_TO", | ||
3613 | &addr_str)) | ||
3614 | { | ||
3615 | //No address specified | ||
3616 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
3617 | "Don't know what to bind to...\n"); | ||
3618 | GNUNET_free (addr_str); | ||
3619 | GNUNET_SCHEDULER_shutdown (); | ||
3620 | return; | ||
3621 | } | ||
3622 | if (1 != inet_pton (AF_INET, addr_str, &address)) | ||
3623 | { | ||
3624 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
3625 | "Unable to parse address %s\n", | ||
3626 | addr_str); | ||
3627 | GNUNET_free (addr_str); | ||
3628 | GNUNET_SCHEDULER_shutdown (); | ||
3629 | return; | ||
3630 | } | ||
3631 | GNUNET_free (addr_str); | ||
3632 | /* Get address to bind to */ | ||
3633 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "gns-proxy", | ||
3634 | "BIND_TO6", | ||
3635 | &addr_str)) | ||
3636 | { | ||
3637 | //No address specified | ||
3638 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
3639 | "Don't know what to bind6 to...\n"); | ||
3640 | GNUNET_free (addr_str); | ||
3641 | GNUNET_SCHEDULER_shutdown (); | ||
3642 | return; | ||
3643 | } | ||
3644 | if (1 != inet_pton (AF_INET6, addr_str, &address6)) | ||
3645 | { | ||
3646 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
3647 | "Unable to parse IPv6 address %s\n", | ||
3648 | addr_str); | ||
3649 | GNUNET_free (addr_str); | ||
3650 | GNUNET_SCHEDULER_shutdown (); | ||
3651 | return; | ||
3652 | } | ||
3653 | GNUNET_free (addr_str); | ||
3654 | |||
3598 | if (NULL == (curl_multi = curl_multi_init ())) | 3655 | if (NULL == (curl_multi = curl_multi_init ())) |
3599 | { | 3656 | { |
3600 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 3657 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
diff --git a/src/rest-plugins/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c index e41df4085..e41df4085 100644 --- a/src/rest-plugins/plugin_rest_gns.c +++ b/src/gns/plugin_rest_gns.c | |||
diff --git a/src/gns/test_gns_at_lookup.sh b/src/gns/test_gns_at_lookup.sh index d900c070b..bacc63eb0 100755 --- a/src/gns/test_gns_at_lookup.sh +++ b/src/gns/test_gns_at_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -14,7 +14,7 @@ then | |||
14 | exit 77 | 14 | exit 77 |
15 | fi | 15 | fi |
16 | 16 | ||
17 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 17 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
18 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 18 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
19 | 19 | ||
20 | TEST_IP="127.0.0.1" | 20 | TEST_IP="127.0.0.1" |
@@ -31,7 +31,7 @@ gnunet-namestore -z delegatedego -d -n '@' -t A -V $TEST_IP -e never -c test_gn | |||
31 | gnunet-arm -e -c test_gns_lookup.conf | 31 | gnunet-arm -e -c test_gns_lookup.conf |
32 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 32 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
33 | 33 | ||
34 | if [ "$RES_IP" == "$TEST_IP" ] | 34 | if [ "$RES_IP" = "$TEST_IP" ] |
35 | then | 35 | then |
36 | exit 0 | 36 | exit 0 |
37 | else | 37 | else |
diff --git a/src/gns/test_gns_cname_lookup.sh b/src/gns/test_gns_cname_lookup.sh index de575c561..d97a4fe5e 100755 --- a/src/gns/test_gns_cname_lookup.sh +++ b/src/gns/test_gns_cname_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -16,7 +16,7 @@ fi | |||
16 | 16 | ||
17 | # permissive DNS resolver we will use for the test | 17 | # permissive DNS resolver we will use for the test |
18 | DNS_RESOLVER="8.8.8.8" | 18 | DNS_RESOLVER="8.8.8.8" |
19 | if ! nslookup gnunet.org $DNS_RESOLVER &> /dev/null | 19 | if ! nslookup gnunet.org $DNS_RESOLVER > /dev/null 2>&1 |
20 | then | 20 | then |
21 | echo "Cannot reach DNS, skipping test" | 21 | echo "Cannot reach DNS, skipping test" |
22 | exit 77 | 22 | exit 77 |
@@ -36,7 +36,7 @@ TEST_RECORD_NAME_DNS="www3" | |||
36 | MY_EGO="myego" | 36 | MY_EGO="myego" |
37 | TEST_DOMAIN_PLUS="www.$MY_EGO" | 37 | TEST_DOMAIN_PLUS="www.$MY_EGO" |
38 | TEST_DOMAIN_DNS="www3.$MY_EGO" | 38 | TEST_DOMAIN_DNS="www3.$MY_EGO" |
39 | which timeout &> /dev/null && DO_TIMEOUT="timeout 15" | 39 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15" |
40 | 40 | ||
41 | gnunet-arm -s -c test_gns_lookup.conf | 41 | gnunet-arm -s -c test_gns_lookup.conf |
42 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf | 42 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf |
@@ -57,7 +57,7 @@ rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | |||
57 | # make cmp case-insensitive by converting to lower case first | 57 | # make cmp case-insensitive by converting to lower case first |
58 | RES_CNAME_RAW=`echo $RES_CNAME_RAW | tr [A-Z] [a-z]` | 58 | RES_CNAME_RAW=`echo $RES_CNAME_RAW | tr [A-Z] [a-z]` |
59 | TESTEGOZONE=`echo $TESTEGOZONE | tr [A-Z] [a-z]` | 59 | TESTEGOZONE=`echo $TESTEGOZONE | tr [A-Z] [a-z]` |
60 | if [ "$RES_CNAME_RAW" == "server.$TESTEGOZONE" ] | 60 | if [ "$RES_CNAME_RAW" = "server.$TESTEGOZONE" ] |
61 | then | 61 | then |
62 | echo "PASS: CNAME resolution from GNS" | 62 | echo "PASS: CNAME resolution from GNS" |
63 | else | 63 | else |
@@ -65,7 +65,7 @@ else | |||
65 | exit 1 | 65 | exit 1 |
66 | fi | 66 | fi |
67 | 67 | ||
68 | if [ "$RES_CNAME" == "$TEST_IP_PLUS" ] | 68 | if [ "$RES_CNAME" = "$TEST_IP_PLUS" ] |
69 | then | 69 | then |
70 | echo "PASS: IP resolution from GNS" | 70 | echo "PASS: IP resolution from GNS" |
71 | else | 71 | else |
@@ -73,7 +73,7 @@ else | |||
73 | exit 1 | 73 | exit 1 |
74 | fi | 74 | fi |
75 | 75 | ||
76 | if [ "$RES_CNAME_DNS" == "$TEST_IP_DNS" ] | 76 | if [ "$RES_CNAME_DNS" = "$TEST_IP_DNS" ] |
77 | then | 77 | then |
78 | echo "PASS: IP resolution from DNS" | 78 | echo "PASS: IP resolution from DNS" |
79 | exit 0 | 79 | exit 0 |
diff --git a/src/gns/test_gns_config_lookup.sh b/src/gns/test_gns_config_lookup.sh index 35d7c32d9..1c5a62b01 100755 --- a/src/gns/test_gns_config_lookup.sh +++ b/src/gns/test_gns_config_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -18,7 +18,7 @@ MY_EGO="myego" | |||
18 | rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` | 18 | rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` |
19 | CFG=`mktemp --tmpdir=$PWD` | 19 | CFG=`mktemp --tmpdir=$PWD` |
20 | cp test_gns_lookup.conf $CFG || exit 77 | 20 | cp test_gns_lookup.conf $CFG || exit 77 |
21 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 21 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
22 | TEST_IP="dead::beef" | 22 | TEST_IP="dead::beef" |
23 | gnunet-arm -s -c $CFG || exit 77 | 23 | gnunet-arm -s -c $CFG || exit 77 |
24 | gnunet-identity -C $MY_EGO -c $CFG | 24 | gnunet-identity -C $MY_EGO -c $CFG |
@@ -35,7 +35,7 @@ gnunet-arm -e -c $CFG | |||
35 | rm -rf `gnunet-config -c $CFG -f -s paths -o GNUNET_TEST_HOME` | 35 | rm -rf `gnunet-config -c $CFG -f -s paths -o GNUNET_TEST_HOME` |
36 | rm $CFG | 36 | rm $CFG |
37 | 37 | ||
38 | if [ "$RES_IP" == "$TEST_IP" ] | 38 | if [ "$RES_IP" = "$TEST_IP" ] |
39 | then | 39 | then |
40 | exit 0 | 40 | exit 0 |
41 | else | 41 | else |
diff --git a/src/gns/test_gns_delegated_lookup.sh b/src/gns/test_gns_delegated_lookup.sh index 21774ad8d..af9994b34 100755 --- a/src/gns/test_gns_delegated_lookup.sh +++ b/src/gns/test_gns_delegated_lookup.sh | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 4 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
5 | 5 | ||
6 | LOCATION=$(which gnunet-config) | 6 | LOCATION=$(which gnunet-config) |
7 | if [ -z $LOCATION ] | 7 | if [ -z $LOCATION ] |
@@ -35,7 +35,7 @@ gnunet-arm -e -c test_gns_lookup.conf | |||
35 | 35 | ||
36 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 36 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
37 | 37 | ||
38 | if [ "$RES_IP" == "$TEST_IP" ] | 38 | if [ "$RES_IP" = "$TEST_IP" ] |
39 | then | 39 | then |
40 | exit 0 | 40 | exit 0 |
41 | else | 41 | else |
diff --git a/src/gns/test_gns_dht_lookup.sh b/src/gns/test_gns_dht_lookup.sh index 07e559752..ac90d58a8 100755 --- a/src/gns/test_gns_dht_lookup.sh +++ b/src/gns/test_gns_dht_lookup.sh | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 4 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
5 | 5 | ||
6 | LOCATION=$(which gnunet-config) | 6 | LOCATION=$(which gnunet-config) |
7 | if [ -z $LOCATION ] | 7 | if [ -z $LOCATION ] |
@@ -55,7 +55,7 @@ then | |||
55 | echo "Failed to resolve to proper IP, got $RES_IP_REL. (relative expiration)" | 55 | echo "Failed to resolve to proper IP, got $RES_IP_REL. (relative expiration)" |
56 | #exit 1 | 56 | #exit 1 |
57 | fi | 57 | fi |
58 | if [ "$RES_IP" == "$TEST_IP" ] | 58 | if [ "$RES_IP" = "$TEST_IP" ] |
59 | then | 59 | then |
60 | exit 0 | 60 | exit 0 |
61 | else | 61 | else |
diff --git a/src/gns/test_gns_gns2dns_cname_lookup.sh b/src/gns/test_gns_gns2dns_cname_lookup.sh index c07905d83..fbc1dd7ee 100755 --- a/src/gns/test_gns_gns2dns_cname_lookup.sh +++ b/src/gns/test_gns_gns2dns_cname_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -25,7 +25,7 @@ TEST_RECORD_NAME="homepage" | |||
25 | 25 | ||
26 | XNS=ns.joker.com | 26 | XNS=ns.joker.com |
27 | 27 | ||
28 | if ! nslookup gnunet.org a.$XNS &> /dev/null | 28 | if ! nslookup gnunet.org a.$XNS > /dev/null 2>&1 |
29 | then | 29 | then |
30 | echo "Cannot reach DNS, skipping test" | 30 | echo "Cannot reach DNS, skipping test" |
31 | exit 77 | 31 | exit 77 |
@@ -43,7 +43,7 @@ MY_EGO="myego" | |||
43 | # various names we will use for resolution | 43 | # various names we will use for resolution |
44 | TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO" | 44 | TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO" |
45 | 45 | ||
46 | which timeout &> /dev/null && DO_TIMEOUT="timeout 15" | 46 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15" |
47 | 47 | ||
48 | gnunet-arm -s -c test_gns_lookup.conf | 48 | gnunet-arm -s -c test_gns_lookup.conf |
49 | OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org` | 49 | OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org` |
@@ -77,7 +77,7 @@ gnunet-arm -e -c test_gns_lookup.conf | |||
77 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 77 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
78 | 78 | ||
79 | ret=0 | 79 | ret=0 |
80 | if [ "$RES_IP" == "$TEST_IP" ] | 80 | if [ "$RES_IP" = "$TEST_IP" ] |
81 | then | 81 | then |
82 | echo "PASS: Resolved $TEST_DOMAIN to $RES_IP." | 82 | echo "PASS: Resolved $TEST_DOMAIN to $RES_IP." |
83 | else | 83 | else |
@@ -85,7 +85,7 @@ else | |||
85 | ret=1 | 85 | ret=1 |
86 | fi | 86 | fi |
87 | 87 | ||
88 | if [ "$RES_IP6" == "$TEST_IP6" ] | 88 | if [ "$RES_IP6" = "$TEST_IP6" ] |
89 | then | 89 | then |
90 | echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6." | 90 | echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6." |
91 | else | 91 | else |
diff --git a/src/gns/test_gns_gns2dns_lookup.sh b/src/gns/test_gns_gns2dns_lookup.sh index 24fb36b9d..22caa68ff 100755 --- a/src/gns/test_gns_gns2dns_lookup.sh +++ b/src/gns/test_gns_gns2dns_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -26,7 +26,7 @@ TEST_IP_GNS2DNS="8.8.8.8" | |||
26 | # main label used during resolution | 26 | # main label used during resolution |
27 | TEST_RECORD_NAME="homepage" | 27 | TEST_RECORD_NAME="homepage" |
28 | 28 | ||
29 | if ! nslookup gnunet.org $TEST_IP_GNS2DNS &> /dev/null | 29 | if ! nslookup gnunet.org $TEST_IP_GNS2DNS > /dev/null 2>&1 |
30 | then | 30 | then |
31 | echo "Cannot reach DNS, skipping test" | 31 | echo "Cannot reach DNS, skipping test" |
32 | exit 77 | 32 | exit 77 |
@@ -44,7 +44,7 @@ TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO" | |||
44 | TEST_DOMAIN_ALT="${TEST_RECORD_NAME}.$MY_EGO" | 44 | TEST_DOMAIN_ALT="${TEST_RECORD_NAME}.$MY_EGO" |
45 | TEST_DOMAIN_ALT2="docs.${TEST_RECORD_NAME}.$MY_EGO" | 45 | TEST_DOMAIN_ALT2="docs.${TEST_RECORD_NAME}.$MY_EGO" |
46 | 46 | ||
47 | which timeout &> /dev/null && DO_TIMEOUT="timeout 15" | 47 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15" |
48 | 48 | ||
49 | 49 | ||
50 | gnunet-arm -s -c test_gns_lookup.conf | 50 | gnunet-arm -s -c test_gns_lookup.conf |
@@ -83,7 +83,7 @@ gnunet-arm -e -c test_gns_lookup.conf | |||
83 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 83 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
84 | 84 | ||
85 | ret=0 | 85 | ret=0 |
86 | if [ "$RES_IP" == "$TEST_IP" ] | 86 | if [ "$RES_IP" = "$TEST_IP" ] |
87 | then | 87 | then |
88 | echo "PASS: Resolved $TEST_DOMAIN to $RES_IP." | 88 | echo "PASS: Resolved $TEST_DOMAIN to $RES_IP." |
89 | else | 89 | else |
@@ -91,7 +91,7 @@ else | |||
91 | ret=1 | 91 | ret=1 |
92 | fi | 92 | fi |
93 | 93 | ||
94 | if [ "$RES_IP6" == "$TEST_IP6" ] | 94 | if [ "$RES_IP6" = "$TEST_IP6" ] |
95 | then | 95 | then |
96 | echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6." | 96 | echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6." |
97 | else | 97 | else |
@@ -99,7 +99,7 @@ else | |||
99 | ret=1 | 99 | ret=1 |
100 | fi | 100 | fi |
101 | 101 | ||
102 | if [ "$RES_IP_ALT" == "$TEST_IP" ] | 102 | if [ "$RES_IP_ALT" = "$TEST_IP" ] |
103 | then | 103 | then |
104 | echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT." | 104 | echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT." |
105 | else | 105 | else |
@@ -107,7 +107,7 @@ else | |||
107 | ret=1 | 107 | ret=1 |
108 | fi | 108 | fi |
109 | 109 | ||
110 | if [ "$RES_IP_ALT2" == "$TEST_IP_ALT2" ] | 110 | if [ "$RES_IP_ALT2" = "$TEST_IP_ALT2" ] |
111 | then | 111 | then |
112 | echo "PASS: Resolved $TEST_DOMAIN_ALT2 to $RES_IP_ALT2." | 112 | echo "PASS: Resolved $TEST_DOMAIN_ALT2 to $RES_IP_ALT2." |
113 | else | 113 | else |
diff --git a/src/gns/test_gns_ipv6_lookup.sh b/src/gns/test_gns_ipv6_lookup.sh index 72da5ee2c..5dbb34a2c 100755 --- a/src/gns/test_gns_ipv6_lookup.sh +++ b/src/gns/test_gns_ipv6_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -16,7 +16,7 @@ fi | |||
16 | MY_EGO="myego" | 16 | MY_EGO="myego" |
17 | 17 | ||
18 | rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` | 18 | rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` |
19 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 19 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
20 | TEST_IP="dead::beef" | 20 | TEST_IP="dead::beef" |
21 | gnunet-arm -s -c test_gns_lookup.conf | 21 | gnunet-arm -s -c test_gns_lookup.conf |
22 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf | 22 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf |
@@ -27,7 +27,7 @@ gnunet-identity -D $MY_EGO -c test_gns_lookup.conf | |||
27 | gnunet-arm -e -c test_gns_lookup.conf | 27 | gnunet-arm -e -c test_gns_lookup.conf |
28 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 28 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
29 | 29 | ||
30 | if [ "$RES_IP" == "$TEST_IP" ] | 30 | if [ "$RES_IP" = "$TEST_IP" ] |
31 | then | 31 | then |
32 | exit 0 | 32 | exit 0 |
33 | else | 33 | else |
diff --git a/src/gns/test_gns_lookup.sh b/src/gns/test_gns_lookup.sh index 2dffa1251..4bd6ae879 100755 --- a/src/gns/test_gns_lookup.sh +++ b/src/gns/test_gns_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -15,7 +15,7 @@ then | |||
15 | fi | 15 | fi |
16 | 16 | ||
17 | rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` | 17 | rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` |
18 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 18 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
19 | TEST_IP="127.0.0.1" | 19 | TEST_IP="127.0.0.1" |
20 | MY_EGO="myego" | 20 | MY_EGO="myego" |
21 | LABEL="www" | 21 | LABEL="www" |
@@ -27,7 +27,7 @@ gnunet-namestore -z $MY_EGO -d -n $LABEL -t A -V $TEST_IP -e never -c test_gns_l | |||
27 | gnunet-identity -D $MY_EGO -c test_gns_lookup.conf | 27 | gnunet-identity -D $MY_EGO -c test_gns_lookup.conf |
28 | gnunet-arm -e -c test_gns_lookup.conf | 28 | gnunet-arm -e -c test_gns_lookup.conf |
29 | 29 | ||
30 | if [ "$RES_IP" == "$TEST_IP" ] | 30 | if [ "$RES_IP" = "$TEST_IP" ] |
31 | then | 31 | then |
32 | exit 0 | 32 | exit 0 |
33 | else | 33 | else |
diff --git a/src/gns/test_gns_mx_lookup.sh b/src/gns/test_gns_mx_lookup.sh index 79ac37b0a..4e9d98358 100755 --- a/src/gns/test_gns_mx_lookup.sh +++ b/src/gns/test_gns_mx_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -15,7 +15,7 @@ then | |||
15 | fi | 15 | fi |
16 | 16 | ||
17 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 17 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
18 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 18 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
19 | 19 | ||
20 | MY_EGO="myego" | 20 | MY_EGO="myego" |
21 | TEST_MX="5,mail.+" | 21 | TEST_MX="5,mail.+" |
@@ -35,7 +35,7 @@ rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | |||
35 | RES_MX=`echo $RES_MX | tr [A-Z] [a-z]` | 35 | RES_MX=`echo $RES_MX | tr [A-Z] [a-z]` |
36 | WANT_MX=`echo $WANT_MX | tr [A-Z] [a-z]` | 36 | WANT_MX=`echo $WANT_MX | tr [A-Z] [a-z]` |
37 | 37 | ||
38 | if [ "$RES_MX" == "$WANT_MX" ] | 38 | if [ "$RES_MX" = "$WANT_MX" ] |
39 | then | 39 | then |
40 | exit 0 | 40 | exit 0 |
41 | else | 41 | else |
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 75fe95617..2a7f8104b 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 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/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -50,9 +50,9 @@ static int global_ret; | |||
50 | 50 | ||
51 | static struct MHD_Daemon *mhd; | 51 | static struct MHD_Daemon *mhd; |
52 | 52 | ||
53 | static struct GNUNET_SCHEDULER_Task * mhd_task_id; | 53 | static struct GNUNET_SCHEDULER_Task *mhd_task_id; |
54 | 54 | ||
55 | static struct GNUNET_SCHEDULER_Task * curl_task_id; | 55 | static struct GNUNET_SCHEDULER_Task *curl_task_id; |
56 | 56 | ||
57 | static CURL *curl; | 57 | static CURL *curl; |
58 | 58 | ||
@@ -349,6 +349,7 @@ curl_main () | |||
349 | static void | 349 | static void |
350 | start_curl (void *cls) | 350 | start_curl (void *cls) |
351 | { | 351 | { |
352 | curl_task_id = NULL; | ||
352 | GNUNET_asprintf (&url, | 353 | GNUNET_asprintf (&url, |
353 | "https://%s:%d/hello_world", | 354 | "https://%s:%d/hello_world", |
354 | TEST_DOMAIN, port); | 355 | TEST_DOMAIN, port); |
@@ -369,7 +370,9 @@ start_curl (void *cls) | |||
369 | multi = curl_multi_init (); | 370 | multi = curl_multi_init (); |
370 | GNUNET_assert (multi != NULL); | 371 | GNUNET_assert (multi != NULL); |
371 | GNUNET_assert (CURLM_OK == curl_multi_add_handle (multi, curl)); | 372 | GNUNET_assert (CURLM_OK == curl_multi_add_handle (multi, curl)); |
372 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Beginning HTTP download from `%s'\n", url); | 373 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
374 | "Beginning HTTP download from `%s'\n", | ||
375 | url); | ||
373 | curl_main (); | 376 | curl_main (); |
374 | } | 377 | } |
375 | 378 | ||
@@ -391,7 +394,8 @@ commence_testing (void *cls) | |||
391 | { | 394 | { |
392 | curl_task_id = | 395 | curl_task_id = |
393 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | 396 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
394 | &start_curl, NULL); | 397 | &start_curl, |
398 | NULL); | ||
395 | } | 399 | } |
396 | 400 | ||
397 | 401 | ||
@@ -561,4 +565,4 @@ main (int argc, char *const *argv) | |||
561 | return global_ret; | 565 | return global_ret; |
562 | } | 566 | } |
563 | 567 | ||
564 | /* end of test_gns_vpn.c */ | 568 | /* end of test_gns_proxy.c */ |
diff --git a/src/gns/test_gns_quickupdate.sh b/src/gns/test_gns_quickupdate.sh index d9807fe22..d2b4bf2cb 100755 --- a/src/gns/test_gns_quickupdate.sh +++ b/src/gns/test_gns_quickupdate.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -19,7 +19,7 @@ OTHER_EGO="delegatedego" | |||
19 | 19 | ||
20 | 20 | ||
21 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 21 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
22 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 22 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
23 | TEST_IP="127.0.0.1" | 23 | TEST_IP="127.0.0.1" |
24 | gnunet-arm -s -c test_gns_lookup.conf | 24 | gnunet-arm -s -c test_gns_lookup.conf |
25 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf | 25 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf |
@@ -56,7 +56,7 @@ gnunet-identity -D $OTHER_EGO -c test_gns_lookup.conf | |||
56 | gnunet-arm -e -c test_gns_lookup.conf | 56 | gnunet-arm -e -c test_gns_lookup.conf |
57 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 57 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
58 | 58 | ||
59 | if [ "$RES_IP" == "$TEST_IP" ] | 59 | if [ "$RES_IP" = "$TEST_IP" ] |
60 | then | 60 | then |
61 | exit 0 | 61 | exit 0 |
62 | else | 62 | else |
diff --git a/src/gns/test_gns_rel_expiration.sh b/src/gns/test_gns_rel_expiration.sh index c7c66bc27..993c2131e 100755 --- a/src/gns/test_gns_rel_expiration.sh +++ b/src/gns/test_gns_rel_expiration.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -25,7 +25,7 @@ MY_EGO="myego" | |||
25 | OTHER_EGO="delegatedego" | 25 | OTHER_EGO="delegatedego" |
26 | 26 | ||
27 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 27 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
28 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 28 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
29 | TEST_IP="127.0.0.1" | 29 | TEST_IP="127.0.0.1" |
30 | gnunet-arm -s -c test_gns_lookup.conf | 30 | gnunet-arm -s -c test_gns_lookup.conf |
31 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf | 31 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf |
@@ -48,13 +48,13 @@ gnunet-identity -D $OTHER_EGO -c test_gns_lookup.conf | |||
48 | gnunet-arm -e -c test_gns_lookup.conf | 48 | gnunet-arm -e -c test_gns_lookup.conf |
49 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 49 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
50 | 50 | ||
51 | if [ "$RES_IP_EXP" == "$TEST_IP" ] | 51 | if [ "$RES_IP_EXP" = "$TEST_IP" ] |
52 | then | 52 | then |
53 | echo "Failed to properly expire IP, got $RES_IP_EXP." | 53 | echo "Failed to properly expire IP, got $RES_IP_EXP." |
54 | exit 1 | 54 | exit 1 |
55 | fi | 55 | fi |
56 | 56 | ||
57 | if [ "$RES_IP" == "$TEST_IP" ] | 57 | if [ "$RES_IP" = "$TEST_IP" ] |
58 | then | 58 | then |
59 | exit 0 | 59 | exit 0 |
60 | else | 60 | else |
diff --git a/src/gns/test_gns_revocation.sh b/src/gns/test_gns_revocation.sh index 08a0f8ac1..3c0cf02fb 100755 --- a/src/gns/test_gns_revocation.sh +++ b/src/gns/test_gns_revocation.sh | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 4 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
5 | 5 | ||
6 | LOCATION=$(which gnunet-config) | 6 | LOCATION=$(which gnunet-config) |
7 | if [ -z $LOCATION ] | 7 | if [ -z $LOCATION ] |
@@ -40,7 +40,7 @@ then | |||
40 | exit 1 | 40 | exit 1 |
41 | fi | 41 | fi |
42 | 42 | ||
43 | if [ "x$RES_IP_REV" == "x" ] | 43 | if [ "x$RES_IP_REV" = "x" ] |
44 | then | 44 | then |
45 | exit 0 | 45 | exit 0 |
46 | else | 46 | else |
diff --git a/src/gns/test_gns_soa_lookup.sh b/src/gns/test_gns_soa_lookup.sh index 6a09ac8c7..c5b049b72 100755 --- a/src/gns/test_gns_soa_lookup.sh +++ b/src/gns/test_gns_soa_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -14,7 +14,7 @@ then | |||
14 | exit 77 | 14 | exit 77 |
15 | fi | 15 | fi |
16 | 16 | ||
17 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 17 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
18 | 18 | ||
19 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 19 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
20 | MY_EGO="myego" | 20 | MY_EGO="myego" |
@@ -24,7 +24,7 @@ TEST_IP_GNS2DNS="184.172.157.218" | |||
24 | TEST_RECORD_NAME="homepage" | 24 | TEST_RECORD_NAME="homepage" |
25 | TEST_RECORD_GNS2DNS="gnunet.org" | 25 | TEST_RECORD_GNS2DNS="gnunet.org" |
26 | 26 | ||
27 | if ! nslookup $TEST_RECORD_GNS2DNS $TEST_IP_GNS2DNS &> /dev/null | 27 | if ! nslookup $TEST_RECORD_GNS2DNS $TEST_IP_GNS2DNS > /dev/null 2>&1 |
28 | then | 28 | then |
29 | echo "Cannot reach DNS, skipping test" | 29 | echo "Cannot reach DNS, skipping test" |
30 | exit 77 | 30 | exit 77 |
@@ -34,7 +34,7 @@ gnunet-arm -s -c test_gns_lookup.conf | |||
34 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf | 34 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf |
35 | gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf | 35 | gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf |
36 | RES_SOA=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t SOA -c test_gns_lookup.conf` | 36 | RES_SOA=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t SOA -c test_gns_lookup.conf` |
37 | gnunet-namestore -z $MY_EGO -d -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf &> /dev/null | 37 | gnunet-namestore -z $MY_EGO -d -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf > /dev/null 2>&1 |
38 | gnunet-identity -D $MY_EGO -c test_gns_lookup.conf | 38 | gnunet-identity -D $MY_EGO -c test_gns_lookup.conf |
39 | gnunet-arm -e -c test_gns_lookup.conf | 39 | gnunet-arm -e -c test_gns_lookup.conf |
40 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 40 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
diff --git a/src/gns/test_gns_txt_lookup.sh b/src/gns/test_gns_txt_lookup.sh index 6c6b4b3f6..b0c9144c2 100755 --- a/src/gns/test_gns_txt_lookup.sh +++ b/src/gns/test_gns_txt_lookup.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -15,7 +15,7 @@ then | |||
15 | fi | 15 | fi |
16 | 16 | ||
17 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 17 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
18 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 18 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
19 | TEST_TXT="GNS powered txt record data" | 19 | TEST_TXT="GNS powered txt record data" |
20 | MY_EGO="myego" | 20 | MY_EGO="myego" |
21 | LABEL="testtxt" | 21 | LABEL="testtxt" |
@@ -28,7 +28,7 @@ gnunet-identity -D $MY_EGO -c test_gns_lookup.conf | |||
28 | gnunet-arm -e -c test_gns_lookup.conf | 28 | gnunet-arm -e -c test_gns_lookup.conf |
29 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 29 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
30 | 30 | ||
31 | if [ "$RES_TXT" == "$TEST_TXT" ] | 31 | if [ "$RES_TXT" = "$TEST_TXT" ] |
32 | then | 32 | then |
33 | exit 0 | 33 | exit 0 |
34 | else | 34 | else |
diff --git a/src/gns/test_gns_zkey_lookup.sh b/src/gns/test_gns_zkey_lookup.sh index b36a16fa2..03118d741 100755 --- a/src/gns/test_gns_zkey_lookup.sh +++ b/src/gns/test_gns_zkey_lookup.sh | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 4 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
5 | 5 | ||
6 | LOCATION=$(which gnunet-config) | 6 | LOCATION=$(which gnunet-config) |
7 | if [ -z $LOCATION ] | 7 | if [ -z $LOCATION ] |
@@ -30,7 +30,7 @@ gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gn | |||
30 | gnunet-arm -e -c test_gns_lookup.conf | 30 | gnunet-arm -e -c test_gns_lookup.conf |
31 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 31 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
32 | 32 | ||
33 | if [ "$RES_IP" == "$TEST_IP" ] | 33 | if [ "$RES_IP" = "$TEST_IP" ] |
34 | then | 34 | then |
35 | exit 0 | 35 | exit 0 |
36 | else | 36 | else |
diff --git a/src/gns/test_gnunet_gns.sh b/src/gns/test_gnunet_gns.sh index f6b4e721a..74c49c537 100755 --- a/src/gns/test_gnunet_gns.sh +++ b/src/gns/test_gnunet_gns.sh | |||
@@ -1,15 +1,25 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | LOCATION=$(which gnunet-config) | 3 | # test -z being correct was a false assumption here. |
4 | if [ -z $LOCATION ] | 4 | # I have no executable 'fooble', but this will |
5 | then | 5 | # return 1: |
6 | LOCATION="gnunet-config" | 6 | # if test -z "`which fooble`"; then echo 1; fi |
7 | # The command builtin might not work with busybox's ash | ||
8 | # but this works for now. | ||
9 | existence() | ||
10 | { | ||
11 | command -v "$1" >/dev/null 2>&1 | ||
12 | } | ||
13 | |||
14 | LOCATION=`existence gnunet-config` | ||
15 | if test -z $LOCATION; then | ||
16 | LOCATION="gnunet-config" | ||
7 | fi | 17 | fi |
8 | $LOCATION --version | 18 | $LOCATION --version |
9 | if test $? != 0 | 19 | if test $? != 0 |
10 | then | 20 | then |
11 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | 21 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" |
12 | exit 77 | 22 | exit 77 |
13 | fi | 23 | fi |
14 | 24 | ||
15 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 25 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
@@ -32,4 +42,5 @@ if [ "$LO" != "Address: 4.5.6.7" ] | |||
32 | then | 42 | then |
33 | echo "Fail: $LO" | 43 | echo "Fail: $LO" |
34 | fi | 44 | fi |
45 | # XXX: jobs. a builtin by bash, netbsd sh, maybe leave it be for now. | ||
35 | kill `jobs -p` | 46 | kill `jobs -p` |
diff --git a/src/rest-plugins/test_plugin_rest_gns.sh b/src/gns/test_plugin_rest_gns.sh index ec495a04b..ec495a04b 100755 --- a/src/rest-plugins/test_plugin_rest_gns.sh +++ b/src/gns/test_plugin_rest_gns.sh | |||
diff --git a/src/gns/test_proxy.sh b/src/gns/test_proxy.sh index c960d4df9..7c17cd4c5 100755 --- a/src/gns/test_proxy.sh +++ b/src/gns/test_proxy.sh | |||
@@ -1,7 +1,9 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | # This file is in the public domain. | |
3 | TEST_DOMAIN="www.test" | 3 | TEST_DOMAIN="www.test" |
4 | 4 | ||
5 | # Delete old files before starting test | ||
6 | rm -rf /tmp/gnunet/test-gnunet-gns-testing/ | ||
5 | gnunet-arm -s -c test_gns_proxy.conf | 7 | gnunet-arm -s -c test_gns_proxy.conf |
6 | gnunet-gns-proxy-setup-ca -c test_gns_proxy.conf | 8 | gnunet-gns-proxy-setup-ca -c test_gns_proxy.conf |
7 | 9 | ||
diff --git a/src/hostlist/hostlist.conf b/src/hostlist/hostlist.conf index 32e5d8320..6b7a6aac7 100644 --- a/src/hostlist/hostlist.conf +++ b/src/hostlist/hostlist.conf | |||
@@ -20,7 +20,7 @@ HOSTLISTFILE = $GNUNET_CONFIG_HOME/hostlist/learned.txt | |||
20 | OPTIONS = -b | 20 | OPTIONS = -b |
21 | 21 | ||
22 | # Default list of hostlist servers for bootstrapping | 22 | # Default list of hostlist servers for bootstrapping |
23 | SERVERS = http://v10.gnunet.org/hostlist https://gnunet.io/hostlist | 23 | SERVERS = http://v11.gnunet.org/hostlist https://gnunet.io/hostlist |
24 | # http://silent.0xdeadc0de.eu:8080/ | 24 | # http://silent.0xdeadc0de.eu:8080/ |
25 | 25 | ||
26 | # bind hostlist http server to a specific IPv4 | 26 | # bind hostlist http server to a specific IPv4 |
diff --git a/src/identity/Makefile.am b/src/identity/Makefile.am index 1f21fc65d..5c1af8e19 100644 --- a/src/identity/Makefile.am +++ b/src/identity/Makefile.am | |||
@@ -12,6 +12,12 @@ if USE_COVERAGE | |||
12 | XLIB = -lgcov | 12 | XLIB = -lgcov |
13 | endif | 13 | endif |
14 | 14 | ||
15 | if HAVE_MHD | ||
16 | if HAVE_JSON | ||
17 | REST_PLUGIN = libgnunet_plugin_rest_identity.la | ||
18 | endif | ||
19 | endif | ||
20 | |||
15 | pkgcfgdir= $(pkgdatadir)/config.d/ | 21 | pkgcfgdir= $(pkgdatadir)/config.d/ |
16 | 22 | ||
17 | libexecdir= $(pkglibdir)/libexec/ | 23 | libexecdir= $(pkglibdir)/libexec/ |
@@ -20,7 +26,20 @@ pkgcfg_DATA = \ | |||
20 | identity.conf | 26 | identity.conf |
21 | 27 | ||
22 | lib_LTLIBRARIES = \ | 28 | lib_LTLIBRARIES = \ |
23 | libgnunetidentity.la | 29 | libgnunetidentity.la \ |
30 | $(REST_PLUGIN) | ||
31 | |||
32 | |||
33 | libgnunet_plugin_rest_identity_la_SOURCES = \ | ||
34 | plugin_rest_identity.c | ||
35 | libgnunet_plugin_rest_identity_la_LIBADD = \ | ||
36 | libgnunetidentity.la \ | ||
37 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
38 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
39 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
40 | libgnunet_plugin_rest_identity_la_LDFLAGS = \ | ||
41 | $(GN_PLUGIN_LDFLAGS) | ||
42 | |||
24 | 43 | ||
25 | libgnunetidentity_la_SOURCES = \ | 44 | libgnunetidentity_la_SOURCES = \ |
26 | identity_api.c \ | 45 | identity_api.c \ |
diff --git a/src/rest-plugins/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 3bfca3121..3bfca3121 100644 --- a/src/rest-plugins/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c | |||
diff --git a/src/rest-plugins/test_plugin_rest_identity.sh b/src/identity/test_plugin_rest_identity.sh index a5879dd7e..a5879dd7e 100755 --- a/src/rest-plugins/test_plugin_rest_identity.sh +++ b/src/identity/test_plugin_rest_identity.sh | |||
diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am index 368980064..26dd4f92d 100644 --- a/src/integration-tests/Makefile.am +++ b/src/integration-tests/Makefile.am | |||
@@ -20,8 +20,8 @@ check_SCRIPTS = \ | |||
20 | test_integration_disconnect.py \ | 20 | test_integration_disconnect.py \ |
21 | test_integration_disconnect_nat.py \ | 21 | test_integration_disconnect_nat.py \ |
22 | test_integration_reconnect.py \ | 22 | test_integration_reconnect.py \ |
23 | test_integration_reconnect_nat.py \ | 23 | test_integration_reconnect_nat.py |
24 | test_integration_clique.py | 24 | # test_integration_clique.py |
25 | endif | 25 | endif |
26 | 26 | ||
27 | 27 | ||
diff --git a/src/integration-tests/gnunet_pyexpect.py.in b/src/integration-tests/gnunet_pyexpect.py.in index 83acb908f..d757634a5 100644 --- a/src/integration-tests/gnunet_pyexpect.py.in +++ b/src/integration-tests/gnunet_pyexpect.py.in | |||
@@ -18,8 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # Testcase for gnunet-peerinfo | 20 | # Testcase for gnunet-peerinfo |
21 | from __future__ import print_function | 21 | |
22 | from builtins import object | ||
23 | import os | 22 | import os |
24 | import re | 23 | import re |
25 | import subprocess | 24 | import subprocess |
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in index c9342ecf0..c3596d232 100644 --- a/src/integration-tests/gnunet_testing.py.in +++ b/src/integration-tests/gnunet_testing.py.in | |||
@@ -18,10 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # Functions for integration testing | 20 | # Functions for integration testing |
21 | from __future__ import unicode_literals | 21 | |
22 | from __future__ import print_function | ||
23 | from builtins import object | ||
24 | from builtins import str | ||
25 | import os | 22 | import os |
26 | import subprocess | 23 | import subprocess |
27 | import sys | 24 | import sys |
diff --git a/src/integration-tests/test_integration_bootstrap_and_connect.py.in b/src/integration-tests/test_integration_bootstrap_and_connect.py.in index f0de1c0cd..4b4b35629 100755 --- a/src/integration-tests/test_integration_bootstrap_and_connect.py.in +++ b/src/integration-tests/test_integration_bootstrap_and_connect.py.in | |||
@@ -18,7 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # | 20 | # |
21 | from __future__ import print_function | 21 | |
22 | import signal | 22 | import signal |
23 | import sys | 23 | import sys |
24 | import os | 24 | import os |
diff --git a/src/integration-tests/test_integration_clique.py.in b/src/integration-tests/test_integration_clique.py.in index b5d6dd518..0444cf249 100755 --- a/src/integration-tests/test_integration_clique.py.in +++ b/src/integration-tests/test_integration_clique.py.in | |||
@@ -25,7 +25,6 @@ | |||
25 | # Conditions for successful exit: | 25 | # Conditions for successful exit: |
26 | # Both peers have 2 connected peers in transport, core, topology, fs and dht | 26 | # Both peers have 2 connected peers in transport, core, topology, fs and dht |
27 | 27 | ||
28 | from __future__ import print_function | ||
29 | import sys | 28 | import sys |
30 | import signal | 29 | import signal |
31 | import os | 30 | import os |
diff --git a/src/integration-tests/test_integration_disconnect.py.in b/src/integration-tests/test_integration_disconnect.py.in index a81c78540..737014e61 100755 --- a/src/integration-tests/test_integration_disconnect.py.in +++ b/src/integration-tests/test_integration_disconnect.py.in | |||
@@ -18,7 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # | 20 | # |
21 | from __future__ import print_function | 21 | |
22 | import sys | 22 | import sys |
23 | import signal | 23 | import signal |
24 | import os | 24 | import os |
diff --git a/src/integration-tests/test_integration_disconnect_nat.py.in b/src/integration-tests/test_integration_disconnect_nat.py.in index 601586f47..c3d5d8901 100755 --- a/src/integration-tests/test_integration_disconnect_nat.py.in +++ b/src/integration-tests/test_integration_disconnect_nat.py.in | |||
@@ -18,7 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # | 20 | # |
21 | from __future__ import print_function | 21 | |
22 | import sys | 22 | import sys |
23 | import signal | 23 | import signal |
24 | import os | 24 | import os |
diff --git a/src/integration-tests/test_integration_reconnect.py.in b/src/integration-tests/test_integration_reconnect.py.in index e8abacd48..8c4193680 100755 --- a/src/integration-tests/test_integration_reconnect.py.in +++ b/src/integration-tests/test_integration_reconnect.py.in | |||
@@ -18,7 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # | 20 | # |
21 | from __future__ import print_function | 21 | |
22 | import sys | 22 | import sys |
23 | import os | 23 | import os |
24 | import subprocess | 24 | import subprocess |
diff --git a/src/integration-tests/test_integration_reconnect_nat.py.in b/src/integration-tests/test_integration_reconnect_nat.py.in index 61d2ea966..45626d50d 100755 --- a/src/integration-tests/test_integration_reconnect_nat.py.in +++ b/src/integration-tests/test_integration_reconnect_nat.py.in | |||
@@ -18,7 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # | 20 | # |
21 | from __future__ import print_function | 21 | |
22 | import sys | 22 | import sys |
23 | import os | 23 | import os |
24 | import subprocess | 24 | import subprocess |
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index ac4eebd06..25941b4fb 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -104,10 +104,50 @@ TESTS = \ | |||
104 | $(check_SCRIPTS) | 104 | $(check_SCRIPTS) |
105 | endif | 105 | endif |
106 | 106 | ||
107 | if HAVE_MHD | ||
108 | if HAVE_JSON | ||
109 | REST_PLUGIN = libgnunet_plugin_rest_namestore.la | ||
110 | endif | ||
111 | endif | ||
112 | |||
107 | lib_LTLIBRARIES = \ | 113 | lib_LTLIBRARIES = \ |
108 | libgnunetnamestore.la | 114 | libgnunetnamestore.la |
109 | 115 | ||
110 | 116 | ||
117 | libexec_PROGRAMS = \ | ||
118 | gnunet-service-namestore | ||
119 | |||
120 | bin_PROGRAMS = \ | ||
121 | gnunet-namestore \ | ||
122 | gnunet-zoneimport | ||
123 | |||
124 | if HAVE_MHD | ||
125 | libexec_PROGRAMS += \ | ||
126 | gnunet-namestore-fcfsd | ||
127 | endif | ||
128 | |||
129 | |||
130 | plugin_LTLIBRARIES = \ | ||
131 | $(SQLITE_PLUGIN) \ | ||
132 | $(POSTGRES_PLUGIN) \ | ||
133 | $(HEAP_PLUGIN) \ | ||
134 | $(REST_PLUGIN) | ||
135 | |||
136 | |||
137 | libgnunet_plugin_rest_namestore_la_SOURCES = \ | ||
138 | plugin_rest_namestore.c | ||
139 | libgnunet_plugin_rest_namestore_la_LIBADD = \ | ||
140 | libgnunetnamestore.la \ | ||
141 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
142 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
143 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
144 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
145 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
146 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
147 | libgnunet_plugin_rest_namestore_la_LDFLAGS = \ | ||
148 | $(GN_PLUGIN_LDFLAGS) | ||
149 | |||
150 | |||
111 | libgnunetnamestore_la_SOURCES = \ | 151 | libgnunetnamestore_la_SOURCES = \ |
112 | namestore_api.c \ | 152 | namestore_api.c \ |
113 | namestore_api_monitor.c \ | 153 | namestore_api_monitor.c \ |
@@ -121,17 +161,6 @@ libgnunetnamestore_la_LDFLAGS = \ | |||
121 | $(GN_LIB_LDFLAGS) $(WINFLAGS) \ | 161 | $(GN_LIB_LDFLAGS) $(WINFLAGS) \ |
122 | -version-info 0:1:0 | 162 | -version-info 0:1:0 |
123 | 163 | ||
124 | libexec_PROGRAMS = \ | ||
125 | gnunet-service-namestore | ||
126 | |||
127 | bin_PROGRAMS = \ | ||
128 | gnunet-namestore \ | ||
129 | gnunet-zoneimport | ||
130 | |||
131 | if HAVE_MHD | ||
132 | libexec_PROGRAMS += \ | ||
133 | gnunet-namestore-fcfsd | ||
134 | endif | ||
135 | 164 | ||
136 | 165 | ||
137 | gnunet_zoneimport_SOURCES = \ | 166 | gnunet_zoneimport_SOURCES = \ |
@@ -176,12 +205,6 @@ gnunet_service_namestore_LDADD = \ | |||
176 | $(GN_LIBINTL) | 205 | $(GN_LIBINTL) |
177 | 206 | ||
178 | 207 | ||
179 | plugin_LTLIBRARIES = \ | ||
180 | $(SQLITE_PLUGIN) \ | ||
181 | $(POSTGRES_PLUGIN) \ | ||
182 | $(HEAP_PLUGIN) | ||
183 | |||
184 | |||
185 | 208 | ||
186 | libgnunet_plugin_namestore_heap_la_SOURCES = \ | 209 | libgnunet_plugin_namestore_heap_la_SOURCES = \ |
187 | plugin_namestore_heap.c | 210 | plugin_namestore_heap.c |
diff --git a/src/rest-plugins/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c index 26a037eae..26a037eae 100644 --- a/src/rest-plugins/plugin_rest_namestore.c +++ b/src/namestore/plugin_rest_namestore.c | |||
diff --git a/src/rest-plugins/test_plugin_rest_namestore.sh b/src/namestore/test_plugin_rest_namestore.sh index 532c7caae..532c7caae 100755 --- a/src/rest-plugins/test_plugin_rest_namestore.sh +++ b/src/namestore/test_plugin_rest_namestore.sh | |||
diff --git a/src/nat/install-nat-helper.sh b/src/nat/install-nat-helper.sh index 502aa71f1..d5ee91fa3 100755 --- a/src/nat/install-nat-helper.sh +++ b/src/nat/install-nat-helper.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # $1 - bindir | 2 | # $1 - bindir |
3 | # $2 - sudo binary (optional) | 3 | # $2 - sudo binary (optional) |
4 | $2 chown root:root $1/gnunet-helper-nat-server $1/gnunet-helper-nat-client || true | 4 | $2 chown root:root $1/gnunet-helper-nat-server $1/gnunet-helper-nat-client || true |
diff --git a/src/peerinfo/Makefile.am b/src/peerinfo/Makefile.am index ef79d6720..3c710eb93 100644 --- a/src/peerinfo/Makefile.am +++ b/src/peerinfo/Makefile.am | |||
@@ -5,6 +5,8 @@ pkgcfgdir= $(pkgdatadir)/config.d/ | |||
5 | 5 | ||
6 | libexecdir= $(pkglibdir)/libexec/ | 6 | libexecdir= $(pkglibdir)/libexec/ |
7 | 7 | ||
8 | plugindir = $(libdir)/gnunet | ||
9 | |||
8 | pkgcfg_DATA = \ | 10 | pkgcfg_DATA = \ |
9 | peerinfo.conf | 11 | peerinfo.conf |
10 | 12 | ||
@@ -17,8 +19,29 @@ if USE_COVERAGE | |||
17 | XLIB = -lgcov | 19 | XLIB = -lgcov |
18 | endif | 20 | endif |
19 | 21 | ||
22 | if HAVE_MHD | ||
23 | if HAVE_JSON | ||
24 | REST_PLUGIN = libgnunet_plugin_rest_peerinfo.la | ||
25 | endif | ||
26 | endif | ||
27 | |||
20 | lib_LTLIBRARIES = libgnunetpeerinfo.la | 28 | lib_LTLIBRARIES = libgnunetpeerinfo.la |
21 | 29 | ||
30 | plugin_LTLIBRARIES = $(REST_PLUGIN) | ||
31 | |||
32 | libgnunet_plugin_rest_peerinfo_la_SOURCES = \ | ||
33 | plugin_rest_peerinfo.c | ||
34 | libgnunet_plugin_rest_peerinfo_la_LIBADD = \ | ||
35 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
36 | libgnunetpeerinfo.la \ | ||
37 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
38 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
39 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
40 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
41 | libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \ | ||
42 | $(GN_PLUGIN_LDFLAGS) | ||
43 | |||
44 | |||
22 | libgnunetpeerinfo_la_SOURCES = \ | 45 | libgnunetpeerinfo_la_SOURCES = \ |
23 | peerinfo_api.c peerinfo.h \ | 46 | peerinfo_api.c peerinfo.h \ |
24 | peerinfo_api_notify.c | 47 | peerinfo_api_notify.c |
diff --git a/src/rest-plugins/plugin_rest_peerinfo.c b/src/peerinfo/plugin_rest_peerinfo.c index 24af2c193..24af2c193 100644 --- a/src/rest-plugins/plugin_rest_peerinfo.c +++ b/src/peerinfo/plugin_rest_peerinfo.c | |||
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index 05fab18be..069277a00 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 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/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
diff --git a/src/pt/test_gns_vpn.conf b/src/pt/test_gns_vpn.conf index 85dd08113..9277aa3c3 100644 --- a/src/pt/test_gns_vpn.conf +++ b/src/pt/test_gns_vpn.conf | |||
@@ -7,8 +7,6 @@ PLUGINS = tcp | |||
7 | [arm] | 7 | [arm] |
8 | PORT = 0 | 8 | PORT = 0 |
9 | ALLOW_SHUTDOWN = YES | 9 | ALLOW_SHUTDOWN = YES |
10 | START_SYSTEM_SERVICES = NO | ||
11 | START_USER_SERVICES = NO | ||
12 | 10 | ||
13 | [exit] | 11 | [exit] |
14 | IMMEDIATE_START = YES | 12 | IMMEDIATE_START = YES |
diff --git a/src/reclaim/.gitignore b/src/reclaim/.gitignore index ef77fccdc..46472101b 100644 --- a/src/reclaim/.gitignore +++ b/src/reclaim/.gitignore | |||
@@ -1,2 +1,2 @@ | |||
1 | gnunet-service-identity-provider | 1 | gnunet-reclaim |
2 | gnunet-identity-token | 2 | gnunet-service-reclaim |
diff --git a/src/reclaim/Makefile.am b/src/reclaim/Makefile.am index f9942fa23..13918508e 100644 --- a/src/reclaim/Makefile.am +++ b/src/reclaim/Makefile.am | |||
@@ -16,6 +16,14 @@ if HAVE_SQLITE | |||
16 | SQLITE_PLUGIN = libgnunet_plugin_reclaim_sqlite.la | 16 | SQLITE_PLUGIN = libgnunet_plugin_reclaim_sqlite.la |
17 | endif | 17 | endif |
18 | 18 | ||
19 | if HAVE_MHD | ||
20 | if HAVE_JSON | ||
21 | REST_PLUGIN = \ | ||
22 | libgnunet_plugin_rest_openid_connect.la \ | ||
23 | libgnunet_plugin_rest_reclaim.la | ||
24 | endif | ||
25 | endif | ||
26 | |||
19 | EXTRA_DIST = \ | 27 | EXTRA_DIST = \ |
20 | reclaim.conf \ | 28 | reclaim.conf \ |
21 | test_reclaim_defaults.conf \ | 29 | test_reclaim_defaults.conf \ |
@@ -33,7 +41,8 @@ lib_LTLIBRARIES = \ | |||
33 | libgnunetreclaim.la | 41 | libgnunetreclaim.la |
34 | plugin_LTLIBRARIES = \ | 42 | plugin_LTLIBRARIES = \ |
35 | libgnunet_plugin_gnsrecord_reclaim.la \ | 43 | libgnunet_plugin_gnsrecord_reclaim.la \ |
36 | $(SQLITE_PLUGIN) | 44 | $(SQLITE_PLUGIN) \ |
45 | $(REST_PLUGIN) | ||
37 | 46 | ||
38 | bin_PROGRAMS = \ | 47 | bin_PROGRAMS = \ |
39 | gnunet-reclaim | 48 | gnunet-reclaim |
@@ -41,6 +50,41 @@ bin_PROGRAMS = \ | |||
41 | libexec_PROGRAMS = \ | 50 | libexec_PROGRAMS = \ |
42 | gnunet-service-reclaim | 51 | gnunet-service-reclaim |
43 | 52 | ||
53 | libgnunet_plugin_rest_reclaim_la_SOURCES = \ | ||
54 | plugin_rest_reclaim.c \ | ||
55 | json_reclaim.h \ | ||
56 | json_reclaim.c | ||
57 | libgnunet_plugin_rest_reclaim_la_LIBADD = \ | ||
58 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
59 | libgnunetreclaim.la \ | ||
60 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
61 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
62 | $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \ | ||
63 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | ||
64 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
65 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
66 | libgnunet_plugin_rest_reclaim_la_LDFLAGS = \ | ||
67 | $(GN_PLUGIN_LDFLAGS) | ||
68 | |||
69 | |||
70 | libgnunet_plugin_rest_openid_connect_la_SOURCES = \ | ||
71 | plugin_rest_openid_connect.c \ | ||
72 | oidc_helper.h \ | ||
73 | oidc_helper.c | ||
74 | libgnunet_plugin_rest_openid_connect_la_LIBADD = \ | ||
75 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
76 | libgnunetreclaim.la \ | ||
77 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
78 | $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \ | ||
79 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | ||
80 | $(top_builddir)/src/gns/libgnunetgns.la \ | ||
81 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
82 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
83 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
84 | libgnunet_plugin_rest_openid_connect_la_LDFLAGS = \ | ||
85 | $(GN_PLUGIN_LDFLAGS) | ||
86 | |||
87 | |||
44 | libgnunet_plugin_gnsrecord_reclaim_la_SOURCES = \ | 88 | libgnunet_plugin_gnsrecord_reclaim_la_SOURCES = \ |
45 | plugin_gnsrecord_reclaim.c | 89 | plugin_gnsrecord_reclaim.c |
46 | libgnunet_plugin_gnsrecord_reclaim_la_LIBADD = \ | 90 | libgnunet_plugin_gnsrecord_reclaim_la_LIBADD = \ |
diff --git a/src/rest-plugins/json_reclaim.c b/src/reclaim/json_reclaim.c index 0fe9150d9..0fe9150d9 100644 --- a/src/rest-plugins/json_reclaim.c +++ b/src/reclaim/json_reclaim.c | |||
diff --git a/src/rest-plugins/json_reclaim.h b/src/reclaim/json_reclaim.h index ced2e10dd..ced2e10dd 100644 --- a/src/rest-plugins/json_reclaim.h +++ b/src/reclaim/json_reclaim.h | |||
diff --git a/src/rest-plugins/oidc_helper.c b/src/reclaim/oidc_helper.c index 646e58551..646e58551 100644 --- a/src/rest-plugins/oidc_helper.c +++ b/src/reclaim/oidc_helper.c | |||
diff --git a/src/rest-plugins/oidc_helper.h b/src/reclaim/oidc_helper.h index d718b7a78..d718b7a78 100644 --- a/src/rest-plugins/oidc_helper.h +++ b/src/reclaim/oidc_helper.h | |||
diff --git a/src/rest-plugins/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c index e755f079b..e755f079b 100644 --- a/src/rest-plugins/plugin_rest_openid_connect.c +++ b/src/reclaim/plugin_rest_openid_connect.c | |||
diff --git a/src/rest-plugins/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index b36ed2bb6..b36ed2bb6 100644 --- a/src/rest-plugins/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
diff --git a/src/reclaim/test_reclaim.sh b/src/reclaim/test_reclaim.sh index 311f5382a..da93b10f7 100755 --- a/src/reclaim/test_reclaim.sh +++ b/src/reclaim/test_reclaim.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | #trap "gnunet-arm -e -c test_reclaim_lookup.conf" SIGINT | 2 | #trap "gnunet-arm -e -c test_reclaim_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(which gnunet-config) |
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_reclaim.conf -s PATHS -o GNUNET_HOME -f` | |||
20 | # (3) PKEY3.user -> PKEY4 | 20 | # (3) PKEY3.user -> PKEY4 |
21 | 21 | ||
22 | 22 | ||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 23 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
24 | 24 | ||
25 | TEST_ATTR="test" | 25 | TEST_ATTR="test" |
26 | gnunet-arm -s -c test_reclaim.conf | 26 | gnunet-arm -s -c test_reclaim.conf |
diff --git a/src/rest-plugins/Makefile.am b/src/rest-plugins/Makefile.am deleted file mode 100644 index 006c23101..000000000 --- a/src/rest-plugins/Makefile.am +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | ||
3 | |||
4 | plugindir = $(libdir)/gnunet | ||
5 | |||
6 | pkgcfgdir= $(pkgdatadir)/config.d/ | ||
7 | |||
8 | libexecdir= $(pkglibdir)/libexec/ | ||
9 | |||
10 | |||
11 | if MINGW | ||
12 | WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols | ||
13 | endif | ||
14 | |||
15 | if USE_COVERAGE | ||
16 | AM_CFLAGS = --coverage -O0 | ||
17 | XLIBS = -lgcov | ||
18 | endif | ||
19 | |||
20 | plugin_LTLIBRARIES = \ | ||
21 | libgnunet_plugin_rest_copying.la \ | ||
22 | libgnunet_plugin_rest_peerinfo.la \ | ||
23 | libgnunet_plugin_rest_identity.la \ | ||
24 | libgnunet_plugin_rest_namestore.la \ | ||
25 | libgnunet_plugin_rest_gns.la | ||
26 | if HAVE_ABE | ||
27 | plugin_LTLIBRARIES += libgnunet_plugin_rest_openid_connect.la \ | ||
28 | libgnunet_plugin_rest_reclaim.la | ||
29 | endif | ||
30 | |||
31 | libgnunet_plugin_rest_reclaim_la_SOURCES = \ | ||
32 | plugin_rest_reclaim.c \ | ||
33 | json_reclaim.h \ | ||
34 | json_reclaim.c | ||
35 | libgnunet_plugin_rest_reclaim_la_LIBADD = \ | ||
36 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
37 | $(top_builddir)/src/reclaim/libgnunetreclaim.la \ | ||
38 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
39 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
40 | $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \ | ||
41 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | ||
42 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
43 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
44 | libgnunet_plugin_rest_reclaim_la_LDFLAGS = \ | ||
45 | i$(GN_PLUGIN_LDFLAGS) | ||
46 | |||
47 | |||
48 | #libgnunet_plugin_rest_credential_la_SOURCES = \ | ||
49 | # plugin_rest_credential.c | ||
50 | #libgnunet_plugin_rest_credential_la_LIBADD = \ | ||
51 | # $(top_builddir)/src/credential/libgnunetcredential.la \ | ||
52 | # $(top_builddir)/src/rest/libgnunetrest.la \ | ||
53 | # $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
54 | # $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
55 | # $(LTLIBINTL) -ljansson -lmicrohttpd | ||
56 | #libgnunet_plugin_rest_credential_la_LDFLAGS = \ | ||
57 | # $(GN_PLUGIN_LDFLAGS) | ||
58 | |||
59 | libgnunet_plugin_rest_copying_la_SOURCES = \ | ||
60 | plugin_rest_copying.c | ||
61 | libgnunet_plugin_rest_copying_la_LIBADD = \ | ||
62 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
63 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
64 | $(LTLIBINTL) -lmicrohttpd | ||
65 | libgnunet_plugin_rest_copying_la_LDFLAGS = \ | ||
66 | $(GN_PLUGIN_LDFLAGS) | ||
67 | |||
68 | libgnunet_plugin_rest_peerinfo_la_SOURCES = \ | ||
69 | plugin_rest_peerinfo.c | ||
70 | libgnunet_plugin_rest_peerinfo_la_LIBADD = \ | ||
71 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
72 | $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \ | ||
73 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
74 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
75 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
76 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
77 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
78 | libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \ | ||
79 | $(GN_PLUGIN_LDFLAGS) | ||
80 | |||
81 | libgnunet_plugin_rest_identity_la_SOURCES = \ | ||
82 | plugin_rest_identity.c | ||
83 | libgnunet_plugin_rest_identity_la_LIBADD = \ | ||
84 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
85 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
86 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
87 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
88 | libgnunet_plugin_rest_identity_la_LDFLAGS = \ | ||
89 | $(GN_PLUGIN_LDFLAGS) | ||
90 | |||
91 | |||
92 | |||
93 | libgnunet_plugin_rest_namestore_la_SOURCES = \ | ||
94 | plugin_rest_namestore.c | ||
95 | libgnunet_plugin_rest_namestore_la_LIBADD = \ | ||
96 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | ||
97 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
98 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
99 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
100 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
101 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
102 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
103 | libgnunet_plugin_rest_namestore_la_LDFLAGS = \ | ||
104 | $(GN_PLUGIN_LDFLAGS) | ||
105 | |||
106 | libgnunet_plugin_rest_gns_la_SOURCES = \ | ||
107 | plugin_rest_gns.c | ||
108 | libgnunet_plugin_rest_gns_la_LIBADD = \ | ||
109 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
110 | $(top_builddir)/src/gns/libgnunetgns.la \ | ||
111 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
112 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
113 | $(top_builddir)/src/json/libgnunetjson.la \ | ||
114 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
115 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
116 | libgnunet_plugin_rest_gns_la_LDFLAGS = \ | ||
117 | $(GN_PLUGIN_LDFLAGS) | ||
118 | |||
119 | libgnunet_plugin_rest_openid_connect_la_SOURCES = \ | ||
120 | plugin_rest_openid_connect.c \ | ||
121 | oidc_helper.h \ | ||
122 | oidc_helper.c | ||
123 | libgnunet_plugin_rest_openid_connect_la_LIBADD = \ | ||
124 | $(top_builddir)/src/identity/libgnunetidentity.la \ | ||
125 | $(top_builddir)/src/reclaim/libgnunetreclaim.la \ | ||
126 | $(top_builddir)/src/rest/libgnunetrest.la \ | ||
127 | $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \ | ||
128 | $(top_builddir)/src/namestore/libgnunetnamestore.la \ | ||
129 | $(top_builddir)/src/gns/libgnunetgns.la \ | ||
130 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | ||
131 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
132 | $(LTLIBINTL) -ljansson -lmicrohttpd | ||
133 | libgnunet_plugin_rest_openid_connect_la_LDFLAGS = \ | ||
134 | $(GN_PLUGIN_LDFLAGS) | ||
135 | |||
diff --git a/src/rest/Makefile.am b/src/rest/Makefile.am index 6c23ad2a6..acb95140b 100644 --- a/src/rest/Makefile.am +++ b/src/rest/Makefile.am | |||
@@ -20,14 +20,27 @@ if USE_COVERAGE | |||
20 | endif | 20 | endif |
21 | 21 | ||
22 | lib_LTLIBRARIES = \ | 22 | lib_LTLIBRARIES = \ |
23 | libgnunetrest.la | 23 | libgnunetrest.la |
24 | 24 | ||
25 | libexec_PROGRAMS = \ | 25 | libexec_PROGRAMS = \ |
26 | gnunet-rest-server | 26 | gnunet-rest-server |
27 | 27 | ||
28 | plugin_LTLIBRARIES = libgnunet_plugin_rest_copying.la | ||
29 | |||
28 | EXTRA_DIST = \ | 30 | EXTRA_DIST = \ |
29 | rest.conf | 31 | rest.conf |
30 | 32 | ||
33 | libgnunet_plugin_rest_copying_la_SOURCES = \ | ||
34 | plugin_rest_copying.c | ||
35 | libgnunet_plugin_rest_copying_la_LIBADD = \ | ||
36 | libgnunetrest.la \ | ||
37 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | ||
38 | $(LTLIBINTL) -lmicrohttpd | ||
39 | libgnunet_plugin_rest_copying_la_LDFLAGS = \ | ||
40 | $(GN_PLUGIN_LDFLAGS) | ||
41 | |||
42 | |||
43 | |||
31 | gnunet_rest_server_SOURCES = \ | 44 | gnunet_rest_server_SOURCES = \ |
32 | gnunet-rest-server.c | 45 | gnunet-rest-server.c |
33 | 46 | ||
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c index 77f3d898d..3cbb750ba 100644 --- a/src/rest/gnunet-rest-server.c +++ b/src/rest/gnunet-rest-server.c | |||
@@ -64,6 +64,16 @@ | |||
64 | static struct GNUNET_SCHEDULER_Task *httpd_task; | 64 | static struct GNUNET_SCHEDULER_Task *httpd_task; |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * The address to bind to | ||
68 | */ | ||
69 | static in_addr_t address; | ||
70 | |||
71 | /** | ||
72 | * The IPv6 address to bind to | ||
73 | */ | ||
74 | static struct in6_addr address6; | ||
75 | |||
76 | /** | ||
67 | * The port the service is running on (default 7776) | 77 | * The port the service is running on (default 7776) |
68 | */ | 78 | */ |
69 | static unsigned long long port = GNUNET_REST_SERVICE_PORT; | 79 | static unsigned long long port = GNUNET_REST_SERVICE_PORT; |
@@ -406,11 +416,11 @@ create_response (void *cls, | |||
406 | con_handle->data_handle = rest_conndata_handle; | 416 | con_handle->data_handle = rest_conndata_handle; |
407 | MHD_get_connection_values (con, | 417 | MHD_get_connection_values (con, |
408 | MHD_GET_ARGUMENT_KIND, | 418 | MHD_GET_ARGUMENT_KIND, |
409 | &url_iterator, | 419 | (MHD_KeyValueIterator) &url_iterator, |
410 | rest_conndata_handle); | 420 | rest_conndata_handle); |
411 | MHD_get_connection_values (con, | 421 | MHD_get_connection_values (con, |
412 | MHD_HEADER_KIND, | 422 | MHD_HEADER_KIND, |
413 | &header_iterator, | 423 | (MHD_KeyValueIterator) &header_iterator, |
414 | rest_conndata_handle); | 424 | rest_conndata_handle); |
415 | con_handle->pp = MHD_create_post_processor(con, | 425 | con_handle->pp = MHD_create_post_processor(con, |
416 | 65536, | 426 | 65536, |
@@ -695,6 +705,7 @@ bind_v4 () | |||
695 | memset (&sa4, 0, sizeof (sa4)); | 705 | memset (&sa4, 0, sizeof (sa4)); |
696 | sa4.sin_family = AF_INET; | 706 | sa4.sin_family = AF_INET; |
697 | sa4.sin_port = htons (port); | 707 | sa4.sin_port = htons (port); |
708 | sa4.sin_addr.s_addr = address; | ||
698 | #if HAVE_SOCKADDR_IN_SIN_LEN | 709 | #if HAVE_SOCKADDR_IN_SIN_LEN |
699 | sa4.sin_len = sizeof (sa4); | 710 | sa4.sin_len = sizeof (sa4); |
700 | #endif | 711 | #endif |
@@ -731,6 +742,7 @@ bind_v6 () | |||
731 | memset (&sa6, 0, sizeof (sa6)); | 742 | memset (&sa6, 0, sizeof (sa6)); |
732 | sa6.sin6_family = AF_INET6; | 743 | sa6.sin6_family = AF_INET6; |
733 | sa6.sin6_port = htons (port); | 744 | sa6.sin6_port = htons (port); |
745 | sa6.sin6_addr = address6; | ||
734 | #if HAVE_SOCKADDR_IN_SIN_LEN | 746 | #if HAVE_SOCKADDR_IN_SIN_LEN |
735 | sa6.sin6_len = sizeof (sa6); | 747 | sa6.sin6_len = sizeof (sa6); |
736 | #endif | 748 | #endif |
@@ -806,9 +818,56 @@ run (void *cls, | |||
806 | const char *cfgfile, | 818 | const char *cfgfile, |
807 | const struct GNUNET_CONFIGURATION_Handle *c) | 819 | const struct GNUNET_CONFIGURATION_Handle *c) |
808 | { | 820 | { |
821 | char* addr_str; | ||
809 | cfg = c; | 822 | cfg = c; |
810 | plugin_map = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); | 823 | plugin_map = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); |
811 | 824 | ||
825 | /* Get address to bind to */ | ||
826 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "rest", | ||
827 | "BIND_TO", | ||
828 | &addr_str)) | ||
829 | { | ||
830 | //No address specified | ||
831 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
832 | "Don't know what to bind to...\n"); | ||
833 | GNUNET_free (addr_str); | ||
834 | GNUNET_SCHEDULER_shutdown (); | ||
835 | return; | ||
836 | } | ||
837 | if (1 != inet_pton (AF_INET, addr_str, &address)) | ||
838 | { | ||
839 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
840 | "Unable to parse address %s\n", | ||
841 | addr_str); | ||
842 | GNUNET_free (addr_str); | ||
843 | GNUNET_SCHEDULER_shutdown (); | ||
844 | return; | ||
845 | } | ||
846 | GNUNET_free (addr_str); | ||
847 | /* Get address to bind to */ | ||
848 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "rest", | ||
849 | "BIND_TO6", | ||
850 | &addr_str)) | ||
851 | { | ||
852 | //No address specified | ||
853 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
854 | "Don't know what to bind6 to...\n"); | ||
855 | GNUNET_free (addr_str); | ||
856 | GNUNET_SCHEDULER_shutdown (); | ||
857 | return; | ||
858 | } | ||
859 | if (1 != inet_pton (AF_INET6, addr_str, &address6)) | ||
860 | { | ||
861 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
862 | "Unable to parse IPv6 address %s\n", | ||
863 | addr_str); | ||
864 | GNUNET_free (addr_str); | ||
865 | GNUNET_SCHEDULER_shutdown (); | ||
866 | return; | ||
867 | } | ||
868 | GNUNET_free (addr_str); | ||
869 | |||
870 | |||
812 | /* Get CORS data from cfg */ | 871 | /* Get CORS data from cfg */ |
813 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "rest", | 872 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "rest", |
814 | "REST_ALLOW_ORIGIN", | 873 | "REST_ALLOW_ORIGIN", |
diff --git a/src/rest-plugins/plugin_rest_copying.c b/src/rest/plugin_rest_copying.c index 92c2c6601..92c2c6601 100644 --- a/src/rest-plugins/plugin_rest_copying.c +++ b/src/rest/plugin_rest_copying.c | |||
diff --git a/src/rest/rest.conf b/src/rest/rest.conf index 138751696..bef8cf473 100644 --- a/src/rest/rest.conf +++ b/src/rest/rest.conf | |||
@@ -1,6 +1,8 @@ | |||
1 | [rest] | 1 | [rest] |
2 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-rest.sock | 2 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-rest.sock |
3 | BINARY=gnunet-rest-server | 3 | BINARY=gnunet-rest-server |
4 | BIND_TO=127.0.0.1 | ||
5 | BIND_TO6=::1 | ||
4 | REST_PORT=7776 | 6 | REST_PORT=7776 |
5 | REST_ALLOW_HEADERS=Authorization,Accept,Content-Type | 7 | REST_ALLOW_HEADERS=Authorization,Accept,Content-Type |
6 | REST_ALLOW_ORIGIN=* | 8 | REST_ALLOW_ORIGIN=* |
diff --git a/src/revocation/test_local_revocation.py.in b/src/revocation/test_local_revocation.py.in index 5caa616ca..4cc6119ca 100644 --- a/src/revocation/test_local_revocation.py.in +++ b/src/revocation/test_local_revocation.py.in | |||
@@ -18,8 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # Testcase for ego revocation | 20 | # Testcase for ego revocation |
21 | from __future__ import print_function | 21 | |
22 | from builtins import str | ||
23 | import sys | 22 | import sys |
24 | import os | 23 | import os |
25 | import subprocess | 24 | import subprocess |
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c index 9aa786334..af27546f2 100644 --- a/src/rps/gnunet-rps-profiler.c +++ b/src/rps/gnunet-rps-profiler.c | |||
@@ -84,29 +84,31 @@ enum STAT_TYPE | |||
84 | STAT_TYPE_BLOCKS_MANY_PUSH_NO_PULL, /* 5 */ | 84 | STAT_TYPE_BLOCKS_MANY_PUSH_NO_PULL, /* 5 */ |
85 | STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL, /* 6 */ | 85 | STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL, /* 6 */ |
86 | STAT_TYPE_ISSUED_PUSH_SEND, /* 7 */ | 86 | STAT_TYPE_ISSUED_PUSH_SEND, /* 7 */ |
87 | STAT_TYPE_ISSUED_PULL_REQ, /* 8 */ | 87 | STAT_TYPE_ISSUED_PUSH_SEND_MH, /* 8 */ |
88 | STAT_TYPE_ISSUED_PULL_REQ_MH, /* 9 */ | 88 | STAT_TYPE_ISSUED_PULL_REQ, /* 9 */ |
89 | STAT_TYPE_ISSUED_PULL_REP, /* 10 */ | 89 | STAT_TYPE_ISSUED_PULL_REQ_MH, /* 10 */ |
90 | STAT_TYPE_SENT_PUSH_SEND, /* 11 */ | 90 | STAT_TYPE_ISSUED_PULL_REP, /* 11 */ |
91 | STAT_TYPE_SENT_PULL_REQ, /* 12 */ | 91 | STAT_TYPE_SENT_PUSH_SEND, /* 12 */ |
92 | STAT_TYPE_SENT_PULL_REQ_MH, /* 13 */ | 92 | STAT_TYPE_SENT_PULL_REQ, /* 13 */ |
93 | STAT_TYPE_SENT_PULL_REP, /* 14 */ | 93 | STAT_TYPE_SENT_PULL_REQ_MH, /* 14 */ |
94 | STAT_TYPE_RECV_PUSH_SEND, /* 15 */ | 94 | STAT_TYPE_SENT_PULL_REP, /* 15 */ |
95 | STAT_TYPE_RECV_PULL_REQ, /* 16 */ | 95 | STAT_TYPE_RECV_PUSH_SEND, /* 16 */ |
96 | STAT_TYPE_RECV_PULL_REQ_MH, /* 17 */ | 96 | STAT_TYPE_RECV_PUSH_SEND_MH, /* 17 */ |
97 | STAT_TYPE_RECV_PULL_REP, /* 18 */ | 97 | STAT_TYPE_RECV_PULL_REQ, /* 18 */ |
98 | STAT_TYPE_RECV_PULL_REP_MH, /* 19 */ | 98 | STAT_TYPE_RECV_PULL_REQ_MH, /* 19 */ |
99 | STAT_TYPE_VIEW_SIZE, /* 20 */ | 99 | STAT_TYPE_RECV_PULL_REP, /* 20 */ |
100 | STAT_TYPE_KNOWN_PEERS, /* 21 */ | 100 | STAT_TYPE_RECV_PULL_REP_MH, /* 21 */ |
101 | STAT_TYPE_VALID_PEERS, /* 22 */ | 101 | STAT_TYPE_VIEW_SIZE, /* 22 */ |
102 | STAT_TYPE_LEARND_PEERS, /* 23 */ | 102 | STAT_TYPE_KNOWN_PEERS, /* 23 */ |
103 | STAT_TYPE_PENDING_ONLINE_CHECKS, /* 24 */ | 103 | STAT_TYPE_VALID_PEERS, /* 24 */ |
104 | STAT_TYPE_UNREQUESTED_PULL_REPLIES, /* 25 */ | 104 | STAT_TYPE_LEARND_PEERS, /* 25 */ |
105 | STAT_TYPE_PEERS_IN_PUSH_MAP, /* 26 */ | 105 | STAT_TYPE_PENDING_ONLINE_CHECKS, /* 26 */ |
106 | STAT_TYPE_PEERS_IN_PULL_MAP, /* 27 */ | 106 | STAT_TYPE_UNREQUESTED_PULL_REPLIES, /* 27 */ |
107 | STAT_TYPE_PEERS_IN_VIEW, /* 28 */ | 107 | STAT_TYPE_PEERS_IN_PUSH_MAP, /* 28 */ |
108 | STAT_TYPE_VIEW_SIZE_AIM, /* 29 */ | 108 | STAT_TYPE_PEERS_IN_PULL_MAP, /* 29 */ |
109 | STAT_TYPE_MAX, /* 30 */ | 109 | STAT_TYPE_PEERS_IN_VIEW, /* 30 */ |
110 | STAT_TYPE_VIEW_SIZE_AIM, /* 31 */ | ||
111 | STAT_TYPE_MAX, /* 32 */ | ||
110 | }; | 112 | }; |
111 | 113 | ||
112 | static char* stat_type_strings[] = { | 114 | static char* stat_type_strings[] = { |
@@ -118,6 +120,7 @@ static char* stat_type_strings[] = { | |||
118 | "# rounds blocked - too many pushes, no pull replies", | 120 | "# rounds blocked - too many pushes, no pull replies", |
119 | "# rounds blocked - no pushes, no pull replies", | 121 | "# rounds blocked - no pushes, no pull replies", |
120 | "# push send issued", | 122 | "# push send issued", |
123 | "# push send issued (multi-hop peer)", | ||
121 | "# pull request send issued", | 124 | "# pull request send issued", |
122 | "# pull request send issued (multi-hop peer)", | 125 | "# pull request send issued (multi-hop peer)", |
123 | "# pull reply send issued", | 126 | "# pull reply send issued", |
@@ -126,6 +129,7 @@ static char* stat_type_strings[] = { | |||
126 | "# pull requests sent (multi-hop peer)", | 129 | "# pull requests sent (multi-hop peer)", |
127 | "# pull replys sent", | 130 | "# pull replys sent", |
128 | "# push message received", | 131 | "# push message received", |
132 | "# push message received (multi-hop peer)", | ||
129 | "# pull request message received", | 133 | "# pull request message received", |
130 | "# pull request message received (multi-hop peer)", | 134 | "# pull request message received (multi-hop peer)", |
131 | "# pull reply messages received", | 135 | "# pull reply messages received", |
@@ -206,6 +210,12 @@ enum STAT_TYPE stat_str_2_type (const char *stat_str) | |||
206 | { | 210 | { |
207 | return STAT_TYPE_ISSUED_PUSH_SEND; | 211 | return STAT_TYPE_ISSUED_PUSH_SEND; |
208 | } | 212 | } |
213 | else if (0 == strncmp (stat_type_strings[STAT_TYPE_ISSUED_PUSH_SEND_MH], | ||
214 | stat_str, | ||
215 | strlen (stat_type_strings[STAT_TYPE_ISSUED_PUSH_SEND_MH]))) | ||
216 | { | ||
217 | return STAT_TYPE_ISSUED_PUSH_SEND_MH; | ||
218 | } | ||
209 | else if (0 == strncmp (stat_type_strings[STAT_TYPE_ISSUED_PULL_REQ], | 219 | else if (0 == strncmp (stat_type_strings[STAT_TYPE_ISSUED_PULL_REQ], |
210 | stat_str, | 220 | stat_str, |
211 | strlen (stat_type_strings[STAT_TYPE_ISSUED_PULL_REQ]))) | 221 | strlen (stat_type_strings[STAT_TYPE_ISSUED_PULL_REQ]))) |
@@ -254,6 +264,12 @@ enum STAT_TYPE stat_str_2_type (const char *stat_str) | |||
254 | { | 264 | { |
255 | return STAT_TYPE_RECV_PUSH_SEND; | 265 | return STAT_TYPE_RECV_PUSH_SEND; |
256 | } | 266 | } |
267 | else if (0 == strncmp (stat_type_strings[STAT_TYPE_RECV_PUSH_SEND_MH], | ||
268 | stat_str, | ||
269 | strlen (stat_type_strings[STAT_TYPE_RECV_PUSH_SEND_MH]))) | ||
270 | { | ||
271 | return STAT_TYPE_RECV_PUSH_SEND_MH; | ||
272 | } | ||
257 | else if (0 == strncmp (stat_type_strings[STAT_TYPE_RECV_PULL_REQ], | 273 | else if (0 == strncmp (stat_type_strings[STAT_TYPE_RECV_PULL_REQ], |
258 | stat_str, | 274 | stat_str, |
259 | strlen (stat_type_strings[STAT_TYPE_RECV_PULL_REQ]))) | 275 | strlen (stat_type_strings[STAT_TYPE_RECV_PULL_REQ]))) |
@@ -2461,9 +2477,9 @@ void write_final_stats (void){ | |||
2461 | "%s, %" /* id */ | 2477 | "%s, %" /* id */ |
2462 | PRIu64 ", %" /* rounds */ | 2478 | PRIu64 ", %" /* rounds */ |
2463 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* blocking */ | 2479 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* blocking */ |
2464 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* issued */ | 2480 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* issued */ |
2465 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* sent */ | 2481 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* sent */ |
2466 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* recv */ | 2482 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* recv */ |
2467 | PRIu64 ", %" /* view size */ | 2483 | PRIu64 ", %" /* view size */ |
2468 | PRIu64 ", %" /* known peers */ | 2484 | PRIu64 ", %" /* known peers */ |
2469 | PRIu64 ", %" /* valid peers */ | 2485 | PRIu64 ", %" /* valid peers */ |
@@ -2484,6 +2500,7 @@ void write_final_stats (void){ | |||
2484 | rps_peers[i].stats[STAT_TYPE_BLOCKS_MANY_PUSH_NO_PULL], | 2500 | rps_peers[i].stats[STAT_TYPE_BLOCKS_MANY_PUSH_NO_PULL], |
2485 | rps_peers[i].stats[STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL], | 2501 | rps_peers[i].stats[STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL], |
2486 | rps_peers[i].stats[STAT_TYPE_ISSUED_PUSH_SEND], | 2502 | rps_peers[i].stats[STAT_TYPE_ISSUED_PUSH_SEND], |
2503 | rps_peers[i].stats[STAT_TYPE_ISSUED_PUSH_SEND_MH], | ||
2487 | rps_peers[i].stats[STAT_TYPE_ISSUED_PULL_REQ], | 2504 | rps_peers[i].stats[STAT_TYPE_ISSUED_PULL_REQ], |
2488 | rps_peers[i].stats[STAT_TYPE_ISSUED_PULL_REQ_MH], | 2505 | rps_peers[i].stats[STAT_TYPE_ISSUED_PULL_REQ_MH], |
2489 | rps_peers[i].stats[STAT_TYPE_ISSUED_PULL_REP], | 2506 | rps_peers[i].stats[STAT_TYPE_ISSUED_PULL_REP], |
@@ -2492,6 +2509,7 @@ void write_final_stats (void){ | |||
2492 | rps_peers[i].stats[STAT_TYPE_SENT_PULL_REQ_MH], | 2509 | rps_peers[i].stats[STAT_TYPE_SENT_PULL_REQ_MH], |
2493 | rps_peers[i].stats[STAT_TYPE_SENT_PULL_REP], | 2510 | rps_peers[i].stats[STAT_TYPE_SENT_PULL_REP], |
2494 | rps_peers[i].stats[STAT_TYPE_RECV_PUSH_SEND], | 2511 | rps_peers[i].stats[STAT_TYPE_RECV_PUSH_SEND], |
2512 | rps_peers[i].stats[STAT_TYPE_RECV_PUSH_SEND_MH], | ||
2495 | rps_peers[i].stats[STAT_TYPE_RECV_PULL_REQ], | 2513 | rps_peers[i].stats[STAT_TYPE_RECV_PULL_REQ], |
2496 | rps_peers[i].stats[STAT_TYPE_RECV_PULL_REQ_MH], | 2514 | rps_peers[i].stats[STAT_TYPE_RECV_PULL_REQ_MH], |
2497 | rps_peers[i].stats[STAT_TYPE_RECV_PULL_REP_MH], | 2515 | rps_peers[i].stats[STAT_TYPE_RECV_PULL_REP_MH], |
@@ -2517,9 +2535,9 @@ void write_final_stats (void){ | |||
2517 | "SUM %" | 2535 | "SUM %" |
2518 | PRIu64 " %" /* rounds */ | 2536 | PRIu64 " %" /* rounds */ |
2519 | PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" /* blocking */ | 2537 | PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" /* blocking */ |
2520 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* issued */ | 2538 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* issued */ |
2521 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* sent */ | 2539 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* sent */ |
2522 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* recv */ | 2540 | PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" /* recv */ |
2523 | PRIu64 ", %" /* view size */ | 2541 | PRIu64 ", %" /* view size */ |
2524 | PRIu64 ", %" /* known peers */ | 2542 | PRIu64 ", %" /* known peers */ |
2525 | PRIu64 ", %" /* valid peers */ | 2543 | PRIu64 ", %" /* valid peers */ |
@@ -2538,6 +2556,7 @@ void write_final_stats (void){ | |||
2538 | sums[STAT_TYPE_BLOCKS_MANY_PUSH_NO_PULL], | 2556 | sums[STAT_TYPE_BLOCKS_MANY_PUSH_NO_PULL], |
2539 | sums[STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL], | 2557 | sums[STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL], |
2540 | sums[STAT_TYPE_ISSUED_PUSH_SEND], | 2558 | sums[STAT_TYPE_ISSUED_PUSH_SEND], |
2559 | sums[STAT_TYPE_ISSUED_PUSH_SEND_MH], | ||
2541 | sums[STAT_TYPE_ISSUED_PULL_REQ], | 2560 | sums[STAT_TYPE_ISSUED_PULL_REQ], |
2542 | sums[STAT_TYPE_ISSUED_PULL_REQ_MH], | 2561 | sums[STAT_TYPE_ISSUED_PULL_REQ_MH], |
2543 | sums[STAT_TYPE_ISSUED_PULL_REP], | 2562 | sums[STAT_TYPE_ISSUED_PULL_REP], |
@@ -2546,6 +2565,7 @@ void write_final_stats (void){ | |||
2546 | sums[STAT_TYPE_SENT_PULL_REQ_MH], | 2565 | sums[STAT_TYPE_SENT_PULL_REQ_MH], |
2547 | sums[STAT_TYPE_SENT_PULL_REP], | 2566 | sums[STAT_TYPE_SENT_PULL_REP], |
2548 | sums[STAT_TYPE_RECV_PUSH_SEND], | 2567 | sums[STAT_TYPE_RECV_PUSH_SEND], |
2568 | sums[STAT_TYPE_RECV_PUSH_SEND_MH], | ||
2549 | sums[STAT_TYPE_RECV_PULL_REQ], | 2569 | sums[STAT_TYPE_RECV_PULL_REQ], |
2550 | sums[STAT_TYPE_RECV_PULL_REQ_MH], | 2570 | sums[STAT_TYPE_RECV_PULL_REQ_MH], |
2551 | sums[STAT_TYPE_RECV_PULL_REP], | 2571 | sums[STAT_TYPE_RECV_PULL_REP], |
@@ -2855,6 +2875,7 @@ run (void *cls, | |||
2855 | BIT(STAT_TYPE_BLOCKS_MANY_PUSH_NO_PULL) | | 2875 | BIT(STAT_TYPE_BLOCKS_MANY_PUSH_NO_PULL) | |
2856 | BIT(STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL) | | 2876 | BIT(STAT_TYPE_BLOCKS_NO_PUSH_NO_PULL) | |
2857 | BIT(STAT_TYPE_ISSUED_PUSH_SEND) | | 2877 | BIT(STAT_TYPE_ISSUED_PUSH_SEND) | |
2878 | BIT(STAT_TYPE_ISSUED_PUSH_SEND_MH) | | ||
2858 | BIT(STAT_TYPE_ISSUED_PULL_REQ) | | 2879 | BIT(STAT_TYPE_ISSUED_PULL_REQ) | |
2859 | BIT(STAT_TYPE_ISSUED_PULL_REQ_MH) | | 2880 | BIT(STAT_TYPE_ISSUED_PULL_REQ_MH) | |
2860 | BIT(STAT_TYPE_ISSUED_PULL_REP) | | 2881 | BIT(STAT_TYPE_ISSUED_PULL_REP) | |
@@ -2863,6 +2884,7 @@ run (void *cls, | |||
2863 | BIT(STAT_TYPE_SENT_PULL_REQ_MH) | | 2884 | BIT(STAT_TYPE_SENT_PULL_REQ_MH) | |
2864 | BIT(STAT_TYPE_SENT_PULL_REP) | | 2885 | BIT(STAT_TYPE_SENT_PULL_REP) | |
2865 | BIT(STAT_TYPE_RECV_PUSH_SEND) | | 2886 | BIT(STAT_TYPE_RECV_PUSH_SEND) | |
2887 | BIT(STAT_TYPE_RECV_PUSH_SEND_MH) | | ||
2866 | BIT(STAT_TYPE_RECV_PULL_REQ) | | 2888 | BIT(STAT_TYPE_RECV_PULL_REQ) | |
2867 | BIT(STAT_TYPE_RECV_PULL_REQ_MH) | | 2889 | BIT(STAT_TYPE_RECV_PULL_REQ_MH) | |
2868 | BIT(STAT_TYPE_RECV_PULL_REP) | | 2890 | BIT(STAT_TYPE_RECV_PULL_REP) | |
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 63d4c1865..1871ef006 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -3500,6 +3500,15 @@ handle_peer_push (void *cls, | |||
3500 | if (channel_ctx->peer_ctx->sub == msub) | 3500 | if (channel_ctx->peer_ctx->sub == msub) |
3501 | { | 3501 | { |
3502 | GNUNET_STATISTICS_update(stats, "# push message received", 1, GNUNET_NO); | 3502 | GNUNET_STATISTICS_update(stats, "# push message received", 1, GNUNET_NO); |
3503 | if (NULL != map_single_hop && | ||
3504 | GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, | ||
3505 | peer)) | ||
3506 | { | ||
3507 | GNUNET_STATISTICS_update (stats, | ||
3508 | "# push message received (multi-hop peer)", | ||
3509 | 1, | ||
3510 | GNUNET_NO); | ||
3511 | } | ||
3503 | } | 3512 | } |
3504 | 3513 | ||
3505 | #if ENABLE_MALICIOUS | 3514 | #if ENABLE_MALICIOUS |
@@ -3881,6 +3890,15 @@ send_push (struct PeerContext *peer_ctx) | |||
3881 | "# push send issued", | 3890 | "# push send issued", |
3882 | 1, | 3891 | 1, |
3883 | GNUNET_NO); | 3892 | GNUNET_NO); |
3893 | if (NULL != map_single_hop && | ||
3894 | GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, | ||
3895 | &peer_ctx->peer_id)) | ||
3896 | { | ||
3897 | GNUNET_STATISTICS_update (stats, | ||
3898 | "# push send issued (multi-hop peer)", | ||
3899 | 1, | ||
3900 | GNUNET_NO); | ||
3901 | } | ||
3884 | } | 3902 | } |
3885 | } | 3903 | } |
3886 | 3904 | ||
diff --git a/src/rps/rps-test_util.h b/src/rps/rps-test_util.h index ace833034..5009073d0 100644 --- a/src/rps/rps-test_util.h +++ b/src/rps/rps-test_util.h | |||
@@ -65,7 +65,7 @@ close_all_files (); | |||
65 | #define to_file(file_name, ...) do { \ | 65 | #define to_file(file_name, ...) do { \ |
66 | char tmp_buf[512] = "";\ | 66 | char tmp_buf[512] = "";\ |
67 | int size;\ | 67 | int size;\ |
68 | if (NULL == file_name) return; \ | 68 | if (NULL == file_name) break; \ |
69 | size = GNUNET_snprintf(tmp_buf,sizeof(tmp_buf),__VA_ARGS__);\ | 69 | size = GNUNET_snprintf(tmp_buf,sizeof(tmp_buf),__VA_ARGS__);\ |
70 | if (0 > size)\ | 70 | if (0 > size)\ |
71 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING,\ | 71 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING,\ |
diff --git a/src/statistics/test_gnunet_statistics.py.in b/src/statistics/test_gnunet_statistics.py.in index 64e66f238..b14dc9d9e 100644 --- a/src/statistics/test_gnunet_statistics.py.in +++ b/src/statistics/test_gnunet_statistics.py.in | |||
@@ -1,5 +1,5 @@ | |||
1 | #!@PYTHON@ | 1 | #!@PYTHON@ |
2 | from __future__ import print_function | 2 | |
3 | import os | 3 | import os |
4 | import sys | 4 | import sys |
5 | import shutil | 5 | import shutil |
diff --git a/src/transport/benchmark.sh b/src/transport/benchmark.sh index 6ae68af2a..a29e6ec2d 100755 --- a/src/transport/benchmark.sh +++ b/src/transport/benchmark.sh | |||
@@ -1,15 +1,13 @@ | |||
1 | #/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | for i in {1..0} | 3 | for i in $(seq 1 0) |
4 | do | 4 | do |
5 | echo RUN $i | 5 | echo RUN $i |
6 | ./test_transport_api_reliability_http | 6 | ./test_transport_api_reliability_http |
7 | done | 7 | done |
8 | 8 | ||
9 | for i in {1..100} | 9 | for i in $(seq 1 100) |
10 | do | 10 | do |
11 | echo RUN $i | 11 | echo RUN $i |
12 | ./test_transport_api_reliability_https | 12 | ./test_transport_api_reliability_https |
13 | done | 13 | done |
14 | |||
15 | \ No newline at end of file | ||
diff --git a/src/transport/install-bluetooth-helper.sh b/src/transport/install-bluetooth-helper.sh index 409078759..5c40250fa 100755 --- a/src/transport/install-bluetooth-helper.sh +++ b/src/transport/install-bluetooth-helper.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # $1 - bindir | 2 | # $1 - bindir |
3 | # $2 - sudo binary (optional) | 3 | # $2 - sudo binary (optional) |
4 | $2 chown root:root $1/gnunet-helper-transport-bluetooth || true | 4 | $2 chown root:root $1/gnunet-helper-transport-bluetooth || true |
diff --git a/src/transport/install-wlan-helper.sh b/src/transport/install-wlan-helper.sh index 54b3360be..0fa9c9806 100755 --- a/src/transport/install-wlan-helper.sh +++ b/src/transport/install-wlan-helper.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # $1 - bindir | 2 | # $1 - bindir |
3 | # $2 - sudo binary (optional) | 3 | # $2 - sudo binary (optional) |
4 | $2 chown root:root $1/gnunet-helper-transport-wlan || true | 4 | $2 chown root:root $1/gnunet-helper-transport-wlan || true |
diff --git a/src/transport/profile_transport.sh b/src/transport/profile_transport.sh index aa5c4a88f..0e6935fc7 100755 --- a/src/transport/profile_transport.sh +++ b/src/transport/profile_transport.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | 2 | ||
3 | C_ITERATIONS=5 | 3 | C_ITERATIONS=5 |
4 | C_MESSAGE_DELTA=10 | 4 | C_MESSAGE_DELTA=10 |
@@ -11,7 +11,7 @@ C_MESSAGE_END=2000 | |||
11 | # done | 11 | # done |
12 | 12 | ||
13 | 13 | ||
14 | for ((cur=$C_MESSAGE_START; cur<=$C_MESSAGE_END; cur = cur + $C_MESSAGE_DELTA)) | 14 | for $((cur=$C_MESSAGE_START; cur<=$C_MESSAGE_END; cur = cur + $C_MESSAGE_DELTA)) |
15 | { | 15 | { |
16 | ./gnunet-transport-profiler -p NSGWRTMHG2YJK9KZSTEWKJ5TK20AGRDBWHFA1ZNKKZ7T360MZ8S0 -s -c perf_https_peer1.conf -n 20240 -m $cur -i 4 | 16 | ./gnunet-transport-profiler -p NSGWRTMHG2YJK9KZSTEWKJ5TK20AGRDBWHFA1ZNKKZ7T360MZ8S0 -s -c perf_https_peer1.conf -n 20240 -m $cur -i 4 |
17 | sleep 1 | 17 | sleep 1 |
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 361fa55d6..f700428a2 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c | |||
@@ -73,9 +73,9 @@ static int rewrite; | |||
73 | */ | 73 | */ |
74 | static void | 74 | static void |
75 | print_option (void *cls, | 75 | print_option (void *cls, |
76 | const char *section, | 76 | const char *section, |
77 | const char *option, | 77 | const char *option, |
78 | const char *value) | 78 | const char *value) |
79 | { | 79 | { |
80 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 80 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
81 | 81 | ||
@@ -86,27 +86,27 @@ print_option (void *cls, | |||
86 | char *fn; | 86 | char *fn; |
87 | 87 | ||
88 | GNUNET_assert (GNUNET_OK == | 88 | GNUNET_assert (GNUNET_OK == |
89 | GNUNET_CONFIGURATION_get_value_filename (cfg, | 89 | GNUNET_CONFIGURATION_get_value_filename (cfg, |
90 | section, | 90 | section, |
91 | option, | 91 | option, |
92 | &value_fn)); | 92 | &value_fn)); |
93 | fn = GNUNET_STRINGS_filename_expand (value_fn); | 93 | fn = GNUNET_STRINGS_filename_expand (value_fn); |
94 | if (NULL == fn) | 94 | if (NULL == fn) |
95 | fn = value_fn; | 95 | fn = value_fn; |
96 | else | 96 | else |
97 | GNUNET_free (value_fn); | 97 | GNUNET_free (value_fn); |
98 | fprintf (stdout, | 98 | fprintf (stdout, |
99 | "%s = %s\n", | 99 | "%s = %s\n", |
100 | option, | 100 | option, |
101 | fn); | 101 | fn); |
102 | GNUNET_free (fn); | 102 | GNUNET_free (fn); |
103 | } | 103 | } |
104 | else | 104 | else |
105 | { | 105 | { |
106 | fprintf (stdout, | 106 | fprintf (stdout, |
107 | "%s = %s\n", | 107 | "%s = %s\n", |
108 | option, | 108 | option, |
109 | value); | 109 | value); |
110 | } | 110 | } |
111 | } | 111 | } |
112 | 112 | ||
@@ -123,8 +123,8 @@ print_section_name (void *cls, | |||
123 | { | 123 | { |
124 | (void) cls; | 124 | (void) cls; |
125 | fprintf (stdout, | 125 | fprintf (stdout, |
126 | "%s\n", | 126 | "%s\n", |
127 | section); | 127 | section); |
128 | } | 128 | } |
129 | 129 | ||
130 | 130 | ||
@@ -133,7 +133,8 @@ print_section_name (void *cls, | |||
133 | * | 133 | * |
134 | * @param cls closure | 134 | * @param cls closure |
135 | * @param args remaining command-line arguments | 135 | * @param args remaining command-line arguments |
136 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) | 136 | * @param cfgfile name of the configuration file used (for saving, |
137 | * can be NULL!) | ||
137 | * @param cfg configuration | 138 | * @param cfg configuration |
138 | */ | 139 | */ |
139 | static void | 140 | static void |
@@ -192,35 +193,36 @@ run (void *cls, | |||
192 | { | 193 | { |
193 | GNUNET_CONFIGURATION_iterate_section_values (cfg, | 194 | GNUNET_CONFIGURATION_iterate_section_values (cfg, |
194 | section, | 195 | section, |
195 | &print_option, | 196 | &print_option, |
196 | (void *) cfg); | 197 | (void *) cfg); |
197 | } | 198 | } |
198 | else | 199 | else |
199 | { | 200 | { |
200 | if (is_filename) | 201 | if (is_filename) |
201 | { | 202 | { |
202 | if (GNUNET_OK != | 203 | if (GNUNET_OK != |
203 | GNUNET_CONFIGURATION_get_value_filename (cfg, | 204 | GNUNET_CONFIGURATION_get_value_filename (cfg, |
204 | section, | 205 | section, |
205 | option, | 206 | option, |
206 | &value)) | 207 | &value)) |
207 | { | 208 | { |
208 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 209 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
209 | section, option); | 210 | section, option); |
210 | ret = 3; | 211 | ret = 3; |
211 | goto cleanup; | 212 | goto cleanup; |
212 | } | 213 | } |
213 | } | 214 | } |
214 | else | 215 | else |
215 | { | 216 | { |
216 | if (GNUNET_OK != | 217 | if (GNUNET_OK != |
217 | GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &value)) | 218 | GNUNET_CONFIGURATION_get_value_string (cfg, section, |
218 | { | 219 | option, &value)) |
219 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 220 | { |
220 | section, option); | 221 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
221 | ret = 3; | 222 | section, option); |
223 | ret = 3; | ||
222 | goto cleanup; | 224 | goto cleanup; |
223 | } | 225 | } |
224 | } | 226 | } |
225 | fprintf (stdout, "%s\n", value); | 227 | fprintf (stdout, "%s\n", value); |
226 | } | 228 | } |
@@ -245,10 +247,10 @@ run (void *cls, | |||
245 | const char *xdg = getenv ("XDG_CONFIG_HOME"); | 247 | const char *xdg = getenv ("XDG_CONFIG_HOME"); |
246 | if (NULL != xdg) | 248 | if (NULL != xdg) |
247 | GNUNET_asprintf (&cfg_fn, | 249 | GNUNET_asprintf (&cfg_fn, |
248 | "%s%s%s", | 250 | "%s%s%s", |
249 | xdg, | 251 | xdg, |
250 | DIR_SEPARATOR_STR, | 252 | DIR_SEPARATOR_STR, |
251 | GNUNET_OS_project_data_get ()->config_file); | 253 | GNUNET_OS_project_data_get ()->config_file); |
252 | else | 254 | else |
253 | cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file); | 255 | cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file); |
254 | cfgfile = cfg_fn; | 256 | cfgfile = cfg_fn; |
@@ -256,14 +258,14 @@ run (void *cls, | |||
256 | if ( (NULL != diff) || (NULL != out) ) | 258 | if ( (NULL != diff) || (NULL != out) ) |
257 | { | 259 | { |
258 | if (GNUNET_OK != | 260 | if (GNUNET_OK != |
259 | GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, | 261 | GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, |
260 | cfgfile)) | 262 | cfgfile)) |
261 | ret = 2; | 263 | ret = 2; |
262 | } | 264 | } |
263 | GNUNET_free_non_null (cfg_fn); | 265 | GNUNET_free_non_null (cfg_fn); |
264 | if (NULL != out) | 266 | if (NULL != out) |
265 | GNUNET_CONFIGURATION_destroy (out); | 267 | GNUNET_CONFIGURATION_destroy (out); |
266 | cleanup: | 268 | cleanup: |
267 | if (NULL != diff) | 269 | if (NULL != diff) |
268 | GNUNET_CONFIGURATION_destroy (diff); | 270 | GNUNET_CONFIGURATION_destroy (diff); |
269 | } | 271 | } |
@@ -282,32 +284,32 @@ main (int argc, | |||
282 | { | 284 | { |
283 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 285 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
284 | GNUNET_GETOPT_option_flag ('f', | 286 | GNUNET_GETOPT_option_flag ('f', |
285 | "filename", | 287 | "filename", |
286 | gettext_noop ("obtain option of value as a filename (with $-expansion)"), | 288 | gettext_noop ("interpret option value as a filename (with $-expansion)"), |
287 | &is_filename), | 289 | &is_filename), |
288 | GNUNET_GETOPT_option_string ('s', | 290 | GNUNET_GETOPT_option_string ('s', |
289 | "section", | 291 | "section", |
290 | "SECTION", | 292 | "SECTION", |
291 | gettext_noop ("name of the section to access"), | 293 | gettext_noop ("name of the section to access"), |
292 | §ion), | 294 | §ion), |
293 | GNUNET_GETOPT_option_string ('o', | 295 | GNUNET_GETOPT_option_string ('o', |
294 | "option", | 296 | "option", |
295 | "OPTION", | 297 | "OPTION", |
296 | gettext_noop ("name of the option to access"), | 298 | gettext_noop ("name of the option to access"), |
297 | &option), | 299 | &option), |
298 | GNUNET_GETOPT_option_string ('V', | 300 | GNUNET_GETOPT_option_string ('V', |
299 | "value", | 301 | "value", |
300 | "VALUE", | 302 | "VALUE", |
301 | gettext_noop ("value to set"), | 303 | gettext_noop ("value to set"), |
302 | &value), | 304 | &value), |
303 | GNUNET_GETOPT_option_flag ('S', | 305 | GNUNET_GETOPT_option_flag ('S', |
304 | "list-sections", | 306 | "list-sections", |
305 | gettext_noop ("print available configuration sections"), | 307 | gettext_noop ("print available configuration sections"), |
306 | &list_sections), | 308 | &list_sections), |
307 | GNUNET_GETOPT_option_flag ('w', | 309 | GNUNET_GETOPT_option_flag ('w', |
308 | "rewrite", | 310 | "rewrite", |
309 | gettext_noop ("write configuration file that only contains delta to defaults"), | 311 | gettext_noop ("write configuration file that only contains delta to defaults"), |
310 | &rewrite), | 312 | &rewrite), |
311 | GNUNET_GETOPT_OPTION_END | 313 | GNUNET_GETOPT_OPTION_END |
312 | }; | 314 | }; |
313 | if (GNUNET_OK != | 315 | if (GNUNET_OK != |
@@ -316,12 +318,12 @@ main (int argc, | |||
316 | return 2; | 318 | return 2; |
317 | 319 | ||
318 | ret = (GNUNET_OK == | 320 | ret = (GNUNET_OK == |
319 | GNUNET_PROGRAM_run (argc, | 321 | GNUNET_PROGRAM_run (argc, |
320 | argv, | 322 | argv, |
321 | "gnunet-config [OPTIONS]", | 323 | "gnunet-config [OPTIONS]", |
322 | gettext_noop ("Manipulate GNUnet configuration files"), | 324 | gettext_noop ("Manipulate GNUnet configuration files"), |
323 | options, | 325 | options, |
324 | &run, NULL)) ? 0 : ret; | 326 | &run, NULL)) ? 0 : ret; |
325 | GNUNET_free ((void*) argv); | 327 | GNUNET_free ((void*) argv); |
326 | return ret; | 328 | return ret; |
327 | } | 329 | } |
diff --git a/src/util/gnunet-qr.c b/src/util/gnunet-qr.c index 1106d5cb2..fa95d6c05 100644 --- a/src/util/gnunet-qr.c +++ b/src/util/gnunet-qr.c | |||
@@ -17,7 +17,12 @@ | |||
17 | 17 | ||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | 20 | /** | |
21 | * @file util/gnunet-qr.c | ||
22 | * @author Hartmut Goebel (original implementation) | ||
23 | * @author Martin Schanzenbach (integrate gnunet-uri) | ||
24 | * @author Christian Grothoff (error handling) | ||
25 | */ | ||
21 | #include <stdio.h> | 26 | #include <stdio.h> |
22 | #include <zbar.h> | 27 | #include <zbar.h> |
23 | #include <stdbool.h> | 28 | #include <stdbool.h> |
@@ -26,18 +31,35 @@ | |||
26 | 31 | ||
27 | #define LOG(fmt, ...) if (verbose == true) printf(fmt, ## __VA_ARGS__) | 32 | #define LOG(fmt, ...) if (verbose == true) printf(fmt, ## __VA_ARGS__) |
28 | 33 | ||
29 | // Command line options | 34 | /** |
35 | * Video device to capture from. Sane default for GNU/Linux systems. | ||
36 | */ | ||
30 | static char* device = "/dev/video0"; | 37 | static char* device = "/dev/video0"; |
38 | |||
39 | /** | ||
40 | * --verbose option | ||
41 | */ | ||
31 | static int verbose = false; | 42 | static int verbose = false; |
43 | |||
44 | /** | ||
45 | * --silent option | ||
46 | */ | ||
32 | static int silent = false; | 47 | static int silent = false; |
33 | 48 | ||
34 | // Handler exit code | 49 | /** |
50 | * Handler exit code | ||
51 | */ | ||
35 | static long unsigned int exit_code = 1; | 52 | static long unsigned int exit_code = 1; |
36 | 53 | ||
37 | // Helper process we started. | 54 | /** |
55 | * Helper process we started. | ||
56 | */ | ||
38 | static struct GNUNET_OS_Process *p; | 57 | static struct GNUNET_OS_Process *p; |
39 | 58 | ||
40 | // Pipe used to communicate shutdown via signal. | 59 | |
60 | /** | ||
61 | * Pipe used to communicate child death via signal. | ||
62 | */ | ||
41 | static struct GNUNET_DISK_PipeHandle *sigpipe; | 63 | static struct GNUNET_DISK_PipeHandle *sigpipe; |
42 | 64 | ||
43 | 65 | ||
@@ -69,8 +91,10 @@ maint_child_death (void *cls) | |||
69 | * @param cfg configuration | 91 | * @param cfg configuration |
70 | */ | 92 | */ |
71 | static void | 93 | static void |
72 | gnunet_uri (void *cls, const char *uri, const char *cfgfile, | 94 | gnunet_uri (void *cls, |
73 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 95 | const char *uri, |
96 | const char *cfgfile, | ||
97 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
74 | { | 98 | { |
75 | const char *orig_uri; | 99 | const char *orig_uri; |
76 | const char *slash; | 100 | const char *slash; |
@@ -88,7 +112,8 @@ gnunet_uri (void *cls, const char *uri, const char *cfgfile, | |||
88 | uri += strlen ("gnunet://"); | 112 | uri += strlen ("gnunet://"); |
89 | if (NULL == (slash = strchr (uri, '/'))) | 113 | if (NULL == (slash = strchr (uri, '/'))) |
90 | { | 114 | { |
91 | fprintf (stderr, _("Invalid URI: fails to specify subsystem\n")); | 115 | fprintf (stderr, |
116 | _("Invalid URI: fails to specify subsystem\n")); | ||
92 | return; | 117 | return; |
93 | } | 118 | } |
94 | subsystem = GNUNET_strndup (uri, slash - uri); | 119 | subsystem = GNUNET_strndup (uri, slash - uri); |
@@ -98,7 +123,9 @@ gnunet_uri (void *cls, const char *uri, const char *cfgfile, | |||
98 | subsystem, | 123 | subsystem, |
99 | &program)) | 124 | &program)) |
100 | { | 125 | { |
101 | fprintf (stderr, _("No handler known for subsystem `%s'\n"), subsystem); | 126 | fprintf (stderr, |
127 | _("No handler known for subsystem `%s'\n"), | ||
128 | subsystem); | ||
102 | GNUNET_free (subsystem); | 129 | GNUNET_free (subsystem); |
103 | return; | 130 | return; |
104 | } | 131 | } |
@@ -120,6 +147,111 @@ gnunet_uri (void *cls, const char *uri, const char *cfgfile, | |||
120 | 147 | ||
121 | 148 | ||
122 | /** | 149 | /** |
150 | * Obtain QR code 'symbol' from @a proc. | ||
151 | * | ||
152 | * @param proc zbar processor to use | ||
153 | * @return NULL on error | ||
154 | */ | ||
155 | static const zbar_symbol_t * | ||
156 | get_symbol (zbar_processor_t *proc) | ||
157 | { | ||
158 | const zbar_symbol_set_t* symbols; | ||
159 | int rc; | ||
160 | int n; | ||
161 | |||
162 | if (0 != | ||
163 | zbar_processor_parse_config (proc, "enable")) | ||
164 | { | ||
165 | GNUNET_break (0); | ||
166 | return NULL; | ||
167 | } | ||
168 | |||
169 | /* initialize the Processor */ | ||
170 | if (0 != | ||
171 | (rc = zbar_processor_init(proc, device, 1))) | ||
172 | { | ||
173 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
174 | "Failed to open device `%s': %d\n", | ||
175 | device, | ||
176 | rc); | ||
177 | return NULL; | ||
178 | } | ||
179 | |||
180 | /* enable the preview window */ | ||
181 | if ( (0 != (rc = zbar_processor_set_visible (proc, 1))) || | ||
182 | (0 != (rc = zbar_processor_set_active(proc, 1))) ) | ||
183 | { | ||
184 | GNUNET_break (0); | ||
185 | return NULL; | ||
186 | } | ||
187 | |||
188 | /* read at least one barcode (or until window closed) */ | ||
189 | LOG ("Capturing\n"); | ||
190 | n = zbar_process_one (proc, -1); | ||
191 | |||
192 | /* hide the preview window */ | ||
193 | (void) zbar_processor_set_active (proc, 0); | ||
194 | (void) zbar_processor_set_visible (proc, 0); | ||
195 | if (-1 == n) | ||
196 | return NULL; /* likely user closed the window */ | ||
197 | LOG ("Got %i images\n", | ||
198 | n); | ||
199 | /* extract results */ | ||
200 | symbols = zbar_processor_get_results (proc); | ||
201 | if (NULL == symbols) | ||
202 | { | ||
203 | GNUNET_break (0); | ||
204 | return NULL; | ||
205 | } | ||
206 | return zbar_symbol_set_first_symbol (symbols); | ||
207 | } | ||
208 | |||
209 | |||
210 | /** | ||
211 | * Run zbar QR code parser. | ||
212 | * | ||
213 | * @return NULL on error, otherwise the URI that we found | ||
214 | */ | ||
215 | static char * | ||
216 | run_zbar () | ||
217 | { | ||
218 | zbar_processor_t *proc; | ||
219 | const char *data; | ||
220 | char *ret; | ||
221 | const zbar_symbol_t* symbol; | ||
222 | |||
223 | /* configure the Processor */ | ||
224 | proc = zbar_processor_create (1); | ||
225 | if (NULL == proc) | ||
226 | { | ||
227 | GNUNET_break (0); | ||
228 | return NULL; | ||
229 | } | ||
230 | |||
231 | symbol = get_symbol (proc); | ||
232 | if (NULL == symbol) | ||
233 | { | ||
234 | zbar_processor_destroy (proc); | ||
235 | return NULL; | ||
236 | } | ||
237 | data = zbar_symbol_get_data (symbol); | ||
238 | if (NULL == data) | ||
239 | { | ||
240 | GNUNET_break (0); | ||
241 | zbar_processor_destroy (proc); | ||
242 | return NULL; | ||
243 | } | ||
244 | LOG ("Found %s \"%s\"\n", | ||
245 | zbar_get_symbol_name (zbar_symbol_get_type(symbol)), | ||
246 | data); | ||
247 | ret = GNUNET_strdup (data); | ||
248 | /* clean up */ | ||
249 | zbar_processor_destroy(proc); | ||
250 | return ret; | ||
251 | } | ||
252 | |||
253 | |||
254 | /** | ||
123 | * Main function that will be run by the scheduler. | 255 | * Main function that will be run by the scheduler. |
124 | * | 256 | * |
125 | * @param cls closure | 257 | * @param cls closure |
@@ -133,65 +265,33 @@ run (void *cls, | |||
133 | const char *cfgfile, | 265 | const char *cfgfile, |
134 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 266 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
135 | { | 267 | { |
136 | /* create a Processor */ | 268 | char *data; |
137 | LOG("Initializing\n"); | ||
138 | zbar_processor_t *proc = zbar_processor_create(1); | ||
139 | |||
140 | // FIXME: Wrap all this into a function which returns an error on | ||
141 | // failure. And here ensure the processor is destroyed at the end. | ||
142 | |||
143 | /* configure the Processor */ | ||
144 | zbar_processor_parse_config(proc, "enable"); | ||
145 | |||
146 | /* initialize the Processor */ | ||
147 | LOG("Opening video device %s\n", device); | ||
148 | // FIXME: error handling | ||
149 | zbar_processor_init(proc, device, 1); | ||
150 | |||
151 | /* enable the preview window */ | ||
152 | zbar_processor_set_visible(proc, 1); | ||
153 | zbar_processor_set_active(proc, 1); | ||
154 | |||
155 | /* keep scanning until user provides key/mouse input */ | ||
156 | //zbar_processor_user_wait(proc, -1); | ||
157 | 269 | ||
158 | // read at least one barcode (or until window closed) | 270 | data = run_zbar (); |
159 | LOG("Capturing\n"); | 271 | if (NULL == data) |
160 | int n; | 272 | return; |
161 | n = zbar_process_one(proc, -1); | 273 | gnunet_uri (cls, |
162 | LOG("Got %i images\n", n); | 274 | data, |
163 | // FIXME: Error handling (n = -1) | 275 | cfgfile, |
164 | 276 | cfg); | |
165 | // hide the preview window | 277 | if (exit_code != 0) |
166 | zbar_processor_set_active(proc, 0); | 278 | { |
167 | zbar_processor_set_visible(proc, 0); | 279 | printf ("Failed to add URI %s\n", |
168 | 280 | data); | |
169 | // extract results | ||
170 | const zbar_symbol_set_t* symbols = zbar_processor_get_results(proc); | ||
171 | const zbar_symbol_t* symbol = zbar_symbol_set_first_symbol(symbols); | ||
172 | |||
173 | if (symbol != NULL) { | ||
174 | const char* data = zbar_symbol_get_data(symbol); | ||
175 | LOG("Found %s \"%s\"\n", | ||
176 | zbar_get_symbol_name(zbar_symbol_get_type(symbol)), data); | ||
177 | |||
178 | gnunet_uri(cls, data, cfgfile, cfg); | ||
179 | if (exit_code != 0) { | ||
180 | printf("Failed to add URI %s\n", data); | ||
181 | } else { | ||
182 | printf("Added URI %s\n", data); | ||
183 | } | ||
184 | } | 281 | } |
185 | 282 | else | |
186 | /* clean up */ | 283 | { |
187 | zbar_processor_destroy(proc); | 284 | printf ("Added URI %s\n", |
285 | data); | ||
286 | } | ||
287 | GNUNET_free (data); | ||
188 | }; | 288 | }; |
189 | 289 | ||
190 | 290 | ||
191 | int | 291 | int |
192 | main (int argc, char *const *argv) | 292 | main (int argc, char *const *argv) |
193 | { | 293 | { |
194 | static int ret; | 294 | int ret; |
195 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 295 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
196 | GNUNET_GETOPT_option_string ('d', "device", "DEVICE", | 296 | GNUNET_GETOPT_option_string ('d', "device", "DEVICE", |
197 | gettext_noop ("use video-device DEVICE (default: /dev/video0"), | 297 | gettext_noop ("use video-device DEVICE (default: /dev/video0"), |
@@ -204,6 +304,7 @@ main (int argc, char *const *argv) | |||
204 | &silent), | 304 | &silent), |
205 | GNUNET_GETOPT_OPTION_END | 305 | GNUNET_GETOPT_OPTION_END |
206 | }; | 306 | }; |
307 | |||
207 | ret = GNUNET_PROGRAM_run (argc, | 308 | ret = GNUNET_PROGRAM_run (argc, |
208 | argv, | 309 | argv, |
209 | "gnunet-qr", | 310 | "gnunet-qr", |
diff --git a/src/vpn/install-vpn-helper.sh b/src/vpn/install-vpn-helper.sh index 0996e7839..086dabb67 100755 --- a/src/vpn/install-vpn-helper.sh +++ b/src/vpn/install-vpn-helper.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # $1 - bindir | 2 | # $1 - bindir |
3 | # $2 - sudo binary (optional) | 3 | # $2 - sudo binary (optional) |
4 | $2 chown root:root $1/gnunet-helper-vpn || true | 4 | $2 chown root:root $1/gnunet-helper-vpn || true |
diff --git a/src/vpn/tests/test-helper-icmp.sh b/src/vpn/tests/test-helper-icmp.sh index eb5bd043b..2d0c8425a 100755 --- a/src/vpn/tests/test-helper-icmp.sh +++ b/src/vpn/tests/test-helper-icmp.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | 2 | ||
3 | /opt/gnunet/bin/gnunet-helper-vpn < ping > result 2>/dev/null & | 3 | /opt/gnunet/bin/gnunet-helper-vpn < ping > result 2>/dev/null & |
4 | 4 | ||
diff --git a/src/vpn/tests/test-helper-ifaddr.sh b/src/vpn/tests/test-helper-ifaddr.sh index f64f9aa53..b8fde999d 100755 --- a/src/vpn/tests/test-helper-ifaddr.sh +++ b/src/vpn/tests/test-helper-ifaddr.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | 2 | ||
3 | FIFO=$(mktemp) | 3 | FIFO=$(mktemp) |
4 | 4 | ||